X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=era.mi%2Fsrc%2Fera%2Fmi%2Flogic%2Fcomponents%2Fgates%2FOrGate.java;h=c1d95a7846432f98f393ed6ae9bc6557c7ca537c;hb=fa95c348b3b8fb9681e4bf5c8284c5ac8eeed518;hp=06296bab6de7fbf19a94293e04ece0f1f51a2b5a;hpb=a4c5cfb856026771dfcf31eb22434b8b6ff20ad4;p=Mograsim.git diff --git a/era.mi/src/era/mi/logic/components/gates/OrGate.java b/era.mi/src/era/mi/logic/components/gates/OrGate.java index 06296bab..c1d95a78 100644 --- a/era.mi/src/era/mi/logic/components/gates/OrGate.java +++ b/era.mi/src/era/mi/logic/components/gates/OrGate.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 OrGate extends BasicComponent { private WireArray a, b, out; + private WireArrayInput outI; public OrGate(int processTime, WireArray a, WireArray b, WireArray out) { @@ -16,11 +18,12 @@ public class OrGate extends BasicComponent this.b = b; b.addObserver(this); this.out = out; + this.outI = out.createInput(); } protected void compute() { - out.feedSignals(Util.or(a.getValues(), b.getValues())); + outI.feedSignals(Util.or(a.getValues(), b.getValues())); } public WireArray getA()