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.
class my_scb extends uvm_component;
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
Components needing information can connect to scb_ap.
Looking for appropriate inputs from testbench design perspective.