projects
/
Mograsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added prototype component for main memory
[Mograsim.git]
/
net.mograsim.logic.core
/
src
/
net
/
mograsim
/
logic
/
core
/
wires
/
Wire.java
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
f424471
..
6f747c5
100644
(file)
--- 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;
\r
}
\r
\r
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
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
public Bit getValue(int index)
\r
{
\r
- return values.getBit(index);
\r
+ return values.get
LS
Bit(index);
\r
}
\r
\r
public BitVector getValues(int start, int end)
\r
}
\r
\r
public BitVector getValues(int start, int end)
\r
@@
-259,12
+265,6
@@
public class Wire
return Wire.this.getValue(index);
\r
}
\r
\r
return Wire.this.getValue(index);
\r
}
\r
\r
- /**
\r
- * @param index Index of the requested bit.
\r
- * @return The value of the indexed bit.
\r
- *
\r
- * @author Fabian Stemmler
\r
- */
\r
public BitVector getValues()
\r
{
\r
return Wire.this.getValues();
\r
public BitVector getValues()
\r
{
\r
return Wire.this.getValues();
\r
@@
-446,7
+446,8
@@
public class Wire
}
\r
\r
/**
\r
}
\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
*/
\r
public Bit getInputValue()
\r
{
\r
@@
-455,10
+456,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
\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
*/
\r
public Bit getInputValue(int index)
\r
{
\r
- return inputValues.getBit(index);
\r
+ return inputValues.get
LS
Bit(index);
\r
}
\r
\r
/**
\r
}
\r
\r
/**
\r
@@
-466,7
+469,7
@@
public class Wire
*/
\r
public BitVector getInputValues()
\r
{
\r
*/
\r
public BitVector getInputValues()
\r
{
\r
- return
getInputValues(0, length)
;
\r
+ return
inputValues
;
\r
}
\r
\r
public BitVector getInputValues(int start, int end)
\r
}
\r
\r
public BitVector getInputValues(int start, int end)
\r