shreya Posted May 28, 2013 Report Posted May 28, 2013 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. Quote
shekhar.iitm Posted May 29, 2013 Report Posted May 29, 2013 use `uvm_component_param_utils(pkt_sbd #(T)) for class pkt_sbd #(type T = uvm_transaction) Quote
jadec Posted June 4, 2013 Report Posted June 4, 2013 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. Quote
Recommended Posts
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.