[FIRRTL][IMCP] Overdefine ports of modules with unknown symbol uses #8115
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.
If a module is referenced from an unknown top-level operation, i.e. an operation that is not an
hw.hierpath
, mark the module's inputs as overdefined. IMCP cannot reason about how the module is used by such an unknown operation, and therefore should assume that the operation might instantiate the module and apply arbitrary values to its input.As an example, the
firrtl.formal
operation may refer to a private module as to be executed as a formal test, applying symbolic values to the module's inputs. While IMCP could simply special-case thefirrtl.formal
operation, it feels cleaner to make the pass defensive in the presence of any operation which it does not explicitly know how to deal with.