SniperのRISC-V対応について、README.riscvにいくつか書いてあるのでやってみることにした。
基本的には./riscv/build-riscv.sh
で行けるようなのだが、いくつかステップを確認しておく必要がある。
riscv-toolsのインストールについては、リポジトリが古すぎるので、最新版に対応していないか、リポジトリが消えている可能性があるので要確認。
1a. riscv-tools - includes Spike (that support sift generation) git clone -b sift https://github.com/nus-comparch/riscv-tools.git cd riscv-tools git submodule update --init --recursive export RISCV=$(pwd)/RV64G export PATH=$RISCV/bin:$PATH
rv8シミュレータについては問題なくビルドできそう
Sniperのダウンロードは完了している。Pinは以下からダウンロードして配置した。
とりあえずこれで何とかなりそうな気もするが、もう一度環境を確認してみよう。
2. Compiling binaries NPROC=(`nproc --all`) 2a. riscv-tools (includes Spike) cd riscv-tools ./build-sift.sh $NPROC # optionally add the number of -j threads 2b. rv8 cd $RV8_HOME make test-build TEST_RV64="ARCH=rv64imafd TARGET=riscv64-unknown-elf" make -j 1 # make -j $NPROC for parallel simulation 2c. Sniper cd $SNIPER_ROOT make # Parallel builds currently broken 2d. Speckle # To compile and copy SPEC cd $SPECKLE_ROOT ./gen_binaries_sift.sh --compile --copy