How to confirm the reason of a bug of '$rand.pload'

In reply to xcxfly:

Hi xcxfly,

The second issue is not actually causing the error you were having.
It is actually a guideline and if you don’t propagate the name of the constructor to the super class’s constructor.
Then when you create a my_transaction’s instance with different name, it will not take effect.

With your earlier code (name was not propagated):


my_transaction item;
item = my_transaction::type_id::create("item");
`uvm_info(get_type_name(), item.get_name, UVM_MEDIUM) // displays as uvm_sequence_item in log file.

With my suggested fix:


my_transaction item;
item = my_transaction::type_id::create("item");
`uvm_info(get_type_name(), item.get_name, UVM_MEDIUM) // displays as item in log file

Hope this helps.

-Baser