laurent.elsys Posted November 23, 2012 Report Share Posted November 23, 2012 (edited) 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 November 26, 2012 by laurent.elsys Quote Link to comment Share on other sites More sharing options...
dave_59 Posted November 26, 2012 Report Share Posted November 26, 2012 (edited) Your classes can be parameterized using the same parameters as your DUT. It would be great if both DUT and testbench can share a set parameters defined in the same package. Edited November 27, 2012 by dave_59 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.