Skip to content

Commit

Permalink
Set VHDL assert condition initial state if fed by FF
Browse files Browse the repository at this point in the history
  • Loading branch information
mmicko committed Oct 11, 2024
1 parent 0200a76 commit 8d2b63b
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions frontends/verific/verific.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2142,13 +2142,12 @@ void VerificImporter::import_netlist(RTLIL::Design *design, Netlist *nl, std::ma
if (verific_verbose)
log(" assert condition %s.\n", log_signal(cond));

const char *assume_attr = nullptr; // inst->GetAttValue("assume");

Cell *cell = nullptr;
if (assume_attr != nullptr && !strcmp(assume_attr, "1"))
cell = module->addAssume(new_verific_id(inst), cond, State::S1);
else
cell = module->addAssert(new_verific_id(inst), cond, State::S1);
Cell *cell = module->addAssert(new_verific_id(inst), cond, State::S1);
// Initialize FF feeding condition to 1, in case it is not
// used by rest of design logic, to prevent failing on
// initial uninitialized state
if (cond.is_wire() && !cond.wire->name.isPublic())
cond.wire->attributes[ID::init] = Const(1,1);

import_attributes(cell->attributes, inst);
continue;
Expand Down

0 comments on commit 8d2b63b

Please sign in to comment.