Build
Repository
The repository file structure is listed below:
├─ gateware
│ ├─ src
│ │ ├─ lib
│ │ ├─ app
│ │ ├─ risc-v
│ │ ├─ misc
│ │ ├─ pm
│ │ ├─ rx
│ │ ├─ tx
│ │ ├─ vtb
│ │ └─ scaler
│ ├─ ref
│ │ ├─ amd
│ │ ├─ zcu102
│ │ │ └─ tb-a7-20bt.img
│ │ ├─ intel
│ │ │ ├─ de-dev-10-sx220
│ │ │ │ └─ dk-dev-10sx155
│ │ │ └─ isc
│ │ │ └─ ifgap4_evn
│ │ └─ syn
│ │ ├─ amd
│ │ ├─ intel
│ │ └─ isc
└─ software
├─ src
│ ├─ app
│ ├─ lib
│ └─ vtb
└─ build
└─ bin
Reference design
Follow the steps below to build the reference design for both gateware and software components.
Before building the reference design application, you need to install the RISC-V GNU Compiler Toolchain.
You can download the toolchain from the GitHub repository
Here
Building the Toolchain
- Clone the GitHub repository.
- Compile the toolchain, which may take some time:
./configure --prefix=/usr/local --with-arch=rv32i --with-abi=ilp32 --without-system-zlib
make -j$(nproc)
This will set up the toolchain in the /risc/ directory, configured for the RV32I architecture and the ILP32 ABI.
In the cmake command-line the argument GCC points to the Risc-V toolchain, eg: -DGCC=/riscv/bin/riscv32-unknown-elf-
AMD ZCU102 reference design
- Change the directory to the folder gateware/syn/amd
- Run the TCL build script: vivado -mode batch -source .././ref/amd/zcu102/build_proj.tcl
- Change the directory to the folder software/build
- Run the cmake command: cmake ..DVENDOR=AMD -DBOARD=AMD_ZCU102 -DGCC=
- Then run make to build the binaries
AMD TB-A7-200T-IMG reference design
- Change the directory to the folder gateware/syn/amd
- Run the TCL build script: vivado -mode batch -source .././ref/amd/tb-a7-200t-img/build_proj.tcl
- Change the directory to the folder software/build
- Run the cmake command: cmake ..DVENDOR=AMD -DBOARD=TB_A7_200T_IMG -DGCC=
- Then run make to build the binaries
Altera Cyclone 10GX reference design
- Change the directory to the folder gateware/syn/intel
- Run the TCL build script: quartus_sh -t .././ref/intel/dk-dev-10gx220/build_proj.tcl
- Change the directory to the folder software/build
- Run the cmake command: cmake ..DVENDOR=INT -DBOARD=INT_C10GX -DGCC=
- Then run make to build the binaries
Altera Arria 10GX reference design
- Change the directory to the folder gateware/syn/intel
- Run the TCL build script: quartus_sh -t .././ref/intel/dk-dev-10sx155/build_proj.tcl
- Change the directory to the folder software/build
- Run the cmake command: cmake ..DVENDOR=INT -DBOARD=INT_A10GX -DGCC=
- Then run make to build the binaries
Lattice reference design
- Change the directory to the folder gateware/syn/isc
- Run the TCL build script: radiant .././ref/isc/ifgpn4_evn/build_proj.tcl
- Change the directory to the folder software/build
- Run the cmake command: cmake ..DVENDOR=ISC -DBOARD=ISC_IFCPNX -DGCC=
- Then run make to build the binaries