Clean-params
Eliminate unused parameters from modules.
Parameter-cleaning is an optional transformation which is intended
to reduce the number of modules introduced by unparameterization.
We find that many frequently-instantiated, low-level modules often have
parameters that are not actually used in the RTL model. For instance, a module
might have a size or delay parameter that does not affect its RTL-level
semantics.
Unfortunately, every time the module is instantiated with, say, a different
delay, unparameterization will produce a new instance of it that is
specialized for that particular delay. This can lead us to make a lot of
copies of identical modules, with different names. And, each of these modules
then has to go through the rest of the transformation process, which can be
slow.
So, our idea in this transformation is to cut out irrelevant parameters
before unparameterization is invoked.
Subtopics
- Vl-useless-params-map-p
- Alist mapping module names to their vl-useless-params-p entries.
- Vl-modinstlist-elim-useless-params
- (vl-modinstlist-elim-useless-params x map) maps vl-modinst-elim-useless-params across a list.
- Vl-modulelist-elim-useless-params
- (vl-modulelist-elim-useless-params x map) maps vl-module-elim-useless-params across a list.
- Vl-useless-params-p
- Records which parameters are useless for a module.
- Vl-module-clean-params
- Identify and remove useless parameters from a module.
- Vl-modulelist-clean-params-aux
- Eliminate param decls for useless params from each module, and build
a map that explains what has been eliminated (i.e., what needs to be cleaned
up from each module instance.)
- Vl-paramvaluelist-elim-useless-params
- Vl-namedparamvaluelist-elim-useless-params
- Vl-paramargs-elim-useless-params
- Apply a vl-useless-params-p to clean up an vl-paramargs-p
structure.
- Vl-module-elim-useless-params
- Vl-modinst-elim-useless-params
- Clean up a module instance, removing any useless parameters.
- Vl-position-of-param
- Determine the index of a useless parameter.
- Vl-modulelist-clean-params-loop
- Vl-positions-of-params
- Determine the indices of useless parameters.
- Vl-modulelist-clean-params
- Vl-design-clean-params
- Top-level clean-params transform.