Skip to content

Commit

Permalink
Run tests with LOADMEM in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
jerryz123 committed Aug 13, 2024
1 parent 683ba85 commit ec55aee
Showing 1 changed file with 12 additions and 32 deletions.
44 changes: 12 additions & 32 deletions .github/scripts/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ run_asm () {
make run-asm-tests-fast -j$CI_MAKE_NPROC -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ $MAPPING_FLAGS $@
}

run_both () {
run_bmark $@
run_asm $@
}

run_tracegen () {
make tracegen -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ $MAPPING_FLAGS $@
}
Expand All @@ -35,7 +30,8 @@ run_binary () {

case $1 in
chipyard-rocket)
run_bmark
run_bmark LOADMEM=1
run_asm LOADMEM=1
make -C $LOCAL_CHIPYARD_DIR/tests
# Test run-binary with and without loadmem
run_binary BINARY=$LOCAL_CHIPYARD_DIR/tests/hello.riscv LOADMEM=1
Expand All @@ -49,37 +45,21 @@ case $1 in
# Test cospike without checkpoint-restore
run_binary BINARY=$RISCV/riscv64-unknown-elf/share/riscv-tests/benchmarks/dhrystone.riscv LOADMEM=1
;;
chipyard-boomv3)
run_bmark
;;
chipyard-boomv4)
run_bmark
;;
chipyard-shuttle)
run_bmark ${mapping[$1]}
;;
chipyard-dmiboomv3)
# Test checkpoint-restore
$LOCAL_CHIPYARD_DIR/scripts/generate-ckpt.sh -b $RISCV/riscv64-unknown-elf/share/riscv-tests/benchmarks/dhrystone.riscv -i 10000
run_binary LOADARCH=$PWD/dhrystone.riscv.0x80000000.unused.10000.defaultspikedts.loadarch
chipyard-boomv3|chipyard-boomv4|chipyard-shuttle|chipyard-spike)
run_asm LOADMEM=1
run_bmark LOADMEM=1
;;
chipyard-dmiboomv4)
chipyard-dmiboomv3|chipyard-dmiboomv4)
# Test checkpoint-restore
$LOCAL_CHIPYARD_DIR/scripts/generate-ckpt.sh -b $RISCV/riscv64-unknown-elf/share/riscv-tests/benchmarks/dhrystone.riscv -i 10000
run_binary LOADARCH=$PWD/dhrystone.riscv.0x80000000.unused.10000.defaultspikedts.loadarch
;;
chipyard-spike)
run_bmark
;;
chipyard-hetero)
run_bmark
run_bmark LOADMEM=1
;;
chipyard-prefetchers)
run_binary BINARY=$RISCV/riscv64-unknown-elf/share/riscv-tests/benchmarks/dhrystone.riscv LOADMEM=1
;;
rocketchip)
run_bmark
;;
chipyard-gemmini)
GEMMINI_SOFTWARE_DIR=$LOCAL_SIM_DIR/../../generators/gemmini/software/gemmini-rocc-tests
rm -rf $GEMMINI_SOFTWARE_DIR/riscv-tests
Expand All @@ -100,17 +80,17 @@ case $1 in
make -C $LOCAL_CHIPYARD_DIR/tests

# test streaming-passthrough
run_binary BINARY=$LOCAL_CHIPYARD_DIR/tests/streaming-passthrough.riscv
run_binary BINARY=$LOCAL_CHIPYARD_DIR/tests/streaming-passthrough.riscv LOADMEM=1

# test streaming-fir
run_binary BINARY=$LOCAL_CHIPYARD_DIR/tests/streaming-fir.riscv
run_binary BINARY=$LOCAL_CHIPYARD_DIR/tests/streaming-fir.riscv LOADMEM=1

# test fft
run_binary BINARY=$LOCAL_CHIPYARD_DIR/tests/fft.riscv
run_binary BINARY=$LOCAL_CHIPYARD_DIR/tests/fft.riscv LOADMEM=1
;;
chipyard-nvdla)
make -C $LOCAL_CHIPYARD_DIR/tests
run_binary BINARY=$LOCAL_CHIPYARD_DIR/tests/nvdla.riscv
run_binary BINARY=$LOCAL_CHIPYARD_DIR/tests/nvdla.riscv LOADMEM=1
;;
chipyard-manyperipherals)
# SPI Flash read tests
Expand All @@ -119,7 +99,7 @@ case $1 in
;;
chipyard-spiflashwrite)
make -C $LOCAL_CHIPYARD_DIR/tests
run_binary BINARY=$LOCAL_CHIPYARD_DIR/tests/spiflashwrite.riscv
run_binary BINARY=$LOCAL_CHIPYARD_DIR/tests/spiflashwrite.riscv LOADMEM=1
[[ "`xxd $LOCAL_CHIPYARD_DIR/tests/spiflash.img | grep 1337\ 00ff\ aa55\ face | wc -l`" == "6" ]] || false
;;
chipyard-tethered)
Expand Down

0 comments on commit ec55aee

Please sign in to comment.