Further work in JSONs:
authorDaniel Kirschten <daniel.kirschten@gmx.de>
Sun, 8 Sep 2019 21:35:40 +0000 (23:35 +0200)
committerDaniel Kirschten <daniel.kirschten@gmx.de>
Sun, 8 Sep 2019 21:37:35 +0000 (23:37 +0200)
-layouted Am2904
-ReserializeJSONsSettingUsages now can snap WCPs properly and reports
all components, wire points, and interface pins not snapped to grid
-relayouted Am2910 a bit
-deleted obsolete mux2_4

net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/Am2900.json
net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/am2904/Am2904.json
net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/am2910/Am2910.json
net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/mux2_4.json [deleted file]
net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/standardComponentIDMapping.json
net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/examples/ReserializeJSONsSettingUsages.java

index a6ac7ec..7afc8a7 100644 (file)
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#0",
         "pos": {
-          "x": 200.0,
+          "x": 199.0,
           "y": 236.0
         },
         "params": 1
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#1",
         "pos": {
-          "x": 400.0,
+          "x": 399.0,
           "y": 231.0
         },
         "params": 1
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#10",
         "pos": {
-          "x": 415.0,
-          "y": 220.0
+          "x": 414.0,
+          "y": 219.0
         },
         "params": 4
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#11",
         "pos": {
-          "x": 410.0,
-          "y": 225.0
+          "x": 409.0,
+          "y": 224.0
         },
         "params": 4
       },
         "name": "WireCrossPoint#12",
         "pos": {
           "x": 266.0,
-          "y": 555.0
+          "y": 554.0
         },
         "params": 1
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#13",
         "pos": {
-          "x": 245.0,
-          "y": 490.0
+          "x": 244.0,
+          "y": 489.0
         },
         "params": 1
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#14",
         "pos": {
-          "x": 355.0,
-          "y": 505.0
+          "x": 354.0,
+          "y": 504.0
         },
         "params": 12
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#2",
         "pos": {
-          "x": 470.0,
+          "x": 469.0,
           "y": 231.0
         },
         "params": 1
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#3",
         "pos": {
-          "x": 535.0,
+          "x": 534.0,
           "y": 231.0
         },
         "params": 1
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#4",
         "pos": {
-          "x": 230.0,
+          "x": 229.0,
           "y": 176.0
         },
         "params": 1
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#5",
         "pos": {
-          "x": 235.0,
+          "x": 234.0,
           "y": 281.0
         },
         "params": 1
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#6",
         "pos": {
-          "x": 525.0,
-          "y": 225.0
+          "x": 524.0,
+          "y": 224.0
         },
         "params": 4
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#7",
         "pos": {
-          "x": 530.0,
-          "y": 220.0
+          "x": 529.0,
+          "y": 219.0
         },
         "params": 4
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#8",
         "pos": {
-          "x": 465.0,
-          "y": 220.0
+          "x": 464.0,
+          "y": 219.0
         },
         "params": 4
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#9",
         "pos": {
-          "x": 460.0,
-          "y": 225.0
+          "x": 459.0,
+          "y": 224.0
         },
         "params": 4
       },
