This PR is just a PoC, and will likely never be merged. It contains some unrelated changes that I didn't bother completely tidying up, and some short-term fixes to make things work. Hopefully it is obvious which parts are unrelated.
Add a Nix flake to provide development environments for Ibex simulation and synthesis.
The goal of this is to try and utilize the principled properties of Nix (the tool, the language, etc) to easily bootstrap reproducible development environments. This should work on any x86_64-linux system where nix is installable (macOS support is also possible), as there is no dependency on system libraries at all.
Precursors
Install Nix (I suggest to use this guide: https://zero-to-nix.com/start/install). If you use another installer, you will need to ensure the flakes and nix-command experimental features are enabled.
Clone/checkout this branch
git clone git@github.com:hcallahan-lowrisc/ibex.git --branch nix_env_init_poc
cd ibex/
N.B. The first time running nix develop may take a little while to fetch and build dependencies. This is normal (no system library deps etc.), and the second time everything will be cached.
Demo 1 (verilator sims)
Enter a development shell
nix develop # This drops you into a subshell with all the deps on your path
# When you are done with the devshell...
exit
Run some verilator sims (My makefile changes are incomplete, so ensure you clean with make reset when switching between sims)
# Run the simple_system under verilator
make run-simple-system-hello
# Run coremark under verilator
make run-coremark
# Run a pmp smoketest
make run-pmp-smoke-test
Demo 2 (synthesis)
Enter a different development shell, which contains the synthesis deps
nix develop .#syn_shell
Run a yosys synthesis using the Nangate45 open cell library
make run_syn_yosys_nangate45
Demo 3 (HDL simulations including bootstrapping internal lowrisc tools)
Add a Nix flake to provide development environments for Ibex simulation and synthesis. The goal of this is to try and utilize the principled properties of Nix (the tool, the language, etc) to easily bootstrap reproducible development environments. This should work on any x86_64-linux system where nix is installable (macOS support is also possible), as there is no dependency on system libraries at all.
Precursors
N.B. The first time running
nix develop
may take a little while to fetch and build dependencies. This is normal (no system library deps etc.), and the second time everything will be cached.Demo 1 (verilator sims)
make reset
when switching between sims)Demo 2 (synthesis)
Demo 3 (HDL simulations including bootstrapping internal lowrisc tools)
N.B. this will only evaluate for lowrisc internal environments with appropriate credentials. See the commit message (https://github.com/lowRISC/ibex/pull/2156/commits/350969abe123cd2d5a70816dd8132e2d0b12e1a8) for more details