Jump to content

using port/export to connect 2 monitors


Recommended Posts

I'm trying to do some sequence layering and I want to connect the monitor in my Lower agent to the monitor in my Upper agent with a put tlm. I am getting a compile error. I don't want to use analysis ports because it is 1-1 transfer. It is working on the sequencer side.

monitor side:

class U_monitor extends uvm_monitor;

uvm_blocking_put_imp #(U_trans, U_monitor) U_trans_export; //to allow lower layer to send trans if has_interface=0

...

class L_adapter_monitor extends L_monitor;

uvm_blocking_put_port#(uvm_sequence_item) Utrans_port; //sends to upper agent

...

env:

L_adpt_mon.Utrans_port.connect(U_agent_h[1].mon.U_trans_export);

error:

Error-[iCTTFC] Incompatible complex type usage

../testbench/env.sv, 84

Incompatible complex type usage in task or function call.

The following expression is incompatible with the formal parameter of the

function. The type of the actual is 'class

uvm_pkg::uvm_blocking_put_imp#(class $unit::U_trans,class

$unit::U_monitor)', while the type of the formal is 'class

uvm_pkg::uvm_port_base#(class uvm_pkg::uvm_tlm_if_base#(class

uvm_pkg::uvm_sequence_item,class uvm_pkg::uvm_sequence_item))'. Expression:

this.U_agent_h[1].mon.U_trans_export

Source info:

this.L_adpt_mon.Utrans_port.connect(this.U_agent_h[1].mon.U_trans_export)

sequencer side: (working)

class L_adapter_sequencer#(type Utrans=uvm_sequence_item) extends L_sequencer;

uvm_seq_item_pull_port#(Utrans) Utrans_port; //to comminicate with upper agent

env:

L_adpt_seqr.Utrans_port.connect(U_agent_h[1].seqr.seq_item_export);

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...