-
Install Nix
-
Enter development environment:
nix develop .#sdram.<target> -
Setup Mill BSP
mill mill.bsp.BSP/install
-
Open your favorite IDE
Use this line to generate a json config at PWD, you can config the parameter on the command-line.
# rtl config
nix run .#sdram.sdram-compiled.elaborator -- config --idWidth 4 --dataWidth 32 --addrWidth 32 --csWidth 4
# testbench config
nix run .#sdram.tb-compiled.elaborator -- config --idWidth 4 --dataWidth 32 --addrWidth 32 --csWidth 4 --useAsyncReset false --initFunctionName cosim_init --dumpFunctionName dump_wave --clockFlipTick 1 --resetFlipTick 100 --timeout 10000Use this line to generate the Verilog at result, based on the config in configs directory.
nix build .#sdram.rtlor elaborate design with testbench:
nix build .#sdram.tb-rtlGenerated Verilog will be placed at result by default, which can be specified with -O
nix run .#sdram.vcs-trace --impure -- +dump-range=0,10000 +wave-path=trace +fsdb+sva_successpushd nix/pkgs/dependencies && nix run nixpkgs#nvfetcher && popdnix flake update