Refactored BitVector methods to resolve ambiguity
[Mograsim.git] / net.mograsim.logic.core / src / net / mograsim / logic / core / wires / Wire.java
index f424471..6310d5b 100644 (file)
@@ -150,14 +150,20 @@ public class Wire
                return val;\r
        }\r
 \r
+       /**\r
+        * Returns the least significant bit (LSB)\r
+        */\r
        public Bit getValue()\r
        {\r
                return getValue(0);\r
        }\r
 \r
+       /**\r
+        * Returns the least significant bit (LSB) of the given index\r
+        */\r
        public Bit getValue(int index)\r
        {\r
-               return values.getBit(index);\r
+               return values.getLSBit(index);\r
        }\r
 \r
        public BitVector getValues(int start, int end)\r
@@ -446,7 +452,8 @@ public class Wire
                }\r
 \r
                /**\r
-                * @return The value (of bit 0) the {@link ReadEnd} is currently feeding into the associated {@link Wire}.\r
+                * @return The value (of bit 0) the {@link ReadEnd} is currently feeding into the associated {@link Wire}.Returns the least\r
+                *         significant bit (LSB)\r
                 */\r
                public Bit getInputValue()\r
                {\r
@@ -455,10 +462,12 @@ public class Wire
 \r
                /**\r
                 * @return The value which the {@link ReadEnd} is currently feeding into the associated {@link Wire} at the indexed {@link Bit}.\r
+                *         Returns the least significant bit (LSB)\r
+                * \r
                 */\r
                public Bit getInputValue(int index)\r
                {\r
-                       return inputValues.getBit(index);\r
+                       return inputValues.getLSBit(index);\r
                }\r
 \r
                /**\r
@@ -466,7 +475,7 @@ public class Wire
                 */\r
                public BitVector getInputValues()\r
                {\r
-                       return getInputValues(0, length);\r
+                       return inputValues;\r
                }\r
 \r
                public BitVector getInputValues(int start, int end)\r