yowasp-yosys 0.40.0.0.post707__py3-none-any.whl → 0.40.0.68.post721.dev0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- yowasp_yosys/share/include/backends/cxxrtl/runtime/cxxrtl/cxxrtl.h +60 -0
- yowasp_yosys/share/include/backends/cxxrtl/runtime/cxxrtl/cxxrtl_replay.h +3 -2
- yowasp_yosys/share/include/kernel/constids.inc +2 -0
- yowasp_yosys/share/python3/sby_engine_abc.py +10 -0
- yowasp_yosys/share/python3/smtio.py +20 -1
- yowasp_yosys/share/quicklogic/qlf_k6n10f/bram_types_sim.v +1 -1
- yowasp_yosys/smtbmc.py +126 -77
- yowasp_yosys/yosys.wasm +0 -0
- {yowasp_yosys-0.40.0.0.post707.dist-info → yowasp_yosys-0.40.0.68.post721.dev0.dist-info}/METADATA +1 -1
- {yowasp_yosys-0.40.0.0.post707.dist-info → yowasp_yosys-0.40.0.68.post721.dev0.dist-info}/RECORD +13 -13
- {yowasp_yosys-0.40.0.0.post707.dist-info → yowasp_yosys-0.40.0.68.post721.dev0.dist-info}/WHEEL +0 -0
- {yowasp_yosys-0.40.0.0.post707.dist-info → yowasp_yosys-0.40.0.68.post721.dev0.dist-info}/entry_points.txt +0 -0
- {yowasp_yosys-0.40.0.0.post707.dist-info → yowasp_yosys-0.40.0.68.post721.dev0.dist-info}/top_level.txt +0 -0
|
@@ -941,6 +941,55 @@ struct metadata {
|
|
|
941
941
|
assert(value_type == DOUBLE);
|
|
942
942
|
return double_value;
|
|
943
943
|
}
|
|
944
|
+
|
|
945
|
+
// Internal CXXRTL use only.
|
|
946
|
+
static std::map<std::string, metadata> deserialize(const char *ptr) {
|
|
947
|
+
std::map<std::string, metadata> result;
|
|
948
|
+
std::string name;
|
|
949
|
+
// Grammar:
|
|
950
|
+
// string ::= [^\0]+ \0
|
|
951
|
+
// metadata ::= [uid] .{8} | s <string>
|
|
952
|
+
// map ::= ( <string> <metadata> )* \0
|
|
953
|
+
for (;;) {
|
|
954
|
+
if (*ptr) {
|
|
955
|
+
name += *ptr++;
|
|
956
|
+
} else if (!name.empty()) {
|
|
957
|
+
ptr++;
|
|
958
|
+
auto get_u64 = [&]() {
|
|
959
|
+
uint64_t result = 0;
|
|
960
|
+
for (size_t count = 0; count < 8; count++)
|
|
961
|
+
result = (result << 8) | *ptr++;
|
|
962
|
+
return result;
|
|
963
|
+
};
|
|
964
|
+
char type = *ptr++;
|
|
965
|
+
if (type == 'u') {
|
|
966
|
+
uint64_t value = get_u64();
|
|
967
|
+
result.emplace(name, value);
|
|
968
|
+
} else if (type == 'i') {
|
|
969
|
+
int64_t value = (int64_t)get_u64();
|
|
970
|
+
result.emplace(name, value);
|
|
971
|
+
} else if (type == 'd') {
|
|
972
|
+
double dvalue;
|
|
973
|
+
uint64_t uvalue = get_u64();
|
|
974
|
+
static_assert(sizeof(dvalue) == sizeof(uvalue), "double must be 64 bits in size");
|
|
975
|
+
memcpy(&dvalue, &uvalue, sizeof(dvalue));
|
|
976
|
+
result.emplace(name, dvalue);
|
|
977
|
+
} else if (type == 's') {
|
|
978
|
+
std::string value;
|
|
979
|
+
while (*ptr)
|
|
980
|
+
value += *ptr++;
|
|
981
|
+
ptr++;
|
|
982
|
+
result.emplace(name, value);
|
|
983
|
+
} else {
|
|
984
|
+
assert(false && "Unknown type specifier");
|
|
985
|
+
return result;
|
|
986
|
+
}
|
|
987
|
+
name.clear();
|
|
988
|
+
} else {
|
|
989
|
+
return result;
|
|
990
|
+
}
|
|
991
|
+
}
|
|
992
|
+
}
|
|
944
993
|
};
|
|
945
994
|
|
|
946
995
|
typedef std::map<std::string, metadata> metadata_map;
|
|
@@ -1417,6 +1466,12 @@ struct debug_items {
|
|
|
1417
1466
|
});
|
|
1418
1467
|
}
|
|
1419
1468
|
|
|
1469
|
+
// This overload exists to reduce excessive stack slot allocation in `CXXRTL_EXTREMELY_COLD void debug_info()`.
|
|
1470
|
+
template<class... T>
|
|
1471
|
+
void add(const std::string &base_path, const char *path, const char *serialized_item_attrs, T&&... args) {
|
|
1472
|
+
add(base_path + path, debug_item(std::forward<T>(args)...), metadata::deserialize(serialized_item_attrs));
|
|
1473
|
+
}
|
|
1474
|
+
|
|
1420
1475
|
size_t count(const std::string &path) const {
|
|
1421
1476
|
if (table.count(path) == 0)
|
|
1422
1477
|
return 0;
|
|
@@ -1463,6 +1518,11 @@ struct debug_scopes {
|
|
|
1463
1518
|
scope.cell_attrs = std::unique_ptr<debug_attrs>(new debug_attrs { cell_attrs });
|
|
1464
1519
|
}
|
|
1465
1520
|
|
|
1521
|
+
// This overload exists to reduce excessive stack slot allocation in `CXXRTL_EXTREMELY_COLD void debug_info()`.
|
|
1522
|
+
void add(const std::string &base_path, const char *path, const char *module_name, const char *serialized_module_attrs, const char *serialized_cell_attrs) {
|
|
1523
|
+
add(base_path + path, module_name, metadata::deserialize(serialized_module_attrs), metadata::deserialize(serialized_cell_attrs));
|
|
1524
|
+
}
|
|
1525
|
+
|
|
1466
1526
|
size_t contains(const std::string &path) const {
|
|
1467
1527
|
return table.count(path);
|
|
1468
1528
|
}
|
|
@@ -512,9 +512,10 @@ public:
|
|
|
512
512
|
spool &operator=(const spool &) = delete;
|
|
513
513
|
|
|
514
514
|
~spool() {
|
|
515
|
-
|
|
515
|
+
int fd;
|
|
516
|
+
if ((fd = writefd.exchange(-1)) != -1)
|
|
516
517
|
close(fd);
|
|
517
|
-
if (
|
|
518
|
+
if ((fd = readfd.exchange(-1)) != -1)
|
|
518
519
|
close(fd);
|
|
519
520
|
}
|
|
520
521
|
|
|
@@ -69,6 +69,14 @@ def run(mode, task, engine_idx, engine):
|
|
|
69
69
|
if task.opt_aigfolds:
|
|
70
70
|
fold_command += " -s"
|
|
71
71
|
|
|
72
|
+
prep_commands = []
|
|
73
|
+
|
|
74
|
+
for i, arg in reversed(list(enumerate(engine[1:], 1))):
|
|
75
|
+
if arg.endswith(';'):
|
|
76
|
+
prep_commands = engine[1:i + 1]
|
|
77
|
+
engine[1:] = engine[i + 1:]
|
|
78
|
+
break
|
|
79
|
+
|
|
72
80
|
abc_command, custom_options, toggles = abc_getopt(engine[1:], [
|
|
73
81
|
"keep-going",
|
|
74
82
|
])
|
|
@@ -116,6 +124,8 @@ def run(mode, task, engine_idx, engine):
|
|
|
116
124
|
else:
|
|
117
125
|
task.error(f"Invalid ABC command {abc_command[0]}.")
|
|
118
126
|
|
|
127
|
+
abc_command[0:0] = prep_commands
|
|
128
|
+
|
|
119
129
|
smtbmc_vcd = task.opt_vcd and not task.opt_vcd_sim
|
|
120
130
|
run_aigsmt = smtbmc_vcd or (task.opt_append and task.opt_append_assume)
|
|
121
131
|
smtbmc_append = 0
|
|
@@ -160,6 +160,7 @@ class SmtIo:
|
|
|
160
160
|
self.noincr = opts.noincr
|
|
161
161
|
self.info_stmts = opts.info_stmts
|
|
162
162
|
self.nocomments = opts.nocomments
|
|
163
|
+
self.smt2_options.update(opts.smt2_options)
|
|
163
164
|
|
|
164
165
|
else:
|
|
165
166
|
self.solver = "yices"
|
|
@@ -959,6 +960,8 @@ class SmtIo:
|
|
|
959
960
|
return int(self.bv2bin(v), 2)
|
|
960
961
|
|
|
961
962
|
def get_raw_unsat_assumptions(self):
|
|
963
|
+
if not self.smt2_assumptions:
|
|
964
|
+
return []
|
|
962
965
|
self.write("(get-unsat-assumptions)")
|
|
963
966
|
exprs = set(self.unparse(part) for part in self.parse(self.read()))
|
|
964
967
|
unsat_assumptions = []
|
|
@@ -973,6 +976,10 @@ class SmtIo:
|
|
|
973
976
|
def get_unsat_assumptions(self, minimize=False):
|
|
974
977
|
if not minimize:
|
|
975
978
|
return self.get_raw_unsat_assumptions()
|
|
979
|
+
orig_assumptions = self.smt2_assumptions
|
|
980
|
+
|
|
981
|
+
self.smt2_assumptions = dict(orig_assumptions)
|
|
982
|
+
|
|
976
983
|
required_assumptions = {}
|
|
977
984
|
|
|
978
985
|
while True:
|
|
@@ -998,6 +1005,7 @@ class SmtIo:
|
|
|
998
1005
|
required_assumptions[candidate_key] = candidate_assume
|
|
999
1006
|
|
|
1000
1007
|
if candidate_assumptions is not None:
|
|
1008
|
+
self.smt2_assumptions = orig_assumptions
|
|
1001
1009
|
return list(required_assumptions)
|
|
1002
1010
|
|
|
1003
1011
|
def get(self, expr):
|
|
@@ -1146,7 +1154,7 @@ class SmtIo:
|
|
|
1146
1154
|
class SmtOpts:
|
|
1147
1155
|
def __init__(self):
|
|
1148
1156
|
self.shortopts = "s:S:v"
|
|
1149
|
-
self.longopts = ["unroll", "noincr", "noprogress", "timeout=", "dump-smt2=", "logic=", "dummy=", "info=", "nocomments"]
|
|
1157
|
+
self.longopts = ["unroll", "noincr", "noprogress", "timeout=", "dump-smt2=", "logic=", "dummy=", "info=", "nocomments", "smt2-option="]
|
|
1150
1158
|
self.solver = "yices"
|
|
1151
1159
|
self.solver_opts = list()
|
|
1152
1160
|
self.debug_print = False
|
|
@@ -1159,6 +1167,7 @@ class SmtOpts:
|
|
|
1159
1167
|
self.logic = None
|
|
1160
1168
|
self.info_stmts = list()
|
|
1161
1169
|
self.nocomments = False
|
|
1170
|
+
self.smt2_options = {}
|
|
1162
1171
|
|
|
1163
1172
|
def handle(self, o, a):
|
|
1164
1173
|
if o == "-s":
|
|
@@ -1185,6 +1194,13 @@ class SmtOpts:
|
|
|
1185
1194
|
self.info_stmts.append(a)
|
|
1186
1195
|
elif o == "--nocomments":
|
|
1187
1196
|
self.nocomments = True
|
|
1197
|
+
elif o == "--smt2-option":
|
|
1198
|
+
args = a.split('=', 1)
|
|
1199
|
+
if len(args) != 2:
|
|
1200
|
+
print("--smt2-option expects an <option>=<value> argument")
|
|
1201
|
+
sys.exit(1)
|
|
1202
|
+
option, value = args
|
|
1203
|
+
self.smt2_options[option] = value
|
|
1188
1204
|
else:
|
|
1189
1205
|
return False
|
|
1190
1206
|
return True
|
|
@@ -1208,6 +1224,9 @@ class SmtOpts:
|
|
|
1208
1224
|
if solver is "dummy", read solver output from that file
|
|
1209
1225
|
otherwise: write solver output to that file
|
|
1210
1226
|
|
|
1227
|
+
--smt2-option <option>=<value>
|
|
1228
|
+
enable an SMT-LIBv2 option.
|
|
1229
|
+
|
|
1211
1230
|
-v
|
|
1212
1231
|
enable debug output
|
|
1213
1232
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// **AUTOGENERATED FILE** **DO NOT EDIT**
|
|
2
|
-
// Generated by ../yosys-src/techlibs/quicklogic/qlf_k6n10f/generate_bram_types_sim.py at 2024-
|
|
2
|
+
// Generated by ../yosys-src/techlibs/quicklogic/qlf_k6n10f/generate_bram_types_sim.py at 2024-05-08 05:20:44.526176+00:00
|
|
3
3
|
`timescale 1ns /10ps
|
|
4
4
|
|
|
5
5
|
module TDP36K_BRAM_A_X1_B_X1_nonsplit (
|
yowasp_yosys/smtbmc.py
CHANGED
|
@@ -199,7 +199,6 @@ def help():
|
|
|
199
199
|
|
|
200
200
|
--minimize-assumes
|
|
201
201
|
when using --track-assumes, solve for a minimal set of sufficient assumptions.
|
|
202
|
-
|
|
203
202
|
""" + so.helpmsg())
|
|
204
203
|
|
|
205
204
|
def usage():
|
|
@@ -670,18 +669,12 @@ if aimfile is not None:
|
|
|
670
669
|
|
|
671
670
|
ywfile_hierwitness_cache = None
|
|
672
671
|
|
|
673
|
-
def
|
|
672
|
+
def ywfile_hierwitness():
|
|
674
673
|
global ywfile_hierwitness_cache
|
|
675
|
-
if
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
with open(inywfile, "r") as f:
|
|
679
|
-
inyw = ReadWitness(f)
|
|
680
|
-
|
|
681
|
-
if ywfile_hierwitness_cache is None:
|
|
682
|
-
ywfile_hierwitness_cache = smt.hierwitness(topmod, allregs=True, blackbox=True)
|
|
674
|
+
if ywfile_hierwitness_cache is None:
|
|
675
|
+
ywfile_hierwitness = smt.hierwitness(topmod, allregs=True, blackbox=True)
|
|
683
676
|
|
|
684
|
-
inits, seqs, clocks, mems =
|
|
677
|
+
inits, seqs, clocks, mems = ywfile_hierwitness
|
|
685
678
|
|
|
686
679
|
smt_wires = defaultdict(list)
|
|
687
680
|
smt_mems = defaultdict(list)
|
|
@@ -692,91 +685,147 @@ def ywfile_constraints(inywfile, constr_assumes, map_steps=None, skip_x=False):
|
|
|
692
685
|
for mem in mems:
|
|
693
686
|
smt_mems[mem["path"]].append(mem)
|
|
694
687
|
|
|
695
|
-
|
|
696
|
-
bits_re = re.compile(r'[01?]*$')
|
|
688
|
+
ywfile_hierwitness_cache = inits, seqs, clocks, mems, smt_wires, smt_mems
|
|
697
689
|
|
|
698
|
-
|
|
690
|
+
return ywfile_hierwitness_cache
|
|
699
691
|
|
|
700
|
-
|
|
701
|
-
present_signals, missing = step.present_signals(inyw.sigmap)
|
|
702
|
-
for sig in present_signals:
|
|
703
|
-
bits = step[sig]
|
|
704
|
-
if skip_x:
|
|
705
|
-
bits = bits.replace('x', '?')
|
|
706
|
-
if not bits_re.match(bits):
|
|
707
|
-
raise ValueError("unsupported bit value in Yosys witness file")
|
|
692
|
+
def_bits_re = re.compile(r'([01]+)')
|
|
708
693
|
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
width, offset = wire["width"], wire["offset"]
|
|
694
|
+
def smt_extract_mask(smt_expr, mask):
|
|
695
|
+
chunks = []
|
|
696
|
+
def_bits = ''
|
|
713
697
|
|
|
714
|
-
|
|
698
|
+
mask_index_order = mask[::-1]
|
|
715
699
|
|
|
716
|
-
|
|
700
|
+
for matched in def_bits_re.finditer(mask_index_order):
|
|
701
|
+
chunks.append(matched.span())
|
|
702
|
+
def_bits += matched[0]
|
|
717
703
|
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
common_end = min(sig_end, end)
|
|
721
|
-
if common_end <= common_offset:
|
|
722
|
-
continue
|
|
704
|
+
if not chunks:
|
|
705
|
+
return
|
|
723
706
|
|
|
724
|
-
|
|
707
|
+
if len(chunks) == 1:
|
|
708
|
+
start, end = chunks[0]
|
|
709
|
+
if start == 0 and end == len(mask_index_order):
|
|
710
|
+
combined_chunks = smt_expr
|
|
711
|
+
else:
|
|
712
|
+
combined_chunks = '((_ extract %d %d) %s)' % (end - 1, start, smt_expr)
|
|
713
|
+
else:
|
|
714
|
+
combined_chunks = '(let ((x %s)) (concat %s))' % (smt_expr, ' '.join(
|
|
715
|
+
'((_ extract %d %d) x)' % (end - 1, start)
|
|
716
|
+
for start, end in reversed(chunks)
|
|
717
|
+
))
|
|
725
718
|
|
|
726
|
-
|
|
727
|
-
slice_high = common_end - offset - 1
|
|
728
|
-
slice_low = common_offset - offset
|
|
729
|
-
smt_expr = "((_ extract %d %d) %s)" % (slice_high, slice_low, smt_expr)
|
|
719
|
+
return combined_chunks, ''.join(mask_index_order[start:end] for start, end in chunks)[::-1]
|
|
730
720
|
|
|
731
|
-
|
|
721
|
+
def smt_concat(exprs):
|
|
722
|
+
if not exprs:
|
|
723
|
+
return ""
|
|
724
|
+
if len(exprs) == 1:
|
|
725
|
+
return exprs[1]
|
|
726
|
+
return "(concat %s)" % ' '.join(exprs)
|
|
732
727
|
|
|
733
|
-
|
|
734
|
-
|
|
728
|
+
def ywfile_signal(sig, step, mask=None):
|
|
729
|
+
assert sig.width > 0
|
|
735
730
|
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
smt_constr = "(= %s %s)" % (smt_expr, "true" if bit_slice == "1" else "false")
|
|
739
|
-
else:
|
|
740
|
-
if "?" in bit_slice:
|
|
741
|
-
mask = bit_slice.replace("0", "1").replace("?", "0")
|
|
742
|
-
bit_slice = bit_slice.replace("?", "0")
|
|
743
|
-
smt_expr = "(bvand %s #b%s)" % (smt_expr, mask)
|
|
731
|
+
inits, seqs, clocks, mems, smt_wires, smt_mems = ywfile_hierwitness()
|
|
732
|
+
sig_end = sig.offset + sig.width
|
|
744
733
|
|
|
745
|
-
|
|
734
|
+
output = []
|
|
746
735
|
|
|
747
|
-
|
|
736
|
+
if sig.path in smt_wires:
|
|
737
|
+
for wire in smt_wires[sig.path]:
|
|
738
|
+
width, offset = wire["width"], wire["offset"]
|
|
748
739
|
|
|
749
|
-
|
|
750
|
-
if sig.memory_path in smt_mems:
|
|
751
|
-
for mem in smt_mems[sig.memory_path]:
|
|
752
|
-
width, size, bv = mem["width"], mem["size"], mem["statebv"]
|
|
740
|
+
smt_bool = smt.net_width(topmod, wire["smtpath"]) == 1
|
|
753
741
|
|
|
754
|
-
|
|
742
|
+
offset = max(offset, 0)
|
|
755
743
|
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
addr_width = (size - 1).bit_length()
|
|
762
|
-
addr_bits = f"{sig.memory_addr:0{addr_width}b}"
|
|
763
|
-
smt_expr = "(select %s #b%s )" % (smt_expr, addr_bits)
|
|
744
|
+
end = width + offset
|
|
745
|
+
common_offset = max(sig.offset, offset)
|
|
746
|
+
common_end = min(sig_end, end)
|
|
747
|
+
if common_end <= common_offset:
|
|
748
|
+
continue
|
|
764
749
|
|
|
765
|
-
|
|
766
|
-
slice_high = sig.offset + len(bits) - 1
|
|
767
|
-
smt_expr = "((_ extract %d %d) %s)" % (slice_high, sig.offset, smt_expr)
|
|
750
|
+
smt_expr = smt.witness_net_expr(topmod, f"s{step}", wire)
|
|
768
751
|
|
|
769
|
-
|
|
752
|
+
if not smt_bool:
|
|
753
|
+
slice_high = common_end - offset - 1
|
|
754
|
+
slice_low = common_offset - offset
|
|
755
|
+
smt_expr = "((_ extract %d %d) %s)" % (slice_high, slice_low, smt_expr)
|
|
756
|
+
else:
|
|
757
|
+
smt_expr = "(ite %s #b1 #b0)" % smt_expr
|
|
770
758
|
|
|
771
|
-
|
|
772
|
-
mask = bit_slice.replace("0", "1").replace("?", "0")
|
|
773
|
-
bit_slice = bit_slice.replace("?", "0")
|
|
774
|
-
smt_expr = "(bvand %s #b%s)" % (smt_expr, mask)
|
|
759
|
+
output.append(((common_offset - sig.offset), (common_end - sig.offset), smt_expr))
|
|
775
760
|
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
761
|
+
if sig.memory_path:
|
|
762
|
+
if sig.memory_path in smt_mems:
|
|
763
|
+
for mem in smt_mems[sig.memory_path]:
|
|
764
|
+
width, size, bv = mem["width"], mem["size"], mem["statebv"]
|
|
765
|
+
|
|
766
|
+
smt_expr = smt.net_expr(topmod, f"s{step}", mem["smtpath"])
|
|
767
|
+
|
|
768
|
+
if bv:
|
|
769
|
+
word_low = sig.memory_addr * width
|
|
770
|
+
word_high = word_low + width - 1
|
|
771
|
+
smt_expr = "((_ extract %d %d) %s)" % (word_high, word_low, smt_expr)
|
|
772
|
+
else:
|
|
773
|
+
addr_width = (size - 1).bit_length()
|
|
774
|
+
addr_bits = f"{sig.memory_addr:0{addr_width}b}"
|
|
775
|
+
smt_expr = "(select %s #b%s )" % (smt_expr, addr_bits)
|
|
776
|
+
|
|
777
|
+
if sig.width < width:
|
|
778
|
+
slice_high = sig.offset + sig.width - 1
|
|
779
|
+
smt_expr = "((_ extract %d %d) %s)" % (slice_high, sig.offset, smt_expr)
|
|
779
780
|
|
|
781
|
+
output.append((0, sig.width, smt_expr))
|
|
782
|
+
|
|
783
|
+
output.sort()
|
|
784
|
+
|
|
785
|
+
output = [chunk for chunk in output if chunk[0] != chunk[1]]
|
|
786
|
+
|
|
787
|
+
pos = 0
|
|
788
|
+
|
|
789
|
+
for start, end, smt_expr in output:
|
|
790
|
+
assert start == pos
|
|
791
|
+
pos = end
|
|
792
|
+
|
|
793
|
+
assert pos == sig.width
|
|
794
|
+
|
|
795
|
+
if len(output) == 1:
|
|
796
|
+
return output[0][-1]
|
|
797
|
+
return smt_concat(smt_expr for start, end, smt_expr in reversed(output))
|
|
798
|
+
|
|
799
|
+
def ywfile_constraints(inywfile, constr_assumes, map_steps=None, skip_x=False):
|
|
800
|
+
global ywfile_hierwitness_cache
|
|
801
|
+
if map_steps is None:
|
|
802
|
+
map_steps = {}
|
|
803
|
+
|
|
804
|
+
with open(inywfile, "r") as f:
|
|
805
|
+
inyw = ReadWitness(f)
|
|
806
|
+
|
|
807
|
+
inits, seqs, clocks, mems, smt_wires, smt_mems = ywfile_hierwitness()
|
|
808
|
+
|
|
809
|
+
bits_re = re.compile(r'[01?]*$')
|
|
810
|
+
max_t = -1
|
|
811
|
+
|
|
812
|
+
for t, step in inyw.steps():
|
|
813
|
+
present_signals, missing = step.present_signals(inyw.sigmap)
|
|
814
|
+
for sig in present_signals:
|
|
815
|
+
bits = step[sig]
|
|
816
|
+
if skip_x:
|
|
817
|
+
bits = bits.replace('x', '?')
|
|
818
|
+
if not bits_re.match(bits):
|
|
819
|
+
raise ValueError("unsupported bit value in Yosys witness file")
|
|
820
|
+
|
|
821
|
+
smt_expr = ywfile_signal(sig, map_steps.get(t, t))
|
|
822
|
+
|
|
823
|
+
smt_expr, bits = smt_extract_mask(smt_expr, bits)
|
|
824
|
+
|
|
825
|
+
smt_constr = "(= %s #b%s)" % (smt_expr, bits)
|
|
826
|
+
constr_assumes[t].append((inywfile, smt_constr))
|
|
827
|
+
|
|
828
|
+
max_t = t
|
|
780
829
|
return max_t
|
|
781
830
|
|
|
782
831
|
if inywfile is not None:
|
|
@@ -1367,11 +1416,11 @@ def write_yw_trace(steps, index, allregs=False, filename=None):
|
|
|
1367
1416
|
|
|
1368
1417
|
exprs.extend(smt.witness_net_expr(topmod, f"s{k}", sig) for sig in sigs)
|
|
1369
1418
|
|
|
1370
|
-
all_sigs.append(sigs)
|
|
1419
|
+
all_sigs.append((step_values, sigs))
|
|
1371
1420
|
|
|
1372
1421
|
bvs = iter(smt.get_list(exprs))
|
|
1373
1422
|
|
|
1374
|
-
for sigs in all_sigs:
|
|
1423
|
+
for (step_values, sigs) in all_sigs:
|
|
1375
1424
|
for sig in sigs:
|
|
1376
1425
|
value = smt.bv2bin(next(bvs))
|
|
1377
1426
|
step_values[sig["sig"]] = value
|
yowasp_yosys/yosys.wasm
CHANGED
|
Binary file
|
{yowasp_yosys-0.40.0.0.post707.dist-info → yowasp_yosys-0.40.0.68.post721.dev0.dist-info}/RECORD
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
yowasp_yosys/__init__.py,sha256=x--xPTzLWZNoX6H0B2E3a1HMZMk3di10gVnWVLJ92xc,1325
|
|
2
2
|
yowasp_yosys/sby.py,sha256=5T0BrIqJ5vobWMd9nOEClXq0rlRxCXNPYycGGS0l7zc,18414
|
|
3
|
-
yowasp_yosys/smtbmc.py,sha256=
|
|
3
|
+
yowasp_yosys/smtbmc.py,sha256=ZYbKxnxP3rGyGa_X6yiH3bevZ2YIUNqzeak4_VT9NWc,73594
|
|
4
4
|
yowasp_yosys/witness.py,sha256=m3iV2Nydm0p4G79VRaaX3lGul-nGnuxeKnx20MCJgi0,17279
|
|
5
|
-
yowasp_yosys/yosys.wasm,sha256=
|
|
5
|
+
yowasp_yosys/yosys.wasm,sha256=lN4X0G0S8goHT836Q1fuOiLgeTDTJ-meCqwhlyFpg5I,21916673
|
|
6
6
|
yowasp_yosys/share/abc9_map.v,sha256=uWDqMpBQTeeadH1BlHVwkCy2StKF892xbgBgMKLK5-w,923
|
|
7
7
|
yowasp_yosys/share/abc9_model.v,sha256=IfMyEGOEUBdZyiVule0wMhrVYVYQpmSIcxygbgtHItI,653
|
|
8
8
|
yowasp_yosys/share/abc9_unmap.v,sha256=w107Y3iJjMU6D_6_aYLf2NziXTnAhpa5_CFAwaYO1iU,638
|
|
@@ -102,8 +102,8 @@ yowasp_yosys/share/ice40/ff_map.v,sha256=0ikq-i1_UVT6xuFLMj2Zfilwu6wz8oibMdtPegZ
|
|
|
102
102
|
yowasp_yosys/share/ice40/latches_map.v,sha256=V5NwBaIML68eOlhDaUJUs8W-ggRePjPsDtUn3mnSpao,258
|
|
103
103
|
yowasp_yosys/share/ice40/spram.txt,sha256=dCRV0flfJunvnvKV0Q5Kq5NBrhh_PkZGXvUt675aiIk,153
|
|
104
104
|
yowasp_yosys/share/ice40/spram_map.v,sha256=O8fRkVuH1dgAXEAtYJgh8wTHnZEK75fPAMBI-PgYVqs,475
|
|
105
|
-
yowasp_yosys/share/include/backends/cxxrtl/runtime/cxxrtl/cxxrtl.h,sha256=
|
|
106
|
-
yowasp_yosys/share/include/backends/cxxrtl/runtime/cxxrtl/cxxrtl_replay.h,sha256=
|
|
105
|
+
yowasp_yosys/share/include/backends/cxxrtl/runtime/cxxrtl/cxxrtl.h,sha256=DsdKdMvjVtLhCR0tRm8DuzX0IEeX7C9s6Q-OOMjsQa0,72324
|
|
106
|
+
yowasp_yosys/share/include/backends/cxxrtl/runtime/cxxrtl/cxxrtl_replay.h,sha256=3bFAy3nYtaH4MsLI9Kvf88K6BYOkML8plDMxmPtPdss,30008
|
|
107
107
|
yowasp_yosys/share/include/backends/cxxrtl/runtime/cxxrtl/cxxrtl_time.h,sha256=6zIxuXG7bXy5UWe7WuA_KQHiwV7VWvcsNecwOPAL_bU,6174
|
|
108
108
|
yowasp_yosys/share/include/backends/cxxrtl/runtime/cxxrtl/cxxrtl_vcd.h,sha256=F2N7FdVUFoOu089dZIBgIT2mmn22QAj0717d26oVPpc,8488
|
|
109
109
|
yowasp_yosys/share/include/backends/cxxrtl/runtime/cxxrtl/capi/cxxrtl_capi.cc,sha256=PaxuEg0ZK7anL1qsyjJuf-5nxn4GfMIegCPjyT5e-Sw,4549
|
|
@@ -119,7 +119,7 @@ yowasp_yosys/share/include/kernel/cellaigs.h,sha256=11wsrdUcxECKpVzln4AaBgyh_QU1
|
|
|
119
119
|
yowasp_yosys/share/include/kernel/celledges.h,sha256=fF_sHJOpN_qQ1P0x8KKoJE9ulDMusfjkF0dBpTMs19E,2216
|
|
120
120
|
yowasp_yosys/share/include/kernel/celltypes.h,sha256=eUTCXzeOBYZikLkfmvrdZmlrwqn1BEVLjYIlLW3UphU,18323
|
|
121
121
|
yowasp_yosys/share/include/kernel/consteval.h,sha256=dHXfaHnD0v94entOfWlmo5u3QhVF8knnn4ETcHiL4PI,10913
|
|
122
|
-
yowasp_yosys/share/include/kernel/constids.inc,sha256=
|
|
122
|
+
yowasp_yosys/share/include/kernel/constids.inc,sha256=kHG_xquUFK2Dodiro0wT-q5QTM5cp_poQ4wFkMiL6mk,3568
|
|
123
123
|
yowasp_yosys/share/include/kernel/cost.h,sha256=4f29ZI-4GhsPrI73TNZ89KqtTt7fo48GlWs3U-WA-tQ,3104
|
|
124
124
|
yowasp_yosys/share/include/kernel/ff.h,sha256=Rm9a6qsbXTPADi3TG794tzYXjOvRkewNMy8AXMA5vtE,7574
|
|
125
125
|
yowasp_yosys/share/include/kernel/ffinit.h,sha256=2kcOTgBDxCsCongoGYFPgnFXZugY34WZBDCN2xIHv8M,3473
|
|
@@ -221,7 +221,7 @@ yowasp_yosys/share/python3/sby_autotune.py,sha256=OvrwQKPK-3s_xGpQRj6SP238h97ma1
|
|
|
221
221
|
yowasp_yosys/share/python3/sby_cmdline.py,sha256=smwh_vUjRnclYGXMfFD4Bt9C1l3G0oBUPPvCWi_5-Lw,5074
|
|
222
222
|
yowasp_yosys/share/python3/sby_core.py,sha256=gO6QmiGuYVUEIOZL6FpW8jOPqD2S6pIWTF-Svc5JQqE,60212
|
|
223
223
|
yowasp_yosys/share/python3/sby_design.py,sha256=5IbfwvGBkGeMuv7BcCd9eokYv989EHvw3eT3T22xPSw,9351
|
|
224
|
-
yowasp_yosys/share/python3/sby_engine_abc.py,sha256=
|
|
224
|
+
yowasp_yosys/share/python3/sby_engine_abc.py,sha256=CAn4bm2Re2RYwD6F6w4dXauVvoIQyVz3Qh56lI_kJQc,9428
|
|
225
225
|
yowasp_yosys/share/python3/sby_engine_aiger.py,sha256=wq4IipN00G3_gj0Kq4UhywV5uB3UhYH-E6Uoqry70Q8,9073
|
|
226
226
|
yowasp_yosys/share/python3/sby_engine_btor.py,sha256=ulUhsJRm7UjMiMwb4Jk6aRQVI_RJN1B6iqQD7MMp8uw,11088
|
|
227
227
|
yowasp_yosys/share/python3/sby_engine_smtbmc.py,sha256=OKwrPTqSgC2ms1rqTMe9Cb53sa_Cy9ImJ-RyBtAs6hs,11979
|
|
@@ -232,7 +232,7 @@ yowasp_yosys/share/python3/sby_mode_live.py,sha256=jpINzeD4tEZDhsVORbfg3tIXZbA5z
|
|
|
232
232
|
yowasp_yosys/share/python3/sby_mode_prove.py,sha256=igQAoaxEfO6SSXNm8PeIYV1qWLC9os96V1m7FHAJVKo,1941
|
|
233
233
|
yowasp_yosys/share/python3/sby_sim.py,sha256=HWSLhMOv1RrNXVrmgsibBTf3lHUHUNaAhfnBF2Wx9Bc,4403
|
|
234
234
|
yowasp_yosys/share/python3/sby_status.py,sha256=g__ivZ0bHmqrJLG_zx0LcFOe3E5O5yV34HhG9uvZo4Q,10946
|
|
235
|
-
yowasp_yosys/share/python3/smtio.py,sha256=
|
|
235
|
+
yowasp_yosys/share/python3/smtio.py,sha256=ewCkiRyTqBRe8yEj-3BAlvwzSUfLA2UMjh_d4kug1n8,48779
|
|
236
236
|
yowasp_yosys/share/python3/ywio.py,sha256=F3V-lAn7GNAlDh8oO3VtLJbQd3LwJZyrq3qjZVW_A_4,12442
|
|
237
237
|
yowasp_yosys/share/quicklogic/common/cells_sim.v,sha256=XjVURrz_kgf2n32Mq9KKUXAbmKJsazqS87PiznC75Ew,366
|
|
238
238
|
yowasp_yosys/share/quicklogic/pp3/abc9_map.v,sha256=wRzXyD70RDkif2ytEgvL2rmPU7mrNmISDB71YgfnHxw,771
|
|
@@ -245,7 +245,7 @@ yowasp_yosys/share/quicklogic/pp3/latches_map.v,sha256=UrGzRlwwITwA7mMlXhHlDFPiw
|
|
|
245
245
|
yowasp_yosys/share/quicklogic/pp3/lut_map.v,sha256=BmijMS4EqVQPP2BPo2zgKStKPPhRLTf5kbcAtGKZEVs,928
|
|
246
246
|
yowasp_yosys/share/quicklogic/qlf_k6n10f/TDP18K_FIFO.v,sha256=k1AVrwpOQ3vpxoWAbchRpmNbncYCYtVfDExz6VcmtBg,10404
|
|
247
247
|
yowasp_yosys/share/quicklogic/qlf_k6n10f/arith_map.v,sha256=Ea7aX3l71nFxP1Az5NHtca-ZPnQmUmUvlWI-tVl4Bkk,2560
|
|
248
|
-
yowasp_yosys/share/quicklogic/qlf_k6n10f/bram_types_sim.v,sha256=
|
|
248
|
+
yowasp_yosys/share/quicklogic/qlf_k6n10f/bram_types_sim.v,sha256=khaEKPbipSvt04NUbLTn_g3C97yA0etni3qXSvpEzC8,2551774
|
|
249
249
|
yowasp_yosys/share/quicklogic/qlf_k6n10f/brams_map.v,sha256=Iqj4w3Vna6W80liLUtDhAQKwciQNZWX3aFr9FDBU5o4,103558
|
|
250
250
|
yowasp_yosys/share/quicklogic/qlf_k6n10f/brams_sim.v,sha256=mJXEws9AvJLeUBr3eJzxTEvN7Y89zpkNsoR2tpjLu-w,339634
|
|
251
251
|
yowasp_yosys/share/quicklogic/qlf_k6n10f/cells_sim.v,sha256=70GVgjrXbld6c2yITFriyoJLqO8CAcHDyA8oUPfkItg,7347
|
|
@@ -294,8 +294,8 @@ yowasp_yosys/share/xilinx/xc5v_dsp_map.v,sha256=I4lg0RQ54fBBba_7NNvUgwS4tQ1yLIsU
|
|
|
294
294
|
yowasp_yosys/share/xilinx/xc6s_dsp_map.v,sha256=gTxHocB-Dn5G4BplWgri_tLhT6DIO2S0X-yu4iBKYyk,562
|
|
295
295
|
yowasp_yosys/share/xilinx/xc7_dsp_map.v,sha256=zrzreQi7mElrAMtrayxtiO_Bw00S6zsjSjSVcjmJPH0,884
|
|
296
296
|
yowasp_yosys/share/xilinx/xcu_dsp_map.v,sha256=gzCgl1emrHGcigVmU0nP0pW7dlhQ01SaWwXzHHcqt-o,882
|
|
297
|
-
yowasp_yosys-0.40.0.
|
|
298
|
-
yowasp_yosys-0.40.0.
|
|
299
|
-
yowasp_yosys-0.40.0.
|
|
300
|
-
yowasp_yosys-0.40.0.
|
|
301
|
-
yowasp_yosys-0.40.0.
|
|
297
|
+
yowasp_yosys-0.40.0.68.post721.dev0.dist-info/METADATA,sha256=xHeJU965qTAw5HOKAwNc5PlWTeA8NrsCa3aexM_EZOg,2613
|
|
298
|
+
yowasp_yosys-0.40.0.68.post721.dev0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
299
|
+
yowasp_yosys-0.40.0.68.post721.dev0.dist-info/entry_points.txt,sha256=p_9sIVi2ZqsqgYYo14PywYkwHYTa76fMEq3LxweXJpc,220
|
|
300
|
+
yowasp_yosys-0.40.0.68.post721.dev0.dist-info/top_level.txt,sha256=_yiNT8kLYkcD1TEuUCzQ_MkON1c3xuIRV59zXds4zd4,13
|
|
301
|
+
yowasp_yosys-0.40.0.68.post721.dev0.dist-info/RECORD,,
|
{yowasp_yosys-0.40.0.0.post707.dist-info → yowasp_yosys-0.40.0.68.post721.dev0.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|