Fixed "flatten" for unconnected inout ports
authorClifford Wolf <clifford@clifford.at>
Tue, 13 Oct 2015 08:30:23 +0000 (10:30 +0200)
committerClifford Wolf <clifford@clifford.at>
Tue, 13 Oct 2015 08:30:23 +0000 (10:30 +0200)
passes/techmap/techmap.cc

index 30a6d784fa318d0d6f6b365f8cb3a25084d211f6..592710eda66891a8b92f880248eb52342de6720c 100644 (file)
@@ -257,7 +257,7 @@ struct TechmapWorker
                        } else {
                                SigSpec sig_tpl = w, sig_tpl_pf = w, sig_mod = it.second;
                                apply_prefix(cell->name.str(), sig_tpl_pf, module);
-                               for (int i = 0; i < GetSize(sig_tpl); i++) {
+                               for (int i = 0; i < GetSize(sig_tpl) && i < GetSize(sig_mod); i++) {
                                        if (tpl_written_bits.count(tpl_sigmap(sig_tpl[i]))) {
                                                c.first.append(sig_mod[i]);
                                                c.second.append(sig_tpl_pf[i]);