Hi - This I am sure is a typical scenario encountered in setting up a testbench.
I have a DUT which takes input packets and sends output packets. I have agents setup for both the input and output side.
The output side driver drives a response back to DUT which is based on the output packets captured by a monitor.
Question is how do I send the packets from monitor to the sequence So that it can analyse it and send the corresponding response stimulus item to the driver.
Please note that the output packets will come out of order and the order cannot be predicted.
From your problem statement it seems your Dut is half duplex which is sending packet in one direction at one time. If this is the case then you can capture packet at DUT side and analyise and can take out your useful info from there. And then you can set your configuration database and you can get that info your test case, From there you can use this info for driving you sequence. (using .start method)
NOTE: By this procedure you may need to use uvm_events.
If this is not the case then let me know if i am missing something.
You can define uvm_blocking_peek_imp in monitor and uvm_blocking_peek_port in sequencer. connect them in connect_phase. Override peek task in monitor(basically when you capture req just pass it through this task).Now from your sequence you can use p_sequencer.<peek_port>.peek(trans) to get that request type and generate response packet accordingly. I hope I understand your question.
The answer to your question depends on whether the output driver/sequence does anything besides respond to the outgoing packet. If it does not, then you have a Slave Sequence (see the Cookbook).
In this case, the slave sequence would be able to detect the outgoing packet and calculate the next packet to send back. The monitor would just passively observe the outgoing packets and report them out the analysis port.
Thanks Vishal and Ashish. I was expecting a solution similar to what ashish explained.
Hi Tom - First of all excellent work on the uvm tutorials.
So in my case the monitor would be monitoring some requests at the DUT output. lets call it req_txn. This will be sent to the sequence which will go over the contents of the req_txn and create a resp_txn which will be sent to the driver for sending back to DUT.
req_txn and resp_txn are different transaction types.
That’s exactly what a slave sequence does, except that you don’t have to worry about communication between the monitor and the sequence. As with any sequence, slave sequences can be parameterized with different request and response transaction types.
The advantages of this approach are that you don’t have to modify the sequencer, and you don’t have to create/connect the peek port/export between the monitor and the sequencer.
Hi All,
This is a very good discussion which I have gone trough and gained a clear understanding related to slave sequences.
I have a question in connection to this, my question may be wierd but I have some presenation to give in my organization for migrating from OVM–>UVM so that I could convince people in my team before UVM 1.2 and port the OVM to UVM so that once UVM 1.2 comes into existance there will be less pain in the migration process, and my focus now is on sequence library which is not at all recommended to use in UVM and my question is,
The above discussion related to the execution of a slave sequence, is this very hard to implemnent when we follow the sequence libraray kind of implementation in our environment. If yes, can you please focus on the performance issues which we face for this kind of implementation and the ways in which we address them without the sequence library kind of implementation.
Your inputs will be a lot of help.
Thanks In advance.
Slave sequences are intended to model behavior of a component in the system in some way. Representing the behavior as a sequence makes it easier to modify the behavior without having to change the set of components in your testbench. It is unliekly that you’ll need to use a sequence library for slave sequences, since you typically only run one slave sequence at a time on any particular agent.
The sequence library is much more applicable to stimulus, where you can create a library of scenarios that you wish to test, and then use the library to select one of those, or run multiple sequences from the library in a random order. Regardless of what you do for the stimulus, you’ll most likely only be running one slave sequence to model the responder behavior.