Sending two transaction to scoreboard at the same timestamp

Hi,

My monitor is sending two transactions to scoreboard at the same timestamp through analysis port, call it txn1 and txn2. The txn1 and txn2 are sending to the TLM analysis FIFO in the scoreboard, which using fifo.get(t) to get the transactions. But since two transaction are sending at the same simulation time, with txn1 first followed by txn2 (this is what I see from the simulation log file right now), however the scoreboard is getting txn1 and immediately gets txn2, which does not have enough time to process txn1, the txn1 is completely lost. In my simulation log file I only manage to see scoreboard process txn2.

task run();
  txn_proc(req_txn);
endtask

task txn_proc(my_trans t);
  forever begin
    req_fifo.get(t);

    if (t.cyc==wr_cyc) wr_cyc_proc(t);
    if (t.cyc=rd_cyc) rd_cyc_proc(t);
    ....
  end
endtask

May I know how to make sure the scoreboard able to process both txn for this case?

Thanks!

Since there are two types of transaction items, we should have corresponding two analysis_ports in monitor and two analysis_fifos in scoreboard. Then it is very simple. They have to be forked.

Here are the monitor and scoreboard classes, the connections are taken care in agent/env.

class my_monitor extends ovm_monitor;
  ...
  ...
  ovm_analysis_port txn1_port(txn1);
  ovm_analysis_port txn2_port(txn1);
  ...
  ...
endclass: my_monitor

class my_sb extends ovm_scoreboard;
  ...
  ...
  analysis_fifo #(txn1) txn1_fifo;
  analysis_fifo #(txn2) txn2_fifo;

  task run();
    fork
      forever begin
        txn1_fifo.get(txn1);
        process(txn1);
      end
      forever begin
        txn2_fifo.get(txn2);
        process(txn2);
      end
    join
  endtask

In reply to mpattaje:

Thanks mpattaje for the suggestion.