IFUPLAImpl.mesa
Copyright © 1984 by Xerox Corporation. All rights reserved.
Last edited by Twilliams, August 27, 1984 6:28:59 pm PDT
Last edited by Curry, June 1, 1986 7:26:50 pm PDT
Last edited by McCreight, May 20, 1986 6:16:49 pm PDT
DIRECTORY
Commander,
IFUPLA,
IO,
PLAOps,
REFBit;
IFUPLAImpl: CEDAR PROGRAM IMPORTS Commander, IO, PLAOps, REFBit
EXPORTS IFUPLA =
BEGIN OPEN IFUPLA;
ReadIFUPLAs: Commander.CommandProc =
BEGIN
FOR pla: PLAs IN PLAs DO
IFUPLARead[pla, cmd.out];
ENDLOOP;
END;
IFUPLARead: PROC [ plaType: PLAs, log: IO.STREAMIO.noWhereStream ] =
BEGIN
fileName: IO.ROPEIO.PutFR["%g.ttt", IO.rope[plaDescriptions[plaType].fileName]];
plas[plaType]    ← PLAOps.ReadPLAFile[fileName, log];
IF plaDescriptions[plaType].input # plaType THEN { -- use another PLA's input
IF REFBit.Size[plas[plaType].data] = REFBit.Size[plas[plaDescriptions[plaType].input].data] THEN {
plas[plaType].data ← plas[plaDescriptions[plaType].input].data;
}
ELSE ERROR;
};
plaSizes[plaType][input] ← REFBit.Size[plas[plaType].data];
plaSizes[plaType][output] ← REFBit.Size[plas[plaType].out];
END;
IFUPLAEval: PUBLIC PROC [ plaType: PLAs ] = {PLAOps.GetOutForData[plas[plaType]]};
plas: PUBLIC ARRAY IFUPLA.PLAs OF PLAOps.PLA;
PlaDescription: TYPE = RECORD [ fileName: IO.ROPE, input: IFUPLA.PLAs ];
plaDescriptions: PUBLIC ARRAY IFUPLA.PLAs OF PlaDescription ← [
fetchControl:   ["IFUPLAFetchControl",  fetchControl],
fetchRdDecode:  ["IFUPLAFetchRdDecode",  fetchRdDecode],
fetchWtDecode:  ["IFUPLAFetchWtDecode",  fetchWtDecode],
fetchPreDecode:  ["IFUPLAFetchPreDecode",  fetchPreDecode],
instrDecode0:   ["IFUPLAInstrDecode0",  instrDecode0],
instrDecode1:   ["IFUPLAInstrDecode1",  instrDecode0],
instrDecode2:   ["IFUPLAInstrDecode2",  instrDecode0],
instrDecode3:   ["IFUPLAInstrDecode3",  instrDecode0],
instrDecode4:   ["IFUPLAInstrDecode4",  instrDecode0],
instrDecode5:   ["IFUPLAInstrDecode5",  instrDecode0],
instrDecode6:   ["IFUPLAInstrDecode6",  instrDecode0],
interlock:    ["IFUPLAInterlock",    interlock],
mainPipeControl: ["IFUPLAMainPipeControl", mainPipeControl],
stackAControl:  ["IFUPLAStackAControl",  stackAControl],
stackBControl:  ["IFUPLAStackBControl",  stackBControl],
stackDecode:   ["IFUPLAStackDecode",   stackDecode],
passRtAB:   ["IFUPLAPassRtAB",   passRtAB],
passRtBA:   ["IFUPLAPassRtBA",   passRtBA],
passLtB:    ["IFUPLAPassLtB",    passLtB]
];
plaSizes: PUBLIC ARRAY IFUPLA.PLAs OF ARRAY Sense OF NATALL[ALL[0]];
Commander.Register[key:"IFUPLA",  proc: ReadIFUPLAs,  doc: "Reads in the IFU PLA's"];
END.