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.