From c9672e2e2eaf410c55145262880d1b0eba372193 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Thu, 8 Feb 2018 19:12:12 +0100 Subject: [PATCH] Fix handling of zero-length cell connections in SMT2 back-end Signed-off-by: Clifford Wolf --- backends/smt2/smt2.cc | 8 ++++++++ 1 file changed, 8 insertions(+) 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); -- 2.30.2