From: Daniel Kirschten Date: Wed, 25 Mar 2020 22:19:27 +0000 (+0100) Subject: Am2910: Changed communication between reg and instrdecode X-Git-Url: https://mograsim.net/gitweb/?p=Mograsim.git;a=commitdiff_plain;h=66ec8ddc6e89cf0a41e8b82b279b241bbdde59f2 Am2910: Changed communication between reg and instrdecode --- diff --git a/plugins/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/am2910/Am2910.json b/plugins/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/am2910/Am2910.json index 222d6674..4ad69a19 100644 --- a/plugins/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/am2910/Am2910.json +++ b/plugins/net.mograsim.logic.model.am2900/components/net/mograsim/logic/model/am2900/components/am2910/Am2910.json @@ -472,11 +472,11 @@ { "pin1": { "compName": "Am2910InstrPLA#0", - "pinName": "RWE" + "pinName": "RLD" }, "pin2": { "compName": "Am2910RegCntr#0", - "pinName": "WE" + "pinName": "LD" }, "name": "unnamedWire#11", "path": [ diff --git a/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/components/am2910/ModelAm2910InstrPLA.java b/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/components/am2910/ModelAm2910InstrPLA.java index a00fc302..c93c4e31 100644 --- a/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/components/am2910/ModelAm2910InstrPLA.java +++ b/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/components/am2910/ModelAm2910InstrPLA.java @@ -29,7 +29,7 @@ public class ModelAm2910InstrPLA extends SimpleRectangularHardcodedModelComponen 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); @@ -50,7 +50,7 @@ public class ModelAm2910InstrPLA extends SimpleRectangularHardcodedModelComponen 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"); @@ -73,7 +73,7 @@ public class ModelAm2910InstrPLA extends SimpleRectangularHardcodedModelComponen _PL.feedSignals(U); _MAP.feedSignals(U); _VECT.feedSignals(U); - RWE.feedSignals(U); + RLD.feedSignals(U); RDEC.feedSignals(U); YD.feedSignals(U); YR.feedSignals(U); @@ -86,7 +86,7 @@ public class ModelAm2910InstrPLA extends SimpleRectangularHardcodedModelComponen _PL.feedSignals(X); _MAP.feedSignals(X); _VECT.feedSignals(X); - RWE.feedSignals(X); + RLD.feedSignals(X); RDEC.feedSignals(X); YD.feedSignals(X); YR.feedSignals(X); @@ -112,19 +112,19 @@ public class ModelAm2910InstrPLA extends SimpleRectangularHardcodedModelComponen _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()) diff --git a/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/components/am2910/ModelAm2910RegCntr.java b/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/components/am2910/ModelAm2910RegCntr.java index 7bdc703f..baa19bf3 100644 --- a/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/components/am2910/ModelAm2910RegCntr.java +++ b/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/components/am2910/ModelAm2910RegCntr.java @@ -26,7 +26,7 @@ public class ModelAm2910RegCntr extends SimpleRectangularHardcodedModelComponent 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); @@ -41,7 +41,7 @@ public class ModelAm2910RegCntr extends SimpleRectangularHardcodedModelComponent 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"); @@ -52,9 +52,9 @@ public class ModelAm2910RegCntr extends SimpleRectangularHardcodedModelComponent // 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.