Providing json examples
authorFabian Stemmler <stemmler@in.tum.de>
Mon, 17 Jun 2019 15:52:22 +0000 (17:52 +0200)
committerFabian Stemmler <stemmler@in.tum.de>
Mon, 17 Jun 2019 15:52:22 +0000 (17:52 +0200)
The format is basically finished, only the InnerComponentParams might
still changed.

net.mograsim.logic.ui/FullAdder.json [new file with mode: 0644]
net.mograsim.logic.ui/HalfAdder.json [new file with mode: 0644]
net.mograsim.logic.ui/Test.json [new file with mode: 0644]

diff --git a/net.mograsim.logic.ui/FullAdder.json b/net.mograsim.logic.ui/FullAdder.json
new file mode 100644 (file)
index 0000000..4740f05
--- /dev/null
@@ -0,0 +1,180 @@
+{
+  "type": "SimpleRectangularSubmodelComponent",
+  "width": 35.0,
+  "height": 30.0,
+  "interfacePins": [
+    {
+      "location": {
+        "x": 0.0,
+        "y": 5.0
+      },
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 15.0
+      },
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 25.0
+      },
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 5.0
+      },
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 15.0
+      },
+      "logicWidth": 1
+    }
+  ],
+  "composition": {
+    "innerScale": 0.4,
+    "subComps": [
+      {
+        "pos": {
+          "x": 5.0,
+          "y": 40.0
+        },
+        "type": "class:net.mograsim.logic.ui.model.components.mi.nandbased.GUIhalfadder",
+        "logicWidth": 1
+      },
+      {
+        "pos": {
+          "x": 45.0,
+          "y": 7.5
+        },
+        "type": "class:net.mograsim.logic.ui.model.components.mi.nandbased.GUIhalfadder",
+        "logicWidth": 1
+      },
+      {
+        "pos": {
+          "x": 57.5,
+          "y": 40.0
+        },
+        "type": "class:net.mograsim.logic.ui.model.components.GUINandGate",
+        "logicWidth": 1
+      }
+    ],
+    "innerWires": [
+      {
+        "pin1": {
+          "compId": 0,
+          "pinIndex": 0
+        },
+        "pin2": {
+          "compId": 2,
+          "pinIndex": 0
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compId": 0,
+          "pinIndex": 1
+        },
+        "pin2": {
+          "compId": 1,
+          "pinIndex": 0
+        }
+      },
+      {
+        "pin1": {
+          "compId": 0,
+          "pinIndex": 2
+        },
+        "pin2": {
+          "compId": 1,
+          "pinIndex": 1
+        }
+      },
+      {
+        "pin1": {
+          "compId": 1,
+          "pinIndex": 2
+        },
+        "pin2": {
+          "compId": 2,
+          "pinIndex": 1
+        }
+      },
+      {
+        "pin1": {
+          "compId": 1,
+          "pinIndex": 3
+        },
+        "pin2": {
+          "compId": 3,
+          "pinIndex": 2
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compId": 2,
+          "pinIndex": 2
+        },
+        "pin2": {
+          "compId": 0,
+          "pinIndex": 3
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compId": 2,
+          "pinIndex": 3
+        },
+        "pin2": {
+          "compId": 3,
+          "pinIndex": 1
+        },
+        "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": {
+          "compId": 3,
+          "pinIndex": 0
+        },
+        "pin2": {
+          "compId": 0,
+          "pinIndex": 4
+        }
+      }
+    ]
+  },
+  "specialized": {
+    "input_count": 3,
+    "label": "GUIfulladder",
+    "logic_width": 1,
+    "output_count": 2
+  }
+}
\ No newline at end of file
diff --git a/net.mograsim.logic.ui/HalfAdder.json b/net.mograsim.logic.ui/HalfAdder.json
new file mode 100644 (file)
index 0000000..99fd0f4
--- /dev/null
@@ -0,0 +1,304 @@
+{
+  "type": "SimpleRectangularSubmodelComponent",
+  "width": 35.0,
+  "height": 20.0,
+  "interfacePins": [
+    {
+      "location": {
+        "x": 0.0,
+        "y": 5.0
+      },
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 0.0,
+        "y": 15.0
+      },
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 5.0
+      },
+      "logicWidth": 1
+    },
+    {
+      "location": {
+        "x": 35.0,
+        "y": 15.0
+      },
+      "logicWidth": 1
+    }
+  ],
+  "composition": {
+    "innerScale": 0.4,
+    "subComps": [
+      {
+        "pos": {
+          "x": 10.0,
+          "y": 15.0
+        },
+        "type": "class:net.mograsim.logic.ui.model.components.GUINandGate",
+        "logicWidth": 1
+      },
+      {
+        "pos": {
+          "x": 40.0,
+          "y": 2.5
+        },
+        "type": "class:net.mograsim.logic.ui.model.components.GUINandGate",
+        "logicWidth": 1
+      },
+      {
+        "pos": {
+          "x": 40.0,
+          "y": 27.5
+        },
+        "type": "class:net.mograsim.logic.ui.model.components.GUINandGate",
+        "logicWidth": 1
+      },
+      {
+        "pos": {
+          "x": 65.0,
+          "y": 2.5
+        },
+        "type": "class:net.mograsim.logic.ui.model.components.GUINandGate",
+        "logicWidth": 1
+      },
+      {
+        "pos": {
+          "x": 4.0,
+          "y": 11.5
+        },
+        "type": "class:net.mograsim.logic.ui.model.wires.WireCrossPoint",
+        "logicWidth": 1
+      },
+      {
+        "pos": {
+          "x": 4.0,
+          "y": 36.5
+        },
+        "type": "class:net.mograsim.logic.ui.model.wires.WireCrossPoint",
+        "logicWidth": 1
+      },
+      {
+        "pos": {
+          "x": 34.0,
+          "y": 24.0
+        },
+        "type": "class:net.mograsim.logic.ui.model.wires.WireCrossPoint",
+        "logicWidth": 1
+      }
+    ],
+    "innerWires": [
+      {
+        "pin1": {
+          "compId": 0,
+          "pinIndex": 0
+        },
+        "pin2": {
+          "compId": 5,
+          "pinIndex": 0
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compId": 5,
+          "pinIndex": 0
+        },
+        "pin2": {
+          "compId": 2,
+          "pinIndex": 1
+        },
+        "path": [
+          {
+            "x": 5.0,
+            "y": 7.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compId": 5,
+          "pinIndex": 0
+        },
+        "pin2": {
+          "compId": 1,
+          "pinIndex": 1
+        },
+        "path": [
+          {
+            "x": 5.0,
+            "y": 20.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compId": 0,
+          "pinIndex": 1
+        },
+        "pin2": {
+          "compId": 6,
+          "pinIndex": 0
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compId": 6,
+          "pinIndex": 0
+        },
+        "pin2": {
+          "compId": 3,
+          "pinIndex": 2
+        },
+        "path": [
+          {
+            "x": 5.0,
+            "y": 42.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compId": 6,
+          "pinIndex": 0
+        },
+        "pin2": {
+          "compId": 1,
+          "pinIndex": 2
+        },
+        "path": [
+          {
+            "x": 5.0,
+            "y": 30.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compId": 1,
+          "pinIndex": 0
+        },
+        "pin2": {
+          "compId": 7,
+          "pinIndex": 0
+        },
+        "path": []
+      },
+      {
+        "pin1": {
+          "compId": 7,
+          "pinIndex": 0
+        },
+        "pin2": {
+          "compId": 0,
+          "pinIndex": 3
+        },
+        "path": [
+          {
+            "x": 80.0,
+            "y": 25.0
+          },
+          {
+            "x": 80.0,
+            "y": 37.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compId": 7,
+          "pinIndex": 0
+        },
+        "pin2": {
+          "compId": 2,
+          "pinIndex": 2
+        },
+        "path": [
+          {
+            "x": 35.0,
+            "y": 17.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compId": 7,
+          "pinIndex": 0
+        },
+        "pin2": {
+          "compId": 3,
+          "pinIndex": 1
+        },
+        "path": [
+          {
+            "x": 35.0,
+            "y": 32.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compId": 2,
+          "pinIndex": 0
+        },
+        "pin2": {
+          "compId": 4,
+          "pinIndex": 1
+        },
+        "path": [
+          {
+            "x": 62.5,
+            "y": 12.5
+          },
+          {
+            "x": 62.5,
+            "y": 7.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compId": 3,
+          "pinIndex": 0
+        },
+        "pin2": {
+          "compId": 4,
+          "pinIndex": 2
+        },
+        "path": [
+          {
+            "x": 62.5,
+            "y": 37.5
+          },
+          {
+            "x": 62.5,
+            "y": 17.5
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compId": 4,
+          "pinIndex": 0
+        },
+        "pin2": {
+          "compId": 0,
+          "pinIndex": 2
+        },
+        "path": []
+      }
+    ]
+  },
+  "specialized": {
+    "input_count": 2,
+    "label": "GUIhalfadder",
+    "logic_width": 1,
+    "output_count": 2
+  }
+}
\ No newline at end of file
diff --git a/net.mograsim.logic.ui/Test.json b/net.mograsim.logic.ui/Test.json
new file mode 100644 (file)
index 0000000..4e376db
--- /dev/null
@@ -0,0 +1,34 @@
+{
+  "type": "SimpleRectangularSubmodelComponent",
+  "width": 35.0,
+  "height": 10.0,
+  "interfacePins": [
+    {
+      "location": {
+        "x": 0.0,
+        "y": 5.0
+      },
+      "logicWidth": 1
+    }
+  ],
+  "composition": {
+    "innerScale": 0.4,
+    "subComps": [
+      {
+        "pos": {
+          "x": 0.0,
+          "y": 0.0
+        },
+        "type": "file:HalfAdder.json",
+        "logicWidth": 1
+      }
+    ],
+    "innerWires": []
+  },
+  "specialized": {
+    "input_count": 1,
+    "label": "Test",
+    "logic_width": 1,
+    "output_count": 0
+  }
+}
\ No newline at end of file