3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-23 09:05:32 +00:00

Merge pull request #1976 from YosysHQ/dave/fix-sim-const

sim: Fix handling of constant-connected cell inputs at startup
This commit is contained in:
Claire Wolf 2020-04-22 16:57:34 +02:00 committed by GitHub
commit c32b4bded5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 1 deletions

View file

@ -128,8 +128,12 @@ struct SimInstance
for (auto &port : cell->connections()) {
if (cell->input(port.first))
for (auto bit : sigmap(port.second))
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);
}
}
if (cell->type.in(ID($dff))) {