diff --git a/Makefile b/Makefile old mode 100644 new mode 100755 index a252f896a3..f0ce70128b --- a/Makefile +++ b/Makefile @@ -5,10 +5,17 @@ MODEL ?= TestHarness PROJECT ?= freechips.rocketchip.system CFG_PROJECT ?= $(PROJECT) CONFIG ?= $(CFG_PROJECT).DefaultConfig +TEST ?= rv64mi-p MILL ?= mill verilog: cd $(base_dir) && $(MILL) emulator[freechips.rocketchip.system.TestHarness,$(CONFIG)].mfccompiler.compile +emulator: + cd $(base_dir) && $(MILL) emulator[freechips.rocketchip.system.TestHarness,$(CONFIG)].emulator.elf + +test: + cd $(base_dir) && $(MILL) runnable-riscv-test[freechips.rocketchip.system.TestHarness,$(CONFIG),$(TEST),none].run + clean: rm -rf out/ diff --git a/README.md b/README.md index bab1036d86..2d2c6b9026 100644 --- a/README.md +++ b/README.md @@ -34,13 +34,26 @@ For possible time adjustments, they will be negotiated in Slack and published in $ cd rocket-chip $ git submodule update --init -### Install Necessary Dependencies +### Nix Install -You may need to install some additional packages to use this repository. -Rather than list all dependencies here, please see the appropriate section of the READMEs for each of the subprojects: +Install nix: -* [rocket-tools "Ubuntu Packages Needed"](https://github.com/freechipsproject/rocket-tools/blob/master/README.md) -* [chisel3 "Installation"](https://github.com/ucb-bar/chisel3#installation) + $ sh <(curl -L https://nixos.org/nix/install) --daemon + $ . ~/.nix-profile/etc/profile.d/nix.sh + $ git submodule update --init + +Set path in $HOME/.bashrc: + + $ export PATH="$HOME/.nix-profile/bin:$PATH" + +Edit /etc/nix/nix.conf and add the following line: + + $ experimental-features = nix-command flakes + +Once you want to set up the environment: + + $ cd rocket-chip + $ nix develop ### Building The Project @@ -52,6 +65,22 @@ Generating verilog for a specific Config $ make verilog CONFIG=DefaultSmallConfig +Generating emulator + + $ make emulator + +Generating emulator for a specific Config + + $ make emulator CONFIG=DefaultSmallConfig + +Generating riscv-test + + $ make test + +Generating riscv-test for a specific Config and a specific test + + $ make test CONFIG=DefaultSmallConfig TEST=rv64si-p + ### Keeping Your Repo Up-to-Date If you are trying to keep your repo up to date with this GitHub repo,