Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
};

outputs = {
self,
nixpkgs,
flake-utils,
lowrisc-nix,
Expand All @@ -52,7 +51,7 @@

pythonSet =
(pkgs.callPackage inputs.pyproject-nix.build.packages {
python = pkgs.python310;
python = pkgs.python312;
}).overrideScope
(
pkgs.lib.composeManyExtensions [
Expand All @@ -67,8 +66,9 @@
fpga = import nix/fpga.nix {
inherit
pkgs
pythonEnv;
llvm = lrPkgs.llvm_cheri;
pythonEnv
;
llvm = lrPkgs.llvm_cheri;
};
ftditool-cli = inputs.ftditool.packages.${system}.default;

Expand All @@ -85,7 +85,6 @@
openocd
uv
pythonEnv
verilator
verible
srecord
d2
Expand All @@ -101,6 +100,7 @@
commonPackages
++ (with lrPkgs; [
llvm_cheri
verilator_5_040
]);
buildInputs = with pkgs; [libelf zlib];
env = {
Expand Down
6 changes: 3 additions & 3 deletions nix/fpga.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
pkgs,
pythonEnv,
llvm
llvm,
}: let
bitstream_path = "build/lowrisc_mocha_chip_mocha_genesys2_0/synth-vivado";
bootrom_path = "build/sw/device/bootrom";
Expand All @@ -15,11 +15,11 @@ in {
runtimeInputs = [pythonEnv llvm pkgs.gnumake pkgs.cmake pkgs.srecord];
text = ''
# Ask fusesoc to evaluate and generate the dependencies list.
fusesoc --cores-root=. run --target=synth --setup lowrisc:mocha:chip_mocha_genesys2 1> /dev/null
fusesoc --cores-root=. run --target=synth --setup lowrisc:mocha:chip_mocha_genesys2 1> /dev/null

# Build the bootROM because it's cheap, and copy the vmem to the src to be hashed.
cmake -DCMAKE_BUILD_TYPE=Release -B build/sw -S sw 1> /dev/null
cmake --build build/sw --target bootrom 1> /dev/null
cmake --build build/sw --target bootrom 1> /dev/null
cp ${bootrom_path}/bootrom.vmem ${bitstream_path}

# Hash the dependency list generated by fusesoc
Expand Down