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

[topgen.py]FileNotFoundError: ‘hw/top_earlgrey/data/ip/ast/data/ast.hjson’ #24595

Open
lin-snail opened this issue Sep 18, 2024 · 3 comments · May be fixed by #24598
Open

[topgen.py]FileNotFoundError: ‘hw/top_earlgrey/data/ip/ast/data/ast.hjson’ #24595

lin-snail opened this issue Sep 18, 2024 · 3 comments · May be fixed by #24598
Assignees

Comments

@lin-snail
Copy link

lin-snail commented Sep 18, 2024

Description

  • run the topgen.py command line:
    util/topgen.py -t hw/top_earlgrey/data/autogen/top_earlgrey.gen.hjson -o hw/top_earlgrey/
  • issue:
    FileNotFoundError: [Errno 2] No such file or directory: 'hw/top_earlgrey/data/ip/ast/data/ast.hjson'
    filenotfound
@lin-snail lin-snail changed the title [component] Title FileNotFoundError: ‘hw/top_earlgrey/data/ip/ast/data/ast.hjson’ FileNotFoundError: ‘hw/top_earlgrey/data/ip/ast/data/ast.hjson’ Sep 18, 2024
@rswarbrick
Copy link
Contributor

I just ran locally with make -C hw top and everything worked (which is probably a workaround for you). I can also see the error you report if I run the command you show above.

Looking at the difference in what runs in the two cases, I notice that the working version runs

util/topgen.py -t hw/top_earlgrey/data/top_earlgrey.hjson -o hw/top_earlgrey/

(notice the different path to the hjson file). The path you're giving as an input is actually an output from topgen.

But the error that comes out is a bit rubbish! Let's keep this issue open until we've sorted that out.

rswarbrick added a commit to rswarbrick/opentitan that referenced this issue Sep 18, 2024
This should fix issue lowRISC#24595. The problem that caused the issue is
that we compute paths to the various IP blocks that should be included
by following relative paths from the `-t` argument. This doesn't work
very well if the top_earlgrey.hjson file moves around!

A sensible design would probably point more explicitly at where to
find IPs, but this should hopefully be a little easier to debug.

Signed-off-by: Rupert Swarbrick <[email protected]>
@rswarbrick rswarbrick self-assigned this Sep 18, 2024
@lin-snail lin-snail changed the title FileNotFoundError: ‘hw/top_earlgrey/data/ip/ast/data/ast.hjson’ [topgen.py]FileNotFoundError: ‘hw/top_earlgrey/data/ip/ast/data/ast.hjson’ Sep 19, 2024
@lin-snail
Copy link
Author

Thanks for your help.
It is ok with the following command line:

  • make -C hw top
  • util/topgen.py -t hw/top_earlgrey/data/top_earlgrey.hjson -o hw/top_earlgrey/

@lin-snail lin-snail closed this as not planned Won't fix, can't repro, duplicate, stale Sep 19, 2024
@rswarbrick
Copy link
Contributor

I'm keeping this open to track the fact that we could improve the tooling messages to explain what's going on more clearly. That change is hopefully available in the linked PR.

@rswarbrick rswarbrick reopened this Sep 19, 2024
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 a pull request may close this issue.

2 participants