I could build the bitstream for PicoRV32 softcore. I runned the Microchips toolchain locally. I am not using the GitLab CI to build it.
./build-options/picorv-softcore.yaml is located inside the GSoC 2024 riscv-io-core fork on OpenBeagle, rather than the default main branch of the main BeagleV-Fire gateware repository. [1]
1. Where the Repositories Are Located
-
Repository containing picorv-softcore.yaml and SOFTCORE/PICO_RISCV/firmware: Look in the gsoc/2024/riscv-io-core repository on OpenBeagle (https://openbeagle.org), specifically on the rv32e-test branch (or check its build-options/ folder on main). Because the BeagleBoard PicoRV Softcore Documentation was written around that GSoC 2024 project, its relative path ./build-options/picorv-softcore.yaml sits right in the root of that cloned repository. [1]
-
Official Mainline Gateware Repository (APU/PICO_RV): The mainline BeagleV-Fire Gateware Repository (and its Bitstream Builder wrapper) uses a newer folder structure (APU/PICO_RV) and ships with build-options/default.yaml. [1, 2]
2. How to Clone and Run It Locally
- Clone the GSoC riscv-io-core repository
(switch to the rv32e-test branch if picorv-softcore.yaml is not on main):
git clone -b rv32e-test https://openbeagle.org/gsoc/2024/riscv-io-core.git
cd riscv-io-core
- Verify
build-options/ in the root directory:
ls -la build-options/
I could not see picorv-softcore.yaml listed inside build-options/ alongside build-bitstream.py in the current root directory.
But I could find a build option which uses the PicoRB32 softcore:
./custom-fpga-design/my_custom_fpga_design.yaml
---
HSS:
type: git
link: https://openbeagle.org/beaglev-fire/hart-software-services.git
branch: main-beaglev-fire
board: bvf
gateware:
type: sources
build-args: "M2_OPTION:DEFAULT CAPE_OPTION:DEFAULT SOFTCORE_OPTION:PICO_RISCV"
There is the option SOFTCORE_OPTION:PICO_RISCV
The softcore is located on:
./sources/FPGA-design/script_support/components/SOFTCORE/PICO_RISCV/
The firmware is on:
./sources/FPGA-design/script_support/components/SOFTCORE/PICO_RISCV/firmware
where I could edit and compile the firmware.c and main.c to hex using the script generatehex.sh.
3. Run the bitstream build from that root directory: [1]
python3 build-bitstream.py ../custom-fpga-design/my_custom_fpga_design.yaml
The bitstream was built on
./bitstream/LinuxProgramming/
and I could change the gateware (bitstream) in the BagleV-Fire board via the embedded Ubuntu change-gateware.sh script:
sudo /usr/share/beagleboard/gateware/change-gateware.sh ./my_custom_fpga_design