<> <> DIRECTORY Commander, IFUPLAFetchDecode, IO, PLAOps; IFUPLAFetchDecodeImpl: CEDAR PROGRAM IMPORTS Commander, IO, PLAOps ~ BEGIN OPEN IFUPLAFetchDecode, PO: PLAOps; FetchRdDecodePLA: PLAOps.PLA; FetchWtDecodePLA: PLAOps.PLA; <> <> GenFetchRdDecodePLA: PROC = { FOR fetchRd: CARDINAL IN [0..16) DO val: CARDINAL _ 1; THROUGH [0..fetchRd) DO val _ val*2 ENDLOOP; SetRd[m:[fetchRd: 15], d:[fetchRd: fetchRd], out:[fetchBufRdByte: val]]; ENDLOOP}; GenFetchWtDecodePLA: PROC = { FOR fetchWt: CARDINAL IN [0..4) DO val: CARDINAL _ 1; THROUGH [0..fetchWt) DO val _ val*2 ENDLOOP; SetWt[ m: [fetching: TRUE, fetchWt: 3], d: [fetching: TRUE, fetchWt: fetchWt], out:[fetchBufWtWd: val]]; ENDLOOP}; BER: PROC [m, d: FetchRdDecodeIn] RETURNS[PLAOps.BoolExpr] = { mRef: REF FetchRdDecodeIn _ NARROW[FetchRdDecodePLA.mask]; dRef: REF FetchRdDecodeIn _ NARROW[FetchRdDecodePLA.data]; mRef^ _ m; dRef^ _ d; RETURN[PLAOps.GetBEForDataMask[FetchRdDecodePLA]]}; BEW: PROC [m, d: FetchWtDecodeIn] RETURNS[PLAOps.BoolExpr] = { mRef: REF FetchWtDecodeIn _ NARROW[FetchWtDecodePLA.mask]; dRef: REF FetchWtDecodeIn _ NARROW[FetchWtDecodePLA.data]; mRef^ _ m; dRef^ _ d; RETURN[PLAOps.GetBEForDataMask[FetchWtDecodePLA]]}; SetRd: PROC [s: PLAOps.BoolExpr _ NIL, m, d: FetchRdDecodeIn _[], out: FetchRdDecodeOut]={ res: REF FetchRdDecodeOut _ NARROW[FetchRdDecodePLA.out]; IF s=NIL THEN s _ BER[m,d] ELSE s _ PLAOps.And[s, BER[m,d] ]; res^ _ out; PLAOps.SetOutForBE[FetchRdDecodePLA, s]}; SetWt: PROC [s: PLAOps.BoolExpr _ NIL, m, d: FetchWtDecodeIn_[], out: FetchWtDecodeOut]={ res: REF FetchWtDecodeOut _ NARROW[FetchWtDecodePLA.out]; IF s=NIL THEN s _ BEW[m,d] ELSE s _ PLAOps.And[s, BEW[m,d] ]; res^ _ out; PLAOps.SetOutForBE[FetchWtDecodePLA, s]}; GenFetchDecode: Commander.CommandProc = { rdInType: IO.ROPE _ "IFUPLAFetchDecode.FetchRdDecodeIn"; wtInType: IO.ROPE _ "IFUPLAFetchDecode.FetchWtDecodeIn"; FetchRdDecodePLA _ PO.NewPLA[rdInType, "IFUPLAFetchDecode.FetchRdDecodeOut"]; FetchWtDecodePLA _ PO.NewPLA[wtInType, "IFUPLAFetchDecode.FetchWtDecodeOut"]; GenFetchRdDecodePLA []; GenFetchWtDecodePLA []; [] _PO.ConvertTermListToCompleteSum[FetchRdDecodePLA.termList, FALSE,FALSE,cmd.out]; [] _PO.ConvertTermListToCompleteSum[FetchWtDecodePLA.termList, FALSE,FALSE,cmd.out]; [] _PO.FindAMinimalCover[FetchRdDecodePLA.termList, 120, cmd.out]; [] _PO.FindAMinimalCover[FetchWtDecodePLA.termList, 120, cmd.out]; PO.WritePLAFile[ "IFUPLAFetchRdDecode.ttt", cmd.out, FetchRdDecodePLA]; PO.WritePLAFile[ "IFUPLAFetchWtDecode.ttt", cmd.out, FetchWtDecodePLA]}; Commander.Register[key:"GenFetchDecode", proc: GenFetchDecode]; END.