index a204e43..f6e571b 100644 (file)
@@ -1,6 +1,6 @@
 {
   "width": 120.0,
-  "height": 178.0,
+  "height": 155.0,
   "interfacePins": [
     {
       "location": {
@@ -23,7 +23,7 @@
     {
       "location": {
         "x": 120.0,
-        "y": 54.0
+        "y": 55.0
       },
       "name": "CT",
       "logicWidth": 1,
@@ -41,7 +41,7 @@
     {
       "location": {
         "x": 0.0,
-        "y": 42.0
+        "y": 45.0
       },
       "name": "I",
       "logicWidth": 13,
@@ -86,7 +86,7 @@
     {
       "location": {
         "x": 120.0,
-        "y": 128.0
+        "y": 125.0
       },
       "name": "QIO0",
       "logicWidth": 1,
@@ -95,7 +95,7 @@
     {
       "location": {
         "x": 0.0,
-        "y": 128.0
+        "y": 125.0
       },
       "name": "QIOn",
       "logicWidth": 1,
     {
       "location": {
         "x": 0.0,
-        "y": 119.0
+        "y": 120.0
       },
       "name": "SIOn",
       "logicWidth": 1,
     },
     {
       "location": {
-        "x": 113.0,
+        "x": 110.0,
         "y": 0.0
       },
       "name": "_OECT",
         "name": "Merger#0",
         "pos": {
           "x": 20.0,
-          "y": 220.0
+          "y": 235.0
         },
         "params": 6
       },
         "name": "Merger#1",
         "pos": {
           "x": 20.0,
-          "y": 170.0
+          "y": 185.0
         },
         "params": 5
       },
         "name": "Merger#4",
         "pos": {
           "x": 20.0,
-          "y": 150.0
+          "y": 165.0
         },
         "params": 2
       },
         "name": "Splitter#0",
         "pos": {
           "x": 5.0,
-          "y": 150.0
+          "y": 165.0
         },
         "params": 13
       },
         "id": "Splitter",
         "name": "Splitter#11",
         "pos": {
-          "x": 405.0,
-          "y": 585.0
+          "x": 455.0,
+          "y": 635.0
         },
         "params": 3
       },
         "id": "Splitter",
         "name": "Splitter#12",
         "pos": {
-          "x": 410.0,
-          "y": 665.0
+          "x": 455.0,
+          "y": 710.0
         },
         "params": 3
       },
         "id": "Splitter",
         "name": "Splitter#13",
         "pos": {
-          "x": 265.0,
-          "y": 725.0
+          "x": 135.0,
+          "y": 645.0
         },
         "params": 3
       },
         "id": "Splitter",
         "name": "Splitter#14",
         "pos": {
-          "x": 90.0,
-          "y": 730.0
+          "x": 310.0,
+          "y": 645.0
         },
         "params": 3
       },
         "id": "TriStateBuffer",
         "name": "TriStateBuffer#1",
         "pos": {
-          "x": 10.0,
-          "y": 650.0
+          "x": 400.0,
+          "y": 635.0
         },
         "params": {
           "logicWidth": 1,
         "id": "TriStateBuffer",
         "name": "TriStateBuffer#2",
         "pos": {
-          "x": 10.0,
-          "y": 605.0
+          "x": 240.0,
+          "y": 635.0
         },
         "params": {
           "logicWidth": 1,
         "id": "TriStateBuffer",
         "name": "TriStateBuffer#3",
         "pos": {
-          "x": 560.0,
-          "y": 595.0
+          "x": 550.0,
+          "y": 625.0
         },
         "params": {
           "logicWidth": 1,
         "id": "TriStateBuffer",
         "name": "TriStateBuffer#4",
         "pos": {
-          "x": 565.0,
-          "y": 655.0
+          "x": 550.0,
+          "y": 650.0
         },
         "params": {
           "logicWidth": 1,
         "name": "TriStateBuffer#5",
         "pos": {
           "x": 575.0,
-          "y": 260.0
+          "y": 265.0
         },
         "params": {
           "logicWidth": 1,
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#0",
         "pos": {
-          "x": 275.0,
-          "y": 60.0
+          "x": 274.0,
+          "y": 59.0
         },
         "params": 1
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#1",
         "pos": {
-          "x": 190.0,
-          "y": 140.0
+          "x": 189.0,
+          "y": 139.0
         },
         "params": 4
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#10",
         "pos": {
-          "x": 180.0,
-          "y": 55.0
+          "x": 179.0,
+          "y": 54.0
         },
         "params": 1
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#11",
         "pos": {
-          "x": 180.0,
-          "y": 15.0
+          "x": 179.0,
+          "y": 14.0
         },
         "params": 1
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#12",
         "pos": {
-          "x": 180.0,
-          "y": 35.0
+          "x": 179.0,
+          "y": 34.0
         },
         "params": 1
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#13",
         "pos": {
-          "x": 450.0,
-          "y": 65.0
+          "x": 449.0,
+          "y": 64.0
         },
         "params": 1
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#14",
         "pos": {
-          "x": 535.0,
-          "y": 110.0
+          "x": 534.0,
+          "y": 109.0
         },
         "params": 4
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#15",
         "pos": {
-          "x": 335.0,
-          "y": 175.0
+          "x": 334.0,
+          "y": 174.0
         },
         "params": 4
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#16",
         "pos": {
-          "x": 385.0,
-          "y": 165.0
+          "x": 384.0,
+          "y": 164.0
         },
         "params": 4
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#17",
         "pos": {
-          "x": 350.0,
-          "y": 440.0
+          "x": 349.0,
+          "y": 439.0
         },
         "params": 1
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#18",
         "pos": {
-          "x": 35.0,
-          "y": 640.0
+          "x": 434.0,
+          "y": 674.0
         },
         "params": 1
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#19",
         "pos": {
-          "x": 35.0,
-          "y": 595.0
+          "x": 264.0,
+          "y": 619.0
         },
         "params": 1
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#2",
         "pos": {
-          "x": 330.0,
-          "y": 125.0
+          "x": 329.0,
+          "y": 124.0
         },
         "params": 4
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#20",
         "pos": {
-          "x": 585.0,
-          "y": 590.0
+          "x": 289.0,
+          "y": 609.0
         },
         "params": 1
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#21",
         "pos": {
-          "x": 585.0,
-          "y": 640.0
+          "x": 294.0,
+          "y": 614.0
         },
         "params": 1
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#22",
         "pos": {
-          "x": 270.0,
-          "y": 515.0
+          "x": 359.0,
+          "y": 514.0
         },
         "params": 1
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#23",
         "pos": {
-          "x": 325.0,
-          "y": 640.0
+          "x": 359.0,
+          "y": 594.0
         },
         "params": 1
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#24",
         "pos": {
-          "x": 285.0,
-          "y": 745.0
+          "x": 149.0,
+          "y": 664.0
         },
         "params": 1
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#25",
         "pos": {
-          "x": 285.0,
-          "y": 755.0
+          "x": 149.0,
+          "y": 674.0
         },
         "params": 1
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#26",
         "pos": {
-          "x": 290.0,
-          "y": 805.0
+          "x": 299.0,
+          "y": 584.0
         },
         "params": 1
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#27",
         "pos": {
-          "x": 470.0,
-          "y": 400.0
+          "x": 464.0,
+          "y": 399.0
         },
         "params": 1
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#28",
         "pos": {
-          "x": 465.0,
-          "y": 350.0
+          "x": 459.0,
+          "y": 349.0
         },
         "params": 1
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#29",
         "pos": {
-          "x": 550.0,
-          "y": 570.0
+          "x": 559.0,
+          "y": 619.0
         },
         "params": 1
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#3",
         "pos": {
-          "x": 405.0,
-          "y": 120.0
+          "x": 404.0,
+          "y": 119.0
         },
         "params": 4
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#30",
         "pos": {
-          "x": 85.0,
-          "y": 590.0
+          "x": 249.0,
+          "y": 629.0
         },
         "params": 1
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#31",
         "pos": {
-          "x": 550.0,
-          "y": 240.0
+          "x": 549.0,
+          "y": 239.0
         },
         "params": 1
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#32",
         "pos": {
-          "x": 405.0,
-          "y": 170.0
+          "x": 404.0,
+          "y": 169.0
         },
         "params": 4
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#33",
         "pos": {
-          "x": 390.0,
-          "y": 210.0
+          "x": 389.0,
+          "y": 209.0
         },
         "params": 4
       },
+      {
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#34",
+        "pos": {
+          "x": 439.0,
+          "y": 684.0
+        },
+        "params": 1
+      },
+      {
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#35",
+        "pos": {
+          "x": 429.0,
+          "y": 664.0
+        },
+        "params": 1
+      },
+      {
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#36",
+        "pos": {
+          "x": 429.0,
+          "y": 619.0
+        },
+        "params": 1
+      },
+      {
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#37",
+        "pos": {
+          "x": 434.0,
+          "y": 644.0
+        },
+        "params": 1
+      },
+      {
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#38",
+        "pos": {
+          "x": 579.0,
+          "y": 609.0
+        },
+        "params": 1
+      },
+      {
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#39",
+        "pos": {
+          "x": 429.0,
+          "y": 609.0
+        },
+        "params": 1
+      },
       {
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#4",
         "pos": {
-          "x": 225.0,
-          "y": 15.0
+          "x": 224.0,
+          "y": 14.0
+        },
+        "params": 1
+      },
+      {
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#40",
+        "pos": {
+          "x": 584.0,
+          "y": 624.0
+        },
+        "params": 1
+      },
+      {
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#41",
+        "pos": {
+          "x": 434.0,
+          "y": 614.0
         },
         "params": 1
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#5",
         "pos": {
-          "x": 570.0,
-          "y": 55.0
+          "x": 569.0,
+          "y": 54.0
         },
         "params": 4
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#6",
         "pos": {
-          "x": 135.0,
-          "y": 20.0
+          "x": 134.0,
+          "y": 19.0
         },
         "params": 1
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#7",
         "pos": {
-          "x": 320.0,
-          "y": 40.0
+          "x": 319.0,
+          "y": 39.0
         },
         "params": 1
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#8",
         "pos": {
-          "x": 320.0,
-          "y": 20.0
+          "x": 319.0,
+          "y": 19.0
         },
         "params": 1
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#9",
         "pos": {
-          "x": 320.0,
-          "y": 60.0
+          "x": 319.0,
+          "y": 59.0
         },
         "params": 1
       },
         "name": "mux1#0",
         "pos": {
           "x": 495.0,
-          "y": 275.0
+          "y": 280.0
         }
       },
       {
         "id": "mux2",
         "name": "mux2#0",
         "pos": {
-          "x": 435.0,
-          "y": 575.0
+          "x": 470.0,
+          "y": 625.0
         }
       },
       {
         "id": "mux2",
         "name": "mux2#1",
         "pos": {
-          "x": 435.0,
-          "y": 655.0
+          "x": 470.0,
+          "y": 700.0
         }
       },
       {
         "id": "mux2",
         "name": "mux2#2",
         "pos": {
-          "x": 120.0,
-          "y": 720.0
+          "x": 325.0,
+          "y": 635.0
         }
       },
       {
         "id": "mux3",
         "name": "mux3#1",
         "pos": {
-          "x": 300.0,
-          "y": 715.0
+          "x": 155.0,
+          "y": 635.0
         }
       },
       {
         "name": "xor#0",
         "pos": {
           "x": 535.0,
-          "y": 265.0
+          "y": 270.0
         }
       },
       {
         "name": "xor#1",
         "pos": {
           "x": 475.0,
-          "y": 315.0
+          "y": 320.0
         }
       },
       {
         "id": "xor",
         "name": "xor#3",
         "pos": {
-          "x": 250.0,
-          "y": 820.0
+          "x": 115.0,
+          "y": 740.0
         }
       }
     ],
         "path": [
           {
             "x": 230.0,
-            "y": 280.0
+            "y": 285.0
           }
         ]
       },
           },
           {
             "x": 420.0,
-            "y": 290.0
+            "y": 295.0
           }
         ]
       },
         "path": [
           {
             "x": 415.0,
-            "y": 270.0
+            "y": 275.0
           },
           {
             "x": 415.0,
-            "y": 285.0
+            "y": 280.0
           },
           {
             "x": 220.0,
-            "y": 285.0
+            "y": 280.0
           }
         ]
       },
         "path": [
           {
             "x": 515.0,
-            "y": 320.0
+            "y": 325.0
           },
           {
             "x": 515.0,
-            "y": 310.0
+            "y": 315.0
           },
           {
             "x": 490.0,
-            "y": 310.0
+            "y": 315.0
           },
           {
             "x": 490.0,
-            "y": 300.0
+            "y": 305.0
           }
         ]
       },
         "path": [
           {
             "x": 105.0,
-            "y": 155.0
+            "y": 170.0
           },
           {
             "x": 105.0,
           {
             "x": 270.0,
             "y": 500.0
+          },
+          {
+            "x": 270.0,
+            "y": 515.0
           }
         ]
       },
             "y": 510.0
           },
           {
-            "x": 460.0,
+            "x": 480.0,
             "y": 510.0
           },
           {
-            "x": 460.0,
+            "x": 480.0,
+            "y": 350.0
+          },
+          {
+            "x": 470.0,
+            "y": 350.0
+          },
+          {
+            "x": 470.0,
             "y": 310.0
           }
         ]
         "path": [
           {
             "x": 105.0,
-            "y": 245.0
+            "y": 260.0
           },
           {
             "x": 105.0,
       },
       {
         "pin1": {
-          "compName": "_submodelinterface",
-          "pinName": "QIOn"
+          "compName": "mux1#4",
+          "pinName": "I1"
         },
         "pin2": {
-          "compName": "WireCrossPoint#18",
+          "compName": "WireCrossPoint#36",
           "pinName": ""
         },
         "name": "unnamedWire#157",
-        "path": []
+        "path": [
+          {
+            "x": 485.0,
+            "y": 555.0
+          },
+          {
+            "x": 485.0,
+            "y": 620.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "SIOn"
         },
         "name": "unnamedWire#158",
-        "path": []
+        "path": [
+          {
+            "x": 55.0,
+            "y": 620.0
+          },
+          {
+            "x": 55.0,
+            "y": 600.0
+          }
+        ]
       },
       {
         "pin1": {
-          "compName": "WireCrossPoint#20",
+          "compName": "WireCrossPoint#38",
           "pinName": ""
         },
         "pin2": {
           "pinName": "SIO0"
         },
         "name": "unnamedWire#159",
-        "path": []
+        "path": [
+          {
+            "x": 580.0,
+            "y": 600.0
+          }
+        ]
       },
       {
         "pin1": {
           },
           {
             "x": 75.0,
-            "y": 190.0
+            "y": 205.0
           }
         ]
       },
       {
         "pin1": {
-          "compName": "_submodelinterface",
-          "pinName": "QIO0"
+          "compName": "mux1#5",
+          "pinName": "I1"
         },
         "pin2": {
-          "compName": "WireCrossPoint#21",
+          "compName": "WireCrossPoint#41",
           "pinName": ""
         },
         "name": "unnamedWire#160",
-        "path": []
+        "path": [
+          {
+            "x": 435.0,
+            "y": 565.0
+          }
+        ]
       },
       {
         "pin1": {
-          "compName": "TriStateBuffer#1",
-          "pinName": "OUT"
+          "compName": "WireCrossPoint#37",
+          "pinName": ""
         },
         "pin2": {
-          "compName": "WireCrossPoint#18",
-          "pinName": ""
+          "compName": "_submodelinterface",
+          "pinName": "QIOn"
         },
         "name": "unnamedWire#161",
-        "path": []
+        "path": [
+          {
+            "x": 435.0,
+            "y": 625.0
+          }
+        ]
       },
       {
         "pin1": {
-          "compName": "TriStateBuffer#2",
+          "compName": "TriStateBuffer#3",
           "pinName": "OUT"
         },
         "pin2": {
-          "compName": "WireCrossPoint#19",
+          "compName": "WireCrossPoint#38",
           "pinName": ""
         },
         "name": "unnamedWire#162",
-        "path": []
+        "path": [
+          {
+            "x": 580.0,
+            "y": 635.0
+          }
+        ]
       },
       {
         "pin1": {
-          "compName": "TriStateBuffer#3",
-          "pinName": "OUT"
+          "compName": "WireCrossPoint#38",
+          "pinName": ""
         },
         "pin2": {
-          "compName": "WireCrossPoint#20",
+          "compName": "WireCrossPoint#39",
           "pinName": ""
         },
         "name": "unnamedWire#163",
       },
       {
         "pin1": {
-          "compName": "TriStateBuffer#4",
-          "pinName": "OUT"
+          "compName": "WireCrossPoint#41",
+          "pinName": ""
         },
         "pin2": {
           "compName": "WireCrossPoint#21",
           "pinName": "I"
         },
         "name": "unnamedWire#166",
-        "path": []
+        "path": [
+          {
+            "x": 165.0,
+            "y": 500.0
+          },
+          {
+            "x": 165.0,
+            "y": 575.0
+          },
+          {
+            "x": 450.0,
+            "y": 575.0
+          },
+          {
+            "x": 450.0,
+            "y": 645.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": ""
         },
         "pin2": {
-          "compName": "mux2#0",
-          "pinName": "I01"
+          "compName": "WireCrossPoint#36",
+          "pinName": ""
         },
         "name": "unnamedWire#170",
         "path": []
           "pinName": "IN"
         },
         "name": "unnamedWire#177",
-        "path": []
+        "path": [
+          {
+            "x": 545.0,
+            "y": 710.0
+          },
+          {
+            "x": 545.0,
+            "y": 660.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "QIO0_MUX"
         },
         "name": "unnamedWire#178",
-        "path": []
+        "path": [
+          {
+            "x": 445.0,
+            "y": 720.0
+          },
+          {
+            "x": 445.0,
+            "y": 580.0
+          },
+          {
+            "x": 175.0,
+            "y": 580.0
+          },
+          {
+            "x": 175.0,
+            "y": 520.0
+          }
+        ]
       },
       {
         "pin1": {
-          "compName": "WireCrossPoint#19",
+          "compName": "WireCrossPoint#36",
           "pinName": ""
         },
         "pin2": {
-          "compName": "mux2#1",
-          "pinName": "I01"
+          "compName": "WireCrossPoint#35",
+          "pinName": ""
         },
         "name": "unnamedWire#179",
         "path": []
           "pinName": "I10"
         },
         "name": "unnamedWire#180",
-        "path": []
+        "path": [
+          {
+            "x": 435.0,
+            "y": 750.0
+          }
+        ]
       },
       {
         "pin1": {
-          "compName": "WireCrossPoint#23",
+          "compName": "WireCrossPoint#35",
           "pinName": ""
         },
         "pin2": {
-          "compName": "mux2#1",
-          "pinName": "I11"
+          "compName": "mux2#0",
+          "pinName": "I01"
         },
         "name": "unnamedWire#181",
         "path": []
       },
       {
         "pin1": {
-          "compName": "mux2#0",
-          "pinName": "I11"
+          "compName": "WireCrossPoint#34",
+          "pinName": ""
         },
         "pin2": {
-          "compName": "WireCrossPoint#23",
-          "pinName": ""
+          "compName": "mux2#1",
+          "pinName": "I11"
         },
         "name": "unnamedWire#182",
-        "path": []
+        "path": [
+          {
+            "x": 440.0,
+            "y": 760.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": ""
         },
         "name": "unnamedWire#187",
-        "path": []
+        "path": [
+          {
+            "x": 150.0,
+            "y": 685.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "SIOn_MUX"
         },
         "name": "unnamedWire#188",
-        "path": []
+        "path": [
+          {
+            "x": 130.0,
+            "y": 655.0
+          },
+          {
+            "x": 130.0,
+            "y": 580.0
+          },
+          {
+            "x": 170.0,
+            "y": 580.0
+          },
+          {
+            "x": 170.0,
+            "y": 510.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": ""
         },
         "name": "unnamedWire#191",
-        "path": []
+        "path": [
+          {
+            "x": 105.0,
+            "y": 695.0
+          },
+          {
+            "x": 105.0,
+            "y": 610.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "I011"
         },
         "name": "unnamedWire#192",
-        "path": []
+        "path": [
+          {
+            "x": 110.0,
+            "y": 615.0
+          },
+          {
+            "x": 110.0,
+            "y": 705.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": ""
         },
         "name": "unnamedWire#193",
-        "path": []
+        "path": [
+          {
+            "x": 115.0,
+            "y": 715.0
+          },
+          {
+            "x": 115.0,
+            "y": 595.0
+          }
+        ]
       },
       {
         "pin1": {
         "name": "unnamedWire#195",
         "path": [
           {
-            "x": 470.0,
-            "y": 445.0
+            "x": 465.0,
+            "y": 495.0
+          },
+          {
+            "x": 345.0,
+            "y": 495.0
+          },
+          {
+            "x": 345.0,
+            "y": 585.0
           }
         ]
       },
         "name": "unnamedWire#196",
         "path": [
           {
-            "x": 475.0,
-            "y": 445.0
+            "x": 125.0,
+            "y": 735.0
           },
           {
-            "x": 475.0,
+            "x": 125.0,
+            "y": 605.0
+          },
+          {
+            "x": 350.0,
+            "y": 605.0
+          },
+          {
+            "x": 350.0,
+            "y": 500.0
+          },
+          {
+            "x": 470.0,
+            "y": 500.0
+          },
+          {
+            "x": 470.0,
             "y": 360.0
           }
         ]
           "pinName": ""
         },
         "name": "unnamedWire#197",
-        "path": []
+        "path": [
+          {
+            "x": 290.0,
+            "y": 675.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": ""
         },
         "name": "unnamedWire#198",
-        "path": []
+        "path": [
+          {
+            "x": 295.0,
+            "y": 685.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "I101"
         },
         "name": "unnamedWire#199",
-        "path": []
+        "path": [
+          {
+            "x": 120.0,
+            "y": 585.0
+          },
+          {
+            "x": 120.0,
+            "y": 725.0
+          }
+        ]
       },
       {
         "pin1": {
         "name": "unnamedWire#200",
         "path": [
           {
-            "x": 470.0,
-            "y": 330.0
+            "x": 465.0,
+            "y": 335.0
           }
         ]
       },
           "pinName": "I11"
         },
         "name": "unnamedWire#201",
-        "path": []
+        "path": [
+          {
+            "x": 300.0,
+            "y": 695.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "OEn"
         },
         "name": "unnamedWire#202",
-        "path": []
+        "path": [
+          {
+            "x": 250.0,
+            "y": 540.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": ""
         },
         "name": "unnamedWire#203",
-        "path": []
+        "path": [
+          {
+            "x": 390.0,
+            "y": 550.0
+          },
+          {
+            "x": 390.0,
+            "y": 585.0
+          },
+          {
+            "x": 560.0,
+            "y": 585.0
+          }
+        ]
       },
       {
         "pin1": {
         "name": "unnamedWire#204",
         "path": [
           {
-            "x": 465.0,
-            "y": 320.0
+            "x": 460.0,
+            "y": 325.0
           }
         ]
       },
         "name": "unnamedWire#205",
         "path": [
           {
-            "x": 465.0,
-            "y": 445.0
+            "x": 460.0,
+            "y": 490.0
+          },
+          {
+            "x": 340.0,
+            "y": 490.0
+          },
+          {
+            "x": 340.0,
+            "y": 600.0
+          },
+          {
+            "x": 100.0,
+            "y": 600.0
+          },
+          {
+            "x": 100.0,
+            "y": 745.0
           }
         ]
       },
         "name": "unnamedWire#206",
         "path": [
           {
-            "x": 480.0,
-            "y": 445.0
+            "x": 95.0,
+            "y": 755.0
           },
           {
-            "x": 480.0,
+            "x": 95.0,
+            "y": 590.0
+          },
+          {
+            "x": 355.0,
+            "y": 590.0
+          },
+          {
+            "x": 355.0,
+            "y": 505.0
+          },
+          {
+            "x": 475.0,
+            "y": 505.0
+          },
+          {
+            "x": 475.0,
             "y": 370.0
           }
         ]
           "pinName": "QIOn_MUX"
         },
         "name": "unnamedWire#210",
-        "path": []
+        "path": [
+          {
+            "x": 305.0,
+            "y": 655.0
+          },
+          {
+            "x": 305.0,
+            "y": 530.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "EN"
         },
         "name": "unnamedWire#215",
-        "path": []
+        "path": [
+          {
+            "x": 575.0,
+            "y": 620.0
+          },
+          {
+            "x": 575.0,
+            "y": 645.0
+          },
+          {
+            "x": 560.0,
+            "y": 645.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "EN"
         },
         "name": "unnamedWire#219",
-        "path": []
+        "path": [
+          {
+            "x": 410.0,
+            "y": 630.0
+          }
+        ]
       },
       {
         "pin1": {
           }
         ]
       },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#23",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#34",
+          "pinName": ""
+        },
+        "name": "unnamedWire#220",
+        "path": [
+          {
+            "x": 440.0,
+            "y": 595.0
+          }
+        ]
+      },
       {
         "pin1": {
           "compName": "mux1#5",
           },
           {
             "x": 230.0,
-            "y": 530.0
+            "y": 525.0
           },
           {
             "x": 230.0,
       },
       {
         "pin1": {
-          "compName": "mux1#4",
-          "pinName": "I1"
-        },
-        "pin2": {
           "compName": "WireCrossPoint#19",
           "pinName": ""
         },
+        "pin2": {
+          "compName": "TriStateBuffer#2",
+          "pinName": "OUT"
+        },
         "name": "unnamedWire#223",
-        "path": []
+        "path": [
+          {
+            "x": 265.0,
+            "y": 645.0
+          }
+        ]
       },
       {
         "pin1": {
-          "compName": "mux1#5",
-          "pinName": "I0"
+          "compName": "TriStateBuffer#4",
+          "pinName": "OUT"
         },
         "pin2": {
-          "compName": "WireCrossPoint#20",
+          "compName": "WireCrossPoint#40",
           "pinName": ""
         },
         "name": "unnamedWire#224",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "WireCrossPoint#21",
-          "pinName": ""
-        },
-        "pin2": {
-          "compName": "mux1#5",
-          "pinName": "I1"
-        },
-        "name": "unnamedWire#225",
-        "path": []
+        "path": [
+          {
+            "x": 585.0,
+            "y": 660.0
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "I"
         },
         "name": "unnamedWire#226",
-        "path": []
+        "path": [
+          {
+            "x": 410.0,
+            "y": 560.0
+          },
+          {
+            "x": 410.0,
+            "y": 540.0
+          }
+        ]
       },
       {
         "pin1": {
         "name": "unnamedWire#228",
         "path": []
       },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#34",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "mux2#0",
+          "pinName": "I11"
+        },
+        "name": "unnamedWire#229",
+        "path": []
+      },
       {
         "pin1": {
           "compName": "WireCrossPoint#1",
         "name": "unnamedWire#23",
         "path": []
       },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#35",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "mux2#1",
+          "pinName": "I01"
+        },
+        "name": "unnamedWire#230",
+        "path": [
+          {
+            "x": 430.0,
+            "y": 740.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#18",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#37",
+          "pinName": ""
+        },
+        "name": "unnamedWire#231",
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#37",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "TriStateBuffer#1",
+          "pinName": "OUT"
+        },
+        "name": "unnamedWire#232",
+        "path": []
+      },
       {
         "pin1": {
           "compName": "WireCrossPoint#31",
           {
             "x": 565.0,
             "y": 215.0
+          },
+          {
+            "x": 565.0,
+            "y": 25.0
+          },
+          {
+            "x": 550.0,
+            "y": 25.0
           }
         ]
       },
         "name": "unnamedWire#237",
         "path": []
       },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#39",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "mux1#5",
+          "pinName": "I0"
+        },
+        "name": "unnamedWire#238",
+        "path": [
+          {
+            "x": 430.0,
+            "y": 555.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#39",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#20",
+          "pinName": ""
+        },
+        "name": "unnamedWire#239",
+        "path": []
+      },
       {
         "pin1": {
           "compName": "WireCrossPoint#15",
           }
         ]
       },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#40",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "QIO0"
+        },
+        "name": "unnamedWire#240",
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#41",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#40",
+          "pinName": ""
+        },
+        "name": "unnamedWire#242",
+        "path": [
+          {
+            "x": 585.0,
+            "y": 615.0
+          }
+        ]
+      },
       {
         "pin1": {
           "compName": "Am2904MSR#0",
index 2a91d76..55256c7 100644 (file)
@@ -1,10 +1,10 @@
 {
-  "width": 72.0,
-  "height": 67.0,
+  "width": 60.0,
+  "height": 45.0,
   "interfacePins": [
     {
       "location": {
-        "x": 60.0,
+        "x": 40.0,
         "y": 0.0
       },
       "name": "C",
@@ -13,8 +13,8 @@
     },
     {
       "location": {
-        "x": 72.0,
-        "y": 40.0
+        "x": 60.0,
+        "y": 30.0
       },
       "name": "CI",
       "logicWidth": 1,
@@ -22,7 +22,7 @@
     },
     {
       "location": {
-        "x": 36.0,
+        "x": 30.0,
         "y": 0.0
       },
       "name": "D",
@@ -32,7 +32,7 @@
     {
       "location": {
         "x": 0.0,
-        "y": 50.0
+        "y": 25.0
       },
       "name": "I",
       "logicWidth": 4,
@@ -40,8 +40,8 @@
     },
     {
       "location": {
-        "x": 38.0,
-        "y": 67.0
+        "x": 35.0,
+        "y": 45.0
       },
       "name": "Y",
       "logicWidth": 12,
@@ -50,7 +50,7 @@
     {
       "location": {
         "x": 0.0,
-        "y": 38.0
+        "y": 10.0
       },
       "name": "_CC",
       "logicWidth": 1,
@@ -59,7 +59,7 @@
     {
       "location": {
         "x": 0.0,
-        "y": 44.0
+        "y": 15.0
       },
       "name": "_CCEN",
       "logicWidth": 1,
@@ -67,8 +67,8 @@
     },
     {
       "location": {
-        "x": 72.0,
-        "y": 14.0
+        "x": 60.0,
+        "y": 5.0
       },
       "name": "_FULL",
       "logicWidth": 1,
@@ -76,8 +76,8 @@
     },
     {
       "location": {
-        "x": 19.0,
-        "y": 67.0
+        "x": 15.0,
+        "y": 45.0
       },
       "name": "_MAP",
       "logicWidth": 1,
@@ -85,8 +85,8 @@
     },
     {
       "location": {
-        "x": 49.0,
-        "y": 67.0
+        "x": 40.0,
+        "y": 45.0
       },
       "name": "_OE",
       "logicWidth": 1,
@@ -94,8 +94,8 @@
     },
     {
       "location": {
-        "x": 13.0,
-        "y": 67.0
+        "x": 10.0,
+        "y": 45.0
       },
       "name": "_PL",
       "logicWidth": 1,
     {
       "location": {
         "x": 0.0,
-        "y": 6.0
+        "y": 5.0
       },
       "name": "_RLD",
       "logicWidth": 1,
     },
     {
       "location": {
-        "x": 25.0,
-        "y": 67.0
+        "x": 20.0,
+        "y": 45.0
       },
       "name": "_VECT",
       "logicWidth": 1,
         "id": "Am2910InstrPLA",
         "name": "Am2910InstrPLA#0",
         "pos": {
-          "x": 80.0,
-          "y": 155.0
+          "x": 70.0,
+          "y": 90.0
         }
       },
       {
         "id": "Am2910RegCntr",
         "name": "Am2910RegCntr#0",
         "pos": {
-          "x": 160.0,
-          "y": 25.0
+          "x": 130.0,
+          "y": 15.0
         }
       },
       {
         "id": "Am2910SP",
         "name": "Am2910SP#0",
         "pos": {
-          "x": 305.0,
-          "y": 55.0
+          "x": 240.0,
+          "y": 10.0
         }
       },
-      {
-        "id": "BitDisplay",
-        "name": "BitDisplay#0",
-        "pos": {
-          "x": 160.0,
-          "y": 95.0
-        },
-        "params": 12
-      },
-      {
-        "id": "BitDisplay",
-        "name": "BitDisplay#1",
-        "pos": {
-          "x": 260.0,
-          "y": 115.0
-        },
-        "params": 12
-      },
-      {
-        "id": "BitDisplay",
-        "name": "BitDisplay#2",
-        "pos": {
-          "x": 345.0,
-          "y": 180.0
-        },
-        "params": 12
-      },
-      {
-        "id": "BitDisplay",
-        "name": "BitDisplay#3",
-        "pos": {
-          "x": 265.0,
-          "y": 150.0
-        },
-        "params": 12
-      },
-      {
-        "id": "BitDisplay",
-        "name": "BitDisplay#4",
-        "pos": {
-          "x": 260.0,
-          "y": 85.0
-        },
-        "params": 3
-      },
-      {
-        "id": "BitDisplay",
-        "name": "BitDisplay#5",
-        "pos": {
-          "x": 260.0,
-          "y": 70.0
-        },
-        "params": 3
-      },
       {
         "id": "NandGate",
         "name": "NandGate#0",
         "pos": {
           "x": 40.0,
-          "y": 185.0
+          "y": 45.0
         },
         "params": 1
       },
         "name": "NandGate#1",
         "pos": {
           "x": 10.0,
-          "y": 210.0
+          "y": 60.0
         },
         "params": 1
       },
         "id": "NandGate",
         "name": "NandGate#2",
         "pos": {
-          "x": 250.0,
-          "y": 305.0
+          "x": 205.0,
+          "y": 195.0
         },
         "params": 1
       },
         "id": "TriStateBuffer",
         "name": "TriStateBuffer#0",
         "pos": {
-          "x": 180.0,
-          "y": 290.0
+          "x": 165.0,
+          "y": 180.0
         },
         "params": {
           "logicWidth": 12,
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#0",
         "pos": {
-          "x": 324.0,
-          "y": 149.0
+          "x": 259.0,
+          "y": 99.0
         },
         "params": 12
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#1",
         "pos": {
-          "x": 294.0,
-          "y": 104.0
+          "x": 224.0,
+          "y": 59.0
         },
         "params": 1
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#10",
         "pos": {
-          "x": 244.0,
-          "y": 319.0
+          "x": 199.0,
+          "y": 209.0
         },
         "params": 1
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#2",
         "pos": {
-          "x": 189.0,
-          "y": 274.0
+          "x": 174.0,
+          "y": 174.0
         },
         "params": 12
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#3",
         "pos": {
-          "x": 179.0,
-          "y": 89.0
+          "x": 164.0,
+          "y": 59.0
         },
         "params": 12
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#4",
         "pos": {
-          "x": 179.0,
-          "y": 14.0
+          "x": 149.0,
+          "y": 9.0
         },
         "params": 12
       },
         "name": "WireCrossPoint#5",
         "pos": {
           "x": 4.0,
-          "y": 219.0
+          "y": 74.0
         },
         "params": 1
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#6",
         "pos": {
-          "x": 299.0,
-          "y": 79.0
+          "x": 234.0,
+          "y": 34.0
         },
         "params": 1
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#7",
         "pos": {
-          "x": 299.0,
-          "y": 44.0
-        },
-        "params": 1
-      },
-      {
-        "id": "WireCrossPoint",
-        "name": "WireCrossPoint#8",
-        "pos": {
-          "x": 299.0,
-          "y": 169.0
+          "x": 199.0,
+          "y": 34.0
         },
         "params": 1
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#9",
         "pos": {
-          "x": 299.0,
-          "y": 114.0
+          "x": 234.0,
+          "y": 69.0
         },
         "params": 1
       },
         "id": "dff12",
         "name": "dff12#0",
         "pos": {
-          "x": 305.0,
-          "y": 160.0
+          "x": 240.0,
+          "y": 105.0
         }
       },
       {
         "id": "inc12",
         "name": "inc12#0",
         "pos": {
-          "x": 305.0,
-          "y": 190.0
+          "x": 240.0,
+          "y": 140.0
         }
       },
       {
         "id": "nor12",
         "name": "nor12#0",
         "pos": {
-          "x": 190.0,
-          "y": 80.0
+          "x": 175.0,
+          "y": 50.0
         }
       },
       {
         "id": "ram5_12",
         "name": "ram5_12#0",
         "pos": {
-          "x": 305.0,
-          "y": 100.0
+          "x": 240.0,
+          "y": 55.0
         }
       },
       {
         "id": "sel4_12",
         "name": "sel4_12#0",
         "pos": {
-          "x": 150.0,
-          "y": 175.0
+          "x": 135.0,
+          "y": 110.0
         }
       }
     ],
         "name": "unnamedWire#10",
         "path": [
           {
-            "x": 230.0,
-            "y": 90.0
+            "x": 215.0,
+            "y": 60.0
           },
           {
-            "x": 230.0,
-            "y": 120.0
+            "x": 215.0,
+            "y": 75.0
           },
           {
-            "x": 95.0,
-            "y": 120.0
+            "x": 85.0,
+            "y": 75.0
           }
         ]
       },
         "name": "unnamedWire#11",
         "path": [
           {
-            "x": 115.0,
-            "y": 160.0
+            "x": 105.0,
+            "y": 95.0
           },
           {
-            "x": 115.0,
-            "y": 45.0
+            "x": 105.0,
+            "y": 35.0
           }
         ]
       },
         "name": "unnamedWire#12",
         "path": [
           {
-            "x": 120.0,
-            "y": 170.0
+            "x": 110.0,
+            "y": 105.0
           },
           {
-            "x": 120.0,
-            "y": 55.0
+            "x": 110.0,
+            "y": 45.0
           }
         ]
       },
         "name": "unnamedWire#13",
         "path": [
           {
-            "x": 295.0,
-            "y": 220.0
+            "x": 225.0,
+            "y": 155.0
           }
         ]
       },
         "name": "unnamedWire#14",
         "path": [
           {
-            "x": 290.0,
-            "y": 230.0
+            "x": 230.0,
+            "y": 165.0
           },
           {
-            "x": 290.0,
-            "y": 70.0
+            "x": 230.0,
+            "y": 25.0
           }
         ]
       },
         "name": "unnamedWire#15",
         "path": [
           {
-            "x": 295.0,
-            "y": 60.0
+            "x": 225.0,
+            "y": 15.0
           }
         ]
       },
         "name": "unnamedWire#18",
         "path": [
           {
-            "x": 325.0,
-            "y": 275.0
+            "x": 260.0,
+            "y": 175.0
           }
         ]
       },
         "name": "unnamedWire#19",
         "path": [
           {
-            "x": 200.0,
-            "y": 130.0
+            "x": 185.0,
+            "y": 85.0
           }
         ]
       },
         "name": "unnamedWire#20",
         "path": [
           {
-            "x": 220.0,
-            "y": 150.0
+            "x": 205.0,
+            "y": 100.0
           }
         ]
       },
         "name": "unnamedWire#25",
         "path": [
           {
-            "x": 145.0,
-            "y": 15.0
+            "x": 125.0,
+            "y": 10.0
           },
           {
-            "x": 145.0,
-            "y": 150.0
+            "x": 125.0,
+            "y": 65.0
           },
           {
-            "x": 160.0,
-            "y": 150.0
+            "x": 145.0,
+            "y": 65.0
           }
         ]
       },
         "path": [
           {
             "x": 65.0,
-            "y": 195.0
+            "y": 55.0
           },
           {
             "x": 65.0,
-            "y": 160.0
+            "y": 95.0
           }
         ]
       },
         "path": [
           {
             "x": 5.0,
-            "y": 215.0
+            "y": 65.0
           }
         ]
       },
           "pinName": "B"
         },
         "name": "unnamedWire#32",
