From: Eddie Hung Date: Sat, 21 Sep 2019 00:48:37 +0000 (-0700) Subject: Trim mismatched connection to be same (smallest) size X-Git-Tag: working-ls180~1050^2~3 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=72ce06909e87d1697ed5eac62d91db00a751a34b;p=yosys.git Trim mismatched connection to be same (smallest) size --- diff --git a/passes/techmap/techmap.cc b/passes/techmap/techmap.cc index 3cc3edbcb..1d0362ad6 100644 --- a/passes/techmap/techmap.cc +++ b/passes/techmap/techmap.cc @@ -359,6 +359,12 @@ struct TechmapWorker for (auto &attr : w->attributes) { if (attr.first == ID(src)) continue; + auto lhs = GetSize(extra_connect.first); + auto rhs = GetSize(extra_connect.second); + if (lhs > rhs) + extra_connect.first.remove(rhs, lhs-rhs); + else if (rhs > lhs) + extra_connect.second.remove(lhs, rhs-lhs); module->connect(extra_connect); break; }