aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClaire Wolf <clifford@clifford.at>2020-04-23 11:34:19 +0200
committerGitHub <noreply@github.com>2020-04-23 11:34:19 +0200
commitdc9a72bc8d003e4d6cc6b40afbb8b6ce792799c0 (patch)
tree555d624205ce3d23845f3ea6b45cccb8e6abe17a
parent1797c574da8b3e47ca0db56587e5888cf67ab24c (diff)
parent4ee8452d3476862ec9f470c69cfb1a70eb8b6e43 (diff)
downloadyosys-dc9a72bc8d003e4d6cc6b40afbb8b6ce792799c0.tar.gz
yosys-dc9a72bc8d003e4d6cc6b40afbb8b6ce792799c0.tar.bz2
yosys-dc9a72bc8d003e4d6cc6b40afbb8b6ce792799c0.zip
Merge pull request #1989 from boqwxp/qbfsat_anyconst_sourcelocs
qbfsat: Make hole name recovery from source locations more robust.
-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 aa006c680..d99ca1b53 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();
}
}