I’m new to UVM… In UVM driver has seq_item_port to get the packet from sequencer. Is there a way where we can directly do driver.seq_item_port.put(pkt) which intern will trigger the driver.seq_item_port.get(pkt)… Just like the way VMM works…
PS:I’m new to UVM… apologies if its a dumb question…
For regular TLM ports ports you can do this as long as the port has been provided with both the get and put interfaces. However the sequence item port is not really a TLM port (created by a different group of people who did not think to enhance TLM ports to make it work for them). (ou must use the sequencer protocol (start_item()/finish_item()) to put items into the port.
Regarding the stat_item(pkt), what is actually the use of it?
I tried to do some research and it says that if the item is not initialized in create_item, then start_item will initialize it.
I don’t know exactly what it means by this and I don’t know how start_item initialize the item.
It also says that start_item() is the one that will tell the sequencer to use the default sequencer.
What I’m actually doing in my sequence is like this:
start_item(pkt); // I just add this without knowing what's the purpose of this task.
// Then I set the pkt here
finish_item(pkt); // What I know about this one is, this task tells the sequencer to start sending the pkt to the driver
We recommend that you use the factory create() method to initialize your sequence_item rather than rely on the default. start_item() is a blocking task that waits for a grant from the driver. This is what allows for late (or just-in-time) randomization of your item.