3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-07-31 08:23:19 +00:00

Progress in SMV back-end

This commit is contained in:
Clifford Wolf 2015-06-18 16:29:11 +02:00
parent 8e84418225
commit 8a86162ae9
4 changed files with 147 additions and 24 deletions

1
tests/smv/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
temp

33
tests/smv/run-single.sh Normal file
View file

@ -0,0 +1,33 @@
#!/bin/bash
cat > $1.tpl <<EOT
%module main
INVARSPEC ! bool(_trigger)
EOT
cat > $1.ys <<EOT
echo on
read_ilang $1.il
hierarchy; proc; opt
rename -top uut
design -save gold
synth
design -stash gate
design -copy-from gold -as gold uut
design -copy-from gate -as gate uut
miter -equiv -flatten gold gate main
hierarchy -top main
dump
write_smv -tpl $1.tpl $1.smv
EOT
set -ex
../../yosys -l $1.log -q $1.ys
NuSMV -bmc $1.smv >> $1.log
grep "^-- invariant .* is true" $1.log

19
tests/smv/run-test.sh Executable file
View file

@ -0,0 +1,19 @@
#!/bin/bash
set -ex
rm -rf temp
mkdir -p temp
../../yosys -p 'test_cell -muxdiv -w temp/test all'
rm -f temp/test_{alu,fa,lcu,lut,macc}_*
cat > temp/makefile << "EOT"
all: $(addsuffix .ok,$(basename $(wildcard temp/test_*.il)))
%.ok: %.il
bash run-single.sh $(basename $<)
touch $@
EOT
${MAKE:-make} -f temp/makefile