-        "path": [
-          {
-            "x": 5.0,
-            "y": 225.0
-          }
-        ]
+        "path": []
       },
       {
         "pin1": {
         "path": [
           {
             "x": 35.0,
-            "y": 220.0
+            "y": 70.0
           },
           {
             "x": 35.0,
-            "y": 200.0
+            "y": 60.0
           }
         ]
       },
       },
       {
         "pin1": {
-          "compName": "WireCrossPoint#8",
+          "compName": "WireCrossPoint#9",
           "pinName": ""
         },
         "pin2": {
           "pinName": "C"
         },
         "name": "unnamedWire#35",
-        "path": []
+        "path": [
+          {
+            "x": 235.0,
+            "y": 115.0
+          }
+        ]
       },
       {
         "pin1": {
         "name": "unnamedWire#42",
         "path": [
           {
-            "x": 85.0,
-            "y": 290.0
+            "x": 75.0,
+            "y": 180.0
           },
           {
-            "x": 65.0,
-            "y": 290.0
+            "x": 50.0,
+            "y": 180.0
           }
         ]
       },
           "pinName": "_MAP"
         },
         "name": "unnamedWire#43",
-        "path": []
+        "path": [
+          {
+            "x": 85.0,
+            "y": 185.0
+          },
+          {
+            "x": 75.0,
+            "y": 185.0
+          }
+        ]
       },
       {
         "pin1": {
         "name": "unnamedWire#44",
         "path": [
           {
-            "x": 105.0,
-            "y": 290.0
+            "x": 95.0,
+            "y": 190.0
           },
           {
-            "x": 125.0,
-            "y": 290.0
+            "x": 100.0,
+            "y": 190.0
           }
         ]
       },
         "name": "unnamedWire#45",
         "path": [
           {
-            "x": 70.0,
-            "y": 250.0
+            "x": 35.0,
+            "y": 125.0
           },
           {
-            "x": 70.0,
-            "y": 175.0
+            "x": 35.0,
+            "y": 110.0
           }
         ]
       },
