[FIRRTL] Prefix for Seq Mem Group Extract #4596
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix a bug in the composition of the PrefixModules and ExtractInstances passes. Because the latter can generate modules with new names when using the grouping feature, this module needs a prefix and does not currently get one. Change the PrefixModules pass to add a wildcat attribute "prefix" to the DUT annotation. This prefix is then used by ExtractInstances to properly generate the module name.
This is a variant of the solution used for the GrandCentral pass where the companion module annotation is given a wildcat attribute that stores the prefix which is then used by the pass.
A better solution would be to reorder PrefixModules after ExtractInstances. However, this has complications with verbatim metadata emission and the possibility of PrefixModules manipulating the hierarchy (duplicating modules to resolve non-local prefixes). There is more discussion about this on the #4593.
Fixes #4593.
Signed-off-by: Schuyler Eldridge schuyler.eldridge@sifive.com