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.WireArrayInput;
public Connector(WireArray a, WireArray b)
{
if (a.length != b.length)
- throw new IllegalArgumentException("WireArray width does not match: " + a.length + ", " + b.length);
+ throw new IllegalArgumentException(String.format("WireArray width does not match: %o, %o", a.length, b.length));
this.a = a;
this.b = b;
a.addObserver(this);
}
@Override
- public void update(WireArray initiator)
+ public void update(WireArray initiator, Bit[] oldValues)
{
Simulation.TIMELINE.addEvent((e) ->
{
if (initiator == a)
- bI.feedSignals(a.getValues());
+ bI.feedSignals(aI.wireValuesExcludingMe());
else
- aI.feedSignals(b.getValues());
+ aI.feedSignals(bI.wireValuesExcludingMe());
}, 1);
}
}