-      {
-        "pin1": {
-          "compName": "Am2910RegCntr#0",
-          "pinName": "Y"
-        },
-        "pin2": {
-          "compName": "BitDisplay#0",
-          "pinName": ""
-        },
-        "name": "unnamedWire#46",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "ram5_12#0",
-          "pinName": "Y"
-        },
-        "pin2": {
-          "compName": "BitDisplay#1",
-          "pinName": ""
-        },
-        "name": "unnamedWire#47",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "inc12#0",
-          "pinName": "Y"
-        },
-        "pin2": {
-          "compName": "BitDisplay#2",
-          "pinName": ""
-        },
-        "name": "unnamedWire#48",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "dff12#0",
-          "pinName": "Y"
-        },
-        "pin2": {
-          "compName": "BitDisplay#3",
-          "pinName": ""
-        },
-        "name": "unnamedWire#49",
-        "path": []
-      },
       {
         "pin1": {
           "compName": "dff12#0",
         "name": "unnamedWire#50",
         "path": []
       },
-      {
-        "pin1": {
-          "compName": "WireCrossPoint#9",
-          "pinName": ""
-        },
-        "pin2": {
-          "compName": "WireCrossPoint#8",
-          "pinName": ""
-        },
-        "name": "unnamedWire#51",
-        "path": []
-      },
       {
         "pin1": {
           "compName": "TriStateBuffer#0",
         "name": "unnamedWire#53",
         "path": []
       },
-      {
-        "pin1": {
-          "compName": "Am2910SP#0",
-          "pinName": "A"
-        },
-        "pin2": {
-          "compName": "BitDisplay#5",
-          "pinName": ""
-        },
-        "name": "unnamedWire#54",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "Am2910SP#0",
-          "pinName": "B"
-        },
-        "pin2": {
-          "compName": "BitDisplay#4",
-          "pinName": ""
-        },
-        "name": "unnamedWire#55",
-        "path": []
-      },
       {
         "pin1": {
           "compName": "WireCrossPoint#10",
         "name": "unnamedWire#57",
         "path": [
           {
-            "x": 245.0,
-            "y": 310.0
+            "x": 200.0,
+            "y": 200.0
           }
         ]
       },
         "name": "unnamedWire#58",
         "path": [
           {
-            "x": 275.0,
-            "y": 300.0
+            "x": 230.0,
+            "y": 190.0
           },
           {
-            "x": 275.0,
-            "y": 315.0
+            "x": 230.0,
+            "y": 205.0
           }
         ]
       },
           "pinName": ""
         },
         "name": "unnamedWire#9",
