Merge pull request #1305 from YosysHQ/clifford/testfast

Speed up "make test" and related cleanups
This commit is contained in:
Clifford Wolf 2019-08-19 12:58:09 +02:00 committed by GitHub
commit 3edb0abed8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 48 additions and 38 deletions

View File

@ -682,6 +682,7 @@ endif
test: $(TARGETS) $(EXTRA_TARGETS) test: $(TARGETS) $(EXTRA_TARGETS)
+cd tests/simple && bash run-test.sh $(SEEDOPT) +cd tests/simple && bash run-test.sh $(SEEDOPT)
+cd tests/simple_abc9 && bash run-test.sh $(SEEDOPT)
+cd tests/hana && bash run-test.sh $(SEEDOPT) +cd tests/hana && bash run-test.sh $(SEEDOPT)
+cd tests/asicworld && bash run-test.sh $(SEEDOPT) +cd tests/asicworld && bash run-test.sh $(SEEDOPT)
# +cd tests/realmath && bash run-test.sh $(SEEDOPT) # +cd tests/realmath && bash run-test.sh $(SEEDOPT)
@ -697,7 +698,6 @@ test: $(TARGETS) $(EXTRA_TARGETS)
+cd tests/opt && bash run-test.sh +cd tests/opt && bash run-test.sh
+cd tests/aiger && bash run-test.sh $(ABCOPT) +cd tests/aiger && bash run-test.sh $(ABCOPT)
+cd tests/arch && bash run-test.sh +cd tests/arch && bash run-test.sh
+cd tests/simple_abc9 && bash run-test.sh $(SEEDOPT)
@echo "" @echo ""
@echo " Passed \"make test\"." @echo " Passed \"make test\"."
@echo "" @echo ""

View File

@ -6,7 +6,7 @@
set -e set -e
OPTIND=1 OPTIND=1
count=100 count=50
seed="" # default to no seed specified seed="" # default to no seed specified
while getopts "c:S:" opt while getopts "c:S:" opt
do do

View File

@ -19,8 +19,8 @@ hierarchy -top equiv
equiv_simple -undef equiv_simple -undef
equiv_status -assert equiv_status -assert
design -load gold #design -load gold
stat #stat
#
design -load gate #design -load gate
stat #stat

View File

