abc9_ops: still emit delay table even box has no timing
[yosys.git] / passes / techmap / iopadmap.cc
index 47da98b067e59caeecd36683a7c7a80ed6c61046..a6e4fac14e03531d87e19448fed3030793cb4cb6 100644 (file)
@@ -234,6 +234,9 @@ struct IopadmapPass : public Pass {
                                                SigBit wire_bit(wire, i);
                                                Cell *tbuf_cell = nullptr;
 
+                                               if (skip_wire_bits.count(wire_bit))
+                                                       continue;
+
                                                if (tbuf_bits.count(wire_bit))
                                                        tbuf_cell = tbuf_bits.at(wire_bit);
 
@@ -420,6 +423,15 @@ struct IopadmapPass : public Pass {
                                        }
                                }
 
+                               if (wire->port_output) {
+                                       auto jt = new_wire->attributes.find(ID(init));
+                                       // For output ports, move \init attributes from old wire to new wire
+                                       if (jt != new_wire->attributes.end()) {
+                                               wire->attributes[ID(init)] = std::move(jt->second);
+                                               new_wire->attributes.erase(jt);
+                                       }
+                               }
+
                                wire->port_id = 0;
                                wire->port_input = false;
                                wire->port_output = false;