Jump to content
shreya

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.

 

 

Share this post


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.

Share this post


Link to post
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...