I have class scoreboard extends ovm_scoreboard that contains:
… ovm_component_utils(fb_scoreboard) ovm_put_export#(fb_a2d_seq_item) put_export; ...... And class monitor extends ovm_monitor that contains: .... ovm_component_utils(fb_a2d_monitor)
ovm_put_port#(fb_a2d_seq_item) a2d_put_port;
…
And agent extends ovm_agent that contains instances of the scoreboard & the
monitor, and in its connect() the is:
…
super.connect();
a2d_monitor.a2d_put_port.connect(scoreboard.put_export);
scoreboard.put_export.connect(a2d_monitor.a2d_put_port);
…
(I added the second connecting for solving the problem, but it didn’t matter )
When I run the simulation I get the following error message:
Is there any reason why you are not using an ovm_analysis_port in your monitor and an ovm_analysis_imp in the scoreboard? The xbus example and the OVM User Guide recommend using these TLM components and show examples of how to connect them properly.
In your Monitor:
ovm_analysis_port #(my_txn_type) item_collected_port;
…
function new(…);
super.new(…);
item_collected_port = new(“item_collected_port”);
endfunction : new
in your “collect_transactions” task
…
item_collected.write(trans_collected);
. . .
In your Scoreboard, if you have just 1 port, you can directly use an ovm_analysis_imp. Otherwise you will have to differentiate the different ports:
ovm_analysis_imp_add #(my_txn_type, my_scoreboard) sb_add;
ovm_analysis_imp_check #(my_txn_type, my_scoreboard) sb_check;
. . .
function new(…);
super.new(…)
sb_add = new(“sb_add”, this);
sb_check = new(“sb_check”, this);
. . .
endfunction : new
//then implement the “write” functions
virtual function void write_add(…) // For the ADD side
virtual function void write_check(…) // for the CHECK side
…
Connect in the testbench:
function void connect();
. . .
ovc1.agent.monitor.item_collected_port.connect(modovc.scoreboard.sb_add);
ovc2.agent.monitor.item_collected_port.connect(modovc.scoreboard.sb_check);
. . .
Please take a look at the xbus example and the OVM User Guide for more details.
I tried to follow your example, but I couldn’t find the macro `ovm_analysis_imp…
in the ovm code, when I try to use it I get the message “undefined macro”
I tried to run the line:
ovm_analysis_imp#(seq_item,scoreboard) item_collected_export;
without that macro, & when I start the simulation I get the error:
** Error: (vsim-3046) /auto/home/shira/ovm-2.0.2/src/tlm/ovm_imps.svh(161): Too many arguments to ‘write’. Expected 0, found 1.