Skip to content

Commit

Permalink
smt2: Check for constant bool after fully resolving signal
Browse files Browse the repository at this point in the history
* This fixes #3769
  • Loading branch information
georgerennie committed Sep 24, 2023
1 parent 934c822 commit f6f85f4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions backends/smt2/smt2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit f6f85f4

Please sign in to comment.