Skip to content

Verilator fetched from cache instead of rebuilt#69

Merged
marnovandermaas merged 4 commits intolowRISC:mainfrom
marnovandermaas:ci_update
Apr 1, 2025
Merged

Verilator fetched from cache instead of rebuilt#69
marnovandermaas merged 4 commits intolowRISC:mainfrom
marnovandermaas:ci_update

Conversation

@marnovandermaas
Copy link
Copy Markdown
Contributor

@marnovandermaas marnovandermaas commented Mar 24, 2025

This PR moves over to using Nix instead of building Verilator from scratch.

Fixes: #11

This copies files from OpenTitan @e58236e074
- pyproject.toml
- python-requirements.txt
- uv.lock
Command:
nix build .#sunburst_simulator
Still keep the pythong requirements around on Ubuntu to test the
instructions in the read me.
@marnovandermaas marnovandermaas marked this pull request as ready for review March 31, 2025 16:29
@elliotb-lowrisc
Copy link
Copy Markdown
Contributor

I see in the GitHub log that it didn't seem to actually accept the lowRISC cache, nor did it seem to spend the time doing much of anything

Run nix build .#sunburst_simulator -L
warning: ignoring untrusted flake configuration setting 'extra-substituters'.
Pass '--accept-flake-config' to trust it
warning: ignoring untrusted flake configuration setting 'extra-trusted-public-keys'.
Pass '--accept-flake-config' to trust it

Is it actually working?

@marnovandermaas
Copy link
Copy Markdown
Contributor Author

Thanks @elliotb-lowrisc for having a look at this. The Nix cache is added separately so it's fine to ignore the untrusted flake configuration. We should leave that in for the development environment though.

The reason why the building of the Simulator passes instantly is because it uses the Nix store on our CI runner. The build was done in this run: https://github.com/lowRISC/sunburst-chip/actions/runs/14176372643/job/39712156986

If we change something in the source code, this will trigger a rebuild.

@elliotb-lowrisc
Copy link
Copy Markdown
Contributor

The development environment? Is there a way to use this locally as well then? Might be worth adding something to the README then

@marnovandermaas
Copy link
Copy Markdown
Contributor Author

The development environment isn't super useful yet. I'll add instructions for that once I have the CHERIoT LLVM in there. I have put some documentation on how to build the simulator through Nix though.

Copy link
Copy Markdown
Contributor

@elliotb-lowrisc elliotb-lowrisc left a comment

Choose a reason for hiding this comment

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

Thanks

@marnovandermaas marnovandermaas merged commit ae7c713 into lowRISC:main Apr 1, 2025
2 checks passed
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.

Use pre-built Verilator in CI

2 participants