diff --git a/README.md b/README.md index d27edf33..e1251de3 100644 --- a/README.md +++ b/README.md @@ -58,6 +58,34 @@ If you don't want the JIT compilation feature, simply build with the following: $ make ``` +### Experimental system emulation +Device Tree compiler (dtc) is required. To install it on Debian/Ubuntu Linux, enter the following command: +``` +$ sudo apt install device-tree-compiler +``` +For macOS, use the following command: +``` +$ brew install dtc +``` + +#### Build and run system emulation +Build and run using default images (the default images will be fetched from [rv32emu-prebuilt](https://github.com/sysprog21/rv32emu-prebuilt) before running): +```shell +$ make ENABLE_SYSTEM=1 system +``` + +Build using run using specified images: +```shell +$ make ENABLE_SYSTEM=1 +$ build/rv32emu -k -i -b +``` + +#### Build Linux image +An automated build script is provided to compile the RISC-V cross-compiler, Busybox, and Linux kernel from source. Please note that it only supports the Linux host environment. It can be found at tools/build-linux-image.sh. +``` +$ make build-linux-img +``` + ### Verify with prebuilt RISC-V ELF files Run sample RV32I[M] programs: @@ -98,7 +126,9 @@ The image containing all the necessary tools for development and testing can be * `ENABLE_FULL4G` : Full access to 4 GiB address space * `ENABLE_SDL` : Experimental Display and Event System Calls * `ENABLE_JIT` : Experimental JIT compiler -* `ENABLE_SYSTEM` : Experimental system emulation, allowing booting Linux kernel +* `ENABLE_SYSTEM`: Experimental system emulation, allowing booting Linux kernel. To enable this feature, additional features must also be enabled. However, by default, when `ENABLE_SYSTEM` is enabled, CSR, fence, integer multiplication/division, and atomic Instructions are automatically enabled +* `ENABLE_MOP_FUSION` : Macro-operation fusion +* `ENABLE_BLOCK_CHAINING` : Block chaining of translated blocks e.g., run `make ENABLE_EXT_F=0` for the build without floating-point support. @@ -145,7 +175,7 @@ For macOS users, installing `sdiff` might be required: $ brew install diffutils ``` -To run the tests for specific extension, set the environmental variable `RISCV_DEVICE` to one of `I`, `M`, `A`, `F`, `C`, `Zifencei`, `privilege`. +To run the tests for specific extension, set the environmental variable `RISCV_DEVICE` to one of `I`, `M`, `A`, `F`, `C`, `Zifencei`, `privilege`, `SYSTEM`. ```shell $ make arch-test RISCV_DEVICE=I ```