Jump to content

Incompatible complex type usage in uvm

Recommended Posts


    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);






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);






class top_env extends uvm_env;

 pkt_sbd #(pkt_item)   pkt_sbd_inst;

 pkt_monitor  pkt_monitor_inst;



  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)









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:


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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now