Compare commits
1 Commits
3d09ba0dbd
...
65a0dccb33
Author | SHA1 | Date | |
---|---|---|---|
65a0dccb33 |
10
flake.nix
10
flake.nix
|
@ -26,24 +26,24 @@
|
|||
: 3 > $out
|
||||
'';
|
||||
|
||||
alu-test = pkgs.runCommandCC "alu-test" {} ''
|
||||
alu-test = pkgs.runCommandCC "alu-sim" {} ''
|
||||
${verilate-src "--cc --build --exe ./simulation/tester.cpp ./simulation/test_alu.cpp -top alu"}
|
||||
mv obj_dir "$out"
|
||||
mkdir "$out/bin" && cp "$out/Valu" "$out/bin/alu-test"
|
||||
'';
|
||||
|
||||
alu-test-trace = pkgs.runCommandCC "alu-test-trace" {} ''
|
||||
alu-test-trace = pkgs.runCommandCC "alu-sim-trace" {} ''
|
||||
${verilate-src "--cc --build --exe --trace -CFLAGS -DTRACE=1 ./simulation/tester.cpp ./simulation/test_alu.cpp -top alu"}
|
||||
mv obj_dir "$out"
|
||||
mkdir "$out/bin" && cp "$out/Valu" "$out/bin/alu-sim"
|
||||
$out/bin/alu-sim $out/trace.vcd
|
||||
echo "${pkgs.gtkwave}/bin/gtkwave $out/trace.vcd" > $out/bin/alu-test-trace
|
||||
chmod u+x $out/bin/alu-test-trace
|
||||
echo "${pkgs.gtkwave}/bin/gtkwave $out/trace.vcd" > $out/bin/alu-sim-trace
|
||||
chmod u+x $out/bin/alu-sim-trace
|
||||
'';
|
||||
|
||||
synth = pkgs.runCommandCC "synth" {} ''
|
||||
mkdir -p "$out"
|
||||
find ${./src} -name '*.v' -exec ${yosys}/bin/yosys -f ' -sv' -Q -p "synth_ice40 -top topmost -json $out/synth.json" {} +
|
||||
find ${./src} -name '*.v' -exec ${yosys}/bin/yosys -f ' -sv' -Q -p "synth_ice40 -top topmost -json $out/synth.json -dsp" {} +
|
||||
'';
|
||||
|
||||
pnr-interactive = pkgs.writeScriptBin "pnr-interactive" ''
|
||||
|
|
Loading…
Reference in New Issue
Block a user