I have a parameterized base class which extends from uvm_component:
class bc_port_sb#(type T = uvm_sequence_item) extends uvm_component;
`uvm_component_param_utils(bc_port_sb#(T))
endclass
I want to extend from this class with a different parameter:
class my_port_sb extends bc_port_sb#(my_pkt);
`uvm_component_utils(my_port_sb)
endclass
I have instantiated this class in my env:
class my_env extends uvm_env;
my_port_sb scoreboard;
scoreboard = my_port_sb::type_id::create("scoreboard", this);
endclass
I have also overriden the type of transaction in my base test:
class my_base_test extends uvm_test;
virtual function void build_phase(uvm_phase phase);
super.build_phase(phase);
set_type_override_by_type(my_pkt::get_type(),uvm_sequence_item::get_type());
endfunction
endclass
But I am still getting a compile error WRT the type of transaction:
Error-[ICTTFC] Incompatible complex type usage
Incompatible complex type usage in task or function call.
class TESTBENCH.my_env_pkg::bc_port_sb#(class my_env_pkg::my_pkt)', while the type of the formal is ‘class TESTBENCH.my_env_pkg::bc_port_sb#(class uvm_pkg::uvm_sequence_item)’
Can you please suggest as to what am I missing here?