Skip to content

Commit

Permalink
Create better-organized regression script.
Browse files Browse the repository at this point in the history
  • Loading branch information
Yvan Tortorella committed Nov 10, 2024
1 parent c8218cd commit ce9951a
Showing 1 changed file with 50 additions and 47 deletions.
97 changes: 50 additions & 47 deletions scripts/regression-list.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,55 +11,58 @@ Red="\e[31m"
Green="\e[32m"
EndColor="\e[0m"

BASE_TIMEOUT=100
if [ -z "$Target" ]; then
echo -e "${Red}Error: no Target defined. Set the Target variable to "vsim" or "verilator" before continue.${EndColor}"
else

PARAMS=(
96 96 96
128 128 128
12 16 16
24 16 16
48 32 32
30 32 17
24 32 1
31 32 16
17 32 16
31 32 31
17 32 3
5 32 17
5 32 3
36 31 32
12 31 16
23 31 31
24 17 32
24 20 32
#23 17 33
#23 20 33
#3 11 32
#17 13 16
#17 13 17
)
BASE_TIMEOUT=500

i=0
PARAMS=(
96 96 96
128 128 128
12 16 16
24 16 16
48 32 32
30 32 17
24 32 1
31 32 16
17 32 16
31 32 31
17 32 3
5 32 17
5 32 3
36 31 32
12 31 16
23 31 31
24 17 32
24 20 32
#23 17 33
#23 20 33
#3 11 32
#17 13 16
#17 13 17
)

while [[ $i -lt ${#PARAMS[@]} ]]
do
i=0

M=${PARAMS[$i]}
N=${PARAMS[$(( $i + 1 ))]}
K=${PARAMS[$(( $i + 2 ))]}
while [[ $i -lt ${#PARAMS[@]} ]]
do

i=$(( $i + 3 ))

make hw-clean hw-build 1>/dev/null 2>&1
make golden M=$M N=$N K=$K 1>/dev/null 2>&1
make sw-clean sw-build 1>/dev/null 2>&1
timeout $BASE_TIMEOUT make run 1>/dev/null 2>&1
grep -rn "Success!" $PWD/vsim/transcript 1>/dev/null 2>&1
if [[ $? -eq 0 ]]
then
echo -e "${Green}OK ${EndColor}: M=$M N=$N K=$K"
else
echo -e "${Red}ERROR ${EndColor}: M=$M N=$N K=$K"
fi

done
M=${PARAMS[$i]}
N=${PARAMS[$(( $i + 1 ))]}
K=${PARAMS[$(( $i + 2 ))]}

i=$(( $i + 3 ))

make hw-clean hw-build target=$Target 1>/dev/null 2>&1
make golden M=$M N=$N K=$K 1>/dev/null 2>&1
make sw-clean sw-build 1>/dev/null 2>&1
timeout $BASE_TIMEOUT make hw-run target=$Target > $PWD/target/sim/$Target/transcript_${M}_${N}_${K}
if grep -rn "\[TB\] - Success!" "$PWD/target/sim/$Target/transcript_${M}_${N}_${K}" 1>/dev/null 2>&1; then
echo -e "${Green}OK ${EndColor}: M=$M N=$N K=$K"
else
echo -e "${Red}ERROR ${EndColor}: M=$M N=$N K=$K"
fi

done
fi

0 comments on commit ce9951a

Please sign in to comment.