Closed povik closed 4 months ago
Help sample (updated after rename):
box_derive [-base <base_module>] [-naming_attr <attr>] [selection]
As part of the assembly of the design hierarchy done by the 'hierarchy' command,
specializations of parametric modules are derived on demand: for each choice of
parameter values appearing in the design, a copy of the parametric module is
derived which is specialized to that choice.
This derivation process ignores blackboxes and whiteboxes (boxes). To supplement,
this 'box_derive' command can be used to request the derivation of modules based
on box instances appearing in the design, which is desirable in certain use
cases. Only the selected cells are considered as the instances that steer the
derivation process.
-base <base_module>
instead of deriving the module that directly corresponds to each box
instance, derive a specialization of <base_module> (this option applies
to all selected box cells)
-naming_attr <attr>
once a specialization is derived, use the value of the module attribute
<attr> for a name which should be used for the derived module (this
replaces the internal Yosys naming scheme in which the names of derived
modules start with '$paramod$')
Bikeshed: should this not be called just
blackbox_derive
? We haveblackbox
already, so it'd be inconsistent otherwise.
I don't have a strong preference, you could say this shouldn't be blackbox_derive
because that gets to be too long.
box_derive
also an option
box_derive
seems nice, considering you also handle whiteboxes.
In certain uses cases you want to derive modules for blackbox instances, which are otherwise ignored by the
hierarchy
process. Here we add a new command,box_derive
, by which one can ask to have modules derived for a selected set of blackbox instances.I can think of two use cases:
abc9_ops -prep_hier
command to a similar end, we can merge those commands eventually)An
incompletetest is attached.