From: Marcelina Koƛcielnicka Date: Mon, 1 Mar 2021 19:01:39 +0000 (+0100) Subject: sim: Avoid a crash on empty cell connection. X-Git-Tag: working-ls180~3 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c00a29296c8d3446c7cfe253080c7e33358219b0;p=yosys.git sim: Avoid a crash on empty cell connection. Fixes #2513. --- 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); }