diff options
author | Clifford Wolf <clifford@clifford.at> | 2016-04-12 20:17:36 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2016-04-12 20:17:36 +0200 |
commit | 2938d148335567a9df3eadbc136af4c97b294836 (patch) | |
tree | ba7b3e8f8ab10e8c7253465cb7a4476b0ff9dae0 /scripts/torture/test.sh | |
parent | 4792ef3945245b29faaad734e8b3a4b3f3a82f14 (diff) | |
download | picorv32-2938d148335567a9df3eadbc136af4c97b294836.tar.gz picorv32-2938d148335567a9df3eadbc136af4c97b294836.zip |
Run torture test with random PicoRV32 configs
Diffstat (limited to 'scripts/torture/test.sh')
-rw-r--r-- | scripts/torture/test.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/torture/test.sh b/scripts/torture/test.sh index 5e431c7..eae1b75 100644 --- a/scripts/torture/test.sh +++ b/scripts/torture/test.sh @@ -5,9 +5,13 @@ set -ex ## Generate test case +if ! test -f config.vh; then + python3 config.py +fi + if ! test -f test.S; then cd riscv-torture - ./sbt generator/run + ./sbt "generator/run -C config/test.config" cp output/test.S ../test.S cd .. fi @@ -15,7 +19,7 @@ fi ## Compile test case and create reference -riscv32-unknown-elf-gcc -m32 -march=RV32IMC -ffreestanding -nostdlib -Wl,-Bstatic,-T,sections.lds -o test.elf test.S +riscv32-unknown-elf-gcc -m32 `sed '/march=/ ! d; s,^// ,-,;' config.vh` -ffreestanding -nostdlib -Wl,-Bstatic,-T,sections.lds -o test.elf test.S LD_LIBRARY_PATH="./riscv-isa-sim:./riscv-fesvr" ./riscv-isa-sim/spike test.elf > test.ref riscv32-unknown-elf-objcopy -O binary test.elf test.bin python3 ../../firmware/makehex.py test.bin 4096 > test.hex |