From 75a5c5c00f48382a8631ce19714719706bc3c4ee Mon Sep 17 00:00:00 2001 From: Daniel Kirschten Date: Tue, 20 Aug 2019 23:08:37 +0200 Subject: [PATCH] Implemented GUIAm2904muSR --- .../components/am2904/GUIAm2904muSR.json | 1081 +++++++++++++++++ .../model/examples/GUIComponentTestbench.java | 2 +- 2 files changed, 1082 insertions(+), 1 deletion(-) create mode 100644 net.mograsim.logic.model.am2900/components/am2904/GUIAm2904muSR.json diff --git a/net.mograsim.logic.model.am2900/components/am2904/GUIAm2904muSR.json b/net.mograsim.logic.model.am2900/components/am2904/GUIAm2904muSR.json new file mode 100644 index 00000000..fa3ed355 --- /dev/null +++ b/net.mograsim.logic.model.am2900/components/am2904/GUIAm2904muSR.json @@ -0,0 +1,1081 @@ +mograsim version: 0.1.3 +{ + "width": 45.0, + "height": 46.0, + "interfacePins": [ + { + "location": { + "x": 4.0, + "y": 46.0 + }, + "name": "MUX", + "logicWidth": 2 + }, + { + "location": { + "x": 45.0, + "y": 19.0 + }, + "name": "Q", + "logicWidth": 4 + }, + { + "location": { + "x": 27.5, + "y": 46.0 + }, + "name": "CINV", + "logicWidth": 1 + }, + { + "location": { + "x": 14.0, + "y": 46.0 + }, + "name": "C", + "logicWidth": 1 + }, + { + "location": { + "x": 5.5, + "y": 0.0 + }, + "name": "_EZ", + "logicWidth": 1 + }, + { + "location": { + "x": 37.5, + "y": 46.0 + }, + "name": "OVRRET", + "logicWidth": 1 + }, + { + "location": { + "x": 0.0, + "y": 31.0 + }, + "name": "I", + "logicWidth": 4 + }, + { + "location": { + "x": 25.5, + "y": 0.0 + }, + "name": "_EN", + "logicWidth": 1 + }, + { + "location": { + "x": 15.5, + "y": 0.0 + }, + "name": "_EC", + "logicWidth": 1 + }, + { + "location": { + "x": 0.0, + "y": 13.5 + }, + "name": "M", + "logicWidth": 4 + }, + { + "location": { + "x": 35.5, + "y": 0.0 + }, + "name": "_EOVR", + "logicWidth": 1 + } + ], + "submodel": { + "innerScale": 0.1, + "subComps": [ + { + "id": "GUINandGate", + "name": "GUINandGate#1", + "pos": { + "x": 215.0, + "y": 255.0 + }, + "params": 1 + }, + { + "id": "GUINandGate", + "name": "GUINandGate#0", + "pos": { + "x": 245.0, + "y": 245.0 + }, + "params": 1 + }, + { + "id": "GUINandGate", + "name": "GUINandGate#2", + "pos": { + "x": 215.0, + "y": 235.0 + }, + "params": 1 + }, + { + "id": "GUIMerger", + "name": "GUIMerger#0", + "pos": { + "x": 435.0, + "y": 175.0 + }, + "params": 4 + }, + { + "id": "GUISplitter", + "name": "GUISplitter#2", + "pos": { + "x": 45.0, + "y": 430.0 + }, + "params": 2 + }, + { + "id": "GUISplitter", + "name": "GUISplitter#1", + "pos": { + "x": 5.0, + "y": 295.0 + }, + "params": 4 + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#1", + "pos": { + "x": 89.0, + "y": 224.0 + }, + "params": 1 + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#0", + "pos": { + "x": 89.0, + "y": 234.0 + }, + "params": 1 + }, + { + "id": "GUISplitter", + "name": "GUISplitter#0", + "pos": { + "x": 5.0, + "y": 120.0 + }, + "params": 4 + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#3", + "pos": { + "x": 429.0, + "y": 204.0 + }, + "params": 1 + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#2", + "pos": { + "x": 89.0, + "y": 214.0 + }, + "params": 1 + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#4", + "pos": { + "x": 209.0, + "y": 244.0 + }, + "params": 1 + }, + { + "id": "GUIdff4_finewe", + "name": "GUIdff4_finewe#0", + "pos": { + "x": 375.0, + "y": 170.0 + } + }, + { + "id": "GUImux1_4", + "name": "DeserializedSubmodelComponent#1", + "pos": { + "x": 100.0, + "y": 190.0 + } + }, + { + "id": "GUImux1_4", + "name": "DeserializedSubmodelComponent#0", + "pos": { + "x": 45.0, + "y": 240.0 + } + }, + { + "id": "GUIxor", + "name": "DeserializedSubmodelComponent#2", + "pos": { + "x": 215.0, + "y": 200.0 + } + } + ], + "innerWires": [ + { + "pin1": { + "compName": "_submodelinterface", + "pinName": "CINV" + }, + "pin2": { + "compName": "DeserializedSubmodelComponent#2", + "pinName": "B" + }, + "name": "unnamedWire#36", + "path": [ + { + "x": 275.0, + "y": 390.0 + }, + { + "x": 190.0, + "y": 390.0 + }, + { + "x": 190.0, + "y": 215.0 + } + ] + }, + { + "pin1": { + "compName": "DeserializedSubmodelComponent#1", + "pinName": "Y2" + }, + "pin2": { + "compName": "DeserializedSubmodelComponent#2", + "pinName": "A" + }, + "name": "unnamedWire#35", + "path": [] + }, + { + "pin1": { + "compName": "_submodelinterface", + "pinName": "C" + }, + "pin2": { + "compName": "GUIdff4_finewe#0", + "pinName": "C" + }, + "name": "unnamedWire#38", + "path": [ + { + "x": 140.0, + "y": 325.0 + }, + { + "x": 345.0, + "y": 325.0 + }, + { + "x": 345.0, + "y": 175.0 + } + ] + }, + { + "pin1": { + "compName": "GUIdff4_finewe#0", + "pinName": "_WE1" + }, + "pin2": { + "compName": "_submodelinterface", + "pinName": "_EZ" + }, + "name": "unnamedWire#37", + "path": [ + { + "x": 370.0, + "y": 185.0 + }, + { + "x": 370.0, + "y": 5.0 + }, + { + "x": 55.0, + "y": 5.0 + } + ] + }, + { + "pin1": { + "compName": "_submodelinterface", + "pinName": "_EOVR" + }, + "pin2": { + "compName": "GUIdff4_finewe#0", + "pinName": "_WE4" + }, + "name": "unnamedWire#39", + "path": [ + { + "x": 355.0, + "y": 215.0 + } + ] + }, + { + "pin1": { + "compName": "_submodelinterface", + "pinName": "_EC" + }, + "pin2": { + "compName": "GUIdff4_finewe#0", + "pinName": "_WE2" + }, + "name": "unnamedWire#41", + "path": [ + { + "x": 155.0, + "y": 10.0 + }, + { + "x": 365.0, + "y": 10.0 + }, + { + "x": 365.0, + "y": 195.0 + } + ] + }, + { + "pin1": { + "compName": "GUIdff4_finewe#0", + "pinName": "_WE3" + }, + "pin2": { + "compName": "_submodelinterface", + "pinName": "_EN" + }, + "name": "unnamedWire#40", + "path": [ + { + "x": 360.0, + "y": 205.0 + }, + { + "x": 360.0, + "y": 15.0 + }, + { + "x": 255.0, + "y": 15.0 + } + ] + }, + { + "pin1": { + "compName": "DeserializedSubmodelComponent#2", + "pinName": "Y" + }, + "pin2": { + "compName": "GUIdff4_finewe#0", + "pinName": "D2" + }, + "name": "unnamedWire#43", + "path": [ + { + "x": 310.0, + "y": 205.0 + }, + { + "x": 310.0, + "y": 235.0 + } + ] + }, + { + "pin1": { + "compName": "GUIdff4_finewe#0", + "pinName": "D1" + }, + "pin2": { + "compName": "DeserializedSubmodelComponent#1", + "pinName": "Y1" + }, + "name": "unnamedWire#42", + "path": [ + { + "x": 315.0, + "y": 225.0 + }, + { + "x": 315.0, + "y": 195.0 + } + ] + }, + { + "pin1": { + "compName": "WireCrossPoint#4", + "pinName": "" + }, + "pin2": { + "compName": "DeserializedSubmodelComponent#1", + "pinName": "Y4" + }, + "name": "unnamedWire#45", + "path": [ + { + "x": 160.0, + "y": 245.0 + }, + { + "x": 160.0, + "y": 225.0 + } + ] + }, + { + "pin1": { + "compName": "GUIdff4_finewe#0", + "pinName": "D3" + }, + "pin2": { + "compName": "DeserializedSubmodelComponent#1", + "pinName": "Y3" + }, + "name": "unnamedWire#44", + "path": [ + { + "x": 305.0, + "y": 245.0 + }, + { + "x": 305.0, + "y": 225.0 + }, + { + "x": 170.0, + "y": 225.0 + }, + { + "x": 170.0, + "y": 215.0 + } + ] + }, + { + "pin1": { + "compName": "WireCrossPoint#4", + "pinName": "" + }, + "pin2": { + "compName": "GUINandGate#2", + "pinName": "A" + }, + "name": "unnamedWire#47", + "path": [ + { + "x": 210.0, + "y": 240.0 + } + ] + }, + { + "pin1": { + "compName": "GUINandGate#0", + "pinName": "Y" + }, + "pin2": { + "compName": "GUIdff4_finewe#0", + "pinName": "D4" + }, + "name": "unnamedWire#46", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#4", + "pinName": "" + }, + "pin2": { + "compName": "GUINandGate#2", + "pinName": "B" + }, + "name": "unnamedWire#48", + "path": [ + { + "x": 210.0, + "y": 250.0 + } + ] + }, + { + "pin1": { + "compName": "GUISplitter#1", + "pinName": "O1" + }, + "pin2": { + "compName": "DeserializedSubmodelComponent#0", + "pinName": "I1_2" + }, + "name": "unnamedWire#9", + "path": [] + }, + { + "pin1": { + "compName": "DeserializedSubmodelComponent#0", + "pinName": "I1_3" + }, + "pin2": { + "compName": "GUISplitter#1", + "pinName": "O2" + }, + "name": "unnamedWire#8", + "path": [] + }, + { + "pin1": { + "compName": "GUISplitter#1", + "pinName": "O3" + }, + "pin2": { + "compName": "DeserializedSubmodelComponent#0", + "pinName": "I1_4" + }, + "name": "unnamedWire#7", + "path": [] + }, + { + "pin1": { + "compName": "_submodelinterface", + "pinName": "I" + }, + "pin2": { + "compName": "GUISplitter#1", + "pinName": "I" + }, + "name": "unnamedWire#6", + "path": [] + }, + { + "pin1": { + "compName": "GUIMerger#0", + "pinName": "I1" + }, + "pin2": { + "compName": "GUIdff4_finewe#0", + "pinName": "Q2" + }, + "name": "unnamedWire#1", + "path": [] + }, + { + "pin1": { + "compName": "GUIdff4_finewe#0", + "pinName": "Q1" + }, + "pin2": { + "compName": "GUIMerger#0", + "pinName": "I0" + }, + "name": "unnamedWire#0", + "path": [] + }, + { + "pin1": { + "compName": "_submodelinterface", + "pinName": "M" + }, + "pin2": { + "compName": "GUISplitter#0", + "pinName": "I" + }, + "name": "unnamedWire#5", + "path": [] + }, + { + "pin1": { + "compName": "DeserializedSubmodelComponent#0", + "pinName": "I1_1" + }, + "pin2": { + "compName": "GUISplitter#1", + "pinName": "O0" + }, + "name": "unnamedWire#10", + "path": [] + }, + { + "pin1": { + "compName": "GUIMerger#0", + "pinName": "O" + }, + "pin2": { + "compName": "_submodelinterface", + "pinName": "Q" + }, + "name": "unnamedWire#4", + "path": [] + }, + { + "pin1": { + "compName": "DeserializedSubmodelComponent#0", + "pinName": "I0_3" + }, + "pin2": { + "compName": "GUISplitter#0", + "pinName": "O2" + }, + "name": "unnamedWire#12", + "path": [ + { + "x": 25.0, + "y": 275.0 + }, + { + "x": 25.0, + "y": 140.0 + } + ] + }, + { + "pin1": { + "compName": "GUIdff4_finewe#0", + "pinName": "Q4" + }, + "pin2": { + "compName": "WireCrossPoint#3", + "pinName": "" + }, + "name": "unnamedWire#3", + "path": [] + }, + { + "pin1": { + "compName": "GUIdff4_finewe#0", + "pinName": "Q3" + }, + "pin2": { + "compName": "GUIMerger#0", + "pinName": "I2" + }, + "name": "unnamedWire#2", + "path": [] + }, + { + "pin1": { + "compName": "GUISplitter#0", + "pinName": "O3" + }, + "pin2": { + "compName": "DeserializedSubmodelComponent#0", + "pinName": "I0_4" + }, + "name": "unnamedWire#11", + "path": [ + { + "x": 20.0, + "y": 150.0 + }, + { + "x": 20.0, + "y": 285.0 + } + ] + }, + { + "pin1": { + "compName": "DeserializedSubmodelComponent#0", + "pinName": "I0_1" + }, + "pin2": { + "compName": "GUISplitter#0", + "pinName": "O0" + }, + "name": "unnamedWire#14", + "path": [ + { + "x": 35.0, + "y": 255.0 + }, + { + "x": 35.0, + "y": 120.0 + } + ] + }, + { + "pin1": { + "compName": "GUISplitter#0", + "pinName": "O1" + }, + "pin2": { + "compName": "DeserializedSubmodelComponent#0", + "pinName": "I0_2" + }, + "name": "unnamedWire#13", + "path": [ + { + "x": 30.0, + "y": 130.0 + }, + { + "x": 30.0, + "y": 265.0 + } + ] + }, + { + "pin1": { + "compName": "GUISplitter#2", + "pinName": "O0" + }, + "pin2": { + "compName": "WireCrossPoint#0", + "pinName": "" + }, + "name": "unnamedWire#16", + "path": [ + { + "x": 90.0, + "y": 430.0 + } + ] + }, + { + "pin1": { + "compName": "_submodelinterface", + "pinName": "MUX" + }, + "pin2": { + "compName": "GUISplitter#2", + "pinName": "I" + }, + "name": "unnamedWire#15", + "path": [ + { + "x": 40.0, + "y": 435.0 + } + ] + }, + { + "pin1": { + "compName": "DeserializedSubmodelComponent#1", + "pinName": "I1_3" + }, + "pin2": { + "compName": "DeserializedSubmodelComponent#0", + "pinName": "Y3" + }, + "name": "unnamedWire#18", + "path": [] + }, + { + "pin1": { + "compName": "DeserializedSubmodelComponent#0", + "pinName": "Y4" + }, + "pin2": { + "compName": "DeserializedSubmodelComponent#1", + "pinName": "I1_4" + }, + "name": "unnamedWire#17", + "path": [] + }, + { + "pin1": { + "compName": "DeserializedSubmodelComponent#0", + "pinName": "Y2" + }, + "pin2": { + "compName": "DeserializedSubmodelComponent#1", + "pinName": "I1_2" + }, + "name": "unnamedWire#19", + "path": [] + }, + { + "pin1": { + "compName": "DeserializedSubmodelComponent#1", + "pinName": "I0_1" + }, + "pin2": { + "compName": "WireCrossPoint#2", + "pinName": "" + }, + "name": "unnamedWire#21", + "path": [ + { + "x": 90.0, + "y": 205.0 + } + ] + }, + { + "pin1": { + "compName": "DeserializedSubmodelComponent#0", + "pinName": "Y1" + }, + "pin2": { + "compName": "DeserializedSubmodelComponent#1", + "pinName": "I1_1" + }, + "name": "unnamedWire#20", + "path": [] + }, + { + "pin1": { + "compName": "DeserializedSubmodelComponent#1", + "pinName": "I0_3" + }, + "pin2": { + "compName": "WireCrossPoint#1", + "pinName": "" + }, + "name": "unnamedWire#23", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#2", + "pinName": "" + }, + "pin2": { + "compName": "DeserializedSubmodelComponent#1", + "pinName": "I0_2" + }, + "name": "unnamedWire#22", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#1", + "pinName": "" + }, + "pin2": { + "compName": "WireCrossPoint#0", + "pinName": "" + }, + "name": "unnamedWire#25", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#1", + "pinName": "" + }, + "pin2": { + "compName": "WireCrossPoint#2", + "pinName": "" + }, + "name": "unnamedWire#24", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#0", + "pinName": "" + }, + "pin2": { + "compName": "DeserializedSubmodelComponent#0", + "pinName": "S0" + }, + "name": "unnamedWire#27", + "path": [ + { + "x": 40.0, + "y": 235.0 + }, + { + "x": 40.0, + "y": 245.0 + } + ] + }, + { + "pin1": { + "compName": "WireCrossPoint#0", + "pinName": "" + }, + "pin2": { + "compName": "DeserializedSubmodelComponent#1", + "pinName": "I0_4" + }, + "name": "unnamedWire#26", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#3", + "pinName": "" + }, + "pin2": { + "compName": "GUIMerger#0", + "pinName": "I3" + }, + "name": "unnamedWire#29", + "path": [] + }, + { + "pin1": { + "compName": "GUISplitter#2", + "pinName": "O1" + }, + "pin2": { + "compName": "DeserializedSubmodelComponent#1", + "pinName": "S0" + }, + "name": "unnamedWire#28", + "path": [ + { + "x": 85.0, + "y": 440.0 + }, + { + "x": 85.0, + "y": 195.0 + } + ] + }, + { + "pin1": { + "compName": "GUINandGate#2", + "pinName": "Y" + }, + "pin2": { + "compName": "GUINandGate#0", + "pinName": "A" + }, + "name": "unnamedWire#30", + "path": [ + { + "x": 240.0, + "y": 245.0 + }, + { + "x": 240.0, + "y": 250.0 + } + ] + }, + { + "pin1": { + "compName": "_submodelinterface", + "pinName": "OVRRET" + }, + "pin2": { + "compName": "GUINandGate#1", + "pinName": "A" + }, + "name": "unnamedWire#32", + "path": [ + { + "x": 375.0, + "y": 360.0 + }, + { + "x": 205.0, + "y": 360.0 + }, + { + "x": 205.0, + "y": 260.0 + } + ] + }, + { + "pin1": { + "compName": "GUINandGate#0", + "pinName": "B" + }, + "pin2": { + "compName": "GUINandGate#1", + "pinName": "Y" + }, + "name": "unnamedWire#31", + "path": [ + { + "x": 240.0, + "y": 260.0 + }, + { + "x": 240.0, + "y": 265.0 + } + ] + }, + { + "pin1": { + "compName": "WireCrossPoint#3", + "pinName": "" + }, + "pin2": { + "compName": "GUINandGate#1", + "pinName": "B" + }, + "name": "unnamedWire#34", + "path": [ + { + "x": 430.0, + "y": 280.0 + }, + { + "x": 210.0, + "y": 280.0 + }, + { + "x": 210.0, + "y": 270.0 + } + ] + }, + { + "pin1": { + "compName": "WireCrossPoint#3", + "pinName": "" + }, + "pin2": { + "compName": "WireCrossPoint#3", + "pinName": "" + }, + "name": "unnamedWire#33", + "path": [] + } + ] + }, + "symbolRendererSnippetID": "simpleRectangularLike", + "symbolRendererParams": { + "centerText": "muSR", + "centerTextHeight": 5.0, + "horizontalComponentCenter": 17.5, + "pinLabelHeight": 3.5, + "pinLabelMargin": 0.5 + }, + "outlineRendererSnippetID": "default", + "highLevelStateHandlerSnippetID": "standard", + "highLevelStateHandlerParams": { + "subcomponentHighLevelStates": {}, + "atomicHighLevelStates": {} + } +} \ No newline at end of file diff --git a/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/examples/GUIComponentTestbench.java b/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/examples/GUIComponentTestbench.java index 66e32127..27b69605 100644 --- a/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/examples/GUIComponentTestbench.java +++ b/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/examples/GUIComponentTestbench.java @@ -25,7 +25,7 @@ public class GUIComponentTestbench @SuppressWarnings("unused") // for GUIWires being created public static void createTestbench(ViewModelModifiable model) { - GUIComponent comp = IndirectGUIComponentCreator.createComponent(model, "file:components/am2904/GUIAm2904MSR.json"); + GUIComponent comp = IndirectGUIComponentCreator.createComponent(model, "file:components/am2904/GUIAm2904muSR.json"); // 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 -- 2.17.1