X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=net.mograsim.logic.core%2Fsrc%2Fnet%2Fmograsim%2Flogic%2Fcore%2Fwires%2FWire.java;h=6310d5b449fe51f707d4fe38a8d46f4b9586ef19;hb=e2258789906b9be977a37669062d6a996be57e9c;hp=f42447192389529039a42a181861b0dc4975071d;hpb=1ddc8ecf420fd4ccbe351c0cbd58cc9f5792f0c7;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 f4244719..6310d5b4 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 @@ -150,14 +150,20 @@ public class Wire return val; } + /** + * Returns the least significant bit (LSB) + */ public Bit getValue() { return getValue(0); } + /** + * Returns the least significant bit (LSB) of the given index + */ public Bit getValue(int index) { - return values.getBit(index); + return values.getLSBit(index); } public BitVector getValues(int start, int end) @@ -446,7 +452,8 @@ public class Wire } /** - * @return The value (of bit 0) the {@link ReadEnd} is currently feeding into the associated {@link Wire}. + * @return The value (of bit 0) the {@link ReadEnd} is currently feeding into the associated {@link Wire}.Returns the least + * significant bit (LSB) */ public Bit getInputValue() { @@ -455,10 +462,12 @@ public class Wire /** * @return The value which the {@link ReadEnd} is currently feeding into the associated {@link Wire} at the indexed {@link Bit}. + * Returns the least significant bit (LSB) + * */ public Bit getInputValue(int index) { - return inputValues.getBit(index); + return inputValues.getLSBit(index); } /** @@ -466,7 +475,7 @@ public class Wire */ public BitVector getInputValues() { - return getInputValues(0, length); + return inputValues; } public BitVector getInputValues(int start, int end)