From: Clifford Wolf Date: Thu, 8 Feb 2018 18:12:12 +0000 (+0100) Subject: Fix handling of zero-length cell connections in SMT2 back-end X-Git-Tag: yosys-0.8~220 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c9672e2e2eaf410c55145262880d1b0eba372193;p=yosys.git Fix handling of zero-length cell connections in SMT2 back-end Signed-off-by: Clifford Wolf --- diff --git a/backends/smt2/smt2.cc b/backends/smt2/smt2.cc index e6e969011..dbbf01843 100644 --- a/backends/smt2/smt2.cc +++ b/backends/smt2/smt2.cc @@ -112,6 +112,8 @@ struct Smt2Worker for (auto cell : module->cells()) for (auto &conn : cell->connections()) { + if (GetSize(conn.second) == 0) + continue; bool is_input = ct.cell_input(cell->type, conn.first); bool is_output = ct.cell_output(cell->type, conn.first); if (is_output && !is_input) @@ -659,6 +661,9 @@ struct Smt2Worker for (auto &conn : cell->connections()) { + if (GetSize(conn.second) == 0) + continue; + Wire *w = m->wire(conn.first); SigSpec sig = sigmap(conn.second); @@ -829,6 +834,9 @@ struct Smt2Worker for (auto &conn : cell->connections()) { + if (GetSize(conn.second) == 0) + continue; + Wire *w = m->wire(conn.first); SigSpec sig = sigmap(conn.second);