Did some clean up
[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
deleted file mode 100644 (file)
index 9a8d3fc..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-package era.mi.logic.tests;
-
-import era.mi.logic.Bit;
-import era.mi.logic.Simulation;
-import era.mi.logic.wires.WireArray;
-import era.mi.logic.wires.WireArray.WireArrayEnd;
-import era.mi.logic.wires.WireArrayObserver;
-
-public class Connector implements WireArrayObserver
-{
-       private final WireArray a;
-//     private final WireArray b;
-       private final WireArrayEnd aI;
-       private final WireArrayEnd bI;
-
-       public Connector(WireArray a, WireArray b)
-       {
-               if (a.length != b.length)
-                       throw new IllegalArgumentException(String.format("WireArray width does not match: %d, %d", a.length, b.length));
-               this.a = a;
-//             this.b = b;
-               a.addObserver(this);
-               b.addObserver(this);
-               aI = a.createInput();
-               bI = b.createInput();
-       }
-
-       @Override
-       public void update(WireArray initiator, Bit[] oldValues)
-       {
-               Simulation.TIMELINE.addEvent((e) ->
-               {
-                       if (initiator == a)
-                               bI.feedSignals(aI.wireValuesExcludingMe());
-                       else
-                               aI.feedSignals(bI.wireValuesExcludingMe());
-               }, 1);
-       }
-}