mirror of
https://github.com/YosysHQ/yosys
synced 2025-09-16 22:51:28 +00:00
smt2/smtbmc: Fix FF witness data for fine grained or multi chunk FFs
The witness metadata was missing fine grained FFs completely and for coarse grained FFs where the output connection has multiple chunks it lacked the offset of the chunk within the SMT expression. This fixes both, the later by adding an "smtoffset" field to the metadata.
This commit is contained in:
parent
f35c062354
commit
4d334fd3e3
4 changed files with 29 additions and 12 deletions
|
@ -669,7 +669,7 @@ if inywfile is not None:
|
|||
if common_end <= common_offset:
|
||||
continue
|
||||
|
||||
smt_expr = smt.net_expr(topmod, f"s{t}", wire["smtpath"])
|
||||
smt_expr = smt.witness_net_expr(topmod, f"s{t}", wire)
|
||||
|
||||
if not smt_bool:
|
||||
slice_high = common_end - offset - 1
|
||||
|
@ -1267,7 +1267,8 @@ def write_yw_trace(steps_start, steps_stop, index, allregs=False):
|
|||
sigs = seqs
|
||||
|
||||
for sig in sigs:
|
||||
step_values[sig["sig"]] = smt.bv2bin(smt.get(smt.net_expr(topmod, f"s{k}", sig["smtpath"])))
|
||||
value = smt.bv2bin(smt.get(smt.witness_net_expr(topmod, f"s{k}", sig)))
|
||||
step_values[sig["sig"]] = value
|
||||
yw.step(step_values)
|
||||
|
||||
yw.end_trace()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue