Added wire start_offset and upto handling to splitnets cmd
authorClifford Wolf <clifford@clifford.at>
Wed, 23 Nov 2016 12:46:03 +0000 (13:46 +0100)
committerClifford Wolf <clifford@clifford.at>
Wed, 23 Nov 2016 12:54:33 +0000 (13:54 +0100)
passes/cmds/splitnets.cc

index 14eeb066f5062cb01e57e64c404496ddfeaf27f0..5e37fc5976573503a4f77cfa33defa3ea9830efc 100644 (file)
@@ -37,14 +37,20 @@ struct SplitnetsWorker
                        new_wire_name += format.substr(0, 1);
 
                if (width > 1) {
-                       new_wire_name += stringf("%d", offset+width-1);
+                       if (wire->upto)
+                               new_wire_name += stringf("%d", wire->start_offset+wire->width-(offset+width)-1);
+                       else
+                               new_wire_name += stringf("%d", wire->start_offset+offset+width-1);
                        if (format.size() > 2)
                                new_wire_name += format.substr(2, 1);
                        else
                                new_wire_name += ":";
                }
 
-               new_wire_name += stringf("%d", offset);
+               if (wire->upto)
+                       new_wire_name += stringf("%d", wire->start_offset+wire->width-offset-1);
+               else
+                       new_wire_name += stringf("%d", wire->start_offset+offset);
 
                if (format.size() > 1)
                        new_wire_name += format.substr(1, 1);