From f2bda069da36719540def651a3cfd2d5396d6943 Mon Sep 17 00:00:00 2001 From: David Harris Date: Fri, 4 Mar 2022 05:09:02 +0000 Subject: [PATCH] Adjusted scripts to use --- bin/testlist.pl | 2 +- synthDC/Makefile | 2 +- tests/testgen/privileged/run.sh | 20 ++++++++++---------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/bin/testlist.pl b/bin/testlist.pl index 5b7accae7..745ff29e5 100755 --- a/bin/testlist.pl +++ b/bin/testlist.pl @@ -9,7 +9,7 @@ use warnings; import os; if ($#ARGV != 0) { - die("Usage: $0 workpath [e.g. $0 ~/riscv-wally/addins/riscv-arch-test/work") + die("Usage: $0 workpath [e.g. $0 $WALLY/addins/riscv-arch-test/work") } my $mypath = $ARGV[0]; my @dirs = glob($mypath.'/*/*'); diff --git a/synthDC/Makefile b/synthDC/Makefile index aafadb648..b359046eb 100755 --- a/synthDC/Makefile +++ b/synthDC/Makefile @@ -21,7 +21,7 @@ hash := $(shell git rev-parse --short HEAD) export OUTPUTDIR := runs/$(DESIGN)_$(CONFIG)_$(TECH)nm_$(FREQ)_MHz_$(time)_$(hash) export SAIFPOWER ?= 0 -CONFIGDIR ?= ~/riscv-wally/pipelined/config +CONFIGDIR ?= ${WALLY}/pipelined/config CONFIGFILES ?= $(shell find $(CONFIGDIR) -name rv*_*) CONFIGFILESTRIM = $(notdir $(CONFIGFILES)) print: diff --git a/tests/testgen/privileged/run.sh b/tests/testgen/privileged/run.sh index 122e629e7..1fa3a9d01 100755 --- a/tests/testgen/privileged/run.sh +++ b/tests/testgen/privileged/run.sh @@ -11,21 +11,21 @@ printf "\n\n#####\nStarting tests for $1\n#####\n\n" if [[ "$2" != "-simonly" ]] then - cd ~/riscv-wally/pipelined/testgen/privileged + cd $WALLY/pipelined/testgen/privileged python3 "testgen-$1.py" printf "\n\n#####\nRan testgen-$1.py Making...\n#####\n\n\n" if [[ "$2" == "-c" ]] then printf "\n\n###\nWARNING\nThis seems to not be outputting begin_signature at the moment... Probably won't work in modelsim...\n###\n\n\n" - cd ~/riscv-wally/imperas-riscv-tests/riscv-test-suite/rv64p/src + cd $WALLY/imperas-riscv-tests/riscv-test-suite/rv64p/src riscv64-unknown-elf-gcc -nostdlib -nostartfiles -march=rv64g "WALLY-$1".S -I../../../riscv-test-env -I../../../riscv-test-env/p -I../../../riscv-target/riscvOVPsimPlus -T../../../riscv-test-env/p/link.ld -o "../../../work/rv64p/WALLY-$1.elf" - cd ~/riscv-wally/imperas-riscv-tests/work/rv64p + cd $WALLY/imperas-riscv-tests/work/rv64p riscv64-unknown-elf-objdump -d "WALLY-$1".elf > "WALLY-$1".elf.objdump elif [[ "$2" != "-nosim" ]] then - cd ~/riscv-wally/imperas-riscv-tests + cd $WALLY/imperas-riscv-tests make privileged exe2memfile.pl work/*/*.elf @@ -36,9 +36,9 @@ fi if [[ "$2" == "-simonly" ]] then printf "\n\n###\nWARNING\nThis seems to not be outputting begin_signature at the moment... Probably won't work in modelsim...\n###\n\n\n" - cd ~/riscv-wally/imperas-riscv-tests/riscv-test-suite/rv64p/src + cd $WALLY/imperas-riscv-tests/riscv-test-suite/rv64p/src riscv64-unknown-elf-gcc -nostdlib -nostartfiles -march=rv64g "WALLY-$1".S -I../../../riscv-test-env -I../../../riscv-test-env/p -I../../../riscv-target/riscvOVPsimPlus -T../../../riscv-test-env/p/link.ld -o "../../../work/rv64p/WALLY-$1.elf" - cd ~/riscv-wally/imperas-riscv-tests/work/rv64p + cd $WALLY/imperas-riscv-tests/work/rv64p riscv64-unknown-elf-objdump -d "WALLY-$1".elf > "WALLY-$1".elf.objdump # riscv64-unknown-elf-gcc -nostdlib -nostartfiles -march=rv64g "WALLY-CAUSE".S -I../../../riscv-test-env -I../../../riscv-test-env/p -I../../../riscv-target/riscvOVPsimPlus -T../../../riscv-test-env/p/link.ld -o "../../../work/rv64p/WALLY-CAUSE.elf" @@ -48,14 +48,14 @@ fi if [[ "$2" == "-sim" || "$2" == "-simonly" ]] then printf "\n\n\n#####\nSimulating!\n#####\n\n" - cd ~/riscv-wally/pipelined/regression + cd $WALLY/pipelined/regression vsim -do wally-privileged.do -c fi -cd ~/riscv-wally/pipelined +cd $WALLY/pipelined printf "\n\n\n#####\nDone!\n#####\n\n" -cd ~/riscv-wally/imperas-riscv-tests/work +cd $WALLY/imperas-riscv-tests/work for isa in "rv64p" "rv32p"; do printf "$isa = '{" COMMA="" @@ -71,4 +71,4 @@ for isa in "rv64p" "rv32p"; do printf "\n};\n\n" done -cd ~/riscv-wally/pipelined \ No newline at end of file +cd $WALLY/pipelined \ No newline at end of file