Hi all ,
If I don’t specify the default value of name argument in class extended from uvm_sequence_item ::
class Txn extends uvm_sequence_item ;
`uvm_object_utils(Txn)
rand bit [1:0] b ;
function new (string name );
super.new(name);
endfunction
endclass
I get an error ::
Error-[TFAFTC] Too few arguments to function/task call
/asiclibs/libraries/uvm/uvm-1.1d/src/base/uvm_registry.svh, 199
“Txn::new()”
The above function/task call is not done with sufficient arguments.
But for classes extended from uvm_component if default value isn’t given ( for both name as well as parent argument ) it works fine .
[Q] SO why are default values necessary for uvm_object but not for uvm_component class ?