Skip to content
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

[fusesoc] Move all cores under the hw directory #26142

Merged
merged 1 commit into from
Feb 8, 2025

Conversation

a-will
Copy link
Contributor

@a-will a-will commented Feb 5, 2025

Avoid conflicts with various build output directories that get placed at the root of the repo, including bazel's symlinks, by placing fusesoc's cores-root in a subdirectory (specifically, the hw/ subdirectory).

Move the check_tool_requirements core and scripts, plus the tool_requirements.py script, to the hw directory, so there is just the one cores-root for the opentitan repo.

@a-will a-will marked this pull request as ready for review February 6, 2025 00:23
@a-will a-will requested review from mundaym and a team as code owners February 6, 2025 00:23
@a-will a-will requested review from hcallahan-lowrisc, pamaury, cfrantz, vogelpi and matutem and removed request for a team and mundaym February 6, 2025 00:23
@@ -8,14 +8,14 @@ description: "Check tool requirements"
filesets:
files_check_tool_requirements:
files:
- util/check_tool_requirements.py : { copyto: util/check_tool_requirements.py }
- check_tool_requirements.py : { copyto: check_tool_requirements.py }
Copy link
Contributor

@matutem matutem Feb 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems weird, copyto yourself? I imagine this is the default fusesoc action if it refers to the name given under the per core subdirectory, so this copyto is unnecessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably, but I'm not looking to clean up this core right now. There's a listed issue for this that doesn't appear to be closed ( olofk/fusesoc#353 ), and I'll let someone else figure that out. 😄

Copy link
Contributor

@vogelpi vogelpi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @a-will . This solves a real issue (or a series of issues I believe) :-)

What is a bit unfortunate is that the tool_requirements file also has a requirement for Hugo in it, which doesn't seem right for a file in the hardware folder. But to be honest, I don't know if we still use that?

Maybe it would make sense to move the scripts into hw/util instead of just hw?

@a-will
Copy link
Contributor Author

a-will commented Feb 7, 2025

Thanks for the PR @a-will . This solves a real issue (or a series of issues I believe) :-)

What is a bit unfortunate is that the tool_requirements file also has a requirement for Hugo in it, which doesn't seem right for a file in the hardware folder. But to be honest, I don't know if we still use that?

I think we don't. It seems the requirement for hugo was removed in #23989

Hugo is still referenced in .bazelignore, .gitignore, doc/contributing/hw/methodology.md, and util/reggen/gen_html.py. I will punt cleaning that up to others, though.

Maybe it would make sense to move the scripts into hw/util instead of just hw?

I'm not sure whether having this core is particularly useful, nor about whether a non-descript "util" sub-directory does much, haha. However, I can move the files.

@a-will a-will force-pushed the move-cores-root branch 2 times, most recently from 5c287c0 to 7c3b289 Compare February 8, 2025 00:17
Avoid conflicts with various build output directories that get placed at
the root of the repo, including bazel's symlinks, by placing fusesoc's
cores-root in a subdirectory (specifically, the hw/ subdirectory).

Move the check_tool_requirements core and scripts, plus the
tool_requirements.py script, to the hw directory, so there is just the
one cores-root for the opentitan repo.

Signed-off-by: Alexander Williams <[email protected]>
@a-will
Copy link
Contributor Author

a-will commented Feb 8, 2025

Maybe it would make sense to move the scripts into hw/util instead of just hw?

I'm not sure whether having this core is particularly useful, nor about whether a non-descript "util" sub-directory does much, haha. However, I can move the files.

On second thought, I will skip this for now. The bazel fusesoc_build targets work in a really bizarre way, and the check_tool_requirements core is currently being used to represent --cores-root. I don't want to tackle this problem in this PR. 😅

@a-will a-will merged commit 546b3de into lowRISC:master Feb 8, 2025
3 of 9 checks passed
@a-will a-will deleted the move-cores-root branch February 8, 2025 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants