Skip to content

chore: migrate to NixOS 26.05 with fixes#595

Merged
machshev merged 2 commits into
lowRISC:mainfrom
machshev:update_python
Jun 2, 2026
Merged

chore: migrate to NixOS 26.05 with fixes#595
machshev merged 2 commits into
lowRISC:mainfrom
machshev:update_python

Conversation

@machshev
Copy link
Copy Markdown
Contributor

@machshev machshev commented Jun 2, 2026

This flake follows the lowrisc-nix nixpkgs which has now been updated to nixos 26.05, which doesn't support Python 3.10

  • Update to Python 3.12
  • Updates the flake lock to pull in the latest lowrisc-nix packages
  • nix fmt . - looks like there is an existing formatting "issue"
  • Update update to use the a pinned version of verilator (5.040) which is the same version used before the update.

Update: this PR has been updated to use a pinned version of verilator rather than trying to update the wavers to get it working with the new 5.048 version packaged with NixOS 26.05.

@machshev
Copy link
Copy Markdown
Contributor Author

machshev commented Jun 2, 2026

I'm just looking into why the the verilator build failed

@machshev machshev requested a review from elliotb-lowrisc June 2, 2026 10:15
Copy link
Copy Markdown
Collaborator

@marnovandermaas marnovandermaas left a comment

Choose a reason for hiding this comment

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

One change that would be good.

Comment thread hw/top_chip/lint/top_chip_system.vlt Outdated
@elliotb-lowrisc
Copy link
Copy Markdown
Contributor

I think we need to pick a Verilator version and stick to it to avoid mismatch issues like this. I would suggest v5.040, as this is what we seemed to be used before this change.

@machshev
Copy link
Copy Markdown
Contributor Author

machshev commented Jun 2, 2026

I think we need to pick a Verilator version and stick to it to avoid mismatch issues like this. I would suggest v5.040, as this is what we seemed to be used before this change.

That's not so easy with nix, it's possible but we would have to use an overlay which means we don't get the benefit of the nix cache and everyone would have to rebuilt verilator locally.

verilator = pkgs.verilator.overrideAttrs (old: rec {
  version = "5.040";
  src = pkgs.fetchFromGitHub {
    owner = "verilator";
    repo = "verilator";
    rev = "v${version}";
    hash = "sha256-S+cDnKOTPjLw+sNmWL3+Ay6+UM8poMadkyPSGd3hgnc=";
  };
});

The upstream lowrisc-nix flake update pulled in NixOS 26.05 instead of 25.11, which means the next flake update would have made this change anyway as a side effect. The only thing I wanted to do in this PR was update to Python 3.12 as 3.10 is EOL in the next few months and removed from NixOS 26.05.

@elliotb-lowrisc
Copy link
Copy Markdown
Contributor

That's not so easy with nix, it's possible but we would have to use an overlay which means we don't get the benefit of the nix cache and everyone would have to rebuilt verilator locally.

Is that what the OpenTitan nix shell does? It's on some ancient version I recall.

@elliotb-lowrisc
Copy link
Copy Markdown
Contributor

I'm trying to make sense of the SYNCASYNCNET waivers (I'm not worried about the other kinds) in case we do update Verilator, but I'm struggling to figure out what they are complaining about. Bear with me while I pull this PR so I can try and see the full warning message

@machshev
Copy link
Copy Markdown
Contributor Author

machshev commented Jun 2, 2026

That's not so easy with nix, it's possible but we would have to use an overlay which means we don't get the benefit of the nix cache and everyone would have to rebuilt verilator locally.

Is that what the OpenTitan nix shell does? It's on some ancient version I recall.

Good point... it's using an old version we build in lowrisc-nix. That would pull the version back to verilator 4.210. Is that what we want to do here as well?

@elliotb-lowrisc
Copy link
Copy Markdown
Contributor

Good point... it's using an old version we build in lowrisc-nix. That would pull the version back to verilator 4.210. Is that what we want to do here as well?

I think we'd need to change a lot more waivers (and possibly other things) if we were to go back to that old version

@elliotb-lowrisc
Copy link
Copy Markdown
Contributor

Aside: You'll need to remove --trace-threads from nightly.yml and dev_guide.md if we move to Verilator v5.048, as that option was deprecated in that version and causes an error (as I just found)

@machshev
Copy link
Copy Markdown
Contributor Author

machshev commented Jun 2, 2026

PR to add a new verilator 5.040 package build to lowrisc-nix: lowRISC/lowrisc-nix#186

@elliotb-lowrisc
Copy link
Copy Markdown
Contributor

May be irrelevant now but I'm still having trouble understanding the SYNCASYNCNET warnings. I think they are both probably fine, but the explanatory comment currently above them does not apply to them. I think they stem from some off the non-standard (but not necessarily bad) things done with reset signals in the OpenTitan reset manager code

machshev added 2 commits June 2, 2026 15:50
This flake follows the lowrisc-nix nixpkgs which has now been updated to
nixos 26.05, which doesn't support Python 3.10

This commit updates to Python 3.12 and updates the flake lock to pull in
the latest lowrisc-nix packages.

Signed-off-by: David James McCorrie <james.mccorrie@lowrisc.org>
Signed-off-by: David James McCorrie <james.mccorrie@lowrisc.org>
@machshev
Copy link
Copy Markdown
Contributor Author

machshev commented Jun 2, 2026

May be irrelevant now but I'm still having trouble understanding the SYNCASYNCNET warnings. I think they are both probably fine, but the explanatory comment currently above them does not apply to them. I think they stem from some off the non-standard (but not necessarily bad) things done with reset signals in the OpenTitan reset manager code

Thanks for looking into this @elliotb-lowrisc I've reverted to Verilator 5.040 which is now available from lowrisc-nix. So I've removed the wavers to avoid the confusion.

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.

I'm no nix expert, but I approve of the intent

@machshev machshev merged commit eec1903 into lowRISC:main Jun 2, 2026
5 checks passed
@machshev machshev deleted the update_python branch June 2, 2026 15:03
Copy link
Copy Markdown
Contributor

@ziuziakowska ziuziakowska left a comment

Choose a reason for hiding this comment

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

LGTM! Might be nice to add nix fmt . to CI in the future.

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.

4 participants