RISCV_picorv32_fpga/README.md

39 lines
1.5 KiB
Markdown
Raw Normal View History

2023-09-17 03:57:50 +00:00
# RISCV_picorv32_fpga
2023-09-17 07:35:19 +00:00
##building RISC-V from scratch, using Linux or WSL
2023-09-17 07:44:18 +00:00
```html
sudo apt-get update
sudo apt-get install autoconf automake autotools-dev curl python3 python3-pip libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf libtool patchutils bc zlib1g-dev libexpat-dev ninja-build git cmake libglib2.0-dev
git clone https://github.com/riscv/riscv-gnu-toolchain
cd riscv-gnu-toolchain/
mkdir build/
cd build
sudo mkdir /opt/riscv32im
sudo chown $USER /opt/riscv32im
./configure --with-arch=rv32im --prefix=/opt/riscv32im
make -j$(nproc)
```
2023-09-17 07:35:19 +00:00
# For other architectures or variations of RISC-V
2023-09-17 07:44:18 +00:00
| Command | ISA |
|:---------------------------------------- |:-------- |
|`./configure --with-arch=rv32i --prefix=/opt/riscv32i/ `| `RV32I `|
|`./configure --with-arch=rv32ic --prefix=/opt/riscv32ic/ `| `RV32IC `|
|`./configure --with-arch=rv32im --prefix=/opt/riscv32im/` | `RV32IM `|
|`./configure --with-arch=rv32imc --prefix=/opt/riscv32imc/`| `RV32IMC `|
2023-09-17 07:35:19 +00:00
2023-09-17 07:44:18 +00:00
## Other Linux and Windows precompiled Toolchains
- https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/releases/ for mingw64
- https://gnutoolchains.com/risc-v/
2023-09-17 07:35:19 +00:00
# Build the firmware
2023-09-17 07:44:18 +00:00
```html
2023-09-17 07:35:19 +00:00
git clone https://gitea.squirrelnut.synology.me:5001/FPGALover/RISCV_picorv32_fpga
cd RISCV_picorv32_fpga/sw
make clean
make firmware/firmware.fpga
cp firmware/Memory.v_toplevel_memory_1_symbol* ../rtl/DE0-NANO
2023-09-17 07:44:18 +00:00
```
*Now you can compile or synthesize the FPGA harware using Quartus or any other Design tool*