Hey all; I hope you’re doing well this morning.
I have an issue to synshonize set and get in conifg db, I do set in the sequence and i get in scoreboard (for checking).To make it more clear here’s my pesuod code and my intentions about it.
I created a class called it rand_cfg( extends fr om uvm_sequence_item) where i randomize some bit vectors also some integers like
rand int int_i;
rand bit rd_n_wr;
rand bit [31:0] addr;
rand bit [31:0] data;
// wrote my constraints here
Then in my sequenc class, I randomize the the class (rand_cfg) to generate a random transfer then drive it to DUT.
But in my sequence I want to genarate many random transfers so my technique is as follows :
// Generate 1st transfer
assert(rand_cfg_i.randomize()); // randomization
uvm_config_db#(rand_cfg)::set(null,"*","rand_config_i",rand_config_i)
// Generate 2nd transfer
assert(rand_cfg_i.randomize()); // randomization
uvm_config_db#(rand_cfg)::set(null,"*","rand_config_i",rand_config_i)
// Generate 3rd transfer and so on
In scoreboard, In order to check the correctenss of the DUT output, we get the transfer set in sequence then drive to a ref mode then comapre DUT output with refmodel expected output.
to get the transfers in scoreboard, I do :
uvm_config_db#(rand_cfg)::get(null,"*","rand_config_i",rand_config_i)
Here, the scoreboard may get the 1st transfer twice if the 2nd transfer is not set yet in sequence (logical :;), I want my scoreboard to get the transfers after it was set.