projects
/
Mograsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
WireArray(Input) is now Wire(End); all in-/outputs are now WireEnds
[Mograsim.git]
/
era.mi
/
src
/
era
/
mi
/
logic
/
tests
/
Connector.java
diff --git
a/era.mi/src/era/mi/logic/tests/Connector.java
b/era.mi/src/era/mi/logic/tests/Connector.java
index
7887ff2
..
12c407a
100644
(file)
--- a/
era.mi/src/era/mi/logic/tests/Connector.java
+++ b/
era.mi/src/era/mi/logic/tests/Connector.java
@@
-2,31
+2,31
@@
package era.mi.logic.tests;
import era.mi.logic.Bit;
import era.mi.logic.Simulation;
import era.mi.logic.Bit;
import era.mi.logic.Simulation;
-import era.mi.logic.wires.Wire
Array
;
-import era.mi.logic.wires.Wire
Array.WireArrayInput
;
+import era.mi.logic.wires.Wire;
+import era.mi.logic.wires.Wire
.WireEnd
;
import era.mi.logic.wires.WireArrayObserver;
public class Connector implements WireArrayObserver
{
import era.mi.logic.wires.WireArrayObserver;
public class Connector implements WireArrayObserver
{
- private final Wire
Array
a;
-
private final WireArray b;
- private final Wire
ArrayInput
aI;
- private final Wire
ArrayInput
bI;
+ private final Wire a;
+
//
private final WireArray b;
+ private final Wire
End
aI;
+ private final Wire
End
bI;
- public Connector(Wire
Array a, WireArray
b)
+ public Connector(Wire
a, Wire
b)
{
if (a.length != b.length)
{
if (a.length != b.length)
- throw new IllegalArgumentException(String.format("WireArray width does not match: %
o, %o
", a.length, b.length));
+ throw new IllegalArgumentException(String.format("WireArray width does not match: %
d, %d
", a.length, b.length));
this.a = a;
this.a = a;
-
this.b = b;
+
//
this.b = b;
a.addObserver(this);
b.addObserver(this);
a.addObserver(this);
b.addObserver(this);
- aI = a.create
Input
();
- bI = b.create
Input
();
+ aI = a.create
End
();
+ bI = b.create
End
();
}
@Override
}
@Override
- public void update(Wire
Array
initiator, Bit[] oldValues)
+ public void update(Wire initiator, Bit[] oldValues)
{
Simulation.TIMELINE.addEvent((e) ->
{
{
Simulation.TIMELINE.addEvent((e) ->
{