3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-12 04:03:45 +00:00
This commit is contained in:
Martin Povišer 2025-04-04 04:08:16 +13:00 committed by GitHub
commit e7cf4ac689
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -301,16 +301,18 @@ struct SimInstance
if (mod != nullptr) {
dirty_children.insert(new SimInstance(shared, scope + "." + RTLIL::unescape_id(cell->name), mod, cell, this));
}
for (auto &port : cell->connections()) {
} else {
for (auto &port : cell->connections())
if (cell->input(port.first))
for (auto bit : sigmap(port.second)) {
upd_cells[bit].insert(cell);
// Make sure cell inputs connected to constants are updated in the first cycle
if (bit.wire == nullptr)
dirty_bits.insert(bit);
}
for (auto bit : sigmap(port.second))
upd_cells[bit].insert(cell);
// Update all cells in the first cycle (to propagate constants but also to
// handle edge cases in which cells have defined output values in presence of
// undefined inputs). This is with the exception of few cells which don't have
// any inputs and should never be queued up for updating.
if (!cell->type.in(ID($initstate), ID($anyconst), ID($anyseq), ID($allconst), ID($allseq)))
dirty_cells.insert(cell);
}
if (RTLIL::builtin_ff_cell_types().count(cell->type) || cell->type == ID($anyinit)) {
@ -507,6 +509,8 @@ struct SimInstance
void update_cell(Cell *cell)
{
log_assert(!cell->type.in(ID($initstate), ID($anyconst), ID($anyseq), ID($allconst), ID($allseq)));
if (ff_database.count(cell))
return;