smitgovani Posted May 12, 2020 Report Share Posted May 12, 2020 Hi, I am trying to take instance of covergroup but unable to take it. Getting compilation instance. class model extends uvm_component; `uvm_component_utils(model) bit [2:0] state; covergroup cg_fsm_state; c1 : coverpoint state; endgroup cg_fsm_state cg_fsm_state_inst; function new(); cg_fsm_state_inst = new(); endfunctiion endclass Using above code, getting compilation error as mentioned below Error-[SE] Syntax error Following verilog source has syntax error : token 'cg_fsm_state' should be a valid type. Please declare it virtual if it is an Interface. "/vobs/cores/infrastructure/cia_resourcecontrol/aon_mod_verif/sim/models/./aon_mod_fsm_ref_model.sv", 208: token is ';' cg_fsm_state cg_fsm_state_inst; Regards, Smit Quote Link to comment Share on other sites More sharing options...
chr_sue Posted May 14, 2020 Report Share Posted May 14, 2020 You dot need a reference to the covergroup class. You can omit this line of code: cg_fsm_state cg_fsm_state_inst; In the constructor you are calling new directly on the coverage class name: cg_fsm_state = new(); David Black 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.