mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-12 20:18:20 +00:00
smtbmc: Cache hierarchy for loading multiple yw files
This will be used by sby/tools/cexenum via the incremental interface.
This commit is contained in:
parent
d03c5e2a00
commit
97db1cb745
|
@ -649,14 +649,20 @@ if aimfile is not None:
|
||||||
num_steps = max(num_steps, step+2)
|
num_steps = max(num_steps, step+2)
|
||||||
step += 1
|
step += 1
|
||||||
|
|
||||||
|
ywfile_hierwitness_cache = None
|
||||||
|
|
||||||
def ywfile_constraints(inywfile, constr_assumes, map_steps=None, skip_x=False):
|
def ywfile_constraints(inywfile, constr_assumes, map_steps=None, skip_x=False):
|
||||||
|
global ywfile_hierwitness_cache
|
||||||
if map_steps is None:
|
if map_steps is None:
|
||||||
map_steps = {}
|
map_steps = {}
|
||||||
|
|
||||||
with open(inywfile, "r") as f:
|
with open(inywfile, "r") as f:
|
||||||
inyw = ReadWitness(f)
|
inyw = ReadWitness(f)
|
||||||
|
|
||||||
inits, seqs, clocks, mems = smt.hierwitness(topmod, allregs=True, blackbox=True)
|
if ywfile_hierwitness_cache is None:
|
||||||
|
ywfile_hierwitness_cache = smt.hierwitness(topmod, allregs=True, blackbox=True)
|
||||||
|
|
||||||
|
inits, seqs, clocks, mems = ywfile_hierwitness_cache
|
||||||
|
|
||||||
smt_wires = defaultdict(list)
|
smt_wires = defaultdict(list)
|
||||||
smt_mems = defaultdict(list)
|
smt_mems = defaultdict(list)
|
||||||
|
|
Loading…
Reference in a new issue