forked from llvm/circt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIRRTL] Allow local targets to be multiply-instantiated. (llvm#7613)
The existing path support was built up based on the assumption that every target is unique. That is true for FIRRTL produced by standard Chisel code, which elaborates unique modules for each instance. We definitely don't want to limit ourselves to this world, and we should support targeting things that are multiply instantiated when it is not ambiguous what we refer to. This patch relaxes the single-instantiation constraints for local targets, which refer to a module or something inside a module, regardless of how many times or at what paths that particular module was instantiated. This required a couple changes through the pipeline: ResolvePaths already had an early exit for the local path case, but this needed to come before the single-instantiation check. LowerClasses needed a couple small changes to not enforce the single-instantiation check in the local path case, and to build a hierpath that just has a single element. While this is not a new requirement, we can still get ambiguous local targets, for instance from nested module prefixing. The error message in LowerClasses for this case was made a little more clear.
- Loading branch information
1 parent
afd61f2
commit 0024270
Showing
6 changed files
with
79 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters