0
votes

I need to send a data from scoreboard to my read sequence. What is the best way to do that.

I have memory read sequence, which should start after finish of Write sequence. And as write sequence generates random memory write addresses, I need somewhere to keep these addresses. And after finish of write sequence send to read sequence. So I am keeping that addresses in scorebaord, as I need that address in scoreboard also for comparing with read data later on. Now I dont know how to send data from scorebaord to read sequence. I use put-get ports, but kind of dont like the idea that I need to use uvm_tlm_fifo to connect them. Any other ideas?

3

3 Answers

0
votes

If it's not possible to collect the data from the write sequence ( i.e. the write sequence generates a list/queue of addresses ) and let the main/virtual sequences then pass this array the the read sequence

main_sequence { 

write_sequence.start( ...);
write_sequence.get_address_list(arr);
read_sequence.set_address_list(arr);
read_sequence.start(...);

}

We could try the approaches below -

1) The list could be stored in the sequencer. As the sequencer is part of the agent it will be available for the whole run of the test. Also it will be provided to the sequences even if they are run from separate thread . Thus the two sequences can talk via the sequencer.

write_sequence { 
  my_sequencer ;
  $cast(my_sequencer,m_sequencer);
  my_sequencer.set_address_list(arr);

}

read_sequence { 
  my_sequencer ;
  $cast(my_sequencer,m_sequencer);
  my_sequencer.get_address_list(arr);

}

2) If you like the scoreboard approach , you could create a class to handle the getting and setting of the address list. The class can be instantiated in the top-env , and connected to the scoreboard. The scoreboard can then use the class to set the address list. The read sequence can get the handle to this class via uvm_config_db and use it to get the address list . [ the class is also put into the uvm_config_db in the top-env ] . In this approach we have to be sure that the scoreboard receives and processes the addresses before the read starts.

0
votes

The scoreboard and the sequencer are both components. It is best to communicate between these components via TLM interfaces. Have the scoreboard broadcast some information out of an analysis port, and have that port connect to a TLM imp or fifo in the sequencer.

The sequence should have a pointer to its own sequencer called p_sequencer. It can then wait on the FIFOs receipt of information from the scoreboard.

TLM ports and fifos may seem like a lot of overhead, but they are the best choice for reusability and portability reasons. Suppose you have multiple scoreboards emitting data to multiple different sequences? Merely changing the connections can enable such a scenario without needing to modify anything else.

0
votes

The idea of sending data from scoreboard to sequence is against the general principles of building a robust test bench. What you should rather do is share an object that stores these addresses between the write and read sequences through their corresponding sequencers. To make things more simple you could also use a higher level sequence that generates the addresses and passes on this information to the read and write sequences.