-        "path": []
+        "path": [
+          {
+            "x": 150.0,
+            "y": 60.0
+          }
+        ]
       }
     ],
     "version": "0.1.1"
diff --git a/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/mux2_4.json b/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/mux2_4.json
deleted file mode 100644 (file)
index 6726b46..0000000
+++ /dev/null
@@ -1,700 +0,0 @@
-{
-  "width": 62.0,
-  "height": 90.0,
-  "interfacePins": [
-    {
-      "location": {
-        "x": 0.0,
-        "y": 30.0
-      },
-      "name": "I00",
-      "logicWidth": 4,
-      "usage": "INPUT"
-    },
-    {
-      "location": {
-        "x": 0.0,
-        "y": 40.0
-      },
-      "name": "I01",
-      "logicWidth": 4,
-      "usage": "INPUT"
-    },
-    {
-      "location": {
-        "x": 0.0,
-        "y": 50.0
-      },
-      "name": "I10",
-      "logicWidth": 4,
-      "usage": "INPUT"
-    },
-    {
-      "location": {
-        "x": 0.0,
-        "y": 60.0
-      },
-      "name": "I11",
-      "logicWidth": 4,
-      "usage": "INPUT"
-    },
-    {
-      "location": {
-        "x": 0.0,
-        "y": 10.0
-      },
-      "name": "S0",
-      "logicWidth": 1,
-      "usage": "INPUT"
-    },
-    {
-      "location": {
-        "x": 0.0,
-        "y": 20.0
-      },
-      "name": "S1",
-      "logicWidth": 1,
-      "usage": "INPUT"
-    },
-    {
-      "location": {
-        "x": 62.0,
-        "y": 16.0
-      },
-      "name": "Y",
-      "logicWidth": 4,
-      "usage": "OUTPUT"
-    }
-  ],
-  "innerScale": 0.4,
-  "submodel": {
-    "components": [
-      {
-        "id": "Merger",
-        "name": "Merger#0",
-        "pos": {
-          "x": 140.0,
-          "y": 25.0
-        },
-        "params": 4
-      },
-      {
-        "id": "Splitter",
-        "name": "Splitter#0",
-        "pos": {
-          "x": 25.0,
-          "y": 45.0
-        },
-        "params": 4
-      },
-      {
-        "id": "Splitter",
-        "name": "Splitter#1",
-        "pos": {
-          "x": 25.0,
-          "y": 85.0
-        },
-        "params": 4
-      },
-      {
-        "id": "Splitter",
-        "name": "Splitter#2",
-        "pos": {
-          "x": 25.0,
-          "y": 140.0
-        },
-        "params": 4
-      },
-      {
-        "id": "Splitter",
-        "name": "Splitter#3",
-        "pos": {
-          "x": 25.0,
-          "y": 180.0
-        },
-        "params": 4
-      },
-      {
-        "id": "WireCrossPoint",
-        "name": "WireCrossPoint#0",
-        "pos": {
-          "x": 19.0,
-          "y": 34.0
-        },
-        "params": 1
-      },
-      {
-        "id": "mux1_4",
-        "name": "mux1_4#0",
-        "pos": {
-          "x": 40.0,
-          "y": 30.0
-        }
-      },
-      {
-        "id": "mux1_4",
-        "name": "mux1_4#1",
-        "pos": {
-          "x": 40.0,
-          "y": 125.0
-        }
-      },
-      {
-        "id": "mux1_4",
-        "name": "mux1_4#2",
-        "pos": {
-          "x": 100.0,
-          "y": 20.0
-        }
-      }
-    ],
-    "wires": [
-      {
-        "pin1": {
-          "compName": "Splitter#2",
-          "pinName": "O0"
-        },
-        "pin2": {
-          "compName": "mux1_4#1",
-          "pinName": "I0_1"
-        },
-        "name": "unnamedWire#0",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "mux1_4#1",
-          "pinName": "I0_2"
-        },
-        "pin2": {
-          "compName": "Splitter#2",
-          "pinName": "O1"
-        },
-        "name": "unnamedWire#1",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "mux1_4#0",
-          "pinName": "I1_1"
-        },
-        "pin2": {
-          "compName": "Splitter#1",
-          "pinName": "O0"
-        },
-        "name": "unnamedWire#10",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "Splitter#1",
-          "pinName": "O3"
-        },
-        "pin2": {
-          "compName": "mux1_4#0",
-          "pinName": "I1_4"
-        },
-        "name": "unnamedWire#11",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "mux1_4#0",
-          "pinName": "I0_4"
-        },
-        "pin2": {
-          "compName": "Splitter#0",
-          "pinName": "O3"
-        },
-        "name": "unnamedWire#12",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "mux1_4#0",
-          "pinName": "I0_3"
-        },
-        "pin2": {
-          "compName": "Splitter#0",
-          "pinName": "O2"
-        },
-        "name": "unnamedWire#13",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "mux1_4#0",
-          "pinName": "I0_2"
-        },
-        "pin2": {
-          "compName": "Splitter#0",
-          "pinName": "O1"
-        },
-        "name": "unnamedWire#14",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "mux1_4#0",
-          "pinName": "I0_1"
-        },
-        "pin2": {
-          "compName": "Splitter#0",
-          "pinName": "O0"
-        },
-        "name": "unnamedWire#15",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "_submodelinterface",
-          "pinName": "S0"
-        },
-        "pin2": {
-          "compName": "WireCrossPoint#0",
-          "pinName": ""
-        },
-        "name": "unnamedWire#16",
-        "path": [
-          {
-            "x": 20.0,
-            "y": 25.0
-          }
-        ]
-      },
-      {
-        "pin1": {
-          "compName": "WireCrossPoint#0",
-          "pinName": ""
-        },
-        "pin2": {
-          "compName": "mux1_4#0",
-          "pinName": "S0"
-        },
-        "name": "unnamedWire#17",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "WireCrossPoint#0",
-          "pinName": ""
-        },
-        "pin2": {
-          "compName": "mux1_4#1",
-          "pinName": "S0"
-        },
-        "name": "unnamedWire#18",
-        "path": [
-          {
-            "x": 20.0,
-            "y": 130.0
-          }
-        ]
-      },
-      {
-        "pin1": {
-          "compName": "Splitter#0",
-          "pinName": "I"
-        },
-        "pin2": {
-          "compName": "_submodelinterface",
-          "pinName": "I00"
-        },
-        "name": "unnamedWire#19",
-        "path": [
-          {
-            "x": 15.0,
-            "y": 60.0
-          },
-          {
-            "x": 15.0,
-            "y": 75.0
-          }
-        ]
-      },
-      {
-        "pin1": {
-          "compName": "Splitter#2",
-          "pinName": "O2"
-        },
-        "pin2": {
-          "compName": "mux1_4#1",
-          "pinName": "I0_3"
-        },
-        "name": "unnamedWire#2",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "_submodelinterface",
-          "pinName": "I01"
-        },
-        "pin2": {
-          "compName": "Splitter#1",
-          "pinName": "I"
-        },
-        "name": "unnamedWire#20",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "Splitter#2",
-          "pinName": "I"
-        },
-        "pin2": {
-          "compName": "_submodelinterface",
-          "pinName": "I10"
-        },
-        "name": "unnamedWire#21",
-        "path": [
-          {
-            "x": 15.0,
-            "y": 155.0
-          },
-          {
-            "x": 15.0,
-            "y": 125.0
-          }
-        ]
-      },
-      {
-        "pin1": {
-          "compName": "_submodelinterface",
-          "pinName": "I11"
-        },
-        "pin2": {
-          "compName": "Splitter#3",
-          "pinName": "I"
-        },
-        "name": "unnamedWire#22",
-        "path": [
-          {
-            "x": 10.0,
-            "y": 150.0
-          },
-          {
-            "x": 10.0,
-            "y": 195.0
-          }
-        ]
-      },
-      {
-        "pin1": {
-          "compName": "mux1_4#0",
-          "pinName": "Y1"
-        },
-        "pin2": {
-          "compName": "mux1_4#2",
-          "pinName": "I0_1"
-        },
-        "name": "unnamedWire#23",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "mux1_4#2",
-          "pinName": "I0_2"
-        },
-        "pin2": {
-          "compName": "mux1_4#0",
-          "pinName": "Y2"
-        },
-        "name": "unnamedWire#24",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "mux1_4#0",
-          "pinName": "Y3"
-        },
-        "pin2": {
-          "compName": "mux1_4#2",
-          "pinName": "I0_3"
-        },
-        "name": "unnamedWire#25",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "mux1_4#2",
-          "pinName": "I0_4"
-        },
-        "pin2": {
-          "compName": "mux1_4#0",
-          "pinName": "Y4"
-        },
-        "name": "unnamedWire#26",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "mux1_4#2",
-          "pinName": "I1_1"
-        },
-        "pin2": {
-          "compName": "mux1_4#1",
-          "pinName": "Y1"
-        },
-        "name": "unnamedWire#27",
-        "path": [
-          {
-            "x": 80.0,
-            "y": 75.0
-          },
-          {
-            "x": 80.0,
-            "y": 130.0
-          }
-        ]
-      },
-      {
-        "pin1": {
-          "compName": "mux1_4#1",
-          "pinName": "Y2"
-        },
-        "pin2": {
-          "compName": "mux1_4#2",
-          "pinName": "I1_2"
-        },
-        "name": "unnamedWire#28",
-        "path": [
-          {
-            "x": 85.0,
-            "y": 140.0
-          },
-          {
-            "x": 85.0,
-            "y": 85.0
-          }
-        ]
-      },
-      {
-        "pin1": {
-          "compName": "mux1_4#2",
-          "pinName": "I1_3"
-        },
-        "pin2": {
-          "compName": "mux1_4#1",
-          "pinName": "Y3"
-        },
-        "name": "unnamedWire#29",
-        "path": [
-          {
-            "x": 90.0,
-            "y": 95.0
-          },
-          {
-            "x": 90.0,
-            "y": 150.0
-          }
-        ]
-      },
-      {
-        "pin1": {
-          "compName": "Splitter#3",
-          "pinName": "O0"
-        },
-        "pin2": {
-          "compName": "mux1_4#1",
-          "pinName": "I1_1"
-        },
-        "name": "unnamedWire#3",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "mux1_4#1",
-          "pinName": "Y4"
-        },
-        "pin2": {
-          "compName": "mux1_4#2",
-          "pinName": "I1_4"
-        },
-        "name": "unnamedWire#30",
-        "path": [
-          {
-            "x": 95.0,
-            "y": 160.0
-          },
-          {
-            "x": 95.0,
-            "y": 105.0
-          }
-        ]
-      },
-      {
-        "pin1": {
-          "compName": "Merger#0",
-          "pinName": "O"
-        },
-        "pin2": {
-          "compName": "_submodelinterface",
-          "pinName": "Y"
-        },
-        "name": "unnamedWire#31",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "Merger#0",
-          "pinName": "I0"
-        },
-        "pin2": {
-          "compName": "mux1_4#2",
-          "pinName": "Y1"
-        },
-        "name": "unnamedWire#32",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "mux1_4#2",
-          "pinName": "Y2"
-        },
-        "pin2": {
-          "compName": "Merger#0",
-          "pinName": "I1"
-        },
-        "name": "unnamedWire#33",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "Merger#0",
-          "pinName": "I2"
-        },
-        "pin2": {
-          "compName": "mux1_4#2",
-          "pinName": "Y3"
-        },
-        "name": "unnamedWire#34",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "mux1_4#2",
-          "pinName": "Y4"
-        },
-        "pin2": {
-          "compName": "Merger#0",
-          "pinName": "I3"
-        },
-        "name": "unnamedWire#35",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "_submodelinterface",
-          "pinName": "S1"
-        },
-        "pin2": {
-          "compName": "mux1_4#2",
-          "pinName": "S0"
-        },
-        "name": "unnamedWire#36",
-        "path": [
-          {
-            "x": 15.0,
-            "y": 50.0
-          },
-          {
-            "x": 15.0,
-            "y": 20.0
-          },
-          {
-            "x": 60.0,
-            "y": 20.0
-          },
-          {
-            "x": 60.0,
-            "y": 25.0
-          }
-        ]
-      },
-      {
-        "pin1": {
-          "compName": "mux1_4#1",
-          "pinName": "I0_4"
-        },
-        "pin2": {
-          "compName": "Splitter#2",
-          "pinName": "O3"
-        },
-        "name": "unnamedWire#4",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "Splitter#3",
-          "pinName": "O1"
-        },
-        "pin2": {
-          "compName": "mux1_4#1",
-          "pinName": "I1_2"
-        },
-        "name": "unnamedWire#5",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "mux1_4#1",
-          "pinName": "I1_3"
-        },
-        "pin2": {
-          "compName": "Splitter#3",
-          "pinName": "O2"
-        },
-        "name": "unnamedWire#6",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "Splitter#3",
-          "pinName": "O3"
-        },
-        "pin2": {
-          "compName": "mux1_4#1",
-          "pinName": "I1_4"
-        },
-        "name": "unnamedWire#7",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "Splitter#1",
-          "pinName": "O2"
-        },
-        "pin2": {
-          "compName": "mux1_4#0",
-          "pinName": "I1_3"
-        },
-        "name": "unnamedWire#8",
-        "path": []
-      },
-      {
-        "pin1": {
-          "compName": "Splitter#1",
-          "pinName": "O1"
-        },
-        "pin2": {
-          "compName": "mux1_4#0",
-          "pinName": "I1_2"
-        },
-        "name": "unnamedWire#9",
-        "path": []
-      }
-    ],
-    "version": "0.1.1"
-  },
-  "symbolRendererSnippetID": "simpleRectangularLike",
-  "symbolRendererParams": {
-    "centerText": "mux1_4",
-    "centerTextHeight": 5.0,
-    "horizontalComponentCenter": 17.5,
-    "pinLabelHeight": 3.5,
-    "pinLabelMargin": 0.5
-  },
-  "outlineRendererSnippetID": "default",
-  "highLevelStateHandlerSnippetID": "default",
-  "version": "0.1.5"
-}
\ No newline at end of file
index 3df19d7..6ab00c4 100644 (file)
@@ -44,7 +44,6 @@ mograsim version: 0.1.3
   "mux1_16": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/mux1_16.json",
   "mux1_4": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/mux1_4.json",
   "mux2": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/mux2.json",
