Cleaned dlatch4
[Mograsim.git] / plugins / net.mograsim.logic.model.am2900 / components / net / mograsim / logic / model / am2900 / components / dlatch4.json
index bcac03d..d7b5651 100644 (file)
@@ -1,98 +1,68 @@
 {
-  "width": 35.0,
-  "height": 50.0,
+  "width": 40.0,
+  "height": 40.0,
   "interfacePins": [
     {
       "location": {
         "x": 0.0,
-        "y": 45.0
+        "y": 35.0
       },
       "name": "C",
       "logicWidth": 1,
       "usage": "INPUT"
     },
-    {
-      "location": {
-        "x": 0.0,
-        "y": 5.0
-      },
-      "name": "D1",
-      "logicWidth": 1,
-      "usage": "INPUT"
-    },
     {
       "location": {
         "x": 0.0,
         "y": 15.0
       },
-      "name": "D2",
-      "logicWidth": 1,
+      "name": "D",
+      "logicWidth": 4,
       "usage": "INPUT"
     },
     {
       "location": {
-        "x": 0.0,
-        "y": 25.0
-      },
-      "name": "D3",
-      "logicWidth": 1,
-      "usage": "INPUT"
-    },
-    {
-      "location": {
-        "x": 0.0,
-        "y": 35.0
-      },
-      "name": "D4",
-      "logicWidth": 1,
-      "usage": "INPUT"
-    },
-    {
-      "location": {
-        "x": 35.0,
-        "y": 5.0
-      },
-      "name": "Q1",
-      "logicWidth": 1,
-      "usage": "OUTPUT"
-    },
-    {
-      "location": {
-        "x": 35.0,
+        "x": 40.0,
         "y": 15.0
       },
-      "name": "Q2",
-      "logicWidth": 1,
-      "usage": "OUTPUT"
-    },
-    {
-      "location": {
-        "x": 35.0,
-        "y": 25.0
-      },
-      "name": "Q3",
-      "logicWidth": 1,
-      "usage": "OUTPUT"
-    },
-    {
-      "location": {
-        "x": 35.0,
-        "y": 35.0
-      },
-      "name": "Q4",
-      "logicWidth": 1,
+      "name": "Q",
+      "logicWidth": 4,
       "usage": "OUTPUT"
     }
   ],
   "innerScale": 0.4,
   "submodel": {
     "components": [
+      {
+        "id": "Splitter",
+        "name": "Splitter#0",
+        "pos": {
+          "x": 85.0,
+          "y": 22.5
+        },
+        "params": {
+          "logicWidth": 4,
+          "orientation": "LEFT"
+        }
+      },
+      {
+        "id": "Splitter",
+        "name": "Splitter#1",
+        "pos": {
+          "x": 5.0,
+          "y": 22.5
+        },
+        "params": {
+          "logicWidth": 4,
+          "orientation": "RIGHT"
+        }
+      },
       {
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#0",
         "pos": {
-          "x": 14.0,
-          "y": 46.5
+          "x": 29.0,
+          "y": 41.5
         },
         "params": 1
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#1",
         "pos": {
-          "x": 14.0,
-          "y": 71.5
+          "x": 29.0,
+          "y": 66.5
         },
         "params": 1
       },
         "id": "WireCrossPoint",
         "name": "WireCrossPoint#2",
         "pos": {
-          "x": 14.0,
-          "y": 96.5
+          "x": 29.0,
+          "y": 86.5
         },
         "params": 1
       },
         "id": "dlatch",
         "name": "dlatch#0",
         "pos": {
-          "x": 30.0,
-          "y": 7.5
+          "x": 35.0,
+          "y": 2.5
         }
       },
       {
         "id": "dlatch",
         "name": "dlatch#1",
         "pos": {
-          "x": 30.0,
-          "y": 32.5
+          "x": 35.0,
+          "y": 27.5
         }
       },
       {
         "id": "dlatch",
         "name": "dlatch#2",
         "pos": {
-          "x": 30.0,
-          "y": 57.5
+          "x": 35.0,
+          "y": 52.5
         }
       },
       {
         "id": "dlatch",
         "name": "dlatch#3",
         "pos": {
-          "x": 30.0,
-          "y": 82.5
+          "x": 35.0,
+          "y": 77.5
         }
       }
     ],
           "pinName": ""
         },
         "name": "unnamedWire#0",
