Implemented GUIAm2910
authorDaniel Kirschten <daniel.kirschten@gmx.de>
Sat, 10 Aug 2019 19:20:05 +0000 (21:20 +0200)
committerDaniel Kirschten <daniel.kirschten@gmx.de>
Sat, 10 Aug 2019 19:20:05 +0000 (21:20 +0200)
net.mograsim.logic.model.am2900/components/am2910/GUIAm2910.json
net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/components/am2910/GUIAm2910InstrPLA.java
net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/examples/GUIComponentTestbench.java

index 0c24615..814b575 100644 (file)
@@ -1,12 +1,12 @@
 mograsim version: 0.1.3
 {
-  "width": 35.0,
-  "height": 270.0,
+  "width": 36.0,
+  "height": 30.5,
   "interfacePins": [
     {
       "location": {
-        "x": 0.0,
-        "y": 45.0
+        "x": 9.5,
+        "y": 30.5
       },
       "name": "_MAP",
       "logicWidth": 1
@@ -14,47 +14,47 @@ mograsim version: 0.1.3
     {
       "location": {
         "x": 0.0,
-        "y": 255.0
+        "y": 22.0
       },
       "name": "_CCEN",
       "logicWidth": 1
     },
     {
       "location": {
-        "x": 0.0,
-        "y": 265.0
+        "x": 30.0,
+        "y": 0.0
       },
       "name": "C",
       "logicWidth": 1
     },
     {
       "location": {
-        "x": 0.0,
-        "y": 95.0
+        "x": 18.0,
+        "y": 0.0
       },
       "name": "D",
       "logicWidth": 12
     },
     {
       "location": {
-        "x": 0.0,
-        "y": 55.0
+        "x": 36.0,
+        "y": 7.0
       },
-      "name": "_CI",
+      "name": "_FULL",
       "logicWidth": 1
     },
     {
       "location": {
-        "x": 0.0,
-        "y": 65.0
+        "x": 36.0,
+        "y": 20.0
       },
-      "name": "_FULL",
+      "name": "CI",
       "logicWidth": 1
     },
     {
       "location": {
-        "x": 35.0,
-        "y": 85.0
+        "x": 0.0,
+        "y": 3.0
       },
       "name": "_RLD",
       "logicWidth": 1
@@ -62,31 +62,31 @@ mograsim version: 0.1.3
     {
       "location": {
         "x": 0.0,
-        "y": 75.0
+        "y": 25.0
       },
       "name": "I",
       "logicWidth": 4
     },
     {
       "location": {
-        "x": 35.0,
-        "y": 115.0
+        "x": 19.0,
+        "y": 30.5
       },
       "name": "Y",
       "logicWidth": 12
     },
     {
       "location": {
-        "x": 35.0,
-        "y": 65.0
+        "x": 6.5,
+        "y": 30.5
       },
       "name": "_PL",
       "logicWidth": 1
     },
     {
       "location": {
-        "x": 0.0,
-        "y": 105.0
+        "x": 12.5,
+        "y": 30.5
       },
       "name": "_VECT",
       "logicWidth": 1
@@ -94,16 +94,1019 @@ mograsim version: 0.1.3
     {
       "location": {
         "x": 0.0,
-        "y": 85.0
+        "y": 19.0
       },
       "name": "_CC",
       "logicWidth": 1
     }
   ],
   "submodel": {
-    "innerScale": 0.2,
-    "subComps": [],
-    "innerWires": []
+    "innerScale": 0.1,
+    "subComps": [
+      {
+        "id": "class:net.mograsim.logic.model.model.components.atomic.GUINandGate",
+        "name": "GUINandGate#1",
+        "pos": {
+          "x": 20.0,
+          "y": 210.0
+        },
+        "params": 1
+      },
+      {
+        "id": "class:net.mograsim.logic.model.am2900.components.GUIram5_12",
+        "name": "GUIram5_12#0",
+        "pos": {
+          "x": 305.0,
+          "y": 100.0
+        }
+      },
+      {
+        "id": "class:net.mograsim.logic.model.model.components.atomic.GUINandGate",
+        "name": "GUINandGate#0",
+        "pos": {
+          "x": 50.0,
+          "y": 195.0
+        },
+        "params": 1
+      },
+      {
+        "id": "class:net.mograsim.logic.model.am2900.components.GUIdff12",
+        "name": "GUIdff12#0",
+        "pos": {
+          "x": 305.0,
+          "y": 160.0
+        }
+      },
+      {
+        "id": "class:net.mograsim.logic.model.am2900.components.GUIinc12",
+        "name": "GUIinc12#0",
+        "pos": {
+          "x": 305.0,
+          "y": 190.0
+        }
+      },
+      {
+        "id": "class:net.mograsim.logic.model.model.components.atomic.GUIBitDisplay",
+        "name": "GUIBitDisplay#3",
+        "pos": {
+          "x": 265.0,
+          "y": 150.0
+        },
+        "params": 12
+      },
+      {
+        "id": "class:net.mograsim.logic.model.model.wires.WireCrossPoint",
+        "name": "WireCrossPoint#1",
+        "pos": {
+          "x": 294.0,
+          "y": 104.0
+        },
+        "params": 1
+      },
+      {
+        "id": "class:net.mograsim.logic.model.model.wires.WireCrossPoint",
+        "name": "WireCrossPoint#0",
+        "pos": {
+          "x": 324.0,
+          "y": 149.0
+        },
+        "params": 12
+      },
+      {
+        "id": "class:net.mograsim.logic.model.model.wires.WireCrossPoint",
+        "name": "WireCrossPoint#3",
+        "pos": {
+          "x": 179.0,
+          "y": 89.0
+        },
+        "params": 12
+      },
+      {
+        "id": "class:net.mograsim.logic.model.model.wires.WireCrossPoint",
+        "name": "WireCrossPoint#2",
+        "pos": {
+          "x": 189.0,
+          "y": 224.0
+        },
+        "params": 12
+      },
+      {
+        "id": "class:net.mograsim.logic.model.model.wires.WireCrossPoint",
+        "name": "WireCrossPoint#5",
+        "pos": {
+          "x": 9.0,
+          "y": 219.0
+        },
+        "params": 1
+      },
+      {
+        "id": "class:net.mograsim.logic.model.model.wires.WireCrossPoint",
+        "name": "WireCrossPoint#4",
+        "pos": {
+          "x": 179.0,
+          "y": 14.0
+        },
+        "params": 12
+      },
+      {
+        "id": "class:net.mograsim.logic.model.model.wires.WireCrossPoint",
+        "name": "WireCrossPoint#7",
+        "pos": {
+          "x": 299.0,
+          "y": 44.0
+        },
+        "params": 1
+      },
+      {
+        "id": "class:net.mograsim.logic.model.model.wires.WireCrossPoint",
+        "name": "WireCrossPoint#6",
+        "pos": {
+          "x": 299.0,
+          "y": 79.0
+        },
+        "params": 1
+      },
+      {
+        "id": "class:net.mograsim.logic.model.model.wires.WireCrossPoint",
+        "name": "WireCrossPoint#9",
+        "pos": {
+          "x": 299.0,
+          "y": 114.0
+        },
+        "params": 1
+      },
+      {
+        "id": "class:net.mograsim.logic.model.model.wires.WireCrossPoint",
+        "name": "WireCrossPoint#8",
+        "pos": {
+          "x": 299.0,
+          "y": 169.0
+        },
+        "params": 1
+      },
+      {
+        "id": "class:net.mograsim.logic.model.am2900.components.GUImux4_12",
+        "name": "GUImux4_12#0",
+        "pos": {
+          "x": 150.0,
+          "y": 175.0
+        }
+      },
+      {
+        "id": "class:net.mograsim.logic.model.am2900.components.GUInor12",
+        "name": "GUInor12#0",
+        "pos": {
+          "x": 190.0,
+          "y": 80.0
+        }
+      },
+      {
+        "id": "class:net.mograsim.logic.model.model.components.atomic.GUIBitDisplay",
+        "name": "GUIBitDisplay#0",
+        "pos": {
+          "x": 160.0,
+          "y": 95.0
+        },
+        "params": 12
+      },
+      {
+        "id": "class:net.mograsim.logic.model.am2900.components.am2910.GUIAm2910InstrPLA",
+        "name": "GUIAm2910InstrPLA#0",
+        "pos": {
+          "x": 80.0,
+          "y": 200.0
+        }
+      },
+      {
+        "id": "class:net.mograsim.logic.model.am2900.components.am2910.GUIAm2910SP",
+        "name": "GUIAm2910SP#0",
+        "pos": {
+          "x": 305.0,
+          "y": 55.0
+        }
+      },
+      {
+        "id": "class:net.mograsim.logic.model.model.components.atomic.GUIBitDisplay",
+        "name": "GUIBitDisplay#1",
+        "pos": {
+          "x": 260.0,
+          "y": 115.0
+        },
+        "params": 12
+      },
+      {
+        "id": "class:net.mograsim.logic.model.model.components.atomic.GUIBitDisplay",
+        "name": "GUIBitDisplay#2",
+        "pos": {
+          "x": 345.0,
+          "y": 180.0
+        },
+        "params": 12
+      },
+      {
+        "id": "class:net.mograsim.logic.model.am2900.components.am2910.GUIAm2910RegCntr",
+        "name": "GUIAm2910RegCntr#0",
+        "pos": {
+          "x": 160.0,
+          "y": 25.0
+        }
+      }
+    ],
+    "innerWires": [
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#6",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#9",
+          "pinName": ""
+        },
+        "name": "unnamedWire#36",
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#8",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIdff12#0",
+          "pinName": "C"
+        },
+        "name": "unnamedWire#35",
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#7",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#6",
+          "pinName": ""
+        },
+        "name": "unnamedWire#38",
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#6",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIAm2910SP#0",
+          "pinName": "C"
+        },
+        "name": "unnamedWire#37",
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#7",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIAm2910RegCntr#0",
+          "pinName": "C"
+        },
+        "name": "unnamedWire#39",
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIinc12#0",
+          "pinName": "CI"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "CI"
+        },
+        "name": "unnamedWire#41",
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "C"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#7",
+          "pinName": ""
+        },
+        "name": "unnamedWire#40",
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2910InstrPLA#0",
+          "pinName": "_MAP"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "_MAP"
+        },
+        "name": "unnamedWire#43",
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2910InstrPLA#0",
+          "pinName": "_PL"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "_PL"
+        },
+        "name": "unnamedWire#42",
+        "path": [
+          {
+            "x": 85.0,
+            "y": 290.0
+          },
+          {
+            "x": 65.0,
+            "y": 290.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "I"
+        },
+        "pin2": {
+          "compName": "GUIAm2910InstrPLA#0",
+          "pinName": "I"
+        },
+        "name": "unnamedWire#45",
+        "path": [
+          {
+            "x": 70.0,
+            "y": 250.0
+          },
+          {
+            "x": 70.0,
+            "y": 220.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2910InstrPLA#0",
+          "pinName": "_VECT"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "_VECT"
+        },
+        "name": "unnamedWire#44",
+        "path": [
+          {
+            "x": 105.0,
+            "y": 290.0
+          },
+          {
+            "x": 125.0,
+            "y": 290.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIram5_12#0",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUIBitDisplay#1",
+          "pinName": ""
+        },
+        "name": "unnamedWire#47",
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2910RegCntr#0",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUIBitDisplay#0",
+          "pinName": ""
+        },
+        "name": "unnamedWire#46",
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIdff12#0",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUIBitDisplay#3",
+          "pinName": ""
+        },
+        "name": "unnamedWire#49",
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIinc12#0",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUIBitDisplay#2",
+          "pinName": ""
+        },
+        "name": "unnamedWire#48",
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2910RegCntr#0",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#3",
+          "pinName": ""
+        },
+        "name": "unnamedWire#9",
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2910SP#0",
+          "pinName": "B"
+        },
+        "pin2": {
+          "compName": "GUIram5_12#0",
+          "pinName": "B"
+        },
+        "name": "unnamedWire#8",
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2910SP#0",
+          "pinName": "A"
+        },
+        "pin2": {
+          "compName": "GUIram5_12#0",
+          "pinName": "A"
+        },
+        "name": "unnamedWire#7",
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIram5_12#0",
+          "pinName": "D"
+        },
+        "name": "unnamedWire#6",
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2910InstrPLA#0",
+          "pinName": "YR"
+        },
+        "pin2": {
+          "compName": "GUImux4_12#0",
+          "pinName": "SB"
+        },
+        "name": "unnamedWire#1",
+        "path": [
+          {
+            "x": 130.0,
+            "y": 235.0
+          },
+          {
+            "x": 130.0,
+            "y": 190.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#9",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIram5_12#0",
+          "pinName": "C"
+        },
+        "name": "unnamedWire#50",
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2910InstrPLA#0",
+          "pinName": "YD"
+        },
+        "pin2": {
+          "compName": "GUImux4_12#0",
+          "pinName": "SA"
+        },
+        "name": "unnamedWire#0",
+        "path": [
+          {
+            "x": 125.0,
+            "y": 225.0
+          },
+          {
+            "x": 125.0,
+            "y": 180.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#9",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#8",
+          "pinName": ""
+        },
+        "name": "unnamedWire#51",
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIdff12#0",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "name": "unnamedWire#5",
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUInor12#0",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUIAm2910InstrPLA#0",
+          "pinName": "R\u003d0"
+        },
+        "name": "unnamedWire#10",
+        "path": [
+          {
+            "x": 230.0,
+            "y": 90.0
+          },
+          {
+            "x": 230.0,
+            "y": 120.0
+          },
+          {
+            "x": 95.0,
+            "y": 120.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIinc12#0",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUIdff12#0",
+          "pinName": "D"
+        },
+        "name": "unnamedWire#4",
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2910InstrPLA#0",
+          "pinName": "YmuPC"
+        },
+        "pin2": {
+          "compName": "GUImux4_12#0",
+          "pinName": "SD"
+        },
+        "name": "unnamedWire#3",
+        "path": [
+          {
+            "x": 140.0,
+            "y": 255.0
+          },
+          {
+            "x": 140.0,
+            "y": 210.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2910InstrPLA#0",
+          "pinName": "RDEC"
+        },
+        "pin2": {
+          "compName": "GUIAm2910RegCntr#0",
+          "pinName": "DEC"
+        },
+        "name": "unnamedWire#12",
+        "path": [
+          {
+            "x": 120.0,
+            "y": 215.0
+          },
+          {
+            "x": 120.0,
+            "y": 55.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2910InstrPLA#0",
+          "pinName": "YF"
+        },
+        "pin2": {
+          "compName": "GUImux4_12#0",
+          "pinName": "SC"
+        },
+        "name": "unnamedWire#2",
+        "path": [
+          {
+            "x": 135.0,
+            "y": 245.0
+          },
+          {
+            "x": 135.0,
+            "y": 200.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2910InstrPLA#0",
+          "pinName": "RWE"
+        },
+        "pin2": {
+          "compName": "GUIAm2910RegCntr#0",
+          "pinName": "WE"
+        },
+        "name": "unnamedWire#11",
+        "path": [
+          {
+            "x": 115.0,
+            "y": 205.0
+          },
+          {
+            "x": 115.0,
+            "y": 45.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2910InstrPLA#0",
+          "pinName": "STKI1"
+        },
+        "pin2": {
+          "compName": "GUIAm2910SP#0",
+          "pinName": "STKI1"
+        },
+        "name": "unnamedWire#14",
+        "path": [
+          {
+            "x": 290.0,
+            "y": 275.0
+          },
+          {
+            "x": 290.0,
+            "y": 70.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2910InstrPLA#0",
+          "pinName": "STKI0"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "name": "unnamedWire#13",
+        "path": [
+          {
+            "x": 295.0,
+            "y": 265.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIram5_12#0",
+          "pinName": "WE"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "name": "unnamedWire#16",
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#1",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIAm2910SP#0",
+          "pinName": "STKI0"
+        },
+        "name": "unnamedWire#15",
+        "path": [
+          {
+            "x": 295.0,
+            "y": 60.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIinc12#0",
+          "pinName": "A"
+        },
+        "name": "unnamedWire#18",
+        "path": [
+          {
+            "x": 325.0,
+            "y": 225.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUImux4_12#0",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "name": "unnamedWire#17",
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUIram5_12#0",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUImux4_12#0",
+          "pinName": "C"
+        },
+        "name": "unnamedWire#19",
+        "path": [
+          {
+            "x": 200.0,
+            "y": 130.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#3",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUImux4_12#0",
+          "pinName": "B"
+        },
+        "name": "unnamedWire#21",
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#0",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUImux4_12#0",
+          "pinName": "D"
+        },
+        "name": "unnamedWire#20",
+        "path": [
+          {
+            "x": 220.0,
+            "y": 150.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "D"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#4",
+          "pinName": ""
+        },
+        "name": "unnamedWire#23",
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#3",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUInor12#0",
+          "pinName": "D"
+        },
+        "name": "unnamedWire#22",
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#4",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUImux4_12#0",
+          "pinName": "A"
+        },
+        "name": "unnamedWire#25",
+        "path": [
+          {
+            "x": 145.0,
+            "y": 15.0
+          },
+          {
+            "x": 145.0,
+            "y": 150.0
+          },
+          {
+            "x": 160.0,
+            "y": 150.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#4",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUIAm2910RegCntr#0",
+          "pinName": "D"
+        },
+        "name": "unnamedWire#24",
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#2",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "Y"
+        },
+        "name": "unnamedWire#27",
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "_RLD"
+        },
+        "pin2": {
+          "compName": "GUIAm2910RegCntr#0",
+          "pinName": "_RLD"
+        },
+        "name": "unnamedWire#26",
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "_CC"
+        },
+        "pin2": {
+          "compName": "GUINandGate#0",
+          "pinName": "A"
+        },
+        "name": "unnamedWire#29",
+        "path": [
+          {
+            "x": 45.0,
+            "y": 190.0
+          },
+          {
+            "x": 45.0,
+            "y": 200.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#0",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUIAm2910InstrPLA#0",
+          "pinName": "PASS"
+        },
+        "name": "unnamedWire#28",
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "_submodelinterface",
+          "pinName": "_CCEN"
+        },
+        "pin2": {
+          "compName": "WireCrossPoint#5",
+          "pinName": ""
+        },
+        "name": "unnamedWire#30",
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#5",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#1",
+          "pinName": "B"
+        },
+        "name": "unnamedWire#32",
+        "path": [
+          {
+            "x": 10.0,
+            "y": 225.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "WireCrossPoint#5",
+          "pinName": ""
+        },
+        "pin2": {
+          "compName": "GUINandGate#1",
+          "pinName": "A"
+        },
+        "name": "unnamedWire#31",
+        "path": [
+          {
+            "x": 10.0,
+            "y": 215.0
+          }
+        ]
+      },
+      {
+        "pin1": {
+          "compName": "GUIAm2910SP#0",
+          "pinName": "_FULL"
+        },
+        "pin2": {
+          "compName": "_submodelinterface",
+          "pinName": "_FULL"
+        },
+        "name": "unnamedWire#34",
+        "path": []
+      },
+      {
+        "pin1": {
+          "compName": "GUINandGate#1",
+          "pinName": "Y"
+        },
+        "pin2": {
+          "compName": "GUINandGate#0",
+          "pinName": "B"
+        },
+        "name": "unnamedWire#33",
+        "path": [
+          {
+            "x": 45.0,
+            "y": 220.0
+          },
+          {
+            "x": 45.0,
+            "y": 210.0
+          }
+        ]
+      }
+    ]
   },
   "symbolRendererSnippetID": "class:net.mograsim.logic.model.snippets.symbolrenderers.SimpleRectangularLikeSymbolRenderer",
   "symbolRendererParams": {
index ebd69f6..6e42d2e 100644 (file)
@@ -23,10 +23,7 @@ public class GUIAm2910InstrPLA extends SimpleRectangularHardcodedGUIComponent
                super(model, name, "Instr.\nPLA");
                setSize(30, 85);
                addPin(new Pin(this, "PASS", 1, 0, 5), Usage.INPUT, Position.RIGHT);
-               addPin(new Pin(this, "I3", 1, 0, 20), Usage.INPUT, Position.RIGHT);
-               addPin(new Pin(this, "I2", 1, 0, 30), Usage.INPUT, Position.RIGHT);
-               addPin(new Pin(this, "I1", 1, 0, 40), Usage.INPUT, Position.RIGHT);
-               addPin(new Pin(this, "I0", 1, 0, 50), Usage.INPUT, Position.RIGHT);
+               addPin(new Pin(this, "I", 4, 0, 20), Usage.INPUT, Position.RIGHT);
                addPin(new Pin(this, "R=0", 1, 15, 0), Usage.INPUT, Position.BOTTOM);
                addPin(new Pin(this, "_PL", 1, 5, 85), Usage.OUTPUT, Position.TOP);
                addPin(new Pin(this, "_MAP", 1, 15, 85), Usage.OUTPUT, Position.TOP);
@@ -45,10 +42,7 @@ public class GUIAm2910InstrPLA extends SimpleRectangularHardcodedGUIComponent
        protected Object recalculate(Object lastState, Map<String, ReadEnd> readEnds, Map<String, ReadWriteEnd> readWriteEnds)
        {
                ReadEnd PASS = readEnds.get("PASS");
-               ReadEnd I3 = readEnds.get("I3");
-               ReadEnd I2 = readEnds.get("I2");
-               ReadEnd I1 = readEnds.get("I1");
-               ReadEnd I0 = readEnds.get("I0");
+               ReadEnd I = readEnds.get("I");
                ReadEnd Req0 = readEnds.get("R=0");
                ReadWriteEnd _PL = readWriteEnds.get("_PL");
                ReadWriteEnd _MAP = readWriteEnds.get("_MAP");
@@ -63,10 +57,10 @@ public class GUIAm2910InstrPLA extends SimpleRectangularHardcodedGUIComponent
                ReadWriteEnd STKI1 = readWriteEnds.get("STKI1");
 
                Bit PASSVal = PASS.getValue();
-               Bit I3Val = I3.getValue();
-               Bit I2Val = I2.getValue();
-               Bit I1Val = I1.getValue();
-               Bit I0Val = I0.getValue();
+               Bit I3Val = I.getValue(3);
+               Bit I2Val = I.getValue(2);
+               Bit I1Val = I.getValue(1);
+               Bit I0Val = I.getValue(0);
                Bit Req0Val = Req0.getValue();
 
                if (!I3Val.isBinary() || !I2Val.isBinary() || !I1Val.isBinary() || !I0Val.isBinary())
@@ -100,24 +94,24 @@ public class GUIAm2910InstrPLA extends SimpleRectangularHardcodedGUIComponent
                        }
                else
                {
-                       int I = (I3Val == ONE ? 8 : 0) + (I2Val == ONE ? 4 : 0) + (I1Val == ONE ? 2 : 0) + (I0Val == ONE ? 1 : 0);
+                       int IAsInt = (I3Val == ONE ? 8 : 0) + (I2Val == ONE ? 4 : 0) + (I1Val == ONE ? 2 : 0) + (I0Val == ONE ? 1 : 0);
                        Bit _PLVal = ONE;
                        Bit _MAPVal = ONE;
                        Bit _VECTVal = ONE;
-                       if (I == 2)
+                       if (IAsInt == 2)
                                _MAPVal = ZERO;
-                       else if (I == 6)
+                       else if (IAsInt == 6)
                                _VECTVal = ZERO;
                        else
                                _PLVal = ZERO;
                        _PL.feedSignals(_PLVal);
                        _MAP.feedSignals(_MAPVal);
                        _VECT.feedSignals(_VECTVal);
-                       if (I == 8 || I == 9 || I == 15)
+                       if (IAsInt == 8 || IAsInt == 9 || IAsInt == 15)
                        {
                                RWE.feedSignals(Req0Val);
                                RDEC.feedSignals(Req0Val);// "forward" X/U/Z
-                       } else if (I == 4)
+                       } else if (IAsInt == 4)
                        {
                                RWE.feedSignals(PASSVal);
                                RDEC.feedSignals(PASSVal == ONE ? ZERO : PASSVal);// "forward" X/U/Z
@@ -138,7 +132,7 @@ public class GUIAm2910InstrPLA extends SimpleRectangularHardcodedGUIComponent
                                Bit YRVal = ZERO;
                                Bit YFVal = ZERO;
                                Bit YmuPCVal = ZERO;
-                               switch (I + (PASSVal == ONE ? 16 : 0))
+                               switch (IAsInt + (PASSVal == ONE ? 16 : 0))
                                {
                                case 0:
                                case 0 + 16:
@@ -199,7 +193,7 @@ public class GUIAm2910InstrPLA extends SimpleRectangularHardcodedGUIComponent
                                YmuPC.feedSignals(YmuPCVal);
                                Bit STKI0Val;
                                Bit STKI1Val;
-                               switch (I + (PASSVal == ONE ? 16 : 0))
+                               switch (IAsInt + (PASSVal == ONE ? 16 : 0))
                                {
                                case 1:
                                case 2:
index eade266..1c17ac3 100644 (file)
@@ -1,11 +1,11 @@
 package net.mograsim.logic.model.examples;
 
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Comparator;
 import java.util.List;
 
 import net.mograsim.logic.model.SimpleLogicUIStandalone;
-import net.mograsim.logic.model.am2900.components.GUImux4_12;
 import net.mograsim.logic.model.model.ViewModelModifiable;
 import net.mograsim.logic.model.model.components.GUIComponent;
 import net.mograsim.logic.model.model.components.atomic.GUIBitDisplay;
@@ -14,6 +14,7 @@ import net.mograsim.logic.model.model.components.atomic.SimpleRectangularHardcod
 import net.mograsim.logic.model.model.components.atomic.SimpleRectangularHardcodedGUIComponent.Usage;
 import net.mograsim.logic.model.model.wires.GUIWire;
 import net.mograsim.logic.model.model.wires.Pin;
+import net.mograsim.logic.model.serializing.IndirectGUIComponentCreator;
 
 public class GUIComponentTestbench
 {
@@ -25,8 +26,8 @@ public class GUIComponentTestbench
        @SuppressWarnings("unused") // for GUIWires being created
        public static void createTestbench(ViewModelModifiable model)
        {
-//             GUIComponent comp = IndirectGUIComponentCreator.createComponent(model, "GUIAm2901", "Am2901");
-               GUIComponent comp = new GUImux4_12(model, "c");
+               GUIComponent comp = IndirectGUIComponentCreator.createComponent(model, "file:components/am2910/GUIAm2910.json", "Am2910");
+//             GUIComponent comp = new GUImux4_12(model, "c");
 
                // guess which pins are outputs and which are inputs
                // TODO this code exists four times... but it seems too "hacky" to put it in a helper class
@@ -50,6 +51,9 @@ public class GUIComponentTestbench
                inputPinNames.sort(Comparator.comparing(comp::getPin, Comparator.comparing(Pin::getRelY)));
                outputPinNames.sort(Comparator.comparing(comp::getPin, Comparator.comparing(Pin::getRelY)));
 
+               inputPinNames = Arrays.asList("C", "D", "_RLD", "_CC", "_CCEN", "I", "CI");
+               outputPinNames = Arrays.asList("_FULL", "_PL", "_MAP", "_VECT", "Y");
+
                comp.moveTo(100, 0);
                for (int i = 0; i < inputPinNames.size(); i++)
                {