X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=net.mograsim.logic.core%2Fsrc%2Fnet%2Fmograsim%2Flogic%2Fcore%2Fwires%2FWire.java;h=b8990cc2d5769d57b918b32d7677b60eb20fe0f2;hb=61621670ab3ea56eea6571cc9bba5e015c9f0861;hp=8b28511e90a5a4c2efab433ecb76fca7604b8999;hpb=f37f1f93f2c1ceb780f1c7ecab888bcb8f4f8b89;p=Mograsim.git diff --git a/net.mograsim.logic.core/src/net/mograsim/logic/core/wires/Wire.java b/net.mograsim.logic.core/src/net/mograsim/logic/core/wires/Wire.java index 8b28511e..b8990cc2 100644 --- a/net.mograsim.logic.core/src/net/mograsim/logic/core/wires/Wire.java +++ b/net.mograsim.logic.core/src/net/mograsim/logic/core/wires/Wire.java @@ -389,9 +389,9 @@ public class Wire public void feedSignals(BitVector newValues) { - if (newValues.width() != width) + if (newValues.length() != width) throw new IllegalArgumentException( - String.format("Attempted to input %d bits instead of %d bits.", newValues.width(), width)); + String.format("Attempted to input %d bits instead of %d bits.", newValues.length(), width)); if (!open) throw new IllegalStateException("Attempted to write to closed WireArrayEnd."); timeline.addEvent(e -> setValues(newValues), travelTime); @@ -422,7 +422,7 @@ public class Wire if (!inputValues.equalsWithOffset(newValues, startingBit)) { Bit[] vals = inputValues.getBits(); - System.arraycopy(newValues.getBits(), 0, vals, startingBit, newValues.width()); + System.arraycopy(newValues.getBits(), 0, vals, startingBit, newValues.length()); inputValues = BitVector.of(vals); Wire.this.recalculate(); }