Problem Using parametrized class in scoreboard

hi friends
I am tryinng to create a parametrized monitor class in my scoreboard but i am running into errors using the type_id::create methodology.

Code snippet :
class lnc_dunit_scoreboard #(parameter MAX_ADDRESS = 35) extends ovm_scoreboard;

lnc_reqbfm_monitor #(.MAX_ADDRESS(MAX_ADDRESS)) req_mon_B;


function void build();

req_mon_B = lnc_reqbfm_monitor #(.MAX_ADDRESS(MAX_ADDRESS))::type_id::create(“req_mon_B”,this);
endfunction

This build line gives me error :

Error-[SV-ICA] Illegal class assignment
/nfs/site/disks/an_umg_disk2365/vdadwal/vlv2_ww_30/dunit/validation/common/dunit_sb/lnc_dunit_scoreboard.sv, 212
“this.req_mon_B = ovm_pkg::_vcs_dummy_ovm_component_registry_69.create(“req_mon_B”, this, “”);”
Expression
‘ovm_pkg::_vcs_dummy_ovm_component_registry_69.create(“req_mon_B”, this,
“”)’ on rhs is not a class or a compatible class and hence cannot be
assigned to a class handle on lhs.
Please make sure that the lhs and rhs expressions are compatible.

I am not sure what i am doing incorrectly , can somebody comment ?

Thanks

Without looking at your code I am guessing but:

In your monitor class did you use uvm_component_param_utils() rather than uvm_component_utils() to register the component with the UVM factory?

In reply to mperyer:

No i use this :

class lnc_reqbfm_monitor #(parameter MAX_ADDRESS = 31) extends ovm_monitor;

//------------------------------------------------------------------
// OVM Macros
//------------------------------------------------------------------
`ovm_component_utils(lnc_reqbfm_monitor)

Is it ok to have such a parameterized class extending from ovm_monitor ??

Try using:

`uvm_component_param_utils(Inc_reqbfm_monitor #(MAX_ADDRESS))

To register your monitor component with the factory. This should get you past the error.

thanks , yaa i figured this out , i was not passing parameter to the ovm factory.

Thanks though…