Jump to content

Covergroup instance issue - system verilog coverage


Recommended Posts

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
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...