projects
/
Mograsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed calculations concerning U, tests work now just like before
[Mograsim.git]
/
era.mi
/
src
/
era
/
mi
/
logic
/
wires
/
WireArray.java
diff --git
a/era.mi/src/era/mi/logic/wires/WireArray.java
b/era.mi/src/era/mi/logic/wires/WireArray.java
index
4b5fdc7
..
a0bd7f8
100644
(file)
--- a/
era.mi/src/era/mi/logic/wires/WireArray.java
+++ b/
era.mi/src/era/mi/logic/wires/WireArray.java
@@
-61,12
+61,7
@@
public class WireArray
Bit[] bits = input.getValues();
for (int i = 0; i < length; i++)
{
Bit[] bits = input.getValues();
for (int i = 0; i < length; i++)
{
- if (Bit.Z.equals(bits[i]) || newValues[i].equals(bits[i]))
- continue;
- else if (Bit.Z.equals(newValues[i]))
- newValues[i] = bits[i];
- else
- newValues[i] = Bit.X;
+ newValues[i] = newValues[i].combineWith(bits[i]);
}
}
}
}
@@
-257,7
+252,7
@@
public class WireArray
private void initValues()
{
private void initValues()
{
- inputValues = Bit.
Z
.makeArray(length);
+ inputValues = Bit.
U
.makeArray(length);
}
/**
}
/**