IFUPLARead:
PROC [ plaType: PLAs, log:
IO.
STREAM ←
IO.noWhereStream ] =
BEGIN
fileName: IO.ROPE ← IO.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;
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]
];
Commander.Register[key:"IFUPLA", proc: ReadIFUPLAs, doc: "Reads in the IFU PLA's"];