addPin(new Pin(model, this, "_PL", 1, PinUsage.OUTPUT, 5, 85), Position.TOP);
addPin(new Pin(model, this, "_MAP", 1, PinUsage.OUTPUT, 15, 85), Position.TOP);
addPin(new Pin(model, this, "_VECT", 1, PinUsage.OUTPUT, 25, 85), Position.TOP);
- addPin(new Pin(model, this, "RWE", 1, PinUsage.OUTPUT, 30, 5), Position.LEFT);
+ addPin(new Pin(model, this, "RLD", 1, PinUsage.OUTPUT, 30, 5), Position.LEFT);
addPin(new Pin(model, this, "RDEC", 1, PinUsage.OUTPUT, 30, 15), Position.LEFT);
addPin(new Pin(model, this, "YD", 1, PinUsage.OUTPUT, 30, 25), Position.LEFT);
addPin(new Pin(model, this, "YR", 1, PinUsage.OUTPUT, 30, 35), Position.LEFT);
ReadWriteEnd _PL = readWriteEnds.get("_PL");
ReadWriteEnd _MAP = readWriteEnds.get("_MAP");
ReadWriteEnd _VECT = readWriteEnds.get("_VECT");
- ReadWriteEnd RWE = readWriteEnds.get("RWE");
+ ReadWriteEnd RLD = readWriteEnds.get("RLD");
ReadWriteEnd RDEC = readWriteEnds.get("RDEC");
ReadWriteEnd YD = readWriteEnds.get("YD");
ReadWriteEnd YR = readWriteEnds.get("YR");
_PL.feedSignals(U);
_MAP.feedSignals(U);
_VECT.feedSignals(U);
- RWE.feedSignals(U);
+ RLD.feedSignals(U);
RDEC.feedSignals(U);
YD.feedSignals(U);
YR.feedSignals(U);
_PL.feedSignals(X);
_MAP.feedSignals(X);
_VECT.feedSignals(X);
- RWE.feedSignals(X);
+ RLD.feedSignals(X);
RDEC.feedSignals(X);
YD.feedSignals(X);
YR.feedSignals(X);
_VECT.feedSignals(_VECTVal);
if (IAsInt == 8 || IAsInt == 9 || IAsInt == 15)
{
- RWE.feedSignals(Req0Val);
+ RLD.feedSignals(ZERO);
RDEC.feedSignals(Req0Val);// "forward" X/U/Z
} else if (IAsInt == 4)
{
- RWE.feedSignals(PASSVal);
- RDEC.feedSignals(PASSVal == ONE ? ZERO : PASSVal);// "forward" X/U/Z
+ RLD.feedSignals(PASSVal);// "forward" X/U/Z
+ RDEC.feedSignals(X);
} else if (IAsInt == 12)
{
- RWE.feedSignals(ONE);
- RDEC.feedSignals(ZERO);
+ RLD.feedSignals(ONE);
+ RDEC.feedSignals(X);
} else
{
- RWE.feedSignals(ZERO);
+ RLD.feedSignals(ZERO);
RDEC.feedSignals(ZERO);
}
if (!PASSVal.isBinary())
setSize(40, 40);
addPin(new Pin(model, this, "D", 12, PinUsage.INPUT, 20, 0), Position.BOTTOM);
addPin(new Pin(model, this, "_RLD", 1, PinUsage.INPUT, 0, 5), Position.RIGHT);
- addPin(new Pin(model, this, "WE", 1, PinUsage.INPUT, 0, 20), Position.RIGHT);
+ addPin(new Pin(model, this, "LD", 1, PinUsage.INPUT, 0, 20), Position.RIGHT);
addPin(new Pin(model, this, "DEC", 1, PinUsage.INPUT, 0, 30), Position.RIGHT);
addPin(new Pin(model, this, "C", 1, PinUsage.INPUT, 40, 20), Position.LEFT);
addPin(new Pin(model, this, "Y", 12, PinUsage.OUTPUT, 20, 40), Position.TOP);
ReadEnd D = readEnds.get("D");
ReadEnd _RLD = readEnds.get("_RLD");
- ReadEnd WE = readEnds.get("WE");
+ ReadEnd LD = readEnds.get("LD");
ReadEnd DEC = readEnds.get("DEC");
ReadEnd C = readEnds.get("C");
ReadWriteEnd Y = readWriteEnds.get("Y");
// TODO handle U/X/Z
if (oldCVal == ZERO && CVal == ONE)
{
- if ((DEC.getValue() == ZERO && WE.getValue() == ONE) || _RLD.getValue() == ZERO)
+ if (LD.getValue() == ONE || _RLD.getValue() == ZERO)
System.arraycopy(D.getValues().getBits(), 0, QC, 0, 12);
- else if (WE.getValue() == ONE)
+ else if (DEC.getValue() == ONE)
{
Bit carry = Bit.ZERO;
// TODO extract to helper. This code almost also exists in Modelinc.