Synchronization of transactions parallel incoming in UVM scoreboard

Hello everyone!

I’m verifying, let’s say, some interconnect with multiple masters and slaves connected to it.

I want to clarify to myself, how to properly handle parallel transactions incoming in scoreboard. See minimal example below.


class icon_scoreboard extends uvm_scoreboard;

    `uvm_component_utils(icon_scoreboard)

    uvm_tlm_analysis_fifo#(icon_trans) fifos []; int fifos_am;

    function new(string name = "", uvm_component parent = null);
        super.new(name, parent);
    endfunction

    virtual function void build_phase(uvm_phase phase);
        // Get analysis FIFO amount.
        if(!uvm_resource_db #(int)::read_by_name(
            get_full_name(), "fifos_am", fifos_am)) ...
        // Create analysis FIFO.
        fifos = new[fifos_am];
        foreach(fifos[i]) begin
            fifos[i] = new(...);
        end
    endfunction

    ...

    virtual task main_phase(uvm_phase phase);

        // Question:
        // How to properly handle parallel transactions here?
        // Transactions timestamps, uvm_wait_for_nba_region()?

    endtask

    ...

endclass

In this example we can recieve multiple transactions from FIFOs (they are connected to masters/slaves) at the same time (same time slot). The problem here is that due to non-determinism in active event region, transactions can arrive to FIFOs in random order during the same time slot.

My question is how to properly collect and process transactions at the same time slot to verify, for example, priority algorithm? My thoughts are to use transactions timestamps or uvm_wait_for_nba_region(). But is there a more elegant solution?

Best regards,
serge06

A UVM scoreboard is a transaction-based unit. On thias level the timing does not play any role. Important is only the order of the transactions. To store the transaction in the right way you should use uvm_tlm_analysis_fifo

Thank you for your quick reply, @chr_sue!

I know that scoreboard is a transaction-based unit.

My question is how to handle transactions which were recieved at the same time on different FIFOs, connected to different monitors.

I don`t know how your scoreboard looks like. But the general approach is to compare 2 transactions, an actual one and an expected one. And the comparison ight depend on certain register settings. Compairing mor tahn one transaction pair is very uncommon. And you should have in mind each transaction has a unique identifier. You have to check the transaction to be compaired have the right identifiers.