-
Notifications
You must be signed in to change notification settings - Fork 347
[firrtl] Drop directory in layer include files #8474
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
seldridge
merged 1 commit into
main
from
dev/seldridge/firrtl-drop-path-to-layer-includes
May 13, 2025
Merged
[firrtl] Drop directory in layer include files #8474
seldridge
merged 1 commit into
main
from
dev/seldridge/firrtl-drop-path-to-layer-includes
May 13, 2025
Conversation
This file contains hidden or 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 reverts a suggestion [[1]] I made on #8458. This changes the (undocumented) ABI of FIRRTL layers to _not_ include any directory information in the `` `include `` directives used to enable layers. The reason for this is that using the full paths (relative to the root output directory) prevents rearranaging directories after compilation. The downside to this is that users must include more `+incdir` command line options to include _all_ directories in a design. However, I think this is reasonable. I do think that we can roll this back to use the original behavior in the future in a backwards-compatible way. I.e., making the change from not including the full path to including the full path won't break any downstream tools as these will just be including _too many_ `+incdir`s. [1]: #8458 (review) Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
rwy7
approved these changes
May 12, 2025
seldridge
added a commit
to chipsalliance/chisel
that referenced
this pull request
May 12, 2025
Set `+incdir` for every primary source directory. Previously, only the root primary source directory would be set. This change is done to allow for the FIRRTL ABI related to bind layers to be changed to _not_ use an FIRRTL compiler output directory-relative path for `` `include `` [[1]]. This is necessary because some flows are rearranging the directory structure of Chisel-generated Verilog, which includes layers, and paths relative to the root will break. This is a compromise between complexity of the build system, ABI simplicitly, and ease of directory manipulation. This has the effect of users with custom build flows will need to recognize that they need to set the `+incdir` recursively based on all output directories that were created. Practically, this is easy to do. [1]: llvm/circt#8474 Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
fabianschuiki
approved these changes
May 12, 2025
seldridge
added a commit
to chipsalliance/chisel
that referenced
this pull request
May 12, 2025
Set `+incdir` for every primary source directory. Previously, only the root primary source directory would be set. This change is done to allow for the FIRRTL ABI related to bind layers to be changed to _not_ use an FIRRTL compiler output directory-relative path for `` `include `` [[1]]. This is necessary because some flows are rearranging the directory structure of Chisel-generated Verilog, which includes layers, and paths relative to the root will break. This is a compromise between complexity of the build system, ABI simplicitly, and ease of directory manipulation. This has the effect of users with custom build flows will need to recognize that they need to set the `+incdir` recursively based on all output directories that were created. Practically, this is easy to do. [1]: llvm/circt#8474 Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
unlsycn
added a commit
to chipsalliance/t1
that referenced
this pull request
May 27, 2025
ref: llvm/circt#8474 Signed-off-by: unlsycn <unlsycn@unlsycn.com>
unlsycn
added a commit
to chipsalliance/t1
that referenced
this pull request
May 27, 2025
ref: llvm/circt#8474 Signed-off-by: unlsycn <unlsycn@unlsycn.com>
unlsycn
added a commit
to chipsalliance/t1
that referenced
this pull request
May 27, 2025
ref: llvm/circt#8474 Signed-off-by: unlsycn <unlsycn@unlsycn.com>
sequencer
pushed a commit
to chipsalliance/t1
that referenced
this pull request
May 28, 2025
ref: llvm/circt#8474 Signed-off-by: unlsycn <unlsycn@unlsycn.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This reverts a suggestion [1] I made on #8458. This changes
the (undocumented) ABI of FIRRTL layers to not include any directory
information in the
`include
directives used to enable layers. Thereason for this is that using the full paths (relative to the root output
directory) prevents rearranaging directories after compilation.
The downside to this is that users must include more
+incdir
commandline options to include all directories in a design. However, I think
this is reasonable.
I do think that we can roll this back to use the original behavior in the
future in a backwards-compatible way. I.e., making the change from not
including the full path to including the full path won't break any
downstream tools as these will just be including too many
+incdir
s.