projects
/
Mograsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'development' of
[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
8b28511
..
b8990cc
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
@@
-389,9
+389,9
@@
public class Wire
public void feedSignals(BitVector newValues)
{
public void feedSignals(BitVector newValues)
{
- if (newValues.
wid
th() != width)
+ if (newValues.
leng
th() != width)
throw new IllegalArgumentException(
throw new IllegalArgumentException(
- String.format("Attempted to input %d bits instead of %d bits.", newValues.
wid
th(), width));
+ String.format("Attempted to input %d bits instead of %d bits.", newValues.
leng
th(), width));
if (!open)
throw new IllegalStateException("Attempted to write to closed WireArrayEnd.");
timeline.addEvent(e -> setValues(newValues), travelTime);
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();
if (!inputValues.equalsWithOffset(newValues, startingBit))
{
Bit[] vals = inputValues.getBits();
- System.arraycopy(newValues.getBits(), 0, vals, startingBit, newValues.
wid
th());
+ System.arraycopy(newValues.getBits(), 0, vals, startingBit, newValues.
leng
th());
inputValues = BitVector.of(vals);
Wire.this.recalculate();
}
inputValues = BitVector.of(vals);
Wire.this.recalculate();
}