In reply to dave_59:
Hi Dave,
Since this is a useful pattern in sequences:
item = item_type::type_id::create( "item", null, get_full_name() );
Is there some reason that this function:
static function T uvm_object_registry #(T,Tname)::create (
string name = "",
uvm_component parent = null,
string contxt = ""
)
Isn't defined like this:
static function T uvm_object_registry #(T,Tname)::create (
string name = "",
uvm_object parent = null, // <-- now works for both sequences and components
string contxt = ""
)
Then the pattern:
obj = obj_type::type_id::create( "obj", this );
Would work in both components and sequences. Maybe the implementation would need to perform a test cast so it knows whether the parent is a component or a sequence, but I don't see why this wouldn't work. This would even be a backwards compatible change to the UVM library.
-Ryan