Skip to content

Commit c3fbdc6

Browse files
committed
´SMT success only if simulation is equivalent
1 parent 19c6aa2 commit c3fbdc6

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

tests/functional/single_cells/run-test.sh

-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ run_smt_test() {
5454
# TODO: which SMT solver should be run?
5555
if z3 "${base_name}.smt2"; then
5656
echo "SMT file ${base_name}.smt2 is valid ."
57-
smt_successful_files["$rtlil_file"]="Success"
5857
if python3 vcd_harness_smt.py "${base_name}.smt2"; then
5958
echo "Python script generated VCD file for $rtlil_file successfully."
6059

tests/functional/single_cells/vcd_harness_smt.py

+4
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,9 @@ def set_step(inputs, step):
133133
# smt_io.setup()
134134
result = smt_io.check_sat()
135135
print(f'SAT result: {result}')
136+
if result != 'sat':
137+
smt_io.p_close()
138+
sys.exit(1)
136139

137140
value = smt_io.get(f'(Y test_outputs_step_n0)')
138141
print(f" Y: {value}")
@@ -197,3 +200,4 @@ def write_vcd(filename, signals, timescale='1 ns', date='today'):
197200

198201
# Write the VCD file
199202
write_vcd(smt_file_path + '.vcd', signals)
203+
sys.exit(0)

0 commit comments

Comments
 (0)