Improved FSM tests
authorClifford Wolf <clifford@clifford.at>
Fri, 8 Aug 2014 12:30:45 +0000 (14:30 +0200)
committerClifford Wolf <clifford@clifford.at>
Fri, 8 Aug 2014 13:08:11 +0000 (15:08 +0200)
Makefile
tests/fsm/.gitignore [new file with mode: 0644]
tests/fsm/generate.py
tests/fsm/run-test.sh

index cd43e53baf1feacd0049fdeb1ab52de72951b98d..0e3a88a7009fedeacb44de7bd14f790e069df271 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -218,6 +218,7 @@ test: $(TARGETS) $(EXTRA_TARGETS)
        +cd tests/asicworld && bash run-test.sh
        +cd tests/realmath && bash run-test.sh
        +cd tests/share && bash run-test.sh
+       +cd tests/fsm && bash run-test.sh
        +cd tests/techmap && bash run-test.sh
        +cd tests/memories && bash run-test.sh
        +cd tests/various && bash run-test.sh
diff --git a/tests/fsm/.gitignore b/tests/fsm/.gitignore
new file mode 100644 (file)
index 0000000..9c595a6
--- /dev/null
@@ -0,0 +1 @@
+temp
index 0d000f04ee467e5564cc6d1ff966af60ef045d03..722bd62afe2280ff5ef7a52677d34a57ac500850 100644 (file)
@@ -30,7 +30,7 @@ def random_expr(variables):
         return "%d'd%s" % (bits, random.randint(0, 2**bits-1))
     raise AssertionError
 
-for idx in range(100):
+for idx in range(50):
     with file('temp/uut_%05d.v' % idx, 'w') as f, redirect_stdout(f):
         print('module uut_%05d(clk, rst, a, b, c, x, y, z);' % (idx))
         print('  input clk, rst;')
@@ -79,5 +79,5 @@ for idx in range(100):
         print('opt; wreduce; share; opt; fsm;;')
         print('cd ..')
         print('miter -equiv -flatten -ignore_gold_x -make_outputs -make_outcmp gold gate miter')
-        print('sat -verify -seq 5 -set-at 1 in_rst 1 -prove trigger 0 -prove-skip 1 -show-inputs -show-outputs miter')
+        print('sat -verify-no-timeout -timeout 20 -seq 5 -set-at 1 in_rst 1 -prove trigger 0 -prove-skip 1 -show-inputs -show-outputs miter')
  
index 697ed93502d776452d9adbc0be09c58a26404540..f5299c092ae972515f3426f05bde4c0d42f23296 100755 (executable)
@@ -18,6 +18,7 @@ python generate.py
                echo "temp/uut_${idx}.log: temp/uut_${idx}.ys temp/uut_${idx}.v"
                echo "  @echo -n '[$i]'"
                echo "  @../../yosys -ql temp/uut_${idx}.log temp/uut_${idx}.ys"
+               echo "  @grep -q 'SAT proof finished' temp/uut_${idx}.log && echo -n K || echo -n T"
                all_targets="$all_targets temp/uut_${idx}.log"
        done
        echo "$all_targets"