mirror of
https://github.com/YosysHQ/yosys
synced 2025-08-05 10:50:25 +00:00
Improved smtbmc vcd generation performance
This commit is contained in:
parent
dfcd30ea86
commit
de8ee412c3
2 changed files with 40 additions and 20 deletions
|
@ -111,14 +111,16 @@ def write_vcd_model(steps):
|
|||
print("%s Writing model to VCD file." % smt.timestamp())
|
||||
|
||||
vcd = mkvcd(open(vcdfile, "w"))
|
||||
|
||||
for netpath in sorted(smt.hiernets(topmod)):
|
||||
width = len(smt.get_net_bin(topmod, netpath, "s0"))
|
||||
vcd.add_net([topmod] + netpath, width)
|
||||
vcd.add_net([topmod] + netpath, smt.net_width(topmod, netpath))
|
||||
|
||||
for i in range(steps):
|
||||
vcd.set_time(i)
|
||||
for netpath in sorted(smt.hiernets(topmod)):
|
||||
vcd.set_net([topmod] + netpath, smt.get_net_bin(topmod, netpath, "s%d" % i))
|
||||
path_list = sorted(smt.hiernets(topmod))
|
||||
value_list = smt.get_net_bin_list(topmod, path_list, "s%d" % i)
|
||||
for path, value in zip(path_list, value_list):
|
||||
vcd.set_net([topmod] + path, value)
|
||||
|
||||
vcd.set_time(steps)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue