Merge branch 'development' of
authorFabian Stemmler <stemmler@in.tum.de>
Sat, 13 Jul 2019 10:33:03 +0000 (12:33 +0200)
committerFabian Stemmler <stemmler@in.tum.de>
Sat, 13 Jul 2019 10:33:03 +0000 (12:33 +0200)
https://gitlab.lrz.de/lrr-tum/students/eragp-misim-2019.git into
development

Conflicts:
net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/wires/GUIWire.java
net.mograsim.logic.ui/src/net/mograsim/logic/ui/serializing/DeserializedSubmodelComponent.java
net.mograsim.logic.ui/src/net/mograsim/logic/ui/serializing/IndirectGUIComponentCreator.java

61 files changed:
net.mograsim.logic.model.editor/.classpath [new file with mode: 0644]
net.mograsim.logic.model.editor/.gitignore [new file with mode: 0644]
net.mograsim.logic.model.editor/.project [new file with mode: 0644]
net.mograsim.logic.model.editor/.settings/org.eclipse.jdt.core.prefs [new file with mode: 0644]
net.mograsim.logic.model.editor/META-INF/MANIFEST.MF [new file with mode: 0644]
net.mograsim.logic.model.editor/build.properties [new file with mode: 0644]
net.mograsim.logic.model.editor/components/GUI_rsLatch.json [new file with mode: 0644]
net.mograsim.logic.model.editor/components/GUIand.json [new file with mode: 0644]
net.mograsim.logic.model.editor/components/GUIand41.json [new file with mode: 0644]
net.mograsim.logic.model.editor/components/GUIandor414.json [new file with mode: 0644]
net.mograsim.logic.model.editor/components/GUIdemux2.json [new file with mode: 0644]
net.mograsim.logic.model.editor/components/GUIdff.json [new file with mode: 0644]
net.mograsim.logic.model.editor/components/GUIdlatch.json [new file with mode: 0644]
net.mograsim.logic.model.editor/components/GUIdlatch4.json [new file with mode: 0644]
net.mograsim.logic.model.editor/components/GUIfulladder.json [new file with mode: 0644]
net.mograsim.logic.model.editor/components/GUIhalfadder.json [new file with mode: 0644]
net.mograsim.logic.model.editor/components/GUImux1.json [new file with mode: 0644]
net.mograsim.logic.model.editor/components/GUImux1_4.json [new file with mode: 0644]
net.mograsim.logic.model.editor/components/GUInand3.json [new file with mode: 0644]
net.mograsim.logic.model.editor/components/GUInot4.json [new file with mode: 0644]
net.mograsim.logic.model.editor/components/GUIor4.json [new file with mode: 0644]
net.mograsim.logic.model.editor/components/GUIor_4.json [new file with mode: 0644]
net.mograsim.logic.model.editor/components/GUIram2.json [new file with mode: 0644]
net.mograsim.logic.model.editor/components/GUIram4.json [new file with mode: 0644]
net.mograsim.logic.model.editor/components/GUIsel2_4.json [new file with mode: 0644]
net.mograsim.logic.model.editor/components/GUIsel3_4.json [new file with mode: 0644]
net.mograsim.logic.model.editor/components/GUIxor.json [new file with mode: 0644]
net.mograsim.logic.model.editor/components/am2901/GUIAm2901.json [new file with mode: 0644]
net.mograsim.logic.model.editor/components/am2901/GUIAm2901ALUFuncDecode.json [new file with mode: 0644]
net.mograsim.logic.model.editor/components/am2901/GUIAm2901ALUInclDecode.json [new file with mode: 0644]
net.mograsim.logic.model.editor/components/am2901/GUIAm2901ALUInclSourceDecodeInclFunctionDecode.json [new file with mode: 0644]
net.mograsim.logic.model.editor/components/am2901/GUIAm2901ALUOneBit.json [new file with mode: 0644]
net.mograsim.logic.model.editor/components/am2901/GUIAm2901DestDecode.json [new file with mode: 0644]
net.mograsim.logic.model.editor/components/am2901/GUIAm2901QReg.json [new file with mode: 0644]
net.mograsim.logic.model.editor/components/am2901/GUIAm2901SourceDecode.json [new file with mode: 0644]
net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/DialogManager.java [new file with mode: 0644]
net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/EditableSubmodelComponent.java [new file with mode: 0644]
net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/Editor.java [new file with mode: 0644]
net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/EditorCanvas.java [new file with mode: 0644]
net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/EditorGUI.java [new file with mode: 0644]
net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/EditorUserInput.java [new file with mode: 0644]
net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/SaveLoadManager.java [new file with mode: 0644]
net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/Selection.java [new file with mode: 0644]
net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/handles/ComponentHandle.java [new file with mode: 0644]
net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/handles/CornerHandle.java [new file with mode: 0644]
net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/handles/Handle.java [new file with mode: 0644]
net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/handles/HandleManager.java [new file with mode: 0644]
net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/handles/InterfacePinHandle.java [new file with mode: 0644]
net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/handles/PinHandle.java [new file with mode: 0644]
net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/handles/StaticPinHandle.java [new file with mode: 0644]
net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/handles/WireHandle.java [new file with mode: 0644]
net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/handles/WirePointHandle.java [new file with mode: 0644]
net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/states/BoxSelectionState.java [new file with mode: 0644]
net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/states/CreateWireState.java [new file with mode: 0644]
net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/states/EditorState.java [new file with mode: 0644]
net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/states/GrabState.java [new file with mode: 0644]
net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/states/SelectionState.java [new file with mode: 0644]
net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/states/StateManager.java [new file with mode: 0644]
net.mograsim.logic.model/src/net/mograsim/logic/model/model/wires/GUIWire.java
net.mograsim.logic.model/src/net/mograsim/logic/model/serializing/DeserializedSubmodelComponent.java
net.mograsim.logic.model/src/net/mograsim/logic/model/serializing/IndirectGUIComponentCreator.java

diff --git a/net.mograsim.logic.model.editor/.classpath b/net.mograsim.logic.model.editor/.classpath
new file mode 100644 (file)
index 0000000..c4b0fff
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
+               <attributes>
+                       <attribute name="module" value="true"/>
+               </attributes>
+       </classpathentry>
+       <classpathentry kind="src" path="src"/>
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+       <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/net.mograsim.logic.model.editor/.gitignore b/net.mograsim.logic.model.editor/.gitignore
new file mode 100644 (file)
index 0000000..ae3c172
--- /dev/null
@@ -0,0 +1 @@
+/bin/
diff --git a/net.mograsim.logic.model.editor/.project b/net.mograsim.logic.model.editor/.project
new file mode 100644 (file)
index 0000000..4f792a6
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>net.mograsim.logic.model.editor</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+               <nature>org.eclipse.pde.PluginNature</nature>
+       </natures>
+</projectDescription>
diff --git a/net.mograsim.logic.model.editor/.settings/org.eclipse.jdt.core.prefs b/net.mograsim.logic.model.editor/.settings/org.eclipse.jdt.core.prefs
new file mode 100644 (file)
index 0000000..e256158
--- /dev/null
@@ -0,0 +1,12 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=11
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.release=enabled
+org.eclipse.jdt.core.compiler.source=11
diff --git a/net.mograsim.logic.model.editor/META-INF/MANIFEST.MF b/net.mograsim.logic.model.editor/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..40d0654
--- /dev/null
@@ -0,0 +1,13 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Editor
+Bundle-SymbolicName: net.mograsim.logic.model.editor
+Bundle-Version: 0.1.0.qualifier
+Export-Package: net.mograsim.logic.model.editor,
+ net.mograsim.logic.model.editor.handles,
+ net.mograsim.logic.model.editor.states
+Require-Bundle: net.mograsim.logic.model;bundle-version="0.1.0",
+ net.mograsim.preferences;bundle-version="0.1.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-11
+Automatic-Module-Name: net.mograsim.logic.ui
+Bundle-Vendor: Mograsim Team
diff --git a/net.mograsim.logic.model.editor/build.properties b/net.mograsim.logic.model.editor/build.properties
new file mode 100644 (file)
index 0000000..d176327
--- /dev/null
@@ -0,0 +1,3 @@
+source.. = src/
+bin.includes = META-INF/,\
+               .,\
\ No newline at end of file
diff --git a/net.mograsim.logic.model.editor/components/GUI_rsLatch.json b/net.mograsim.logic.model.editor/components/GUI_rsLatch.json
new file mode 100644 (file)
index 0000000..a91b815
--- /dev/null
@@ -0,0 +1,222 @@
+mograsim version: 0.1.3
+{
+  "width": 35.0,
+  "height": 20.0,
+  "interfacePins": [
+    {
+      "location": {
+        "x": 35.0,
+        "y": 5.0
+      },
+      "name": "Q",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 15.0
+      },
+      "name": "_Q",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 15.0
+      },
+      "name": "_R",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 5.0
+      },
+      "name": "_S",
+      "logicWidth": 1
+    }
+  ],
+  "submodel": {
+    "innerScale": 0.4,
+    "subComps": [
+      {
+        "pos": {
+          "x": 40.0,
+          "y": 12.5
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#1",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 10.0,
+          "y": 7.5
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#0",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 64.0,
+          "y": 36.5
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#1",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 34.0,
+          "y": 16.5
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#0",
+        "params": 1
+      }
+    ],
+    "innerWires": [
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "_S"
+        },
+        "pin2": {
+          "compName": "GUINandGate#0",
+          "pinName": "A"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "_R"
+        },
+        "pin2": {
+          "compName": "GUINandGate#1",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 35.0,
+            "y": 37.5
+          },
+          {
+            "x": 35.0,
+            "y": 27.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#0",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#1",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "path": [
+          {
+            "x": 65.0,
+            "y": 22.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#1",
+          "pinName": "A"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#0",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 65.0,
+            "y": 42.5
+          },
+          {
+            "x": 5.0,
+            "y": 42.5
+          },
+          {
+            "x": 5.0,
+            "y": 22.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Q"
+        },
+        "path": [
+          {
+            "x": 35.0,
+            "y": 17.5
+          },
+          {
+            "x": 35.0,
+            "y": 7.5
+          },
+          {
+            "x": 65.0,
+            "y": 7.5
+          },
+          {
+            "x": 65.0,
+            "y": 12.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "_Q"
+        },
+        "path": []
+      }
+    ]
+  },
+  "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+  "symbolRendererParams": {
+    "centerText": "_rsLatch",
+    "horizontalComponentCenter": 17.5,
+    "centerTextHeight": 5.0,
+    "pinLabelHeight": 3.5,
+    "pinLabelMargin": 0.5
+  }
+}
\ No newline at end of file
diff --git a/net.mograsim.logic.model.editor/components/GUIand.json b/net.mograsim.logic.model.editor/components/GUIand.json
new file mode 100644 (file)
index 0000000..5877291
--- /dev/null
@@ -0,0 +1,146 @@
+mograsim version: 0.1.3
+{
+  "width": 35.0,
+  "height": 20.0,
+  "interfacePins": [
+    {
+      "location": {
+        "x": 0.0,
+        "y": 5.0
+      },
+      "name": "A",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 15.0
+      },
+      "name": "B",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 5.0
+      },
+      "name": "Y",
+      "logicWidth": 1
+    }
+  ],
+  "submodel": {
+    "innerScale": 0.4,
+    "subComps": [
+      {
+        "pos": {
+          "x": 50.0,
+          "y": 15.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#1",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 20.0,
+          "y": 15.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#0",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 44.0,
+          "y": 24.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#0",
+        "params": 1
+      }
+    ],
+    "innerWires": [
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "A"
+        },
+        "pin2": {
+          "compName": "GUINandGate#0",
+          "pinName": "A"
+        }
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "B"
+        },
+        "pin2": {
+          "compName": "GUINandGate#0",
+          "pinName": "B"
+        }
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#0",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#1",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 45.0,
+            "y": 20.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#1",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 45.0,
+            "y": 30.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#1",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Y"
+        }
+      }
+    ]
+  },
+  "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+  "symbolRendererParams": {
+    "centerText": "GUIand",
+    "horizontalComponentCenter": 17.5,
+    "centerTextHeight": 5.0,
+    "pinLabelHeight": 3.5,
+    "pinLabelMargin": 0.5
+  }
+}
\ No newline at end of file
diff --git a/net.mograsim.logic.model.editor/components/GUIand41.json b/net.mograsim.logic.model.editor/components/GUIand41.json
new file mode 100644 (file)
index 0000000..973a4c9
--- /dev/null
@@ -0,0 +1,328 @@
+mograsim version: 0.1.3
+{
+  "width": 35.0,
+  "height": 50.0,
+  "interfacePins": [
+    {
+      "location": {
+        "x": 0.0,
+        "y": 5.0
+      },
+      "name": "A1",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 15.0
+      },
+      "name": "A2",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 25.0
+      },
+      "name": "A3",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 45.0
+      },
+      "name": "B",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 35.0
+      },
+      "name": "A4",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 5.0
+      },
+      "name": "Y1",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 15.0
+      },
+      "name": "Y2",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 25.0
+      },
+      "name": "Y3",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 35.0
+      },
+      "name": "Y4",
+      "logicWidth": 1
+    }
+  ],
+  "submodel": {
+    "innerScale": 0.4,
+    "subComps": [
+      {
+        "pos": {
+          "x": 24.0,
+          "y": 71.5
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#1",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 24.0,
+          "y": 46.5
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#0",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 24.0,
+          "y": 96.5
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#2",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 30.0,
+          "y": 7.5
+        },
+        "id": "GUIand",
+        "name": "GUIand#0"
+      },
+      {
+        "pos": {
+          "x": 30.0,
+          "y": 57.5
+        },
+        "id": "GUIand",
+        "name": "GUIand#2"
+      },
+      {
+        "pos": {
+          "x": 30.0,
+          "y": 32.5
+        },
+        "id": "GUIand",
+        "name": "GUIand#1"
+      },
+      {
+        "pos": {
+          "x": 30.0,
+          "y": 82.5
+        },
+        "id": "GUIand",
+        "name": "GUIand#3"
+      }
+    ],
+    "innerWires": [
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "A1"
+        },
+        "pin2": {
+          "compName": "GUIand#0",
+          "pinName": "A"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "A2"
+        },
+        "pin2": {
+          "compName": "GUIand#1",
+          "pinName": "A"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "A3"
+        },
+        "pin2": {
+          "compName": "GUIand#2",
+          "pinName": "A"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "A4"
+        },
+        "pin2": {
+          "compName": "GUIand#3",
+          "pinName": "A"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "B"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "path": [
+          {
+            "x": 25.0,
+            "y": 112.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIand#3",
+          "pinName": "B"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIand#2",
+          "pinName": "B"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIand#1",
+          "pinName": "B"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIand#0",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 25.0,
+            "y": 22.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIand#0",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Y1"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIand#1",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Y2"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIand#2",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Y3"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIand#3",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Y4"
+        },
+        "path": []
+      }
+    ]
+  },
+  "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+  "symbolRendererParams": {
+    "centerText": "GUIand41",
+    "horizontalComponentCenter": 17.5,
+    "centerTextHeight": 5.0,
+    "pinLabelHeight": 3.5,
+    "pinLabelMargin": 0.5
+  }
+}
\ No newline at end of file
diff --git a/net.mograsim.logic.model.editor/components/GUIandor414.json b/net.mograsim.logic.model.editor/components/GUIandor414.json
new file mode 100644 (file)
index 0000000..5cadf0f
--- /dev/null
@@ -0,0 +1,487 @@
+mograsim version: 0.1.3
+{
+  "width": 35.0,
+  "height": 90.0,
+  "interfacePins": [
+    {
+      "location": {
+        "x": 0.0,
+        "y": 85.0
+      },
+      "name": "B",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 5.0
+      },
+      "name": "C1",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 15.0
+      },
+      "name": "C2",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 25.0
+      },
+      "name": "C3",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 45.0
+      },
+      "name": "A1",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 35.0
+      },
+      "name": "C4",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 55.0
+      },
+      "name": "A2",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 65.0
+      },
+      "name": "A3",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 75.0
+      },
+      "name": "A4",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 5.0
+      },
+      "name": "Y1",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 15.0
+      },
+      "name": "Y2",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 25.0
+      },
+      "name": "Y3",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 35.0
+      },
+      "name": "Y4",
+      "logicWidth": 1
+    }
+  ],
+  "submodel": {
+    "innerScale": 0.4,
+    "subComps": [
+      {
+        "pos": {
+          "x": 35.0,
+          "y": 37.5
+        },
+        "id": "GUIor_4",
+        "name": "GUIor_4#0"
+      },
+      {
+        "pos": {
+          "x": 15.0,
+          "y": 137.5
+        },
+        "id": "GUIand41",
+        "name": "GUIand41#0"
+      }
+    ],
+    "innerWires": [
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "A1"
+        },
+        "pin2": {
+          "compName": "GUIand41#0",
+          "pinName": "A1"
+        },
+        "path": [
+          {
+            "x": 10.0,
+            "y": 112.5
+          },
+          {
+            "x": 10.0,
+            "y": 142.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "A2"
+        },
+        "pin2": {
+          "compName": "GUIand41#0",
+          "pinName": "A2"
+        },
+        "path": [
+          {
+            "x": 5.0,
+            "y": 137.5
+          },
+          {
+            "x": 5.0,
+            "y": 152.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "A3"
+        },
+        "pin2": {
+          "compName": "GUIand41#0",
+          "pinName": "A3"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "A4"
+        },
+        "pin2": {
+          "compName": "GUIand41#0",
+          "pinName": "A4"
+        },
+        "path": [
+          {
+            "x": 5.0,
+            "y": 187.5
+          },
+          {
+            "x": 5.0,
+            "y": 172.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "B"
+        },
+        "pin2": {
+          "compName": "GUIand41#0",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 10.0,
+            "y": 212.5
+          },
+          {
+            "x": 10.0,
+            "y": 182.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "C1"
+        },
+        "pin2": {
+          "compName": "GUIor_4#0",
+          "pinName": "A1"
+        },
+        "path": [
+          {
+            "x": 10.0,
+            "y": 12.5
+          },
+          {
+            "x": 10.0,
+            "y": 42.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "C2"
+        },
+        "pin2": {
+          "compName": "GUIor_4#0",
+          "pinName": "A2"
+        },
+        "path": [
+          {
+            "x": 5.0,
+            "y": 37.5
+          },
+          {
+            "x": 5.0,
+            "y": 52.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "C3"
+        },
+        "pin2": {
+          "compName": "GUIor_4#0",
+          "pinName": "A3"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "C4"
+        },
+        "pin2": {
+          "compName": "GUIor_4#0",
+          "pinName": "A4"
+        },
+        "path": [
+          {
+            "x": 5.0,
+            "y": 87.5
+          },
+          {
+            "x": 5.0,
+            "y": 72.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIand41#0",
+          "pinName": "Y1"
+        },
+        "pin2": {
+          "compName": "GUIor_4#0",
+          "pinName": "B1"
+        },
+        "path": [
+          {
+            "x": 70.0,
+            "y": 142.5
+          },
+          {
+            "x": 70.0,
+            "y": 120.0
+          },
+          {
+            "x": 30.0,
+            "y": 120.0
+          },
+          {
+            "x": 30.0,
+            "y": 82.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIand41#0",
+          "pinName": "Y2"
+        },
+        "pin2": {
+          "compName": "GUIor_4#0",
+          "pinName": "B2"
+        },
+        "path": [
+          {
+            "x": 65.0,
+            "y": 152.5
+          },
+          {
+            "x": 65.0,
+            "y": 125.0
+          },
+          {
+            "x": 25.0,
+            "y": 125.0
+          },
+          {
+            "x": 25.0,
+            "y": 92.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIand41#0",
+          "pinName": "Y3"
+        },
+        "pin2": {
+          "compName": "GUIor_4#0",
+          "pinName": "B3"
+        },
+        "path": [
+          {
+            "x": 60.0,
+            "y": 162.5
+          },
+          {
+            "x": 60.0,
+            "y": 130.0
+          },
+          {
+            "x": 20.0,
+            "y": 130.0
+          },
+          {
+            "x": 20.0,
+            "y": 102.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIand41#0",
+          "pinName": "Y4"
+        },
+        "pin2": {
+          "compName": "GUIor_4#0",
+          "pinName": "B4"
+        },
+        "path": [
+          {
+            "x": 55.0,
+            "y": 172.5
+          },
+          {
+            "x": 55.0,
+            "y": 135.0
+          },
+          {
+            "x": 15.0,
+            "y": 135.0
+          },
+          {
+            "x": 15.0,
+            "y": 112.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIor_4#0",
+          "pinName": "Y1"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Y1"
+        },
+        "path": [
+          {
+            "x": 75.0,
+            "y": 42.5
+          },
+          {
+            "x": 75.0,
+            "y": 12.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIor_4#0",
+          "pinName": "Y2"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Y2"
+        },
+        "path": [
+          {
+            "x": 80.0,
+            "y": 52.5
+          },
+          {
+            "x": 80.0,
+            "y": 37.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIor_4#0",
+          "pinName": "Y3"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Y3"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIor_4#0",
+          "pinName": "Y4"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Y4"
+        },
+        "path": [
+          {
+            "x": 80.0,
+            "y": 72.5
+          },
+          {
+            "x": 80.0,
+            "y": 87.5
+          }
+        ]
+      }
+    ]
+  },
+  "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+  "symbolRendererParams": {
+    "centerText": "GUIandor414",
+    "horizontalComponentCenter": 17.5,
+    "centerTextHeight": 5.0,
+    "pinLabelHeight": 3.5,
+    "pinLabelMargin": 0.5
+  }
+}
\ No newline at end of file
diff --git a/net.mograsim.logic.model.editor/components/GUIdemux2.json b/net.mograsim.logic.model.editor/components/GUIdemux2.json
new file mode 100644 (file)
index 0000000..5ded84b
--- /dev/null
@@ -0,0 +1,511 @@
+mograsim version: 0.1.3
+{
+  "width": 35.0,
+  "height": 40.0,
+  "interfacePins": [
+    {
+      "location": {
+        "x": 35.0,
+        "y": 5.0
+      },
+      "name": "Y00",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 35.0
+      },
+      "name": "Y11",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 25.0
+      },
+      "name": "Y10",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 15.0
+      },
+      "name": "Y01",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 5.0
+      },
+      "name": "S0",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 15.0
+      },
+      "name": "S1",
+      "logicWidth": 1
+    }
+  ],
+  "submodel": {
+    "innerScale": 0.4,
+    "subComps": [
+      {
+        "pos": {
+          "x": 10.0,
+          "y": 27.5
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#1",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 10.0,
+          "y": 2.5
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#0",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 40.0,
+          "y": 2.5
+        },
+        "id": "GUIand",
+        "name": "GUIand#0"
+      },
+      {
+        "pos": {
+          "x": 40.0,
+          "y": 52.5
+        },
+        "id": "GUIand",
+        "name": "GUIand#2"
+      },
+      {
+        "pos": {
+          "x": 40.0,
+          "y": 27.5
+        },
+        "id": "GUIand",
+        "name": "GUIand#1"
+      },
+      {
+        "pos": {
+          "x": 40.0,
+          "y": 77.5
+        },
+        "id": "GUIand",
+        "name": "GUIand#3"
+      },
+      {
+        "pos": {
+          "x": 6.5,
+          "y": 16.5
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#1",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 6.5,
+          "y": 11.5
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#0",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 4.0,
+          "y": 36.5
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#3",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 36.5,
+          "y": 61.5
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#2",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 31.5,
+          "y": 66.5
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#5",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 4.0,
+          "y": 41.5
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#4",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 34.0,
+          "y": 36.5
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#7",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 31.5,
+          "y": 11.5
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#6",
+        "params": 1
+      }
+    ],
+    "innerWires": [
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "S0"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "S1"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#3",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#0",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 7.5,
+            "y": 7.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#3",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#1",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 5.0,
+            "y": 32.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#3",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#4",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#0",
+          "pinName": "B"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#4",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#1",
+          "pinName": "B"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "path": [
+          {
+            "x": 7.5,
+            "y": 62.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#4",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#5",
+          "pinName": ""
+        },
+        "path": [
+          {
+            "x": 5.0,
+            "y": 67.5
+          },
+          {
+            "x": 32.5,
+            "y": 67.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#0",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#6",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#1",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#7",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#6",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIand#0",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 32.5,
+            "y": 7.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#7",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIand#0",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 35.0,
+            "y": 17.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIand#1",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 37.5,
+            "y": 32.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#7",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIand#1",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 35.0,
+            "y": 42.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#6",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIand#2",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 32.5,
+            "y": 57.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#5",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIand#2",
+          "pinName": "B"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIand#3",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 37.5,
+            "y": 82.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#5",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIand#3",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 32.5,
+            "y": 92.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIand#0",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Y00"
+        }
+      },
+      {
+        "pin1": {
+          "compName": "GUIand#1",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Y01"
+        }
+      },
+      {
+        "pin1": {
+          "compName": "GUIand#2",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Y10"
+        }
+      },
+      {
+        "pin1": {
+          "compName": "GUIand#3",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Y11"
+        }
+      }
+    ]
+  },
+  "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+  "symbolRendererParams": {
+    "centerText": "GUIdemux2",
+    "horizontalComponentCenter": 17.5,
+    "centerTextHeight": 5.0,
+    "pinLabelHeight": 3.5,
+    "pinLabelMargin": 0.5
+  }
+}
\ No newline at end of file
diff --git a/net.mograsim.logic.model.editor/components/GUIdff.json b/net.mograsim.logic.model.editor/components/GUIdff.json
new file mode 100644 (file)
index 0000000..55151f8
--- /dev/null
@@ -0,0 +1,328 @@
+mograsim version: 0.1.3
+{
+  "width": 35.0,
+  "height": 20.0,
+  "interfacePins": [
+    {
+      "location": {
+        "x": 35.0,
+        "y": 5.0
+      },
+      "name": "Q",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 15.0
+      },
+      "name": "_Q",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 5.0
+      },
+      "name": "C",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 15.0
+      },
+      "name": "D",
+      "logicWidth": 1
+    }
+  ],
+  "submodel": {
+    "innerScale": 0.2,
+    "subComps": [
+      {
+        "pos": {
+          "x": 40.0,
+          "y": 10.0
+        },
+        "id": "GUI_rsLatch",
+        "name": "GUI_rsLatch#0"
+      },
+      {
+        "pos": {
+          "x": 40.0,
+          "y": 40.0
+        },
+        "id": "GUInand3",
+        "name": "GUInand3#0"
+      },
+      {
+        "pos": {
+          "x": 120.0,
+          "y": 60.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#0",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 120.0,
+          "y": 30.0
+        },
+        "id": "GUI_rsLatch",
+        "name": "GUI_rsLatch#1"
+      },
+      {
+        "pos": {
+          "x": 19.0,
+          "y": 64.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#1",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 9.0,
+          "y": 24.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#0",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 99.0,
+          "y": 44.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#3",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 99.0,
+          "y": 34.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#2",
+        "params": 1
+      }
+    ],
+    "innerWires": [
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "C"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUI_rsLatch#0",
+          "pinName": "_R"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUInand3#0",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 10.0,
+            "y": 55.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "D"
+        },
+        "pin2": {
+          "compName": "GUINandGate#0",
+          "pinName": "B"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#0",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "path": [
+          {
+            "x": 145.0,
+            "y": 70.0
+          },
+          {
+            "x": 145.0,
+            "y": 85.0
+          },
+          {
+            "x": 20.0,
+            "y": 85.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUI_rsLatch#0",
+          "pinName": "_S"
+        },
+        "path": [
+          {
+            "x": 20.0,
+            "y": 15.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUInand3#0",
+          "pinName": "C"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUI_rsLatch#0",
+          "pinName": "_Q"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "path": [
+          {
+            "x": 100.0,
+            "y": 25.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUInand3#0",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 30.0,
+            "y": 35.0
+          },
+          {
+            "x": 30.0,
+            "y": 45.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUI_rsLatch#1",
+          "pinName": "_S"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUInand3#0",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#3",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#3",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUI_rsLatch#1",
+          "pinName": "_R"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#3",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#0",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 100.0,
+            "y": 65.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUI_rsLatch#1",
+          "pinName": "Q"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Q"
+        }
+      },
+      {
+        "pin1": {
+          "compName": "GUI_rsLatch#1",
+          "pinName": "_Q"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "_Q"
+        }
+      }
+    ]
+  },
+  "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+  "symbolRendererParams": {
+    "centerText": "GUIdff",
+    "horizontalComponentCenter": 17.5,
+    "centerTextHeight": 5.0,
+    "pinLabelHeight": 3.5,
+    "pinLabelMargin": 0.5
+  }
+}
\ No newline at end of file
diff --git a/net.mograsim.logic.model.editor/components/GUIdlatch.json b/net.mograsim.logic.model.editor/components/GUIdlatch.json
new file mode 100644 (file)
index 0000000..69562ce
--- /dev/null
@@ -0,0 +1,238 @@
+mograsim version: 0.1.3
+{
+  "width": 35.0,
+  "height": 20.0,
+  "interfacePins": [
+    {
+      "location": {
+        "x": 35.0,
+        "y": 5.0
+      },
+      "name": "Q",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 15.0
+      },
+      "name": "_Q",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 5.0
+      },
+      "name": "D",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 15.0
+      },
+      "name": "E",
+      "logicWidth": 1
+    }
+  ],
+  "submodel": {
+    "innerScale": 0.4,
+    "subComps": [
+      {
+        "pos": {
+          "x": 15.0,
+          "y": 27.5
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#1",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 45.0,
+          "y": 7.5
+        },
+        "id": "GUI_rsLatch",
+        "name": "GUI_rsLatch#0"
+      },
+      {
+        "pos": {
+          "x": 10.0,
+          "y": 2.5
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#0",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 34.0,
+          "y": 11.5
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#1",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 4.0,
+          "y": 36.5
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#0",
+        "params": 1
+      }
+    ],
+    "innerWires": [
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "D"
+        },
+        "pin2": {
+          "compName": "GUINandGate#0",
+          "pinName": "A"
+        }
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "E"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#0",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 5.0,
+            "y": 17.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#1",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 5.0,
+            "y": 42.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#0",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#1",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 35.0,
+            "y": 25.0
+          },
+          {
+            "x": 10.0,
+            "y": 25.0
+          },
+          {
+            "x": 10.0,
+            "y": 32.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUI_rsLatch#0",
+          "pinName": "_S"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#1",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUI_rsLatch#0",
+          "pinName": "_R"
+        },
+        "path": [
+          {
+            "x": 40.0,
+            "y": 37.5
+          },
+          {
+            "x": 40.0,
+            "y": 22.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUI_rsLatch#0",
+          "pinName": "Q"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Q"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUI_rsLatch#0",
+          "pinName": "_Q"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "_Q"
+        }
+      }
+    ]
+  },
+  "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+  "symbolRendererParams": {
+    "centerText": "GUIdlatch",
+    "horizontalComponentCenter": 17.5,
+    "centerTextHeight": 5.0,
+    "pinLabelHeight": 3.5,
+    "pinLabelMargin": 0.5
+  }
+}
\ No newline at end of file
diff --git a/net.mograsim.logic.model.editor/components/GUIdlatch4.json b/net.mograsim.logic.model.editor/components/GUIdlatch4.json
new file mode 100644 (file)
index 0000000..29f4ac0
--- /dev/null
@@ -0,0 +1,328 @@
+mograsim version: 0.1.3
+{
+  "width": 35.0,
+  "height": 50.0,
+  "interfacePins": [
+    {
+      "location": {
+        "x": 0.0,
+        "y": 35.0
+      },
+      "name": "D4",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 5.0
+      },
+      "name": "Q1",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 15.0
+      },
+      "name": "Q2",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 25.0
+      },
+      "name": "Q3",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 45.0
+      },
+      "name": "C",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 35.0
+      },
+      "name": "Q4",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 5.0
+      },
+      "name": "D1",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 15.0
+      },
+      "name": "D2",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 25.0
+      },
+      "name": "D3",
+      "logicWidth": 1
+    }
+  ],
+  "submodel": {
+    "innerScale": 0.4,
+    "subComps": [
+      {
+        "pos": {
+          "x": 14.0,
+          "y": 71.5
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#1",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 14.0,
+          "y": 46.5
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#0",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 14.0,
+          "y": 96.5
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#2",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 30.0,
+          "y": 32.5
+        },
+        "id": "GUIdlatch",
+        "name": "GUIdlatch#1"
+      },
+      {
+        "pos": {
+          "x": 30.0,
+          "y": 7.5
+        },
+        "id": "GUIdlatch",
+        "name": "GUIdlatch#0"
+      },
+      {
+        "pos": {
+          "x": 30.0,
+          "y": 82.5
+        },
+        "id": "GUIdlatch",
+        "name": "GUIdlatch#3"
+      },
+      {
+        "pos": {
+          "x": 30.0,
+          "y": 57.5
+        },
+        "id": "GUIdlatch",
+        "name": "GUIdlatch#2"
+      }
+    ],
+    "innerWires": [
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "C"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "path": [
+          {
+            "x": 15.0,
+            "y": 112.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIdlatch#3",
+          "pinName": "E"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIdlatch#2",
+          "pinName": "E"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIdlatch#1",
+          "pinName": "E"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIdlatch#0",
+          "pinName": "E"
+        },
+        "path": [
+          {
+            "x": 15.0,
+            "y": 22.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "D1"
+        },
+        "pin2": {
+          "compName": "GUIdlatch#0",
+          "pinName": "D"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "D2"
+        },
+        "pin2": {
+          "compName": "GUIdlatch#1",
+          "pinName": "D"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "D3"
+        },
+        "pin2": {
+          "compName": "GUIdlatch#2",
+          "pinName": "D"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "D4"
+        },
+        "pin2": {
+          "compName": "GUIdlatch#3",
+          "pinName": "D"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIdlatch#0",
+          "pinName": "Q"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Q1"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIdlatch#1",
+          "pinName": "Q"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Q2"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIdlatch#2",
+          "pinName": "Q"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Q3"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIdlatch#3",
+          "pinName": "Q"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Q4"
+        },
+        "path": []
+      }
+    ]
+  },
+  "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+  "symbolRendererParams": {
+    "centerText": "GUIdlatch4",
+    "horizontalComponentCenter": 17.5,
+    "centerTextHeight": 5.0,
+    "pinLabelHeight": 3.5,
+    "pinLabelMargin": 0.5
+  }
+}
\ No newline at end of file
diff --git a/net.mograsim.logic.model.editor/components/GUIfulladder.json b/net.mograsim.logic.model.editor/components/GUIfulladder.json
new file mode 100644 (file)
index 0000000..dc4c616
--- /dev/null
@@ -0,0 +1,188 @@
+mograsim version: 0.1.3
+{
+  "width": 35.0,
+  "height": 30.0,
+  "interfacePins": [
+    {
+      "location": {
+        "x": 0.0,
+        "y": 5.0
+      },
+      "name": "A",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 15.0
+      },
+      "name": "B",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 25.0
+      },
+      "name": "C",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 5.0
+      },
+      "name": "Y",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 15.0
+      },
+      "name": "Z",
+      "logicWidth": 1
+    }
+  ],
+  "submodel": {
+    "innerScale": 0.4,
+    "subComps": [
+      {
+        "pos": {
+          "x": 57.5,
+          "y": 40.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#0",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 5.0,
+          "y": 40.0
+        },
+        "id": "GUIhalfadder",
+        "name": "GUIhalfadder#0"
+      },
+      {
+        "pos": {
+          "x": 45.0,
+          "y": 7.5
+        },
+        "id": "GUIhalfadder",
+        "name": "GUIhalfadder#1"
+      }
+    ],
+    "innerWires": [
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "A"
+        },
+        "pin2": {
+          "compName": "GUIhalfadder#1",
+          "pinName": "A"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "B"
+        },
+        "pin2": {
+          "compName": "GUIhalfadder#0",
+          "pinName": "A"
+        }
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "C"
+        },
+        "pin2": {
+          "compName": "GUIhalfadder#0",
+          "pinName": "B"
+        }
+      },
+      {
+        "pin1": {
+          "compName": "GUIhalfadder#0",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUIhalfadder#1",
+          "pinName": "B"
+        }
+      },
+      {
+        "pin1": {
+          "compName": "GUIhalfadder#0",
+          "pinName": "_Z"
+        },
+        "pin2": {
+          "compName": "GUINandGate#0",
+          "pinName": "B"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIhalfadder#1",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Y"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIhalfadder#1",
+          "pinName": "_Z"
+        },
+        "pin2": {
+          "compName": "GUINandGate#0",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 82.5,
+            "y": 22.5
+          },
+          {
+            "x": 82.5,
+            "y": 35.0
+          },
+          {
+            "x": 52.5,
+            "y": 35.0
+          },
+          {
+            "x": 52.5,
+            "y": 45.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#0",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Z"
+        }
+      }
+    ]
+  },
+  "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+  "symbolRendererParams": {
+    "centerText": "GUIfulladder",
+    "horizontalComponentCenter": 17.5,
+    "centerTextHeight": 5.0,
+    "pinLabelHeight": 3.5,
+    "pinLabelMargin": 0.5
+  }
+}
\ No newline at end of file
diff --git a/net.mograsim.logic.model.editor/components/GUIhalfadder.json b/net.mograsim.logic.model.editor/components/GUIhalfadder.json
new file mode 100644 (file)
index 0000000..761d6ce
--- /dev/null
@@ -0,0 +1,317 @@
+mograsim version: 0.1.3
+{
+  "width": 35.0,
+  "height": 20.0,
+  "interfacePins": [
+    {
+      "location": {
+        "x": 0.0,
+        "y": 5.0
+      },
+      "name": "A",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 15.0
+      },
+      "name": "B",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 5.0
+      },
+      "name": "Y",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 15.0
+      },
+      "name": "_Z",
+      "logicWidth": 1
+    }
+  ],
+  "submodel": {
+    "innerScale": 0.4,
+    "subComps": [
+      {
+        "pos": {
+          "x": 40.0,
+          "y": 2.5
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#1",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 10.0,
+          "y": 15.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#0",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 65.0,
+          "y": 2.5
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#3",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 4.0,
+          "y": 36.5
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#1",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 40.0,
+          "y": 27.5
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#2",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 4.0,
+          "y": 11.5
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#0",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 34.0,
+          "y": 24.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#2",
+        "params": 1
+      }
+    ],
+    "innerWires": [
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "A"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#1",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 5.0,
+            "y": 7.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#0",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 5.0,
+            "y": 20.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "B"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#2",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 5.0,
+            "y": 42.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#0",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 5.0,
+            "y": 30.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#0",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "_Z"
+        },
+        "path": [
+          {
+            "x": 80.0,
+            "y": 25.0
+          },
+          {
+            "x": 80.0,
+            "y": 37.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#1",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 35.0,
+            "y": 17.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#2",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 35.0,
+            "y": 32.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#1",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUINandGate#3",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 62.5,
+            "y": 12.5
+          },
+          {
+            "x": 62.5,
+            "y": 7.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#2",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUINandGate#3",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 62.5,
+            "y": 37.5
+          },
+          {
+            "x": 62.5,
+            "y": 17.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#3",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Y"
+        },
+        "path": []
+      }
+    ]
+  },
+  "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+  "symbolRendererParams": {
+    "centerText": "GUIhalfadder",
+    "horizontalComponentCenter": 17.5,
+    "centerTextHeight": 5.0,
+    "pinLabelHeight": 3.5,
+    "pinLabelMargin": 0.5
+  }
+}
\ No newline at end of file
diff --git a/net.mograsim.logic.model.editor/components/GUImux1.json b/net.mograsim.logic.model.editor/components/GUImux1.json
new file mode 100644 (file)
index 0000000..7ce9002
--- /dev/null
@@ -0,0 +1,230 @@
+mograsim version: 0.1.3
+{
+  "width": 35.0,
+  "height": 30.0,
+  "interfacePins": [
+    {
+      "location": {
+        "x": 0.0,
+        "y": 15.0
+      },
+      "name": "I0",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 25.0
+      },
+      "name": "I1",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 5.0
+      },
+      "name": "Y",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 5.0
+      },
+      "name": "S0",
+      "logicWidth": 1
+    }
+  ],
+  "submodel": {
+    "innerScale": 0.4,
+    "subComps": [
+      {
+        "pos": {
+          "x": 35.0,
+          "y": 22.5
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#1",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 10.0,
+          "y": 7.5
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#0",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 60.0,
+          "y": 30.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#3",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 4.0,
+          "y": 21.5
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#1",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 35.0,
+          "y": 47.5
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#2",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 4.0,
+          "y": 11.5
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#0",
+        "params": 1
+      }
+    ],
+    "innerWires": [
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "S0"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#0",
+          "pinName": "A"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#0",
+          "pinName": "B"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#0",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUINandGate#1",
+          "pinName": "A"
+        }
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "I0"
+        },
+        "pin2": {
+          "compName": "GUINandGate#1",
+          "pinName": "B"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#2",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 5.0,
+            "y": 52.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "I1"
+        },
+        "pin2": {
+          "compName": "GUINandGate#2",
+          "pinName": "B"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#1",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUINandGate#3",
+          "pinName": "A"
+        }
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#2",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUINandGate#3",
+          "pinName": "B"
+        }
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#3",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Y"
+        }
+      }
+    ]
+  },
+  "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+  "symbolRendererParams": {
+    "centerText": "GUImux1",
+    "horizontalComponentCenter": 17.5,
+    "centerTextHeight": 5.0,
+    "pinLabelHeight": 3.5,
+    "pinLabelMargin": 0.5
+  }
+}
\ No newline at end of file
diff --git a/net.mograsim.logic.model.editor/components/GUImux1_4.json b/net.mograsim.logic.model.editor/components/GUImux1_4.json
new file mode 100644 (file)
index 0000000..21e2f21
--- /dev/null
@@ -0,0 +1,468 @@
+mograsim version: 0.1.3
+{
+  "width": 35.0,
+  "height": 90.0,
+  "interfacePins": [
+    {
+      "location": {
+        "x": 0.0,
+        "y": 15.0
+      },
+      "name": "I0_1",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 5.0
+      },
+      "name": "Y1",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 15.0
+      },
+      "name": "Y2",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 35.0
+      },
+      "name": "I0_3",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 65.0
+      },
+      "name": "I1_2",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 25.0
+      },
+      "name": "Y3",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 25.0
+      },
+      "name": "I0_2",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 55.0
+      },
+      "name": "I1_1",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 35.0
+      },
+      "name": "Y4",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 85.0
+      },
+      "name": "I1_4",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 5.0
+      },
+      "name": "S0",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 45.0
+      },
+      "name": "I0_4",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 75.0
+      },
+      "name": "I1_3",
+      "logicWidth": 1
+    }
+  ],
+  "submodel": {
+    "innerScale": 0.4,
+    "subComps": [
+      {
+        "pos": {
+          "x": 30.0,
+          "y": 112.5
+        },
+        "id": "GUImux1",
+        "name": "GUImux1#3"
+      },
+      {
+        "pos": {
+          "x": 24.0,
+          "y": 46.5
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#1",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 24.0,
+          "y": 11.5
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#0",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 30.0,
+          "y": 7.5
+        },
+        "id": "GUImux1",
+        "name": "GUImux1#0"
+      },
+      {
+        "pos": {
+          "x": 24.0,
+          "y": 81.5
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#2",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 30.0,
+          "y": 77.5
+        },
+        "id": "GUImux1",
+        "name": "GUImux1#2"
+      },
+      {
+        "pos": {
+          "x": 30.0,
+          "y": 42.5
+        },
+        "id": "GUImux1",
+        "name": "GUImux1#1"
+      }
+    ],
+    "innerWires": [
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "S0"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUImux1#0",
+          "pinName": "S0"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "I0_1"
+        },
+        "pin2": {
+          "compName": "GUImux1#0",
+          "pinName": "I0"
+        },
+        "path": [
+          {
+            "x": 5.0,
+            "y": 37.5
+          },
+          {
+            "x": 5.0,
+            "y": 22.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "I1_1"
+        },
+        "pin2": {
+          "compName": "GUImux1#0",
+          "pinName": "I1"
+        },
+        "path": [
+          {
+            "x": 10.0,
+            "y": 137.5
+          },
+          {
+            "x": 10.0,
+            "y": 32.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUImux1#0",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Y1"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUImux1#1",
+          "pinName": "S0"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "I0_2"
+        },
+        "pin2": {
+          "compName": "GUImux1#1",
+          "pinName": "I0"
+        },
+        "path": [
+          {
+            "x": 5.0,
+            "y": 62.5
+          },
+          {
+            "x": 5.0,
+            "y": 57.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "I1_2"
+        },
+        "pin2": {
+          "compName": "GUImux1#1",
+          "pinName": "I1"
+        },
+        "path": [
+          {
+            "x": 15.0,
+            "y": 162.5
+          },
+          {
+            "x": 15.0,
+            "y": 67.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUImux1#1",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Y2"
+        }
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUImux1#2",
+          "pinName": "S0"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "I0_3"
+        },
+        "pin2": {
+          "compName": "GUImux1#2",
+          "pinName": "I0"
+        },
+        "path": [
+          {
+            "x": 5.0,
+            "y": 87.5
+          },
+          {
+            "x": 5.0,
+            "y": 92.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "I1_3"
+        },
+        "pin2": {
+          "compName": "GUImux1#2",
+          "pinName": "I1"
+        },
+        "path": [
+          {
+            "x": 20.0,
+            "y": 187.5
+          },
+          {
+            "x": 20.0,
+            "y": 102.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUImux1#2",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Y3"
+        }
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUImux1#3",
+          "pinName": "S0"
+        },
+        "path": [
+          {
+            "x": 25.0,
+            "y": 117.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "I0_4"
+        },
+        "pin2": {
+          "compName": "GUImux1#3",
+          "pinName": "I0"
+        },
+        "path": [
+          {
+            "x": 5.0,
+            "y": 112.5
+          },
+          {
+            "x": 5.0,
+            "y": 127.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "I1_4"
+        },
+        "pin2": {
+          "compName": "GUImux1#3",
+          "pinName": "I1"
+        },
+        "path": [
+          {
+            "x": 25.0,
+            "y": 212.5
+          },
+          {
+            "x": 25.0,
+            "y": 137.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUImux1#3",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Y4"
+        }
+      }
+    ]
+  },
+  "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+  "symbolRendererParams": {
+    "centerText": "GUImux1_4",
+    "horizontalComponentCenter": 17.5,
+    "centerTextHeight": 5.0,
+    "pinLabelHeight": 3.5,
+    "pinLabelMargin": 0.5
+  }
+}
\ No newline at end of file
diff --git a/net.mograsim.logic.model.editor/components/GUInand3.json b/net.mograsim.logic.model.editor/components/GUInand3.json
new file mode 100644 (file)
index 0000000..b3a6300
--- /dev/null
@@ -0,0 +1,204 @@
+mograsim version: 0.1.3
+{
+  "width": 35.0,
+  "height": 30.0,
+  "interfacePins": [
+    {
+      "location": {
+        "x": 0.0,
+        "y": 5.0
+      },
+      "name": "A",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 15.0
+      },
+      "name": "B",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 25.0
+      },
+      "name": "C",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 5.0
+      },
+      "name": "Y",
+      "logicWidth": 1
+    }
+  ],
+  "submodel": {
+    "innerScale": 0.4,
+    "subComps": [
+      {
+        "pos": {
+          "x": 35.0,
+          "y": 15.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#1",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 10.0,
+          "y": 15.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#0",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 62.5,
+          "y": 2.5
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#2",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 31.5,
+          "y": 24.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#0",
+        "params": 1
+      }
+    ],
+    "innerWires": [
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "A"
+        },
+        "pin2": {
+          "compName": "GUINandGate#0",
+          "pinName": "A"
+        }
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "B"
+        },
+        "pin2": {
+          "compName": "GUINandGate#0",
+          "pinName": "B"
+        }
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#0",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#1",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 32.5,
+            "y": 20.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#1",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 32.5,
+            "y": 30.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#1",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUINandGate#2",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 57.5,
+            "y": 25.0
+          },
+          {
+            "x": 57.5,
+            "y": 7.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "C"
+        },
+        "pin2": {
+          "compName": "GUINandGate#2",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 60.0,
+            "y": 62.5
+          },
+          {
+            "x": 60.0,
+            "y": 17.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#2",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Y"
+        },
+        "path": []
+      }
+    ]
+  },
+  "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+  "symbolRendererParams": {
+    "centerText": "GUInand3",
+    "horizontalComponentCenter": 17.5,
+    "centerTextHeight": 5.0,
+    "pinLabelHeight": 3.5,
+    "pinLabelMargin": 0.5
+  }
+}
\ No newline at end of file
diff --git a/net.mograsim.logic.model.editor/components/GUInot4.json b/net.mograsim.logic.model.editor/components/GUInot4.json
new file mode 100644 (file)
index 0000000..7d575c8
--- /dev/null
@@ -0,0 +1,374 @@
+mograsim version: 0.1.3
+{
+  "width": 35.0,
+  "height": 40.0,
+  "interfacePins": [
+    {
+      "location": {
+        "x": 0.0,
+        "y": 5.0
+      },
+      "name": "A1",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 15.0
+      },
+      "name": "A2",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 25.0
+      },
+      "name": "A3",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 35.0
+      },
+      "name": "A4",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 5.0
+      },
+      "name": "Y1",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 15.0
+      },
+      "name": "Y2",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 25.0
+      },
+      "name": "Y3",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 35.0
+      },
+      "name": "Y4",
+      "logicWidth": 1
+    }
+  ],
+  "submodel": {
+    "innerScale": 0.4,
+    "subComps": [
+      {
+        "pos": {
+          "x": 30.0,
+          "y": 27.5
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#1",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 30.0,
+          "y": 2.5
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#0",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 30.0,
+          "y": 77.5
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#3",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 14.0,
+          "y": 36.5
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#1",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 30.0,
+          "y": 52.5
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#2",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 14.0,
+          "y": 11.5
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#0",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 14.0,
+          "y": 86.5
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#3",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 14.0,
+          "y": 61.5
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#2",
+        "params": 1
+      }
+    ],
+    "innerWires": [
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "A1"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "A2"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "A3"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "A4"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#3",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#0",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 15.0,
+            "y": 7.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#1",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 15.0,
+            "y": 32.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#2",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 15.0,
+            "y": 57.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#3",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#3",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 15.0,
+            "y": 82.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#0",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 15.0,
+            "y": 17.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#1",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 15.0,
+            "y": 42.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#2",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 15.0,
+            "y": 67.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#3",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#3",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 15.0,
+            "y": 92.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#0",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Y1"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#1",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Y2"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#2",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Y3"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#3",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Y4"
+        },
+        "path": []
+      }
+    ]
+  },
+  "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+  "symbolRendererParams": {
+    "centerText": "GUInot4",
+    "horizontalComponentCenter": 17.5,
+    "centerTextHeight": 5.0,
+    "pinLabelHeight": 3.5,
+    "pinLabelMargin": 0.5
+  }
+}
\ No newline at end of file
diff --git a/net.mograsim.logic.model.editor/components/GUIor4.json b/net.mograsim.logic.model.editor/components/GUIor4.json
new file mode 100644 (file)
index 0000000..d4bcd57
--- /dev/null
@@ -0,0 +1,525 @@
+mograsim version: 0.1.3
+{
+  "width": 35.0,
+  "height": 40.0,
+  "interfacePins": [
+    {
+      "location": {
+        "x": 0.0,
+        "y": 5.0
+      },
+      "name": "A1",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 15.0
+      },
+      "name": "A2",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 25.0
+      },
+      "name": "A3",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 35.0
+      },
+      "name": "A4",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 5.0
+      },
+      "name": "Y",
+      "logicWidth": 1
+    }
+  ],
+  "submodel": {
+    "innerScale": 0.2,
+    "subComps": [
+      {
+        "pos": {
+          "x": 20.0,
+          "y": 65.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#1",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 20.0,
+          "y": 15.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#0",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 20.0,
+          "y": 165.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#3",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 20.0,
+          "y": 115.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#2",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 14.0,
+          "y": 74.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#1",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 14.0,
+          "y": 24.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#0",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 14.0,
+          "y": 174.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#3",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 14.0,
+          "y": 124.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#2",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 104.0,
+          "y": 149.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#5",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 104.0,
+          "y": 49.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#4",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 140.0,
+          "y": 90.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#8",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 50.0,
+          "y": 140.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#5",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 50.0,
+          "y": 40.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#4",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 110.0,
+          "y": 140.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#7",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 110.0,
+          "y": 40.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#6",
+        "params": 1
+      }
+    ],
+    "innerWires": [
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "A1"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "A2"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "A3"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "A4"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#3",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#0",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 15.0,
+            "y": 20.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#1",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 15.0,
+            "y": 70.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#2",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 15.0,
+            "y": 120.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#3",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#3",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 15.0,
+            "y": 170.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#0",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 15.0,
+            "y": 30.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#1",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 15.0,
+            "y": 80.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#2",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 15.0,
+            "y": 130.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#3",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#3",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 15.0,
+            "y": 180.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#0",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUINandGate#4",
+          "pinName": "A"
+        }
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#1",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUINandGate#4",
+          "pinName": "B"
+        }
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#2",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUINandGate#5",
+          "pinName": "A"
+        }
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#3",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUINandGate#5",
+          "pinName": "B"
+        }
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#4",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#4",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#5",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#5",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#4",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#6",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 105.0,
+            "y": 45.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#4",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#6",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 105.0,
+            "y": 55.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#5",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#7",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 105.0,
+            "y": 145.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#5",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#7",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 105.0,
+            "y": 155.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#6",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUINandGate#8",
+          "pinName": "A"
+        }
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#7",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUINandGate#8",
+          "pinName": "B"
+        }
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#8",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Y"
+        }
+      }
+    ]
+  },
+  "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+  "symbolRendererParams": {
+    "centerText": "GUIor4",
+    "horizontalComponentCenter": 17.5,
+    "centerTextHeight": 5.0,
+    "pinLabelHeight": 3.5,
+    "pinLabelMargin": 0.5
+  }
+}
\ No newline at end of file
diff --git a/net.mograsim.logic.model.editor/components/GUIor_4.json b/net.mograsim.logic.model.editor/components/GUIor_4.json
new file mode 100644 (file)
index 0000000..86b4413
--- /dev/null
@@ -0,0 +1,846 @@
+mograsim version: 0.1.3
+{
+  "width": 35.0,
+  "height": 80.0,
+  "interfacePins": [
+    {
+      "location": {
+        "x": 0.0,
+        "y": 5.0
+      },
+      "name": "A1",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 55.0
+      },
+      "name": "B2",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 15.0
+      },
+      "name": "A2",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 65.0
+      },
+      "name": "B3",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 25.0
+      },
+      "name": "A3",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 75.0
+      },
+      "name": "B4",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 35.0
+      },
+      "name": "A4",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 5.0
+      },
+      "name": "Y1",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 15.0
+      },
+      "name": "Y2",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 25.0
+      },
+      "name": "Y3",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 35.0
+      },
+      "name": "Y4",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 45.0
+      },
+      "name": "B1",
+      "logicWidth": 1
+    }
+  ],
+  "submodel": {
+    "innerScale": 0.4,
+    "subComps": [
+      {
+        "pos": {
+          "x": 15.0,
+          "y": 27.5
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#1",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 15.0,
+          "y": 2.5
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#0",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 15.0,
+          "y": 77.5
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#3",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 15.0,
+          "y": 52.5
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#2",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 65.0,
+          "y": 77.5
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#11",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 65.0,
+          "y": 52.5
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#10",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 6.5,
+          "y": 36.5
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#1",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 6.5,
+          "y": 11.5
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#0",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 6.5,
+          "y": 86.5
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#3",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 6.5,
+          "y": 61.5
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#2",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 6.5,
+          "y": 136.5
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#5",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 6.5,
+          "y": 111.5
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#4",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 65.0,
+          "y": 27.5
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#9",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 6.5,
+          "y": 186.5
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#7",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 65.0,
+          "y": 2.5
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#8",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 6.5,
+          "y": 161.5
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#6",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 15.0,
+          "y": 127.5
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#5",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 15.0,
+          "y": 102.5
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#4",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 15.0,
+          "y": 177.5
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#7",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 15.0,
+          "y": 152.5
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#6",
+        "params": 1
+      }
+    ],
+    "innerWires": [
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "A1"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "A2"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "A3"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "A4"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#3",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "B1"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#4",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "B2"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#5",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "B3"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#6",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "B4"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#7",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#0",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 7.5,
+            "y": 7.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#0",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 7.5,
+            "y": 17.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#1",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 7.5,
+            "y": 32.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#1",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 7.5,
+            "y": 42.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#2",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 7.5,
+            "y": 57.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#2",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 7.5,
+            "y": 67.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#3",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#3",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 7.5,
+            "y": 82.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#3",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#3",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 7.5,
+            "y": 92.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#4",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#4",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 7.5,
+            "y": 107.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#4",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#4",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 7.5,
+            "y": 117.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#5",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#5",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 7.5,
+            "y": 132.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#5",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#5",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 7.5,
+            "y": 142.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#6",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#6",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 7.5,
+            "y": 157.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#6",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#6",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 7.5,
+            "y": 167.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#7",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#7",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 7.5,
+            "y": 182.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#7",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#7",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 7.5,
+            "y": 192.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#0",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUINandGate#8",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 40.0,
+            "y": 12.5
+          },
+          {
+            "x": 40.0,
+            "y": 7.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#4",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUINandGate#8",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 45.0,
+            "y": 112.5
+          },
+          {
+            "x": 45.0,
+            "y": 17.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#1",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUINandGate#9",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 40.0,
+            "y": 37.5
+          },
+          {
+            "x": 40.0,
+            "y": 32.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#5",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUINandGate#9",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 50.0,
+            "y": 137.5
+          },
+          {
+            "x": 50.0,
+            "y": 42.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#2",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUINandGate#10",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 40.0,
+            "y": 62.5
+          },
+          {
+            "x": 40.0,
+            "y": 57.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#6",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUINandGate#10",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 55.0,
+            "y": 162.5
+          },
+          {
+            "x": 55.0,
+            "y": 67.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#3",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUINandGate#11",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 40.0,
+            "y": 87.5
+          },
+          {
+            "x": 40.0,
+            "y": 82.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#7",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUINandGate#11",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 60.0,
+            "y": 187.5
+          },
+          {
+            "x": 60.0,
+            "y": 92.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#8",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Y1"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#9",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Y2"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#10",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Y3"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#11",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Y4"
+        },
+        "path": []
+      }
+    ]
+  },
+  "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+  "symbolRendererParams": {
+    "centerText": "GUIor_4",
+    "horizontalComponentCenter": 17.5,
+    "centerTextHeight": 5.0,
+    "pinLabelHeight": 3.5,
+    "pinLabelMargin": 0.5
+  }
+}
\ No newline at end of file
diff --git a/net.mograsim.logic.model.editor/components/GUIram2.json b/net.mograsim.logic.model.editor/components/GUIram2.json
new file mode 100644 (file)
index 0000000..3cb8583
--- /dev/null
@@ -0,0 +1,2829 @@
+mograsim version: 0.1.3
+{
+  "width": 35.0,
+  "height": 90.0,
+  "interfacePins": [
+    {
+      "location": {
+        "x": 35.0,
+        "y": 5.0
+      },
+      "name": "QA1",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 55.0
+      },
+      "name": "QB2",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 45.0
+      },
+      "name": "QB1",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 25.0
+      },
+      "name": "QA3",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 75.0
+      },
+      "name": "QB4",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 15.0
+      },
+      "name": "QA2",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 65.0
+      },
+      "name": "QB3",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 35.0
+      },
+      "name": "QA4",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 55.0
+      },
+      "name": "D1",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 25.0
+      },
+      "name": "B0",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 45.0
+      },
+      "name": "WE",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 65.0
+      },
+      "name": "D2",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 5.0
+      },
+      "name": "A0",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 35.0
+      },
+      "name": "B1",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 75.0
+      },
+      "name": "D3",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 15.0
+      },
+      "name": "A1",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 85.0
+      },
+      "name": "D4",
+      "logicWidth": 1
+    }
+  ],
+  "submodel": {
+    "innerScale": 0.1,
+    "subComps": [
+      {
+        "pos": {
+          "x": 44.0,
+          "y": 649.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#14",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 39.0,
+          "y": 639.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#13",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 129.0,
+          "y": 329.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#16",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 49.0,
+          "y": 659.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#15",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 119.0,
+          "y": 349.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#18",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 124.0,
+          "y": 339.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#17",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 114.0,
+          "y": 359.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#19",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 104.0,
+          "y": 164.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#1",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 109.0,
+          "y": 154.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#0",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 94.0,
+          "y": 184.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#3",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 99.0,
+          "y": 174.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#2",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 39.0,
+          "y": 649.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#5",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 34.0,
+          "y": 549.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#4",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 49.0,
+          "y": 809.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#7",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 44.0,
+          "y": 749.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#6",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 39.0,
+          "y": 489.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#9",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 34.0,
+          "y": 479.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#8",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 44.0,
+          "y": 499.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#10",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 34.0,
+          "y": 629.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#12",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 49.0,
+          "y": 509.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#11",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 135.0,
+          "y": 735.0
+        },
+        "id": "GUIandor414",
+        "name": "GUIandor414#5"
+      },
+      {
+        "pos": {
+          "x": 135.0,
+          "y": 435.0
+        },
+        "id": "GUIandor414",
+        "name": "GUIandor414#3"
+      },
+      {
+        "pos": {
+          "x": 135.0,
+          "y": 585.0
+        },
+        "id": "GUIandor414",
+        "name": "GUIandor414#4"
+      },
+      {
+        "pos": {
+          "x": 235.0,
+          "y": 635.0
+        },
+        "id": "GUIandor414",
+        "name": "GUIandor414#1"
+      },
+      {
+        "pos": {
+          "x": 235.0,
+          "y": 785.0
+        },
+        "id": "GUIandor414",
+        "name": "GUIandor414#2"
+      },
+      {
+        "pos": {
+          "x": 235.0,
+          "y": 485.0
+        },
+        "id": "GUIandor414",
+        "name": "GUIandor414#0"
+      },
+      {
+        "pos": {
+          "x": 55.0,
+          "y": 475.0
+        },
+        "id": "GUIdlatch4",
+        "name": "GUIdlatch4#1"
+      },
+      {
+        "pos": {
+          "x": 55.0,
+          "y": 325.0
+        },
+        "id": "GUIdlatch4",
+        "name": "GUIdlatch4#0"
+      },
+      {
+        "pos": {
+          "x": 55.0,
+          "y": 775.0
+        },
+        "id": "GUIdlatch4",
+        "name": "GUIdlatch4#3"
+      },
+      {
+        "pos": {
+          "x": 55.0,
+          "y": 625.0
+        },
+        "id": "GUIdlatch4",
+        "name": "GUIdlatch4#2"
+      },
+      {
+        "pos": {
+          "x": 135.0,
+          "y": 325.0
+        },
+        "id": "GUIand41",
+        "name": "GUIand41#2"
+      },
+      {
+        "pos": {
+          "x": 119.0,
+          "y": 799.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#30",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 114.0,
+          "y": 809.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#31",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 130.0,
+          "y": 150.0
+        },
+        "id": "GUIand41",
+        "name": "GUIand41#0"
+      },
+      {
+        "pos": {
+          "x": 235.0,
+          "y": 375.0
+        },
+        "id": "GUIand41",
+        "name": "GUIand41#1"
+      },
+      {
+        "pos": {
+          "x": 124.0,
+          "y": 639.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#25",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 129.0,
+          "y": 629.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#24",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 114.0,
+          "y": 659.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#27",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 119.0,
+          "y": 649.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#26",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 124.0,
+          "y": 789.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#29",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 129.0,
+          "y": 779.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#28",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 55.0,
+          "y": 150.0
+        },
+        "id": "GUIdemux2",
+        "name": "GUIdemux2#1"
+      },
+      {
+        "pos": {
+          "x": 55.0,
+          "y": 45.0
+        },
+        "id": "GUIdemux2",
+        "name": "GUIdemux2#0"
+      },
+      {
+        "pos": {
+          "x": 124.0,
+          "y": 489.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#21",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 129.0,
+          "y": 479.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#20",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 114.0,
+          "y": 509.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#23",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 119.0,
+          "y": 499.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#22",
+        "params": 1
+      }
+    ],
+    "innerWires": [
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "A0"
+        },
+        "pin2": {
+          "compName": "GUIdemux2#0",
+          "pinName": "S0"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "A1"
+        },
+        "pin2": {
+          "compName": "GUIdemux2#0",
+          "pinName": "S1"
+        },
+        "path": [
+          {
+            "x": 10.0,
+            "y": 150.0
+          },
+          {
+            "x": 10.0,
+            "y": 60.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "B0"
+        },
+        "pin2": {
+          "compName": "GUIdemux2#1",
+          "pinName": "S0"
+        },
+        "path": [
+          {
+            "x": 5.0,
+            "y": 250.0
+          },
+          {
+            "x": 5.0,
+            "y": 155.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "B1"
+        },
+        "pin2": {
+          "compName": "GUIdemux2#1",
+          "pinName": "S1"
+        },
+        "path": [
+          {
+            "x": 10.0,
+            "y": 350.0
+          },
+          {
+            "x": 10.0,
+            "y": 165.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIdemux2#1",
+          "pinName": "Y00"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIdemux2#1",
+          "pinName": "Y01"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIdemux2#1",
+          "pinName": "Y10"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIdemux2#1",
+          "pinName": "Y11"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#3",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIand41#0",
+          "pinName": "A1"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIand41#0",
+          "pinName": "A2"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIand41#0",
+          "pinName": "A3"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#3",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIand41#0",
+          "pinName": "A4"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "WE"
+        },
+        "pin2": {
+          "compName": "GUIand41#0",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 5.0,
+            "y": 450.0
+          },
+          {
+            "x": 5.0,
+            "y": 300.0
+          },
+          {
+            "x": 125.0,
+            "y": 300.0
+          },
+          {
+            "x": 125.0,
+            "y": 195.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIand41#0",
+          "pinName": "Y1"
+        },
+        "pin2": {
+          "compName": "GUIdlatch4#0",
+          "pinName": "C"
+        },
+        "path": [
+          {
+            "x": 185.0,
+            "y": 155.0
+          },
+          {
+            "x": 185.0,
+            "y": 250.0
+          },
+          {
+            "x": 30.0,
+            "y": 250.0
+          },
+          {
+            "x": 30.0,
+            "y": 370.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIand41#0",
+          "pinName": "Y2"
+        },
+        "pin2": {
+          "compName": "GUIdlatch4#1",
+          "pinName": "C"
+        },
+        "path": [
+          {
+            "x": 180.0,
+            "y": 165.0
+          },
+          {
+            "x": 180.0,
+            "y": 245.0
+          },
+          {
+            "x": 25.0,
+            "y": 245.0
+          },
+          {
+            "x": 25.0,
+            "y": 520.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIand41#0",
+          "pinName": "Y3"
+        },
+        "pin2": {
+          "compName": "GUIdlatch4#2",
+          "pinName": "C"
+        },
+        "path": [
+          {
+            "x": 175.0,
+            "y": 175.0
+          },
+          {
+            "x": 175.0,
+            "y": 240.0
+          },
+          {
+            "x": 20.0,
+            "y": 240.0
+          },
+          {
+            "x": 20.0,
+            "y": 670.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIand41#0",
+          "pinName": "Y4"
+        },
+        "pin2": {
+          "compName": "GUIdlatch4#3",
+          "pinName": "C"
+        },
+        "path": [
+          {
+            "x": 170.0,
+            "y": 185.0
+          },
+          {
+            "x": 170.0,
+            "y": 235.0
+          },
+          {
+            "x": 15.0,
+            "y": 235.0
+          },
+          {
+            "x": 15.0,
+            "y": 820.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "D1"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#4",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "D2"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#5",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "D3"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#6",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "D4"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#7",
+          "pinName": ""
+        },
+        "path": [
+          {
+            "x": 50.0,
+            "y": 850.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#8",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIdlatch4#0",
+          "pinName": "D1"
+        },
+        "path": [
+          {
+            "x": 35.0,
+            "y": 330.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#9",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIdlatch4#0",
+          "pinName": "D2"
+        },
+        "path": [
+          {
+            "x": 40.0,
+            "y": 340.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#10",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIdlatch4#0",
+          "pinName": "D3"
+        },
+        "path": [
+          {
+            "x": 45.0,
+            "y": 350.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#11",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIdlatch4#0",
+          "pinName": "D4"
+        },
+        "path": [
+          {
+            "x": 50.0,
+            "y": 360.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#8",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIdlatch4#1",
+          "pinName": "D1"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#9",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIdlatch4#1",
+          "pinName": "D2"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#10",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIdlatch4#1",
+          "pinName": "D3"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#11",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIdlatch4#1",
+          "pinName": "D4"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#8",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#4",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#4",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#12",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#9",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#13",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#10",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#14",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#11",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#15",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#12",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIdlatch4#2",
+          "pinName": "D1"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#13",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIdlatch4#2",
+          "pinName": "D2"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#14",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIdlatch4#2",
+          "pinName": "D3"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#15",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIdlatch4#2",
+          "pinName": "D4"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#13",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#5",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#14",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#6",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#15",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#7",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#12",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIdlatch4#3",
+          "pinName": "D1"
+        },
+        "path": [
+          {
+            "x": 35.0,
+            "y": 780.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#5",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIdlatch4#3",
+          "pinName": "D2"
+        },
+        "path": [
+          {
+            "x": 40.0,
+            "y": 790.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#6",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIdlatch4#3",
+          "pinName": "D3"
+        },
+        "path": [
+          {
+            "x": 45.0,
+            "y": 800.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#7",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIdlatch4#3",
+          "pinName": "D4"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIdlatch4#0",
+          "pinName": "Q1"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#16",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIdlatch4#0",
+          "pinName": "Q2"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#17",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIdlatch4#0",
+          "pinName": "Q3"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#18",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIdlatch4#0",
+          "pinName": "Q4"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#19",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIdlatch4#1",
+          "pinName": "Q1"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#20",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIdlatch4#1",
+          "pinName": "Q2"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#21",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIdlatch4#1",
+          "pinName": "Q3"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#22",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIdlatch4#1",
+          "pinName": "Q4"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#23",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIdlatch4#2",
+          "pinName": "Q1"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#24",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIdlatch4#2",
+          "pinName": "Q2"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#25",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIdlatch4#2",
+          "pinName": "Q3"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#26",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIdlatch4#2",
+          "pinName": "Q4"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#27",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIdlatch4#3",
+          "pinName": "Q1"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#28",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIdlatch4#3",
+          "pinName": "Q2"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#29",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIdlatch4#3",
+          "pinName": "Q3"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#30",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIdlatch4#3",
+          "pinName": "Q4"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#31",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIdemux2#0",
+          "pinName": "Y00"
+        },
+        "pin2": {
+          "compName": "GUIand41#1",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 210.0,
+            "y": 50.0
+          },
+          {
+            "x": 210.0,
+            "y": 420.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIdemux2#0",
+          "pinName": "Y01"
+        },
+        "pin2": {
+          "compName": "GUIandor414#0",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 205.0,
+            "y": 60.0
+          },
+          {
+            "x": 205.0,
+            "y": 570.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIdemux2#0",
+          "pinName": "Y10"
+        },
+        "pin2": {
+          "compName": "GUIandor414#1",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 200.0,
+            "y": 70.0
+          },
+          {
+            "x": 200.0,
+            "y": 720.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIdemux2#0",
+          "pinName": "Y11"
+        },
+        "pin2": {
+          "compName": "GUIandor414#2",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 195.0,
+            "y": 80.0
+          },
+          {
+            "x": 195.0,
+            "y": 870.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIand41#2",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 110.0,
+            "y": 370.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIandor414#3",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 105.0,
+            "y": 520.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIandor414#4",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 100.0,
+            "y": 670.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#3",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIandor414#5",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 95.0,
+            "y": 820.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#16",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIand41#1",
+          "pinName": "A1"
+        },
+        "path": [
+          {
+            "x": 130.0,
+            "y": 380.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#17",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIand41#1",
+          "pinName": "A2"
+        },
+        "path": [
+          {
+            "x": 125.0,
+            "y": 390.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#18",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIand41#1",
+          "pinName": "A3"
+        },
+        "path": [
+          {
+            "x": 120.0,
+            "y": 400.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#19",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIand41#1",
+          "pinName": "A4"
+        },
+        "path": [
+          {
+            "x": 115.0,
+            "y": 410.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#20",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIandor414#0",
+          "pinName": "A1"
+        },
+        "path": [
+          {
+            "x": 130.0,
+            "y": 530.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#21",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIandor414#0",
+          "pinName": "A2"
+        },
+        "path": [
+          {
+            "x": 125.0,
+            "y": 540.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#22",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIandor414#0",
+          "pinName": "A3"
+        },
+        "path": [
+          {
+            "x": 120.0,
+            "y": 550.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#23",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIandor414#0",
+          "pinName": "A4"
+        },
+        "path": [
+          {
+            "x": 115.0,
+            "y": 560.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#24",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIandor414#1",
+          "pinName": "A1"
+        },
+        "path": [
+          {
+            "x": 130.0,
+            "y": 680.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#25",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIandor414#1",
+          "pinName": "A2"
+        },
+        "path": [
+          {
+            "x": 125.0,
+            "y": 690.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#26",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIandor414#1",
+          "pinName": "A3"
+        },
+        "path": [
+          {
+            "x": 120.0,
+            "y": 700.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#27",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIandor414#1",
+          "pinName": "A4"
+        },
+        "path": [
+          {
+            "x": 115.0,
+            "y": 710.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#28",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIandor414#2",
+          "pinName": "A1"
+        },
+        "path": [
+          {
+            "x": 130.0,
+            "y": 830.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#29",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIandor414#2",
+          "pinName": "A2"
+        },
+        "path": [
+          {
+            "x": 125.0,
+            "y": 840.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#30",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIandor414#2",
+          "pinName": "A3"
+        },
+        "path": [
+          {
+            "x": 120.0,
+            "y": 850.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#31",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIandor414#2",
+          "pinName": "A4"
+        },
+        "path": [
+          {
+            "x": 115.0,
+            "y": 860.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#16",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIand41#2",
+          "pinName": "A1"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#17",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIand41#2",
+          "pinName": "A2"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#18",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIand41#2",
+          "pinName": "A3"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#19",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIand41#2",
+          "pinName": "A4"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#20",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIandor414#3",
+          "pinName": "A1"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#21",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIandor414#3",
+          "pinName": "A2"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#22",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIandor414#3",
+          "pinName": "A3"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#23",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIandor414#3",
+          "pinName": "A4"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#24",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIandor414#4",
+          "pinName": "A1"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#25",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIandor414#4",
+          "pinName": "A2"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#26",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIandor414#4",
+          "pinName": "A3"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#27",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIandor414#4",
+          "pinName": "A4"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#28",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIandor414#5",
+          "pinName": "A1"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#29",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIandor414#5",
+          "pinName": "A2"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#30",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIandor414#5",
+          "pinName": "A3"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#31",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIandor414#5",
+          "pinName": "A4"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIand41#1",
+          "pinName": "Y1"
+        },
+        "pin2": {
+          "compName": "GUIandor414#0",
+          "pinName": "C1"
+        },
+        "path": [
+          {
+            "x": 290.0,
+            "y": 380.0
+          },
+          {
+            "x": 290.0,
+            "y": 445.0
+          },
+          {
+            "x": 230.0,
+            "y": 445.0
+          },
+          {
+            "x": 230.0,
+            "y": 490.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIand41#1",
+          "pinName": "Y2"
+        },
+        "pin2": {
+          "compName": "GUIandor414#0",
+          "pinName": "C2"
+        },
+        "path": [
+          {
+            "x": 285.0,
+            "y": 390.0
+          },
+          {
+            "x": 285.0,
+            "y": 440.0
+          },
+          {
+            "x": 225.0,
+            "y": 440.0
+          },
+          {
+            "x": 225.0,
+            "y": 500.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIand41#1",
+          "pinName": "Y3"
+        },
+        "pin2": {
+          "compName": "GUIandor414#0",
+          "pinName": "C3"
+        },
+        "path": [
+          {
+            "x": 280.0,
+            "y": 400.0
+          },
+          {
+            "x": 280.0,
+            "y": 435.0
+          },
+          {
+            "x": 220.0,
+            "y": 435.0
+          },
+          {
+            "x": 220.0,
+            "y": 510.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIand41#1",
+          "pinName": "Y4"
+        },
+        "pin2": {
+          "compName": "GUIandor414#0",
+          "pinName": "C4"
+        },
+        "path": [
+          {
+            "x": 275.0,
+            "y": 410.0
+          },
+          {
+            "x": 275.0,
+            "y": 430.0
+          },
+          {
+            "x": 215.0,
+            "y": 430.0
+          },
+          {
+            "x": 215.0,
+            "y": 520.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIandor414#0",
+          "pinName": "Y1"
+        },
+        "pin2": {
+          "compName": "GUIandor414#1",
+          "pinName": "C1"
+        },
+        "path": [
+          {
+            "x": 290.0,
+            "y": 490.0
+          },
+          {
+            "x": 290.0,
+            "y": 595.0
+          },
+          {
+            "x": 230.0,
+            "y": 595.0
+          },
+          {
+            "x": 230.0,
+            "y": 640.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIandor414#0",
+          "pinName": "Y2"
+        },
+        "pin2": {
+          "compName": "GUIandor414#1",
+          "pinName": "C2"
+        },
+        "path": [
+          {
+            "x": 285.0,
+            "y": 500.0
+          },
+          {
+            "x": 285.0,
+            "y": 590.0
+          },
+          {
+            "x": 225.0,
+            "y": 590.0
+          },
+          {
+            "x": 225.0,
+            "y": 650.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIandor414#0",
+          "pinName": "Y3"
+        },
+        "pin2": {
+          "compName": "GUIandor414#1",
+          "pinName": "C3"
+        },
+        "path": [
+          {
+            "x": 280.0,
+            "y": 510.0
+          },
+          {
+            "x": 280.0,
+            "y": 585.0
+          },
+          {
+            "x": 220.0,
+            "y": 585.0
+          },
+          {
+            "x": 220.0,
+            "y": 660.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIandor414#0",
+          "pinName": "Y4"
+        },
+        "pin2": {
+          "compName": "GUIandor414#1",
+          "pinName": "C4"
+        },
+        "path": [
+          {
+            "x": 275.0,
+            "y": 520.0
+          },
+          {
+            "x": 275.0,
+            "y": 580.0
+          },
+          {
+            "x": 215.0,
+            "y": 580.0
+          },
+          {
+            "x": 215.0,
+            "y": 670.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIandor414#1",
+          "pinName": "Y1"
+        },
+        "pin2": {
+          "compName": "GUIandor414#2",
+          "pinName": "C1"
+        },
+        "path": [
+          {
+            "x": 290.0,
+            "y": 640.0
+          },
+          {
+            "x": 290.0,
+            "y": 745.0
+          },
+          {
+            "x": 230.0,
+            "y": 745.0
+          },
+          {
+            "x": 230.0,
+            "y": 790.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIandor414#1",
+          "pinName": "Y2"
+        },
+        "pin2": {
+          "compName": "GUIandor414#2",
+          "pinName": "C2"
+        },
+        "path": [
+          {
+            "x": 285.0,
+            "y": 650.0
+          },
+          {
+            "x": 285.0,
+            "y": 740.0
+          },
+          {
+            "x": 225.0,
+            "y": 740.0
+          },
+          {
+            "x": 225.0,
+            "y": 800.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIandor414#1",
+          "pinName": "Y3"
+        },
+        "pin2": {
+          "compName": "GUIandor414#2",
+          "pinName": "C3"
+        },
+        "path": [
+          {
+            "x": 280.0,
+            "y": 660.0
+          },
+          {
+            "x": 280.0,
+            "y": 735.0
+          },
+          {
+            "x": 220.0,
+            "y": 735.0
+          },
+          {
+            "x": 220.0,
+            "y": 810.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIandor414#1",
+          "pinName": "Y4"
+        },
+        "pin2": {
+          "compName": "GUIandor414#2",
+          "pinName": "C4"
+        },
+        "path": [
+          {
+            "x": 275.0,
+            "y": 670.0
+          },
+          {
+            "x": 275.0,
+            "y": 730.0
+          },
+          {
+            "x": 215.0,
+            "y": 730.0
+          },
+          {
+            "x": 215.0,
+            "y": 820.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIandor414#2",
+          "pinName": "Y1"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "QA1"
+        },
+        "path": [
+          {
+            "x": 300.0,
+            "y": 790.0
+          },
+          {
+            "x": 300.0,
+            "y": 50.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIandor414#2",
+          "pinName": "Y2"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "QA2"
+        },
+        "path": [
+          {
+            "x": 305.0,
+            "y": 800.0
+          },
+          {
+            "x": 305.0,
+            "y": 150.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIandor414#2",
+          "pinName": "Y3"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "QA3"
+        },
+        "path": [
+          {
+            "x": 310.0,
+            "y": 810.0
+          },
+          {
+            "x": 310.0,
+            "y": 250.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIandor414#2",
+          "pinName": "Y4"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "QA4"
+        },
+        "path": [
+          {
+            "x": 315.0,
+            "y": 820.0
+          },
+          {
+            "x": 315.0,
+            "y": 350.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIand41#2",
+          "pinName": "Y1"
+        },
+        "pin2": {
+          "compName": "GUIandor414#3",
+          "pinName": "C1"
+        },
+        "path": [
+          {
+            "x": 190.0,
+            "y": 330.0
+          },
+          {
+            "x": 190.0,
+            "y": 430.0
+          },
+          {
+            "x": 130.0,
+            "y": 430.0
+          },
+          {
+            "x": 130.0,
+            "y": 440.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIand41#2",
+          "pinName": "Y2"
+        },
+        "pin2": {
+          "compName": "GUIandor414#3",
+          "pinName": "C2"
+        },
+        "path": [
+          {
+            "x": 185.0,
+            "y": 340.0
+          },
+          {
+            "x": 185.0,
+            "y": 425.0
+          },
+          {
+            "x": 125.0,
+            "y": 425.0
+          },
+          {
+            "x": 125.0,
+            "y": 450.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIand41#2",
+          "pinName": "Y3"
+        },
+        "pin2": {
+          "compName": "GUIandor414#3",
+          "pinName": "C3"
+        },
+        "path": [
+          {
+            "x": 180.0,
+            "y": 350.0
+          },
+          {
+            "x": 180.0,
+            "y": 420.0
+          },
+          {
+            "x": 120.0,
+            "y": 420.0
+          },
+          {
+            "x": 120.0,
+            "y": 460.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIand41#2",
+          "pinName": "Y4"
+        },
+        "pin2": {
+          "compName": "GUIandor414#3",
+          "pinName": "C4"
+        },
+        "path": [
+          {
+            "x": 175.0,
+            "y": 360.0
+          },
+          {
+            "x": 175.0,
+            "y": 415.0
+          },
+          {
+            "x": 115.0,
+            "y": 415.0
+          },
+          {
+            "x": 115.0,
+            "y": 470.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIandor414#3",
+          "pinName": "Y1"
+        },
+        "pin2": {
+          "compName": "GUIandor414#4",
+          "pinName": "C1"
+        },
+        "path": [
+          {
+            "x": 190.0,
+            "y": 440.0
+          },
+          {
+            "x": 190.0,
+            "y": 580.0
+          },
+          {
+            "x": 130.0,
+            "y": 580.0
+          },
+          {
+            "x": 130.0,
+            "y": 590.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIandor414#3",
+          "pinName": "Y2"
+        },
+        "pin2": {
+          "compName": "GUIandor414#4",
+          "pinName": "C2"
+        },
+        "path": [
+          {
+            "x": 185.0,
+            "y": 450.0
+          },
+          {
+            "x": 185.0,
+            "y": 575.0
+          },
+          {
+            "x": 125.0,
+            "y": 575.0
+          },
+          {
+            "x": 125.0,
+            "y": 600.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIandor414#3",
+          "pinName": "Y3"
+        },
+        "pin2": {
+          "compName": "GUIandor414#4",
+          "pinName": "C3"
+        },
+        "path": [
+          {
+            "x": 180.0,
+            "y": 460.0
+          },
+          {
+            "x": 180.0,
+            "y": 570.0
+          },
+          {
+            "x": 120.0,
+            "y": 570.0
+          },
+          {
+            "x": 120.0,
+            "y": 610.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIandor414#3",
+          "pinName": "Y4"
+        },
+        "pin2": {
+          "compName": "GUIandor414#4",
+          "pinName": "C4"
+        },
+        "path": [
+          {
+            "x": 175.0,
+            "y": 470.0
+          },
+          {
+            "x": 175.0,
+            "y": 565.0
+          },
+          {
+            "x": 115.0,
+            "y": 565.0
+          },
+          {
+            "x": 115.0,
+            "y": 620.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIandor414#4",
+          "pinName": "Y1"
+        },
+        "pin2": {
+          "compName": "GUIandor414#5",
+          "pinName": "C1"
+        },
+        "path": [
+          {
+            "x": 190.0,
+            "y": 590.0
+          },
+          {
+            "x": 190.0,
+            "y": 730.0
+          },
+          {
+            "x": 130.0,
+            "y": 730.0
+          },
+          {
+            "x": 130.0,
+            "y": 740.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIandor414#4",
+          "pinName": "Y2"
+        },
+        "pin2": {
+          "compName": "GUIandor414#5",
+          "pinName": "C2"
+        },
+        "path": [
+          {
+            "x": 185.0,
+            "y": 600.0
+          },
+          {
+            "x": 185.0,
+            "y": 725.0
+          },
+          {
+            "x": 125.0,
+            "y": 725.0
+          },
+          {
+            "x": 125.0,
+            "y": 750.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIandor414#4",
+          "pinName": "Y3"
+        },
+        "pin2": {
+          "compName": "GUIandor414#5",
+          "pinName": "C3"
+        },
+        "path": [
+          {
+            "x": 180.0,
+            "y": 610.0
+          },
+          {
+            "x": 180.0,
+            "y": 720.0
+          },
+          {
+            "x": 120.0,
+            "y": 720.0
+          },
+          {
+            "x": 120.0,
+            "y": 760.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIandor414#4",
+          "pinName": "Y4"
+        },
+        "pin2": {
+          "compName": "GUIandor414#5",
+          "pinName": "C4"
+        },
+        "path": [
+          {
+            "x": 175.0,
+            "y": 620.0
+          },
+          {
+            "x": 175.0,
+            "y": 715.0
+          },
+          {
+            "x": 115.0,
+            "y": 715.0
+          },
+          {
+            "x": 115.0,
+            "y": 770.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIandor414#5",
+          "pinName": "Y1"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "QB1"
+        },
+        "path": [
+          {
+            "x": 190.0,
+            "y": 740.0
+          },
+          {
+            "x": 190.0,
+            "y": 880.0
+          },
+          {
+            "x": 325.0,
+            "y": 880.0
+          },
+          {
+            "x": 325.0,
+            "y": 450.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIandor414#5",
+          "pinName": "Y2"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "QB2"
+        },
+        "path": [
+          {
+            "x": 185.0,
+            "y": 750.0
+          },
+          {
+            "x": 185.0,
+            "y": 885.0
+          },
+          {
+            "x": 330.0,
+            "y": 885.0
+          },
+          {
+            "x": 330.0,
+            "y": 550.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIandor414#5",
+          "pinName": "Y3"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "QB3"
+        },
+        "path": [
+          {
+            "x": 180.0,
+            "y": 760.0
+          },
+          {
+            "x": 180.0,
+            "y": 890.0
+          },
+          {
+            "x": 335.0,
+            "y": 890.0
+          },
+          {
+            "x": 335.0,
+            "y": 650.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIandor414#5",
+          "pinName": "Y4"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "QB4"
+        },
+        "path": [
+          {
+            "x": 175.0,
+            "y": 770.0
+          },
+          {
+            "x": 175.0,
+            "y": 895.0
+          },
+          {
+            "x": 340.0,
+            "y": 895.0
+          },
+          {
+            "x": 340.0,
+            "y": 750.0
+          }
+        ]
+      }
+    ]
+  },
+  "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+  "symbolRendererParams": {
+    "centerText": "GUIram2",
+    "horizontalComponentCenter": 17.5,
+    "centerTextHeight": 5.0,
+    "pinLabelHeight": 3.5,
+    "pinLabelMargin": 0.5
+  }
+}
\ No newline at end of file
diff --git a/net.mograsim.logic.model.editor/components/GUIram4.json b/net.mograsim.logic.model.editor/components/GUIram4.json
new file mode 100644 (file)
index 0000000..99f606d
--- /dev/null
@@ -0,0 +1,3197 @@
+mograsim version: 0.1.3
+{
+  "width": 35.0,
+  "height": 130.0,
+  "interfacePins": [
+    {
+      "location": {
+        "x": 35.0,
+        "y": 5.0
+      },
+      "name": "QA1",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 55.0
+      },
+      "name": "QB2",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 45.0
+      },
+      "name": "QB1",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 25.0
+      },
+      "name": "QA3",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 75.0
+      },
+      "name": "QB4",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 15.0
+      },
+      "name": "QA2",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 65.0
+      },
+      "name": "QB3",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 35.0
+      },
+      "name": "QA4",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 95.0
+      },
+      "name": "D1",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 45.0
+      },
+      "name": "B0",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 85.0
+      },
+      "name": "WE",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 105.0
+      },
+      "name": "D2",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 5.0
+      },
+      "name": "A0",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 55.0
+      },
+      "name": "B1",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 115.0
+      },
+      "name": "D3",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 15.0
+      },
+      "name": "A1",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 65.0
+      },
+      "name": "B2",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 125.0
+      },
+      "name": "D4",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 25.0
+      },
+      "name": "A2",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 75.0
+      },
+      "name": "B3",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 35.0
+      },
+      "name": "A3",
+      "logicWidth": 1
+    }
+  ],
+  "submodel": {
+    "innerScale": 0.1,
+    "subComps": [
+      {
+        "pos": {
+          "x": 69.0,
+          "y": 854.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#14",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 64.0,
+          "y": 844.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#13",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 39.0,
+          "y": 484.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#16",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 74.0,
+          "y": 864.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#15",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 49.0,
+          "y": 504.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#18",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 44.0,
+          "y": 494.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#17",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 54.0,
+          "y": 514.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#19",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 155.0,
+          "y": 325.0
+        },
+        "id": "GUIand41",
+        "name": "GUIand41#2"
+      },
+      {
+        "pos": {
+          "x": 224.0,
+          "y": 164.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#1",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 229.0,
+          "y": 154.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#0",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 214.0,
+          "y": 184.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#3",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 219.0,
+          "y": 174.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#2",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 64.0,
+          "y": 544.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#5",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 59.0,
+          "y": 534.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#4",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 74.0,
+          "y": 564.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#7",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 69.0,
+          "y": 554.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#6",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 64.0,
+          "y": 694.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#9",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 59.0,
+          "y": 684.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#8",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 69.0,
+          "y": 704.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#10",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 235.0,
+          "y": 150.0
+        },
+        "id": "GUIand41",
+        "name": "GUIand41#0"
+      },
+      {
+        "pos": {
+          "x": 59.0,
+          "y": 834.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#12",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 250.0,
+          "y": 375.0
+        },
+        "id": "GUIand41",
+        "name": "GUIand41#1"
+      },
+      {
+        "pos": {
+          "x": 74.0,
+          "y": 714.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#11",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 155.0,
+          "y": 735.0
+        },
+        "id": "GUIandor414",
+        "name": "GUIandor414#5"
+      },
+      {
+        "pos": {
+          "x": 44.0,
+          "y": 349.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#25",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 39.0,
+          "y": 334.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#24",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 155.0,
+          "y": 435.0
+        },
+        "id": "GUIandor414",
+        "name": "GUIandor414#3"
+      },
+      {
+        "pos": {
+          "x": 54.0,
+          "y": 749.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#27",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 155.0,
+          "y": 585.0
+        },
+        "id": "GUIandor414",
+        "name": "GUIandor414#4"
+      },
+      {
+        "pos": {
+          "x": 49.0,
+          "y": 649.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#26",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 80.0,
+          "y": 780.0
+        },
+        "id": "GUIram2",
+        "name": "GUIram2#3"
+      },
+      {
+        "pos": {
+          "x": 80.0,
+          "y": 630.0
+        },
+        "id": "GUIram2",
+        "name": "GUIram2#2"
+      },
+      {
+        "pos": {
+          "x": 55.0,
+          "y": 150.0
+        },
+        "id": "GUIdemux2",
+        "name": "GUIdemux2#1"
+      },
+      {
+        "pos": {
+          "x": 80.0,
+          "y": 480.0
+        },
+        "id": "GUIram2",
+        "name": "GUIram2#1"
+      },
+      {
+        "pos": {
+          "x": 80.0,
+          "y": 330.0
+        },
+        "id": "GUIram2",
+        "name": "GUIram2#0"
+      },
+      {
+        "pos": {
+          "x": 250.0,
+          "y": 635.0
+        },
+        "id": "GUIandor414",
+        "name": "GUIandor414#1"
+      },
+      {
+        "pos": {
+          "x": 55.0,
+          "y": 45.0
+        },
+        "id": "GUIdemux2",
+        "name": "GUIdemux2#0"
+      },
+      {
+        "pos": {
+          "x": 250.0,
+          "y": 785.0
+        },
+        "id": "GUIandor414",
+        "name": "GUIandor414#2"
+      },
+      {
+        "pos": {
+          "x": 250.0,
+          "y": 485.0
+        },
+        "id": "GUIandor414",
+        "name": "GUIandor414#0"
+      },
+      {
+        "pos": {
+          "x": 44.0,
+          "y": 644.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#21",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 39.0,
+          "y": 634.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#20",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 54.0,
+          "y": 664.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#23",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 49.0,
+          "y": 654.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#22",
+        "params": 1
+      }
+    ],
+    "innerWires": [
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "A0"
+        },
+        "pin2": {
+          "compName": "GUIdemux2#0",
+          "pinName": "S0"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "A1"
+        },
+        "pin2": {
+          "compName": "GUIdemux2#0",
+          "pinName": "S1"
+        },
+        "path": [
+          {
+            "x": 10.0,
+            "y": 150.0
+          },
+          {
+            "x": 10.0,
+            "y": 60.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "B0"
+        },
+        "pin2": {
+          "compName": "GUIdemux2#1",
+          "pinName": "S0"
+        },
+        "path": [
+          {
+            "x": 5.0,
+            "y": 450.0
+          },
+          {
+            "x": 5.0,
+            "y": 155.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "B1"
+        },
+        "pin2": {
+          "compName": "GUIdemux2#1",
+          "pinName": "S1"
+        },
+        "path": [
+          {
+            "x": 10.0,
+            "y": 550.0
+          },
+          {
+            "x": 10.0,
+            "y": 165.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIdemux2#1",
+          "pinName": "Y00"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIdemux2#1",
+          "pinName": "Y01"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIdemux2#1",
+          "pinName": "Y10"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIdemux2#1",
+          "pinName": "Y11"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#3",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIand41#0",
+          "pinName": "A1"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIand41#0",
+          "pinName": "A2"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIand41#0",
+          "pinName": "A3"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#3",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIand41#0",
+          "pinName": "A4"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "WE"
+        },
+        "pin2": {
+          "compName": "GUIand41#0",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 15.0,
+            "y": 850.0
+          },
+          {
+            "x": 15.0,
+            "y": 195.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIand41#0",
+          "pinName": "Y1"
+        },
+        "pin2": {
+          "compName": "GUIram2#0",
+          "pinName": "WE"
+        },
+        "path": [
+          {
+            "x": 290.0,
+            "y": 155.0
+          },
+          {
+            "x": 290.0,
+            "y": 230.0
+          },
+          {
+            "x": 35.0,
+            "y": 230.0
+          },
+          {
+            "x": 35.0,
+            "y": 375.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIand41#0",
+          "pinName": "Y2"
+        },
+        "pin2": {
+          "compName": "GUIram2#1",
+          "pinName": "WE"
+        },
+        "path": [
+          {
+            "x": 285.0,
+            "y": 165.0
+          },
+          {
+            "x": 285.0,
+            "y": 225.0
+          },
+          {
+            "x": 30.0,
+            "y": 225.0
+          },
+          {
+            "x": 30.0,
+            "y": 525.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIand41#0",
+          "pinName": "Y3"
+        },
+        "pin2": {
+          "compName": "GUIram2#2",
+          "pinName": "WE"
+        },
+        "path": [
+          {
+            "x": 280.0,
+            "y": 175.0
+          },
+          {
+            "x": 280.0,
+            "y": 220.0
+          },
+          {
+            "x": 25.0,
+            "y": 220.0
+          },
+          {
+            "x": 25.0,
+            "y": 675.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIand41#0",
+          "pinName": "Y4"
+        },
+        "pin2": {
+          "compName": "GUIram2#3",
+          "pinName": "WE"
+        },
+        "path": [
+          {
+            "x": 275.0,
+            "y": 185.0
+          },
+          {
+            "x": 275.0,
+            "y": 215.0
+          },
+          {
+            "x": 20.0,
+            "y": 215.0
+          },
+          {
+            "x": 20.0,
+            "y": 825.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#16",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#24",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#24",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIram2#0",
+          "pinName": "A0"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#17",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#25",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#25",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIram2#0",
+          "pinName": "A1"
+        },
+        "path": [
+          {
+            "x": 45.0,
+            "y": 345.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#18",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIram2#0",
+          "pinName": "B0"
+        },
+        "path": [
+          {
+            "x": 50.0,
+            "y": 355.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#19",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIram2#0",
+          "pinName": "B1"
+        },
+        "path": [
+          {
+            "x": 55.0,
+            "y": 365.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#16",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIram2#1",
+          "pinName": "A0"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#17",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIram2#1",
+          "pinName": "A1"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#18",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIram2#1",
+          "pinName": "B0"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#19",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIram2#1",
+          "pinName": "B1"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#16",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#20",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#17",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#21",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#18",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#26",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "B2"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#26",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#26",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#22",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#19",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#23",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#20",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIram2#2",
+          "pinName": "A0"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#21",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIram2#2",
+          "pinName": "A1"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#22",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIram2#2",
+          "pinName": "B0"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#23",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIram2#2",
+          "pinName": "B1"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#20",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIram2#3",
+          "pinName": "A0"
+        },
+        "path": [
+          {
+            "x": 40.0,
+            "y": 785.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#21",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIram2#3",
+          "pinName": "A1"
+        },
+        "path": [
+          {
+            "x": 45.0,
+            "y": 795.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#22",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIram2#3",
+          "pinName": "B0"
+        },
+        "path": [
+          {
+            "x": 50.0,
+            "y": 805.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#23",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#27",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#27",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIram2#3",
+          "pinName": "B1"
+        },
+        "path": [
+          {
+            "x": 55.0,
+            "y": 815.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "A2"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#24",
+          "pinName": ""
+        },
+        "path": [
+          {
+            "x": 40.0,
+            "y": 250.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "A3"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#25",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "B3"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#27",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#4",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIram2#0",
+          "pinName": "D1"
+        },
+        "path": [
+          {
+            "x": 60.0,
+            "y": 385.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#5",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIram2#0",
+          "pinName": "D2"
+        },
+        "path": [
+          {
+            "x": 65.0,
+            "y": 395.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#6",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIram2#0",
+          "pinName": "D3"
+        },
+        "path": [
+          {
+            "x": 70.0,
+            "y": 405.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#7",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIram2#0",
+          "pinName": "D4"
+        },
+        "path": [
+          {
+            "x": 75.0,
+            "y": 415.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#4",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIram2#1",
+          "pinName": "D1"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#5",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIram2#1",
+          "pinName": "D2"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#6",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIram2#1",
+          "pinName": "D3"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#7",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIram2#1",
+          "pinName": "D4"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#4",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#8",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#5",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#9",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#6",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#10",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#7",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#11",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#8",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIram2#2",
+          "pinName": "D1"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#9",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIram2#2",
+          "pinName": "D2"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#10",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIram2#2",
+          "pinName": "D3"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#11",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIram2#2",
+          "pinName": "D4"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#8",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#12",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#9",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#13",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#10",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#14",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#11",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#15",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#12",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIram2#3",
+          "pinName": "D1"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#13",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIram2#3",
+          "pinName": "D2"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#14",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIram2#3",
+          "pinName": "D3"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#15",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIram2#3",
+          "pinName": "D4"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "D1"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#12",
+          "pinName": ""
+        },
+        "path": [
+          {
+            "x": 60.0,
+            "y": 950.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "D2"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#13",
+          "pinName": ""
+        },
+        "path": [
+          {
+            "x": 65.0,
+            "y": 1050.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "D3"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#14",
+          "pinName": ""
+        },
+        "path": [
+          {
+            "x": 70.0,
+            "y": 1150.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "D4"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#15",
+          "pinName": ""
+        },
+        "path": [
+          {
+            "x": 75.0,
+            "y": 1250.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIdemux2#0",
+          "pinName": "Y00"
+        },
+        "pin2": {
+          "compName": "GUIand41#2",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 135.0,
+            "y": 50.0
+          },
+          {
+            "x": 135.0,
+            "y": 370.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIdemux2#0",
+          "pinName": "Y01"
+        },
+        "pin2": {
+          "compName": "GUIandor414#3",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 130.0,
+            "y": 60.0
+          },
+          {
+            "x": 130.0,
+            "y": 520.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIdemux2#0",
+          "pinName": "Y10"
+        },
+        "pin2": {
+          "compName": "GUIandor414#4",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 125.0,
+            "y": 70.0
+          },
+          {
+            "x": 125.0,
+            "y": 670.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIdemux2#0",
+          "pinName": "Y11"
+        },
+        "pin2": {
+          "compName": "GUIandor414#5",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 120.0,
+            "y": 80.0
+          },
+          {
+            "x": 120.0,
+            "y": 820.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIand41#1",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 230.0,
+            "y": 420.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIandor414#0",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 225.0,
+            "y": 570.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIandor414#1",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 220.0,
+            "y": 720.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#3",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIandor414#2",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 215.0,
+            "y": 870.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIram2#0",
+          "pinName": "QB1"
+        },
+        "pin2": {
+          "compName": "GUIand41#1",
+          "pinName": "A1"
+        },
+        "path": [
+          {
+            "x": 140.0,
+            "y": 375.0
+          },
+          {
+            "x": 140.0,
+            "y": 380.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIram2#0",
+          "pinName": "QB2"
+        },
+        "pin2": {
+          "compName": "GUIand41#1",
+          "pinName": "A2"
+        },
+        "path": [
+          {
+            "x": 140.0,
+            "y": 385.0
+          },
+          {
+            "x": 140.0,
+            "y": 390.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIram2#0",
+          "pinName": "QB3"
+        },
+        "pin2": {
+          "compName": "GUIand41#1",
+          "pinName": "A3"
+        },
+        "path": [
+          {
+            "x": 140.0,
+            "y": 395.0
+          },
+          {
+            "x": 140.0,
+            "y": 400.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIram2#0",
+          "pinName": "QB4"
+        },
+        "pin2": {
+          "compName": "GUIand41#1",
+          "pinName": "A4"
+        },
+        "path": [
+          {
+            "x": 140.0,
+            "y": 405.0
+          },
+          {
+            "x": 140.0,
+            "y": 410.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIram2#1",
+          "pinName": "QB1"
+        },
+        "pin2": {
+          "compName": "GUIandor414#0",
+          "pinName": "A1"
+        },
+        "path": [
+          {
+            "x": 140.0,
+            "y": 525.0
+          },
+          {
+            "x": 140.0,
+            "y": 530.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIram2#1",
+          "pinName": "QB2"
+        },
+        "pin2": {
+          "compName": "GUIandor414#0",
+          "pinName": "A2"
+        },
+        "path": [
+          {
+            "x": 140.0,
+            "y": 535.0
+          },
+          {
+            "x": 140.0,
+            "y": 540.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIram2#1",
+          "pinName": "QB3"
+        },
+        "pin2": {
+          "compName": "GUIandor414#0",
+          "pinName": "A3"
+        },
+        "path": [
+          {
+            "x": 140.0,
+            "y": 545.0
+          },
+          {
+            "x": 140.0,
+            "y": 550.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIram2#1",
+          "pinName": "QB4"
+        },
+        "pin2": {
+          "compName": "GUIandor414#0",
+          "pinName": "A4"
+        },
+        "path": [
+          {
+            "x": 140.0,
+            "y": 555.0
+          },
+          {
+            "x": 140.0,
+            "y": 560.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIram2#2",
+          "pinName": "QB1"
+        },
+        "pin2": {
+          "compName": "GUIandor414#1",
+          "pinName": "A1"
+        },
+        "path": [
+          {
+            "x": 140.0,
+            "y": 675.0
+          },
+          {
+            "x": 140.0,
+            "y": 680.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIram2#2",
+          "pinName": "QB2"
+        },
+        "pin2": {
+          "compName": "GUIandor414#1",
+          "pinName": "A2"
+        },
+        "path": [
+          {
+            "x": 140.0,
+            "y": 685.0
+          },
+          {
+            "x": 140.0,
+            "y": 690.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIram2#2",
+          "pinName": "QB3"
+        },
+        "pin2": {
+          "compName": "GUIandor414#1",
+          "pinName": "A3"
+        },
+        "path": [
+          {
+            "x": 140.0,
+            "y": 695.0
+          },
+          {
+            "x": 140.0,
+            "y": 700.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIram2#2",
+          "pinName": "QB4"
+        },
+        "pin2": {
+          "compName": "GUIandor414#1",
+          "pinName": "A4"
+        },
+        "path": [
+          {
+            "x": 140.0,
+            "y": 705.0
+          },
+          {
+            "x": 140.0,
+            "y": 710.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIram2#3",
+          "pinName": "QB1"
+        },
+        "pin2": {
+          "compName": "GUIandor414#2",
+          "pinName": "A1"
+        },
+        "path": [
+          {
+            "x": 140.0,
+            "y": 825.0
+          },
+          {
+            "x": 140.0,
+            "y": 830.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIram2#3",
+          "pinName": "QB2"
+        },
+        "pin2": {
+          "compName": "GUIandor414#2",
+          "pinName": "A2"
+        },
+        "path": [
+          {
+            "x": 140.0,
+            "y": 835.0
+          },
+          {
+            "x": 140.0,
+            "y": 840.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIram2#3",
+          "pinName": "QB3"
+        },
+        "pin2": {
+          "compName": "GUIandor414#2",
+          "pinName": "A3"
+        },
+        "path": [
+          {
+            "x": 140.0,
+            "y": 845.0
+          },
+          {
+            "x": 140.0,
+            "y": 850.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIram2#3",
+          "pinName": "QB4"
+        },
+        "pin2": {
+          "compName": "GUIandor414#2",
+          "pinName": "A4"
+        },
+        "path": [
+          {
+            "x": 140.0,
+            "y": 855.0
+          },
+          {
+            "x": 140.0,
+            "y": 860.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIram2#0",
+          "pinName": "QA1"
+        },
+        "pin2": {
+          "compName": "GUIand41#2",
+          "pinName": "A1"
+        },
+        "path": [
+          {
+            "x": 140.0,
+            "y": 335.0
+          },
+          {
+            "x": 140.0,
+            "y": 330.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIram2#0",
+          "pinName": "QA2"
+        },
+        "pin2": {
+          "compName": "GUIand41#2",
+          "pinName": "A2"
+        },
+        "path": [
+          {
+            "x": 140.0,
+            "y": 345.0
+          },
+          {
+            "x": 140.0,
+            "y": 340.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIram2#0",
+          "pinName": "QA3"
+        },
+        "pin2": {
+          "compName": "GUIand41#2",
+          "pinName": "A3"
+        },
+        "path": [
+          {
+            "x": 140.0,
+            "y": 355.0
+          },
+          {
+            "x": 140.0,
+            "y": 350.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIram2#0",
+          "pinName": "QA4"
+        },
+        "pin2": {
+          "compName": "GUIand41#2",
+          "pinName": "A4"
+        },
+        "path": [
+          {
+            "x": 140.0,
+            "y": 365.0
+          },
+          {
+            "x": 140.0,
+            "y": 360.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIram2#1",
+          "pinName": "QA1"
+        },
+        "pin2": {
+          "compName": "GUIandor414#3",
+          "pinName": "A1"
+        },
+        "path": [
+          {
+            "x": 140.0,
+            "y": 485.0
+          },
+          {
+            "x": 140.0,
+            "y": 480.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIram2#1",
+          "pinName": "QA2"
+        },
+        "pin2": {
+          "compName": "GUIandor414#3",
+          "pinName": "A2"
+        },
+        "path": [
+          {
+            "x": 140.0,
+            "y": 495.0
+          },
+          {
+            "x": 140.0,
+            "y": 490.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIram2#1",
+          "pinName": "QA3"
+        },
+        "pin2": {
+          "compName": "GUIandor414#3",
+          "pinName": "A3"
+        },
+        "path": [
+          {
+            "x": 140.0,
+            "y": 505.0
+          },
+          {
+            "x": 140.0,
+            "y": 500.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIram2#1",
+          "pinName": "QA4"
+        },
+        "pin2": {
+          "compName": "GUIandor414#3",
+          "pinName": "A4"
+        },
+        "path": [
+          {
+            "x": 140.0,
+            "y": 515.0
+          },
+          {
+            "x": 140.0,
+            "y": 510.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIram2#2",
+          "pinName": "QA1"
+        },
+        "pin2": {
+          "compName": "GUIandor414#4",
+          "pinName": "A1"
+        },
+        "path": [
+          {
+            "x": 140.0,
+            "y": 635.0
+          },
+          {
+            "x": 140.0,
+            "y": 630.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIram2#2",
+          "pinName": "QA2"
+        },
+        "pin2": {
+          "compName": "GUIandor414#4",
+          "pinName": "A2"
+        },
+        "path": [
+          {
+            "x": 140.0,
+            "y": 645.0
+          },
+          {
+            "x": 140.0,
+            "y": 640.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIram2#2",
+          "pinName": "QA3"
+        },
+        "pin2": {
+          "compName": "GUIandor414#4",
+          "pinName": "A3"
+        },
+        "path": [
+          {
+            "x": 140.0,
+            "y": 655.0
+          },
+          {
+            "x": 140.0,
+            "y": 650.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIram2#2",
+          "pinName": "QA4"
+        },
+        "pin2": {
+          "compName": "GUIandor414#4",
+          "pinName": "A4"
+        },
+        "path": [
+          {
+            "x": 140.0,
+            "y": 665.0
+          },
+          {
+            "x": 140.0,
+            "y": 660.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIram2#3",
+          "pinName": "QA1"
+        },
+        "pin2": {
+          "compName": "GUIandor414#5",
+          "pinName": "A1"
+        },
+        "path": [
+          {
+            "x": 140.0,
+            "y": 785.0
+          },
+          {
+            "x": 140.0,
+            "y": 780.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIram2#3",
+          "pinName": "QA2"
+        },
+        "pin2": {
+          "compName": "GUIandor414#5",
+          "pinName": "A2"
+        },
+        "path": [
+          {
+            "x": 140.0,
+            "y": 795.0
+          },
+          {
+            "x": 140.0,
+            "y": 790.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIram2#3",
+          "pinName": "QA3"
+        },
+        "pin2": {
+          "compName": "GUIandor414#5",
+          "pinName": "A3"
+        },
+        "path": [
+          {
+            "x": 140.0,
+            "y": 805.0
+          },
+          {
+            "x": 140.0,
+            "y": 800.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIram2#3",
+          "pinName": "QA4"
+        },
+        "pin2": {
+          "compName": "GUIandor414#5",
+          "pinName": "A4"
+        },
+        "path": [
+          {
+            "x": 140.0,
+            "y": 815.0
+          },
+          {
+            "x": 140.0,
+            "y": 810.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIand41#1",
+          "pinName": "Y1"
+        },
+        "pin2": {
+          "compName": "GUIandor414#0",
+          "pinName": "C1"
+        },
+        "path": [
+          {
+            "x": 305.0,
+            "y": 380.0
+          },
+          {
+            "x": 305.0,
+            "y": 445.0
+          },
+          {
+            "x": 245.0,
+            "y": 445.0
+          },
+          {
+            "x": 245.0,
+            "y": 490.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIand41#1",
+          "pinName": "Y2"
+        },
+        "pin2": {
+          "compName": "GUIandor414#0",
+          "pinName": "C2"
+        },
+        "path": [
+          {
+            "x": 300.0,
+            "y": 390.0
+          },
+          {
+            "x": 300.0,
+            "y": 440.0
+          },
+          {
+            "x": 240.0,
+            "y": 440.0
+          },
+          {
+            "x": 240.0,
+            "y": 500.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIand41#1",
+          "pinName": "Y3"
+        },
+        "pin2": {
+          "compName": "GUIandor414#0",
+          "pinName": "C3"
+        },
+        "path": [
+          {
+            "x": 295.0,
+            "y": 400.0
+          },
+          {
+            "x": 295.0,
+            "y": 435.0
+          },
+          {
+            "x": 235.0,
+            "y": 435.0
+          },
+          {
+            "x": 235.0,
+            "y": 510.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIand41#1",
+          "pinName": "Y4"
+        },
+        "pin2": {
+          "compName": "GUIandor414#0",
+          "pinName": "C4"
+        },
+        "path": [
+          {
+            "x": 290.0,
+            "y": 410.0
+          },
+          {
+            "x": 290.0,
+            "y": 430.0
+          },
+          {
+            "x": 230.0,
+            "y": 430.0
+          },
+          {
+            "x": 230.0,
+            "y": 520.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIandor414#0",
+          "pinName": "Y1"
+        },
+        "pin2": {
+          "compName": "GUIandor414#1",
+          "pinName": "C1"
+        },
+        "path": [
+          {
+            "x": 305.0,
+            "y": 490.0
+          },
+          {
+            "x": 305.0,
+            "y": 595.0
+          },
+          {
+            "x": 245.0,
+            "y": 595.0
+          },
+          {
+            "x": 245.0,
+            "y": 640.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIandor414#0",
+          "pinName": "Y2"
+        },
+        "pin2": {
+          "compName": "GUIandor414#1",
+          "pinName": "C2"
+        },
+        "path": [
+          {
+            "x": 300.0,
+            "y": 500.0
+          },
+          {
+            "x": 300.0,
+            "y": 590.0
+          },
+          {
+            "x": 240.0,
+            "y": 590.0
+          },
+          {
+            "x": 240.0,
+            "y": 650.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIandor414#0",
+          "pinName": "Y3"
+        },
+        "pin2": {
+          "compName": "GUIandor414#1",
+          "pinName": "C3"
+        },
+        "path": [
+          {
+            "x": 295.0,
+            "y": 510.0
+          },
+          {
+            "x": 295.0,
+            "y": 585.0
+          },
+          {
+            "x": 235.0,
+            "y": 585.0
+          },
+          {
+            "x": 235.0,
+            "y": 660.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIandor414#0",
+          "pinName": "Y4"
+        },
+        "pin2": {
+          "compName": "GUIandor414#1",
+          "pinName": "C4"
+        },
+        "path": [
+          {
+            "x": 290.0,
+            "y": 520.0
+          },
+          {
+            "x": 290.0,
+            "y": 580.0
+          },
+          {
+            "x": 230.0,
+            "y": 580.0
+          },
+          {
+            "x": 230.0,
+            "y": 670.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIandor414#1",
+          "pinName": "Y1"
+        },
+        "pin2": {
+          "compName": "GUIandor414#2",
+          "pinName": "C1"
+        },
+        "path": [
+          {
+            "x": 305.0,
+            "y": 640.0
+          },
+          {
+            "x": 305.0,
+            "y": 745.0
+          },
+          {
+            "x": 245.0,
+            "y": 745.0
+          },
+          {
+            "x": 245.0,
+            "y": 790.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIandor414#1",
+          "pinName": "Y2"
+        },
+        "pin2": {
+          "compName": "GUIandor414#2",
+          "pinName": "C2"
+        },
+        "path": [
+          {
+            "x": 300.0,
+            "y": 650.0
+          },
+          {
+            "x": 300.0,
+            "y": 740.0
+          },
+          {
+            "x": 240.0,
+            "y": 740.0
+          },
+          {
+            "x": 240.0,
+            "y": 800.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIandor414#1",
+          "pinName": "Y3"
+        },
+        "pin2": {
+          "compName": "GUIandor414#2",
+          "pinName": "C3"
+        },
+        "path": [
+          {
+            "x": 295.0,
+            "y": 660.0
+          },
+          {
+            "x": 295.0,
+            "y": 735.0
+          },
+          {
+            "x": 235.0,
+            "y": 735.0
+          },
+          {
+            "x": 235.0,
+            "y": 810.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIandor414#1",
+          "pinName": "Y4"
+        },
+        "pin2": {
+          "compName": "GUIandor414#2",
+          "pinName": "C4"
+        },
+        "path": [
+          {
+            "x": 290.0,
+            "y": 670.0
+          },
+          {
+            "x": 290.0,
+            "y": 730.0
+          },
+          {
+            "x": 230.0,
+            "y": 730.0
+          },
+          {
+            "x": 230.0,
+            "y": 820.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIandor414#2",
+          "pinName": "Y1"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "QB1"
+        },
+        "path": [
+          {
+            "x": 330.0,
+            "y": 790.0
+          },
+          {
+            "x": 330.0,
+            "y": 450.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIandor414#2",
+          "pinName": "Y2"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "QB2"
+        },
+        "path": [
+          {
+            "x": 335.0,
+            "y": 800.0
+          },
+          {
+            "x": 335.0,
+            "y": 550.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIandor414#2",
+          "pinName": "Y3"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "QB3"
+        },
+        "path": [
+          {
+            "x": 340.0,
+            "y": 810.0
+          },
+          {
+            "x": 340.0,
+            "y": 650.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIandor414#2",
+          "pinName": "Y4"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "QB4"
+        },
+        "path": [
+          {
+            "x": 345.0,
+            "y": 820.0
+          },
+          {
+            "x": 345.0,
+            "y": 750.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIand41#2",
+          "pinName": "Y1"
+        },
+        "pin2": {
+          "compName": "GUIandor414#3",
+          "pinName": "C1"
+        },
+        "path": [
+          {
+            "x": 210.0,
+            "y": 330.0
+          },
+          {
+            "x": 210.0,
+            "y": 430.0
+          },
+          {
+            "x": 150.0,
+            "y": 430.0
+          },
+          {
+            "x": 150.0,
+            "y": 440.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIand41#2",
+          "pinName": "Y2"
+        },
+        "pin2": {
+          "compName": "GUIandor414#3",
+          "pinName": "C2"
+        },
+        "path": [
+          {
+            "x": 205.0,
+            "y": 340.0
+          },
+          {
+            "x": 205.0,
+            "y": 425.0
+          },
+          {
+            "x": 145.0,
+            "y": 425.0
+          },
+          {
+            "x": 145.0,
+            "y": 450.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIand41#2",
+          "pinName": "Y3"
+        },
+        "pin2": {
+          "compName": "GUIandor414#3",
+          "pinName": "C3"
+        },
+        "path": [
+          {
+            "x": 200.0,
+            "y": 350.0
+          },
+          {
+            "x": 200.0,
+            "y": 420.0
+          },
+          {
+            "x": 140.0,
+            "y": 420.0
+          },
+          {
+            "x": 140.0,
+            "y": 460.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIand41#2",
+          "pinName": "Y4"
+        },
+        "pin2": {
+          "compName": "GUIandor414#3",
+          "pinName": "C4"
+        },
+        "path": [
+          {
+            "x": 195.0,
+            "y": 360.0
+          },
+          {
+            "x": 195.0,
+            "y": 415.0
+          },
+          {
+            "x": 135.0,
+            "y": 415.0
+          },
+          {
+            "x": 135.0,
+            "y": 470.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIandor414#3",
+          "pinName": "Y1"
+        },
+        "pin2": {
+          "compName": "GUIandor414#4",
+          "pinName": "C1"
+        },
+        "path": [
+          {
+            "x": 210.0,
+            "y": 440.0
+          },
+          {
+            "x": 210.0,
+            "y": 580.0
+          },
+          {
+            "x": 150.0,
+            "y": 580.0
+          },
+          {
+            "x": 150.0,
+            "y": 590.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIandor414#3",
+          "pinName": "Y2"
+        },
+        "pin2": {
+          "compName": "GUIandor414#4",
+          "pinName": "C2"
+        },
+        "path": [
+          {
+            "x": 205.0,
+            "y": 450.0
+          },
+          {
+            "x": 205.0,
+            "y": 575.0
+          },
+          {
+            "x": 145.0,
+            "y": 575.0
+          },
+          {
+            "x": 145.0,
+            "y": 600.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIandor414#3",
+          "pinName": "Y3"
+        },
+        "pin2": {
+          "compName": "GUIandor414#4",
+          "pinName": "C3"
+        },
+        "path": [
+          {
+            "x": 200.0,
+            "y": 460.0
+          },
+          {
+            "x": 200.0,
+            "y": 570.0
+          },
+          {
+            "x": 140.0,
+            "y": 570.0
+          },
+          {
+            "x": 140.0,
+            "y": 610.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIandor414#3",
+          "pinName": "Y4"
+        },
+        "pin2": {
+          "compName": "GUIandor414#4",
+          "pinName": "C4"
+        },
+        "path": [
+          {
+            "x": 195.0,
+            "y": 470.0
+          },
+          {
+            "x": 195.0,
+            "y": 565.0
+          },
+          {
+            "x": 135.0,
+            "y": 565.0
+          },
+          {
+            "x": 135.0,
+            "y": 620.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIandor414#4",
+          "pinName": "Y1"
+        },
+        "pin2": {
+          "compName": "GUIandor414#5",
+          "pinName": "C1"
+        },
+        "path": [
+          {
+            "x": 210.0,
+            "y": 590.0
+          },
+          {
+            "x": 210.0,
+            "y": 730.0
+          },
+          {
+            "x": 150.0,
+            "y": 730.0
+          },
+          {
+            "x": 150.0,
+            "y": 740.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIandor414#4",
+          "pinName": "Y2"
+        },
+        "pin2": {
+          "compName": "GUIandor414#5",
+          "pinName": "C2"
+        },
+        "path": [
+          {
+            "x": 205.0,
+            "y": 600.0
+          },
+          {
+            "x": 205.0,
+            "y": 725.0
+          },
+          {
+            "x": 145.0,
+            "y": 725.0
+          },
+          {
+            "x": 145.0,
+            "y": 750.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIandor414#4",
+          "pinName": "Y3"
+        },
+        "pin2": {
+          "compName": "GUIandor414#5",
+          "pinName": "C3"
+        },
+        "path": [
+          {
+            "x": 200.0,
+            "y": 610.0
+          },
+          {
+            "x": 200.0,
+            "y": 720.0
+          },
+          {
+            "x": 140.0,
+            "y": 720.0
+          },
+          {
+            "x": 140.0,
+            "y": 760.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIandor414#4",
+          "pinName": "Y4"
+        },
+        "pin2": {
+          "compName": "GUIandor414#5",
+          "pinName": "C4"
+        },
+        "path": [
+          {
+            "x": 195.0,
+            "y": 620.0
+          },
+          {
+            "x": 195.0,
+            "y": 715.0
+          },
+          {
+            "x": 135.0,
+            "y": 715.0
+          },
+          {
+            "x": 135.0,
+            "y": 770.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIandor414#5",
+          "pinName": "Y1"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "QA1"
+        },
+        "path": [
+          {
+            "x": 210.0,
+            "y": 740.0
+          },
+          {
+            "x": 210.0,
+            "y": 880.0
+          },
+          {
+            "x": 310.0,
+            "y": 880.0
+          },
+          {
+            "x": 310.0,
+            "y": 50.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIandor414#5",
+          "pinName": "Y2"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "QA2"
+        },
+        "path": [
+          {
+            "x": 205.0,
+            "y": 750.0
+          },
+          {
+            "x": 205.0,
+            "y": 885.0
+          },
+          {
+            "x": 315.0,
+            "y": 885.0
+          },
+          {
+            "x": 315.0,
+            "y": 150.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIandor414#5",
+          "pinName": "Y3"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "QA3"
+        },
+        "path": [
+          {
+            "x": 200.0,
+            "y": 760.0
+          },
+          {
+            "x": 200.0,
+            "y": 890.0
+          },
+          {
+            "x": 320.0,
+            "y": 890.0
+          },
+          {
+            "x": 320.0,
+            "y": 250.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIandor414#5",
+          "pinName": "Y4"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "QA4"
+        },
+        "path": [
+          {
+            "x": 195.0,
+            "y": 770.0
+          },
+          {
+            "x": 195.0,
+            "y": 895.0
+          },
+          {
+            "x": 325.0,
+            "y": 895.0
+          },
+          {
+            "x": 325.0,
+            "y": 350.0
+          }
+        ]
+      }
+    ]
+  },
+  "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+  "symbolRendererParams": {
+    "centerText": "GUIram4",
+    "horizontalComponentCenter": 17.5,
+    "centerTextHeight": 5.0,
+    "pinLabelHeight": 3.5,
+    "pinLabelMargin": 0.5
+  }
+}
\ No newline at end of file
diff --git a/net.mograsim.logic.model.editor/components/GUIsel2_4.json b/net.mograsim.logic.model.editor/components/GUIsel2_4.json
new file mode 100644 (file)
index 0000000..219e1b9
--- /dev/null
@@ -0,0 +1,812 @@
+mograsim version: 0.1.3
+{
+  "width": 35.0,
+  "height": 100.0,
+  "interfacePins": [
+    {
+      "location": {
+        "x": 0.0,
+        "y": 5.0
+      },
+      "name": "SA",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 15.0
+      },
+      "name": "SB",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 65.0
+      },
+      "name": "B1",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 25.0
+      },
+      "name": "A1",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 75.0
+      },
+      "name": "B2",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 35.0
+      },
+      "name": "A2",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 85.0
+      },
+      "name": "B3",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 45.0
+      },
+      "name": "A3",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 95.0
+      },
+      "name": "B4",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 55.0
+      },
+      "name": "A4",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 5.0
+      },
+      "name": "Y1",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 15.0
+      },
+      "name": "Y2",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 25.0
+      },
+      "name": "Y3",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 35.0
+      },
+      "name": "Y4",
+      "logicWidth": 1
+    }
+  ],
+  "submodel": {
+    "innerScale": 0.4,
+    "subComps": [
+      {
+        "pos": {
+          "x": 20.0,
+          "y": 52.5
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#1",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 20.0,
+          "y": 2.5
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#0",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 20.0,
+          "y": 152.5
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#3",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 20.0,
+          "y": 102.5
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#2",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 65.0,
+          "y": 77.5
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#11",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 65.0,
+          "y": 52.5
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#10",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 6.5,
+          "y": 66.5
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#1",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 6.5,
+          "y": 16.5
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#0",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 4.0,
+          "y": 41.5
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#3",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 6.5,
+          "y": 116.5
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#2",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 4.0,
+          "y": 141.5
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#5",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 4.0,
+          "y": 91.5
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#4",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 65.0,
+          "y": 27.5
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#9",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 65.0,
+          "y": 2.5
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#8",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 20.0,
+          "y": 77.5
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#5",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 20.0,
+          "y": 27.5
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#4",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 20.0,
+          "y": 177.5
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#7",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 20.0,
+          "y": 127.5
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#6",
+        "params": 1
+      }
+    ],
+    "innerWires": [
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "A1"
+        },
+        "pin2": {
+          "compName": "GUINandGate#0",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 15.0,
+            "y": 62.5
+          },
+          {
+            "x": 15.0,
+            "y": 7.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "A2"
+        },
+        "pin2": {
+          "compName": "GUINandGate#1",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 17.5,
+            "y": 87.5
+          },
+          {
+            "x": 17.5,
+            "y": 57.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "A3"
+        },
+        "pin2": {
+          "compName": "GUINandGate#2",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 17.5,
+            "y": 112.5
+          },
+          {
+            "x": 17.5,
+            "y": 107.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "A4"
+        },
+        "pin2": {
+          "compName": "GUINandGate#3",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 17.5,
+            "y": 137.5
+          },
+          {
+            "x": 17.5,
+            "y": 157.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "B1"
+        },
+        "pin2": {
+          "compName": "GUINandGate#4",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 10.0,
+            "y": 162.5
+          },
+          {
+            "x": 10.0,
+            "y": 32.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "B2"
+        },
+        "pin2": {
+          "compName": "GUINandGate#5",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 12.5,
+            "y": 187.5
+          },
+          {
+            "x": 12.5,
+            "y": 82.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "B3"
+        },
+        "pin2": {
+          "compName": "GUINandGate#6",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 15.0,
+            "y": 212.5
+          },
+          {
+            "x": 15.0,
+            "y": 132.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "B4"
+        },
+        "pin2": {
+          "compName": "GUINandGate#7",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 10.0,
+            "y": 237.5
+          },
+          {
+            "x": 10.0,
+            "y": 182.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "SA"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        }
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "SB"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#3",
+          "pinName": ""
+        }
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        }
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#0",
+          "pinName": "B"
+        }
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        }
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#1",
+          "pinName": "B"
+        }
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#2",
+          "pinName": "B"
+        }
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#3",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 7.5,
+            "y": 167.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#3",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#4",
+          "pinName": ""
+        }
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#3",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#4",
+          "pinName": "B"
+        }
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#4",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#5",
+          "pinName": ""
+        }
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#4",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#5",
+          "pinName": "B"
+        }
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#5",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#6",
+          "pinName": "B"
+        }
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#5",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#7",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 5.0,
+            "y": 192.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#0",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUINandGate#8",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 42.5,
+            "y": 12.5
+          },
+          {
+            "x": 42.5,
+            "y": 7.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#4",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUINandGate#8",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 45.0,
+            "y": 37.5
+          },
+          {
+            "x": 45.0,
+            "y": 17.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#1",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUINandGate#9",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 47.5,
+            "y": 62.5
+          },
+          {
+            "x": 47.5,
+            "y": 32.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#5",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUINandGate#9",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 50.0,
+            "y": 87.5
+          },
+          {
+            "x": 50.0,
+            "y": 42.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#2",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUINandGate#10",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 52.5,
+            "y": 112.5
+          },
+          {
+            "x": 52.5,
+            "y": 57.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#6",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUINandGate#10",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 55.0,
+            "y": 137.5
+          },
+          {
+            "x": 55.0,
+            "y": 67.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#3",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUINandGate#11",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 57.5,
+            "y": 162.5
+          },
+          {
+            "x": 57.5,
+            "y": 82.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#7",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUINandGate#11",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 60.0,
+            "y": 187.5
+          },
+          {
+            "x": 60.0,
+            "y": 92.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#8",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Y1"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#9",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Y2"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#10",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Y3"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#11",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Y4"
+        },
+        "path": []
+      }
+    ]
+  },
+  "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+  "symbolRendererParams": {
+    "centerText": "GUIsel2_4",
+    "horizontalComponentCenter": 17.5,
+    "centerTextHeight": 5.0,
+    "pinLabelHeight": 3.5,
+    "pinLabelMargin": 0.5
+  }
+}
\ No newline at end of file
diff --git a/net.mograsim.logic.model.editor/components/GUIsel3_4.json b/net.mograsim.logic.model.editor/components/GUIsel3_4.json
new file mode 100644 (file)
index 0000000..1cae789
--- /dev/null
@@ -0,0 +1,878 @@
+mograsim version: 0.1.3
+{
+  "width": 35.0,
+  "height": 150.0,
+  "interfacePins": [
+    {
+      "location": {
+        "x": 0.0,
+        "y": 5.0
+      },
+      "name": "SA",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 115.0
+      },
+      "name": "C1",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 15.0
+      },
+      "name": "SB",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 75.0
+      },
+      "name": "B1",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 125.0
+      },
+      "name": "C2",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 25.0
+      },
+      "name": "SC",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 35.0
+      },
+      "name": "A1",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 85.0
+      },
+      "name": "B2",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 135.0
+      },
+      "name": "C3",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 45.0
+      },
+      "name": "A2",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 95.0
+      },
+      "name": "B3",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 145.0
+      },
+      "name": "C4",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 55.0
+      },
+      "name": "A3",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 105.0
+      },
+      "name": "B4",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 65.0
+      },
+      "name": "A4",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 5.0
+      },
+      "name": "Y1",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 15.0
+      },
+      "name": "Y2",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 25.0
+      },
+      "name": "Y3",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 35.0
+      },
+      "name": "Y4",
+      "logicWidth": 1
+    }
+  ],
+  "submodel": {
+    "innerScale": 0.2,
+    "subComps": [
+      {
+        "pos": {
+          "x": 50.0,
+          "y": 620.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#1",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 50.0,
+          "y": 570.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#0",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 50.0,
+          "y": 720.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#3",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 50.0,
+          "y": 670.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#2",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 75.0,
+          "y": 250.0
+        },
+        "id": "GUInot4",
+        "name": "GUInot4#0"
+      },
+      {
+        "pos": {
+          "x": 29.0,
+          "y": 634.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#1",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 29.0,
+          "y": 584.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#0",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 29.0,
+          "y": 684.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#2",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 152.5,
+          "y": 65.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#5",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 35.0,
+          "y": 250.0
+        },
+        "id": "GUIsel2_4",
+        "name": "GUIsel2_4#0"
+      },
+      {
+        "pos": {
+          "x": 152.5,
+          "y": 15.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#4",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 152.5,
+          "y": 165.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#7",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 152.5,
+          "y": 115.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#6",
+        "params": 1
+      }
+    ],
+    "innerWires": [
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "SA"
+        },
+        "pin2": {
+          "compName": "GUIsel2_4#0",
+          "pinName": "SA"
+        },
+        "path": [
+          {
+            "x": 25.0,
+            "y": 25.0
+          },
+          {
+            "x": 25.0,
+            "y": 255.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "SB"
+        },
+        "pin2": {
+          "compName": "GUIsel2_4#0",
+          "pinName": "SB"
+        },
+        "path": [
+          {
+            "x": 20.0,
+            "y": 75.0
+          },
+          {
+            "x": 20.0,
+            "y": 265.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "A1"
+        },
+        "pin2": {
+          "compName": "GUIsel2_4#0",
+          "pinName": "A1"
+        },
+        "path": [
+          {
+            "x": 15.0,
+            "y": 175.0
+          },
+          {
+            "x": 15.0,
+            "y": 275.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "A2"
+        },
+        "pin2": {
+          "compName": "GUIsel2_4#0",
+          "pinName": "A2"
+        },
+        "path": [
+          {
+            "x": 10.0,
+            "y": 225.0
+          },
+          {
+            "x": 10.0,
+            "y": 285.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "A3"
+        },
+        "pin2": {
+          "compName": "GUIsel2_4#0",
+          "pinName": "A3"
+        },
+        "path": [
+          {
+            "x": 5.0,
+            "y": 275.0
+          },
+          {
+            "x": 5.0,
+            "y": 295.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "A4"
+        },
+        "pin2": {
+          "compName": "GUIsel2_4#0",
+          "pinName": "A4"
+        },
+        "path": [
+          {
+            "x": 5.0,
+            "y": 325.0
+          },
+          {
+            "x": 5.0,
+            "y": 305.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "B1"
+        },
+        "pin2": {
+          "compName": "GUIsel2_4#0",
+          "pinName": "B1"
+        },
+        "path": [
+          {
+            "x": 10.0,
+            "y": 375.0
+          },
+          {
+            "x": 10.0,
+            "y": 315.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "B2"
+        },
+        "pin2": {
+          "compName": "GUIsel2_4#0",
+          "pinName": "B2"
+        },
+        "path": [
+          {
+            "x": 15.0,
+            "y": 425.0
+          },
+          {
+            "x": 15.0,
+            "y": 325.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "B3"
+        },
+        "pin2": {
+          "compName": "GUIsel2_4#0",
+          "pinName": "B3"
+        },
+        "path": [
+          {
+            "x": 20.0,
+            "y": 475.0
+          },
+          {
+            "x": 20.0,
+            "y": 335.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "B4"
+        },
+        "pin2": {
+          "compName": "GUIsel2_4#0",
+          "pinName": "B4"
+        },
+        "path": [
+          {
+            "x": 25.0,
+            "y": 525.0
+          },
+          {
+            "x": 25.0,
+            "y": 345.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIsel2_4#0",
+          "pinName": "Y1"
+        },
+        "pin2": {
+          "compName": "GUInot4#0",
+          "pinName": "A1"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIsel2_4#0",
+          "pinName": "Y2"
+        },
+        "pin2": {
+          "compName": "GUInot4#0",
+          "pinName": "A2"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIsel2_4#0",
+          "pinName": "Y3"
+        },
+        "pin2": {
+          "compName": "GUInot4#0",
+          "pinName": "A3"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIsel2_4#0",
+          "pinName": "Y4"
+        },
+        "pin2": {
+          "compName": "GUInot4#0",
+          "pinName": "A4"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "SC"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "path": [
+          {
+            "x": 30.0,
+            "y": 125.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#0",
+          "pinName": "B"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "path": [
+          {
+            "x": 30.0,
+            "y": 125.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#1",
+          "pinName": "B"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "path": [
+          {
+            "x": 30.0,
+            "y": 125.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#2",
+          "pinName": "B"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#3",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 30.0,
+            "y": 735.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "C1"
+        },
+        "pin2": {
+          "compName": "GUINandGate#0",
+          "pinName": "A"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "C2"
+        },
+        "pin2": {
+          "compName": "GUINandGate#1",
+          "pinName": "A"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "C3"
+        },
+        "pin2": {
+          "compName": "GUINandGate#2",
+          "pinName": "A"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "C4"
+        },
+        "pin2": {
+          "compName": "GUINandGate#3",
+          "pinName": "A"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUInot4#0",
+          "pinName": "Y1"
+        },
+        "pin2": {
+          "compName": "GUINandGate#4",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 115.0,
+            "y": 255.0
+          },
+          {
+            "x": 115.0,
+            "y": 20.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUInot4#0",
+          "pinName": "Y2"
+        },
+        "pin2": {
+          "compName": "GUINandGate#5",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 120.0,
+            "y": 265.0
+          },
+          {
+            "x": 120.0,
+            "y": 70.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUInot4#0",
+          "pinName": "Y3"
+        },
+        "pin2": {
+          "compName": "GUINandGate#6",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 125.0,
+            "y": 275.0
+          },
+          {
+            "x": 125.0,
+            "y": 120.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUInot4#0",
+          "pinName": "Y4"
+        },
+        "pin2": {
+          "compName": "GUINandGate#7",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 130.0,
+            "y": 285.0
+          },
+          {
+            "x": 130.0,
+            "y": 170.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#0",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUINandGate#4",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 135.0,
+            "y": 580.0
+          },
+          {
+            "x": 135.0,
+            "y": 30.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#1",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUINandGate#5",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 140.0,
+            "y": 630.0
+          },
+          {
+            "x": 140.0,
+            "y": 80.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#2",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUINandGate#6",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 145.0,
+            "y": 680.0
+          },
+          {
+            "x": 145.0,
+            "y": 130.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#3",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUINandGate#7",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 150.0,
+            "y": 730.0
+          },
+          {
+            "x": 150.0,
+            "y": 180.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#4",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Y1"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#5",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Y2"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#6",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Y3"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#7",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Y4"
+        },
+        "path": []
+      }
+    ]
+  },
+  "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+  "symbolRendererParams": {
+    "centerText": "GUIsel3_4",
+    "horizontalComponentCenter": 17.5,
+    "centerTextHeight": 5.0,
+    "pinLabelHeight": 3.5,
+    "pinLabelMargin": 0.5
+  }
+}
\ No newline at end of file
diff --git a/net.mograsim.logic.model.editor/components/GUIxor.json b/net.mograsim.logic.model.editor/components/GUIxor.json
new file mode 100644 (file)
index 0000000..9e3ec59
--- /dev/null
@@ -0,0 +1,267 @@
+mograsim version: 0.1.3
+{
+  "width": 35.0,
+  "height": 20.0,
+  "interfacePins": [
+    {
+      "location": {
+        "x": 0.0,
+        "y": 5.0
+      },
+      "name": "A",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 15.0
+      },
+      "name": "B",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 5.0
+      },
+      "name": "Y",
+      "logicWidth": 1
+    }
+  ],
+  "submodel": {
+    "innerScale": 0.4,
+    "subComps": [
+      {
+        "pos": {
+          "x": 35.0,
+          "y": 2.5
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#1",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 7.5,
+          "y": 15.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#0",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 62.5,
+          "y": 15.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#3",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 4.0,
+          "y": 36.5
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#1",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 35.0,
+          "y": 27.5
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#2",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 4.0,
+          "y": 11.5
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#0",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 29.0,
+          "y": 24.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#2",
+        "params": 1
+      }
+    ],
+    "innerWires": [
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "A"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "B"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#0",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 5.0,
+            "y": 20.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#0",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 5.0,
+            "y": 30.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#0",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        }
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#1",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 30.0,
+            "y": 17.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#2",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 30.0,
+            "y": 32.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#1",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 5.0,
+            "y": 7.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#2",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 5.0,
+            "y": 42.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#1",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUINandGate#3",
+          "pinName": "A"
+        }
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#2",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUINandGate#3",
+          "pinName": "B"
+        }
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#3",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Y"
+        }
+      }
+    ]
+  },
+  "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+  "symbolRendererParams": {
+    "centerText": "GUIxor",
+    "horizontalComponentCenter": 17.5,
+    "centerTextHeight": 5.0,
+    "pinLabelHeight": 3.5,
+    "pinLabelMargin": 0.5
+  }
+}
\ No newline at end of file
diff --git a/net.mograsim.logic.model.editor/components/am2901/GUIAm2901.json b/net.mograsim.logic.model.editor/components/am2901/GUIAm2901.json
new file mode 100644 (file)
index 0000000..7563d83
--- /dev/null
@@ -0,0 +1,3245 @@
+mograsim version: 0.1.3
+{
+  "width": 35.0,
+  "height": 270.0,
+  "interfacePins": [
+    {
+      "location": {
+        "x": 35.0,
+        "y": 85.0
+      },
+      "name": "ORAMn",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 95.0
+      },
+      "name": "C",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 265.0
+      },
+      "name": "IQn+3",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 85.0
+      },
+      "name": "I0",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 255.0
+      },
+      "name": "IQn",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 75.0
+      },
+      "name": "I1",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 65.0
+      },
+      "name": "I2",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 55.0
+      },
+      "name": "I3",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 65.0
+      },
+      "name": "OVR",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 45.0
+      },
+      "name": "I4",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 105.0
+      },
+      "name": "Cn",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 115.0
+      },
+      "name": "OQn+3",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 35.0
+      },
+      "name": "I5",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 25.0
+      },
+      "name": "I6",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 105.0
+      },
+      "name": "OQn",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 15.0
+      },
+      "name": "I7",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 5.0
+      },
+      "name": "I8",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 155.0
+      },
+      "name": "A0",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 165.0
+      },
+      "name": "A1",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 175.0
+      },
+      "name": "A2",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 185.0
+      },
+      "name": "A3",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 235.0
+      },
+      "name": "IRAMn",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 55.0
+      },
+      "name": "Cn+4",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 95.0
+      },
+      "name": "ORAMn+3",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 45.0
+      },
+      "name": "F\u003d0",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 115.0
+      },
+      "name": "D1",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 245.0
+      },
+      "name": "IRAMn+3",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 75.0
+      },
+      "name": "F3",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 125.0
+      },
+      "name": "D2",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 195.0
+      },
+      "name": "B0",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 135.0
+      },
+      "name": "D3",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 205.0
+      },
+      "name": "B1",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 145.0
+      },
+      "name": "D4",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 215.0
+      },
+      "name": "B2",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 225.0
+      },
+      "name": "B3",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 5.0
+      },
+      "name": "Y1",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 15.0
+      },
+      "name": "Y2",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 25.0
+      },
+      "name": "Y3",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 35.0
+      },
+      "name": "Y4",
+      "logicWidth": 1
+    }
+  ],
+  "submodel": {
+    "innerScale": 0.1,
+    "subComps": [
+      {
+        "pos": {
+          "x": 45.0,
+          "y": 2310.0
+        },
+        "id": "GUIsel3_4",
+        "name": "GUIsel3_4#0"
+      },
+      {
+        "pos": {
+          "x": 144.0,
+          "y": 2524.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#14",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 45.0,
+          "y": 2510.0
+        },
+        "id": "GUIsel3_4",
+        "name": "GUIsel3_4#1"
+      },
+      {
+        "pos": {
+          "x": 139.0,
+          "y": 2514.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#13",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 234.0,
+          "y": 2524.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#16",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 219.0,
+          "y": 2494.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#15",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 15.0,
+          "y": 45.0
+        },
+        "id": "GUIAm2901DestDecode",
+        "name": "GUIAm2901DestDecode#0"
+      },
+      {
+        "pos": {
+          "x": 39.0,
+          "y": 2634.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#18",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 34.0,
+          "y": 2624.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#17",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 279.0,
+          "y": 2114.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#19",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 154.0,
+          "y": 89.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#1",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 154.0,
+          "y": 949.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#0",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 154.0,
+          "y": 2319.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#3",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 154.0,
+          "y": 2264.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#2",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 34.0,
+          "y": 2324.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#5",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 39.0,
+          "y": 2314.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#4",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 219.0,
+          "y": 2224.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#7",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 29.0,
+          "y": 2334.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#6",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 229.0,
+          "y": 2244.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#9",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 224.0,
+          "y": 2234.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#8",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 234.0,
+          "y": 2254.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#10",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 134.0,
+          "y": 2504.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#12",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 129.0,
+          "y": 2494.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#11",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 160.0,
+          "y": 2275.0
+        },
+        "id": "GUIdlatch4",
+        "name": "GUIdlatch4#1"
+      },
+      {
+        "pos": {
+          "x": 160.0,
+          "y": 2220.0
+        },
+        "id": "GUIdlatch4",
+        "name": "GUIdlatch4#0"
+      },
+      {
+        "pos": {
+          "x": 314.0,
+          "y": 449.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#40",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 90.0,
+          "y": 2490.0
+        },
+        "id": "GUIAm2901QReg",
+        "name": "GUIAm2901QReg#0"
+      },
+      {
+        "pos": {
+          "x": 320.0,
+          "y": 440.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#1",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 9.0,
+          "y": 2384.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#36",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 160.0,
+          "y": 75.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#0",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 24.0,
+          "y": 2414.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#35",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 19.0,
+          "y": 2434.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#38",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 14.0,
+          "y": 2424.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#37",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 24.0,
+          "y": 2444.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#39",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 190.0,
+          "y": 65.0
+        },
+        "id": "GUIand",
+        "name": "GUIand#0"
+      },
+      {
+        "pos": {
+          "x": 275.0,
+          "y": 135.0
+        },
+        "id": "GUImux1_4",
+        "name": "GUImux1_4#0"
+      },
+      {
+        "pos": {
+          "x": 9.0,
+          "y": 2354.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#30",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 19.0,
+          "y": 2374.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#32",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 14.0,
+          "y": 2364.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#31",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 19.0,
+          "y": 2404.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#34",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 14.0,
+          "y": 2394.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#33",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 269.0,
+          "y": 2104.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#25",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 264.0,
+          "y": 2099.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#24",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 259.0,
+          "y": 459.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#27",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 254.0,
+          "y": 449.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#26",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 275.0,
+          "y": 445.0
+        },
+        "id": "GUIor4",
+        "name": "GUIor4#0"
+      },
+      {
+        "pos": {
+          "x": 269.0,
+          "y": 479.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#29",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 240.0,
+          "y": 2110.0
+        },
+        "id": "GUIAm2901ALUInclSourceDecodeInclFunctionDecode",
+        "name": "GUIAm2901ALUInclSourceDecodeInclFunctionDecode#0"
+      },
+      {
+        "pos": {
+          "x": 264.0,
+          "y": 469.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#28",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 95.0,
+          "y": 2220.0
+        },
+        "id": "GUIram4",
+        "name": "GUIram4#0"
+      },
+      {
+        "pos": {
+          "x": 329.0,
+          "y": 949.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#21",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 294.0,
+          "y": 2144.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#20",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 259.0,
+          "y": 2094.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#23",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 254.0,
+          "y": 2089.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#22",
+        "params": 1
+      }
+    ],
+    "innerWires": [
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "I8"
+        },
+        "pin2": {
+          "compName": "GUIAm2901DestDecode#0",
+          "pinName": "I8"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "I7"
+        },
+        "pin2": {
+          "compName": "GUIAm2901DestDecode#0",
+          "pinName": "I7"
+        },
+        "path": [
+          {
+            "x": 5.0,
+            "y": 150.0
+          },
+          {
+            "x": 5.0,
+            "y": 60.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "I6"
+        },
+        "pin2": {
+          "compName": "GUIAm2901DestDecode#0",
+          "pinName": "I6"
+        },
+        "path": [
+          {
+            "x": 10.0,
+            "y": 250.0
+          },
+          {
+            "x": 10.0,
+            "y": 70.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "I5"
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUInclSourceDecodeInclFunctionDecode#0",
+          "pinName": "I5"
+        },
+        "path": [
+          {
+            "x": 130.0,
+            "y": 350.0
+          },
+          {
+            "x": 130.0,
+            "y": 2115.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "I4"
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUInclSourceDecodeInclFunctionDecode#0",
+          "pinName": "I4"
+        },
+        "path": [
+          {
+            "x": 125.0,
+            "y": 450.0
+          },
+          {
+            "x": 125.0,
+            "y": 2125.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "I3"
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUInclSourceDecodeInclFunctionDecode#0",
+          "pinName": "I3"
+        },
+        "path": [
+          {
+            "x": 120.0,
+            "y": 550.0
+          },
+          {
+            "x": 120.0,
+            "y": 2135.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "I2"
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUInclSourceDecodeInclFunctionDecode#0",
+          "pinName": "I2"
+        },
+        "path": [
+          {
+            "x": 115.0,
+            "y": 650.0
+          },
+          {
+            "x": 115.0,
+            "y": 2145.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "I1"
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUInclSourceDecodeInclFunctionDecode#0",
+          "pinName": "I1"
+        },
+        "path": [
+          {
+            "x": 110.0,
+            "y": 750.0
+          },
+          {
+            "x": 110.0,
+            "y": 2155.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "I0"
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUInclSourceDecodeInclFunctionDecode#0",
+          "pinName": "I0"
+        },
+        "path": [
+          {
+            "x": 105.0,
+            "y": 850.0
+          },
+          {
+            "x": 105.0,
+            "y": 2165.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "C"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#0",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 155.0,
+            "y": 80.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#0",
+          "pinName": "B"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIdlatch4#0",
+          "pinName": "C"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#3",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#3",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIdlatch4#1",
+          "pinName": "C"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#3",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIAm2901QReg#0",
+          "pinName": "C"
+        },
+        "path": [
+          {
+            "x": 155.0,
+            "y": 2485.0
+          },
+          {
+            "x": 80.0,
+            "y": 2485.0
+          },
+          {
+            "x": 80.0,
+            "y": 2495.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2901DestDecode#0",
+          "pinName": "LSH"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#4",
+          "pinName": ""
+        },
+        "path": [
+          {
+            "x": 55.0,
+            "y": 90.0
+          },
+          {
+            "x": 55.0,
+            "y": 125.0
+          },
+          {
+            "x": 40.0,
+            "y": 125.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2901DestDecode#0",
+          "pinName": "NSH"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#5",
+          "pinName": ""
+        },
+        "path": [
+          {
+            "x": 60.0,
+            "y": 50.0
+          },
+          {
+            "x": 60.0,
+            "y": 120.0
+          },
+          {
+            "x": 35.0,
+            "y": 120.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2901DestDecode#0",
+          "pinName": "RSH"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#6",
+          "pinName": ""
+        },
+        "path": [
+          {
+            "x": 65.0,
+            "y": 60.0
+          },
+          {
+            "x": 65.0,
+            "y": 115.0
+          },
+          {
+            "x": 30.0,
+            "y": 115.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#4",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIsel3_4#0",
+          "pinName": "SA"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#5",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIsel3_4#0",
+          "pinName": "SB"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#6",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIsel3_4#0",
+          "pinName": "SC"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#4",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIsel3_4#1",
+          "pinName": "SA"
+        },
+        "path": [
+          {
+            "x": 40.0,
+            "y": 2515.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#5",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIsel3_4#1",
+          "pinName": "SB"
+        },
+        "path": [
+          {
+            "x": 35.0,
+            "y": 2525.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#6",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIsel3_4#1",
+          "pinName": "SC"
+        },
+        "path": [
+          {
+            "x": 30.0,
+            "y": 2535.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "A0"
+        },
+        "pin2": {
+          "compName": "GUIram4#0",
+          "pinName": "A0"
+        },
+        "path": [
+          {
+            "x": 80.0,
+            "y": 1550.0
+          },
+          {
+            "x": 80.0,
+            "y": 2225.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "A1"
+        },
+        "pin2": {
+          "compName": "GUIram4#0",
+          "pinName": "A1"
+        },
+        "path": [
+          {
+            "x": 75.0,
+            "y": 1650.0
+          },
+          {
+            "x": 75.0,
+            "y": 2235.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "A2"
+        },
+        "pin2": {
+          "compName": "GUIram4#0",
+          "pinName": "A2"
+        },
+        "path": [
+          {
+            "x": 70.0,
+            "y": 1750.0
+          },
+          {
+            "x": 70.0,
+            "y": 2245.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "A3"
+        },
+        "pin2": {
+          "compName": "GUIram4#0",
+          "pinName": "A3"
+        },
+        "path": [
+          {
+            "x": 65.0,
+            "y": 1850.0
+          },
+          {
+            "x": 65.0,
+            "y": 2255.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "B0"
+        },
+        "pin2": {
+          "compName": "GUIram4#0",
+          "pinName": "B0"
+        },
+        "path": [
+          {
+            "x": 60.0,
+            "y": 1950.0
+          },
+          {
+            "x": 60.0,
+            "y": 2265.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "B1"
+        },
+        "pin2": {
+          "compName": "GUIram4#0",
+          "pinName": "B1"
+        },
+        "path": [
+          {
+            "x": 55.0,
+            "y": 2050.0
+          },
+          {
+            "x": 55.0,
+            "y": 2275.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "B2"
+        },
+        "pin2": {
+          "compName": "GUIram4#0",
+          "pinName": "B2"
+        },
+        "path": [
+          {
+            "x": 50.0,
+            "y": 2150.0
+          },
+          {
+            "x": 50.0,
+            "y": 2285.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "B3"
+        },
+        "pin2": {
+          "compName": "GUIram4#0",
+          "pinName": "B3"
+        },
+        "path": [
+          {
+            "x": 45.0,
+            "y": 2250.0
+          },
+          {
+            "x": 45.0,
+            "y": 2295.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIram4#0",
+          "pinName": "QA1"
+        },
+        "pin2": {
+          "compName": "GUIdlatch4#0",
+          "pinName": "D1"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIram4#0",
+          "pinName": "QA2"
+        },
+        "pin2": {
+          "compName": "GUIdlatch4#0",
+          "pinName": "D2"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIram4#0",
+          "pinName": "QA3"
+        },
+        "pin2": {
+          "compName": "GUIdlatch4#0",
+          "pinName": "D3"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIram4#0",
+          "pinName": "QA4"
+        },
+        "pin2": {
+          "compName": "GUIdlatch4#0",
+          "pinName": "D4"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIram4#0",
+          "pinName": "QB1"
+        },
+        "pin2": {
+          "compName": "GUIdlatch4#1",
+          "pinName": "D1"
+        },
+        "path": [
+          {
+            "x": 150.0,
+            "y": 2265.0
+          },
+          {
+            "x": 150.0,
+            "y": 2280.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIram4#0",
+          "pinName": "QB2"
+        },
+        "pin2": {
+          "compName": "GUIdlatch4#1",
+          "pinName": "D2"
+        },
+        "path": [
+          {
+            "x": 145.0,
+            "y": 2275.0
+          },
+          {
+            "x": 145.0,
+            "y": 2290.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIram4#0",
+          "pinName": "QB3"
+        },
+        "pin2": {
+          "compName": "GUIdlatch4#1",
+          "pinName": "D3"
+        },
+        "path": [
+          {
+            "x": 140.0,
+            "y": 2285.0
+          },
+          {
+            "x": 140.0,
+            "y": 2300.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIram4#0",
+          "pinName": "QB4"
+        },
+        "pin2": {
+          "compName": "GUIdlatch4#1",
+          "pinName": "D4"
+        },
+        "path": [
+          {
+            "x": 135.0,
+            "y": 2295.0
+          },
+          {
+            "x": 135.0,
+            "y": 2310.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "Cn"
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUInclSourceDecodeInclFunctionDecode#0",
+          "pinName": "Cn"
+        },
+        "path": [
+          {
+            "x": 100.0,
+            "y": 1050.0
+          },
+          {
+            "x": 100.0,
+            "y": 2175.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "D1"
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUInclSourceDecodeInclFunctionDecode#0",
+          "pinName": "D1"
+        },
+        "path": [
+          {
+            "x": 180.0,
+            "y": 1150.0
+          },
+          {
+            "x": 180.0,
+            "y": 2185.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "D2"
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUInclSourceDecodeInclFunctionDecode#0",
+          "pinName": "D2"
+        },
+        "path": [
+          {
+            "x": 175.0,
+            "y": 1250.0
+          },
+          {
+            "x": 175.0,
+            "y": 2195.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "D3"
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUInclSourceDecodeInclFunctionDecode#0",
+          "pinName": "D3"
+        },
+        "path": [
+          {
+            "x": 170.0,
+            "y": 1350.0
+          },
+          {
+            "x": 170.0,
+            "y": 2205.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "D4"
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUInclSourceDecodeInclFunctionDecode#0",
+          "pinName": "D4"
+        },
+        "path": [
+          {
+            "x": 165.0,
+            "y": 1450.0
+          },
+          {
+            "x": 165.0,
+            "y": 2215.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIdlatch4#0",
+          "pinName": "Q1"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#7",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIdlatch4#0",
+          "pinName": "Q2"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#8",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIdlatch4#0",
+          "pinName": "Q3"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#9",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIdlatch4#0",
+          "pinName": "Q4"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#10",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#7",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUImux1_4#0",
+          "pinName": "I0_1"
+        },
+        "path": [
+          {
+            "x": 220.0,
+            "y": 150.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#8",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUImux1_4#0",
+          "pinName": "I0_2"
+        },
+        "path": [
+          {
+            "x": 225.0,
+            "y": 160.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#9",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUImux1_4#0",
+          "pinName": "I0_3"
+        },
+        "path": [
+          {
+            "x": 230.0,
+            "y": 170.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#10",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUImux1_4#0",
+          "pinName": "I0_4"
+        },
+        "path": [
+          {
+            "x": 235.0,
+            "y": 180.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#7",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUInclSourceDecodeInclFunctionDecode#0",
+          "pinName": "A1"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#8",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUInclSourceDecodeInclFunctionDecode#0",
+          "pinName": "A2"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#9",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUInclSourceDecodeInclFunctionDecode#0",
+          "pinName": "A3"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#10",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUInclSourceDecodeInclFunctionDecode#0",
+          "pinName": "A4"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIdlatch4#1",
+          "pinName": "Q1"
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUInclSourceDecodeInclFunctionDecode#0",
+          "pinName": "B1"
+        },
+        "path": [
+          {
+            "x": 200.0,
+            "y": 2280.0
+          },
+          {
+            "x": 200.0,
+            "y": 2265.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIdlatch4#1",
+          "pinName": "Q2"
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUInclSourceDecodeInclFunctionDecode#0",
+          "pinName": "B2"
+        },
+        "path": [
+          {
+            "x": 205.0,
+            "y": 2290.0
+          },
+          {
+            "x": 205.0,
+            "y": 2275.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIdlatch4#1",
+          "pinName": "Q3"
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUInclSourceDecodeInclFunctionDecode#0",
+          "pinName": "B3"
+        },
+        "path": [
+          {
+            "x": 210.0,
+            "y": 2300.0
+          },
+          {
+            "x": 210.0,
+            "y": 2285.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIdlatch4#1",
+          "pinName": "Q4"
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUInclSourceDecodeInclFunctionDecode#0",
+          "pinName": "B4"
+        },
+        "path": [
+          {
+            "x": 215.0,
+            "y": 2310.0
+          },
+          {
+            "x": 215.0,
+            "y": 2295.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2901QReg#0",
+          "pinName": "Q1"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#11",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2901QReg#0",
+          "pinName": "Q2"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#12",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2901QReg#0",
+          "pinName": "Q3"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#13",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2901QReg#0",
+          "pinName": "Q4"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#14",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#11",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#15",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#15",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "OQn"
+        },
+        "path": [
+          {
+            "x": 335.0,
+            "y": 2495.0
+          },
+          {
+            "x": 335.0,
+            "y": 1050.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#14",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#16",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#16",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "OQn+3"
+        },
+        "path": [
+          {
+            "x": 340.0,
+            "y": 2525.0
+          },
+          {
+            "x": 340.0,
+            "y": 1150.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#12",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#17",
+          "pinName": ""
+        },
+        "path": [
+          {
+            "x": 135.0,
+            "y": 2670.0
+          },
+          {
+            "x": 30.0,
+            "y": 2670.0
+          },
+          {
+            "x": 30.0,
+            "y": 2635.0
+          },
+          {
+            "x": 35.0,
+            "y": 2635.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#13",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#18",
+          "pinName": ""
+        },
+        "path": [
+          {
+            "x": 140.0,
+            "y": 2675.0
+          },
+          {
+            "x": 35.0,
+            "y": 2675.0
+          },
+          {
+            "x": 35.0,
+            "y": 2640.0
+          },
+          {
+            "x": 40.0,
+            "y": 2640.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#17",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIsel3_4#1",
+          "pinName": "C1"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#18",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIsel3_4#1",
+          "pinName": "C2"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#14",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIsel3_4#1",
+          "pinName": "C3"
+        },
+        "path": [
+          {
+            "x": 145.0,
+            "y": 2680.0
+          },
+          {
+            "x": 40.0,
+            "y": 2680.0
+          },
+          {
+            "x": 40.0,
+            "y": 2645.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "IQn+3"
+        },
+        "pin2": {
+          "compName": "GUIsel3_4#1",
+          "pinName": "C4"
+        },
+        "path": [
+          {
+            "x": 5.0,
+            "y": 2650.0
+          },
+          {
+            "x": 5.0,
+            "y": 2655.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "IQn"
+        },
+        "pin2": {
+          "compName": "GUIsel3_4#1",
+          "pinName": "A1"
+        },
+        "path": [
+          {
+            "x": 5.0,
+            "y": 2550.0
+          },
+          {
+            "x": 5.0,
+            "y": 2545.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#11",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIsel3_4#1",
+          "pinName": "A2"
+        },
+        "path": [
+          {
+            "x": 130.0,
+            "y": 2665.0
+          },
+          {
+            "x": 25.0,
+            "y": 2665.0
+          },
+          {
+            "x": 25.0,
+            "y": 2630.0
+          },
+          {
+            "x": 30.0,
+            "y": 2630.0
+          },
+          {
+            "x": 30.0,
+            "y": 2555.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#15",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUInclSourceDecodeInclFunctionDecode#0",
+          "pinName": "Q1"
+        },
+        "path": [
+          {
+            "x": 220.0,
+            "y": 2305.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#12",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUInclSourceDecodeInclFunctionDecode#0",
+          "pinName": "Q2"
+        },
+        "path": [
+          {
+            "x": 225.0,
+            "y": 2505.0
+          },
+          {
+            "x": 225.0,
+            "y": 2315.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#13",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUInclSourceDecodeInclFunctionDecode#0",
+          "pinName": "Q3"
+        },
+        "path": [
+          {
+            "x": 230.0,
+            "y": 2515.0
+          },
+          {
+            "x": 230.0,
+            "y": 2325.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#16",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUInclSourceDecodeInclFunctionDecode#0",
+          "pinName": "Q4"
+        },
+        "path": [
+          {
+            "x": 235.0,
+            "y": 2335.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#17",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIsel3_4#1",
+          "pinName": "A3"
+        },
+        "path": [
+          {
+            "x": 35.0,
+            "y": 2565.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#18",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIsel3_4#1",
+          "pinName": "A4"
+        },
+        "path": [
+          {
+            "x": 40.0,
+            "y": 2575.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIsel3_4#1",
+          "pinName": "Y1"
+        },
+        "pin2": {
+          "compName": "GUIAm2901QReg#0",
+          "pinName": "D1"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIsel3_4#1",
+          "pinName": "Y2"
+        },
+        "pin2": {
+          "compName": "GUIAm2901QReg#0",
+          "pinName": "D2"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIsel3_4#1",
+          "pinName": "Y3"
+        },
+        "pin2": {
+          "compName": "GUIAm2901QReg#0",
+          "pinName": "D3"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIsel3_4#1",
+          "pinName": "Y4"
+        },
+        "pin2": {
+          "compName": "GUIAm2901QReg#0",
+          "pinName": "D4"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2901ALUInclSourceDecodeInclFunctionDecode#0",
+          "pinName": "Cn+4"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Cn+4"
+        },
+        "path": [
+          {
+            "x": 315.0,
+            "y": 2155.0
+          },
+          {
+            "x": 315.0,
+            "y": 550.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2901ALUInclSourceDecodeInclFunctionDecode#0",
+          "pinName": "OVR"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "OVR"
+        },
+        "path": [
+          {
+            "x": 320.0,
+            "y": 2165.0
+          },
+          {
+            "x": 320.0,
+            "y": 650.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2901ALUInclSourceDecodeInclFunctionDecode#0",
+          "pinName": "F1"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#19",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2901ALUInclSourceDecodeInclFunctionDecode#0",
+          "pinName": "F4"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#20",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#19",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "ORAMn"
+        },
+        "path": [
+          {
+            "x": 325.0,
+            "y": 2115.0
+          },
+          {
+            "x": 325.0,
+            "y": 850.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#20",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#21",
+          "pinName": ""
+        },
+        "path": [
+          {
+            "x": 330.0,
+            "y": 2145.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#21",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "ORAMn+3"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#21",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "F3"
+        },
+        "path": [
+          {
+            "x": 330.0,
+            "y": 750.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#19",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#22",
+          "pinName": ""
+        },
+        "path": [
+          {
+            "x": 280.0,
+            "y": 2090.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2901ALUInclSourceDecodeInclFunctionDecode#0",
+          "pinName": "F2"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#23",
+          "pinName": ""
+        },
+        "path": [
+          {
+            "x": 285.0,
+            "y": 2125.0
+          },
+          {
+            "x": 285.0,
+            "y": 2095.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2901ALUInclSourceDecodeInclFunctionDecode#0",
+          "pinName": "F3"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#24",
+          "pinName": ""
+        },
+        "path": [
+          {
+            "x": 290.0,
+            "y": 2135.0
+          },
+          {
+            "x": 290.0,
+            "y": 2100.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#20",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#25",
+          "pinName": ""
+        },
+        "path": [
+          {
+            "x": 295.0,
+            "y": 2105.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#22",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#26",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#23",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#27",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#24",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#28",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#25",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#29",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#26",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIor4#0",
+          "pinName": "A1"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#27",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIor4#0",
+          "pinName": "A2"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#28",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIor4#0",
+          "pinName": "A3"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#29",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIor4#0",
+          "pinName": "A4"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#26",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUImux1_4#0",
+          "pinName": "I1_1"
+        },
+        "path": [
+          {
+            "x": 255.0,
+            "y": 190.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#27",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUImux1_4#0",
+          "pinName": "I1_2"
+        },
+        "path": [
+          {
+            "x": 260.0,
+            "y": 200.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#28",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUImux1_4#0",
+          "pinName": "I1_3"
+        },
+        "path": [
+          {
+            "x": 265.0,
+            "y": 210.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#29",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUImux1_4#0",
+          "pinName": "I1_4"
+        },
+        "path": [
+          {
+            "x": 270.0,
+            "y": 220.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#22",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#30",
+          "pinName": ""
+        },
+        "path": [
+          {
+            "x": 10.0,
+            "y": 2090.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#23",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#31",
+          "pinName": ""
+        },
+        "path": [
+          {
+            "x": 15.0,
+            "y": 2095.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#24",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#32",
+          "pinName": ""
+        },
+        "path": [
+          {
+            "x": 20.0,
+            "y": 2100.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "IRAMn"
+        },
+        "pin2": {
+          "compName": "GUIsel3_4#0",
+          "pinName": "A1"
+        },
+        "path": [
+          {
+            "x": 5.0,
+            "y": 2350.0
+          },
+          {
+            "x": 5.0,
+            "y": 2345.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#30",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIsel3_4#0",
+          "pinName": "A2"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#31",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIsel3_4#0",
+          "pinName": "A3"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#32",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIsel3_4#0",
+          "pinName": "A4"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#31",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#33",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#32",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#34",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#25",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#35",
+          "pinName": ""
+        },
+        "path": [
+          {
+            "x": 25.0,
+            "y": 2105.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#30",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#36",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#36",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIsel3_4#0",
+          "pinName": "B1"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#33",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIsel3_4#0",
+          "pinName": "B2"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#34",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIsel3_4#0",
+          "pinName": "B3"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#35",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIsel3_4#0",
+          "pinName": "B4"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#33",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#37",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#34",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#38",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#35",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#39",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#37",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIsel3_4#0",
+          "pinName": "C1"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#38",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIsel3_4#0",
+          "pinName": "C2"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#39",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIsel3_4#0",
+          "pinName": "C3"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "IRAMn+3"
+        },
+        "pin2": {
+          "compName": "GUIsel3_4#0",
+          "pinName": "C4"
+        },
+        "path": [
+          {
+            "x": 5.0,
+            "y": 2450.0
+          },
+          {
+            "x": 5.0,
+            "y": 2455.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#36",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIsel3_4#1",
+          "pinName": "B1"
+        },
+        "path": [
+          {
+            "x": 10.0,
+            "y": 2585.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#37",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIsel3_4#1",
+          "pinName": "B2"
+        },
+        "path": [
+          {
+            "x": 15.0,
+            "y": 2595.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#38",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIsel3_4#1",
+          "pinName": "B3"
+        },
+        "path": [
+          {
+            "x": 20.0,
+            "y": 2605.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#39",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIsel3_4#1",
+          "pinName": "B4"
+        },
+        "path": [
+          {
+            "x": 25.0,
+            "y": 2615.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIsel3_4#0",
+          "pinName": "Y1"
+        },
+        "pin2": {
+          "compName": "GUIram4#0",
+          "pinName": "D1"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIsel3_4#0",
+          "pinName": "Y2"
+        },
+        "pin2": {
+          "compName": "GUIram4#0",
+          "pinName": "D2"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIsel3_4#0",
+          "pinName": "Y3"
+        },
+        "pin2": {
+          "compName": "GUIram4#0",
+          "pinName": "D3"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIsel3_4#0",
+          "pinName": "Y4"
+        },
+        "pin2": {
+          "compName": "GUIram4#0",
+          "pinName": "D4"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2901DestDecode#0",
+          "pinName": "RAMWE"
+        },
+        "pin2": {
+          "compName": "GUIand#0",
+          "pinName": "A"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#0",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUIand#0",
+          "pinName": "B"
+        }
+      },
+      {
+        "pin1": {
+          "compName": "GUIand#0",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUIram4#0",
+          "pinName": "WE"
+        },
+        "path": [
+          {
+            "x": 230.0,
+            "y": 70.0
+          },
+          {
+            "x": 230.0,
+            "y": 105.0
+          },
+          {
+            "x": 90.0,
+            "y": 105.0
+          },
+          {
+            "x": 90.0,
+            "y": 2305.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2901DestDecode#0",
+          "pinName": "QWE"
+        },
+        "pin2": {
+          "compName": "GUIAm2901QReg#0",
+          "pinName": "WE"
+        },
+        "path": [
+          {
+            "x": 85.0,
+            "y": 100.0
+          },
+          {
+            "x": 85.0,
+            "y": 2505.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2901DestDecode#0",
+          "pinName": "YF"
+        },
+        "pin2": {
+          "compName": "GUImux1_4#0",
+          "pinName": "S0"
+        },
+        "path": [
+          {
+            "x": 70.0,
+            "y": 80.0
+          },
+          {
+            "x": 70.0,
+            "y": 140.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUImux1_4#0",
+          "pinName": "Y1"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Y1"
+        },
+        "path": [
+          {
+            "x": 335.0,
+            "y": 140.0
+          },
+          {
+            "x": 335.0,
+            "y": 50.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUImux1_4#0",
+          "pinName": "Y2"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Y2"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUImux1_4#0",
+          "pinName": "Y3"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Y3"
+        },
+        "path": [
+          {
+            "x": 335.0,
+            "y": 160.0
+          },
+          {
+            "x": 335.0,
+            "y": 250.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUImux1_4#0",
+          "pinName": "Y4"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Y4"
+        },
+        "path": [
+          {
+            "x": 325.0,
+            "y": 170.0
+          },
+          {
+            "x": 325.0,
+            "y": 350.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIor4#0",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#40",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#40",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#1",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 315.0,
+            "y": 445.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#40",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#1",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 315.0,
+            "y": 455.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#1",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "F\u003d0"
+        },
+        "path": []
+      }
+    ]
+  },
+  "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+  "symbolRendererParams": {
+    "centerText": "GUIAm2901",
+    "horizontalComponentCenter": 17.5,
+    "centerTextHeight": 5.0,
+    "pinLabelHeight": 3.5,
+    "pinLabelMargin": 0.5
+  }
+}
\ No newline at end of file
diff --git a/net.mograsim.logic.model.editor/components/am2901/GUIAm2901ALUFuncDecode.json b/net.mograsim.logic.model.editor/components/am2901/GUIAm2901ALUFuncDecode.json
new file mode 100644 (file)
index 0000000..a24476b
--- /dev/null
@@ -0,0 +1,681 @@
+mograsim version: 0.1.3
+{
+  "width": 35.0,
+  "height": 60.0,
+  "interfacePins": [
+    {
+      "location": {
+        "x": 35.0,
+        "y": 35.0
+      },
+      "name": "SBE",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 45.0
+      },
+      "name": "FN",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 25.0
+      },
+      "name": "I3",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 15.0
+      },
+      "name": "I4",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 25.0
+      },
+      "name": "SN",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 5.0
+      },
+      "name": "I5",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 15.0
+      },
+      "name": "L",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 55.0
+      },
+      "name": "RN",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 5.0
+      },
+      "name": "CinE",
+      "logicWidth": 1
+    }
+  ],
+  "submodel": {
+    "innerScale": 0.25,
+    "subComps": [
+      {
+        "pos": {
+          "x": 15.0,
+          "y": 50.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#1",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 55.0,
+          "y": 10.0
+        },
+        "id": "GUInand3",
+        "name": "GUInand3#0"
+      },
+      {
+        "pos": {
+          "x": 15.0,
+          "y": 10.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#0",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 55.0,
+          "y": 70.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#3",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 55.0,
+          "y": 45.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#2",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 100.0,
+          "y": 135.0
+        },
+        "id": "GUIand",
+        "name": "GUIand#0"
+      },
+      {
+        "pos": {
+          "x": 4.0,
+          "y": 24.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#1",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 4.0,
+          "y": 19.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#0",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 9.0,
+          "y": 59.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#3",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 4.0,
+          "y": 44.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#2",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 9.0,
+          "y": 64.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#5",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 9.0,
+          "y": 54.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#4",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 49.0,
+          "y": 99.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#7",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 9.0,
+          "y": 84.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#6",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 39.0,
+          "y": 19.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#9",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 49.0,
+          "y": 74.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#8",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 39.0,
+          "y": 34.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#10",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 100.0,
+          "y": 50.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#4",
+        "params": 1
+      }
+    ],
+    "innerWires": [
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "I5"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#0",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 5.0,
+            "y": 15.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#0",
+          "pinName": "B"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#2",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 45.0,
+            "y": 45.0
+          },
+          {
+            "x": 45.0,
+            "y": 50.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "FN"
+        },
+        "path": [
+          {
+            "x": 5.0,
+            "y": 180.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "I4"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#3",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#3",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#4",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#4",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUInand3#0",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 10.0,
+            "y": 40.0
+          },
+          {
+            "x": 45.0,
+            "y": 40.0
+          },
+          {
+            "x": 45.0,
+            "y": 15.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#4",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#1",
+          "pinName": "A"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#3",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#5",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#5",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#1",
+          "pinName": "B"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#5",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#6",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#6",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#3",
+          "pinName": "B"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#6",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "SN"
+        },
+        "path": [
+          {
+            "x": 10.0,
+            "y": 105.0
+          },
+          {
+            "x": 135.0,
+            "y": 105.0
+          },
+          {
+            "x": 135.0,
+            "y": 100.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "I3"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#7",
+          "pinName": ""
+        },
+        "path": [
+          {
+            "x": 50.0,
+            "y": 100.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#7",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "RN"
+        },
+        "path": [
+          {
+            "x": 50.0,
+            "y": 220.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#7",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#8",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#8",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUInand3#0",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 50.0,
+            "y": 25.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#8",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#3",
+          "pinName": "A"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#0",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#9",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#9",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "CinE"
+        },
+        "path": [
+          {
+            "x": 40.0,
+            "y": 5.0
+          },
+          {
+            "x": 115.0,
+            "y": 5.0
+          },
+          {
+            "x": 115.0,
+            "y": 20.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#9",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#10",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#10",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUInand3#0",
+          "pinName": "C"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#10",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIand#0",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 40.0,
+            "y": 150.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#1",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUINandGate#2",
+          "pinName": "B"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUInand3#0",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUINandGate#4",
+          "pinName": "A"
+        }
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#2",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUINandGate#4",
+          "pinName": "B"
+        }
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#3",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUIand#0",
+          "pinName": "A"
+        }
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#4",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "L"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIand#0",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "SBE"
+        },
+        "path": []
+      }
+    ]
+  },
+  "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+  "symbolRendererParams": {
+    "centerText": "GUIAm2901ALUFuncDecode",
+    "horizontalComponentCenter": 17.5,
+    "centerTextHeight": 5.0,
+    "pinLabelHeight": 3.5,
+    "pinLabelMargin": 0.5
+  }
+}
\ No newline at end of file
diff --git a/net.mograsim.logic.model.editor/components/am2901/GUIAm2901ALUInclDecode.json b/net.mograsim.logic.model.editor/components/am2901/GUIAm2901ALUInclDecode.json
new file mode 100644 (file)
index 0000000..62d78f1
--- /dev/null
@@ -0,0 +1,1453 @@
+mograsim version: 0.1.3
+{
+  "width": 35.0,
+  "height": 120.0,
+  "interfacePins": [
+    {
+      "location": {
+        "x": 0.0,
+        "y": 55.0
+      },
+      "name": "R2",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 105.0
+      },
+      "name": "S3",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 65.0
+      },
+      "name": "R3",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 115.0
+      },
+      "name": "S4",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 75.0
+      },
+      "name": "R4",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 25.0
+      },
+      "name": "I3",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 55.0
+      },
+      "name": "OVR",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 15.0
+      },
+      "name": "I4",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 35.0
+      },
+      "name": "Cn",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 5.0
+      },
+      "name": "F1",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 5.0
+      },
+      "name": "I5",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 15.0
+      },
+      "name": "F2",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 25.0
+      },
+      "name": "F3",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 35.0
+      },
+      "name": "F4",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 45.0
+      },
+      "name": "Cn+4",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 85.0
+      },
+      "name": "S1",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 45.0
+      },
+      "name": "R1",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 95.0
+      },
+      "name": "S2",
+      "logicWidth": 1
+    }
+  ],
+  "submodel": {
+    "innerScale": 0.25,
+    "subComps": [
+      {
+        "pos": {
+          "x": 34.0,
+          "y": 354.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#14",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 34.0,
+          "y": 254.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#13",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 36.5,
+          "y": 264.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#16",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 36.5,
+          "y": 164.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#15",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 84.0,
+          "y": 374.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#18",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 36.5,
+          "y": 364.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#17",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 20.0,
+          "y": 2.5
+        },
+        "id": "GUIAm2901ALUFuncDecode",
+        "name": "GUIAm2901ALUFuncDecode#0"
+      },
+      {
+        "pos": {
+          "x": 45.0,
+          "y": 80.0
+        },
+        "id": "GUIAm2901ALUOneBit",
+        "name": "GUIAm2901ALUOneBit#0"
+      },
+      {
+        "pos": {
+          "x": 84.0,
+          "y": 384.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#19",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 95.0,
+          "y": 400.0
+        },
+        "id": "GUIxor",
+        "name": "GUIxor#0"
+      },
+      {
+        "pos": {
+          "x": 24.0,
+          "y": 194.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#1",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 24.0,
+          "y": 94.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#0",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 26.5,
+          "y": 104.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#3",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 24.0,
+          "y": 294.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#2",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 26.5,
+          "y": 304.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#5",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 26.5,
+          "y": 204.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#4",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 45.0,
+          "y": 180.0
+        },
+        "id": "GUIAm2901ALUOneBit",
+        "name": "GUIAm2901ALUOneBit#1"
+      },
+      {
+        "pos": {
+          "x": 29.0,
+          "y": 224.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#7",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 45.0,
+          "y": 280.0
+        },
+        "id": "GUIAm2901ALUOneBit",
+        "name": "GUIAm2901ALUOneBit#2"
+      },
+      {
+        "pos": {
+          "x": 29.0,
+          "y": 124.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#6",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 45.0,
+          "y": 380.0
+        },
+        "id": "GUIAm2901ALUOneBit",
+        "name": "GUIAm2901ALUOneBit#3"
+      },
+      {
+        "pos": {
+          "x": 31.5,
+          "y": 144.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#9",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 29.0,
+          "y": 324.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#8",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 31.5,
+          "y": 244.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#10",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 34.0,
+          "y": 154.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#12",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 31.5,
+          "y": 344.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#11",
+        "params": 1
+      }
+    ],
+    "innerWires": [
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "I5"
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUFuncDecode#0",
+          "pinName": "I5"
+        },
+        "path": [
+          {
+            "x": 5.0,
+            "y": 20.0
+          },
+          {
+            "x": 5.0,
+            "y": 7.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "I4"
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUFuncDecode#0",
+          "pinName": "I4"
+        },
+        "path": [
+          {
+            "x": 10.0,
+            "y": 60.0
+          },
+          {
+            "x": 10.0,
+            "y": 17.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "I3"
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUFuncDecode#0",
+          "pinName": "I3"
+        },
+        "path": [
+          {
+            "x": 15.0,
+            "y": 100.0
+          },
+          {
+            "x": 15.0,
+            "y": 27.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2901ALUFuncDecode#0",
+          "pinName": "SBE"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "path": [
+          {
+            "x": 62.5,
+            "y": 37.5
+          },
+          {
+            "x": 62.5,
+            "y": 70.0
+          },
+          {
+            "x": 25.0,
+            "y": 70.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUOneBit#0",
+          "pinName": "CoutE"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUOneBit#1",
+          "pinName": "CoutE"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUOneBit#2",
+          "pinName": "CoutE"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUOneBit#3",
+          "pinName": "CoutE"
+        },
+        "path": [
+          {
+            "x": 25.0,
+            "y": 395.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2901ALUFuncDecode#0",
+          "pinName": "CinE"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#3",
+          "pinName": ""
+        },
+        "path": [
+          {
+            "x": 70.0,
+            "y": 7.5
+          },
+          {
+            "x": 70.0,
+            "y": 77.5
+          },
+          {
+            "x": 27.5,
+            "y": 77.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#3",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#4",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#4",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#5",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#3",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUOneBit#0",
+          "pinName": "CinE"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#4",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUOneBit#1",
+          "pinName": "CinE"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#5",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUOneBit#2",
+          "pinName": "CinE"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#5",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUOneBit#3",
+          "pinName": "CinE"
+        },
+        "path": [
+          {
+            "x": 27.5,
+            "y": 405.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2901ALUFuncDecode#0",
+          "pinName": "RN"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#6",
+          "pinName": ""
+        },
+        "path": [
+          {
+            "x": 57.5,
+            "y": 57.5
+          },
+          {
+            "x": 57.5,
+            "y": 65.0
+          },
+          {
+            "x": 30.0,
+            "y": 65.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#6",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#7",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#7",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#8",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#6",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUOneBit#0",
+          "pinName": "RN"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#7",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUOneBit#1",
+          "pinName": "RN"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#8",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUOneBit#2",
+          "pinName": "RN"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#8",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUOneBit#3",
+          "pinName": "RN"
+        },
+        "path": [
+          {
+            "x": 30.0,
+            "y": 425.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2901ALUFuncDecode#0",
+          "pinName": "SN"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#9",
+          "pinName": ""
+        },
+        "path": [
+          {
+            "x": 65.0,
+            "y": 27.5
+          },
+          {
+            "x": 65.0,
+            "y": 72.5
+          },
+          {
+            "x": 32.5,
+            "y": 72.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#9",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#10",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#10",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#11",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#9",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUOneBit#0",
+          "pinName": "SN"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#10",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUOneBit#1",
+          "pinName": "SN"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#11",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUOneBit#2",
+          "pinName": "SN"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#11",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUOneBit#3",
+          "pinName": "SN"
+        },
+        "path": [
+          {
+            "x": 32.5,
+            "y": 445.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2901ALUFuncDecode#0",
+          "pinName": "FN"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#12",
+          "pinName": ""
+        },
+        "path": [
+          {
+            "x": 60.0,
+            "y": 47.5
+          },
+          {
+            "x": 60.0,
+            "y": 67.5
+          },
+          {
+            "x": 35.0,
+            "y": 67.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#12",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#13",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#13",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#14",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#12",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUOneBit#0",
+          "pinName": "FN"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#13",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUOneBit#1",
+          "pinName": "FN"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#14",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUOneBit#2",
+          "pinName": "FN"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#14",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUOneBit#3",
+          "pinName": "FN"
+        },
+        "path": [
+          {
+            "x": 35.0,
+            "y": 455.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2901ALUFuncDecode#0",
+          "pinName": "L"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#15",
+          "pinName": ""
+        },
+        "path": [
+          {
+            "x": 67.5,
+            "y": 17.5
+          },
+          {
+            "x": 67.5,
+            "y": 75.0
+          },
+          {
+            "x": 37.5,
+            "y": 75.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#15",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#16",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#16",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#17",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#15",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUOneBit#0",
+          "pinName": "L"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#16",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUOneBit#1",
+          "pinName": "L"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#17",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUOneBit#2",
+          "pinName": "L"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#17",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUOneBit#3",
+          "pinName": "L"
+        },
+        "path": [
+          {
+            "x": 37.5,
+            "y": 465.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "R1"
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUOneBit#0",
+          "pinName": "R"
+        },
+        "path": [
+          {
+            "x": 10.0,
+            "y": 180.0
+          },
+          {
+            "x": 10.0,
+            "y": 115.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "R2"
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUOneBit#1",
+          "pinName": "R"
+        },
+        "path": [
+          {
+            "x": 10.0,
+            "y": 220.0
+          },
+          {
+            "x": 10.0,
+            "y": 215.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "R3"
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUOneBit#2",
+          "pinName": "R"
+        },
+        "path": [
+          {
+            "x": 10.0,
+            "y": 260.0
+          },
+          {
+            "x": 10.0,
+            "y": 315.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "R4"
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUOneBit#3",
+          "pinName": "R"
+        },
+        "path": [
+          {
+            "x": 20.0,
+            "y": 300.0
+          },
+          {
+            "x": 20.0,
+            "y": 415.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "S1"
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUOneBit#0",
+          "pinName": "S"
+        },
+        "path": [
+          {
+            "x": 15.0,
+            "y": 340.0
+          },
+          {
+            "x": 15.0,
+            "y": 135.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "S2"
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUOneBit#1",
+          "pinName": "S"
+        },
+        "path": [
+          {
+            "x": 5.0,
+            "y": 380.0
+          },
+          {
+            "x": 5.0,
+            "y": 235.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "S3"
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUOneBit#2",
+          "pinName": "S"
+        },
+        "path": [
+          {
+            "x": 10.0,
+            "y": 420.0
+          },
+          {
+            "x": 10.0,
+            "y": 335.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "S4"
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUOneBit#3",
+          "pinName": "S"
+        },
+        "path": [
+          {
+            "x": 10.0,
+            "y": 460.0
+          },
+          {
+            "x": 10.0,
+            "y": 435.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "Cn"
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUOneBit#0",
+          "pinName": "Cin"
+        },
+        "path": [
+          {
+            "x": 5.0,
+            "y": 140.0
+          },
+          {
+            "x": 5.0,
+            "y": 85.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2901ALUOneBit#0",
+          "pinName": "Cout"
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUOneBit#1",
+          "pinName": "Cin"
+        },
+        "path": [
+          {
+            "x": 85.0,
+            "y": 85.0
+          },
+          {
+            "x": 85.0,
+            "y": 175.0
+          },
+          {
+            "x": 40.0,
+            "y": 175.0
+          },
+          {
+            "x": 40.0,
+            "y": 185.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2901ALUOneBit#1",
+          "pinName": "Cout"
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUOneBit#2",
+          "pinName": "Cin"
+        },
+        "path": [
+          {
+            "x": 85.0,
+            "y": 185.0
+          },
+          {
+            "x": 85.0,
+            "y": 275.0
+          },
+          {
+            "x": 40.0,
+            "y": 275.0
+          },
+          {
+            "x": 40.0,
+            "y": 285.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2901ALUOneBit#2",
+          "pinName": "Cout"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#18",
+          "pinName": ""
+        },
+        "path": [
+          {
+            "x": 85.0,
+            "y": 285.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#18",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUOneBit#3",
+          "pinName": "Cin"
+        },
+        "path": [
+          {
+            "x": 40.0,
+            "y": 375.0
+          },
+          {
+            "x": 40.0,
+            "y": 385.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2901ALUOneBit#3",
+          "pinName": "Cout"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#19",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2901ALUOneBit#0",
+          "pinName": "F"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "F1"
+        },
+        "path": [
+          {
+            "x": 90.0,
+            "y": 95.0
+          },
+          {
+            "x": 90.0,
+            "y": 20.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2901ALUOneBit#1",
+          "pinName": "F"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "F2"
+        },
+        "path": [
+          {
+            "x": 95.0,
+            "y": 195.0
+          },
+          {
+            "x": 95.0,
+            "y": 60.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2901ALUOneBit#2",
+          "pinName": "F"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "F3"
+        },
+        "path": [
+          {
+            "x": 100.0,
+            "y": 295.0
+          },
+          {
+            "x": 100.0,
+            "y": 100.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2901ALUOneBit#3",
+          "pinName": "F"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "F4"
+        },
+        "path": [
+          {
+            "x": 105.0,
+            "y": 395.0
+          },
+          {
+            "x": 105.0,
+            "y": 140.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#18",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIxor#0",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 90.0,
+            "y": 375.0
+          },
+          {
+            "x": 90.0,
+            "y": 405.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#19",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIxor#0",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 85.0,
+            "y": 415.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#19",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Cn+4"
+        },
+        "path": [
+          {
+            "x": 130.0,
+            "y": 385.0
+          },
+          {
+            "x": 130.0,
+            "y": 180.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIxor#0",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "OVR"
+        }
+      }
+    ]
+  },
+  "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+  "symbolRendererParams": {
+    "centerText": "GUIAm2901ALUInclDecode",
+    "horizontalComponentCenter": 17.5,
+    "centerTextHeight": 5.0,
+    "pinLabelHeight": 3.5,
+    "pinLabelMargin": 0.5
+  }
+}
\ No newline at end of file
diff --git a/net.mograsim.logic.model.editor/components/am2901/GUIAm2901ALUInclSourceDecodeInclFunctionDecode.json b/net.mograsim.logic.model.editor/components/am2901/GUIAm2901ALUInclSourceDecodeInclFunctionDecode.json
new file mode 100644 (file)
index 0000000..75c63dd
--- /dev/null
@@ -0,0 +1,1313 @@
+mograsim version: 0.1.3
+{
+  "width": 35.0,
+  "height": 230.0,
+  "interfacePins": [
+    {
+      "location": {
+        "x": 0.0,
+        "y": 195.0
+      },
+      "name": "Q1",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 205.0
+      },
+      "name": "Q2",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 215.0
+      },
+      "name": "Q3",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 225.0
+      },
+      "name": "Q4",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 55.0
+      },
+      "name": "I0",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 45.0
+      },
+      "name": "I1",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 35.0
+      },
+      "name": "I2",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 25.0
+      },
+      "name": "I3",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 55.0
+      },
+      "name": "OVR",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 15.0
+      },
+      "name": "I4",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 65.0
+      },
+      "name": "Cn",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 5.0
+      },
+      "name": "I5",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 115.0
+      },
+      "name": "A1",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 125.0
+      },
+      "name": "A2",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 135.0
+      },
+      "name": "A3",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 145.0
+      },
+      "name": "A4",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 45.0
+      },
+      "name": "Cn+4",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 5.0
+      },
+      "name": "F1",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 15.0
+      },
+      "name": "F2",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 75.0
+      },
+      "name": "D1",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 25.0
+      },
+      "name": "F3",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 85.0
+      },
+      "name": "D2",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 35.0
+      },
+      "name": "F4",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 95.0
+      },
+      "name": "D3",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 155.0
+      },
+      "name": "B1",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 105.0
+      },
+      "name": "D4",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 165.0
+      },
+      "name": "B2",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 175.0
+      },
+      "name": "B3",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 185.0
+      },
+      "name": "B4",
+      "logicWidth": 1
+    }
+  ],
+  "submodel": {
+    "innerScale": 0.25,
+    "subComps": [
+      {
+        "pos": {
+          "x": 45.0,
+          "y": 575.0
+        },
+        "id": "GUIsel3_4",
+        "name": "GUIsel3_4#0"
+      },
+      {
+        "pos": {
+          "x": 14.0,
+          "y": 499.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#1",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 9.0,
+          "y": 459.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#0",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 60.0,
+          "y": 15.0
+        },
+        "id": "GUIAm2901ALUInclDecode",
+        "name": "GUIAm2901ALUInclDecode#0"
+      },
+      {
+        "pos": {
+          "x": 24.0,
+          "y": 579.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#3",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 19.0,
+          "y": 539.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#2",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 45.0,
+          "y": 365.0
+        },
+        "id": "GUIsel2_4",
+        "name": "GUIsel2_4#0"
+      },
+      {
+        "pos": {
+          "x": 15.0,
+          "y": 165.0
+        },
+        "id": "GUIAm2901SourceDecode",
+        "name": "GUIAm2901SourceDecode#0"
+      }
+    ],
+    "innerWires": [
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "I5"
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUInclDecode#0",
+          "pinName": "I5"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "I4"
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUInclDecode#0",
+          "pinName": "I4"
+        },
+        "path": [
+          {
+            "x": 5.0,
+            "y": 60.0
+          },
+          {
+            "x": 5.0,
+            "y": 30.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "I3"
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUInclDecode#0",
+          "pinName": "I3"
+        },
+        "path": [
+          {
+            "x": 15.0,
+            "y": 100.0
+          },
+          {
+            "x": 15.0,
+            "y": 40.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "I2"
+        },
+        "pin2": {
+          "compName": "GUIAm2901SourceDecode#0",
+          "pinName": "I2"
+        },
+        "path": [
+          {
+            "x": 5.0,
+            "y": 140.0
+          },
+          {
+            "x": 5.0,
+            "y": 170.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "I1"
+        },
+        "pin2": {
+          "compName": "GUIAm2901SourceDecode#0",
+          "pinName": "I1"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "I0"
+        },
+        "pin2": {
+          "compName": "GUIAm2901SourceDecode#0",
+          "pinName": "I0"
+        },
+        "path": [
+          {
+            "x": 5.0,
+            "y": 220.0
+          },
+          {
+            "x": 5.0,
+            "y": 190.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "Cn"
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUInclDecode#0",
+          "pinName": "Cn"
+        },
+        "path": [
+          {
+            "x": 10.0,
+            "y": 260.0
+          },
+          {
+            "x": 10.0,
+            "y": 50.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "D1"
+        },
+        "pin2": {
+          "compName": "GUIsel2_4#0",
+          "pinName": "A1"
+        },
+        "path": [
+          {
+            "x": 15.0,
+            "y": 300.0
+          },
+          {
+            "x": 15.0,
+            "y": 390.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "D2"
+        },
+        "pin2": {
+          "compName": "GUIsel2_4#0",
+          "pinName": "A2"
+        },
+        "path": [
+          {
+            "x": 10.0,
+            "y": 340.0
+          },
+          {
+            "x": 10.0,
+            "y": 400.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "D3"
+        },
+        "pin2": {
+          "compName": "GUIsel2_4#0",
+          "pinName": "A3"
+        },
+        "path": [
+          {
+            "x": 5.0,
+            "y": 380.0
+          },
+          {
+            "x": 5.0,
+            "y": 410.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "D4"
+        },
+        "pin2": {
+          "compName": "GUIsel2_4#0",
+          "pinName": "A4"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "A1"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "A2"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "A3"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "A4"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#3",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIsel2_4#0",
+          "pinName": "B1"
+        },
+        "path": [
+          {
+            "x": 10.0,
+            "y": 430.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIsel2_4#0",
+          "pinName": "B2"
+        },
+        "path": [
+          {
+            "x": 15.0,
+            "y": 440.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIsel2_4#0",
+          "pinName": "B3"
+        },
+        "path": [
+          {
+            "x": 20.0,
+            "y": 450.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#3",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIsel2_4#0",
+          "pinName": "B4"
+        },
+        "path": [
+          {
+            "x": 25.0,
+            "y": 460.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIsel3_4#0",
+          "pinName": "A1"
+        },
+        "path": [
+          {
+            "x": 10.0,
+            "y": 610.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIsel3_4#0",
+          "pinName": "A2"
+        },
+        "path": [
+          {
+            "x": 15.0,
+            "y": 620.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIsel3_4#0",
+          "pinName": "A3"
+        },
+        "path": [
+          {
+            "x": 20.0,
+            "y": 630.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#3",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIsel3_4#0",
+          "pinName": "A4"
+        },
+        "path": [
+          {
+            "x": 25.0,
+            "y": 640.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "B1"
+        },
+        "pin2": {
+          "compName": "GUIsel3_4#0",
+          "pinName": "B1"
+        },
+        "path": [
+          {
+            "x": 5.0,
+            "y": 620.0
+          },
+          {
+            "x": 5.0,
+            "y": 650.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "B2"
+        },
+        "pin2": {
+          "compName": "GUIsel3_4#0",
+          "pinName": "B2"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "B3"
+        },
+        "pin2": {
+          "compName": "GUIsel3_4#0",
+          "pinName": "B3"
+        },
+        "path": [
+          {
+            "x": 5.0,
+            "y": 700.0
+          },
+          {
+            "x": 5.0,
+            "y": 670.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "B4"
+        },
+        "pin2": {
+          "compName": "GUIsel3_4#0",
+          "pinName": "B4"
+        },
+        "path": [
+          {
+            "x": 10.0,
+            "y": 740.0
+          },
+          {
+            "x": 10.0,
+            "y": 680.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "Q1"
+        },
+        "pin2": {
+          "compName": "GUIsel3_4#0",
+          "pinName": "C1"
+        },
+        "path": [
+          {
+            "x": 15.0,
+            "y": 780.0
+          },
+          {
+            "x": 15.0,
+            "y": 690.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "Q2"
+        },
+        "pin2": {
+          "compName": "GUIsel3_4#0",
+          "pinName": "C2"
+        },
+        "path": [
+          {
+            "x": 20.0,
+            "y": 820.0
+          },
+          {
+            "x": 20.0,
+            "y": 700.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "Q3"
+        },
+        "pin2": {
+          "compName": "GUIsel3_4#0",
+          "pinName": "C3"
+        },
+        "path": [
+          {
+            "x": 25.0,
+            "y": 860.0
+          },
+          {
+            "x": 25.0,
+            "y": 710.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "Q4"
+        },
+        "pin2": {
+          "compName": "GUIsel3_4#0",
+          "pinName": "C4"
+        },
+        "path": [
+          {
+            "x": 30.0,
+            "y": 900.0
+          },
+          {
+            "x": 30.0,
+            "y": 720.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2901SourceDecode#0",
+          "pinName": "SQ"
+        },
+        "pin2": {
+          "compName": "GUIsel3_4#0",
+          "pinName": "SC"
+        },
+        "path": [
+          {
+            "x": 75.0,
+            "y": 170.0
+          },
+          {
+            "x": 75.0,
+            "y": 240.0
+          },
+          {
+            "x": 30.0,
+            "y": 240.0
+          },
+          {
+            "x": 30.0,
+            "y": 600.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2901SourceDecode#0",
+          "pinName": "RA"
+        },
+        "pin2": {
+          "compName": "GUIsel2_4#0",
+          "pinName": "SB"
+        },
+        "path": [
+          {
+            "x": 70.0,
+            "y": 180.0
+          },
+          {
+            "x": 70.0,
+            "y": 235.0
+          },
+          {
+            "x": 20.0,
+            "y": 235.0
+          },
+          {
+            "x": 20.0,
+            "y": 380.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2901SourceDecode#0",
+          "pinName": "SB"
+        },
+        "pin2": {
+          "compName": "GUIsel3_4#0",
+          "pinName": "SB"
+        },
+        "path": [
+          {
+            "x": 65.0,
+            "y": 190.0
+          },
+          {
+            "x": 65.0,
+            "y": 230.0
+          },
+          {
+            "x": 35.0,
+            "y": 230.0
+          },
+          {
+            "x": 35.0,
+            "y": 590.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2901SourceDecode#0",
+          "pinName": "SA"
+        },
+        "pin2": {
+          "compName": "GUIsel3_4#0",
+          "pinName": "SA"
+        },
+        "path": [
+          {
+            "x": 60.0,
+            "y": 200.0
+          },
+          {
+            "x": 60.0,
+            "y": 225.0
+          },
+          {
+            "x": 40.0,
+            "y": 225.0
+          },
+          {
+            "x": 40.0,
+            "y": 580.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2901SourceDecode#0",
+          "pinName": "RD"
+        },
+        "pin2": {
+          "compName": "GUIsel2_4#0",
+          "pinName": "SA"
+        },
+        "path": [
+          {
+            "x": 55.0,
+            "y": 210.0
+          },
+          {
+            "x": 55.0,
+            "y": 220.0
+          },
+          {
+            "x": 25.0,
+            "y": 220.0
+          },
+          {
+            "x": 25.0,
+            "y": 370.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIsel2_4#0",
+          "pinName": "Y1"
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUInclDecode#0",
+          "pinName": "R1"
+        },
+        "path": [
+          {
+            "x": 82.5,
+            "y": 370.0
+          },
+          {
+            "x": 82.5,
+            "y": 162.5
+          },
+          {
+            "x": 20.0,
+            "y": 162.5
+          },
+          {
+            "x": 20.0,
+            "y": 60.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIsel2_4#0",
+          "pinName": "Y2"
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUInclDecode#0",
+          "pinName": "R2"
+        },
+        "path": [
+          {
+            "x": 85.0,
+            "y": 380.0
+          },
+          {
+            "x": 85.0,
+            "y": 160.0
+          },
+          {
+            "x": 22.5,
+            "y": 160.0
+          },
+          {
+            "x": 22.5,
+            "y": 70.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIsel2_4#0",
+          "pinName": "Y3"
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUInclDecode#0",
+          "pinName": "R3"
+        },
+        "path": [
+          {
+            "x": 87.5,
+            "y": 390.0
+          },
+          {
+            "x": 87.5,
+            "y": 157.5
+          },
+          {
+            "x": 25.0,
+            "y": 157.5
+          },
+          {
+            "x": 25.0,
+            "y": 80.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIsel2_4#0",
+          "pinName": "Y4"
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUInclDecode#0",
+          "pinName": "R4"
+        },
+        "path": [
+          {
+            "x": 90.0,
+            "y": 400.0
+          },
+          {
+            "x": 90.0,
+            "y": 155.0
+          },
+          {
+            "x": 27.5,
+            "y": 155.0
+          },
+          {
+            "x": 27.5,
+            "y": 90.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIsel3_4#0",
+          "pinName": "Y1"
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUInclDecode#0",
+          "pinName": "S1"
+        },
+        "path": [
+          {
+            "x": 92.5,
+            "y": 580.0
+          },
+          {
+            "x": 92.5,
+            "y": 152.5
+          },
+          {
+            "x": 30.0,
+            "y": 152.5
+          },
+          {
+            "x": 30.0,
+            "y": 100.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIsel3_4#0",
+          "pinName": "Y2"
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUInclDecode#0",
+          "pinName": "S2"
+        },
+        "path": [
+          {
+            "x": 95.0,
+            "y": 590.0
+          },
+          {
+            "x": 95.0,
+            "y": 150.0
+          },
+          {
+            "x": 32.5,
+            "y": 150.0
+          },
+          {
+            "x": 32.5,
+            "y": 110.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIsel3_4#0",
+          "pinName": "Y3"
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUInclDecode#0",
+          "pinName": "S3"
+        },
+        "path": [
+          {
+            "x": 97.5,
+            "y": 600.0
+          },
+          {
+            "x": 97.5,
+            "y": 147.5
+          },
+          {
+            "x": 35.0,
+            "y": 147.5
+          },
+          {
+            "x": 35.0,
+            "y": 120.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIsel3_4#0",
+          "pinName": "Y4"
+        },
+        "pin2": {
+          "compName": "GUIAm2901ALUInclDecode#0",
+          "pinName": "S4"
+        },
+        "path": [
+          {
+            "x": 100.0,
+            "y": 610.0
+          },
+          {
+            "x": 100.0,
+            "y": 145.0
+          },
+          {
+            "x": 37.5,
+            "y": 145.0
+          },
+          {
+            "x": 37.5,
+            "y": 130.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2901ALUInclDecode#0",
+          "pinName": "F1"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "F1"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2901ALUInclDecode#0",
+          "pinName": "F2"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "F2"
+        },
+        "path": [
+          {
+            "x": 135.0,
+            "y": 30.0
+          },
+          {
+            "x": 135.0,
+            "y": 60.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2901ALUInclDecode#0",
+          "pinName": "F3"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "F3"
+        },
+        "path": [
+          {
+            "x": 130.0,
+            "y": 40.0
+          },
+          {
+            "x": 130.0,
+            "y": 100.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2901ALUInclDecode#0",
+          "pinName": "F4"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "F4"
+        },
+        "path": [
+          {
+            "x": 125.0,
+            "y": 50.0
+          },
+          {
+            "x": 125.0,
+            "y": 140.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2901ALUInclDecode#0",
+          "pinName": "Cn+4"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Cn+4"
+        },
+        "path": [
+          {
+            "x": 120.0,
+            "y": 60.0
+          },
+          {
+            "x": 120.0,
+            "y": 180.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2901ALUInclDecode#0",
+          "pinName": "OVR"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "OVR"
+        },
+        "path": [
+          {
+            "x": 115.0,
+            "y": 70.0
+          },
+          {
+            "x": 115.0,
+            "y": 220.0
+          }
+        ]
+      }
+    ]
+  },
+  "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+  "symbolRendererParams": {
+    "centerText": "GUIAm2901ALUInclSourceDecodeInclFunctionDecode",
+    "horizontalComponentCenter": 17.5,
+    "centerTextHeight": 5.0,
+    "pinLabelHeight": 3.5,
+    "pinLabelMargin": 0.5
+  }
+}
\ No newline at end of file
diff --git a/net.mograsim.logic.model.editor/components/am2901/GUIAm2901ALUOneBit.json b/net.mograsim.logic.model.editor/components/am2901/GUIAm2901ALUOneBit.json
new file mode 100644 (file)
index 0000000..b6b05e1
--- /dev/null
@@ -0,0 +1,521 @@
+mograsim version: 0.1.3
+{
+  "width": 35.0,
+  "height": 90.0,
+  "interfacePins": [
+    {
+      "location": {
+        "x": 0.0,
+        "y": 35.0
+      },
+      "name": "R",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 55.0
+      },
+      "name": "S",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 15.0
+      },
+      "name": "F",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 75.0
+      },
+      "name": "FN",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 5.0
+      },
+      "name": "Cin",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 65.0
+      },
+      "name": "SN",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 5.0
+      },
+      "name": "Cout",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 45.0
+      },
+      "name": "RN",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 85.0
+      },
+      "name": "L",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 25.0
+      },
+      "name": "CinE",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 15.0
+      },
+      "name": "CoutE",
+      "logicWidth": 1
+    }
+  ],
+  "submodel": {
+    "innerScale": 0.2,
+    "subComps": [
+      {
+        "pos": {
+          "x": 60.0,
+          "y": 55.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#0",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 54.0,
+          "y": 69.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#1",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 49.0,
+          "y": 59.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#0",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 90.0,
+          "y": 70.0
+        },
+        "id": "GUImux1",
+        "name": "GUImux1#0"
+      },
+      {
+        "pos": {
+          "x": 10.0,
+          "y": 20.0
+        },
+        "id": "GUIand",
+        "name": "GUIand#0"
+      },
+      {
+        "pos": {
+          "x": 10.0,
+          "y": 290.0
+        },
+        "id": "GUIxor",
+        "name": "GUIxor#1"
+      },
+      {
+        "pos": {
+          "x": 135.0,
+          "y": 70.0
+        },
+        "id": "GUIxor",
+        "name": "GUIxor#2"
+      },
+      {
+        "pos": {
+          "x": 60.0,
+          "y": 20.0
+        },
+        "id": "GUIfulladder",
+        "name": "GUIfulladder#0"
+      },
+      {
+        "pos": {
+          "x": 10.0,
+          "y": 190.0
+        },
+        "id": "GUIxor",
+        "name": "GUIxor#0"
+      },
+      {
+        "pos": {
+          "x": 135.0,
+          "y": 20.0
+        },
+        "id": "GUIand",
+        "name": "GUIand#1"
+      }
+    ],
+    "innerWires": [
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "Cin"
+        },
+        "pin2": {
+          "compName": "GUIand#0",
+          "pinName": "A"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "CoutE"
+        },
+        "pin2": {
+          "compName": "GUIand#1",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 5.0,
+            "y": 75.0
+          },
+          {
+            "x": 5.0,
+            "y": 10.0
+          },
+          {
+            "x": 130.0,
+            "y": 10.0
+          },
+          {
+            "x": 130.0,
+            "y": 25.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "CinE"
+        },
+        "pin2": {
+          "compName": "GUIand#0",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 7.5,
+            "y": 125.0
+          },
+          {
+            "x": 7.5,
+            "y": 35.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "R"
+        },
+        "pin2": {
+          "compName": "GUIxor#0",
+          "pinName": "A"
+        }
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "RN"
+        },
+        "pin2": {
+          "compName": "GUIxor#0",
+          "pinName": "B"
+        }
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "S"
+        },
+        "pin2": {
+          "compName": "GUIxor#1",
+          "pinName": "A"
+        }
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "SN"
+        },
+        "pin2": {
+          "compName": "GUIxor#1",
+          "pinName": "B"
+        }
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "FN"
+        },
+        "pin2": {
+          "compName": "GUIxor#2",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 130.0,
+            "y": 375.0
+          },
+          {
+            "x": 130.0,
+            "y": 85.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "L"
+        },
+        "pin2": {
+          "compName": "GUImux1#0",
+          "pinName": "S0"
+        },
+        "path": [
+          {
+            "x": 87.5,
+            "y": 425.0
+          },
+          {
+            "x": 87.5,
+            "y": 75.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIand#0",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUIfulladder#0",
+          "pinName": "A"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIxor#0",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "path": [
+          {
+            "x": 50.0,
+            "y": 195.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIfulladder#0",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 50.0,
+            "y": 35.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#0",
+          "pinName": "A"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIxor#1",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "path": [
+          {
+            "x": 55.0,
+            "y": 295.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIfulladder#0",
+          "pinName": "C"
+        },
+        "path": [
+          {
+            "x": 55.0,
+            "y": 45.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#0",
+          "pinName": "B"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIfulladder#0",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUImux1#0",
+          "pinName": "I0"
+        },
+        "path": [
+          {
+            "x": 100.0,
+            "y": 25.0
+          },
+          {
+            "x": 100.0,
+            "y": 65.0
+          },
+          {
+            "x": 85.0,
+            "y": 65.0
+          },
+          {
+            "x": 85.0,
+            "y": 85.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIfulladder#0",
+          "pinName": "Z"
+        },
+        "pin2": {
+          "compName": "GUIand#1",
+          "pinName": "B"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#0",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUImux1#0",
+          "pinName": "I1"
+        },
+        "path": [
+          {
+            "x": 82.5,
+            "y": 65.0
+          },
+          {
+            "x": 82.5,
+            "y": 95.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUImux1#0",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUIxor#2",
+          "pinName": "A"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIand#1",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Cout"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIxor#2",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "F"
+        },
+        "path": []
+      }
+    ]
+  },
+  "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+  "symbolRendererParams": {
+    "centerText": "GUIAm2901ALUOneBit",
+    "horizontalComponentCenter": 17.5,
+    "centerTextHeight": 5.0,
+    "pinLabelHeight": 3.5,
+    "pinLabelMargin": 0.5
+  }
+}
\ No newline at end of file
diff --git a/net.mograsim.logic.model.editor/components/am2901/GUIAm2901DestDecode.json b/net.mograsim.logic.model.editor/components/am2901/GUIAm2901DestDecode.json
new file mode 100644 (file)
index 0000000..d80d080
--- /dev/null
@@ -0,0 +1,1035 @@
+mograsim version: 0.1.3
+{
+  "width": 35.0,
+  "height": 60.0,
+  "interfacePins": [
+    {
+      "location": {
+        "x": 35.0,
+        "y": 45.0
+      },
+      "name": "LSH",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 5.0
+      },
+      "name": "NSH",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 15.0
+      },
+      "name": "RSH",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 25.0
+      },
+      "name": "I6",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 35.0
+      },
+      "name": "YF",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 15.0
+      },
+      "name": "I7",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 25.0
+      },
+      "name": "RAMWE",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 55.0
+      },
+      "name": "QWE",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 5.0
+      },
+      "name": "I8",
+      "logicWidth": 1
+    }
+  ],
+  "submodel": {
+    "innerScale": 0.25,
+    "subComps": [
+      {
+        "pos": {
+          "x": 15.0,
+          "y": 50.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#1",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 74.0,
+          "y": 159.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#14",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 15.0,
+          "y": 10.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#0",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 74.0,
+          "y": 104.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#13",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 15.0,
+          "y": 150.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#3",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 15.0,
+          "y": 90.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#2",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 109.0,
+          "y": 214.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#15",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 4.0,
+          "y": 14.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#1",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 4.0,
+          "y": 19.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#0",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 9.0,
+          "y": 59.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#3",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 4.0,
+          "y": 24.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#2",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 9.0,
+          "y": 104.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#5",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 9.0,
+          "y": 64.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#4",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 39.0,
+          "y": 59.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#7",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 4.0,
+          "y": 154.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#6",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 44.0,
+          "y": 54.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#9",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 44.0,
+          "y": 19.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#8",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 39.0,
+          "y": 134.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#10",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 74.0,
+          "y": 99.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#12",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 74.0,
+          "y": 19.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#11",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 115.0,
+          "y": 210.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#12",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 110.0,
+          "y": 105.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#11",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 80.0,
+          "y": 145.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#10",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 80.0,
+          "y": 90.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#9",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 80.0,
+          "y": 10.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#8",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 50.0,
+          "y": 50.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#5",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 50.0,
+          "y": 10.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#4",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 50.0,
+          "y": 130.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#7",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 50.0,
+          "y": 90.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#6",
+        "params": 1
+      }
+    ],
+    "innerWires": [
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "I8"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#0",
+          "pinName": "A"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#0",
+          "pinName": "B"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "I7"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#3",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#3",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#1",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 10.0,
+            "y": 55.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#3",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#4",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#4",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#1",
+          "pinName": "B"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#4",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#5",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#5",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#2",
+          "pinName": "B"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#2",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 5.0,
+            "y": 95.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "I6"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#6",
+          "pinName": ""
+        },
+        "path": [
+          {
+            "x": 5.0,
+            "y": 100.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#6",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#3",
+          "pinName": "A"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#6",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#3",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 5.0,
+            "y": 165.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#4",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 5.0,
+            "y": 5.0
+          },
+          {
+            "x": 40.0,
+            "y": 5.0
+          },
+          {
+            "x": 40.0,
+            "y": 15.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#1",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#7",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#7",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#4",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 40.0,
+            "y": 25.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#7",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#5",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 40.0,
+            "y": 65.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#0",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#8",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#8",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "NSH"
+        },
+        "path": [
+          {
+            "x": 45.0,
+            "y": 5.0
+          },
+          {
+            "x": 135.0,
+            "y": 5.0
+          },
+          {
+            "x": 135.0,
+            "y": 20.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#8",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#9",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#9",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#5",
+          "pinName": "A"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#9",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#6",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 45.0,
+            "y": 95.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#5",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#6",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 10.0,
+            "y": 115.0
+          },
+          {
+            "x": 45.0,
+            "y": 115.0
+          },
+          {
+            "x": 45.0,
+            "y": 105.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#2",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#10",
+          "pinName": ""
+        },
+        "path": [
+          {
+            "x": 40.0,
+            "y": 100.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#10",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#7",
+          "pinName": "A"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#10",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#7",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 40.0,
+            "y": 145.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#4",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#11",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#11",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#8",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 75.0,
+            "y": 15.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#11",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#8",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 75.0,
+            "y": 25.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#5",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "RAMWE"
+        },
+        "path": [
+          {
+            "x": 125.0,
+            "y": 60.0
+          },
+          {
+            "x": 125.0,
+            "y": 100.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#6",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#12",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#12",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#9",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 75.0,
+            "y": 95.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#12",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#13",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#13",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#9",
+          "pinName": "B"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#7",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "LSH"
+        },
+        "path": [
+          {
+            "x": 125.0,
+            "y": 140.0
+          },
+          {
+            "x": 125.0,
+            "y": 180.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#13",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#10",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 75.0,
+            "y": 150.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#3",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#14",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#14",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#10",
+          "pinName": "B"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#8",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "RSH"
+        },
+        "path": [
+          {
+            "x": 130.0,
+            "y": 20.0
+          },
+          {
+            "x": 130.0,
+            "y": 60.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#9",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUINandGate#11",
+          "pinName": "A"
+        }
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#14",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#11",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 75.0,
+            "y": 170.0
+          },
+          {
+            "x": 105.0,
+            "y": 170.0
+          },
+          {
+            "x": 105.0,
+            "y": 120.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#10",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#15",
+          "pinName": ""
+        },
+        "path": [
+          {
+            "x": 110.0,
+            "y": 155.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#15",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#12",
+          "pinName": "A"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#15",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#12",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 110.0,
+            "y": 225.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#11",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "YF"
+        }
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#12",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "QWE"
+        },
+        "path": []
+      }
+    ]
+  },
+  "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+  "symbolRendererParams": {
+    "centerText": "GUIAm2901DestDecode",
+    "horizontalComponentCenter": 17.5,
+    "centerTextHeight": 5.0,
+    "pinLabelHeight": 3.5,
+    "pinLabelMargin": 0.5
+  }
+}
\ No newline at end of file
diff --git a/net.mograsim.logic.model.editor/components/am2901/GUIAm2901QReg.json b/net.mograsim.logic.model.editor/components/am2901/GUIAm2901QReg.json
new file mode 100644 (file)
index 0000000..6af804d
--- /dev/null
@@ -0,0 +1,408 @@
+mograsim version: 0.1.3
+{
+  "width": 35.0,
+  "height": 60.0,
+  "interfacePins": [
+    {
+      "location": {
+        "x": 0.0,
+        "y": 55.0
+      },
+      "name": "D4",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 5.0
+      },
+      "name": "Q1",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 15.0
+      },
+      "name": "Q2",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 25.0
+      },
+      "name": "Q3",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 5.0
+      },
+      "name": "C",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 35.0
+      },
+      "name": "Q4",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 25.0
+      },
+      "name": "D1",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 15.0
+      },
+      "name": "WE",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 35.0
+      },
+      "name": "D2",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 45.0
+      },
+      "name": "D3",
+      "logicWidth": 1
+    }
+  ],
+  "submodel": {
+    "innerScale": 0.4,
+    "subComps": [
+      {
+        "pos": {
+          "x": 50.0,
+          "y": 32.5
+        },
+        "id": "GUIdff",
+        "name": "GUIdff#1"
+      },
+      {
+        "pos": {
+          "x": 50.0,
+          "y": 7.5
+        },
+        "id": "GUIdff",
+        "name": "GUIdff#0"
+      },
+      {
+        "pos": {
+          "x": 41.5,
+          "y": 36.5
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#1",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 41.5,
+          "y": 19.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#0",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 41.5,
+          "y": 61.5
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#2",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 5.0,
+          "y": 15.0
+        },
+        "id": "GUIand",
+        "name": "GUIand#0"
+      },
+      {
+        "pos": {
+          "x": 50.0,
+          "y": 82.5
+        },
+        "id": "GUIdff",
+        "name": "GUIdff#3"
+      },
+      {
+        "pos": {
+          "x": 50.0,
+          "y": 57.5
+        },
+        "id": "GUIdff",
+        "name": "GUIdff#2"
+      }
+    ],
+    "innerWires": [
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "C"
+        },
+        "pin2": {
+          "compName": "GUIand#0",
+          "pinName": "A"
+        }
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "WE"
+        },
+        "pin2": {
+          "compName": "GUIand#0",
+          "pinName": "B"
+        }
+      },
+      {
+        "pin1": {
+          "compName": "GUIand#0",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIdff#0",
+          "pinName": "C"
+        },
+        "path": [
+          {
+            "x": 42.5,
+            "y": 12.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIdff#1",
+          "pinName": "C"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIdff#2",
+          "pinName": "C"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIdff#3",
+          "pinName": "C"
+        },
+        "path": [
+          {
+            "x": 42.5,
+            "y": 87.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "D1"
+        },
+        "pin2": {
+          "compName": "GUIdff#0",
+          "pinName": "D"
+        },
+        "path": [
+          {
+            "x": 17.5,
+            "y": 62.5
+          },
+          {
+            "x": 17.5,
+            "y": 42.5
+          },
+          {
+            "x": 45.0,
+            "y": 42.5
+          },
+          {
+            "x": 45.0,
+            "y": 22.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "D2"
+        },
+        "pin2": {
+          "compName": "GUIdff#1",
+          "pinName": "D"
+        },
+        "path": [
+          {
+            "x": 22.5,
+            "y": 87.5
+          },
+          {
+            "x": 22.5,
+            "y": 47.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "D3"
+        },
+        "pin2": {
+          "compName": "GUIdff#2",
+          "pinName": "D"
+        },
+        "path": [
+          {
+            "x": 27.5,
+            "y": 112.5
+          },
+          {
+            "x": 27.5,
+            "y": 72.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "D4"
+        },
+        "pin2": {
+          "compName": "GUIdff#3",
+          "pinName": "D"
+        },
+        "path": [
+          {
+            "x": 32.5,
+            "y": 137.5
+          },
+          {
+            "x": 32.5,
+            "y": 97.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIdff#0",
+          "pinName": "Q"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Q1"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIdff#1",
+          "pinName": "Q"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Q2"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIdff#2",
+          "pinName": "Q"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Q3"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIdff#3",
+          "pinName": "Q"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Q4"
+        },
+        "path": []
+      }
+    ]
+  },
+  "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+  "symbolRendererParams": {
+    "centerText": "GUIAm2901QReg",
+    "horizontalComponentCenter": 17.5,
+    "centerTextHeight": 5.0,
+    "pinLabelHeight": 3.5,
+    "pinLabelMargin": 0.5
+  }
+}
\ No newline at end of file
diff --git a/net.mograsim.logic.model.editor/components/am2901/GUIAm2901SourceDecode.json b/net.mograsim.logic.model.editor/components/am2901/GUIAm2901SourceDecode.json
new file mode 100644 (file)
index 0000000..e36193d
--- /dev/null
@@ -0,0 +1,1076 @@
+mograsim version: 0.1.3
+{
+  "width": 35.0,
+  "height": 50.0,
+  "interfacePins": [
+    {
+      "location": {
+        "x": 35.0,
+        "y": 45.0
+      },
+      "name": "RD",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 25.0
+      },
+      "name": "I0",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 15.0
+      },
+      "name": "I1",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 5.0
+      },
+      "name": "I2",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 5.0
+      },
+      "name": "SQ",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 35.0
+      },
+      "name": "SA",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 15.0
+      },
+      "name": "RA",
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 25.0
+      },
+      "name": "SB",
+      "logicWidth": 1
+    }
+  ],
+  "submodel": {
+    "innerScale": 0.25,
+    "subComps": [
+      {
+        "pos": {
+          "x": 10.0,
+          "y": 50.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#1",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 94.0,
+          "y": 19.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#14",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 10.0,
+          "y": 10.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#0",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 64.0,
+          "y": 139.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#13",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 40.0,
+          "y": 10.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#3",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 10.0,
+          "y": 90.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#2",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 94.0,
+          "y": 179.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#15",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 6.5,
+          "y": 19.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#1",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 4.0,
+          "y": 19.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#0",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 6.5,
+          "y": 59.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#3",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 4.0,
+          "y": 144.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#2",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 6.5,
+          "y": 104.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#5",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 6.5,
+          "y": 99.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#4",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 34.0,
+          "y": 59.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#7",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 31.5,
+          "y": 54.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#6",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 34.0,
+          "y": 134.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#9",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 34.0,
+          "y": 64.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#8",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 36.5,
+          "y": 99.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#10",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 64.0,
+          "y": 99.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#12",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 64.0,
+          "y": 59.0
+        },
+        "id": "WireCrossPoint",
+        "name": "WireCrossPoint#11",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 70.0,
+          "y": 170.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#12",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 70.0,
+          "y": 130.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#11",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 100.0,
+          "y": 170.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#14",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 100.0,
+          "y": 10.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#13",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 70.0,
+          "y": 90.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#10",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 70.0,
+          "y": 50.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#9",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 70.0,
+          "y": 10.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#8",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 40.0,
+          "y": 90.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#5",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 40.0,
+          "y": 50.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#4",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 40.0,
+          "y": 170.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#7",
+        "params": 1
+      },
+      {
+        "pos": {
+          "x": 40.0,
+          "y": 130.0
+        },
+        "id": "GUINandGate",
+        "name": "GUINandGate#6",
+        "params": 1
+      }
+    ],
+    "innerWires": [
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "I2"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#3",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 5.0,
+            "y": 5.0
+          },
+          {
+            "x": 35.0,
+            "y": 5.0
+          },
+          {
+            "x": 35.0,
+            "y": 15.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#0",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 7.5,
+            "y": 15.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#0",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 7.5,
+            "y": 25.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#6",
+          "pinName": "B"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#12",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 5.0,
+            "y": 195.0
+          },
+          {
+            "x": 65.0,
+            "y": 195.0
+          },
+          {
+            "x": 65.0,
+            "y": 185.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "I1"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#3",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#3",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#1",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 7.5,
+            "y": 55.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#3",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#1",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 7.5,
+            "y": 65.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "I0"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#4",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#4",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#2",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 7.5,
+            "y": 95.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#4",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#5",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#5",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#2",
+          "pinName": "B"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#5",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#5",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 7.5,
+            "y": 112.5
+          },
+          {
+            "x": 32.5,
+            "y": 112.5
+          },
+          {
+            "x": 32.5,
+            "y": 105.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#0",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#6",
+          "pinName": ""
+        },
+        "path": [
+          {
+            "x": 32.5,
+            "y": 20.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#6",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#4",
+          "pinName": "A"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#6",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#5",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 32.5,
+            "y": 95.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#1",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#7",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#7",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#3",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 35.0,
+            "y": 25.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#7",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#8",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#8",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#4",
+          "pinName": "B"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#8",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#9",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#9",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#6",
+          "pinName": "A"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#9",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#7",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 35.0,
+            "y": 175.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#2",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#10",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#10",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#8",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 37.5,
+            "y": 35.0
+          },
+          {
+            "x": 65.0,
+            "y": 35.0
+          },
+          {
+            "x": 65.0,
+            "y": 25.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#10",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#7",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 37.5,
+            "y": 185.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#3",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUINandGate#8",
+          "pinName": "A"
+        }
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#4",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#11",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#11",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#9",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 65.0,
+            "y": 55.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#11",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#9",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 65.0,
+            "y": 65.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#5",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#12",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#12",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#10",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 65.0,
+            "y": 95.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#12",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#10",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 65.0,
+            "y": 105.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#6",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#13",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#13",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#11",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 65.0,
+            "y": 135.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#13",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#11",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 65.0,
+            "y": 145.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#7",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUINandGate#12",
+          "pinName": "A"
+        }
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#8",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#14",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#14",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#13",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 95.0,
+            "y": 15.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#14",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#13",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 95.0,
+            "y": 25.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#9",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "RA"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#10",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "SB"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#11",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "SA"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#12",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#15",
+          "pinName": ""
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#15",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#14",
+          "pinName": "A"
+        },
+        "path": [
+          {
+            "x": 95.0,
+            "y": 175.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#15",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#14",
+          "pinName": "B"
+        },
+        "path": [
+          {
+            "x": 95.0,
+            "y": 185.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#13",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "SQ"
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#14",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "RD"
+        },
+        "path": []
+      }
+    ]
+  },
+  "symbolRendererSnippetID": "SimpleRectangularLikeSymbolRenderer",
+  "symbolRendererParams": {
+    "centerText": "Am2901SourceDecode",
+    "horizontalComponentCenter": 17.5,
+    "centerTextHeight": 5.0,
+    "pinLabelHeight": 3.5,
+    "pinLabelMargin": 0.5
+  }
+}
\ No newline at end of file
diff --git a/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/DialogManager.java b/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/DialogManager.java
new file mode 100644 (file)
index 0000000..347e622
--- /dev/null
@@ -0,0 +1,131 @@
+package net.mograsim.logic.model.editor;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+
+public class DialogManager
+{
+       private Shell parent;
+       
+       public DialogManager(Shell parent)
+       {
+               this.parent = parent;
+       }
+
+       public void openWarningDialog(String title, String message)
+       {
+               MessageBox b = new MessageBox(parent, SWT.ICON_WARNING | SWT.OK);
+               b.setText(title);
+               b.setMessage(message);
+               b.open();
+       }
+       
+       public static class InteractiveDialog
+       {
+               private String[] finalInput;
+               private final Display display;
+               private final Shell shell;
+               private final Button b1, b2;
+               private Text[] textFields;
+               private InteractiveDialog.InteractiveDialogState state;
+
+               public InteractiveDialog(String title, String acceptLabel, String cancelLabel, String... inputs)
+               {
+                       display = Display.getDefault();
+                       shell = new Shell(SWT.CLOSE | SWT.TITLE | SWT.MIN | SWT.ON_TOP | SWT.APPLICATION_MODAL);
+                       shell.setMinimumSize(500, 150);
+                       shell.setText(title);
+                       GridLayout layout = new GridLayout();
+                       layout.numColumns = 2;
+                       shell.setLayout(layout);
+
+                       this.textFields = new Text[inputs.length];
+                       for (int i = 0; i < inputs.length; i++)
+                       {
+                               Label textFieldName = new Label(shell, SWT.NONE);
+                               textFieldName.setText(inputs[i].concat(":"));
+                               GridData g = new GridData();
+                               g.grabExcessHorizontalSpace = true;
+                               g.horizontalAlignment = SWT.FILL;
+                               Text newTextField = new Text(shell, SWT.BORDER);
+                               newTextField.setLayoutData(g);
+                               textFields[i] = newTextField;
+                       }
+                       b1 = new Button(shell, SWT.PUSH);
+                       b1.addListener(SWT.Selection, e ->
+                       {
+                               state = InteractiveDialogState.ACCEPTED;
+                               buildFinalInput();
+                               dispose();
+                       });
+                       b1.setText(acceptLabel);
+                       b2 = new Button(shell, SWT.PUSH);
+                       b2.addListener(SWT.Selection, e ->
+                       {
+                               state = InteractiveDialogState.CANCELLED;
+                               buildFinalInput();
+                               dispose();
+                       });
+                       b2.setText(cancelLabel);
+
+                       state = InteractiveDialogState.ACTIVE;
+
+                       shell.pack();
+               }
+
+               public String getText()
+               {
+                       return getText(0);
+               }
+
+               public String getText(int index)
+               {
+                       if (!shell.isDisposed())
+                               return textFields[index].getText();
+                       else
+                               return finalInput[index];
+               }
+
+               public void open()
+               {
+                       shell.open();
+                       while (!shell.isDisposed())
+                               if (!display.readAndDispatch())
+                                       display.sleep();
+               }
+
+               public void dispose()
+               {
+                       shell.dispose();
+               }
+
+               public InteractiveDialog.InteractiveDialogState getState()
+               {
+                       return state;
+               }
+
+               private void buildFinalInput()
+               {
+                       finalInput = new String[textFields.length];
+                       for (int i = 0; i < textFields.length; i++)
+                               finalInput[i] = textFields[i].getText();
+               }
+
+               public static enum InteractiveDialogState
+               {
+                       ACTIVE, ACCEPTED, CANCELLED;
+               }
+       }
+       
+       public static void openAddPinDialog(Editor editor, double x, double y)
+       {
+               
+       }
+}
diff --git a/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/EditableSubmodelComponent.java b/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/EditableSubmodelComponent.java
new file mode 100644 (file)
index 0000000..fac2304
--- /dev/null
@@ -0,0 +1,89 @@
+package net.mograsim.logic.model.editor;
+
+import org.eclipse.swt.graphics.Color;
+
+import net.haspamelodica.swt.helper.gcs.GeneralGC;
+import net.haspamelodica.swt.helper.swtobjectwrappers.Font;
+import net.haspamelodica.swt.helper.swtobjectwrappers.Point;
+import net.haspamelodica.swt.helper.swtobjectwrappers.Rectangle;
+import net.mograsim.logic.model.model.ViewModelModifiable;
+import net.mograsim.logic.model.model.wires.MovablePin;
+import net.mograsim.logic.model.model.wires.Pin;
+import net.mograsim.logic.model.serializing.DeserializedSubmodelComponent;
+import net.mograsim.preferences.Preferences;
+
+public class EditableSubmodelComponent extends DeserializedSubmodelComponent
+{
+       private static final double labelFontHeight = 5;
+       private static final double pinNameFontHeight = 3;
+       private String label;
+
+       public EditableSubmodelComponent(ViewModelModifiable model, String label)
+       {
+               super(model, label); //TODO: set name properly
+               this.label = label;
+               setSubmodelScale(0.2);
+               addSubmodelInterface(new MovablePin(this, "A Pin", 1, 0, 10));
+
+       }
+
+       public ViewModelModifiable getSubmodelModifiable()
+       {
+               return submodelModifiable;
+       }
+
+       @Override
+       protected void renderOutline(GeneralGC gc, Rectangle visibleRegion)
+       {
+               Color foreground = Preferences.current().getColor("net.mograsim.logic.model.color.foreground");
+               if (foreground != null)
+                       gc.setForeground(foreground);
+               gc.drawRectangle(getBounds());
+       }
+
+       @Override
+       protected void renderSymbol(GeneralGC gc, Rectangle visibleRegion)
+       {
+               Font oldFont = gc.getFont();
+               gc.setFont(new Font(oldFont.getName(), labelFontHeight, oldFont.getStyle()));
+               Point textExtent = gc.textExtent(label);
+               Color textColor = Preferences.current().getColor("net.mograsim.logic.model.color.text");
+               if (textColor != null)
+                       gc.setForeground(textColor);
+               gc.drawText(label, getPosX() + (getWidth() - textExtent.x) / 2, getPosY() + (getHeight() - textExtent.y) / 2,
+                               true);
+               gc.setFont(new Font(oldFont.getName(), pinNameFontHeight, oldFont.getStyle()));
+               for (String name : pinsUnmodifiable.keySet())
+               {
+                       Pin p = pinsUnmodifiable.get(name);
+                       Point pos = p.getPos();
+                       gc.drawText(name, pos.x, pos.y, true);
+               }
+               gc.setFont(oldFont);
+       }
+
+       public void setSubmodelScale(double scale)
+       {
+               super.setSubmodelScale(scale);
+       }
+
+       public double getSubmodelScale()
+       {
+               return super.getSubmodelScale();
+       }
+
+       public void setSize(double width, double height)
+       {
+               super.setSize(width, height);
+       }
+
+       public String getLabel()
+       {
+               return label;
+       }
+
+       public void setLabel(String label)
+       {
+               this.label = label;
+       }
+}
diff --git a/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/Editor.java b/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/Editor.java
new file mode 100644 (file)
index 0000000..36dcbc7
--- /dev/null
@@ -0,0 +1,215 @@
+package net.mograsim.logic.model.editor;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Optional;
+import java.util.Set;
+
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+
+import net.haspamelodica.swt.helper.swtobjectwrappers.Point;
+import net.mograsim.logic.model.editor.handles.ComponentHandle;
+import net.mograsim.logic.model.editor.handles.Handle;
+import net.mograsim.logic.model.editor.handles.HandleManager;
+import net.mograsim.logic.model.editor.handles.PinHandle;
+import net.mograsim.logic.model.editor.states.StateManager;
+import net.mograsim.logic.model.model.ViewModelModifiable;
+import net.mograsim.logic.model.model.components.GUIComponent;
+import net.mograsim.logic.model.model.wires.GUIWire;
+import net.mograsim.logic.model.serializing.DeserializedSubmodelComponent;
+import net.mograsim.logic.model.serializing.IndirectGUIComponentCreator;
+
+public final class Editor
+{
+       final Selection selection = new Selection();
+       final Set<ComponentInfo> copyBuffer = new HashSet<>();
+       public final DeserializedSubmodelComponent toBeEdited;
+       public final HandleManager handleManager;
+       final static Map<GUIComponent, String> identifierPerComponent = new HashMap<>();
+       public final EditorGUI gui;
+       public final StateManager stateManager;
+       private final SaveLoadManager saveManager;
+       Snapping snapping = Snapping.ABSOLUTE;
+       private double snapX = 5, snapY = 5;
+       public final DialogManager dialogManager;
+
+       public Editor(DeserializedSubmodelComponent toBeEdited)
+       {
+               this.toBeEdited = toBeEdited;
+               handleManager = new HandleManager(this);
+               gui = new EditorGUI(this);
+               stateManager = new StateManager(this);
+               handleManager.init();
+               saveManager = new SaveLoadManager(this);
+               dialogManager = new DialogManager(gui.shell);
+
+               toBeEdited.submodel.addComponentRemovedListener(c -> identifierPerComponent.remove(c));
+               
+               gui.open();
+       }
+       
+       public ViewModelModifiable getSubmodel()
+       {
+               return toBeEdited.getSubmodelModifiable();
+       }
+
+       public Selection getSelection()
+       {
+               return selection;
+       }
+
+       //TODO: Remove this error prone method: Relative offset may change between multiple moves,
+       //because Handles have different ways of responding to reqMove(...), causing strange behaviour
+       @Deprecated
+       public void moveSelection(double x, double y)
+       {
+               Point ref = selection.getTopLeft();
+               Point snapped = new Point(x, y);
+               applySnapping(snapped);
+
+               for (Handle c : selection)
+               {
+                       double newX, newY;
+                       newX = snapped.x + c.getPosX() - ref.x;
+                       newY = snapped.y + c.getPosY() - ref.y;
+                       c.reqMove(newX, newY);
+               }
+       }
+       
+       public void moveHandles(double x, double y, Map<Handle, Point> handleOffsetMap)
+       {
+               Point snapped = new Point(x, y);
+               applySnapping(snapped);
+
+               for (Handle c : handleOffsetMap.keySet())
+               {
+                       Point offset = handleOffsetMap.get(c);
+                       double newX, newY;
+                       newX = snapped.x + offset.x;
+                       newY = snapped.y + offset.y;
+                       c.reqMove(newX, newY);
+               }
+       }
+
+       public void deleteSelection()
+       {
+               selection.forEach(h -> h.reqDelete());
+               selection.clear();
+       }
+
+       public void copy()
+       {
+               copyBuffer.clear();
+               Point refPoint = selection.getTopLeft();
+               for (Handle h : selection)
+               {
+                       Optional<ComponentInfo> cInfo = h.reqCopy(refPoint);
+                       if(cInfo.isPresent())
+                               copyBuffer.add(cInfo.get());
+               }
+       }
+
+       public void paste(double x, double y)
+       {
+               selection.clear();
+               for (ComponentInfo info : copyBuffer)
+               {
+                       GUIComponent comp = addComponent(info.identifier, info.params);
+                       ComponentHandle h = handleManager.getHandle(comp);
+                       h.reqMove(info.relX, info.relY);
+                       selection.add(h);
+               }
+               moveSelection(x, y);
+       }
+       
+       public void save()
+       {
+               saveManager.save();
+       }
+
+       public void addComponent(double x, double y)
+       {
+               GUIComponent c = addComponent(gui.getAddListSelected(), new JsonObject());
+               selection.clear();
+               selection.add(handleManager.getHandle(c));
+               moveSelection(x, y);
+       }
+       
+       private GUIComponent addComponent(String identifier, JsonElement params)
+       {
+               GUIComponent comp = IndirectGUIComponentCreator.createComponent(toBeEdited.getSubmodelModifiable(), identifier,
+                               params);
+               identifierPerComponent.put(comp, identifier);
+               return comp;
+       }
+       
+       public static String getIdentifier(GUIComponent c)
+       {
+               return identifierPerComponent.get(c);
+       }
+
+       public void duplicate()
+       {
+               copy();
+               Point origin = selection.getTopLeft();
+               paste(origin.x + 20, origin.y + 20);
+       }
+
+       private void applySnapping(Point newP)
+       {
+               switch (snapping)
+               {
+               case OFF:
+                       break;
+               case ABSOLUTE:
+                       newP.x -= newP.x % snapX;
+                       newP.y -= newP.y % snapY;
+                       break;
+               }
+       }
+
+       public static class ComponentInfo
+       {
+               public final double relX, relY;
+               public final String identifier;
+               public final JsonElement params;
+               
+               public ComponentInfo(double relX, double relY, String identifier, JsonElement params)
+               {
+                       this.relX = relX;
+                       this.relY = relY;
+                       this.identifier = identifier;
+                       this.params = params;
+               }
+       }
+
+       public Point getCanvasMousePosition()
+       {
+               //TODO
+               org.eclipse.swt.graphics.Point canvasLoc = gui.logicCanvas.getLocation(),
+                               mouseLoc = gui.display.getCursorLocation(), shellLoc = gui.shell.getLocation();
+               return new Point(mouseLoc.x - shellLoc.x - canvasLoc.x, mouseLoc.y - shellLoc.y - canvasLoc.y);
+       }
+
+       public Point getWorldMousePosition()
+       {
+               return gui.logicCanvas.canvasToWorldCoords(getCanvasMousePosition());
+       }
+
+       public void addWire(PinHandle a, PinHandle b)
+       {
+               new GUIWire(toBeEdited.getSubmodelModifiable(), a.getPin(), b.getPin(), new Point[0]);
+       }
+
+       public static enum Snapping
+       {
+               OFF, ABSOLUTE;
+       }
+       
+       public static void main(String[] args)
+       {
+               SaveLoadManager.openLoadDialog();
+       }
+}
diff --git a/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/EditorCanvas.java b/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/EditorCanvas.java
new file mode 100644 (file)
index 0000000..df6b913
--- /dev/null
@@ -0,0 +1,42 @@
+package net.mograsim.logic.model.editor;
+
+import java.util.Collection;
+
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.widgets.Composite;
+
+import net.haspamelodica.swt.helper.gcs.TranslatedGC;
+import net.haspamelodica.swt.helper.swtobjectwrappers.Rectangle;
+import net.mograsim.logic.model.LogicUICanvas;
+import net.mograsim.logic.model.editor.handles.Handle;
+import net.mograsim.preferences.Preferences;
+
+public class EditorCanvas extends LogicUICanvas
+{
+       private Collection<Handle> handles;
+
+       public EditorCanvas(Composite parent, int style, Editor editor)
+       {
+               super(parent, style, editor.toBeEdited.submodel);
+
+               handles = editor.handleManager.getHandles();
+               editor.handleManager.addHandleAddedListener(h -> 
+               h.addRedrawListener(this::redrawThreadsafe));
+               //Is this even necessary? The Handle should be finalized by the gc
+               editor.handleManager.addHandleRemovedListener(h -> h.removeRedrawListener(this::redrawThreadsafe));
+
+               addZoomedRenderer(gc ->
+               {
+                       Rectangle visibleRegion = new Rectangle(-offX / zoom, -offY / zoom, gW / zoom, gH / zoom);
+                       Color background = Preferences.current().getColor("net.mograsim.logic.ui.color.background");
+                       if (background != null)
+                               setBackground(background);// this.setBackground, not gc.setBackground to have the background fill the
+                                                                                       // canvas
+                       
+                       TranslatedGC tgc = new TranslatedGC(gc, 0.0d, 0.0d, 1 / editor.toBeEdited.getSubmodelScale(), false);
+                       editor.toBeEdited.outlineRenderer.render(tgc, new Rectangle(-offX / zoom, -offY / zoom, gW / zoom, gH / zoom));
+                       
+                       handles.forEach(h -> h.render(gc, visibleRegion));
+               });
+       }
+}
diff --git a/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/EditorGUI.java b/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/EditorGUI.java
new file mode 100644 (file)
index 0000000..2627d3c
--- /dev/null
@@ -0,0 +1,78 @@
+package net.mograsim.logic.model.editor;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.List;
+import org.eclipse.swt.widgets.Shell;
+
+import net.haspamelodica.swt.helper.zoomablecanvas.helper.ZoomableCanvasOverlay;
+import net.haspamelodica.swt.helper.zoomablecanvas.helper.ZoomableCanvasUserInput;
+import net.mograsim.logic.model.serializing.IndirectGUIComponentCreator;
+
+public class EditorGUI
+{
+       final Display display;
+       final Shell shell;
+       public final EditorCanvas logicCanvas;
+       private final List addList;
+
+       public EditorGUI(Editor editor)
+       {
+               display = Display.getDefault();
+               shell = new Shell(display);
+               
+               //Layout
+               GridLayout layout = new GridLayout();
+               shell.setLayout(layout);
+               layout.numColumns = 2;
+               
+               GridData d = new GridData();
+               d.grabExcessVerticalSpace = true;
+               d.verticalAlignment = SWT.FILL;
+               addList = new List(shell, SWT.FILL);
+               addList.setLayoutData(d);
+               refreshAddList();
+               
+               d = new GridData();
+               d.grabExcessHorizontalSpace = true;
+               d.horizontalAlignment = SWT.FILL;
+               d.grabExcessVerticalSpace = true;
+               d.verticalAlignment = SWT.FILL;
+               
+               logicCanvas = new EditorCanvas(shell, SWT.TRAIL, editor);
+               logicCanvas.setLayoutData(d);
+               
+               
+               new EditorUserInput(editor, this);
+               ZoomableCanvasUserInput userInput = new ZoomableCanvasUserInput(logicCanvas);
+               userInput.buttonDrag = 3;
+               userInput.buttonZoom = 2;
+               userInput.enableUserInput();
+               new ZoomableCanvasOverlay(logicCanvas, null).enableScale();
+       }
+       
+       public void refreshAddList()
+       {
+               addList.setItems(IndirectGUIComponentCreator.getStandardComponentIDs().toArray(String[]::new));
+               addList.select(0);
+       }
+       
+       public String getAddListSelected()
+       {
+               String[] selection = addList.getSelection();
+               if(selection.length == 0)
+                       throw new IllegalStateException("Selection in the Add Component List may never be empty!");
+               return selection[0];
+       }
+
+       public void open()
+       {
+               shell.open();
+               while (!shell.isDisposed())
+                       if (!display.readAndDispatch())
+                               display.sleep();
+       }
+
+}
diff --git a/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/EditorUserInput.java b/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/EditorUserInput.java
new file mode 100644 (file)
index 0000000..cb66e94
--- /dev/null
@@ -0,0 +1,95 @@
+package net.mograsim.logic.model.editor;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.KeyEvent;
+import org.eclipse.swt.events.KeyListener;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseListener;
+
+import net.haspamelodica.swt.helper.swtobjectwrappers.Point;
+
+public class EditorUserInput
+{
+       public EditorUserInput(Editor editor, EditorGUI gui)
+       {
+               gui.logicCanvas.addMouseListener(new MouseListener()
+               {
+                       @Override
+                       public void mouseDoubleClick(MouseEvent e)
+                       {
+                               // TODO Auto-generated method stub
+                       }
+
+                       @Override
+                       public void mouseDown(MouseEvent e)
+                       {
+                               Point clicked = editor.gui.logicCanvas.canvasToWorldCoords(e.x, e.y);
+                               switch (e.button)
+                               {
+                               case 1:
+                                       editor.handleManager.click(clicked, e.stateMask);
+                                       break;
+                               }
+
+                       }
+
+                       @Override
+                       public void mouseUp(MouseEvent e) {}
+               });
+
+               gui.logicCanvas.addMouseMoveListener((e) ->
+               {
+                       Point dest = editor.gui.logicCanvas.canvasToWorldCoords(e.x, e.y);
+                       editor.stateManager.mouseMoved(dest.x, dest.y);
+               });
+
+               gui.logicCanvas.addKeyListener(new KeyListener()
+               {
+                       
+                       @Override
+                       public void keyReleased(KeyEvent e)
+                       {
+                               // TODO Auto-generated method stub
+                               
+                       }
+                       
+                       @Override
+                       public void keyPressed(KeyEvent e)
+                       {
+                               switch (e.keyCode)
+                               {
+                               case 'c':
+                                       if ((e.stateMask & SWT.CTRL) == SWT.CTRL)
+                                               editor.stateManager.copy();
+                                       break;
+                               case 'v':
+                                       if ((e.stateMask & SWT.CTRL) == SWT.CTRL)
+                                               editor.stateManager.paste();
+                                       break;
+                               case 'd':
+                                       if ((e.stateMask & SWT.SHIFT) == SWT.SHIFT)
+                                               editor.stateManager.duplicate();
+                                       break;
+                               case 'g':
+                                       editor.stateManager.grab();
+                                       break;
+                               case 'r':
+                                       editor.stateManager.delete();
+                                       break;
+                               case 's':
+                                       if ((e.stateMask & SWT.CTRL) == SWT.CTRL)
+                                               editor.save();
+                                       break;
+                               case 'a':
+                                       if ((e.stateMask & SWT.SHIFT) == SWT.SHIFT)
+                                               editor.stateManager.add();
+                                       break;
+                               case 'h':
+                                       editor.stateManager.boxSelect();
+                                       break;
+                               }
+
+                       }
+               });
+       }
+}
\ No newline at end of file
diff --git a/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/SaveLoadManager.java b/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/SaveLoadManager.java
new file mode 100644 (file)
index 0000000..848227b
--- /dev/null
@@ -0,0 +1,69 @@
+package net.mograsim.logic.model.editor;
+
+import java.io.IOException;
+
+import net.mograsim.logic.model.editor.DialogManager.InteractiveDialog;
+import net.mograsim.logic.model.model.ViewModelModifiable;
+import net.mograsim.logic.model.serializing.DeserializedSubmodelComponent;
+import net.mograsim.logic.model.serializing.SubmodelComponentDeserializer;
+import net.mograsim.logic.model.util.JsonHandler;
+
+public class SaveLoadManager
+{
+       private String savePath = null;
+       private Editor editor;
+
+       public SaveLoadManager(Editor editor)
+       {
+               this.editor = editor;
+       }
+
+       public void save()
+       {
+               if (savePath == null)
+                       openSaveAsDialog();
+               else
+                       innerSave();
+       }
+
+       public void openSaveAsDialog()
+       {
+               InteractiveDialog d = new InteractiveDialog("Save as...", "Save", "Cancel", "Path");
+               d.open();
+               
+               if(InteractiveDialog.InteractiveDialogState.ACCEPTED.equals(d.getState()))
+               {
+                       savePath = d.getText();
+                       innerSave();
+               }
+       }
+
+       private void innerSave()
+       {
+               try
+               {
+                       JsonHandler.writeJson(editor.toBeEdited.calculateParams(c ->
+                       {
+                               if (Editor.identifierPerComponent.containsKey(c))
+                                       return Editor.identifierPerComponent.get(c);
+                               return "class:" + c.getClass().getCanonicalName();
+                       }), savePath);
+               } catch (IOException e)
+               {
+                       savePath = null;
+                       System.err.println("Failed to save component!");
+                       e.printStackTrace();
+               }
+       }
+
+       public static void openLoadDialog()
+       {
+               InteractiveDialog load = new InteractiveDialog("Load Component...", "Load", "Cancel", "Path");
+               load.open();
+               if(InteractiveDialog.InteractiveDialogState.ACCEPTED.equals(load.getState()))
+               {
+                       new Editor((DeserializedSubmodelComponent) SubmodelComponentDeserializer
+                                       .create(new ViewModelModifiable(), load.getText()));
+               }
+       }
+}
diff --git a/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/Selection.java b/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/Selection.java
new file mode 100644 (file)
index 0000000..23135e4
--- /dev/null
@@ -0,0 +1,132 @@
+package net.mograsim.logic.model.editor;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+import java.util.function.DoubleBinaryOperator;
+
+import net.haspamelodica.swt.helper.swtobjectwrappers.Point;
+import net.haspamelodica.swt.helper.swtobjectwrappers.Rectangle;
+import net.mograsim.logic.model.editor.handles.Handle;
+
+public class Selection implements Iterable<Handle>
+{
+       private Set<Handle> selection = new HashSet<>();
+
+       public Map<Handle, Point> calculateOffsets()
+       {
+               Map<Handle, Point> offsets = new HashMap<>();
+               Point ref = getTopLeft();
+               selection.forEach(h -> offsets.put(h, new Point(h.getPosX() - ref.x, h.getPosY() - ref.y)));
+               return offsets;
+       }
+
+       public Rectangle getBounds()
+       {
+               Point pos1 = getTopLeft();
+               Point pos2 = getBottomRight();
+               return new Rectangle(pos1.x, pos1.y, pos2.x - pos1.x, pos2.y - pos1.y);
+       }
+
+       public double getWidth()
+       {// TODO: Compute this more efficiently
+               return getTopRight().x - getTopLeft().x;
+       }
+
+       public double getHeight()
+       {
+               return getBottomLeft().y - getTopLeft().y;
+       }
+
+       public Point getTopLeft()
+       {
+               return getCorner(Double.MAX_VALUE, Double::min, r -> 0, Double.MAX_VALUE, Double::min, r -> 0);
+       }
+
+       public Point getTopRight()
+       {
+               return getCorner(-Double.MAX_VALUE, Double::max, r -> r.width, Double.MAX_VALUE, Double::min, r -> 0);
+       }
+
+       public Point getBottomLeft()
+       {
+               return getCorner(Double.MAX_VALUE, Double::min, r -> 0, -Double.MAX_VALUE, Double::max, r -> r.height);
+       }
+
+       public Point getBottomRight()
+       {
+               return getCorner(-Double.MAX_VALUE, Double::max, r -> r.width, -Double.MAX_VALUE, Double::max, r -> r.height);
+       }
+
+       public Point getCorner(double xIdentity, DoubleBinaryOperator xOp, Offset xOffset, double yIdentity,
+                       DoubleBinaryOperator yOp, Offset yOffset)
+       {
+               double x = xIdentity, y = yIdentity;
+               for (Handle c : selection)
+               {
+                       Rectangle bounds = c.getBounds();
+                       x = xOp.applyAsDouble(x, bounds.x + xOffset.computeOffset(bounds));
+                       y = yOp.applyAsDouble(y, bounds.y + yOffset.computeOffset(bounds));
+               }
+               return new Point(x, y);
+       }
+
+       private static interface Offset
+       {
+               public double computeOffset(Rectangle bounds);
+       }
+
+       public void add(Handle h)
+       {
+               selection.add(h);
+               h.onSelect();
+       }
+
+       public void remove(Handle h)
+       {
+               selection.remove(h);
+               h.onDeselect();
+       }
+
+       public void clear()
+       {
+               selection.forEach(h -> h.onDeselect());
+               selection.clear();
+       }
+
+       public int size()
+       {
+               return selection.size();
+       }
+
+       public boolean contains(Handle h)
+       {
+               return selection.contains(h);
+       }
+
+       public void addAll(Collection<Handle> handles)
+       {
+               handles.forEach(h -> h.onSelect());
+               selection.addAll(handles);
+       }
+
+       @Override
+       public Iterator<Handle> iterator()
+       {
+               return selection.iterator();
+       }
+
+       @Override
+       public String toString()
+       {
+               return selection.toString();
+       }
+
+       public boolean isEmpty()
+       {
+               return selection.isEmpty();
+       }
+}
diff --git a/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/handles/ComponentHandle.java b/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/handles/ComponentHandle.java
new file mode 100644 (file)
index 0000000..52b634d
--- /dev/null
@@ -0,0 +1,96 @@
+package net.mograsim.logic.model.editor.handles;
+
+import java.util.Optional;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Display;
+
+import net.haspamelodica.swt.helper.gcs.GeneralGC;
+import net.haspamelodica.swt.helper.swtobjectwrappers.Point;
+import net.haspamelodica.swt.helper.swtobjectwrappers.Rectangle;
+import net.mograsim.logic.model.editor.Editor;
+import net.mograsim.logic.model.editor.Editor.ComponentInfo;
+import net.mograsim.logic.model.model.components.GUIComponent;
+
+public class ComponentHandle extends Handle
+{
+       public final GUIComponent parent;
+       private final static double POS_OFFSET = 2.0d;
+       private final static double LENGTH_OFFSET = POS_OFFSET * 2;
+       boolean selected = false;
+
+       public ComponentHandle(GUIComponent parent)
+       {
+               this.parent = parent;
+               Rectangle bounds = parent.getBounds();
+               setSize(bounds.width, bounds.height);
+               parent.addComponentResizedListener((c) ->
+               {
+                       Rectangle pBounds = c.getBounds();
+                       setSize(pBounds.width, pBounds.height);
+               });
+               moveTo(parent.getPosX(), parent.getPosY());
+       }
+       
+       @Override
+       protected void moveTo(double x, double y)
+       {
+               super.moveTo(x, y);
+               parent.moveTo(x, y);
+       }
+
+       @Override
+       protected void render(GeneralGC gc)
+       {
+               if (selected)
+               {
+                       gc.setLineWidth(2);
+                       gc.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_YELLOW));
+                       Rectangle bounds = getBounds();
+                       bounds.x -= POS_OFFSET;
+                       bounds.y -= POS_OFFSET;
+                       bounds.width += LENGTH_OFFSET;
+                       bounds.height += LENGTH_OFFSET;
+                       gc.drawRectangle(bounds);
+               }
+       }
+
+       @Override
+       public void reqMove(double x, double y)
+       {
+               moveTo(x, y);
+       }
+
+       @Override
+       public void onSelect()
+       {
+               selected = true;
+               callRedrawListeners();
+       }
+
+       @Override
+       public void onDeselect()
+       {
+               selected = false;
+               callRedrawListeners();
+       }
+       
+       @Override
+       public void reqDelete()
+       {
+               parent.destroy();
+       }
+
+       @Override
+       public Optional<ComponentInfo> reqCopy(Point refPoint)
+       {
+               return Optional.of(new ComponentInfo(parent.getPosX() - refPoint.x, parent.getPosY() - refPoint.y,
+                               Editor.getIdentifier(parent), parent.getParams()));
+       }
+       
+       @Override
+       public HandleType getType()
+       {
+               return HandleType.COMPONENT;
+       }
+}
\ No newline at end of file
diff --git a/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/handles/CornerHandle.java b/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/handles/CornerHandle.java
new file mode 100644 (file)
index 0000000..b56ec2b
--- /dev/null
@@ -0,0 +1,71 @@
+package net.mograsim.logic.model.editor.handles;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Display;
+
+import net.haspamelodica.swt.helper.gcs.GeneralGC;
+import net.haspamelodica.swt.helper.swtobjectwrappers.Rectangle;
+import net.mograsim.logic.model.serializing.DeserializedSubmodelComponent;
+
+public class CornerHandle extends Handle
+{
+       private final static int LENGTH = 5;
+       private final DeserializedSubmodelComponent toBeEdited;
+       private boolean selected;
+       
+       public CornerHandle(DeserializedSubmodelComponent toBeEdited)
+       {
+               super();
+               this.toBeEdited = toBeEdited;
+               setSize(LENGTH, LENGTH);
+               initPos();
+       }
+
+       @Override
+       protected void render(GeneralGC gc)
+       {
+               gc.setBackground(Display.getCurrent().getSystemColor(selected ? SWT.COLOR_YELLOW : SWT.COLOR_DARK_GREEN));
+               gc.fillRectangle(getPosX(), getPosY(), LENGTH, LENGTH);
+       }
+
+       private void initPos()
+       {
+               Rectangle bounds = toBeEdited.getBounds();
+               double subScale = toBeEdited.getSubmodelScale();
+               moveTo(bounds.width / subScale, bounds.height / subScale);
+       }
+       
+       @Override
+       public void reqMove(double x, double y)
+       {
+               moveTo(x, y);
+       }
+       
+       @Override
+       public void onSelect()
+       {
+               selected = true;
+               callRedrawListeners();
+       }
+       
+       @Override
+       public void onDeselect()
+       {
+               selected = false;
+               callRedrawListeners();
+       }
+
+       @Override
+       protected void moveTo(double x, double y)
+       {
+               super.moveTo(x, y);
+               double subScale = toBeEdited.getSubmodelScale();
+               toBeEdited.setSize(x * subScale, y * subScale);
+       }
+       
+       @Override
+       public HandleType getType()
+       {
+               return HandleType.CORNER;
+       }
+}
\ No newline at end of file
diff --git a/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/handles/Handle.java b/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/handles/Handle.java
new file mode 100644 (file)
index 0000000..454f421
--- /dev/null
@@ -0,0 +1,142 @@
+package net.mograsim.logic.model.editor.handles;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Optional;
+
+import net.haspamelodica.swt.helper.gcs.GeneralGC;
+import net.haspamelodica.swt.helper.swtobjectwrappers.Point;
+import net.haspamelodica.swt.helper.swtobjectwrappers.Rectangle;
+import net.mograsim.logic.model.editor.Editor.ComponentInfo;
+import net.mograsim.logic.model.editor.states.EditorState;
+
+public abstract class Handle
+{
+       private final Rectangle bounds;
+       private final Collection<Runnable> redrawListeners, destroyListeners;
+       
+       public Handle()
+       {
+               redrawListeners = new ArrayList<>();
+               destroyListeners = new ArrayList<>();
+               bounds = new Rectangle(0, 0, 0, 0);
+               callRedrawListeners();
+       }
+
+       final public void render(GeneralGC gc, Rectangle visibleRegion)
+       {
+               if (bounds.intersects(visibleRegion))
+                       render(gc);
+       }
+
+       protected abstract void render(GeneralGC gc);
+
+       protected void setSize(double width, double height)
+       {
+               bounds.width = width;
+               bounds.height = height;
+               callRedrawListeners();
+       }
+
+       protected void moveTo(double x, double y)
+       {
+               bounds.x = x;
+               bounds.y = y;
+               callRedrawListeners();
+       }
+       
+       public Rectangle getBounds()
+       {
+               return new Rectangle(bounds.x, bounds.y, bounds.width, bounds.height);
+       }
+
+       public void addRedrawListener(Runnable listener)
+       {
+               redrawListeners.add(listener);
+       }
+
+       public void removeRedrawListener(Runnable listener)
+       {
+               redrawListeners.remove(listener);
+       }
+
+       protected void callRedrawListeners()
+       {
+               redrawListeners.forEach(l -> l.run());
+       }
+
+       public double getPosX()
+       {
+               return bounds.x;
+       }
+
+       public double getPosY()
+       {
+               return bounds.y;
+       }
+
+       void destroy()
+       {
+               destroyListeners.forEach(l -> l.run());
+       }
+
+       public void addDestroyListener(Runnable listener)
+       {
+               redrawListeners.add(listener);
+       }
+
+       public void removeDestroyListener(Runnable listener)
+       {
+               redrawListeners.remove(listener);
+       }
+       
+       public boolean contains(double x, double y)
+       {
+               return bounds.contains(x, y);
+       }
+       
+       public boolean contains(Point p)
+       {
+               return contains(p.x, p.y);
+       }
+       
+       /**
+        * Register a mouse click
+        * @param x Coordinate of the click in the world, not the display context
+        * @param y Coordinate of the click in the world, not the display context
+        * @return true if the click was consumed, false otherwise
+        */
+       public boolean click(double x, double y, int stateMask, EditorState state)
+       {
+               if(contains(x, y))
+                       return state.clickedHandle(new HandleClickInfo(this, stateMask));
+               return false;
+       }
+
+       //@formatter:off
+    public void reqMove(double x, double y) {}
+    public void reqDelete() {}
+    public Optional<ComponentInfo> reqCopy(Point refPoint) { return Optional.empty(); }
+    public void onSelect() {}
+    public void onDeselect() {}
+    //@formatter:on
+    
+    public abstract HandleType getType();
+    
+    public static enum HandleType
+    {
+       COMPONENT, STATIC_PIN, INTERFACE_PIN, WIRE_POINT, WIRE, CORNER;
+    }
+    
+    public static class HandleClickInfo
+    {
+       public final int stateMask;
+       public final Handle clicked;
+       
+       HandleClickInfo(Handle clicked, int stateMask)
+       {
+               this.clicked = clicked;
+               this.stateMask = stateMask;
+       }
+    }
+}
diff --git a/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/handles/HandleManager.java b/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/handles/HandleManager.java
new file mode 100644 (file)
index 0000000..f999c96
--- /dev/null
@@ -0,0 +1,391 @@
+package net.mograsim.logic.model.editor.handles;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.function.Consumer;
+import java.util.stream.Collectors;
+
+import net.haspamelodica.swt.helper.swtobjectwrappers.Point;
+import net.mograsim.logic.model.editor.Editor;
+import net.mograsim.logic.model.editor.states.EditorState;
+import net.mograsim.logic.model.model.ViewModelModifiable;
+import net.mograsim.logic.model.model.components.GUIComponent;
+import net.mograsim.logic.model.model.wires.GUIWire;
+import net.mograsim.logic.model.model.wires.MovablePin;
+import net.mograsim.logic.model.model.wires.Pin;
+
+public class HandleManager
+{
+       private final Map<Pin, StaticPinHandle> handlePerPin;
+       private final Map<Pin, InterfacePinHandle> handlePerInterfacePin;
+       private final Map<GUIWire, List<WirePointHandle>> pointHandlesPerWire;
+       private final Map<GUIWire, WireHandle> handlePerWire;
+       private final Set<Handle> handles;
+       private final Set<WirePointHandle> wirePointHandles;
+       private final Map<GUIComponent, ComponentHandle> handlePerComp;
+
+       private final Collection<Consumer<Handle>> handleAddedListeners;
+       private final Collection<Consumer<Handle>> handleRemovedListeners;
+       private final Editor editor;
+       private boolean initialized = false;
+
+       private CornerHandle cornerHandle;
+
+       public HandleManager(Editor editor)
+       {
+               this.editor = editor;
+               handlePerPin = new HashMap<>();
+               handlePerInterfacePin = new HashMap<>();
+               pointHandlesPerWire = new HashMap<>();
+               handlePerComp = new HashMap<>();
+               handles = new HashSet<>();
+               wirePointHandles = new HashSet<>();
+               handlePerWire = new HashMap<>();
+
+               handleAddedListeners = new ArrayList<>();
+               handleRemovedListeners = new ArrayList<>();
+
+               ViewModelModifiable model = editor.getSubmodel();
+
+               model.addComponentAddedListener(c -> registerComponent(c));
+
+               model.addComponentRemovedListener(c ->
+               {
+                       removeComponentHandle(c);
+               });
+
+               model.addWireAddedListener(w ->
+               {
+                       registerWire(w);
+               });
+
+               model.addWireRemovedListener(w ->
+               {
+                       removeWireHandle(w);
+                       removeWirePointHandles(w);
+               });
+       }
+
+       ////////////////////////////////////////
+       // -- Setting up initial handles -- ///
+       //////////////////////////////////////
+
+       public void init()
+       {
+               if (initialized)
+                       System.err.println("Warning! HandleManager was already initialized.");
+               else
+               {
+                       ViewModelModifiable model = editor.getSubmodel();
+                       Map<String, GUIComponent> compsByName = model.getComponentsByName();
+                       Set<GUIComponent> comps = new HashSet<>(compsByName.values());
+                       GUIComponent interfaceComp = compsByName.get("_submodelinterface");
+                       comps.remove(interfaceComp);
+                       registerInterfaceComponent(interfaceComp);
+                       comps.forEach(c -> registerComponent(c));
+                       
+                       model.getWires().forEach(w -> registerWire(w));
+                       addHandle(cornerHandle = new CornerHandle(editor.toBeEdited));
+               }
+       }
+
+       private void registerInterfaceComponent(GUIComponent c)
+       {
+               c.getPins().values().forEach(p -> addInterfacePinHandle(p));
+               c.addPinAddedListener(p -> addInterfacePinHandle(p));
+               c.addPinRemovedListener(p -> removeInterfacePinHandle(p));
+       }
+
+       private void registerComponent(GUIComponent c)
+       {
+               addComponentHandle(c);
+
+               c.getPins().values().forEach(p -> addPinHandle(p));
+
+               c.addPinAddedListener(p -> addPinHandle(p));
+               c.addPinRemovedListener(p -> removePinHandle(p));
+       }
+
+       private void registerWire(GUIWire wire)
+       {
+               wire.addPathChangedListener((w, diff) ->
+               {
+                       if(diff != 0)
+                       {
+                               if(diff > 0)
+                               {
+                                       for(int i = 0; i < diff; i++)
+                                               addWirePointHandle(w);
+                               }
+                               else
+                               {
+                                       for(int i = 0; i > diff; i--)
+                                       {
+                                               removeLastWirePointHandle(wire);
+                                       }
+                               }
+                               
+                               List<WirePointHandle> wpHandles = pointHandlesPerWire.get(w);
+                               int size = wpHandles.size();
+                               for(int i = 0; i < size; i++)
+                               {
+                                       wpHandles.get(i).setIndex(i);
+                               }
+                       }
+                       pointHandlesPerWire.get(w).forEach(h -> h.updatePos());
+               });
+               addWireHandle(wire);
+               if (wire.getPath() == null)
+                       return;
+               for (int i = 0; i < wire.getPath().length; i++)
+               {
+                       addWirePointHandle(wire);
+               }
+       }
+
+       /////////////////////////////////////
+       // -- Adding/Removing handles -- ///
+       ///////////////////////////////////
+
+       private void addComponentHandle(GUIComponent c)
+       {
+               ComponentHandle h = new ComponentHandle(c);
+               handlePerComp.put(c, h);
+               addHandle(h);
+       }
+
+       private void removeComponentHandle(GUIComponent c)
+       {
+               ComponentHandle h = handlePerComp.get(c);
+               handlePerComp.remove(c);
+               removeHandle(h);
+       }
+
+       private void addPinHandle(Pin owner)
+       {
+               StaticPinHandle h = new StaticPinHandle(owner);
+               handlePerPin.put(owner, h);
+               addHandle(h);
+       }
+
+       private void removePinHandle(Pin owner)
+       {
+               StaticPinHandle h = handlePerPin.get(owner);
+               handlePerPin.remove(owner);
+               removeHandle(h);
+       }
+
+       private void addInterfacePinHandle(Pin p)
+       {
+               //The following is not an alternative to the cast, because the new pin is not yet in the map, when the listener is called
+               //editor.toBeEdited.getSubmodelMovablePins().get(p.name);
+               MovablePin pM = (MovablePin) p;
+               InterfacePinHandle h = new InterfacePinHandle(pM, editor.toBeEdited);
+               handlePerInterfacePin.put(pM, h);
+               addHandle(h);
+       }
+
+       private void removeInterfacePinHandle(Pin p)
+       {
+               InterfacePinHandle h = handlePerInterfacePin.get(p);
+               handlePerInterfacePin.remove(p);
+               removeHandle(h);
+       }
+
+       private void addWirePointHandle(GUIWire w)
+       {
+               List<WirePointHandle> wireHandles = pointHandlesPerWire.get(w);
+               WirePointHandle h;
+               if (wireHandles != null)
+                       wireHandles.add(h = new WirePointHandle(w, wireHandles.size()));
+               else
+               {
+                       wireHandles = new ArrayList<>();
+                       h = new WirePointHandle(w, 0);
+                       wireHandles.add(h);
+                       pointHandlesPerWire.put(h.parent, wireHandles);
+               }
+               this.wirePointHandles.add(h);
+               addHandle(h);
+       }
+
+       private void removeLastWirePointHandle(GUIWire owner)
+       {
+               Handle h = pointHandlesPerWire.get(owner).remove(0);
+               wirePointHandles.remove(h);
+               removeHandle(h);
+       }
+
+       private void removeWirePointHandles(GUIWire owner)
+       {
+               if(!pointHandlesPerWire.containsKey(owner))
+                       return;
+               pointHandlesPerWire.get(owner).forEach(h ->
+               {
+                       wirePointHandles.remove(h);
+                       removeHandle(h);
+               });
+               pointHandlesPerWire.remove(owner);
+       }
+
+       private void addWireHandle(GUIWire w)
+       {
+               WireHandle h = new WireHandle(w);
+               handlePerWire.put(w, h);
+               addHandle(h);
+       }
+
+       private void removeWireHandle(GUIWire w)
+       {
+               WireHandle h = handlePerWire.get(w);
+               handlePerWire.remove(w);
+               removeHandle(h);
+       }
+
+       private void addHandle(Handle h)
+       {
+               handles.add(h);
+               callHandleAddedListeners(h);
+       }
+
+       private void removeHandle(Handle h)
+       {
+               handles.remove(h);
+               callHandleRemovedListeners(h);
+               h.destroy();
+       }
+
+       public StaticPinHandle getHandle(Pin parent)
+       {
+               return handlePerPin.get(parent);
+       }
+
+       public ComponentHandle getHandle(GUIComponent parent)
+       {
+               return handlePerComp.get(parent);
+       }
+
+       public WireHandle getHandle(GUIWire parent)
+       {
+               return handlePerWire.get(parent);
+       }
+       
+       public Handle getInterfacePinHandle(Pin p)
+       {
+               return handlePerInterfacePin.get(p);
+       }
+
+       /**
+        * @return A Collection of the registered {@link WirePointHandle}s of the specified wire
+        */
+       public Collection<WirePointHandle> getWirePointHandles(GUIWire parent)
+       {
+               return pointHandlesPerWire.get(parent).stream().collect(Collectors.toSet());
+       }
+
+       /**
+        * @return An unmodifiable view of all registered {@link Handle}s
+        */
+       public Collection<Handle> getHandles()
+       {
+               return Collections.unmodifiableCollection(handles);
+       }
+
+       /**
+        * @return An unmodifiable view of all registered {@link StaticPinHandle}s
+        */
+       public Collection<StaticPinHandle> getPinHandles()
+       {
+               return Collections.unmodifiableCollection(handlePerPin.values());
+       }
+       
+       /**
+        * @return An unmodifiable view of all registered {@link InterfacePinHandle}s
+        */
+       public Collection<InterfacePinHandle> getInterfacePinHandles()
+       {
+               return Collections.unmodifiableCollection(handlePerInterfacePin.values());
+       }
+
+       /**
+        * @return An unmodifiable view of all registered {@link ComponentHandle}s
+        */
+       public Collection<ComponentHandle> getComponentHandles()
+       {
+               return Collections.unmodifiableCollection(handlePerComp.values());
+       }
+
+       /**
+        * @return An unmodifiable view of all registered {@link WireHandle}s
+        */
+       public Collection<WireHandle> getWireHandles()
+       {
+               return Collections.unmodifiableCollection(handlePerWire.values());
+       }
+
+       /**
+        * @return An unmodifiable view of all registered {@link WirePointHandle}s
+        */
+       public Collection<WirePointHandle> getWirePointHandles()
+       {
+               return Collections.unmodifiableSet(wirePointHandles);
+       }
+
+       public void click(Point clicked, int stateMask)
+       {
+               EditorState entryState = editor.stateManager.getState();
+
+               if (!cornerHandle.click(clicked.x, clicked.y, stateMask, entryState))
+                       if (!click(handlePerPin.values(), clicked, entryState, stateMask))
+                               if (!click(handlePerInterfacePin.values(), clicked, entryState, stateMask))
+                                       if (!click(getWirePointHandles(), clicked, entryState, stateMask))
+                                               if (!click(handlePerComp.values(), clicked, entryState, stateMask))
+                                                       if (!click(getWireHandles(), clicked, entryState, stateMask))
+                                                               entryState.clickedEmpty(clicked, stateMask);
+               entryState.clicked(clicked, stateMask);
+       }
+
+       private boolean click(Collection<? extends Handle> handles, Point clicked, EditorState state, int stateMask)
+       {
+               for (Handle h : handles)
+                       if (h.click(clicked.x, clicked.y, stateMask, state))
+                               return true;
+               return false;
+       }
+
+       public void addHandleAddedListener(Consumer<Handle> c)
+       {
+               handleAddedListeners.add(c);
+       }
+
+       private void callHandleAddedListeners(Handle added)
+       {
+               handleAddedListeners.forEach(l -> l.accept(added));
+       }
+
+       public void removeHandleAddedListener(Consumer<Handle> c)
+       {
+               handleAddedListeners.remove(c);
+       }
+
+       public void addHandleRemovedListener(Consumer<Handle> c)
+       {
+               handleRemovedListeners.add(c);
+       }
+
+       private void callHandleRemovedListeners(Handle removed)
+       {
+               handleRemovedListeners.forEach(l -> l.accept(removed));
+       }
+
+       public void removeHandleRemovedListener(Consumer<Handle> c)
+       {
+               handleRemovedListeners.remove(c);
+       }
+}
diff --git a/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/handles/InterfacePinHandle.java b/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/handles/InterfacePinHandle.java
new file mode 100644 (file)
index 0000000..9eff5ce
--- /dev/null
@@ -0,0 +1,109 @@
+package net.mograsim.logic.model.editor.handles;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Display;
+
+import net.haspamelodica.swt.helper.gcs.GeneralGC;
+import net.haspamelodica.swt.helper.swtobjectwrappers.Point;
+import net.mograsim.logic.model.model.wires.MovablePin;
+import net.mograsim.logic.model.model.wires.Pin;
+import net.mograsim.logic.model.serializing.DeserializedSubmodelComponent;
+
+public class InterfacePinHandle extends PinHandle
+{
+       private final static int CIRCLE_DIAM = 4, CIRCLE_RADIUS = CIRCLE_DIAM / 2, SELECTED_CIRCLE_OFFSET = 1,
+                       SELECTED_CIRCLE_DIAM = SELECTED_CIRCLE_OFFSET * 2 + CIRCLE_DIAM;
+       private final MovablePin parent;
+       private final DeserializedSubmodelComponent owner;
+       private boolean selected = false;
+
+       public InterfacePinHandle(MovablePin parent, DeserializedSubmodelComponent pinOwner)
+       {
+               super();
+               this.parent = parent;
+               this.owner = pinOwner;
+               setSize(CIRCLE_DIAM, CIRCLE_DIAM);
+               initPos();
+       }
+
+       private void initPos()
+       {
+               Point pos = parent.getPos();
+               moveTo(pos.x - CIRCLE_RADIUS, pos.y - CIRCLE_RADIUS);
+       }
+
+       @Override
+       protected void render(GeneralGC gc)
+       {
+               double x = getPosX(), y = getPosY();
+
+               gc.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
+               gc.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_RED));
+               gc.drawText(parent.name, x + CIRCLE_DIAM, y + CIRCLE_DIAM, true);
+               if (selected)
+               {
+                       gc.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_YELLOW));
+                       gc.drawOval(x - SELECTED_CIRCLE_OFFSET, y - SELECTED_CIRCLE_OFFSET, SELECTED_CIRCLE_DIAM,
+                                       SELECTED_CIRCLE_DIAM);
+               }
+               gc.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_RED));
+               gc.fillOval(getPosX(), getPosY(), CIRCLE_DIAM, CIRCLE_DIAM);
+       }
+
+       @Override
+       public void reqMove(double x, double y)
+       {
+               moveTo(x, y);
+       }
+
+       @Override
+       public void onSelect()
+       {
+               selected = true;
+               callRedrawListeners();
+       }
+
+       @Override
+       public void onDeselect()
+       {
+               selected = false;
+               callRedrawListeners();
+       }
+
+       @Override
+       public void reqDelete()
+       {
+               owner.removeSubmodelInterface(parent.name);
+       }
+       
+       @Override
+       protected void moveTo(double x, double y)
+       {
+               super.moveTo(x, y);
+               parent.setRelPos(getCenterX(), getCenterY());
+       }
+
+       @Override
+       public double getCenterX()
+       {
+               return getPosX() + CIRCLE_RADIUS;
+       }
+
+       @Override
+       public double getCenterY()
+       {
+               return getPosY() + CIRCLE_RADIUS;
+       }
+
+       @Override
+       public HandleType getType()
+       {
+               return HandleType.INTERFACE_PIN;
+       }
+
+       @Override
+       public Pin getPin()
+       {
+               return parent;
+       }
+}
\ No newline at end of file
diff --git a/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/handles/PinHandle.java b/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/handles/PinHandle.java
new file mode 100644 (file)
index 0000000..365bec5
--- /dev/null
@@ -0,0 +1,15 @@
+package net.mograsim.logic.model.editor.handles;
+
+import net.mograsim.logic.model.model.wires.Pin;
+
+public abstract class PinHandle extends Handle
+{
+       public PinHandle()
+       {
+               super();
+       }
+
+       public abstract Pin getPin();
+       public abstract double getCenterX();
+       public abstract double getCenterY();
+}
diff --git a/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/handles/StaticPinHandle.java b/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/handles/StaticPinHandle.java
new file mode 100644 (file)
index 0000000..7c3f523
--- /dev/null
@@ -0,0 +1,61 @@
+package net.mograsim.logic.model.editor.handles;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Display;
+
+import net.haspamelodica.swt.helper.gcs.GeneralGC;
+import net.haspamelodica.swt.helper.swtobjectwrappers.Point;
+import net.mograsim.logic.model.model.wires.Pin;
+
+public class StaticPinHandle extends PinHandle
+{
+       private final static int CIRCLE_DIAM = 2;
+       private final static int CIRCLE_RADIUS = 1;
+       private final Pin parent;
+
+       public StaticPinHandle(Pin parent)
+       {
+               super();
+               this.parent = parent;
+               setSize(CIRCLE_DIAM, CIRCLE_DIAM);
+               parent.addPinMovedListener((p) -> updatePos());
+               updatePos();
+       }
+
+       @Override
+       protected void render(GeneralGC gc)
+       {
+               gc.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_DARK_GREEN));
+               gc.fillOval(getPosX(), getPosY(), CIRCLE_DIAM, CIRCLE_DIAM);
+       }
+
+       private void updatePos()
+       {
+               Point pos = parent.getPos();
+               moveTo(pos.x - CIRCLE_RADIUS, pos.y - CIRCLE_RADIUS);
+       }
+
+       @Override
+       public double getCenterX()
+       {
+               return getPosX() + CIRCLE_RADIUS;
+       }
+       
+       @Override
+       public double getCenterY()
+       {
+               return getPosY() + CIRCLE_RADIUS;
+       }
+       
+       @Override
+       public HandleType getType()
+       {
+               return HandleType.STATIC_PIN;
+       }
+
+       @Override
+       public Pin getPin()
+       {
+               return parent;
+       }
+}
\ No newline at end of file
diff --git a/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/handles/WireHandle.java b/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/handles/WireHandle.java
new file mode 100644 (file)
index 0000000..dcb9451
--- /dev/null
@@ -0,0 +1,161 @@
+package net.mograsim.logic.model.editor.handles;
+
+import java.util.Optional;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Display;
+
+import net.haspamelodica.swt.helper.gcs.GeneralGC;
+import net.haspamelodica.swt.helper.swtobjectwrappers.Point;
+import net.haspamelodica.swt.helper.swtobjectwrappers.Rectangle;
+import net.mograsim.logic.model.editor.states.EditorState;
+import net.mograsim.logic.model.model.wires.GUIWire;
+import net.mograsim.logic.model.model.wires.GUIWire.PathChangedListener;
+
+public class WireHandle extends Handle implements PathChangedListener
+{
+       private boolean selected = false;
+       private final static double WIDTH = 2.0;
+       private final static double WIDTH_SQUARED = WIDTH * WIDTH;
+       public final GUIWire parent;
+
+       public WireHandle(GUIWire parent)
+       {
+               this.parent = parent;
+               parent.addPathChangedListener(this);
+               updateBounds();
+       }
+       
+       @Override
+       void destroy()
+       {
+               super.destroy();
+               parent.removePathChangedListener(this);
+       }
+
+       public void updateBounds()
+       {
+               Rectangle r = parent.getBounds();
+               moveTo(r.x, r.y);
+               setSize(r.width, r.height);
+       }
+       
+       @Override
+       public void render(GeneralGC gc)
+       {
+               if(selected)
+               {
+                       gc.setLineWidth(WIDTH);
+                       gc.setForeground(Display.getDefault().getSystemColor(SWT.COLOR_YELLOW));
+                       gc.drawPolyline(parent.getEffectivePath());
+               }
+       }
+               
+       @Override
+       public void onSelect()
+       {
+               selected = true;
+               callRedrawListeners();
+       }
+
+       @Override
+       public void onDeselect()
+       {
+               selected = false;
+               callRedrawListeners();
+       }
+       
+       @Override
+       public void reqDelete()
+       {
+               parent.destroy();
+       }
+       
+       @Override
+       public boolean contains(double x, double y)
+       {
+               return click(parent, x, y).isPresent();
+       }
+       
+       @Override
+       public boolean click(double x, double y, int stateMask, EditorState state)
+       {
+               Optional<WireClickData> op = click(parent, x, y);
+               if(op.isEmpty())
+                       return false;
+               WireClickData data = op.get();
+               return state.clickedHandle(new WireHandleClickInfo(this, data.segment, data.pos, stateMask));
+       }
+       
+       public static class WireHandleClickInfo extends HandleClickInfo
+       {
+               public final int segment;
+               public final Point posOnWire;
+               WireHandleClickInfo(WireHandle clicked, int segment, Point posOnWire, int stateMask)
+               {
+                       super(clicked, stateMask);
+                       this.segment = segment;
+                       this.posOnWire = posOnWire;
+               }
+               
+       }
+       
+       private static Optional<WireClickData> click(GUIWire w, double x, double y)
+       {
+               Rectangle modifiedBounds = w.getBounds();
+               modifiedBounds.x -= WIDTH;
+               modifiedBounds.y -= WIDTH;
+               modifiedBounds.width += WIDTH * 2;
+               modifiedBounds.height += WIDTH * 2;
+               if (modifiedBounds.contains(x, y))
+               {
+                       double[] effectivePath = w.getEffectivePath();
+                       for (int i = 3; i < effectivePath.length; i += 2)
+                       {
+                               double a1 = effectivePath[i - 3], a2 = effectivePath[i - 2], b1 = effectivePath[i - 1],
+                                               b2 = effectivePath[i], r1 = b2 - a2, r2 = a1 - b1;
+
+                               double f = ((x - a1) * r2 + (a2 - y) * r1) / (-r2 * r2 - r1 * r1);
+                               if (f >= 0 && f <= 1)
+                               {
+                                       double e1 = a1 + f * (b1 - a1), e2 = a2 + f * (b2 - a2);
+                                       r1 = e1 - x;
+                                       r2 = e2 - y;
+                                       if (r1 * r1 + r2 * r2 <= WIDTH_SQUARED)
+                                               return Optional.of(new WireClickData(new Point(e1, e2), (i / 2) - 1));
+                               }
+                       }
+               }
+               return Optional.empty();
+       }
+
+       private final static class WireClickData
+       {
+               WireClickData(Point pos, int segment)
+               {
+                       this.pos = pos;
+                       this.segment = segment;
+               }
+
+               /**
+                * Position on the wire that is closest to the click
+                */
+               public final Point pos;
+               /**
+                * Segment of the wire that the {@link Point} pos is on
+                */
+               public final int segment;
+       }
+       
+       @Override
+       public HandleType getType()
+       {
+               return HandleType.WIRE;
+       }
+
+       @Override
+       public void pathChanged(GUIWire wire, int diff)
+       {
+               updateBounds();
+       }
+}
diff --git a/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/handles/WirePointHandle.java b/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/handles/WirePointHandle.java
new file mode 100644 (file)
index 0000000..2457579
--- /dev/null
@@ -0,0 +1,85 @@
+package net.mograsim.logic.model.editor.handles;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Display;
+
+import net.haspamelodica.swt.helper.gcs.GeneralGC;
+import net.haspamelodica.swt.helper.swtobjectwrappers.Point;
+import net.mograsim.logic.core.wires.Wire;
+import net.mograsim.logic.model.model.wires.GUIWire;
+
+public class WirePointHandle extends Handle
+{
+       private final static int END_OFFSET = 4;
+       private boolean selected = false;
+       public final GUIWire parent;
+       
+       private int pointIndex;
+
+       public WirePointHandle(GUIWire parent, int pointIndex)
+       {
+               super();
+               this.parent = parent;
+               this.pointIndex = pointIndex;
+               setSize(END_OFFSET, END_OFFSET);
+               Point pathPoint = parent.getPathPoint(pointIndex);
+               moveTo(pathPoint.x, pathPoint.y);
+       }
+
+       void updatePos()
+       {
+               Point p = parent.getPathPoint(pointIndex);
+               moveTo(p.x, p.y);
+       }
+       
+       @Override
+       public void render(GeneralGC gc)
+       {
+               gc.setLineWidth(1.0);
+               gc.setForeground(Display.getDefault().getSystemColor(selected ? SWT.COLOR_YELLOW : SWT.COLOR_BLUE));
+               gc.drawLine(getPosX(), getPosY(), getPosX() + END_OFFSET, getPosY() + END_OFFSET);
+       }
+
+       @Override
+       public void reqMove(double x, double y)
+       {
+               parent.setPathPoint(new Point(x, y), pointIndex);
+       }
+       
+       @Override
+       public void onSelect()
+       {
+               selected = true;
+               callRedrawListeners();
+       }
+
+       @Override
+       public void onDeselect()
+       {
+               selected = false;
+               callRedrawListeners();
+       }
+       
+       @Override
+       public void reqDelete()
+       {
+               parent.removePathPoint(pointIndex);
+       }
+       
+       @Override
+       public HandleType getType()
+       {
+               return HandleType.WIRE_POINT;
+       }
+
+       /**
+        * Sets the index of the {@link Point} within the parent {@link Wire}s path that is controlled by this handle
+        * @param index Index of the Point in the Wires path.
+        * @throws IndexOutOfBoundsException
+        */
+       public void setIndex(int index)
+       {
+               this.pointIndex = index;
+               updatePos();
+       }
+}
diff --git a/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/states/BoxSelectionState.java b/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/states/BoxSelectionState.java
new file mode 100644 (file)
index 0000000..516f8e6
--- /dev/null
@@ -0,0 +1,91 @@
+package net.mograsim.logic.model.editor.states;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Display;
+
+import net.haspamelodica.swt.helper.swtobjectwrappers.Point;
+import net.haspamelodica.swt.helper.swtobjectwrappers.Rectangle;
+import net.haspamelodica.swt.helper.zoomablecanvas.ZoomableCanvas.ZoomedRenderer;
+import net.mograsim.logic.model.editor.Editor;
+import net.mograsim.logic.model.editor.Selection;
+import net.mograsim.logic.model.editor.handles.Handle;
+
+public class BoxSelectionState extends EditorState
+{
+       private Point origin;
+       private double mX, mY;
+
+       private final ZoomedRenderer boxRenderer = gc ->
+       {
+               if (origin != null)
+               {
+                       gc.setLineWidth(0.5);
+                       gc.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_DARK_YELLOW));
+                       gc.drawRectangle(origin.x, origin.y, mX - origin.x, mY - origin.y);
+               }
+       };
+
+       public BoxSelectionState(Editor editor, StateManager manager)
+       {
+               super(editor, manager);
+       }
+
+       @Override
+       public void onEntry()
+       {
+               editor.gui.logicCanvas.addZoomedRenderer(boxRenderer);
+               editor.gui.logicCanvas.redrawThreadsafe();
+       }
+
+       @Override
+       public void onExit()
+       {
+               editor.gui.logicCanvas.removeZoomedRenderer(boxRenderer);
+               editor.gui.logicCanvas.redrawThreadsafe();
+       }
+
+       @Override
+       public void boxSelect()
+       {
+               manager.setState(new SelectionState(editor, manager));
+       }
+
+       @Override
+       public void clicked(Point clicked, int stateMask)
+       {
+               if (origin == null)
+               {
+                       origin = new Point(clicked.x, clicked.y);
+                       mX = clicked.x;
+                       mY = clicked.y;
+               } else
+               {
+                       Selection s = editor.getSelection();
+                       s.clear();
+                       boolean leftToRight = mX > origin.x, topToBottom = mY > origin.y;
+                       double x = leftToRight ? origin.x : mX, y = topToBottom ? origin.y : mY,
+                                       width = leftToRight ? mX - origin.x : origin.x - mX,
+                                       height = topToBottom ? mY - origin.y : origin.y - mY;
+
+                       Rectangle selected = new Rectangle(x, y, width, height);
+                       for (Handle h : editor.handleManager.getHandles())
+                       {
+                               Rectangle hBounds = h.getBounds();
+                               if (selected.contains(hBounds.x, hBounds.y)
+                                               && selected.contains(hBounds.x + hBounds.width, hBounds.y + hBounds.height))
+                               {
+                                       s.add(h);
+                               }
+                       }
+                       manager.setState(new SelectionState(editor, manager));
+               }
+       }
+
+       @Override
+       public void mouseMoved(double x, double y)
+       {
+               mX = x;
+               mY = y;
+               editor.gui.logicCanvas.redrawThreadsafe();
+       }
+}
diff --git a/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/states/CreateWireState.java b/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/states/CreateWireState.java
new file mode 100644 (file)
index 0000000..e955d8a
--- /dev/null
@@ -0,0 +1,85 @@
+package net.mograsim.logic.model.editor.states;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+
+import net.haspamelodica.swt.helper.swtobjectwrappers.Point;
+import net.haspamelodica.swt.helper.zoomablecanvas.ZoomableCanvas.ZoomedRenderer;
+import net.mograsim.logic.model.editor.Editor;
+import net.mograsim.logic.model.editor.handles.PinHandle;
+import net.mograsim.logic.model.editor.handles.Handle.HandleClickInfo;
+
+public class CreateWireState extends EditorState
+{
+       private final PinHandle origin;
+       private double mX, mY;
+       private ZoomedRenderer drawLine;
+
+       public CreateWireState(Editor session, StateManager manager, PinHandle origin)
+       {
+               super(session, manager);
+               this.origin = origin;
+               mX = origin.getCenterX();
+               mY = origin.getCenterY();
+       }
+
+       @Override
+       public void mouseMoved(double x, double y)
+       {
+               this.mX = x;
+               this.mY = y;
+               editor.gui.logicCanvas.redraw();
+       }
+
+       @Override
+       public void onEntry()
+       {
+               editor.getSelection().clear();
+               drawLine = gc ->
+               {
+                       gc.setLineWidth(1);
+                       gc.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_GREEN));
+                       gc.drawLine((int) origin.getCenterX(), (int) origin.getCenterY(), (int) mX, (int) mY);
+               };
+               editor.gui.logicCanvas.addZoomedRenderer(drawLine);
+               editor.gui.logicCanvas.redraw();
+       }
+
+       @Override
+       public void onExit()
+       {
+               editor.gui.logicCanvas.removeZoomedRenderer(drawLine);
+               editor.gui.logicCanvas.redraw();
+       }
+
+       @Override
+       public boolean clickedHandle(HandleClickInfo handleClickInfo)
+       {
+               switch (handleClickInfo.clicked.getType())
+               {
+               case INTERFACE_PIN:
+               case STATIC_PIN:
+                       try
+                       {
+                               editor.addWire(origin, (PinHandle) handleClickInfo.clicked);
+                       } 
+                       catch (IllegalArgumentException e)
+                       {
+                               Shell tmp = new Shell(Display.getCurrent());
+                               editor.dialogManager.openWarningDialog("Warning!", e.getMessage());
+                               tmp.dispose();
+                       }
+                       break;
+               default:
+                       return false;
+               }
+               return true;
+       }
+
+       @Override
+       public void clicked(Point clicked, int stateMask)
+       {
+               manager.setState(new SelectionState(editor, manager));
+       }
+}
diff --git a/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/states/EditorState.java b/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/states/EditorState.java
new file mode 100644 (file)
index 0000000..05e05d8
--- /dev/null
@@ -0,0 +1,36 @@
+package net.mograsim.logic.model.editor.states;
+
+import net.haspamelodica.swt.helper.swtobjectwrappers.Point;
+import net.mograsim.logic.model.editor.Editor;
+import net.mograsim.logic.model.editor.handles.InterfacePinHandle;
+import net.mograsim.logic.model.editor.handles.Handle.HandleClickInfo;
+
+public abstract class EditorState
+{
+       protected final Editor editor;
+       protected final StateManager manager;
+
+       public EditorState(Editor session, StateManager manager)
+       {
+               this.editor = session;
+               this.manager = manager;
+       }
+
+       //@formatter:off
+    public void add() {}
+    public void delete() {}
+    public void copy() {}
+    public void paste() {}
+    public void duplicate() {}
+    public void grab() {}
+    public void mouseMoved(double x, double y) {}    
+    public void select(Point pos, boolean additive) {}
+    public void boxSelect() {}
+    public void onEntry() {}
+    public void onExit() {}
+       public void clicked(InterfacePinHandle interfacePinHandle, int stateMask) {}
+       public void clickedEmpty(Point clicked, int stateMask) {}
+       public void clicked(Point clicked, int stateMask) {}
+       public boolean clickedHandle(HandleClickInfo handleClickInfo) { return false; }
+       //@formatter:on
+}
diff --git a/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/states/GrabState.java b/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/states/GrabState.java
new file mode 100644 (file)
index 0000000..7369164
--- /dev/null
@@ -0,0 +1,41 @@
+package net.mograsim.logic.model.editor.states;
+
+import java.util.Map;
+
+import net.haspamelodica.swt.helper.swtobjectwrappers.Point;
+import net.mograsim.logic.model.editor.Editor;
+import net.mograsim.logic.model.editor.handles.Handle;
+
+public class GrabState extends EditorState
+{
+       private Map<Handle, Point> offsets;
+       
+       public GrabState(Editor editor, StateManager manager)
+       {
+               super(editor, manager);
+       }
+
+       @Override
+       public void onEntry()
+       {
+                offsets = editor.getSelection().calculateOffsets();
+       }
+       
+       @Override
+       public void grab()
+       {
+               manager.setState(new SelectionState(editor, manager));
+       }
+
+       @Override
+       public void mouseMoved(double x, double y)
+       {
+               editor.moveHandles(x, y, offsets);
+       }
+
+       @Override
+       public void clicked(Point clicked, int stateMask)
+       {
+               manager.setState(new SelectionState(editor, manager));
+       }
+}
diff --git a/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/states/SelectionState.java b/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/states/SelectionState.java
new file mode 100644 (file)
index 0000000..446635e
--- /dev/null
@@ -0,0 +1,181 @@
+package net.mograsim.logic.model.editor.states;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Display;
+
+import net.haspamelodica.swt.helper.swtobjectwrappers.Point;
+import net.haspamelodica.swt.helper.zoomablecanvas.ZoomableCanvas.ZoomedRenderer;
+import net.mograsim.logic.model.editor.Editor;
+import net.mograsim.logic.model.editor.Selection;
+import net.mograsim.logic.model.editor.DialogManager.InteractiveDialog;
+import net.mograsim.logic.model.editor.handles.Handle;
+import net.mograsim.logic.model.editor.handles.PinHandle;
+import net.mograsim.logic.model.editor.handles.WireHandle;
+import net.mograsim.logic.model.editor.handles.Handle.HandleClickInfo;
+import net.mograsim.logic.model.editor.handles.WireHandle.WireHandleClickInfo;
+import net.mograsim.logic.model.model.wires.MovablePin;
+import net.mograsim.logic.model.model.wires.Pin;
+
+public class SelectionState extends EditorState
+{
+       private final ZoomedRenderer outlineRenderer = gc ->
+       {
+               if (editor.getSelection().size() > 1)
+               {
+                       gc.setLineWidth(1);
+                       gc.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_DARK_YELLOW));
+                       gc.drawRectangle(editor.getSelection().getBounds());
+               }
+       };
+
+       public SelectionState(Editor editor, StateManager manager)
+       {
+               super(editor, manager);
+       }
+
+       @Override
+       public void add()
+       {
+               Point curserPos = editor.getWorldMousePosition();
+               editor.addComponent(curserPos.x, curserPos.y);
+       }
+
+       @Override
+       public void delete()
+       {
+               editor.deleteSelection();
+       }
+
+       @Override
+       public void copy()
+       {
+               editor.copy();
+       }
+
+       @Override
+       public void paste()
+       {
+               Point curserPos = editor.getWorldMousePosition();
+               editor.paste(curserPos.x, curserPos.y);
+       }
+
+       @Override
+       public void duplicate()
+       {
+               editor.duplicate();
+       }
+
+       @Override
+       public void grab()
+       {
+               if (!editor.getSelection().isEmpty())
+                       manager.setState(new GrabState(editor, manager));
+       }
+
+       @Override
+       public void boxSelect()
+       {
+               manager.setState(new BoxSelectionState(editor, manager));
+       }
+
+       @Override
+       public void onEntry()
+       {
+               editor.gui.logicCanvas.addZoomedRenderer(outlineRenderer);
+               editor.gui.logicCanvas.redrawThreadsafe();
+       }
+
+       @Override
+       public void onExit()
+       {
+               editor.gui.logicCanvas.removeZoomedRenderer(outlineRenderer);
+               editor.gui.logicCanvas.redrawThreadsafe();
+       }
+
+       @Override
+       public void clickedEmpty(Point clicked, int stateMask)
+       {
+               editor.getSelection().clear();
+               if ((stateMask & SWT.ALT) == SWT.ALT)
+               {
+                       InteractiveDialog pinAdd = new InteractiveDialog("Add Pin...", "Add", "Cancel", "Name", "Logic Width");
+                       pinAdd.open();
+                       if (pinAdd.getState().equals(InteractiveDialog.InteractiveDialogState.ACCEPTED))
+                       {
+                               try
+                               {
+                                       Pin p = editor.toBeEdited.addSubmodelInterface(new MovablePin(editor.toBeEdited, pinAdd.getText(),
+                                                       Integer.parseInt(pinAdd.getText(1)), clicked.x, clicked.y));
+                                       editor.handleManager.getInterfacePinHandle(p).reqMove(clicked.x, clicked.y);
+                               } catch (NumberFormatException e)
+                               {
+                                       editor.dialogManager.openWarningDialog("Failed to create Pin!", "Bit width must be a number!");
+                               }
+                       }
+               }
+       }
+
+       @Override
+       public boolean clickedHandle(HandleClickInfo handleClickInfo)
+       {
+               switch (handleClickInfo.clicked.getType())
+               {
+               case INTERFACE_PIN:
+                       if ((handleClickInfo.stateMask & SWT.CTRL) == SWT.CTRL)
+                       {
+                               manager.setState(new CreateWireState(editor, manager, (PinHandle) handleClickInfo.clicked));
+                               break;
+                       }
+               case CORNER:
+               case COMPONENT:
+               case WIRE_POINT:
+                       boolean additive = (handleClickInfo.stateMask & SWT.SHIFT) == SWT.SHIFT;
+                       select(handleClickInfo.clicked, additive);
+                       break;
+               case STATIC_PIN:
+                       if ((handleClickInfo.stateMask & SWT.CTRL) == SWT.CTRL)
+                               manager.setState(new CreateWireState(editor, manager, (PinHandle) handleClickInfo.clicked));
+                       else
+                               return false;
+                       break;
+               case WIRE:
+                       if ((handleClickInfo.stateMask & SWT.CTRL) == SWT.CTRL)
+                       {
+                               WireHandleClickInfo info = (WireHandleClickInfo) handleClickInfo;
+                               WireHandle clicked = (WireHandle) info.clicked;
+                               clicked.parent.insertPathPoint(info.posOnWire, info.segment);
+                       } else
+                       {
+                               additive = (handleClickInfo.stateMask & SWT.SHIFT) == SWT.SHIFT;
+                               select(handleClickInfo.clicked, additive);
+                       }
+                       break;
+               default:
+                       return false;
+               }
+               return true;
+       }
+
+       private void select(Handle h, boolean additive)
+       {
+               Selection sel = editor.getSelection();
+               if (sel.contains(h))
+                       if (additive)
+                               sel.remove(h);
+                       else
+                       {
+                               if (editor.getSelection().size() > 1)
+                               {
+                                       sel.clear();
+                                       sel.add(h);
+                               } else
+                                       sel.clear();
+                       }
+               else
+               {
+                       if (!additive)
+                               sel.clear();
+                       sel.add(h);
+               }
+       }
+}
diff --git a/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/states/StateManager.java b/net.mograsim.logic.model.editor/src/net/mograsim/logic/model/editor/states/StateManager.java
new file mode 100644 (file)
index 0000000..d4b3fc4
--- /dev/null
@@ -0,0 +1,78 @@
+package net.mograsim.logic.model.editor.states;
+
+import net.haspamelodica.swt.helper.swtobjectwrappers.Point;
+import net.mograsim.logic.model.editor.Editor;
+import net.mograsim.logic.model.editor.handles.Handle.HandleClickInfo;
+
+public class StateManager
+{
+       private EditorState state;
+
+       public StateManager(Editor session)
+       {
+               state = new SelectionState(session, this);
+               state.onEntry();
+       }
+
+       public EditorState getState()
+       {
+               return state;
+       }
+
+       public void setState(EditorState state)
+       {
+               this.state.onExit();
+               this.state = state;
+               state.onEntry();
+       }
+
+       public void add()
+       {
+               state.add();
+       }
+
+       public void delete()
+       {
+               state.delete();
+       }
+
+       public void copy()
+       {
+               state.copy();
+       }
+
+       public void paste()
+       {
+               state.paste();
+       }
+
+       public void duplicate()
+       {
+               state.duplicate();
+       }
+
+       public void grab()
+       {
+               state.grab();
+       }
+
+       public void mouseMoved(double x, double y)
+       {
+               state.mouseMoved(x, y);
+       }
+
+       public void select(Point pos, boolean additive)
+       {
+               state.select(pos, additive);
+       }
+
+       public boolean clickedHandle(HandleClickInfo handleClickInfo)
+       {
+               return state.clickedHandle(handleClickInfo);
+       }
+
+       public void boxSelect()
+       {
+               state.boxSelect();
+       }
+}
index c1070e5..d9b7cb9 100644 (file)
@@ -2,7 +2,9 @@ package net.mograsim.logic.model.model.wires;
 
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.HashSet;
 import java.util.List;
+import java.util.Set;
 
 import org.eclipse.swt.SWT;
 
@@ -58,6 +60,8 @@ public class GUIWire
 
        private final List<Runnable> redrawListeners;
 
+       private final Set<PathChangedListener> pathChangedListeners;
+
        /**
         * A LogicObserver calling redrawListeners. Used for logic model bindings.
         */
@@ -146,6 +150,7 @@ public class GUIWire
         */
        public GUIWire(ViewModelModifiable model, Pin pin1, Pin pin2, Point... path)
        {
+               pathChangedListeners = new HashSet<>();
                logicObs = (i) -> callRedrawListeners();
                this.model = model;
                this.logicWidth = pin1.logicWidth;
@@ -354,6 +359,24 @@ public class GUIWire
        public void removeRedrawListener(Runnable listener) {redrawListeners         .remove(listener);}
 
        private void callRedrawListeners() {redrawListeners.forEach(l -> l.run());}
+       
+       public void addPathChangedListener(PathChangedListener l) { pathChangedListeners.add(l); }
+
+       public void removePathChangedListener(PathChangedListener l) { pathChangedListeners.remove(l); }
+
+       public void callPathChangedListeners(int diff) { pathChangedListeners.forEach(l -> l.pathChanged(this, diff)); }
+       
+       @FunctionalInterface
+       public static interface PathChangedListener
+       {
+               /**
+                * Called whenever the {@link Wire}'s path changes
+                * 
+                * @param wire The wire which had its path changed
+                * @param diff The length difference between before and after the path change.
+                */
+               public void pathChanged(GUIWire wire, int diff);
+       }
        // @formatter:on
 
        @Override
@@ -361,4 +384,65 @@ public class GUIWire
        {
                return "GUIWire [" + pin1 + "---" + pin2 + ", value=" + (end == null ? "null" : end.getValues()) + "]";
        }
+
+       public void setPath(Point[] path)
+       {
+               int diff = (path == null ? 0 : path.length) - (this.path == null ? 0 : this.path.length);
+               this.path = path == null ? null : path.clone();
+               recalculateEffectivePath();
+               callPathChangedListeners(diff);
+               callRedrawListeners();
+       }
+
+       public void setPathPoint(Point p, int index)
+       {
+               path[index] = p;
+               recalculateEffectivePath();
+               callPathChangedListeners(0);
+               callRedrawListeners();
+       }
+
+       public void insertPathPoint(Point p, int index)
+       {
+               Point[] path = getPath();
+               if (path == null)
+                       setPath(new Point[] { p });
+               else
+               {
+                       Point[] newPath = new Point[path.length + 1];
+                       System.arraycopy(path, 0, newPath, 0, index);
+                       if (index < path.length)
+                               System.arraycopy(path, index, newPath, index + 1, path.length - index);
+                       newPath[index] = p;
+                       setPath(newPath);
+               }
+       }
+
+       public void removePathPoint(int index)
+       {
+               Point[] path = getPath();
+               Point[] newPath = new Point[path.length - 1];
+               System.arraycopy(path, 0, newPath, 0, index);
+               if (index < path.length - 1)
+                       System.arraycopy(path, index + 1, newPath, index, path.length - index - 1);
+               setPath(newPath);
+       }
+
+       /**
+        * @throws IndexOutOfBoundsException
+        */
+       public Point getPathPoint(int index)
+       {
+               return path[index];
+       }
+
+       public int getPathLength()
+       {
+               return path.length;
+       }
+
+       public double[] getEffectivePath()
+       {
+               return effectivePath.clone();
+       }
 }
\ No newline at end of file
index 1ec5144..adf2433 100644 (file)
@@ -1,5 +1,7 @@
 package net.mograsim.logic.model.serializing;
 
+import java.util.Map;
+
 import net.haspamelodica.swt.helper.gcs.GeneralGC;
 import net.haspamelodica.swt.helper.swtobjectwrappers.Rectangle;
 import net.mograsim.logic.model.model.ViewModelModifiable;
@@ -60,8 +62,26 @@ public class DeserializedSubmodelComponent extends SubmodelComponent
        }
 
        @Override
-       protected Pin addSubmodelInterface(MovablePin supermodelPin)
+       public Pin addSubmodelInterface(MovablePin supermodelPin)
        {
                return super.addSubmodelInterface(supermodelPin);
        }
+
+       @Override
+       public double getSubmodelScale()
+       {
+               return super.getSubmodelScale();
+       }
+
+       @Override
+       public Map<String, MovablePin> getSubmodelMovablePins()
+       {
+               return super.getSubmodelMovablePins();
+       }
+
+       @Override
+       public void removeSubmodelInterface(String name)
+       {
+               super.removeSubmodelInterface(name);
+       }
 }
\ No newline at end of file
index 874a8a8..1c6a484 100644 (file)
@@ -2,6 +2,7 @@ package net.mograsim.logic.model.serializing;
 
 import java.io.IOException;
 import java.io.InputStream;
+import java.util.Collection;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -51,6 +52,11 @@ public class IndirectGUIComponentCreator
                standardComponentIDs.put(standardComponentID, associatedComponentID);
        }
 
+       public static Collection<String> getStandardComponentIDs()
+       {
+               return standardComponentIDs.keySet();
+       }
+
        public static void setComponentSupplier(String className, ComponentSupplier componentSupplier)
        {
                componentSuppliers.put(className, componentSupplier);