diff options
author | Marcelina KoĆcielnicka <mwk@0x04.net> | 2021-03-01 20:01:39 +0100 |
---|---|---|
committer | Marcelina KoĆcielnicka <mwk@0x04.net> | 2021-03-08 17:03:31 +0100 |
commit | c00a29296c8d3446c7cfe253080c7e33358219b0 (patch) | |
tree | 2f4d1b29b3b5d3791f7ad031dbccb6cc09c6dff2 | |
parent | 760284033d6f255790d44bfcda0d1625a0c7bc87 (diff) | |
download | yosys-c00a29296c8d3446c7cfe253080c7e33358219b0.tar.gz yosys-c00a29296c8d3446c7cfe253080c7e33358219b0.tar.bz2 yosys-c00a29296c8d3446c7cfe253080c7e33358219b0.zip |
sim: Avoid a crash on empty cell connection.
Fixes #2513.
-rw-r--r-- | passes/sat/sim.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/passes/sat/sim.cc b/passes/sat/sim.cc index 3ba66bd33..922be886c 100644 --- a/passes/sat/sim.cc +++ b/passes/sat/sim.cc @@ -271,7 +271,7 @@ struct SimInstance { auto child = children.at(cell); for (auto &conn: cell->connections()) - if (cell->input(conn.first)) { + if (cell->input(conn.first) && GetSize(conn.second)) { Const value = get_state(conn.second); child->set_state(child->module->wire(conn.first), value); } |