Hi,
I'm trying to create multiple instances of a covergroup.But everytime it is throwing some error as invalid type.
//pseudo code
class cov_monitor extends uvm_component;
int a;
int b;
covergroup common_cg with function sample(axi_transaction txn,bit mode);
option.per_instance =1;
CP1 : coverpoint txn.a{
bins ...
bins...
}
endgoup
covergroup cov_cg with function sample(int mode);
option.per_instance =1;
CP2: : coverpoint a{
bins..
bins..
}
endgroup
function new(string name= "cov_monitor",uvm_component parent);
common_cg = new();//Recognized Properly and Bins are hitting
cov_cg cg_rx = new();//Throws Error
cov_cg cg_tx=new();
endfunction
function get_data();
//Sample Here
endfunction
endclass
Error:
Error-[SE] Syntax error
Following verilog source has syntax error :
Token 'cov_cg' not recognized as a type. Please check
whether it is misspelled, not visible/valid in the current context, or not
properly imported/exported. This is occurring in a context where a variable
declaration, a statement, or a sequence expression is expected. Either the
declaration type is not known or this is incorrect syntax.
Can anyone help on this:)