0
votes

UVM Testbench scenario

This is my scenario for verifying a Parity Encoder-Decoder DUT. Decoder Input agent here is the re-active agent and injects error into the data stream captured from Passive monitor in Encoder Output agent.

Now I have sequence and sequence items separately for both encoder and decoder input agents. But how do I synchronize both the agents such that decoder re-active agent adds error and creates a new packet for every data in order.

e.g suppose encoder sends data in the order - 1000, 1010, 0100, 1011 and decoder re-active agent creates error packets in the order (one hot bit) - 0010, 1000, 0001, 0100. Now both create data packets unrelated to each other. However the re-active agent should xor 1st data with its 1st packet like 1000 ^ 0010 even if it receives two data i.e 1000 and 1010 together from the passive agent monitor. Also since both agents are generating items, decoder should not send an item before it receives data from encoder agent (via passive encoder agent monitor).

2
It is practical in the sense, I want to know how to code to get both agents synchronous with respect to each other and follow a timing order. - Shankhadeep Mukerji
Do you want to sync sequence items or sequnce? - Karan Shah
I want to sync sequence items such that decoder item should be sent to decoder driver once that item has been sent from encoder driver and received in encoder monitor. Also, it should take into account out-of-order reception in monitor. - Shankhadeep Mukerji

2 Answers

0
votes

One options is to use config_db to put the endcoder transaction there and get it from decoder re-active agent. Which I think is not nice way. Another option is to have virtual sequence, which includes the encoder and decoder sequences, gets the encoder packet and provides to decoder sequence.

0
votes

I think, you want to use the lockign mechanism between different objects.

You can use the IPC (Interprocess Communication) methods to control that, like events, mailboxes, semaphores.

In UVM, the advanced methods are available, like uvm_event, TLM FIFOs, which can be used in your purpose.