splitnets: propagate (*hdlname*) and disambiguate via start_offset.
authorwhitequark <whitequark@whitequark.org>
Wed, 10 Jun 2020 19:59:08 +0000 (19:59 +0000)
committerwhitequark <whitequark@whitequark.org>
Wed, 10 Jun 2020 19:59:08 +0000 (19:59 +0000)
This allows reliably coalescing the split wires later.

passes/cmds/splitnets.cc

index 1e7dedd7088650a8aa92e9445760531aa5335869..de275874f6fb11c3287e974f36404db49f362340 100644 (file)
@@ -59,10 +59,14 @@ struct SplitnetsWorker
                new_wire->port_id = wire->port_id ? wire->port_id + offset : 0;
                new_wire->port_input = wire->port_input;
                new_wire->port_output = wire->port_output;
+               new_wire->start_offset = wire->start_offset + offset;
 
                if (wire->attributes.count(ID::src))
                        new_wire->attributes[ID::src] = wire->attributes.at(ID::src);
 
+               if (wire->attributes.count(ID::hdlname))
+                       new_wire->attributes[ID::hdlname] = wire->attributes.at(ID::hdlname);
+
                if (wire->attributes.count(ID::keep))
                        new_wire->attributes[ID::keep] = wire->attributes.at(ID::keep);