Jump to content

Incompatible complex type usage in uvm


Recommended Posts

Hi,

    In my current environment I have monitors class and parametrized scoreboard class. I am sending monitor transaction into scoreboard through the tlm analysis port. Below is snippet of code.

 

class pkt_monitor extends uvm_monitor

  uvm_analysis_port #(pkt_item) pkt_collected_port;

 

  function new(uvm_component parent = null)

       pkt_collected_port = new("pkt_collected_port", this);

 

....

....

endclass

 

class pkt_sbd #(type T = uvm_transaction)  extends uvm_component;

 

  uvm_analysis_export #(T) sb_check_port;

 

 // typedef pkt_sbd #(T) this_type;

 

  function new(uvm_component parent = null)

       sb_check_port = new("sb_check_port", this);

 

.....

.....

endclass

 

class top_env extends uvm_env;

 pkt_sbd #(pkt_item)   pkt_sbd_inst;

 pkt_monitor  pkt_monitor_inst;

 

  build_phase()

  pkt_monitor_inst = pkt_monitor::type_id::create("pkt_monitor_inst",this);

  pkt_sbd_inst = pkt_sbd #(pkt_item) :: type_id::create("pkt_sbd_inst",this)

 

 connect_phase()

 pkt_monitor_inst.pkt_collected_port.connect(pkt_sbd_inst.sb_check_port)

 

endclass

 

 

 

While compiling above code there is a type incompatability issue observed

 

Error-[iCTTFC] Incompatible complex type usage
  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_analysis_export#(class pkt_pkg::pkt_item)', while the type of
  the formal is 'class uvm_pkg::uvm_port_base#(class
  uvm_pkg::uvm_tlm_if_base#(class pkt_pkg::pkt_item,class
  pkt_pkg::pkt_item))'. Expression: this.pkt_sbd_inst.sb_check_port
  Source info:
  pkt_monitor_inst.pkt_collected_port.connect(pkt_sbd_inst.sb_check_port) 

 

Any help is appreciated.

 

 

Link to post
Share on other sites

I was able to compile your code (with some minor additions). The message is very strange because the "formal type" is exactly what the "actual type" is extended from, so I don't see why this would fail. You should probably consult your simulator vendor.

Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...