-
Notifications
You must be signed in to change notification settings - Fork 651
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
Uniquify module names that are common to Top & Model #1442
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This script nominally looks correct. However, I believe that you should roll this into the already existing split-module-files.py
script. These 3 lines are already processing the intersection, so might as well perform the uniquification in there?
I agree that that would also work, but I put this as a separate script because we would like to remove this script eventually when CIRCT supports top & harness separation. @abejgonzalez did you file a CIRCT issue regarding this? If not, I'll make a issue. |
scripts/uniqify-module-names.py
Outdated
return fnames | ||
|
||
def update_filelist(cur_file, new_file): | ||
sh.sed("-i", f"s/\b{cur_file}\b/{new_file}/", os.path.join(args.gcpath, args.mod_filelist)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any issues with this and paths with /
? If so, maybe we should use a different delimiter (;
?) for sed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto for other sed
's
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you explain what you mean by issues with paths with /
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default delimiter of sed
is /
, so if you are replacing things that have a /
within them the sed
will break. For example, if you want to replace /hi/this/is/abe
with /hi/this/is/joonho
the following sed
command would break: sed -i s//hi/this/is/abe//hi/this/is/joonho/g ...
. So instead you could do something like sed -i 's#/hi/this/is/abe#/hi/this/is/joonho#g' ...
(with #
as the new delimiter)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, but the cur_file
& new_file
here are just files (not paths) so I assume this is okay?
Also found by @allpan3: in
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SFTM. Pending @harrisonliew (+co) checking
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@allpan3 can you give this PR one more try?
conda-reqs/conda-lock-reqs/conda-requirements-riscv-tools-linux-64.conda-lock.yml
Outdated
Show resolved
Hide resolved
This reverts commit bb6f8be.
90c0b1f
to
dfe3487
Compare
Encountering this issue in synthesis:
Looks like
None of the |
Was 57d7e55 supposed to address this issue? Looks like all input files are listed in
|
Can you tell me what file is fed into genus? |
This is what hammer takes And here is the log file |
I'm guessing something related to these lines needs to be changed? |
I think the uniquified files are not suppose to be fed into synthesis tools. The problem is that |
I think the default RocketConfig will hit this issue. The project I was running was just an accelerator on top of the rocket chip. @joey0320 |
I checked with RocketConfig & don't see cases where the above error happens. Can you post your |
hmm yea you are right. I tried RocketConfig and it's good.
And I see these lines printed:
|
Oh I meant the json files themselves lol |
np. There you go. |
Thanks, I pushed a fixed version, can you try with this one? |
PR https://github.com/ucb-bar/chipyard/pull/1448/files addresses the CI failures. So can ignore the current CI failures in this PR |
Synthesis looks good now. |
This PR addresses #1388. After running
split-module-files.py
, it runs a additional scriptuniqify-module-names.py
to uniquify the modules that are common toModel
&Top
. It updates themodel_module_hierarchy.json
accordingly.Related PRs / Issues:
Type of change:
Impact:
Contributor Checklist:
main
as the base branch?changelog:<topic>
label?changelog:
label?.conda-lock.yml
file if you updated the conda requirements file?Please Backport
?