aboutsummaryrefslogtreecommitdiffstats
path: root/passes/sat
diff options
context:
space:
mode:
authorAlberto Gonzalez <boqwxp@airmail.cc>2020-04-23 05:42:18 +0000
committerAlberto Gonzalez <boqwxp@airmail.cc>2020-04-23 05:45:44 +0000
commit4ee8452d3476862ec9f470c69cfb1a70eb8b6e43 (patch)
treee95c04cedf4e2ae69f02d5828560b9dccfe6609f /passes/sat
parentfa9df06c9dc5ead43645ba973e2ca8c63adfb29d (diff)
downloadyosys-4ee8452d3476862ec9f470c69cfb1a70eb8b6e43.tar.gz
yosys-4ee8452d3476862ec9f470c69cfb1a70eb8b6e43.tar.bz2
yosys-4ee8452d3476862ec9f470c69cfb1a70eb8b6e43.zip
qbfsat: Make hole name recovery more robust. Allow multiple cell types to share the same source location as long as only one `$anyconst` or `$anyseq` has that location.
Diffstat (limited to 'passes/sat')
-rw-r--r--passes/sat/qbfsat.cc7
1 files changed, 2 insertions, 5 deletions
diff --git a/passes/sat/qbfsat.cc b/passes/sat/qbfsat.cc
index 981271770..e9b4913cd 100644
--- a/passes/sat/qbfsat.cc
+++ b/passes/sat/qbfsat.cc
@@ -98,11 +98,8 @@ dict<std::string, std::string> get_hole_loc_name_map(RTLIL::Module *module, cons
for (auto cell : module->cells()) {
std::string cell_src = cell->get_src_attribute();
auto pos = sol.hole_to_value.find(cell_src);
- if (pos != sol.hole_to_value.end()) {
-#ifndef NDEBUG
- log_assert(cell->type.in("$anyconst", "$anyseq"));
- log_assert(cell->getPort(ID::Y).is_wire());
-#endif
+ if (pos != sol.hole_to_value.end() && cell->type.in("$anyconst", "$anyseq")) {
+ log_assert(hole_loc_to_name.find(pos->first) == hole_loc_to_name.end());
hole_loc_to_name[pos->first] = cell->getPort(ID::Y).as_wire()->name.str();
}
}