Error while connecting monitor & scoerboard

Hello,

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:

OVM_ERROR @ 40: a2d_env.a2d_agent.scoreboard.put_export [Connection Error]

connection count of 0 does not meet required minimum of 1

OVM_ERROR @ 40: a2d_env.a2d_agent.a2d_monitor.a2d_put_port [Connection

Error] connection count of 0 does not meet required minimum of 1
:confused::confused::confused:
Can you pls help me with that?

Hello Ssan,

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_decl(_add) ovm_analysis_imp_decl(_check)

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 hope this helps.

Kathleen

Thank you Kathleen,

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.

Region: /fb_a2d_tb/ovm_analysis_imp::ovm_analysis_imp__3

What’s wrong now?

Never mind, my problem was in defining the function write…
Thanks a lot anyway!