<> <> <> <> <> <> DIRECTORY Commander, IFUPLA, IO, PLAOps, REFBit; IFUPLAImpl: CEDAR PROGRAM IMPORTS Commander, IO, PLAOps, REFBit EXPORTS IFUPLA = BEGIN OPEN IFUPLA; ReadIFUPLAs: Commander.CommandProc = { FOR pla: PLAs IN PLAs DO IFUPLARead[pla, cmd.out]; ENDLOOP}; IFUPLARead: PROC [ plaType: PLAs, log: IO.STREAM _ IO.noWhereStream ] = { 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]}; 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], instrDecode: ["IFUPLAInstrDecode", instrDecode], 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], ltDrPadIO: ["IFUPLAPassLtDrPadIO", ltDrPadIO], rtDrPadIO: ["IFUPLAPassRtDrPadIO", rtDrPadIO] ]; plaSizes: PUBLIC ARRAY IFUPLA.PLAs OF ARRAY Sense OF NAT _ ALL[ALL[0]]; Commander.Register[key:"IFUPLA", proc: ReadIFUPLAs, doc: "Reads in the IFU PLA's"]; END.