mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-13 04:28:18 +00:00
Merge pull request #1989 from boqwxp/qbfsat_anyconst_sourcelocs
qbfsat: Make hole name recovery from source locations more robust.
This commit is contained in:
commit
dc9a72bc8d
|
@ -98,11 +98,8 @@ dict<std::string, std::string> get_hole_loc_name_map(RTLIL::Module *module, cons
|
||||||
for (auto cell : module->cells()) {
|
for (auto cell : module->cells()) {
|
||||||
std::string cell_src = cell->get_src_attribute();
|
std::string cell_src = cell->get_src_attribute();
|
||||||
auto pos = sol.hole_to_value.find(cell_src);
|
auto pos = sol.hole_to_value.find(cell_src);
|
||||||
if (pos != sol.hole_to_value.end()) {
|
if (pos != sol.hole_to_value.end() && cell->type.in("$anyconst", "$anyseq")) {
|
||||||
#ifndef NDEBUG
|
log_assert(hole_loc_to_name.find(pos->first) == hole_loc_to_name.end());
|
||||||
log_assert(cell->type.in("$anyconst", "$anyseq"));
|
|
||||||
log_assert(cell->getPort(ID::Y).is_wire());
|
|
||||||
#endif
|
|
||||||
hole_loc_to_name[pos->first] = cell->getPort(ID::Y).as_wire()->name.str();
|
hole_loc_to_name[pos->first] = cell->getPort(ID::Y).as_wire()->name.str();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue