I have developed an agent which I have integrated in a already existing env which has many sub envs and agents.
I have developed a simple sequence to run on this agent, using start_item, finish_item etc.
But when I start my sequence from the test, the test is hanging after reaching body task of the sequence.
What can be the reason for this?
I have confirmed that driver and sequencer is connected and driver has get_next_item and item_done in the main_phase.
HI.
By default REQ is uvm_sequence_item.
If you have
class my_driver extends uvm_driver;
The req will be uvm_sequence_item as well as in the seq_item_port.
so you will need
squence_item_port.get_next_item(req);
$cast ( myitem, req ) // or $cast ( myitem, req.clone()) depends on what you do.
Or you will need
class my_seqr extends uvm_sequencer#(myitem);
and
class my_driver extends uvm_driver #(myitem);
I’m using class my_seqr extends uvm_sequencer#(myitem); and class my_driver extends uvm_driver #(myitem); with the req variable name as a sequence item. However, when I try to access the item variables (for instance req.data), I get data = null. But when I breakpoint at the seq_item_port.get(req); the req item is fetched successfully.
The only solution to this problem was changing the name of the req to whatever. Maybe as you suggested req is uvm_sequence_item base variable and some casting is needed.
I’m working with UVM for just a few days, so I’m just suggesting and sharing my experience.