projects
/
Mograsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Refactored Wire and finally renamed length to width
[Mograsim.git]
/
net.mograsim.logic.core
/
src
/
net
/
mograsim
/
logic
/
core
/
components
/
ManualSwitch.java
diff --git
a/net.mograsim.logic.core/src/net/mograsim/logic/core/components/ManualSwitch.java
b/net.mograsim.logic.core/src/net/mograsim/logic/core/components/ManualSwitch.java
index
26238fe
..
40f0005
100644
(file)
--- a/
net.mograsim.logic.core/src/net/mograsim/logic/core/components/ManualSwitch.java
+++ b/
net.mograsim.logic.core/src/net/mograsim/logic/core/components/ManualSwitch.java
@@
-32,12
+32,12
@@
public class ManualSwitch extends Component implements LogicObservable
public void switchFullOn()
{
public void switchFullOn()
{
- setState(BitVector.of(Bit.ONE, output.
leng
th()));
+ setState(BitVector.of(Bit.ONE, output.
wid
th()));
}
public void switchFullOff()
{
}
public void switchFullOff()
{
- setState(BitVector.of(Bit.ZERO, output.
leng
th()));
+ setState(BitVector.of(Bit.ZERO, output.
wid
th()));
}
public void toggle()
}
public void toggle()
@@
-55,7
+55,7
@@
public class ManualSwitch extends Component implements LogicObservable
public void setState(BitVector bits)
{
public void setState(BitVector bits)
{
- if (bits.length() != output.
leng
th())
+ if (bits.length() != output.
wid
th())
throw new IllegalArgumentException("Incorrect bit vector length");
if (bits.equals(output.getInputValues()))
return;
throw new IllegalArgumentException("Incorrect bit vector length");
if (bits.equals(output.getInputValues()))
return;
@@
-65,7
+65,7
@@
public class ManualSwitch extends Component implements LogicObservable
public boolean isFullOn()
{
public boolean isFullOn()
{
- return BitVector.of(Bit.ONE, output.
leng
th()).equals(output.getInputValues());
+ return BitVector.of(Bit.ONE, output.
wid
th()).equals(output.getInputValues());
}
public BitVector getValues()
}
public BitVector getValues()