I have defined a covergroup inside a package and creating instances of it in a class as shown below:
covergroup example_cg(bit en);
option.name = "ex_cg";
option.per_instance = 1;
ex_cp: coverpoint en;
endcovergroup
class ex_coverage_collector extends uvm_component;
.
..
example_cg ex_cg[4];
endclass
I am getting this error:
xmvlog: *E,CGIANS Arrays of covergroup instances are not supported
What is the best approach to create multiple covergroup without code replication?