Jump to content
Sign in to follow this  
Hash

New &create

Recommended Posts

Hi,

Iam new to UVM and trying to understand the concepts.

Iam not very sure why we use "create " in UVM when we have the "new" already?

Can anyone help me understand the basic difference between the two & why we need "Create" in UVM?

-Thanks in advance

Hash

Share this post


Link to post
Share on other sites

Create() is a factory method which construct an object. To override an object you need to construct it using create(). if you use set_type_override then before run ,factory replaces constructed object with derived object( specified in override).

if you use new() then you cant override.

Share this post


Link to post
Share on other sites

Thanks Dave_345.

If i got it right, the difference between new() & create() is object over riding?

Can anyone please help with an example or point to any reference?

-Thanks in advance

Hash

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...