DIRECTORY Core, CoreOps, CoreBlock, CoreFrame, CoreInstCell, CoreLibrary, CoreName, HashTable, IFUCoreCells, IFUSrc, IO, Rope; IFUSrcFetchBuf: CEDAR PROGRAM IMPORTS CoreOps, CoreBlock, CoreFrame, CoreInstCell, CoreLibrary, CoreName, HashTable, IFUCoreCells, IO, Rope EXPORTS IFUSrc = BEGIN Signal: SIGNAL = CODE; ROPE: TYPE = Core.ROPE; VDD: ROPE _ CoreName.RopeNm["VDD"]; GND: ROPE _ CoreName.RopeNm["GND"]; FetchBuf: PUBLIC PROC RETURNS[cellType: Core.CellType] = { name: ROPE _ CoreName.RopeNm["IFUFetchBuf"]; IF (cellType _ CoreFrame.ReadFrameCache[name])=NIL THEN { cellType _ FetchBufMain[name]; CoreFrame.WriteFrameCache[cellType]}}; FetchBufMain: PROC [name: ROPE] RETURNS[cellType: Core.CellType] = { BlockRightSignals: CoreOps.EachWireProc = { side: CoreBlock.Sides _ CoreBlock.GetWireSide[wire]; SELECT CoreName.WireNm[wire].n FROM VDD, GND => RETURN; ENDCASE => [ ] _ CoreBlock.DelWireSide[wire, right]}; Rename: CoreInstCell.RenameProc = {RETURN[TranslateGenericSignal[old, wd, byte, bit]]}; wd, byte, bit: INT _ 0; -- must be here for Rename library: CoreLibrary.Library _ IFUCoreCells.library; frame, top, mid, bot, wdFrame, rowFrame: CoreFrame.Frame; temp: Core.CellType; genTop: Core.CellType _ CoreLibrary.Get[library, "DpFetchBufNyblTop"]; genMidBody: Core.CellType _ CoreLibrary.Get[library, "DpFetchPDBufferBitBody"]; genBot: Core.CellType _ CoreLibrary.Get[library, "DpFetchBufNyblBot"]; cellType _ CoreFrame.NewFrameCell[3, name, [first: top]]; frame _ CoreFrame.FCT[cellType]; frame.seq[0] _ CoreFrame.NewFrameCell[8, "Top", [first: left]]; frame.seq[1] _ CoreFrame.NewFrameCell[4, "Heart", [first: bottom]]; frame.seq[2] _ CoreFrame.NewFrameCell[8, "Bot", [first: left]]; top _ CoreFrame.FCT[frame.seq[0]]; mid _ CoreFrame.FCT[frame.seq[1]]; bot _ CoreFrame.FCT[frame.seq[2]]; FOR bit DECREASING IN [0..8) DO temp _ CoreInstCell.SpecificGeneric[genTop, Rename]; top.seq[bit] _ CoreFrame.NewFrameCell[0, NIL, [first: left, cell: temp]]; temp _ CoreInstCell.SpecificGeneric[genBot, Rename]; bot.seq[bit] _ CoreFrame.NewFrameCell[0, NIL, [first: left, cell: temp]]; ENDLOOP; FOR wd DECREASING IN [0..4) DO wdR: ROPE _ IO.PutFR["WtWd%g", IO.int[wd]]; mid.seq[wd] _ CoreFrame.NewFrameCell[4, NIL, [first: bottom]]; wdFrame _ CoreFrame.FCT[mid.seq[wd]]; FOR byte DECREASING IN [0..4) DO byteR: ROPE _ IO.PutFR["WtByte%g", IO.int[byte]]; genMidX: Core.CellType _ CoreLibrary.Get [library, "DpFetchPDBufferBitX", FALSE, LIST[wdR, byteR]]; wdFrame.seq[byte] _ CoreFrame.NewFrameCell[16, "Byte", [first: left]]; rowFrame _ CoreFrame.FCT[wdFrame.seq[byte]]; FOR bit DECREASING IN [0..8) DO temp _ CoreInstCell.SpecificGeneric[genMidX, Rename]; rowFrame.seq[2*bit+0] _ CoreFrame.NewFrameCell[0,NIL,[first: left, cell: temp]]; temp _ CoreInstCell.SpecificGeneric[genMidBody, Rename]; rowFrame.seq[2*bit+1] _ CoreFrame.NewFrameCell[0,NIL,[first: left, cell: temp]]; ENDLOOP; ENDLOOP; ENDLOOP; top.cell _ CoreFrame.RecastFrameHard[frame.seq[0]]; mid.cell _ CoreFrame.RecastFrameHard[frame.seq[1]]; bot.cell _ CoreFrame.RecastFrameHard[frame.seq[2]]; top.seq _ NEW[CoreFrame.FrameSeq[0]]; mid.seq _ NEW[CoreFrame.FrameSeq[0]]; bot.seq _ NEW[CoreFrame.FrameSeq[0]]; [ ] _ CoreOps.VisitWire[mid.cell.public, BlockRightSignals]; [ ] _ CoreOps.VisitWire[bot.cell.public, BlockRightSignals]; }; TranslateGenericSignal: PROC[aName: ROPE, wd, byte, bit: INT] RETURNS[ROPE]= { sig: Sig; index: INT _ -1; row: INT _ wd*4+byte; iChar: CHAR _ Rope.Fetch[aName, aName.Length[]-1]; rowBit: ROPE; indexBit: ROPE; rowIndexBit: ROPE; IF iChar IN ['0..'4] THEN {index _ iChar-'0; aName _ Rope.Substr[aName, 0, aName.Length[]-1]}; sig _ NARROW[HashTable.Fetch[xlateTable, aName].value]; IF sig = NIL THEN Signal[]; SELECT sig^ FROM cycle, dn, wt, pass, in, out => IF index=-1 THEN Signal[]; ENDCASE; rowBit _ IO.PutFR["[%g][%g]", IO.int[ row], IO.int[bit]]; indexBit _ IO.PutFR["[%g][%g]", IO.int[ index ], IO.int[bit]]; rowIndexBit _ IO.PutFR["[%g][%g]", IO.int[( row+ index) MOD 16 ], IO.int[bit]]; SELECT sig^ FROM cycle => RETURN[IO.PutFR["FetchBufCycle%g", IO.rope[indexBit] ] ]; dn => RETURN[IO.PutFR["FetchBufCycle%g", IO.rope[rowIndexBit] ] ]; rd => RETURN[IO.PutFR["FetchBufRdByteAc.%g", IO.int[row]]]; wt => RETURN[IO.PutFR["FetchBufWtWdBc.%g", IO.int[index]]]; pass => RETURN[IO.PutFR["PCBus.%02b", IO.int[index*8+bit]]]; in => RETURN[IO.PutFR["IPData.%02b", IO.int[index*8+bit]]]; out => RETURN[IO.PutFR["%g%g", IO.rope[outs[index]], IO.int[bit]]]; next => RETURN[IO.PutFR["FetchBufNext.%g", IO.rope[rowBit]]]; last => RETURN[IO.PutFR["FetchBufLast.%g", IO.rope[rowBit]]]; vdd => RETURN[aName]; gnd => RETURN[aName]; ENDCASE => ERROR}; outs: ARRAY[0..4] OF ROPE = ["AlphaA.", "BetaA.", "GammaA.", "DeltaA.", "OpA."]; Sig: TYPE = REF SigType; SigType: TYPE = {cycle, dn, rd, wt, pass, in, next, last, out, gnd, vdd}; xlateTable: HashTable.Table; InitXlateTable: PROC = { Store: PROC[refName: ROPE, sigType: SigType] = { refName _ CoreName.RopeNm[refName]; [] _ HashTable.Store[xlateTable, refName, NEW[SigType _ sigType]]}; xlateTable _ HashTable.Create[equal: HashTable.RopeEqual, hash: HashTable.HashRope]; Store[ "busCycle", cycle]; Store[ "dn", dn]; Store[ "rd", rd]; Store[ "wt", wt]; Store[ "pass", pass]; Store[ "in", in]; Store[ "next", next]; Store[ "last", last]; Store[ "out", out]; Store[ "GND", gnd]; Store[ "VDD", vdd] }; InitXlateTable[]; END. ’IFUSrcFetchBuf.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. Last Edited by Curry, October 21, 1986 6:09:00 pm PDT Κ)˜šœ™Jšœ<™˜>Jšœ%˜%šœ œœ˜ Jšœœœœ ˜1šœ*˜*Jšœ!œœ˜:—JšœF˜FJšœ.˜.šœ œœ˜Jšœ3Ÿœ˜;Jšœ1œ˜PJšœ5Ÿœ˜=Jšœ1œ˜PJšœ˜—Jšœ˜—Jšœ˜—Jšœ3˜3Jšœ3˜3Jšœ3˜3Jšœ%˜%Jšœ%˜%Jšœ%˜%Jšœ)žœ˜