diff options
author | Eddie Hung <eddie@fpgeh.com> | 2019-09-20 17:48:37 -0700 |
---|---|---|
committer | Eddie Hung <eddie@fpgeh.com> | 2019-09-20 17:51:36 -0700 |
commit | 72ce06909e87d1697ed5eac62d91db00a751a34b (patch) | |
tree | 294eabfa499b9b1257a23e2551f3831d8a4d77d5 /passes/techmap/techmap.cc | |
parent | 567e5f0aa7816bf92e0f1cb885af6fa333863163 (diff) | |
download | yosys-72ce06909e87d1697ed5eac62d91db00a751a34b.tar.gz yosys-72ce06909e87d1697ed5eac62d91db00a751a34b.tar.bz2 yosys-72ce06909e87d1697ed5eac62d91db00a751a34b.zip |
Trim mismatched connection to be same (smallest) size
Diffstat (limited to 'passes/techmap/techmap.cc')
-rw-r--r-- | passes/techmap/techmap.cc | 6 |
1 files changed, 6 insertions, 0 deletions
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; } |