DIRECTORY Commander, Dragon, DragOpsCross, IFUPLAFetchControl, IO, PLAOps; IFUPLAFetchControlImpl: CEDAR PROGRAM IMPORTS Commander, IO, PLAOps = BEGIN OPEN PO: PLAOps; FetchRdDecodePLA: PLAOps.PLA; FetchWtDecodePLA: PLAOps.PLA; FetchControlPLA: PLAOps.PLA; FetchControlIn: TYPE = IFUPLAFetchControl.FetchControlIn; FetchControlOut: TYPE = IFUPLAFetchControl.FetchControlOut; FetchRdDecodeIn: TYPE = IFUPLAFetchControl.FetchRdDecodeIn; FetchRdDecodeOut: TYPE = IFUPLAFetchControl.FetchRdDecodeOut; FetchWtDecodeIn: TYPE = IFUPLAFetchControl.FetchWtDecodeIn; FetchWtDecodeOut: TYPE = IFUPLAFetchControl.FetchWtDecodeOut; JumpOffsetSel: TYPE = IFUPLAFetchControl.JumpOffsetSel; GenFetchControlPLA: PUBLIC PROC = { pBusFaultIsSig: Dragon.PBusFaults _ LAST [Dragon.PBusFaults]; jump: PO.BoolExpr _ BE[m:[nextMacroJump: TRUE], d:[nextMacroJump: TRUE]]; reset: PO.BoolExpr _ BE[m:[reset: TRUE], d:[reset: TRUE]]; reject: PO.BoolExpr _ BE[m:[iPReject: TRUE], d:[iPReject: TRUE]]; jumpPending: PO.BoolExpr _ BE[m:[jumpPendingIn: TRUE], d:[jumpPendingIn: TRUE]]; fetching: PO.BoolExpr _ BE[m:[fetchingIn: TRUE], d:[fetchingIn: TRUE]]; roomFor1: PO.BoolExpr _ PO.Not[BE[m:[fetchBytesM1: 28], d:[fetchBytesM1: 12]] ]; roomFor2: PO.BoolExpr _ PO.Not[BE[m:[fetchBytesM1: 24], d:[fetchBytesM1: 8]] ]; iPFaulted: PO.BoolExpr _ BE[m:[iPFaultedIn: TRUE], d:[iPFaultedIn: TRUE]]; newFault: PO.BoolExpr _ BE[m:[iPFaulting: TRUE], d:[iPFaulting: TRUE]]; jmpOrJmpPend: PO.BoolExpr _ PO.Or[jump, jumpPending]; roomForFetch: PO.BoolExpr _ PO.Or[roomFor2, PO.And[PO.Not[fetching], roomFor1]]; Set[out:[jumpPending: TRUE], s:PO.And[PO.Not[reset], PO.Not[iPFaulted], jmpOrJmpPend, reject ] ]; Set[out:[newFetch: TRUE], -- sets IPCmnd3A to Fetch in next A s:PO.And[ PO.Not[reset], PO.Not[iPFaulted], PO.Not[reject], PO.Or[roomForFetch, jmpOrJmpPend] ] ]; Set[out:[fetching: TRUE], -- enables write in next B s:PO.And[ PO.Not[reset], PO.Not[iPFaulted], PO.Or[ PO.And[ reject, fetching], PO.And[PO.Not[reject], roomForFetch], PO.And[PO.Not[reject], jmpOrJmpPend] ] ] ]; Set[out:[iPFaulted: TRUE], s:PO.Or[ reset, PO.And[ PO.Not[jmpOrJmpPend], PO.Or[iPFaulted, newFault] ] ] ]; Set[out:[fetchWtIndexCtl: clear], s: jmpOrJmpPend ]; Set[out:[fetchWtIndexCtl: hold], s:PO.And[ PO.Not[jmpOrJmpPend], PO.Or[PO.Not[fetching], reject, iPFaulted] ] ]; Set[out:[fetchWtIndexCtl: inc], s:PO.And[ PO.Not[jmpOrJmpPend], fetching, PO.Not[reject], PO.Not[iPFaulted] ] ]; GenPreDecode[]}; GenPreDecode: PUBLIC PROC = { SetJumpOffset: PROC[inst: DragOpsCross.Inst, val: JumpOffsetSel] = { op: INT [0..8) _ LOOPHOLE[inst, CARDINAL]/32; IF NOT reservations[op].used THEN reservations[op] _ [TRUE, val]; IF reservations[op].val # val THEN ERROR; Set[out:[jumpOffset: val], s: BE[m:[op: 7], d:[op: op]]] }; reservations: ARRAY [0..8) OF RECORD [used: BOOL _ FALSE, val: JumpOffsetSel_beta ]; op0: PO.BoolExpr _ BE[m:[op: 4], d:[op: 4]]; op1: PO.BoolExpr _ BE[m:[op: 2], d:[op: 2]]; op2: PO.BoolExpr _ BE[m:[op: 1], d:[op: 1]]; oneByter: PO.BoolExpr _ PO.Or[ PO.And[ PO.Not[op0], PO.Not[op1], PO.Not[op2] ], PO.And[ PO.Not[op0], op1 ] ]; twoByter: PO.BoolExpr _ PO.And[ op0, PO.Not[op1] ]; threeByter: PO.BoolExpr _ PO.And[ op0, op1 ]; fiveByter: PO.BoolExpr _ PO.And[ PO.Not[op0], PO.Not[op1], op2 ]; bytesAvail0: PO.BoolExpr _ BE[m:[fetchBytesM1: 16], d:[fetchBytesM1: 16 ]]; bytesAvail1: PO.BoolExpr _ BE[m:[fetchBytesM1: 31], d:[fetchBytesM1: 0 ]]; bytesAvail2: PO.BoolExpr _ BE[m:[fetchBytesM1: 31], d:[fetchBytesM1: 1 ]]; bytesAvail3: PO.BoolExpr _ BE[m:[fetchBytesM1: 31], d:[fetchBytesM1: 2 ]]; bytesAvail4: PO.BoolExpr _ BE[m:[fetchBytesM1: 31], d:[fetchBytesM1: 3 ]]; notReady: PO.BoolExpr _ PO.Or[ bytesAvail0, PO.And[ bytesAvail1, PO.Or[ twoByter, threeByter, fiveByter ] ], PO.And[ bytesAvail2, PO.Or[ threeByter, fiveByter ] ], PO.And[ PO.Or[ bytesAvail3, bytesAvail4 ], fiveByter ] ]; Set[out:[notInstReady: TRUE], s: notReady]; Set[out:[instFault0:TRUE], s:PO.And[notReady, BE[m:[iPFaulting:TRUE], d:[iPFaulting:TRUE]]]]; Set[out:[opLength: 5, opLengthb: 5], s: fiveByter ]; Set[out:[opLength: 1, opLengthb: 1], s: oneByter ]; Set[out:[opLength: 2, opLengthb: 2], s: twoByter ]; Set[out:[opLength: 3, opLengthb: 3], s: threeByter ]; SetJumpOffset[dJB, alpha]; SetJumpOffset[dJDB, alphaBeta]; SetJumpOffset[dLFC, alphaBeta]; SetJumpOffset[dJSR, xa]; FOR inst: DragOpsCross.Inst IN [dRJEB..dRJLEBJ] DO SetJumpOffset[inst, beta] ENDLOOP; FOR inst: DragOpsCross.Inst IN [dJEBB..dJNEBBJ] DO SetJumpOffset[inst, beta] ENDLOOP}; GenFetchRdDecodePLA: PROC = { -- decode 0=>xxx.0=TRUE, 1=>xxx.1=TRUE FOR fetchRd: CARDINAL IN [0..16) DO val: CARDINAL _ 1; THROUGH (fetchRd..16) DO val _ val*2 ENDLOOP; SetRd[m:[fetchRd: 15], d:[fetchRd: fetchRd], out:[fetchBufRdByte: val]]; ENDLOOP}; GenFetchWtDecodePLA: PROC = { -- decode 0=>xxx.0=TRUE, 1=>xxx.1=TRUE FOR fetchWt: CARDINAL IN [0..4) DO val: CARDINAL _ 1; THROUGH (fetchWt..4) DO val _ val*2 ENDLOOP; SetWt[ m: [fetching: TRUE, fetchWt: 3], d: [fetching: TRUE, fetchWt: fetchWt], out:[fetchBufWtWd: val]]; ENDLOOP}; BE: PROC [m, d: FetchControlIn] RETURNS[PO.BoolExpr] = { mRef: REF FetchControlIn _ NARROW[FetchControlPLA.mask]; dRef: REF FetchControlIn _ NARROW[FetchControlPLA.data]; mRef^ _ m; dRef^ _ d; RETURN[PO.GetBEForDataMask[FetchControlPLA]]}; 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]]}; Set: PROC [s: PO.BoolExpr _ NIL, m, d: FetchControlIn _ [ ], out: FetchControlOut] = { res: REF FetchControlOut _ NARROW[FetchControlPLA.out]; IF s=NIL THEN s _ BE[m,d] ELSE s _ PO.And[s, BE[m,d] ]; res^ _ out; PO.SetOutForBE[FetchControlPLA, s]}; 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]}; GenFetchControl: Commander.CommandProc = { rdInType: IO.ROPE _ "IFUPLAFetchControl.FetchRdDecodeIn"; wtInType: IO.ROPE _ "IFUPLAFetchControl.FetchWtDecodeIn"; ctlInType: IO.ROPE _ "IFUPLAFetchControl.FetchControlIn"; FetchRdDecodePLA _ PO.NewPLA[rdInType, "IFUPLAFetchControl.FetchRdDecodeOut"]; FetchWtDecodePLA _ PO.NewPLA[wtInType, "IFUPLAFetchControl.FetchWtDecodeOut"]; FetchControlPLA _ PO.NewPLA[ctlInType, "IFUPLAFetchControl.FetchControlOut"]; GenFetchRdDecodePLA []; GenFetchWtDecodePLA []; GenFetchControlPLA []; [] _PO.ConvertTermListToCompleteSum[FetchRdDecodePLA.termList, FALSE,FALSE,cmd.out]; [] _PO.ConvertTermListToCompleteSum[FetchWtDecodePLA.termList, FALSE,FALSE,cmd.out]; [] _PO.ConvertTermListToCompleteSum[FetchControlPLA.termList, FALSE,FALSE,cmd.out]; [] _PO.FindAMinimalCover[FetchRdDecodePLA.termList, 120, cmd.out]; [] _PO.FindAMinimalCover[FetchWtDecodePLA.termList, 120, cmd.out]; [] _PO.FindAMinimalCover[FetchControlPLA.termList, 120, cmd.out]; PO.WritePLAFile[ "IFUPLAFetchRdDecode.ttt", cmd.out, FetchRdDecodePLA]; PO.WritePLAFile[ "IFUPLAFetchWtDecode.ttt", cmd.out, FetchWtDecodePLA]; PO.WritePLAFile[ "IFUPLAFetchControl.ttt", cmd.out, FetchControlPLA] }; defaultFile: IO.ROPE = "IFUPLAFetchControl.ttt"; doc: IO.ROPE = "Expects the name of a ttt file"; Commander.Register[key:"GenFetchControl", proc: GenFetchControl, doc: doc]; END. θIFUPLAFetchControlImpl.mesa Copyright c 1984 by Xerox Corporation. All rights reserved. Last edited by Curry, October 22, 1986 2:48:49 pm PDT McCreight, June 6, 1986 6:11:48 pm PDT Don Curry March 14, 1987 4:17:57 pm PST Κ „˜šΠbl™Jšœ<™Jšœžœ&˜Jšœžœ$˜9J˜šŸœžœžœ˜$Jšœ&žœ˜?J˜Jš œ žœ žœžœžœ˜LJš œ žœ žœžœžœ˜DJš œ žœ žœžœžœ˜HJš œ žœ žœžœžœ˜PJš œ žœ žœžœžœ˜KJšœ žœ žœžœ/˜RJšœ žœ žœžœ/˜RJš œ žœ žœžœžœ˜MJš œ žœ žœžœžœ˜LJšœžœ žœ˜5š œžœ žœžœžœ˜PJ˜—šœžœ˜Jšœžœžœ žœ*˜DJ˜—šœžœΟc#˜>šœžœ˜ Jšžœ ˜Jšžœ˜Jšžœ ˜Jšžœ%˜'J˜——šœžœ ˜5šœžœ˜ Jšžœ ˜Jšžœ˜šžœ˜Jšžœ˜Jšžœžœ˜%Jšžœžœ"˜+J˜———šœžœ˜šœžœ˜J˜šžœ˜Jšžœ˜Jšžœ˜!———J˜šœ4˜4J˜—šœ ˜ šœžœ˜ Jšžœ˜Jšžœžœ(˜0J˜——šœ˜šœžœ˜ Jšžœ˜Jšœ ˜ Jšžœ ˜Jšžœ˜———J˜šŸ œ˜J˜——šŸ œžœžœ˜šŸ œžœ1˜DJšœžœ žœžœ˜-Jšžœžœžœžœ˜AJšžœžœžœ˜)Jšœžœ˜;—Jš œžœžœžœžœžœ˜TJšœžœ žœ˜/Jšœžœ žœ˜/Jšœžœ žœ˜/šœ žœ žœ˜ Jšžœžœ žœ žœ ˜0Jšžœžœ˜—Jšœ žœ žœ žœ ˜5Jšœ žœ žœ˜.Jš œ žœ žœžœ žœ˜BJšœžœ žœ.˜LJšœžœ žœ-˜KJšœžœ žœ-˜KJšœžœ žœ-˜KJšœžœ žœ-˜Kšœ žœ žœ˜Jšœ ˜ Jšžœžœ)˜@Jšžœžœ˜6Jšžœžœ/˜9—J˜Jšœžœ˜+Jš œžœžœžœžœžœ˜]J˜Jšœ4˜4Jšœ3˜3Jšœ3˜3Jšœ5˜5J˜Jšœ˜Jšœ˜Jšœ˜Jšœ˜Jšžœžœžœžœ˜UJšžœžœžœžœ˜V—J˜šŸœžœ &˜Dšžœ žœžœ ž˜#Jšœžœ˜Jšžœžœ žœ˜-JšœH˜HJšžœ˜ ——J˜šŸœžœ &˜Dšžœ žœžœž˜"Jšœžœ˜Jšžœžœ žœ˜,šœ˜Jšœžœ˜ šœžœ˜&Jšœ˜——Jšžœ˜ J˜——šžœžœžœžœ˜8Jšœžœžœ˜9Jšœžœžœ˜9Jšœžœžœ%˜D—J˜šžœžœžœ˜>Jšœžœžœ˜;Jšœžœžœ˜;Jšœžœ-˜I—J˜šžœžœžœ˜>Jšœžœžœ˜;Jšœžœžœ˜;Jšœžœ-˜I—J˜šŸœžœžœ žœ7˜VJšœžœžœ˜7šžœž˜Jšžœ žœ˜Jšžœžœžœ˜—Jšœ žœ"˜0—J˜šŸœžœžœ5˜ZJšœžœžœ˜9šžœž˜Jšžœ žœ˜Jšžœžœ˜#—Jšœ5˜5—J˜šŸœžœžœ4˜YJšœžœžœ˜9šžœž˜Jšžœ žœ˜Jšžœžœ˜#—Jšœ5˜5—J˜šœ*˜*Jšœ žœžœ(˜9Jšœ žœžœ(˜9Jšœ žœžœ'˜9Jšœžœ9˜OJšœžœ9˜OJšœžœ9˜NJšœ˜Jšœ˜Jšœ˜Jšœžœ9žœžœ ˜TJšœžœ9žœžœ ˜TJšœžœ8žœžœ ˜SJšœžœ=˜CJšœžœ=˜CJšœžœ=˜CJšžœE˜GJšžœE˜GJšžœF˜H—J˜Jšœ žœžœ˜0Jšœžœžœ$˜2šœM˜MJ˜—Jšžœ˜J™˜™J™———…—Œ)ψ