Suggested scoreboard design?

I have a UVM scoreboard, which takes data from multiple monitors(observed transactions are activity based instead on every clock). Scoreboard further performs some processing collectively on received data from multiple monitors in order to generate data and consumes it too.

Recently in development, a requirement arises where same/similar information (which is generated scoreboard) is needed by other UVM components too. What is suggested way to achieve this?

  • Either I can replicate required portion of scoreboard code in these component Or
  • Instead whether it is suggested way for scoreboard to have analysis port(like monitor) which can broadcast information to required component? i.e.

`uvm_analysis_imp_decl(_inp_1)
`uvm_analysis_imp_decl(_inp_2)

class my_scb extends uvm_component;

  `uvm_component_utils(my_scb);
 
  uvm_analysis_imp_inp_1 #(inp_1_tr, my_scb) inp_1_exp;
  uvm_analysis_imp_inp_2 #(inp_1_tr, my_scb) inp_2_exp;

  uvm_analysis_port #(info_tr) scb_ap; // is this okay

endclass


Components needing information can connect to scb_ap.

Looking for appropriate inputs from testbench design perspective.

In reply to bhupeshpaliwal:

Currently you do not have any data processing in your scoreboard. And you do not have at least 1 stoare element. Generally transactions from different analysis ports will not arrive at the same time. In this case you have to store at least 1 data stream from an anylysis port using a uvm_analysis_tlm_fifo. If a transaction has to be provodedx to any other component you can connect this component directly to an analysis_port

In reply to chr_sue:

Sorry in case code snippet mislead to wrong interpretation of code. Apologies for the same. Indeed I do have data processing which is performed at various times when monitor sends data at different time. Here idea is that post processing, some new information is generated which is contained inside scoreboard, I am looking to provide this information to other verification component in testbench environment.


`uvm_analysis_imp_decl(_inp_1)
`uvm_analysis_imp_decl(_inp_2)
 
class my_scb extends uvm_component;
 
  `uvm_component_utils(my_scb);
 
  uvm_analysis_imp_inp_1 #(inp_1_tr, my_scb) inp_1_exp;
  uvm_analysis_imp_inp_2 #(inp_1_tr, my_scb) inp_2_exp;
 
  function void write_inp_1(inp_1_tr tr);
  // process data and push in inp_q_1
  endfunction

  
  function void write_inp_2(inp_2_tr tr);
  // process data and push in inp_q_2
  endfunction

  task run_phase();

    // wait for some particular data in inp_q_1
    // find some information from inp_q_2

    // generate useful info say info_tr
    // info_tr - this information is needed by other verif component
    // is it okay to sent via analysis port like usually monitor do?
  
  endtask

  uvm_analysis_port #(info_tr) scb_ap; // is this okay
 
endclass

class other_comp extends uvm_component;

  // this guy needs info_tr

endclass



In reply to bhupeshpaliwal:
What your intention is, is not a common scoreboard functionality.
Generally a scoreboard gets tarnsactions of different types. Inside the scoreboard there iis s refernce model which takes one transaction and converts to the type of the second transaction. Then both transactions will be compared. Because the transaction appear at different times you need at least one storage element in your scoreboard which stores a transaction until the second transaction is available.
My impression is, what you are doing should happen in a monitor.

In reply to bhupeshpaliwal:

I used to meet the same question during my whole work especially when I was doing with complex IP blocks.

Now I just create a special component (let’s call it event_dispatcher because I did it).
This component collects information from different sources and then announce to all followers with special events (not SV event, but it is a custom class which is able to transmit all necessary info in a convenient way from event_dispatcher to any follower).
It helped me to avoid the situation of having the same logic in different places.

At the same time, I tried to keep any scoreboard pretty simple (canonical).
If some special logic to drop or mark scoreboard items was needed I tried to place it off a scoreboard.

Hope to understand your question correctly.