mirror of
https://github.com/YosysHQ/yosys
synced 2025-08-07 11:41:23 +00:00
Emit valid SMT for stateful designs, fix some cells
This commit is contained in:
parent
f0f436cbe7
commit
5780357cd9
4 changed files with 306 additions and 183 deletions
2
tests/functional/.gitignore
vendored
2
tests/functional/.gitignore
vendored
|
@ -2,4 +2,4 @@ my_module_cxxrtl.cc
|
|||
my_module_functional_cxx.cc
|
||||
vcd_harness
|
||||
*.vcd
|
||||
*.smt2
|
||||
*.smt2
|
||||
|
|
|
@ -87,6 +87,10 @@ run_smt_test() {
|
|||
|
||||
|
||||
run_all_tests() {
|
||||
declare -A cxx_failing_files
|
||||
declare -A smt_failing_files
|
||||
declare -A cxx_successful_files
|
||||
declare -A smt_successful_files
|
||||
return_code=0
|
||||
for rtlil_file in rtlil/*.il; do
|
||||
run_cxx_test "$rtlil_file"
|
||||
|
@ -134,6 +138,8 @@ run_all_tests() {
|
|||
}
|
||||
|
||||
run_smt_tests() {
|
||||
declare -A smt_failing_files
|
||||
declare -A smt_successful_files
|
||||
return_code=0
|
||||
for rtlil_file in rtlil/*.il; do
|
||||
run_smt_test "$rtlil_file"
|
||||
|
|
|
@ -76,6 +76,8 @@ for lst in parsed_results:
|
|||
declarations = datatype_group[1][1:] # Skip the first item (e.g., 'mk_inputs')
|
||||
if datatype_name == 'Inputs':
|
||||
for declaration in declarations:
|
||||
print("My declaration")
|
||||
print(declaration)
|
||||
input_name = declaration[0]
|
||||
bitvec_size = declaration[1][2]
|
||||
inputs[input_name] = int(bitvec_size)
|
||||
|
@ -103,7 +105,7 @@ def set_step(inputs, step):
|
|||
define_inputs = f"(define-const test_inputs_step_n{step} Inputs ({mk_inputs_call}))\n"
|
||||
|
||||
# Create the output definition by calling the gold_step function
|
||||
define_output = f"(define-const test_outputs_step_n{step} Outputs (gold_step #b0 test_inputs_step_n{step}))\n"
|
||||
define_output = f"(define-const test_outputs_step_n{step} Outputs (gold_step test_inputs_step_n{step}))\n"
|
||||
smt_commands = []
|
||||
smt_commands.append(define_inputs)
|
||||
smt_commands.append(define_output)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue