I have a slave model implemented in uvm_agent
. By "slave" I meant that it can not initiate transaction by itself. Transaction is always initiated by the other side (master DUT). So it is kind of passive agent (although it is still able to transmit reply packet).
When the slave detect a packet from DUT, it will response/reply automatically (based on its protocol) with another packet.
The slave agent has a monitor to listen to DUT's initiate transfer. And since it is able to transmit packet, the slave agent also does have a driver to send a reply packet.
+------------+ master initiate transfer +------------------------+
| Master DUT | ------------------------> | UVM Agent - slave mode |
| | | Monitor |
| | | Driver Sequencer |
+------------+ +------------------------+
+------------+ +------------------------+
| Master DUT | | UVM Agent - slave mode |
| | slave auto reply | Monitor |
| | <------------------------- | Driver Sequencer |
+------------+ +------------------------+
My question is how does it suppose to send the reply packet? Directly from its driver? Since in uvm way, the driver item is always from a sequencer that is executing sequence from user test level. But now in this case, there is no sequence - only a detected packet from monitor.
My first idea is that I need to provide sort of feedback from monitor
to sequencer
and implement my protocol function there.
Or should I pass the packet directly from monitor
to driver
, and let it process it and send reply? If so, how do I do that?
Is there any better way?