Tuesday, 2 February 2016

create() vs new() in UVM



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 before run then,factory replaces constructed object with derived object( specified in override).
if you use new() then you can’t override. 

You should always use create() rather than using new() for classes registered with the factory.

Example:
Coming soon...

No comments:

Post a Comment