DIRECTORY Commander, IFUPLAFetchWtDecode, IO, PLAOps; IFUPLAFetchWtDecodeImpl: CEDAR PROGRAM IMPORTS Commander, IFUPLAFetchWtDecode, IO, PLAOps ~ BEGIN OPEN IFUPLAFetchWtDecode; GenFetchWtDecodePla: PROC = { FOR wtIndex: CARDINAL IN [0..4) DO val: CARDINAL _ 1; THROUGH [0..wtIndex) DO val _ val*2 ENDLOOP; Set[ m: [writing: TRUE, wtIndex: 3], d: [writing: TRUE, wtIndex: wtIndex], out:[wtEnable: val]]; ENDLOOP}; BE: 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: PLAOps.BoolExpr _ NIL, m, d: FetchWtDecodeIn _ [ ], out: FetchWtDecodeOut] = { res: REF FetchWtDecodeOut _ NARROW[FetchWtDecodePLA.out]; IF s=NIL THEN s _ BE[m,d] ELSE s _ PLAOps.And[s, BE[m,d] ]; res^ _ out; PLAOps.SetOutForBE[FetchWtDecodePLA, s]}; GenFetchWtDecode: Commander.CommandProc = { filename: IO.ROPE _ PLAOps.DefaultCMDLine[cmd.commandLine, defaultFile]; FetchWtDecodePLA _ PLAOps.NewPLA["IFUPLAFetchWtDecode.FetchWtDecodeIn", "IFUPLAFetchWtDecode.FetchWtDecodeOut"]; GenFetchWtDecodePla[]; [ ] _ PLAOps.ConvertTermListToCompleteSum[FetchWtDecodePLA.termList, FALSE, FALSE, cmd.out]; [ ] _ PLAOps.FindAMinimalCover[FetchWtDecodePLA.termList, 120, cmd.out]; PLAOps.WritePLAFile[filename, cmd.out, FetchWtDecodePLA] }; defaultFile: IO.ROPE = "IFUPLAFetchWtDecode.ttt"; doc: IO.ROPE = "Expects the name of a ttt file"; Commander.Register[key:"GenFetchWtDecode", proc: GenFetchWtDecode, doc: doc]; END. ZIFUPLAFetchWtDecodeImpl.mesa Last edited by Curry, November 8, 1985 5:15:26 pm PST Êݘšœ™Jšœ5™5—J˜JšÏk œ!œ ˜5J˜šœœ˜&Jšœ!œ ˜4Jšœœ˜J˜šÏnœœ˜šœ œœ˜"Jšœœ˜Jšœœ œ˜,šœ˜Jšœ œ˜šœ œ˜%Jšœ˜——Jšœ˜ ——J˜šœœœ˜=Jšœœœ˜;Jšœœœ˜;Jšœœ-˜I—J˜šžœœœ9˜\Jšœœœ˜9šœ˜Jšœ œ˜Jšœœ˜"—Jšœ5˜5—J˜šœ+˜+Jšœ œœ7˜HJšœp˜pJšœ˜JšœEœœ ˜\JšœH˜HJšœ;˜;—J˜Jšœ œœ˜1Jšœœœ$˜2JšœN˜NJ˜Jšœ˜——…—P‡