In article <
81df8a4b-828d-4688...@googlegroups.com>,
Edward,
I can offer some advice from a verilog user's perspective.
We parameterize our designs extensively too. Some general advice first -
Dont use parameters where a (perhaps constant) input would work just as
well. In your examples, COUNT_MAX, RST_LEVEL, INCLUDE_PARITY, can
likely be changed to component inputs instead of parameters. Reserve
the use of parameter/generics to case where it's absolutely required.
This has many advantages - both from a test and use-case perspective.
From a test perspective, the advantages should be obvious - as it
addresses the specific concerns your trying to solve. These
"configuration" inputs are not run-time constants - hence your
testbenches can change them, as needed.
From a design reuse perspective, it's an advantage as the component is
well, more reusable. Just because in the one use case that parameter is
a constant doesn't mean that in other use-cases making it a variable
(perhaps with constraints on when it may be changed) isn't needed.
I can't tell you how many times I have something simple - like your
COUNT_MAX example where I originally coded it as a parameter, then
sometime down the road realize I needed it to be semi-variable, and had
to recode it as such.
From a Synthesis QoR point of view - I've done MANY examples of
comparisions between a constant parameter, and a constant input.
Synthesis may take different paths with the different coding styles,
one may take longer than the other to build. But in the end, the QoR
differences are in the noise. The synthesis optimizers are QUITE good
these days - it'a mature technology.
So - minimize your parameter/generic set first.
Then, you're left with a verification corners on the remaining parameter
sets. This is, as you've found really outside the scope of a simulator.
This just means you need to move the task up - to scripts that drive
multiple simulation runs.
When designing your reusable modules encourage your designers to list -
and even check with assertions - the limits and acceptable values for
your parameter sets. Then use these limits to either 1.) Drive the
verification over ALL corners (when achievable) or 2.) Verify
certain directed corners (i.e. your specific use cases) + random parameter
sets.
Regards,
Mark