diff options
author | David Shah <dave@ds0.me> | 2019-09-20 13:00:26 +0100 |
---|---|---|
committer | David Shah <dave@ds0.me> | 2019-10-03 09:54:14 +0100 |
commit | abc155715dbe8db5ee95707f7c243f23954ca139 (patch) | |
tree | 9fb6bdc43c6c12c89283827963ad5fce8d5c99a4 | |
parent | c0bb47beca2fb78670ab14515047a88a677cc608 (diff) | |
download | yosys-abc155715dbe8db5ee95707f7c243f23954ca139.tar.gz yosys-abc155715dbe8db5ee95707f7c243f23954ca139.tar.bz2 yosys-abc155715dbe8db5ee95707f7c243f23954ca139.zip |
sv: Add test scripts for typedefs
Signed-off-by: David Shah <dave@ds0.me>
-rw-r--r-- | Makefile | 1 | ||||
-rw-r--r-- | tests/svtypes/.gitignore | 3 | ||||
-rwxr-xr-x | tests/svtypes/run-test.sh | 20 | ||||
-rw-r--r-- | tests/svtypes/typedef_memory.ys | 3 | ||||
-rw-r--r-- | tests/svtypes/typedef_memory_2.ys | 4 |
5 files changed, 31 insertions, 0 deletions
@@ -708,6 +708,7 @@ test: $(TARGETS) $(EXTRA_TARGETS) +cd tests/various && bash run-test.sh +cd tests/sat && bash run-test.sh +cd tests/svinterfaces && bash run-test.sh $(SEEDOPT) + +cd tests/svtypes && bash run-test.sh $(SEEDOPT) +cd tests/proc && bash run-test.sh +cd tests/opt && bash run-test.sh +cd tests/aiger && bash run-test.sh $(ABCOPT) diff --git a/tests/svtypes/.gitignore b/tests/svtypes/.gitignore new file mode 100644 index 000000000..b48f808a1 --- /dev/null +++ b/tests/svtypes/.gitignore @@ -0,0 +1,3 @@ +/*.log +/*.out +/run-test.mk diff --git a/tests/svtypes/run-test.sh b/tests/svtypes/run-test.sh new file mode 100755 index 000000000..09a30eed1 --- /dev/null +++ b/tests/svtypes/run-test.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +set -e +{ +echo "all::" +for x in *.ys; do + echo "all:: run-$x" + echo "run-$x:" + echo " @echo 'Running $x..'" + echo " @../../yosys -ql ${x%.ys}.log $x" +done +for x in *.sv; do + if [ ! -f "${x%.sv}.ys" ]; then + echo "all:: check-$x" + echo "check-$x:" + echo " @echo 'Checking $x..'" + echo " @../../yosys -ql ${x%.sv}.log -p \"prep -top top; sat -verify -prove-asserts\" $x" + fi +done +} > run-test.mk +exec ${MAKE:-make} -f run-test.mk diff --git a/tests/svtypes/typedef_memory.ys b/tests/svtypes/typedef_memory.ys new file mode 100644 index 000000000..bc1127dc5 --- /dev/null +++ b/tests/svtypes/typedef_memory.ys @@ -0,0 +1,3 @@ +read -sv typedef_memory.sv +prep -top top +select -assert-count 1 t:$mem r:SIZE=16 %i r:WIDTH=4 %i
\ No newline at end of file diff --git a/tests/svtypes/typedef_memory_2.ys b/tests/svtypes/typedef_memory_2.ys new file mode 100644 index 000000000..571e28914 --- /dev/null +++ b/tests/svtypes/typedef_memory_2.ys @@ -0,0 +1,4 @@ +read -sv typedef_memory_2.sv +prep -top top +dump +select -assert-count 1 t:$mem r:SIZE=16 %i r:WIDTH=4 %i
\ No newline at end of file |