From baa16105359d2a233893a3d1b4bcf8a72fd08877 Mon Sep 17 00:00:00 2001 From: Daniel Kirschten Date: Fri, 21 Jun 2019 14:24:17 +0200 Subject: [PATCH] Updated GUIAm2901ALUFuncDecode --- .../examples/SubmodelComponentTestbench.java | 4 +-- .../am2901/GUIAm2901ALUFuncDecode.java | 35 +++++++++++++------ 2 files changed, 27 insertions(+), 12 deletions(-) diff --git a/net.mograsim.logic.ui/src/net/mograsim/logic/ui/examples/SubmodelComponentTestbench.java b/net.mograsim.logic.ui/src/net/mograsim/logic/ui/examples/SubmodelComponentTestbench.java index 4ff5a256..0987f7fa 100644 --- a/net.mograsim.logic.ui/src/net/mograsim/logic/ui/examples/SubmodelComponentTestbench.java +++ b/net.mograsim.logic.ui/src/net/mograsim/logic/ui/examples/SubmodelComponentTestbench.java @@ -5,7 +5,7 @@ import net.mograsim.logic.ui.model.ViewModelModifiable; import net.mograsim.logic.ui.model.components.GUIBitDisplay; import net.mograsim.logic.ui.model.components.GUIManualSwitch; import net.mograsim.logic.ui.model.components.SimpleRectangularSubmodelComponent; -import net.mograsim.logic.ui.model.components.mi.nandbased.am2901.GUIAm2901ALUInclSourceDecodeInclFunctionDecode; +import net.mograsim.logic.ui.model.components.mi.nandbased.am2901.GUIAm2901ALUFuncDecode; import net.mograsim.logic.ui.model.wires.GUIWire; public class SubmodelComponentTestbench @@ -18,7 +18,7 @@ public class SubmodelComponentTestbench @SuppressWarnings("unused") // for GUIWires being created public static void createTestbench(ViewModelModifiable model) { - SimpleRectangularSubmodelComponent comp = new GUIAm2901ALUInclSourceDecodeInclFunctionDecode(model); + SimpleRectangularSubmodelComponent comp = new GUIAm2901ALUFuncDecode(model); comp.moveTo(100, 0); for (int i = 0; i < comp.getInputPinNames().size(); i++) diff --git a/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/mi/nandbased/am2901/GUIAm2901ALUFuncDecode.java b/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/mi/nandbased/am2901/GUIAm2901ALUFuncDecode.java index 2316945e..e2d30f07 100644 --- a/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/mi/nandbased/am2901/GUIAm2901ALUFuncDecode.java +++ b/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/mi/nandbased/am2901/GUIAm2901ALUFuncDecode.java @@ -17,7 +17,7 @@ public class GUIAm2901ALUFuncDecode extends SimpleRectangularSubmodelComponent super(model, 1, "GUIAm2901ALUFuncDecode"); setSubmodelScale(.25); setInputPins("I5", "I4", "I3"); - setOutputPins("CinE", "L", "SBE"); + setOutputPins("CinE", "L", "SN", "SBE", "FN", "RN"); initSubmodelComponents(); } @@ -29,7 +29,10 @@ public class GUIAm2901ALUFuncDecode extends SimpleRectangularSubmodelComponent Pin I3 = getSubmodelPin("I3"); Pin CinE = getSubmodelPin("CinE"); Pin L = getSubmodelPin("L"); + Pin SN = getSubmodelPin("SN"); Pin SBE = getSubmodelPin("SBE"); + Pin FN = getSubmodelPin("FN"); + Pin RN = getSubmodelPin("RN"); GUINandGate notI5 = new GUINandGate(submodelModifiable, 1); GUINandGate notI4 = new GUINandGate(submodelModifiable, 1); @@ -41,10 +44,13 @@ public class GUIAm2901ALUFuncDecode extends SimpleRectangularSubmodelComponent WireCrossPoint cpI51 = new WireCrossPoint(submodelModifiable, 1); WireCrossPoint cpI52 = new WireCrossPoint(submodelModifiable, 1); + WireCrossPoint cpI53 = new WireCrossPoint(submodelModifiable, 1); WireCrossPoint cpI41 = new WireCrossPoint(submodelModifiable, 1); WireCrossPoint cpI42 = new WireCrossPoint(submodelModifiable, 1); WireCrossPoint cpI43 = new WireCrossPoint(submodelModifiable, 1); - WireCrossPoint cpI3 = new WireCrossPoint(submodelModifiable, 1); + WireCrossPoint cpI44 = new WireCrossPoint(submodelModifiable, 1); + WireCrossPoint cpI31 = new WireCrossPoint(submodelModifiable, 1); + WireCrossPoint cpI32 = new WireCrossPoint(submodelModifiable, 1); WireCrossPoint cpNotI51 = new WireCrossPoint(submodelModifiable, 1); WireCrossPoint cpNotI52 = new WireCrossPoint(submodelModifiable, 1); @@ -54,13 +60,16 @@ public class GUIAm2901ALUFuncDecode extends SimpleRectangularSubmodelComponent nandI5NotI4.moveTo(55, 45); nandI3I4.moveTo(55, 70); nandL.moveTo(100, 50); - andSBE.moveTo(100, 95); + andSBE.moveTo(100, 135); cpI51.moveCenterTo(5, 20); cpI52.moveCenterTo(5, 25); + cpI53.moveCenterTo(5, 45); cpI41.moveCenterTo(10, 60); cpI42.moveCenterTo(10, 55); cpI43.moveCenterTo(10, 65); - cpI3.moveCenterTo(50, 75); + cpI44.moveCenterTo(10, 85); + cpI31.moveCenterTo(50, 100); + cpI32.moveCenterTo(50, 75); cpNotI51.moveCenterTo(40, 20); cpNotI52.moveCenterTo(40, 35); @@ -68,22 +77,28 @@ public class GUIAm2901ALUFuncDecode extends SimpleRectangularSubmodelComponent new GUIWire(submodelModifiable, cpI51, notI5.getPin("A"), new Point(5, 15)); new GUIWire(submodelModifiable, cpI51, cpI52, new Point[0]); new GUIWire(submodelModifiable, cpI52, notI5.getPin("B"), new Point[0]); - new GUIWire(submodelModifiable, cpI52, nandI5NotI4.getPin("A"), new Point(5, 45), new Point(45, 45), new Point(45, 50)); + new GUIWire(submodelModifiable, cpI52, cpI53, new Point[0]); + new GUIWire(submodelModifiable, cpI53, nandI5NotI4.getPin("A"), new Point(45, 45), new Point(45, 50)); + new GUIWire(submodelModifiable, cpI53, FN, new Point(5, 180)); new GUIWire(submodelModifiable, I4, cpI41, new Point[0]); new GUIWire(submodelModifiable, cpI41, cpI42, new Point[0]); new GUIWire(submodelModifiable, cpI42, nandI4I3NotI5.getPin("A"), new Point(10, 40), new Point(45, 40), new Point(45, 15)); new GUIWire(submodelModifiable, cpI42, notI4.getPin("A"), new Point[0]); new GUIWire(submodelModifiable, cpI41, cpI43, new Point[0]); new GUIWire(submodelModifiable, cpI43, notI4.getPin("B"), new Point[0]); - new GUIWire(submodelModifiable, cpI43, nandI3I4.getPin("B"), new Point(10, 85)); - new GUIWire(submodelModifiable, I3, cpI3, new Point(50, 100)); - new GUIWire(submodelModifiable, cpI3, nandI4I3NotI5.getPin("B"), new Point(50, 25)); - new GUIWire(submodelModifiable, cpI3, nandI3I4.getPin("A"), new Point[0]); + new GUIWire(submodelModifiable, cpI43, cpI44, new Point[0]); + new GUIWire(submodelModifiable, cpI44, nandI3I4.getPin("B"), new Point[0]); + new GUIWire(submodelModifiable, cpI44, SN, new Point(10, 105), new Point(135, 105), new Point(135, 100)); + new GUIWire(submodelModifiable, I3, cpI31, new Point(50, 100)); + new GUIWire(submodelModifiable, cpI31, RN, new Point(50, 220)); + new GUIWire(submodelModifiable, cpI31, cpI32, new Point[0]); + new GUIWire(submodelModifiable, cpI32, nandI4I3NotI5.getPin("B"), new Point(50, 25)); + new GUIWire(submodelModifiable, cpI32, nandI3I4.getPin("A"), new Point[0]); new GUIWire(submodelModifiable, notI5.getPin("Y"), cpNotI51, new Point[0]); new GUIWire(submodelModifiable, cpNotI51, CinE, new Point(40, 5), new Point(115, 5), new Point(115, 20)); new GUIWire(submodelModifiable, cpNotI51, cpNotI52, new Point[0]); new GUIWire(submodelModifiable, cpNotI52, nandI4I3NotI5.getPin("C"), new Point[0]); - new GUIWire(submodelModifiable, cpNotI52, andSBE.getPin("B"), new Point(40, 110)); + new GUIWire(submodelModifiable, cpNotI52, andSBE.getPin("B"), new Point(40, 150)); new GUIWire(submodelModifiable, notI4.getPin("Y"), nandI5NotI4.getPin("B"), new Point[0]); new GUIWire(submodelModifiable, nandI4I3NotI5.getPin("Y"), nandL.getPin("A")); new GUIWire(submodelModifiable, nandI5NotI4.getPin("Y"), nandL.getPin("B")); -- 2.17.1