@ -18,5 +18,6 @@ if ! which iverilog > /dev/null ; then
fi fi
cp ../simple/*.v . cp ../simple/*.v .
cp ../simple/*.sv .
DOLLAR='?' DOLLAR='?'
exec ${MAKE:-make} -f ../tools/autotest.mk $seed *.v EXTRA_FLAGS="-p 'hierarchy; synth -run coarse; opt -full; techmap; abc9 -lut 4 -box ../abc.box; stat; check -assert; select -assert-none t:${DOLLAR}_NOT_ t:${DOLLAR}_AND_ %%'" exec ${MAKE:-make} -f ../tools/autotest.mk $seed *.v EXTRA_FLAGS="-n 300 -p 'hierarchy; synth -run coarse; opt -full; techmap; abc9 -lut 4 -box ../abc.box; stat; check -assert; select -assert-none t:${DOLLAR}_NOT_ t:${DOLLAR}_AND_ %%'"

View File

@ -2,3 +2,4 @@
/*.out /*.out
/write_gzip.v /write_gzip.v
/write_gzip.v.gz /write_gzip.v.gz
/run-test.mk

View File

@ -6,7 +6,7 @@ prep
design -save gold design -save gold
muxpack muxpack
opt opt
stat #stat
select -assert-count 0 t:$mux select -assert-count 0 t:$mux
select -assert-count 1 t:$pmux select -assert-count 1 t:$pmux
design -stash gate design -stash gate
@ -21,7 +21,7 @@ prep
design -save gold design -save gold
muxpack muxpack
opt opt
stat #stat
select -assert-count 0 t:$mux select -assert-count 0 t:$mux
select -assert-count 1 t:$pmux select -assert-count 1 t:$pmux
design -stash gate design -stash gate
@ -52,7 +52,7 @@ prep
design -save gold design -save gold
muxpack muxpack
opt opt
stat #stat
select -assert-count 0 t:$mux select -assert-count 0 t:$mux
select -assert-count 2 t:$pmux select -assert-count 2 t:$pmux
design -stash gate design -stash gate
@ -67,7 +67,7 @@ prep
design -save gold design -save gold
muxpack muxpack
opt opt
stat #stat
select -assert-count 0 t:$mux select -assert-count 0 t:$mux
select -assert-count 1 t:$pmux select -assert-count 1 t:$pmux
design -stash gate design -stash gate
@ -82,7 +82,7 @@ prep
design -save gold design -save gold
muxpack muxpack
opt opt
stat #stat
select -assert-count 0 t:$mux select -assert-count 0 t:$mux
select -assert-count 1 t:$pmux select -assert-count 1 t:$pmux
design -stash gate design -stash gate
@ -97,7 +97,7 @@ prep
design -save gold design -save gold
muxpack muxpack
opt opt
stat #stat
select -assert-count 0 t:$mux select -assert-count 0 t:$mux
select -assert-count 1 t:$pmux select -assert-count 1 t:$pmux
design -stash gate design -stash gate
@ -112,7 +112,7 @@ prep
design -save gold design -save gold
muxpack muxpack
opt opt
stat #stat
select -assert-count 0 t:$mux select -assert-count 0 t:$mux
select -assert-count 1 t:$pmux select -assert-count 1 t:$pmux
design -stash gate design -stash gate
@ -127,7 +127,7 @@ prep
design -save gold design -save gold
muxpack muxpack
opt opt
stat #stat
select -assert-count 0 t:$mux select -assert-count 0 t:$mux
select -assert-count 1 t:$pmux select -assert-count 1 t:$pmux
design -stash gate design -stash gate
@ -142,7 +142,7 @@ prep
design -save gold design -save gold
muxpack muxpack
opt opt
stat #stat
select -assert-count 7 t:$mux select -assert-count 7 t:$mux
select -assert-count 0 t:$pmux select -assert-count 0 t:$pmux
design -stash gate design -stash gate
@ -157,7 +157,7 @@ prep
design -save gold design -save gold
muxpack muxpack
opt opt
stat #stat
select -assert-count 4 t:$mux select -assert-count 4 t:$mux
select -assert-count 0 t:$pmux select -assert-count 0 t:$pmux
design -stash gate design -stash gate
@ -172,7 +172,7 @@ prep
design -save gold design -save gold
muxpack muxpack
opt opt
stat #stat
select -assert-count 3 t:$mux select -assert-count 3 t:$mux
select -assert-count 0 t:$pmux select -assert-count 0 t:$pmux
design -stash gate design -stash gate
@ -204,7 +204,7 @@ prep
design -save gold design -save gold
muxpack muxpack
opt opt
stat #stat
select -assert-count 0 t:$mux select -assert-count 0 t:$mux
select -assert-count 2 t:$pmux select -assert-count 2 t:$pmux
design -stash gate design -stash gate
@ -222,7 +222,7 @@ opt -fast -mux_undef
select -assert-count 2 t:$pmux select -assert-count 2 t:$pmux
muxpack muxpack
opt opt
stat #stat
select -assert-count 0 t:$mux select -assert-count 0 t:$mux
select -assert-count 1 t:$pmux select -assert-count 1 t:$pmux
design -stash gate design -stash gate
@ -240,7 +240,7 @@ opt -fast -mux_undef
select -assert-count 2 t:$pmux select -assert-count 2 t:$pmux
muxpack muxpack
opt opt
stat #stat
select -assert-count 0 t:$mux select -assert-count 0 t:$mux
select -assert-count 2 t:$pmux select -assert-count 2 t:$pmux
design -stash gate design -stash gate
@ -258,7 +258,7 @@ opt -fast -mux_undef
select -assert-count 2 t:$pmux select -assert-count 2 t:$pmux
muxpack muxpack
opt opt
stat #stat
select -assert-count 0 t:$mux select -assert-count 0 t:$mux
select -assert-count 2 t:$pmux select -assert-count 2 t:$pmux
design -stash gate design -stash gate

View File

@ -1,12 +1,20 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e set -e
{
echo "all::"
for x in *.ys; do for x in *.ys; do
echo "Running $x.." echo "all:: run-$x"
../../yosys -ql ${x%.ys}.log $x echo "run-$x:"
echo " @echo 'Running $x..'"
echo " @../../yosys -ql ${x%.ys}.log $x"
done done
for s in *.sh; do for s in *.sh; do
if [ "$s" != "run-test.sh" ]; then if [ "$s" != "run-test.sh" ]; then
echo "Running $s.." echo "all:: run-$s"
bash $s echo "run-$s:"
echo " @echo 'Running $s..'"
echo " @bash $s"
fi fi
done done
} > run-test.mk
exec ${MAKE:-make} -f run-test.mk

View File

@ -11,7 +11,7 @@ shregmap -init
opt opt
stat # stat
# show -width # show -width
select -assert-count 1 t:$_DFF_P_ select -assert-count 1 t:$_DFF_P_
select -assert-count 2 t:$__SHREG_DFF_P_ select -assert-count 2 t:$__SHREG_DFF_P_
@ -26,11 +26,11 @@ prep
miter -equiv -flatten -make_assert -make_outputs gold gate miter miter -equiv -flatten -make_assert -make_outputs gold gate miter
sat -verify -prove-asserts -show-ports -seq 5 miter sat -verify -prove-asserts -show-ports -seq 5 miter
design -load gold #design -load gold
stat #stat
design -load gate #design -load gate
stat #stat
########## ##########
@ -43,9 +43,9 @@ design -save gold
simplemap t:$dff t:$dffe simplemap t:$dff t:$dffe
shregmap -tech xilinx shregmap -tech xilinx
stat #stat
# show -width # show -width
write_verilog -noexpr -norename # write_verilog -noexpr -norename
select -assert-count 1 t:$_DFF_P_ select -assert-count 1 t:$_DFF_P_
select -assert-count 2 t:$__XILINX_SHREG_ select -assert-count 2 t:$__XILINX_SHREG_
@ -59,8 +59,8 @@ prep
miter -equiv -flatten -make_assert -make_outputs gold gate miter miter -equiv -flatten -make_assert -make_outputs gold gate miter
sat -verify -prove-asserts -show-ports -seq 5 miter sat -verify -prove-asserts -show-ports -seq 5 miter
design -load gold # design -load gold
stat # stat
design -load gate # design -load gate
stat # stat