Jump to content

Generic covergroups and constraints


Recommended Posts

Hi,

I have a question concerning covergroups and constrains in SystemVerilog.

I would like to make them generic, depending on parameters. For example, if there is a SIGNAL_WIDTH parameter, i'd like my covergroup to have bins like {0}, {2^SIGNAL_WIDTH - 1}.

The same about constraints, let's say i want to constrain a value to 2^SIGNAL_WIDTH - 1.

We are verifying DUT which are parametrizable; this is needed so we don't have to re-write the UVM classes when changing the parameter.

Moreover, if there is a NB_VALUES parameter (or constant), is there some kind of "generate" (as in verilog and vhdl) feature to generate a constraint for each of these values?

Edited by laurent.elsys
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...