Issue with monitor and scoreboard synchronization

Hello all, I hope you’re doing well.
I’m facing some issues and i’m lost after debugging .
I’m working with a 2stage pipelined bus protocol (Addr phase and data phase). In monitor, I did as follows


// run phase 
fork 
 rand_delay_pro // this a process where i drive some signals of the interface to low/high for a random clk cycle 
 mtr_item_process;
join

// mtr_item_process;
task  mtr_item_process;
    wait(reset_n) // wait for reset diabling in case it was enabled
    if (// some conditions on interface sign to caputre data phase) begin
         // collect data phase values 
         complete_txn.write(item_rw) // complete txns ( addr and data ) to write it to scoreboard
          `uvm_info("SCB :",$sformat(" item to scoreboard addr :%x, data :%",item_rw.addr,item_rw.data),UVM_LOW);

    end
    if((// some conditions on interface sign to caputre addr phase) begin
       // collect addr phase values
    end
  else @(posedge of clk)
endtask

In scoreboard, i use get txn from monitor through analyisi port that i connected to a fifo


// run phase 
 sc_ap_fifo.get( item_rw);        
`uvm_info("SCB :",$sformat(" item from monitor addr :%x, data :%",item_rw.addr,item_rw.data),UVM_LOW);

The problem appears when I run the test and i get the uvm_info ( of monitor and scoreboard), the data didn’t change hwoever the addr changed ( I think because of piplining of the bus cuz the addr comes first), i coded the 2 messages of uvm_info at the same cycle how ever addr changed
What u think of this problem ? have anyone faved that before ? How can I fix this?
Thanks in advance

Hey all,
I fixed the problem using uvm_event class since VCS compiler doesn’t allow to set an event in config_db.
I declared in env, scb and monitor;


uvm_event scb_mtr_sync 

i created in the function new


scb_mtr_sync=new();

in build phase, I set it in config db from env


umv_config_db#(uvm_event)::set(null,"*","scb_mtr_sync",scb_mtr_sync);

then in scb and monitor i got it also in their build build phase


umv_config_db#(uvm_event)::get(null,"*","scb_mtr_sync",scb_mtr_sync);

In reply to abdelaali_21:

Hey all, I hope you’re all doing well !
After fixing the problem, I thought of creating an array of that uvm_event, something like this :


uvm_event scb_mtr_sync[2:0]; // 3 elements of the event, each one for a specfic agent UVC. 

the problem appeared when I tried to trigger one of these event, say I want to trigger the first element


scb_mtr_sync[0].trigger();  

The compiler showed me compilation error related to indexing problem for the evnet array.I’m Obviously doing it wrong, Did someone crossed that problem before, if yes, how did you make it
Thanks in advance