smt2: Check for constant bool after fully resolving signal

* This fixes #3769
This commit is contained in:
George Rennie 2023-09-24 12:40:41 +01:00
parent 934c82254d
commit f6f85f475b
1 changed files with 5 additions and 4 deletions

View File

@ -329,13 +329,14 @@ struct Smt2Worker
{
sigmap.apply(bit);
if (bit_driver.count(bit)) {
export_cell(bit_driver.at(bit));
sigmap.apply(bit);
}
if (bit.wire == nullptr)
return bit == RTLIL::State::S1 ? "true" : "false";
if (bit_driver.count(bit))
export_cell(bit_driver.at(bit));
sigmap.apply(bit);
if (fcache.count(bit) == 0) {
if (verbose) log("%*s-> external bool: %s\n", 2+2*GetSize(recursive_cells), "",
log_signal(bit));