Commit cb227ee5 by Miodrag Milanovic

Unify statuses and FAIL test but not break

parent 9fe8fe2a
#!/bin/bash
set -ex
set -x
test -d $1
test -f scripts/$2.ys
......@@ -9,6 +9,12 @@ mkdir $1/work_$2
cd $1/work_$2
yosys -ql yosys.log ../../scripts/$2.ys
if [ $? != 0 ] ; then
echo FAIL > ${1}_${2}.status
touch .stamp
exit 0
fi
if [ "$1" = "synth_ecp5" ]; then
iverilog -o testbench ../testbench.v synth.v ../../common.v ../../../../../techlibs/common/simcells.v ../../../../../techlibs/ecp5/cells_sim.v
elif [ "$1" = "synth_ecp5_wide_ffs" ]; then
......@@ -58,14 +64,19 @@ elif [ "$1" = "synth_greenpak4_wide_ffs" ]; then
else
iverilog -o testbench ../testbench.v synth.v ../../common.v ../../../../../techlibs/common/simcells.v
fi
if [ $? != 0 ] ; then
echo FAIL > ${1}_${2}.status
touch .stamp
exit 0
fi
if ! vvp -N testbench > testbench.log 2>&1; then
grep 'ERROR' testbench.log
echo fail > ${1}_${2}.status
echo FAIL > ${1}_${2}.status
elif grep 'ERROR' testbench.log || ! grep 'OKAY' testbench.log; then
echo fail > ${1}_${2}.status
echo FAIL > ${1}_${2}.status
else
echo pass > ${1}_${2}.status
echo PASS > ${1}_${2}.status
fi
touch .stamp
#!/bin/bash
set -ex
set -x
test -d $1
test -f scripts/$2.ys
......@@ -9,16 +9,27 @@ mkdir $1/work_$2
cd $1/work_$2
yosys -ql yosys.log ../../scripts/$2.ys
if [ $? != 0 ] ; then
echo FAIL > ${1}_${2}.status
touch .stamp
exit 0
fi
sed -i 's/reg =/dummy =/' ./synth.v
iverilog -o testbench ../testbench.v synth.v ../../common.v ../../../../../techlibs/common/simcells.v ../../../../../techlibs/common/simlib.v
if [ $? != 0 ] ; then
echo FAIL > ${1}_${2}.status
touch .stamp
exit 0
fi
if ! vvp -N testbench > testbench.log 2>&1; then
grep 'ERROR' testbench.log
echo fail > ${1}_${2}.status
echo FAIL > ${1}_${2}.status
elif grep 'ERROR' testbench.log || ! grep 'OKAY' testbench.log; then
echo fail > ${1}_${2}.status
echo FAIL > ${1}_${2}.status
else
echo pass > ${1}_${2}.status
echo PASS > ${1}_${2}.status
fi
touch .stamp
#!/bin/bash
set -ex
set -x
source $1/config
mkdir $1/work_$2
cd $1/work_$2
......@@ -36,18 +36,28 @@ for fn in $SIM; do
iverilog_cmd="$iverilog_cmd ../sim/$fn"
done
$iverilog_cmd
if [ $? != 0 ] ; then
echo FAIL > ${1}_${2}.status
touch .stamp
exit 0
fi
vvp -N sim | pv -l > output.txt
if [ $? != 0 ] ; then
echo FAIL > ${1}_${2}.status
touch .stamp
exit 0
fi
if [ "$2" = "falsify" ]; then
if cmp output.txt ../work_sim/output.txt; then
echo FAIL > ../../${1}_${2}.status
else
echo pass > ../../${1}_${2}.status
echo PASS > ../../${1}_${2}.status
fi
elif [ "$2" != "sim" ]; then
if cmp output.txt ../work_sim/output.txt; then
echo pass > ../../${1}_${2}.status
echo PASS > ../../${1}_${2}.status
else
echo FAIL > ../../${1}_${2}.status
fi
......
#!/bin/bash
set -ex
set -x
test -d $1
test -f scripts/$2.ys
......@@ -9,16 +9,26 @@ mkdir $1/work_$2
cd $1/work_$2
yosys -ql yosys.log ../../scripts/$2.ys
if [ $? != 0 ] ; then
echo FAIL > ${1}_${2}.status
touch .stamp
exit 0
fi
sed -i 's/reg =/dummy =/' ./synth.v
iverilog -o testbench ../testbench.v synth.v ../../common.v ../../../../../techlibs/common/simcells.v ../../../../../techlibs/common/simlib.v
if [ $? != 0 ] ; then
echo FAIL > ${1}_${2}.status
touch .stamp
exit 0
fi
if ! vvp -N testbench > testbench.log 2>&1; then
grep 'ERROR' testbench.log
echo fail > ${1}_${2}.status
echo FAIL > ${1}_${2}.status
elif grep 'ERROR' testbench.log || ! grep 'OKAY' testbench.log; then
echo fail > ${1}_${2}.status
echo FAIL > ${1}_${2}.status
else
echo pass > ${1}_${2}.status
echo PASS > ${1}_${2}.status
fi
touch .stamp
#!/bin/bash
set -ex
set -x
test -d $1
test -f scripts/$2.ys
......@@ -9,16 +9,26 @@ mkdir $1/work_$2
cd $1/work_$2
yosys -ql yosys.log ../../scripts/$2.ys
if [ $? != 0 ] ; then
echo FAIL > ${1}_${2}.status
touch .stamp
exit 0
fi
sed -i 's/reg =/dummy =/' ./synth.v
iverilog -o testbench ../testbench.v synth.v ../../common.v ../../../../../techlibs/common/simcells.v ../../../../../techlibs/common/simlib.v
if [ $? != 0 ] ; then
echo FAIL > ${1}_${2}.status
touch .stamp
exit 0
fi
if ! vvp -N testbench > testbench.log 2>&1; then
grep 'ERROR' testbench.log
echo fail > ${1}_${2}.status
echo FAIL > ${1}_${2}.status
elif grep 'ERROR' testbench.log || ! grep 'OKAY' testbench.log; then
echo fail > ${1}_${2}.status
echo FAIL > ${1}_${2}.status
else
echo pass > ${1}_${2}.status
echo PASS > ${1}_${2}.status
fi
touch .stamp
#!/bin/bash
set -ex
set -x
test -d $1
test -f scripts/$2.ys
......@@ -9,11 +9,16 @@ mkdir $1/work_$2
cd $1/work_$2
yosys -ql yosys.log ../../scripts/$2.ys
if [ $? != 0 ] ; then
echo FAIL > ${1}_${2}.status
touch .stamp
exit 0
fi
if grep 'Assert' result.log || grep 'failed in' result.log || grep 'fail' result.log || grep 'ERROR' result.log; then
echo fail > ${1}_${2}.status
echo FAIL > ${1}_${2}.status
else
echo pass > ${1}_${2}.status
echo PASS > ${1}_${2}.status
fi
touch .stamp
#!/bin/bash
set -ex
set -x
test -d $1
test -f scripts/$2.ys
......@@ -41,12 +41,12 @@ if [ "$1" = "issue_00089" ] ||\
fi
if yosys -ql yosys.log ../../scripts/$2.ys; then
echo fail > ${1}_${2}.status
echo FAIL > ${1}_${2}.status
else
if grep "$expected_string" yosys.log; then
echo pass > ${1}_${2}.status
echo PASS > ${1}_${2}.status
else
echo fail > ${1}_${2}.status
echo FAIL > ${1}_${2}.status
fi
fi
......@@ -120,17 +120,22 @@ elif [ "$1" = "issue_00502" ] ||\
fi
yosys -ql yosys.log ../../scripts/$2.ys;
if [ $? != 0 ] ; then
echo FAIL > ${1}_${2}.status
touch .stamp
exit 0
fi
if grep "$expected_string" result.log; then
if [ $expected = "1" ]; then
echo pass > ${1}_${2}.status
echo PASS > ${1}_${2}.status
else
echo fail > ${1}_${2}.status
echo FAIL > ${1}_${2}.status
fi
else
if [ $expected = "1" ]; then
echo fail > ${1}_${2}.status
echo FAIL > ${1}_${2}.status
else
echo pass > ${1}_${2}.status
echo PASS > ${1}_${2}.status
fi
fi
......@@ -155,14 +160,26 @@ else
fi
yosys -ql yosys.log ../../scripts/$2.ys
if [ $? != 0 ] ; then
echo FAIL > ${1}_${2}.status
touch .stamp
exit 0
fi
iverilog -o testbench ../testbench.v synth.v ../../common.v ../../../../../techlibs/common/simcells.v ../../../../../techlibs/common/simlib.v $iverilog_adds
if [ $? != 0 ] ; then
echo FAIL > ${1}_${2}.status
touch .stamp
exit 0
fi
if ! vvp -N testbench > testbench.log 2>&1; then
grep 'ERROR' testbench.log
echo fail > ${1}_${2}.status
echo FAIL > ${1}_${2}.status
elif grep 'ERROR' testbench.log || ! grep 'OKAY' testbench.log; then
echo fail > ${1}_${2}.status
echo FAIL > ${1}_${2}.status
else
echo pass > ${1}_${2}.status
echo PASS > ${1}_${2}.status
fi
fi
......
#!/bin/bash
set -ex
set -x
test -d $1
if [ "$2" != "verify" -a "$2" != "falsify" ]; then
......@@ -13,11 +13,31 @@ cd $1/work_$2
if [ "$2" = "verify" ]; then
iverilog -o testbench ../testbench.v ../../common.v ../top.v
if [ $? != 0 ] ; then
echo FAIL > ${1}_${2}.status
touch .stamp
exit 0
fi
elif [ "$2" = "falsify" ]; then
iverilog -DBUG -o testbench ../testbench.v ../../common.v ../top.v
if [ $? != 0 ] ; then
echo FAIL > ${1}_${2}.status
touch .stamp
exit 0
fi
else
yosys -ql yosys.log ../../scripts/$2.ys
if [ $? != 0 ] ; then
echo FAIL > ${1}_${2}.status
touch .stamp
exit 0
fi
iverilog -o testbench ../testbench.v ../../common.v synth.v $(yosys-config --datdir/simcells.v)
if [ $? != 0 ] ; then
echo FAIL > ${1}_${2}.status
touch .stamp
exit 0
fi
fi
if [ "$2" = "falsify" ]; then
......@@ -26,7 +46,7 @@ if [ "$2" = "falsify" ]; then
elif ! grep 'ERROR' testbench.log || grep 'OKAY' testbench.log; then
echo FAIL > ${1}_${2}.status
else
echo pass > ${1}_${2}.status
echo PASS > ${1}_${2}.status
fi
else
if ! vvp -N testbench > testbench.log 2>&1; then
......@@ -35,7 +55,7 @@ else
elif grep 'ERROR' testbench.log || ! grep 'OKAY' testbench.log; then
echo FAIL > ${1}_${2}.status
else
echo pass > ${1}_${2}.status
echo PASS > ${1}_${2}.status
fi
fi
......
#!/bin/bash
set -ex
set -x
trap "echo FAIL > $1.status" ERR
yosys -p "
......@@ -19,6 +19,11 @@ yosys -p "
miter -equiv -flatten A B miter
sat -verify -prove trigger 0 miter
"
if [ $? != 0 ] ; then
echo FAIL > ${1}_${2}.status
touch .stamp
exit 0
fi
echo PASS > $1.status
#!/bin/bash
set -ex
set -x
test -f $1.sv
trap "echo FAIL > $1.status" ERR
......@@ -23,6 +23,11 @@ while read t; do
echo "$1.sv"
} > $1.$t.sby
sby -f $1.$t.sby
if [ $? != 0 ] ; then
echo FAIL > ${1}_${2}.status
touch .stamp
exit 0
fi
done < <( egrep '^module (pass|fail)_[0-9][0-9]' $1.sv | gawk '{ print $2; }'; )
echo PASS > $1.status
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment