RVV ML Core SW repository

Clone this repo:

Branches

  1. 5fb5623 Prevent overflow in vredsum test by Michael Hoang · 8 days ago master
  2. 2945f0a Extend renode test timeout by Cindy Liu · 3 months ago
  3. b2872d7 sw/vec: Renode config fix by Lun Dong · 8 months ago
  4. 9a2eda3 Lint cleanup by Cindy Liu · 1 year, 1 month ago
  5. b492914 OSS cleanup by Cindy Liu · 1 year, 1 month ago

Springbok SW Repository

This project hosts SW programs for RISC-V 32-bit baremetal machine with vector extension (Springbok). It provides the BSP to build the SW artifacts to run on Springbok.

Prerequisite

If you get this project from a repo manifest, you are all set. If not, you need to have following projects as well to build the project successfully.

  • PigWeed repository. It needs to be placed at <dir>/sw/pigweed.
  • RISC-V 32-bit crosscompile LLVM toolchain. It needs to be placed at <dir>/cache/toolchain_iree_rv32imf

This project needs to be at <dir>/sw/vec.

Code structure

-cmake: CMake macros and cross compile toolchain setup -scripts: Helper scripts to generate and run the tests -softrvv: scalar mockup for the RVV instructions -springbok: BSP for the core, including the starting assembly, linker script, and gloss library support -tests: RVV instruction unit tests

Build the project

If you get this project from repo manifest, you can build the artifacts with m springbok. If you download this project alone, you need to run the following from the top-level directory

  cmake -B <output dir> -G Ninja \
     -DRISCV_TOOLCHAIN_ROOT=$(TOOLCHAINRV32_PATH) \
     <dir>/sw/vec
  cmake --build <output dir> --target all

Run the executables

You can run Renode emulation with the built executables. If you run from the repo, you can run sim_springbok for Renode simulation. Out-of-repo emulation is possible but requires more steps.

Test the executables

This project uses CMake's ctest to test the executables

ctest --test-dir <output dir>