hi everybody,
In my env class , there is a master agent and slave agent.
and i want to connect master agent monitor and slave agent monitor to scoreboard.
The query i am having is :
do i need to create two scoreboard for connecting two monitors.
and how can i give defination for two write function , one write function for master agent monitor and second write for slave agent monitor .
hi everybody,
In my env class , there is a master agent and slave agent.
and i want to connect master agent monitor and slave agent monitor to scoreboard.
The query i am having is :
do i need to create two scoreboard for connecting two monitors.
and how can i give defination for two write function , one write function for master agent monitor and second write for slave agent monitor .
Please help me for the above question.
You did not explain what you want to compare and a few other details of your UVM environment, like the seq_items do you have a master and a seperate slave seq_item?
If we need to connect 8 monitors to single scoreboard ,then 8 write() functions need to implement in scoreboard class ,Any other way to optimize instead of writing 8 write() functions ??
As shown in Advaned UVM/How TLM Works, there are two ways to do this. The problem is that the write() call from an analysis_port supports 1:many calls, but not many:1 calls. So, while a single monitor can be connected to multiple scoreboards, the only way to connect a single scoreboard to multiple monitors is to have multiple analysis_exports(/imps) in your scoreboard.
The first method, as you surmised, is to create multiple implementations of write() in the scoreboard using the `uvm_analysis_imp_decl() macro.
`uvm_analysis_imp_decl(_BEFORE)
`uvm_analysis_imp_decl(_AFTER)
class score extends uvm_component;
`uvm_component_utils(score);
uvm_analysis_imp_BEFORE #(tr, score) before_export;
uvm_analysis_imp_AFTER #(tr, score) after_export;
virtual function void write_BEFORE(tr);
…
endfunction
virtual function void write_AFTER(tr);
…
endfunction
endclass
The other alternative is to use uvm_tlm_analysis_fifos to provide the exports and therefore the write methods: