aboutsummaryrefslogtreecommitdiffstats
path: root/backends
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2018-02-08 19:12:12 +0100
committerClifford Wolf <clifford@clifford.at>2018-02-08 19:12:12 +0100
commitc9672e2e2eaf410c55145262880d1b0eba372193 (patch)
tree6a99db1386355268344b431d1a610fc16245c562 /backends
parent0659d9eac7b546ee6f5acab46dbc83c91d556a34 (diff)
downloadyosys-c9672e2e2eaf410c55145262880d1b0eba372193.tar.gz
yosys-c9672e2e2eaf410c55145262880d1b0eba372193.tar.bz2
yosys-c9672e2e2eaf410c55145262880d1b0eba372193.zip
Fix handling of zero-length cell connections in SMT2 back-end
Signed-off-by: Clifford Wolf <clifford@clifford.at>
Diffstat (limited to 'backends')
-rw-r--r--backends/smt2/smt2.cc8
1 files changed, 8 insertions, 0 deletions
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);