X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=net.mograsim.logic.core%2Fsrc%2Fnet%2Fmograsim%2Flogic%2Fcore%2Fcomponents%2Fgates%2FMultiInputGate.java;fp=net.mograsim.logic.core%2Fsrc%2Fnet%2Fmograsim%2Flogic%2Fcore%2Fcomponents%2Fgates%2FMultiInputGate.java;h=d7fecc19f54f69066b79d5b1fa37fcb45d423440;hb=3e6ac3d7fd389191d02c1c6982fbf093421ce4f2;hp=da30281da5bf69520f33c262a433ca1ac0d73d4b;hpb=2e7dc40f788b00146f2d0805fecd9d23adbda363;p=Mograsim.git diff --git a/net.mograsim.logic.core/src/net/mograsim/logic/core/components/gates/MultiInputGate.java b/net.mograsim.logic.core/src/net/mograsim/logic/core/components/gates/MultiInputGate.java index da30281d..d7fecc19 100644 --- a/net.mograsim.logic.core/src/net/mograsim/logic/core/components/gates/MultiInputGate.java +++ b/net.mograsim.logic.core/src/net/mograsim/logic/core/components/gates/MultiInputGate.java @@ -13,7 +13,7 @@ public abstract class MultiInputGate extends BasicComponent { protected ReadEnd[] in; protected ReadWriteEnd out; - protected final int length; + protected final int width; protected MutationOperation op; protected boolean invert = false; @@ -21,13 +21,13 @@ public abstract class MultiInputGate extends BasicComponent { super(timeline, processTime); this.op = op; - length = out.length(); + width = out.width(); this.in = in.clone(); if (in.length < 1) throw new IllegalArgumentException(String.format("Cannot create gate with %d wires.", in.length)); for (ReadEnd w : in) { - if (w.length() != length) + if (w.width() != width) throw new IllegalArgumentException("All wires connected to the gate must be of uniform length."); w.registerObserver(this); }