This project ties together a few interesting technologies:
- verilator
- SystemVerilog (for DUT & TB)
- C/C++ (for TB & DUT)
- Buck2 (for building)
- TODO: rust (for TB & DUT, maybe sim_main/wrapper/cmd-line-processing)
git clone --recurse-submodules https://github.com/yangm2/verilator-example.git
git pull --recurse-submodules
- counter
- valid-interface (TODO: add flow-control/back-pressure)
- collector + monitor - demonstrate SV+VPI(C/C++)
- driver + sequencer - demonstrate SV+VPI(C/C++) for pipelined interface (TODO: add flow-control/back-pressure)
-
Clean:
buck2 clean
-
Compile:
buck2 build //src:Vhello_world
-
Run:
buck2 run //src:Vhello_world +MAX_CYCLES=23
buck2 run //src:runsim
prelude
submodule version needs to match (or be behind?) the corresponding installedbuck2
versionbuck2 --version
-- doesn't actually tell you anything useful fornix
-managed installs- ./utils/get-nix-buck2-prelude_hash.py ...
Reading inline script metadata from `./update-buck2-prelude.py` nix installed version of unstable 'buck2' is [2024-10-15] at [/Users/michaelyang/.nix-profile/bin/buck2] corresponding 'prelude_hash' is [615f852ad43a901d8a09b2cbbb3aefff61626c52]
- in repo ...
cd prelude git pull git checkout $__prelude_hash_FROM_ABOVE__ cd `git rev-parse --show-toplevel` git add prelude git commit -m 'bump buck2-prelude submodule for buck2 $__UNSTABLE_VERSION_FROM_ABOVE__' git push