From 887d34e79e9e219feb685a4060f2aa2c502a39a3 Mon Sep 17 00:00:00 2001 From: Daniel Kirschten Date: Sat, 2 May 2020 13:32:16 +0200 Subject: [PATCH] Created a NAND-based implementation of Am2910SP --- .../am2900/components/am2910/Am2910.json | 11 +- .../am2900/components/am2910/Am2910SP.json | 1631 +++++++++++++++++ .../logic/model/am2900/components/nor3.json | 449 +++++ .../components/am2910/ModelAm2910SP.java | 144 -- .../am2900/standardComponentIDMapping.json | 9 +- .../examples/ModelComponentTestbench.java | 2 +- 6 files changed, 2089 insertions(+), 157 deletions(-) create mode 100644 plugins/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/am2910/Am2910SP.json create mode 100644 plugins/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/nor3.json delete mode 100644 plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/components/am2910/ModelAm2910SP.java diff --git a/plugins/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/am2910/Am2910.json b/plugins/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/am2910/Am2910.json index 59b48acd..b2f52088 100644 --- a/plugins/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/am2910/Am2910.json +++ b/plugins/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/am2910/Am2910.json @@ -254,7 +254,7 @@ "name": "WireCrossPoint#6", "pos": { "x": 239.0, - "y": 34.0 + "y": 14.0 }, "params": 1 }, @@ -575,7 +575,7 @@ "path": [ { "x": 230.0, - "y": 15.0 + "y": 35.0 } ] }, @@ -932,12 +932,7 @@ "pinName": "" }, "name": "unnamedWire#37", - "path": [ - { - "x": 200.0, - "y": 35.0 - } - ] + "path": [] }, { "pin1": { diff --git a/plugins/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/am2910/Am2910SP.json b/plugins/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/am2910/Am2910SP.json new file mode 100644 index 00000000..04db7171 --- /dev/null +++ b/plugins/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/am2910/Am2910SP.json @@ -0,0 +1,1631 @@ +{ + "width": 40.0, + "height": 30.0, + "interfacePins": [ + { + "location": { + "x": 10.0, + "y": 30.0 + }, + "name": "A", + "logicWidth": 3, + "usage": "OUTPUT" + }, + { + "location": { + "x": 30.0, + "y": 30.0 + }, + "name": "B", + "logicWidth": 3, + "usage": "OUTPUT" + }, + { + "location": { + "x": 0.0, + "y": 5.0 + }, + "name": "C", + "logicWidth": 1, + "usage": "INPUT" + }, + { + "location": { + "x": 0.0, + "y": 25.0 + }, + "name": "STKI0", + "logicWidth": 1, + "usage": "INPUT" + }, + { + "location": { + "x": 0.0, + "y": 15.0 + }, + "name": "STKI1", + "logicWidth": 1, + "usage": "INPUT" + }, + { + "location": { + "x": 40.0, + "y": 15.0 + }, + "name": "_FULL", + "logicWidth": 1, + "usage": "OUTPUT" + } + ], + "innerScale": 0.1, + "submodel": { + "components": [ + { + "id": "NandGate", + "name": "NandGate#0", + "pos": { + "x": 25.0, + "y": 40.0 + }, + "params": 1 + }, + { + "id": "NandGate", + "name": "NandGate#1", + "pos": { + "x": 320.0, + "y": 150.0 + }, + "params": 1 + }, + { + "id": "Splitter", + "name": "Splitter#0", + "pos": { + "x": 290.0, + "y": 215.0 + }, + "params": { + "logicWidth": 3, + "orientation": "UP" + } + }, + { + "id": "Splitter", + "name": "Splitter#1", + "pos": { + "x": 165.0, + "y": 180.0 + }, + "params": { + "logicWidth": 3, + "orientation": "UP" + } + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#0", + "pos": { + "x": 244.0, + "y": 29.0 + }, + "params": 1 + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#1", + "pos": { + "x": 244.0, + "y": 74.0 + }, + "params": 1 + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#2", + "pos": { + "x": 289.0, + "y": 154.0 + }, + "params": 1 + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#3", + "pos": { + "x": 299.0, + "y": 159.0 + }, + "params": 1 + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#4", + "pos": { + "x": 309.0, + "y": 164.0 + }, + "params": 1 + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#5", + "pos": { + "x": 14.0, + "y": 249.0 + }, + "params": 1 + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#6", + "pos": { + "x": 19.0, + "y": 54.0 + }, + "params": 1 + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#7", + "pos": { + "x": 194.0, + "y": 19.0 + }, + "params": 1 + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#8", + "pos": { + "x": 194.0, + "y": 64.0 + }, + "params": 1 + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#9", + "pos": { + "x": 199.0, + "y": 29.0 + }, + "params": 1 + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#10", + "pos": { + "x": 59.0, + "y": 154.0 + }, + "params": 1 + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#11", + "pos": { + "x": 19.0, + "y": 44.0 + }, + "params": 1 + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#12", + "pos": { + "x": 199.0, + "y": 74.0 + }, + "params": 1 + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#13", + "pos": { + "x": 64.0, + "y": 159.0 + }, + "params": 1 + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#14", + "pos": { + "x": 69.0, + "y": 164.0 + }, + "params": 1 + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#15", + "pos": { + "x": 59.0, + "y": 124.0 + }, + "params": 1 + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#16", + "pos": { + "x": 64.0, + "y": 134.0 + }, + "params": 1 + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#17", + "pos": { + "x": 69.0, + "y": 144.0 + }, + "params": 1 + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#18", + "pos": { + "x": 184.0, + "y": 129.0 + }, + "params": 1 + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#19", + "pos": { + "x": 174.0, + "y": 84.0 + }, + "params": 1 + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#20", + "pos": { + "x": 164.0, + "y": 44.0 + }, + "params": 1 + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#21", + "pos": { + "x": 359.0, + "y": 179.0 + }, + "params": 1 + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#22", + "pos": { + "x": 359.0, + "y": 159.0 + }, + "params": 1 + }, + { + "id": "and", + "name": "and#0", + "pos": { + "x": 25.0, + "y": 15.0 + } + }, + { + "id": "and", + "name": "and#1", + "pos": { + "x": 30.0, + "y": 245.0 + } + }, + { + "id": "and", + "name": "and#2", + "pos": { + "x": 320.0, + "y": 185.0 + } + }, + { + "id": "dff", + "name": "dff#0", + "pos": { + "x": 250.0, + "y": 15.0 + } + }, + { + "id": "dff", + "name": "dff#1", + "pos": { + "x": 250.0, + "y": 60.0 + } + }, + { + "id": "dff", + "name": "dff#2", + "pos": { + "x": 250.0, + "y": 105.0 + } + }, + { + "id": "halfadder", + "name": "halfadder#0", + "pos": { + "x": 80.0, + "y": 170.0 + } + }, + { + "id": "halfadder", + "name": "halfadder#1", + "pos": { + "x": 80.0, + "y": 205.0 + } + }, + { + "id": "halfadder", + "name": "halfadder#2", + "pos": { + "x": 80.0, + "y": 240.0 + } + }, + { + "id": "halfsubtracter", + "name": "halfsubtracter#0", + "pos": { + "x": 80.0, + "y": 30.0 + } + }, + { + "id": "halfsubtracter", + "name": "halfsubtracter#1", + "pos": { + "x": 80.0, + "y": 60.0 + } + }, + { + "id": "halfsubtracter", + "name": "halfsubtracter#2", + "pos": { + "x": 80.0, + "y": 90.0 + } + }, + { + "id": "nor3", + "name": "nor3#0", + "pos": { + "x": 80.0, + "y": 120.0 + } + }, + { + "id": "sel1", + "name": "sel1#0", + "pos": { + "x": 205.0, + "y": 15.0 + } + }, + { + "id": "sel1", + "name": "sel1#1", + "pos": { + "x": 205.0, + "y": 60.0 + } + }, + { + "id": "sel1", + "name": "sel1#2", + "pos": { + "x": 205.0, + "y": 105.0 + } + } + ], + "wires": [ + { + "pin1": { + "compName": "_submodelinterface", + "pinName": "STKI0" + }, + "pin2": { + "compName": "WireCrossPoint#5", + "pinName": "" + }, + "name": "unnamedWire#0", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#2", + "pinName": "" + }, + "pin2": { + "compName": "NandGate#1", + "pinName": "A" + }, + "name": "unnamedWire#1", + "path": [] + }, + { + "pin1": { + "compName": "sel1#2", + "pinName": "Y" + }, + "pin2": { + "compName": "dff#2", + "pinName": "D" + }, + "name": "unnamedWire#2", + "path": [] + }, + { + "pin1": { + "compName": "sel1#1", + "pinName": "Y" + }, + "pin2": { + "compName": "dff#1", + "pinName": "D" + }, + "name": "unnamedWire#3", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#0", + "pinName": "" + }, + "pin2": { + "compName": "dff#0", + "pinName": "C" + }, + "name": "unnamedWire#4", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#0", + "pinName": "" + }, + "pin2": { + "compName": "WireCrossPoint#1", + "pinName": "" + }, + "name": "unnamedWire#5", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#1", + "pinName": "" + }, + "pin2": { + "compName": "dff#1", + "pinName": "C" + }, + "name": "unnamedWire#6", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#1", + "pinName": "" + }, + "pin2": { + "compName": "dff#2", + "pinName": "C" + }, + "name": "unnamedWire#7", + "path": [ + { + "x": 245.0, + "y": 120.0 + } + ] + }, + { + "pin1": { + "compName": "dff#1", + "pinName": "Q" + }, + "pin2": { + "compName": "WireCrossPoint#3", + "pinName": "" + }, + "name": "unnamedWire#8", + "path": [ + { + "x": 300.0, + "y": 65.0 + } + ] + }, + { + "pin1": { + "compName": "dff#0", + "pinName": "Q" + }, + "pin2": { + "compName": "WireCrossPoint#2", + "pinName": "" + }, + "name": "unnamedWire#9", + "path": [ + { + "x": 290.0, + "y": 20.0 + } + ] + }, + { + "pin1": { + "compName": "halfsubtracter#1", + "pinName": "Z" + }, + "pin2": { + "compName": "halfsubtracter#0", + "pinName": "B" + }, + "name": "unnamedWire#10", + "path": [ + { + "x": 135.0, + "y": 65.0 + }, + { + "x": 135.0, + "y": 55.0 + }, + { + "x": 75.0, + "y": 55.0 + }, + { + "x": 75.0, + "y": 45.0 + } + ] + }, + { + "pin1": { + "compName": "halfsubtracter#2", + "pinName": "Z" + }, + "pin2": { + "compName": "halfsubtracter#1", + "pinName": "B" + }, + "name": "unnamedWire#11", + "path": [ + { + "x": 135.0, + "y": 95.0 + }, + { + "x": 135.0, + "y": 85.0 + }, + { + "x": 75.0, + "y": 85.0 + }, + { + "x": 75.0, + "y": 75.0 + } + ] + }, + { + "pin1": { + "compName": "Splitter#0", + "pinName": "I" + }, + "pin2": { + "compName": "_submodelinterface", + "pinName": "B" + }, + "name": "unnamedWire#12", + "path": [] + }, + { + "pin1": { + "compName": "halfsubtracter#0", + "pinName": "Y" + }, + "pin2": { + "compName": "WireCrossPoint#20", + "pinName": "" + }, + "name": "unnamedWire#13", + "path": [] + }, + { + "pin1": { + "compName": "halfsubtracter#1", + "pinName": "Y" + }, + "pin2": { + "compName": "WireCrossPoint#19", + "pinName": "" + }, + "name": "unnamedWire#14", + "path": [ + { + "x": 175.0, + "y": 75.0 + } + ] + }, + { + "pin1": { + "compName": "WireCrossPoint#18", + "pinName": "" + }, + "pin2": { + "compName": "halfsubtracter#2", + "pinName": "Y" + }, + "name": "unnamedWire#15", + "path": [ + { + "x": 185.0, + "y": 105.0 + } + ] + }, + { + "pin1": { + "compName": "halfadder#1", + "pinName": "Z" + }, + "pin2": { + "compName": "halfadder#0", + "pinName": "B" + }, + "name": "unnamedWire#16", + "path": [ + { + "x": 75.0, + "y": 210.0 + }, + { + "x": 75.0, + "y": 195.0 + } + ] + }, + { + "pin1": { + "compName": "halfadder#2", + "pinName": "Z" + }, + "pin2": { + "compName": "halfadder#1", + "pinName": "B" + }, + "name": "unnamedWire#17", + "path": [ + { + "x": 75.0, + "y": 245.0 + }, + { + "x": 75.0, + "y": 230.0 + } + ] + }, + { + "pin1": { + "compName": "nor3#0", + "pinName": "Y" + }, + "pin2": { + "compName": "halfsubtracter#2", + "pinName": "B" + }, + "name": "unnamedWire#18", + "path": [ + { + "x": 120.0, + "y": 125.0 + }, + { + "x": 120.0, + "y": 115.0 + }, + { + "x": 75.0, + "y": 115.0 + }, + { + "x": 75.0, + "y": 105.0 + } + ] + }, + { + "pin1": { + "compName": "WireCrossPoint#2", + "pinName": "" + }, + "pin2": { + "compName": "WireCrossPoint#10", + "pinName": "" + }, + "name": "unnamedWire#19", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#5", + "pinName": "" + }, + "pin2": { + "compName": "and#0", + "pinName": "A" + }, + "name": "unnamedWire#20", + "path": [ + { + "x": 15.0, + "y": 20.0 + } + ] + }, + { + "pin1": { + "compName": "sel1#0", + "pinName": "Y" + }, + "pin2": { + "compName": "dff#0", + "pinName": "D" + }, + "name": "unnamedWire#21", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#0", + "pinName": "" + }, + "pin2": { + "compName": "_submodelinterface", + "pinName": "C" + }, + "name": "unnamedWire#22", + "path": [ + { + "x": 245.0, + "y": 10.0 + }, + { + "x": 10.0, + "y": 10.0 + }, + { + "x": 10.0, + "y": 50.0 + } + ] + }, + { + "pin1": { + "compName": "_submodelinterface", + "pinName": "STKI1" + }, + "pin2": { + "compName": "WireCrossPoint#6", + "pinName": "" + }, + "name": "unnamedWire#23", + "path": [ + { + "x": 20.0, + "y": 150.0 + } + ] + }, + { + "pin1": { + "compName": "WireCrossPoint#2", + "pinName": "" + }, + "pin2": { + "compName": "Splitter#0", + "pinName": "O2" + }, + "name": "unnamedWire#24", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#3", + "pinName": "" + }, + "pin2": { + "compName": "WireCrossPoint#13", + "pinName": "" + }, + "name": "unnamedWire#25", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#6", + "pinName": "" + }, + "pin2": { + "compName": "WireCrossPoint#11", + "pinName": "" + }, + "name": "unnamedWire#26", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#7", + "pinName": "" + }, + "pin2": { + "compName": "sel1#0", + "pinName": "S1" + }, + "name": "unnamedWire#27", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#7", + "pinName": "" + }, + "pin2": { + "compName": "WireCrossPoint#8", + "pinName": "" + }, + "name": "unnamedWire#28", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#8", + "pinName": "" + }, + "pin2": { + "compName": "sel1#1", + "pinName": "S1" + }, + "name": "unnamedWire#29", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#8", + "pinName": "" + }, + "pin2": { + "compName": "sel1#2", + "pinName": "S1" + }, + "name": "unnamedWire#30", + "path": [ + { + "x": 195.0, + "y": 110.0 + } + ] + }, + { + "pin1": { + "compName": "and#0", + "pinName": "Y" + }, + "pin2": { + "compName": "WireCrossPoint#7", + "pinName": "" + }, + "name": "unnamedWire#31", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#11", + "pinName": "" + }, + "pin2": { + "compName": "NandGate#0", + "pinName": "A" + }, + "name": "unnamedWire#32", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#6", + "pinName": "" + }, + "pin2": { + "compName": "NandGate#0", + "pinName": "B" + }, + "name": "unnamedWire#33", + "path": [] + }, + { + "pin1": { + "compName": "NandGate#0", + "pinName": "Y" + }, + "pin2": { + "compName": "WireCrossPoint#9", + "pinName": "" + }, + "name": "unnamedWire#34", + "path": [ + { + "x": 55.0, + "y": 50.0 + }, + { + "x": 55.0, + "y": 25.0 + }, + { + "x": 200.0, + "y": 25.0 + } + ] + }, + { + "pin1": { + "compName": "WireCrossPoint#9", + "pinName": "" + }, + "pin2": { + "compName": "WireCrossPoint#12", + "pinName": "" + }, + "name": "unnamedWire#35", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#9", + "pinName": "" + }, + "pin2": { + "compName": "sel1#0", + "pinName": "S2" + }, + "name": "unnamedWire#36", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#12", + "pinName": "" + }, + "pin2": { + "compName": "sel1#1", + "pinName": "S2" + }, + "name": "unnamedWire#37", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#11", + "pinName": "" + }, + "pin2": { + "compName": "and#0", + "pinName": "B" + }, + "name": "unnamedWire#38", + "path": [ + { + "x": 20.0, + "y": 30.0 + } + ] + }, + { + "pin1": { + "compName": "WireCrossPoint#12", + "pinName": "" + }, + "pin2": { + "compName": "sel1#2", + "pinName": "S2" + }, + "name": "unnamedWire#39", + "path": [ + { + "x": 200.0, + "y": 120.0 + } + ] + }, + { + "pin1": { + "compName": "WireCrossPoint#3", + "pinName": "" + }, + "pin2": { + "compName": "Splitter#0", + "pinName": "O1" + }, + "name": "unnamedWire#40", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#14", + "pinName": "" + }, + "pin2": { + "compName": "WireCrossPoint#4", + "pinName": "" + }, + "name": "unnamedWire#41", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#4", + "pinName": "" + }, + "pin2": { + "compName": "and#2", + "pinName": "B" + }, + "name": "unnamedWire#42", + "path": [ + { + "x": 310.0, + "y": 200.0 + } + ] + }, + { + "pin1": { + "compName": "WireCrossPoint#14", + "pinName": "" + }, + "pin2": { + "compName": "WireCrossPoint#17", + "pinName": "" + }, + "name": "unnamedWire#43", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#13", + "pinName": "" + }, + "pin2": { + "compName": "WireCrossPoint#16", + "pinName": "" + }, + "name": "unnamedWire#44", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#10", + "pinName": "" + }, + "pin2": { + "compName": "WireCrossPoint#15", + "pinName": "" + }, + "name": "unnamedWire#45", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#15", + "pinName": "" + }, + "pin2": { + "compName": "nor3#0", + "pinName": "A1" + }, + "name": "unnamedWire#46", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#16", + "pinName": "" + }, + "pin2": { + "compName": "nor3#0", + "pinName": "A2" + }, + "name": "unnamedWire#47", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#17", + "pinName": "" + }, + "pin2": { + "compName": "nor3#0", + "pinName": "A3" + }, + "name": "unnamedWire#48", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#17", + "pinName": "" + }, + "pin2": { + "compName": "halfsubtracter#2", + "pinName": "A" + }, + "name": "unnamedWire#49", + "path": [ + { + "x": 70.0, + "y": 95.0 + } + ] + }, + { + "pin1": { + "compName": "WireCrossPoint#16", + "pinName": "" + }, + "pin2": { + "compName": "halfsubtracter#1", + "pinName": "A" + }, + "name": "unnamedWire#50", + "path": [ + { + "x": 65.0, + "y": 65.0 + } + ] + }, + { + "pin1": { + "compName": "WireCrossPoint#15", + "pinName": "" + }, + "pin2": { + "compName": "halfsubtracter#0", + "pinName": "A" + }, + "name": "unnamedWire#51", + "path": [ + { + "x": 60.0, + "y": 35.0 + } + ] + }, + { + "pin1": { + "compName": "WireCrossPoint#19", + "pinName": "" + }, + "pin2": { + "compName": "sel1#1", + "pinName": "I1" + }, + "name": "unnamedWire#52", + "path": [] + }, + { + "pin1": { + "compName": "Splitter#1", + "pinName": "O2" + }, + "pin2": { + "compName": "WireCrossPoint#20", + "pinName": "" + }, + "name": "unnamedWire#53", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#20", + "pinName": "" + }, + "pin2": { + "compName": "sel1#0", + "pinName": "I1" + }, + "name": "unnamedWire#54", + "path": [ + { + "x": 165.0, + "y": 40.0 + } + ] + }, + { + "pin1": { + "compName": "WireCrossPoint#19", + "pinName": "" + }, + "pin2": { + "compName": "Splitter#1", + "pinName": "O1" + }, + "name": "unnamedWire#55", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#18", + "pinName": "" + }, + "pin2": { + "compName": "sel1#2", + "pinName": "I1" + }, + "name": "unnamedWire#56", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#18", + "pinName": "" + }, + "pin2": { + "compName": "Splitter#1", + "pinName": "O0" + }, + "name": "unnamedWire#57", + "path": [] + }, + { + "pin1": { + "compName": "and#1", + "pinName": "Y" + }, + "pin2": { + "compName": "halfadder#2", + "pinName": "B" + }, + "name": "unnamedWire#58", + "path": [ + { + "x": 60.0, + "y": 250.0 + }, + { + "x": 60.0, + "y": 265.0 + } + ] + }, + { + "pin1": { + "compName": "WireCrossPoint#10", + "pinName": "" + }, + "pin2": { + "compName": "halfadder#0", + "pinName": "A" + }, + "name": "unnamedWire#59", + "path": [ + { + "x": 60.0, + "y": 185.0 + } + ] + }, + { + "pin1": { + "compName": "WireCrossPoint#13", + "pinName": "" + }, + "pin2": { + "compName": "halfadder#1", + "pinName": "A" + }, + "name": "unnamedWire#60", + "path": [ + { + "x": 65.0, + "y": 220.0 + } + ] + }, + { + "pin1": { + "compName": "WireCrossPoint#14", + "pinName": "" + }, + "pin2": { + "compName": "halfadder#2", + "pinName": "A" + }, + "name": "unnamedWire#61", + "path": [ + { + "x": 70.0, + "y": 255.0 + } + ] + }, + { + "pin1": { + "compName": "Splitter#1", + "pinName": "I" + }, + "pin2": { + "compName": "_submodelinterface", + "pinName": "A" + }, + "name": "unnamedWire#62", + "path": [ + { + "x": 175.0, + "y": 285.0 + }, + { + "x": 100.0, + "y": 285.0 + } + ] + }, + { + "pin1": { + "compName": "halfadder#0", + "pinName": "Y" + }, + "pin2": { + "compName": "sel1#0", + "pinName": "I2" + }, + "name": "unnamedWire#63", + "path": [ + { + "x": 145.0, + "y": 175.0 + }, + { + "x": 145.0, + "y": 50.0 + } + ] + }, + { + "pin1": { + "compName": "halfadder#1", + "pinName": "Y" + }, + "pin2": { + "compName": "sel1#1", + "pinName": "I2" + }, + "name": "unnamedWire#64", + "path": [ + { + "x": 150.0, + "y": 210.0 + }, + { + "x": 150.0, + "y": 95.0 + } + ] + }, + { + "pin1": { + "compName": "halfadder#2", + "pinName": "Y" + }, + "pin2": { + "compName": "sel1#2", + "pinName": "I2" + }, + "name": "unnamedWire#65", + "path": [ + { + "x": 155.0, + "y": 245.0 + }, + { + "x": 155.0, + "y": 140.0 + } + ] + }, + { + "pin1": { + "compName": "WireCrossPoint#5", + "pinName": "" + }, + "pin2": { + "compName": "and#1", + "pinName": "A" + }, + "name": "unnamedWire#66", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#4", + "pinName": "" + }, + "pin2": { + "compName": "NandGate#1", + "pinName": "B" + }, + "name": "unnamedWire#67", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#4", + "pinName": "" + }, + "pin2": { + "compName": "dff#2", + "pinName": "Q" + }, + "name": "unnamedWire#68", + "path": [ + { + "x": 310.0, + "y": 110.0 + } + ] + }, + { + "pin1": { + "compName": "NandGate#1", + "pinName": "Y" + }, + "pin2": { + "compName": "WireCrossPoint#22", + "pinName": "" + }, + "name": "unnamedWire#69", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#22", + "pinName": "" + }, + "pin2": { + "compName": "WireCrossPoint#21", + "pinName": "" + }, + "name": "unnamedWire#70", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#21", + "pinName": "" + }, + "pin2": { + "compName": "and#1", + "pinName": "B" + }, + "name": "unnamedWire#71", + "path": [ + { + "x": 360.0, + "y": 275.0 + }, + { + "x": 25.0, + "y": 275.0 + }, + { + "x": 25.0, + "y": 260.0 + } + ] + }, + { + "pin1": { + "compName": "and#2", + "pinName": "Y" + }, + "pin2": { + "compName": "Splitter#0", + "pinName": "O0" + }, + "name": "unnamedWire#72", + "path": [ + { + "x": 350.0, + "y": 190.0 + }, + { + "x": 350.0, + "y": 210.0 + }, + { + "x": 310.0, + "y": 210.0 + } + ] + }, + { + "pin1": { + "compName": "WireCrossPoint#22", + "pinName": "" + }, + "pin2": { + "compName": "_submodelinterface", + "pinName": "_FULL" + }, + "name": "unnamedWire#73", + "path": [ + { + "x": 360.0, + "y": 150.0 + } + ] + }, + { + "pin1": { + "compName": "WireCrossPoint#21", + "pinName": "" + }, + "pin2": { + "compName": "and#2", + "pinName": "A" + }, + "name": "unnamedWire#74", + "path": [ + { + "x": 315.0, + "y": 180.0 + }, + { + "x": 315.0, + "y": 190.0 + } + ] + } + ], + "version": "0.1.1" + }, + "symbolRendererSnippetID": "simpleRectangularLike", + "symbolRendererParams": { + "centerText": "Stack\npointer", + "centerTextHeight": 5.0, + "horizontalComponentCenter": 10000.0, + "pinLabelHeight": 3.5, + "pinLabelMargin": 0.5 + }, + "outlineRendererSnippetID": "default", + "highLevelStateHandlerSnippetID": "default", + "version": "0.1.5" +} \ No newline at end of file diff --git a/plugins/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/nor3.json b/plugins/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/nor3.json new file mode 100644 index 00000000..c038243e --- /dev/null +++ b/plugins/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/nor3.json @@ -0,0 +1,449 @@ +{ + "width": 35.0, + "height": 30.0, + "interfacePins": [ + { + "location": { + "x": 0.0, + "y": 5.0 + }, + "name": "A1", + "logicWidth": 1, + "usage": "INPUT" + }, + { + "location": { + "x": 0.0, + "y": 15.0 + }, + "name": "A2", + "logicWidth": 1, + "usage": "INPUT" + }, + { + "location": { + "x": 0.0, + "y": 25.0 + }, + "name": "A3", + "logicWidth": 1, + "usage": "INPUT" + }, + { + "location": { + "x": 35.0, + "y": 5.0 + }, + "name": "Y", + "logicWidth": 1, + "usage": "OUTPUT" + } + ], + "innerScale": 0.2, + "submodel": { + "components": [ + { + "id": "NandGate", + "name": "NandGate#0", + "pos": { + "x": 20.0, + "y": 15.0 + }, + "params": 1 + }, + { + "id": "NandGate", + "name": "NandGate#1", + "pos": { + "x": 20.0, + "y": 65.0 + }, + "params": 1 + }, + { + "id": "NandGate", + "name": "NandGate#2", + "pos": { + "x": 150.0, + "y": 15.0 + }, + "params": 1 + }, + { + "id": "NandGate", + "name": "NandGate#3", + "pos": { + "x": 50.0, + "y": 20.0 + }, + "params": 1 + }, + { + "id": "NandGate", + "name": "NandGate#4", + "pos": { + "x": 90.0, + "y": 15.0 + }, + "params": 1 + }, + { + "id": "NandGate", + "name": "NandGate#5", + "pos": { + "x": 90.0, + "y": 40.0 + }, + "params": 1 + }, + { + "id": "NandGate", + "name": "NandGate#6", + "pos": { + "x": 120.0, + "y": 20.0 + }, + "params": 1 + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#0", + "pos": { + "x": 14.0, + "y": 24.0 + }, + "params": 1 + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#1", + "pos": { + "x": 14.0, + "y": 74.0 + }, + "params": 1 + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#2", + "pos": { + "x": 144.0, + "y": 29.0 + }, + "params": 1 + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#3", + "pos": { + "x": 84.0, + "y": 29.0 + }, + "params": 1 + }, + { + "id": "WireCrossPoint", + "name": "WireCrossPoint#4", + "pos": { + "x": 84.0, + "y": 54.0 + }, + "params": 1 + } + ], + "wires": [ + { + "pin1": { + "compName": "_submodelinterface", + "pinName": "A1" + }, + "pin2": { + "compName": "WireCrossPoint#0", + "pinName": "" + }, + "name": "unnamedWire#0", + "path": [] + }, + { + "pin1": { + "compName": "_submodelinterface", + "pinName": "A2" + }, + "pin2": { + "compName": "WireCrossPoint#1", + "pinName": "" + }, + "name": "unnamedWire#1", + "path": [] + }, + { + "pin1": { + "compName": "_submodelinterface", + "pinName": "A3" + }, + "pin2": { + "compName": "WireCrossPoint#4", + "pinName": "" + }, + "name": "unnamedWire#2", + "path": [ + { + "x": 55.0, + "y": 125.0 + }, + { + "x": 55.0, + "y": 55.0 + } + ] + }, + { + "pin1": { + "compName": "NandGate#6", + "pinName": "Y" + }, + "pin2": { + "compName": "WireCrossPoint#2", + "pinName": "" + }, + "name": "unnamedWire#3", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#0", + "pinName": "" + }, + "pin2": { + "compName": "NandGate#0", + "pinName": "A" + }, + "name": "unnamedWire#4", + "path": [ + { + "x": 15.0, + "y": 20.0 + } + ] + }, + { + "pin1": { + "compName": "WireCrossPoint#1", + "pinName": "" + }, + "pin2": { + "compName": "NandGate#1", + "pinName": "A" + }, + "name": "unnamedWire#5", + "path": [ + { + "x": 15.0, + "y": 70.0 + } + ] + }, + { + "pin1": { + "compName": "WireCrossPoint#2", + "pinName": "" + }, + "pin2": { + "compName": "NandGate#2", + "pinName": "A" + }, + "name": "unnamedWire#6", + "path": [ + { + "x": 145.0, + "y": 20.0 + } + ] + }, + { + "pin1": { + "compName": "WireCrossPoint#2", + "pinName": "" + }, + "pin2": { + "compName": "NandGate#2", + "pinName": "B" + }, + "name": "unnamedWire#7", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#0", + "pinName": "" + }, + "pin2": { + "compName": "NandGate#0", + "pinName": "B" + }, + "name": "unnamedWire#8", + "path": [ + { + "x": 15.0, + "y": 30.0 + } + ] + }, + { + "pin1": { + "compName": "WireCrossPoint#1", + "pinName": "" + }, + "pin2": { + "compName": "NandGate#1", + "pinName": "B" + }, + "name": "unnamedWire#9", + "path": [ + { + "x": 15.0, + "y": 80.0 + } + ] + }, + { + "pin1": { + "compName": "NandGate#2", + "pinName": "Y" + }, + "pin2": { + "compName": "_submodelinterface", + "pinName": "Y" + }, + "name": "unnamedWire#10", + "path": [] + }, + { + "pin1": { + "compName": "NandGate#0", + "pinName": "Y" + }, + "pin2": { + "compName": "NandGate#3", + "pinName": "A" + }, + "name": "unnamedWire#11" + }, + { + "pin1": { + "compName": "NandGate#1", + "pinName": "Y" + }, + "pin2": { + "compName": "NandGate#3", + "pinName": "B" + }, + "name": "unnamedWire#12" + }, + { + "pin1": { + "compName": "NandGate#3", + "pinName": "Y" + }, + "pin2": { + "compName": "WireCrossPoint#3", + "pinName": "" + }, + "name": "unnamedWire#13", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#3", + "pinName": "" + }, + "pin2": { + "compName": "NandGate#4", + "pinName": "A" + }, + "name": "unnamedWire#14", + "path": [ + { + "x": 85.0, + "y": 20.0 + } + ] + }, + { + "pin1": { + "compName": "WireCrossPoint#3", + "pinName": "" + }, + "pin2": { + "compName": "NandGate#4", + "pinName": "B" + }, + "name": "unnamedWire#15", + "path": [] + }, + { + "pin1": { + "compName": "WireCrossPoint#4", + "pinName": "" + }, + "pin2": { + "compName": "NandGate#5", + "pinName": "A" + }, + "name": "unnamedWire#16", + "path": [ + { + "x": 85.0, + "y": 45.0 + } + ] + }, + { + "pin1": { + "compName": "WireCrossPoint#4", + "pinName": "" + }, + "pin2": { + "compName": "NandGate#5", + "pinName": "B" + }, + "name": "unnamedWire#17", + "path": [] + }, + { + "pin1": { + "compName": "NandGate#4", + "pinName": "Y" + }, + "pin2": { + "compName": "NandGate#6", + "pinName": "A" + }, + "name": "unnamedWire#18" + }, + { + "pin1": { + "compName": "NandGate#5", + "pinName": "Y" + }, + "pin2": { + "compName": "NandGate#6", + "pinName": "B" + }, + "name": "unnamedWire#19" + } + ], + "version": "0.1.1" + }, + "symbolRendererSnippetID": "simpleRectangularLike", + "symbolRendererParams": { + "centerText": "nor3", + "centerTextHeight": 5.0, + "horizontalComponentCenter": 17.5, + "pinLabelHeight": 3.5, + "pinLabelMargin": 0.5 + }, + "outlineRendererSnippetID": "default", + "highLevelStateHandlerSnippetID": "default", + "version": "0.1.5" +} \ No newline at end of file diff --git a/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/components/am2910/ModelAm2910SP.java b/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/components/am2910/ModelAm2910SP.java deleted file mode 100644 index d9d1a60e..00000000 --- a/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/components/am2910/ModelAm2910SP.java +++ /dev/null @@ -1,144 +0,0 @@ -package net.mograsim.logic.model.am2900.components.am2910; - -import static net.mograsim.logic.core.types.Bit.ONE; -import static net.mograsim.logic.core.types.Bit.U; -import static net.mograsim.logic.core.types.Bit.X; -import static net.mograsim.logic.core.types.Bit.ZERO; - -import java.util.Map; - -import net.mograsim.logic.core.types.Bit; -import net.mograsim.logic.core.types.BitVector; -import net.mograsim.logic.core.wires.CoreWire.ReadEnd; -import net.mograsim.logic.core.wires.CoreWire.ReadWriteEnd; -import net.mograsim.logic.model.model.LogicModelModifiable; -import net.mograsim.logic.model.model.components.atomic.SimpleRectangularHardcodedModelComponent; -import net.mograsim.logic.model.model.wires.Pin; -import net.mograsim.logic.model.model.wires.PinUsage; -import net.mograsim.logic.model.serializing.IndirectModelComponentCreator; -import net.mograsim.logic.model.snippets.symbolrenderers.PinNamesSymbolRenderer.PinNamesParams.Position; - -public class ModelAm2910SP extends SimpleRectangularHardcodedModelComponent -{ - public ModelAm2910SP(LogicModelModifiable model, String name) - { - super(model, "Am2910SP", name, "Stack\npointer", false); - setSize(40, 30); - addPin(new Pin(model, this, "STKI0", 1, PinUsage.INPUT, 0, 5), Position.RIGHT); - addPin(new Pin(model, this, "STKI1", 1, PinUsage.INPUT, 0, 15), Position.RIGHT); - addPin(new Pin(model, this, "C", 1, PinUsage.INPUT, 0, 25), Position.RIGHT); - addPin(new Pin(model, this, "A", 3, PinUsage.OUTPUT, 10, 30), Position.TOP); - addPin(new Pin(model, this, "B", 3, PinUsage.OUTPUT, 30, 30), Position.TOP); - addPin(new Pin(model, this, "_FULL", 1, PinUsage.OUTPUT, 40, 15), Position.LEFT); - - init(); - } - - @Override - public Object recalculate(Object lastState, Map readEnds, Map readWriteEnds) - { - BitAndInt SPC = castAndInitState(lastState); - int SP = SPC.i; - - Bit STKI0Val = readEnds.get("STKI0").getValue(); - Bit STKI1Val = readEnds.get("STKI1").getValue(); - Bit CVal = readEnds.get("C").getValue(); - if (SPC.bit == ZERO && CVal == ONE) - if (STKI0Val == U && STKI1Val == U) - SP = -2; - else if (!STKI0Val.isBinary() || !STKI1Val.isBinary()) - SP = -1; - else if (STKI0Val == ONE && STKI1Val == ZERO) - { - // PUSH - if (SP >= 0) - SP = SP == 5 ? 5 : SP + 1; - } else if (STKI0Val == ZERO && STKI1Val == ONE) - // CLEAR - SP = 0; - else if (STKI0Val == ONE && STKI1Val == ONE) - // POP - SP = SP <= 0 ? SP : SP - 1; - readWriteEnds.get("A").feedSignals(getAsBitVector(SP == 0 ? 7 : SP < 0 ? SP : SP - 1)); - readWriteEnds.get("B").feedSignals(getAsBitVector(SP == 5 ? 4 : SP)); - readWriteEnds.get("_FULL").feedSignals(SP == -2 ? U : SP == -1 ? X : SP == 5 ? ZERO : ONE); - - SPC.i = SP; - SPC.bit = CVal; - return SPC; - } - - @Override - protected Object getHighLevelState(Object state, String stateID) - { - BitAndInt SPC = castAndInitState(state); - - switch (stateID) - { - case "q": - return getAsBitVector(SPC.i); - default: - return super.getHighLevelState(SPC, stateID); - } - } - - @Override - protected Object setHighLevelState(Object lastState, String stateID, Object newHighLevelState) - { - BitAndInt SPC = castAndInitState(lastState); - - switch (stateID) - { - case "q": - int i; - BitVector newHighLevelStateCasted = (BitVector) newHighLevelState; - if (newHighLevelStateCasted.length() != 3) - throw new IllegalArgumentException("Expected BitVector of length 3, not " + newHighLevelStateCasted.length()); - if (newHighLevelStateCasted.isBinary()) - i = newHighLevelStateCasted.getUnsignedValue().intValue(); - else - i = -1;// this makes setting to U impossible - if (i > 5) - throw new IllegalArgumentException("Given value not in range (0-5 incl.): " + i); - SPC.i = i; - return SPC; - default: - return super.setHighLevelState(SPC, stateID, newHighLevelState); - } - } - - private static BitAndInt castAndInitState(Object lastState) - { - BitAndInt SPC = (BitAndInt) lastState; - if (SPC == null) - { - SPC = new BitAndInt(); - SPC.bit = U; - SPC.i = -2; - } - return SPC; - } - - private static class BitAndInt - { - Bit bit; - int i; - } - - /** - * -1 means X, -2 means U - */ - private static BitVector getAsBitVector(int i) - { - if (i == -1) - return BitVector.of(X, 3); - if (i == -2) - return BitVector.of(U, 3); - return BitVector.of((i & 0b100) > 0 ? ONE : ZERO, (i & 0b10) > 0 ? ONE : ZERO, (i & 0b1) > 0 ? ONE : ZERO); - } - - static - { - IndirectModelComponentCreator.setComponentSupplier(ModelAm2910SP.class.getCanonicalName(), (m, p, n) -> new ModelAm2910SP(m, n)); - } -} \ No newline at end of file diff --git a/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/standardComponentIDMapping.json b/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/standardComponentIDMapping.json index 0cdec6fd..d4fe5b5c 100644 --- a/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/standardComponentIDMapping.json +++ b/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/standardComponentIDMapping.json @@ -3,7 +3,6 @@ "Am2900MicroInstructionMemory": "resloader:Am2900Loader:class:net.mograsim.logic.model.am2900.components.ModelAm2900MicroInstructionMemory", "Am2904RegCTInstrDecode": "resloader:Am2900Loader:class:net.mograsim.logic.model.am2900.components.am2904.ModelAm2904RegCTInstrDecode", "Am2904ShiftInstrDecode": "resloader:Am2900Loader:class:net.mograsim.logic.model.am2900.components.am2904.ModelAm2904ShiftInstrDecode", - "Am2910SP": "resloader:Am2900Loader:class:net.mograsim.logic.model.am2900.components.am2910.ModelAm2910SP", "ram5_12": "resloader:Am2900Loader:class:net.mograsim.logic.model.am2900.components.Modelram5_12", "Am2900": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/Am2900.json", @@ -16,12 +15,13 @@ "Am2901DestDecode": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/am2901/Am2901DestDecode.json", "Am2901SourceDecode": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/am2901/Am2901SourceDecode.json", "Am2904": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/am2904/Am2904.json", - "Am2910": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/am2910/Am2910.json", - "Am2910InstrPLA": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/am2910/Am2910InstrPLA.json", - "Am2910RegCntr": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/am2910/Am2910RegCntr.json", "Am2904MSR": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/am2904/Am2904MSR.json", "Am2904muSR": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/am2904/Am2904muSR.json", "Am2904TestLogic": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/am2904/Am2904TestLogic.json", + "Am2910": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/am2910/Am2910.json", + "Am2910InstrPLA": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/am2910/Am2910InstrPLA.json", + "Am2910RegCntr": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/am2910/Am2910RegCntr.json", + "Am2910SP": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/am2910/Am2910SP.json", "_rsLatch": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/_rsLatch.json", "and": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/and.json", "and41": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/and41.json", @@ -53,6 +53,7 @@ "mux2": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/mux2.json", "mux3": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/mux3.json", "nand3": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/nand3.json", + "nor3": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/nor3.json", "nor12": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/nor12.json", "not4": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/not4.json", "or4": "resloader:Am2900Loader:jsonres:net/mograsim/logic/model/am2900/components/or4.json", diff --git a/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/examples/ModelComponentTestbench.java b/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/examples/ModelComponentTestbench.java index cd44fd34..d82e41db 100644 --- a/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/examples/ModelComponentTestbench.java +++ b/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/examples/ModelComponentTestbench.java @@ -27,7 +27,7 @@ public class ModelComponentTestbench { Am2900Loader.setup(); // ModelComponent comp = new StrictAm2900MachineDefinition().createNew(model).getAm2900(); - ModelComponent comp = IndirectModelComponentCreator.createComponent(model, "Am2910RegCntr"); + ModelComponent comp = IndirectModelComponentCreator.createComponent(model, "Am2910"); List inputPinNames = new ArrayList<>(); List outputPinNames = new ArrayList<>(); -- 2.17.1