Scoreboard

Hello All,

How to handle write method in scoreboard if multiple agents are connected with single scoreboard.

Thanks,
Sayam

In reply to SAYAM RAJA:

What you are describing is the standard scenario in scoreboarding. Visit the UVM Cookbook (Scoreboards | Verification Academy) or look the Verification Academy code examples related to scoreboarding.

In reply to SAYAM RAJA:

It can be achieved by using the following macro.

`uvm_analysis_imp_decl(_SUFFIX)//using this macro you can declare a specialized analysis export that calls a function named write_SUFFIX where you need to specify _SUFFIX. A small snippet of code is shown below in which two agents are connected to the scoreboard.


`uvm_analysis_imp_decl(_master)
`uvm_analysis_imp_decl(_slave)
class myscoreboard extends uvm_component;
  uvm_analysis_imp_master#(master_data, myscoreboard)ana_imp_master;
  uvm_analysis_imp_slave#(slave_data, myscoreboard)ana_imp_slave;

...

  function new(string name, uvm_component parent);
    super.new(name,parent);
    ana_imp_master = new("ana_imp_master", this);
    ana_imp_slave = new("ana_imp_slave", this);
  endfunction

  function void write_master(master_data t);
    ...

  endfunction

  function void write_slave (slave_data t);
    ...
  endfunction

endclass

Reagrds,
Shanthi
www.maven-silicon.com

In reply to shanthi:

To say it clearly, you do not need the macro is mentioned above in any case. You need it only when you are doing different thing in the write functions.

In reply to chr_sue:

In reply to shanthi:
To say it clearly, you do not need the macro is mentioned above in any case. You need it only when you are doing different thing in the write functions.

Thanks

In reply to chr_sue:

Assuming the transfer pkts are different , I have 2 options

(1) Use uvm_analysis_imp_dec macro and have 2 write functions in myscoreboard

(2) Have only 1 analysis_imp parameterized with base class of master_data && slave_data .

So now inside the single write() function using ::

 if ( $cast( .. ) ) 

I can differentiate and have logic written accordingly .

Which one would you suggest ? Would there be performance implications as well ?
( uvm_analysis_imp_dec macro would define 2 separate classes with its own properties and all )

In reply to TC_2017:

If you have a master slave configuration you have to use the macros as shanti is proposing. But you did not say this in general.