How to do forward declaration of covergroup?
I put covergroup in class like below. This is compilation error by Xcelium saying no data type found.
// typedef covergroup cg; // <-- compile error
class myclass;
function new();
cg = new(); // compile error
endfunction
covergroup cg;
...
endgroup
endclass
Thanks
In reply to tsb_matumoto:
This should work. I tried in two different tool.
class myclass;
function new();
cg = new();
endfunction
covergroup cg;
...
endgroup
endclass
In reply to tsb_matumoto:
Just move covergroup before new if it isn’t working for specific tool.
class myclass;
covergroup cg;
...
endgroup
function new();
cg = new();
endfunction
endclass
In reply to Rahulkumar Patel:
Yes. Thank you very much for the information.