m-usama-z | 0a4d0d5 | 2022-11-23 20:25:37 +0500 | [diff] [blame] | 1 | # Local Installation (Linux) |
| 2 | |
| 3 | Instructions to install the dv setup locally (dockerless install). |
| 4 | |
| 5 | ## You will need to fullfil these dependecies: |
| 6 | |
| 7 | * Icarus Verilog (10.2+) |
| 8 | * RV32I Toolchain |
| 9 | |
| 10 | Using apt, you can install Icarus Verilog: |
| 11 | |
| 12 | ```bash |
| 13 | sudo apt-get install iverilog |
| 14 | ``` |
| 15 | |
| 16 | Next, you will need to build the RV32I toolchain. Firstly, export the installation path for the RV32I toolchain, |
| 17 | |
| 18 | ```bash |
| 19 | export GCC_PATH=<gcc-installation-path> |
| 20 | ``` |
| 21 | |
| 22 | Then, run the following: |
| 23 | |
| 24 | ```bash |
| 25 | # packages needed: |
| 26 | sudo apt-get install autoconf automake autotools-dev curl libmpc-dev \ |
| 27 | libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo \ |
| 28 | gperf libtool patchutils bc zlib1g-dev git libexpat1-dev |
| 29 | |
| 30 | sudo mkdir $GCC_PATH |
| 31 | sudo chown $USER $GCC_PATH |
| 32 | |
| 33 | git clone https://github.com/riscv/riscv-gnu-toolchain riscv-gnu-toolchain-rv32i |
| 34 | cd riscv-gnu-toolchain-rv32i |
| 35 | git checkout 411d134 |
| 36 | git submodule update --init --recursive |
| 37 | |
| 38 | mkdir build; cd build |
| 39 | ../configure --with-arch=rv32i --prefix=$GCC_PATH |
| 40 | make -j$(nproc) |
| 41 | ``` |
| 42 | |
| 43 | # Running Simulation |
| 44 | |
| 45 | You will need to export these environment variables: |
| 46 | |
| 47 | ```bash |
| 48 | export GCC_PATH=<gcc-installation-path> |
| 49 | export PDK_PATH=<pdk-location/sky130A> |
| 50 | ``` |
| 51 | |
| 52 | To run any simulation, you need to be on the top level or caravel_user_project. |
| 53 | |
| 54 | To run RTL simulation for one of the DV tests, |
| 55 | |
| 56 | ```bash |
| 57 | SIM=RTL make verify-<dv-test> |
| 58 | ``` |
| 59 | |
| 60 | To run gate level simulation for one of the DV tests, |
| 61 | |
| 62 | ```bash |
| 63 | SIM=GL make verify-<dv-test> |
| 64 | ``` |
| 65 | |