Add scripts for vortex binfile setup and sim runs

This commit is contained in:
Hansung Kim
2023-12-30 16:36:34 -08:00
parent ba6c80768e
commit fdf02063a3
2 changed files with 42 additions and 0 deletions

19
sims/switch-vortex.sh Executable file
View File

@@ -0,0 +1,19 @@
#!/bin/sh
if [ $# -ne 1 ]; then
echo "usage: $0 kernelname"
exit 1
fi
KERNEL=$1
SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
cd $SCRIPT_DIR
if ! [ -f "args.bin.$KERNEL" ]; then
echo "error: args.bin.$KERNEL not found"
exit 1
fi
cp -Pv args.bin{.$KERNEL,}
cp -Pv op_a.bin{.$KERNEL,}
cp -Pv op_b.bin{.$KERNEL,}

23
sims/vcs/run-radiance.sh Executable file
View File

@@ -0,0 +1,23 @@
#!/bin/sh
set -ex
if [ $# -ne 2 ]; then
echo "usage: $0 config kernelname"
exit 1
fi
CONFIG=$1
KERNEL=$2
if ! diff ../args.bin ../args.bin.$KERNEL; then
echo 'args.bin changed, running make clean'
make CONFIG=$CONFIG clean
fi
../switch-vortex.sh $KERNEL
ls -lh ../args.bin
ls -lh ../op_a.bin
ls -lh ../op_b.bin
make run-binary-debug CONFIG=$CONFIG BINARY=/scratch/hansung/src/vortex2/tests/opencl/$KERNEL/$KERNEL.bin.elf LOADMEM=1