-        "path": [
-          {
-            "x": 15.0,
-            "y": 112.5
-          }
-        ]
+        "path": []
       },
       {
         "pin1": {
           "pinName": "E"
         },
         "name": "unnamedWire#1",
-        "path": []
+        "path": [
+          {
+            "x": 30.0,
+            "y": 92.5
+          }
+        ]
       },
       {
         "pin1": {
         "name": "unnamedWire#6",
         "path": [
           {
-            "x": 15.0,
-            "y": 22.5
+            "x": 30.0,
+            "y": 17.5
           }
         ]
       },
       {
         "pin1": {
-          "compName": "_submodelinterface",
-          "pinName": "D1"
+          "compName": "Splitter#1",
+          "pinName": "O3"
         },
         "pin2": {
           "compName": "dlatch#0",
           "pinName": "D"
         },
         "name": "unnamedWire#7",
-        "path": []
+        "path": [
+          {
+            "x": 20.0,
+            "y": 22.5
+          },
+          {
+            "x": 20.0,
+            "y": 7.5
+          }
+        ]
       },
       {
         "pin1": {
-          "compName": "_submodelinterface",
-          "pinName": "D2"
-        },
-        "pin2": {
           "compName": "dlatch#1",
           "pinName": "D"
         },
+        "pin2": {
+          "compName": "Splitter#1",
+          "pinName": "O2"
+        },
         "name": "unnamedWire#8",
         "path": []
       },
       {
         "pin1": {
-          "compName": "_submodelinterface",
-          "pinName": "D3"
+          "compName": "Splitter#1",
+          "pinName": "O1"
         },
         "pin2": {
           "compName": "dlatch#2",
           "pinName": "D"
         },
         "name": "unnamedWire#9",
-        "path": []
+        "path": [
+          {
+            "x": 25.0,
+            "y": 42.5
+          },
+          {
+            "x": 25.0,
+            "y": 57.5
+          }
+        ]
       },
       {
         "pin1": {
-          "compName": "_submodelinterface",
-          "pinName": "D4"
-        },
-        "pin2": {
           "compName": "dlatch#3",
           "pinName": "D"
         },
+        "pin2": {
+          "compName": "Splitter#1",
+          "pinName": "O0"
+        },
         "name": "unnamedWire#10",
-        "path": []
+        "path": [
+          {
+            "x": 20.0,
+            "y": 82.5
+          },
+          {
+            "x": 20.0,
+            "y": 52.5
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "Q"
         },
         "pin2": {
-          "compName": "_submodelinterface",
-          "pinName": "Q1"
+          "compName": "Splitter#0",
+          "pinName": "O3"
         },
         "name": "unnamedWire#11",
-        "path": []
+        "path": [
+          {
+            "x": 80.0,
+            "y": 7.5
+          },
+          {
+            "x": 80.0,
+            "y": 22.5
+          }
+        ]
       },
       {
         "pin1": {
           "pinName": "Q"
         },
         "pin2": {
-          "compName": "_submodelinterface",
-          "pinName": "Q2"
+          "compName": "Splitter#0",
+          "pinName": "O2"
         },
         "name": "unnamedWire#12",
         "path": []
       },
       {
         "pin1": {
+          "compName": "Splitter#0",
+          "pinName": "O1"
+        },
+        "pin2": {
           "compName": "dlatch#2",
           "pinName": "Q"
         },
+        "name": "unnamedWire#13",
+        "path": [
+          {
+            "x": 75.0,
+            "y": 42.5
+          },
+          {
+            "x": 75.0,
+            "y": 57.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "dlatch#3",
+          "pinName": "Q"
+        },
         "pin2": {
+          "compName": "Splitter#0",
+          "pinName": "O0"
+        },
+        "name": "unnamedWire#14",
+        "path": [
+          {
+            "x": 80.0,
+            "y": 82.5
+          },
+          {
+            "x": 80.0,
+            "y": 52.5
+          }
+        ]
+      },
+      {
+        "pin1": {
           "compName": "_submodelinterface",
-          "pinName": "Q3"
+          "pinName": "D"
         },
-        "name": "unnamedWire#13",
+        "pin2": {
+          "compName": "Splitter#1",
+          "pinName": "I"
+        },
+        "name": "unnamedWire#15",
         "path": []
       },
       {
         "pin1": {
-          "compName": "dlatch#3",
-          "pinName": "Q"
+          "compName": "Splitter#0",
+          "pinName": "I"
         },
         "pin2": {
           "compName": "_submodelinterface",
-          "pinName": "Q4"
+          "pinName": "Q"
         },
-        "name": "unnamedWire#14",
+        "name": "unnamedWire#16",
         "path": []
       }
     ],
       "q1": {
         "id": "delegating",
         "params": {
-          "delegateTarget": "dlatch#0",
+          "delegateTarget": "dlatch#3",
           "subStateID": "q"
         }
       },
       "q2": {
         "id": "delegating",
         "params": {
-          "delegateTarget": "dlatch#1",
+          "delegateTarget": "dlatch#2",
           "subStateID": "q"
         }
       },
       "q3": {
         "id": "delegating",
         "params": {
-          "delegateTarget": "dlatch#2",
+          "delegateTarget": "dlatch#1",
           "subStateID": "q"
         }
       },
       "q4": {
         "id": "delegating",
         "params": {
-          "delegateTarget": "dlatch#3",
+          "delegateTarget": "dlatch#0",
           "subStateID": "q"
         }
       }