X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=era.mi%2Fsrc%2Fera%2Fmi%2Flogic%2Fcomponents%2Fgates%2FAndGate.java;h=b3269cbd48a4ffab3170dd2aaf0b99646f2ca8dc;hb=fa95c348b3b8fb9681e4bf5c8284c5ac8eeed518;hp=762eeef8b553aa0901a5c91ab47c5f9f525e796a;hpb=a4c5cfb856026771dfcf31eb22434b8b6ff20ad4;p=Mograsim.git diff --git a/era.mi/src/era/mi/logic/components/gates/AndGate.java b/era.mi/src/era/mi/logic/components/gates/AndGate.java index 762eeef8..b3269cbd 100644 --- a/era.mi/src/era/mi/logic/components/gates/AndGate.java +++ b/era.mi/src/era/mi/logic/components/gates/AndGate.java @@ -1,12 +1,14 @@ package era.mi.logic.components.gates; import era.mi.logic.Util; -import era.mi.logic.WireArray; import era.mi.logic.components.BasicComponent; +import era.mi.logic.wires.WireArray; +import era.mi.logic.wires.WireArray.WireArrayInput; public class AndGate extends BasicComponent { private WireArray a, b, out; + private WireArrayInput outI; public AndGate(int processTime, WireArray a, WireArray b, WireArray out) { @@ -16,11 +18,12 @@ public class AndGate extends BasicComponent this.b = b; b.addObserver(this); this.out = out; + outI = out.createInput(); } protected void compute() { - out.feedSignals(Util.and(a.getValues(), b.getValues())); + outI.feedSignals(Util.and(a.getValues(), b.getValues())); } public WireArray getA()