In reply to chr_sue:
I passed in the parameters into scbd_a and scbd_b as suggested:
virtual function void build_phase(uvm_phase phase);
super.build_phase(phase);
scbd_a_o = scbd_a #(a,uvm_comparer)::type_id::create("scbd_a_o",this);
scbd_b_o = scbd_b #(b,uvm_comparer)::type_id::create("scbd_b_o",this);
endfunction: build_phase
where scbd_a is defined as:
class scbd_a#(type T = a, type COMP = uvm_comparer) extends my_scbd #(a, COMP);
int x, y;
function new(string name="scbd_a", uvm_component parent = null);
super.new(name, parent);
//parent = my_scbd #(T, COMP)::type_id::create("parent",this);
endfunction
`uvm_component_utils(scbd_a)
virtual function int unsigned get_index(T item);
return (x * y);
endfunction: get_index
endclass: scbd_a
However, the same error still pops up. But if I modify as follows error is gone:
class my_scbd #(type T = uvm_object, type COMP = uvm_comparer) extends uvm_scoreboard;
typedef T queue [$];
queue scbd[int unsigned];
...
function void match_in_scbd (T rhs);
int unsigned index = get_index(rhs);
//T lhs = scbd[index].pop_front();
T lhs = scbd[index][0];
endfunction: match_in_scbd
endclass: my_scbd
I am suspecting that the definition “queue scbd[int unsigned]” is wrong somehow or confuses the compiler. If I change it to a simple queue (i.e T scbd [$]) or associative array (i.e. T scbd [int unsiged]) everything works fine.