-  "mux2_4": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/mux2_4.json",
   "mux3": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/mux3.json",
   "nand3": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/nand3.json",
   "not4": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/not4.json",
index b91f27e..0788589 100644 (file)
@@ -15,12 +15,14 @@ import java.util.function.Function;
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
 
+import net.haspamelodica.swt.helper.swtobjectwrappers.Point;
 import net.mograsim.logic.model.am2900.Am2900Loader;
 import net.mograsim.logic.model.model.LogicModelModifiable;
 import net.mograsim.logic.model.model.components.ModelComponent;
 import net.mograsim.logic.model.model.components.submodels.SubmodelComponent;
 import net.mograsim.logic.model.model.components.submodels.SubmodelInterface;
 import net.mograsim.logic.model.model.wires.ModelWire;
+import net.mograsim.logic.model.model.wires.ModelWireCrossPoint;
 import net.mograsim.logic.model.model.wires.MovablePin;
 import net.mograsim.logic.model.model.wires.Pin;
 import net.mograsim.logic.model.model.wires.PinUsage;
@@ -32,8 +34,11 @@ import net.mograsim.logic.model.snippets.highlevelstatehandlers.DefaultHighLevel
 
 public class ReserializeJSONsSettingUsages
 {
+       public static double GRIDSIZE = 2.5;
        public static boolean changePinUsages = false;
-       public static boolean changeComponentNames = true;
+       public static boolean changeComponentNames = false;
+       public static boolean snapWCPs = true;
+       public static boolean warnNonSnappedPoints = true;
 
        public static void main(String[] args) throws IOException
        {
@@ -105,9 +110,7 @@ public class ReserializeJSONsSettingUsages
                                                        {
                                                                System.out.print("  New name for component " + oldName + " of type " + subcomp.getIDForSerializing(iP)
                                                                                + " (empty: " + defaultName + ") >");
-//                                                             newName = sysin.nextLine();
-                                                               newName = "";
-                                                               System.out.println();
+                                                               newName = sysin.nextLine();
                                                                if (newName.equals(""))
                                                                        newName = defaultName;
                                                                if (tempModel.getComponentsByName().containsKey(newName))
@@ -132,21 +135,58 @@ public class ReserializeJSONsSettingUsages
                                                .filter(c -> !c.getName().equals(SubmodelComponent.SUBMODEL_INTERFACE_NAME)).findAny()).isPresent())
                                        submodelModifiable.destroyComponent(o.get());
 
-                               tempModel.getComponentsByName().values().stream().filter(c -> !c.getName().equals(SubmodelComponent.SUBMODEL_INTERFACE_NAME))
-                                               .forEach(c -> IndirectModelComponentCreator
-                                                               .createComponent(submodelModifiable, c.getIDForSerializing(iP), c.getParamsForSerializingJSON(iP), c.getName())
-                                                               .moveTo(c.getPosX(), c.getPosY()));
+                               tempModel.getComponentsByName().values().stream()
+                                               .filter(c -> !c.getName().equals(SubmodelComponent.SUBMODEL_INTERFACE_NAME))
+                                               .forEach(c -> IndirectModelComponentCreator.createComponent(submodelModifiable, c.getIDForSerializing(iP),
+                                                               c.getParamsForSerializingJSON(iP), c.getName()).moveTo(c.getPosX(), c.getPosY()));
                                for (ModelWire w : tempModel.getWiresByName().values())
                                        createWire(Function.identity(), submodelModifiable, w);
                        }
