Demo scripts for XMNN Instruction Set Extension for muRISCV-NN
Either clone this repository recursively via
git clone https://github.com/PhilippvK/xmnn-isax-flow.git --recursiveor fetch the submodules in a two-step fashion:
git clone https://github.com/PhilippvK/xmnn-isax-flow.git
git submodule update --init --recursiveDownload toolchains
test -d install/rv32im_ilp32 || ./scripts/download_helper.sh install/rv32im_ilp32/ gnu 2024.09.03 rv32im_zicsr_zifencei_ilp32
test -d install/llvm || ./scripts/download_helper.sh install/llvm/ llvm 19.1.6_xcvmem_heuristicSetup venv for M2-ISA-R
./scripts/setup_m2isar.shSetup another venv for Seal5
./scripts/setup_seal5.shGenerate and apply ETISS patches
# ./scripts/patch_etiss.sh [ETISS_ARCH]
./scripts/patch_etiss.sh RV32IMACFDXCoreVXMNNBuild patched ETISS simulator
# ./scripts/setup_etiss.sh [Release|Debug]
./scripts/setup_etiss.sh ReleaseGenerate & build patched LLVM
./scripts/patch_llvm.shCompile target SW
# ./scripts/compile_example.sh [PROG] [gcc|llvm|seal5_llvm] [ARCH] [ABI]
./scripts/compile_example.sh mnn seal5_llvm rv32im_xcvmem_xcvmac_xcvalu_xcvbitmanip_xmnn_zicsr_zifencei ilp32Run program on patched architecture ETISS
# ./scripts/run_example.sh [PROG] [CPU_ARCH]
./scripts/run_example.sh mnn RV32IMACFDXCoreVXMNNAll steps above combined in one single script:
./scripts/full_flow.shIf you have a ccache/sccache installation on your system, use the following to drastically speedup your LLVM rebuilds:
export CCACHE=1If you have patched the LLVM at least once, some stages in the Seal5 flow can be skipped like this:
export PREPATCHED=1