Hi,
My scbd code is something like below:
`uvm_analysis_imp_decl(_TX)
class my_scb #(
parameter int TX_WIDTH=17
) extends uvm_scoreboard;
uvm_analysis_imp_TX #(int, my_scb) TX_imp;
function void my_scb::build_phase(uvm_phase phase);
super.build_phase(phase);
`uvm_info(“my_scb”, “build_phase() Starting …”, UVM_LOW);
TX_imp = new("TX_imp", this);
endfunction
.
.
endclass
From another uvm_component, I need to create 2 instances of this scoreboard, but each with different TX_WIDTH.
class metric extends uvm_component;
my_scb (#16) scb_1;
my_scb (#17) scb_2;
build_phase( )
scb_1 = my_scb#(16)::type_id::create(“scb_1”, this);
scb_2 = my_scb#(17)::type_id::create(“scb_2”, this);
endfunction
endclass
I am getting the below error during compile:
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
TB_WORK.metrics_pkg::my_scb#(16)’, while the type of
the formal is ‘class TB_WORK.metrics_pkg::my_scb#(17)’.
Expression: this
Source info: \uvm_analysis_imp_TX#(int,TB_WORK.metrics_pkg::my_scb)
::new(“TX_imp”, this)
I am guessing this error is because of use of uvm_analysis_imp_decl macro which behind the scenes instantiates my_scb with the default parameter value of 17. (
define UVM_IMP_COMMON(MASK,TYPE_NAME,IMP)
local IMP m_imp; \ )
How can I parameterize my scbd classes while also using `uvm_analysis_imp_decl macro? Any suggestions would be appreciated. Thanks!