<> <> <> <<>> DIRECTORY Commander, Dragon, DragOpsCross, IFUPLA, IO, PLAOps; IFUPLAIFetchPreDecode: CEDAR PROGRAM IMPORTS Commander, IO, PLAOps EXPORTS IFUPLA = BEGIN OPEN IFUPLA, PO: PLAOps; GenIFetchPreDecodePLA: PUBLIC PROC = { iBit0: DragOpsCross.Inst _ LOOPHOLE[200B]; iBit1: DragOpsCross.Inst _ LOOPHOLE[100B]; iBit2: DragOpsCross.Inst _ LOOPHOLE[040B]; op0: PO.BoolExpr _ BE[m:[preOp: iBit0], d:[preOp: iBit0 ]]; op1: PO.BoolExpr _ BE[m:[preOp: iBit1], d:[preOp: iBit1 ]]; op2: PO.BoolExpr _ BE[m:[preOp: iBit2], d:[preOp: iBit2 ]]; atLeast1: PO.BoolExpr _ BE[m:[atLeast1: TRUE], d:[atLeast1: TRUE ]]; atLeast2: PO.BoolExpr _ BE[m:[atLeast2: TRUE], d:[atLeast2: TRUE ]]; atLeast3: PO.BoolExpr _ BE[m:[atLeast3: TRUE], d:[atLeast3: TRUE ]]; atLeast5: PO.BoolExpr _ BE[m:[atLeast5: TRUE], d:[atLeast5: TRUE ]]; Set[out:[instNotReady: TRUE], s:PO.Or[ PO.And[PO.Not[op0], PO.Not[op1], op2, PO.Not[atLeast5]], PO.And[PO.Not[op0], PO.Not[op1], PO.Not[op2], PO.Not[atLeast1]], PO.And[PO.Not[op0], op1, PO.Not[atLeast1]], PO.And[ op0, PO.Not[op1], PO.Not[atLeast2]], PO.And[ op0, op1, PO.Not[atLeast3]] ] ]; Set[out:[opLength: 5], s:PO.And[PO.Not[op0], PO.Not[op1], op2 ] ]; Set[out:[opLength: 1], s:PO.And[PO.Not[op0], PO.Not[op1], PO.Not[op2] ] ]; Set[out:[opLength: 1], s:PO.And[PO.Not[op0], op1 ] ]; Set[out:[opLength: 2], s:PO.And[ op0, PO.Not[op1] ] ]; Set[out:[opLength: 3], s:PO.And[ op0, op1 ] ]; }; BE: PROC [m, d: IFetchPreDecodeIn] RETURNS[PO.BoolExpr] = { mRef: REF IFetchPreDecodeIn _ NARROW[IFetchPreDecodePLA.mask]; dRef: REF IFetchPreDecodeIn _ NARROW[IFetchPreDecodePLA.data]; mRef^ _ m; dRef^ _ d; RETURN[PO.GetBEForDataMask[IFetchPreDecodePLA]]}; Set: PROC [s: PO.BoolExpr _ NIL, m, d: IFetchPreDecodeIn _ [ ], out: IFetchPreDecodeOut] = { res: REF IFetchPreDecodeOut _ NARROW[IFetchPreDecodePLA.out]; IF s=NIL THEN s _ BE[m,d] ELSE s _ PO.And[s, BE[m,d] ]; res^ _ out; PO.SetOutForBE[IFetchPreDecodePLA, s]}; IFetchPreDecodeProc: PUBLIC PROC[argRec: IFetchPreDecodeIn] RETURNS[resRec: IFetchPreDecodeOut] = { arg: REF IFetchPreDecodeIn _ NARROW[IFetchPreDecodePLA.data]; res: REF IFetchPreDecodeOut _ NARROW[IFetchPreDecodePLA.out]; arg^ _ argRec; PO.GetOutForData[IFetchPreDecodePLA]; resRec _ res^}; IFetchPreDecodePLA: PUBLIC PO.PLA; GenIFetchPreDecode: Commander.CommandProc = { filename: IO.ROPE _ PO.DefaultCMDLine[cmd.commandLine, defaultFile]; IFetchPreDecodePLA _ PO.NewPLA[inName: "IFUPLA.IFetchPreDecodeIn", outName: "IFUPLA.IFetchPreDecodeOut"]; GenIFetchPreDecodePLA[]; PO.WritePLAFile[filename, cmd.out, IFetchPreDecodePLA] }; ReadIFetchPreDecode: Commander.CommandProc = { IFetchPreDecodePLA _ PO.ReadPLAFile[PO.DefaultCMDLine[cmd.commandLine, defaultFile], cmd.out] }; WriteIFetchPreDecode: Commander.CommandProc = {PO.WritePLAFile [PO.DefaultCMDLine[cmd.commandLine, defaultFile], cmd.out, IFetchPreDecodePLA] }; defaultFile: IO.ROPE = "IFetchPreDecode.pla"; doc: IO.ROPE = "Expects the name of a pla file"; Commander.Register[key:"GenIFetchPreDecode", proc: GenIFetchPreDecode, doc: doc]; Commander.Register[key:"ReadIFetchPreDecode", proc: ReadIFetchPreDecode, doc: doc]; Commander.Register[key:"WriteIFetchPreDecode", proc: WriteIFetchPreDecode, doc: doc]; END. <<>> <<>> <<>>