+                       if (snapWCPs)
+                               submodelModifiable.getComponentsByName().values().stream().filter(c -> c instanceof ModelWireCrossPoint).forEach(c ->
+                               {
+                                       double x = c.getPosX();
+                                       double y = c.getPosY();
+                                       c.moveTo(x % GRIDSIZE == 0 ? x - 1 : x, y % GRIDSIZE == 0 ? y - 1 : y);
+                               });
+                       if (warnNonSnappedPoints)
+                       {
+                               submodelModifiable.getComponentsByName().values().forEach(c ->
+                               {
+                                       double x = c.getPosX();
+                                       double y = c.getPosY();
+                                       if (c instanceof ModelWireCrossPoint)
+                                       {
+                                               x++;
+                                               y++;
+                                       }
+                                       if (x % GRIDSIZE != 0 || y % GRIDSIZE != 0)
+                                               System.out.println("  Component " + c.getName() + " (type " + c.getIDForSerializing(new IdentifyParams())
+                                                               + ") is not snapped to grid: " + x + "," + y);
+                               });
+                               submodelModifiable.getWiresByName().values().stream().forEach(w ->
+                               {
+                                       Point[] p = w.getPath();
+                                       if (p != null)
+                                               for (int i = 0; i < p.length; i++)
+                                                       if (p[i].x % GRIDSIZE != 0 || p[i].y % GRIDSIZE != 0)
+                                                               System.out.println(
+                                                                               "  Wire " + w.name + " path point #" + i + " is not snapped to grid: " + p[i].x + "," + p[i].y);
+                               });
+                               comp.getPins().values().forEach(p ->
+                               {
+                                       if (p.getRelX() % GRIDSIZE != 0 || p.getRelY() % GRIDSIZE != 0)
+                                               System.out.println("  Interface point " + p.name + " is not snapped to grid: " + p.getRelX() + "," + p.getRelY());
+                               });
+                       }
                        SubmodelComponentSerializer.serialize(comp, componentPath.toString());
                        if (changeComponentNames && (comp.getHighLevelStateHandler() == null
                                        || !(comp.getHighLevelStateHandler() instanceof DefaultHighLevelStateHandler)))
                        {
-                               System.out.println("A non-default HighLevelStateHandler was detected. Check for changes there manually.");
-                               System.out.print("Empty line to continue to next component, old component name to get new component name >");
+                               System.out.println("  A non-default HighLevelStateHandler was detected. Check for changes there manually.");
+                               System.out.print("  Empty line to continue to next component, old component name to get new component name >");
                                for (String line = sysin.nextLine(); !line.equals(""); line = sysin.nextLine())
-                                       System.out.println(line + "->" + componentNameRemapping.get(line) + " >");
+                                       System.out.println("  " + line + "->" + componentNameRemapping.get(line) + " >");
                        }
                }
                catch (Exception e)