X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=net.mograsim.logic.ui%2Fsrc%2Fnet%2Fmograsim%2Flogic%2Fui%2Fmodel%2Fcomponents%2Fmi%2Fnandbased%2FGUIdff.java;h=40f33310764e73ef5eb6e214f261d981e75be173;hb=19ee1a7fdb06a1df65cd7df78fed935124496707;hp=33419069f5ef6e0d925802a1397dc7347a82d19d;hpb=29948edc1851d17311c50c7eff34070a0dc36ceb;p=Mograsim.git diff --git a/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUIdff.java b/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUIdff.java index 33419069..40f33310 100644 --- a/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUIdff.java +++ b/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/mi/nandbased/GUIdff.java @@ -22,10 +22,10 @@ public class GUIdff extends SimpleRectangularSubmodelComponent @SuppressWarnings("unused") // for GUIWires being created private void initSubmodelComponents() { - Pin C = getInputSubmodelPins().get(0); - Pin D = getInputSubmodelPins().get(1); - Pin Q = getOutputSubmodelPins().get(0); - Pin _Q = getOutputSubmodelPins().get(1); + Pin C = getSubmodelPin("C"); + Pin D = getSubmodelPin("D"); + Pin Q = getSubmodelPin("Q"); + Pin _Q = getSubmodelPin("_Q"); GUI_rsLatch _rsLatch1 = new GUI_rsLatch(submodelModifiable); GUInand3 nand3 = new GUInand3(submodelModifiable); @@ -47,19 +47,19 @@ public class GUIdff extends SimpleRectangularSubmodelComponent cp4.moveCenterTo(100, 45); new GUIWire(submodelModifiable, C, cp1, new Point[0]); - new GUIWire(submodelModifiable, cp1, _rsLatch1.getInputPins().get(1), new Point[0]); - new GUIWire(submodelModifiable, cp1, nand3.getInputPins().get(1), new Point(10, 55)); - new GUIWire(submodelModifiable, D, nand2.getInputPins().get(1), new Point[0]); - new GUIWire(submodelModifiable, nand2.getOutputPin(), cp2, new Point(145, 70), new Point(145, 85), new Point(20, 85)); - new GUIWire(submodelModifiable, cp2, _rsLatch1.getInputPins().get(0), new Point(20, 15)); - new GUIWire(submodelModifiable, cp2, nand3.getInputPins().get(2), new Point[0]); - new GUIWire(submodelModifiable, _rsLatch1.getOutputPins().get(1), cp3, new Point(100, 25)); - new GUIWire(submodelModifiable, cp3, nand3.getInputPins().get(0), new Point(30, 35), new Point(30, 45)); - new GUIWire(submodelModifiable, cp3, _rsLatch2.getInputPins().get(0), new Point[0]); - new GUIWire(submodelModifiable, nand3.getOutputPins().get(0), cp4, new Point[0]); - new GUIWire(submodelModifiable, cp4, _rsLatch2.getInputPins().get(1), new Point[0]); - new GUIWire(submodelModifiable, cp4, nand2.getInputPins().get(0), new Point(100, 65)); - new GUIWire(submodelModifiable, _rsLatch2.getOutputPins().get(0), Q); - new GUIWire(submodelModifiable, _rsLatch2.getOutputPins().get(1), _Q); + new GUIWire(submodelModifiable, cp1, _rsLatch1.getPin("_R"), new Point[0]); + new GUIWire(submodelModifiable, cp1, nand3.getPin("B"), new Point(10, 55)); + new GUIWire(submodelModifiable, D, nand2.getPin("B"), new Point[0]); + new GUIWire(submodelModifiable, nand2.getPin("Y"), cp2, new Point(145, 70), new Point(145, 85), new Point(20, 85)); + new GUIWire(submodelModifiable, cp2, _rsLatch1.getPin("_S"), new Point(20, 15)); + new GUIWire(submodelModifiable, cp2, nand3.getPin("C"), new Point[0]); + new GUIWire(submodelModifiable, _rsLatch1.getPin("_Q"), cp3, new Point(100, 25)); + new GUIWire(submodelModifiable, cp3, nand3.getPin("A"), new Point(30, 35), new Point(30, 45)); + new GUIWire(submodelModifiable, cp3, _rsLatch2.getPin("_S"), new Point[0]); + new GUIWire(submodelModifiable, nand3.getPin("Y"), cp4, new Point[0]); + new GUIWire(submodelModifiable, cp4, _rsLatch2.getPin("_R"), new Point[0]); + new GUIWire(submodelModifiable, cp4, nand2.getPin("A"), new Point(100, 65)); + new GUIWire(submodelModifiable, _rsLatch2.getPin("Q"), Q); + new GUIWire(submodelModifiable, _rsLatch2.getPin("_Q"), _Q); } } \ No newline at end of file