<> <> <> <<>> <<>> DIRECTORY CD, CDDirectory, CDPinObjects, Commander, IFUAsm, IFUPW, IO, PW, Rope; IFUAsmFetchBuf: CEDAR PROGRAM IMPORTS CD, CDDirectory, CDPinObjects, Commander, IFUAsm, IFUPW, IO, PW, Rope EXPORTS IFUAsm = BEGIN GND: Rope.ROPE = IFUPW.GND; VDD: Rope.ROPE = IFUPW.VDD; FetchBufferArrayCtl: LIST OF REF = LIST[ NIL, NIL, NIL, "IPBus.", NIL, "PCBus."]; FetchBufferArrayTop: LIST OF REF = LIST[ NIL, NIL, NIL, "IPBus.", NIL, "PCBus."]; FetchBufferArray: PROC[design: CD.Design] RETURNS[cell: CD.Object] = { FetchBufAssignNames: IFUPW.PinNameProc = { OPEN IFUPW; oldPinName: Rope.ROPE _ CDPinObjects.GetName[pin]; SELECT side FROM left => { IF oldPinName.Find[VDD]>=0 THEN RETURN[oldPinName]; IF oldPinName.Find[GND]>=0 THEN RETURN[oldPinName]; IF pin.location.y < botY THEN name _ oldPinName ELSE name _ IO.PutFR["FetchRd.%02g", IO.int[(pin.location.y-botY)/midY]]}; right => name _ NIL; top, bottom => { list: List; byte, bit: INT; column: INT _ ((pin.location.x MOD cellWidth)-leftTail)/metPitch; [byte, bit] _ ByteBitFromIndex [pin.location.x/cellWidth, IFUPW.IFUDataColNSeq]; list _ ExpandList[byte, bit, IF side=top THEN FetchBufferArrayTop ELSE FetchBufBot]; list _ FixGVInList[list]; name _ ListIndexItem[list, column]; IF name=NIL THEN ERROR}; ENDCASE => ERROR}; botY, midY: INT _ 0; row: CD.Object _ CDDirectory.Fetch[design, "FetchBufNyblTop"].object; cell _ PW.ArrayX[design, row, 8]; FOR wd: INT DECREASING IN [0..3] DO wdR: Rope.ROPE _ IO.PutFR["WtWd%g", IO.int[wd]]; FOR byte: INT DECREASING IN [0..3] DO byteR: Rope.ROPE _ IO.PutFR["WtByte%g", IO.int[byte]]; row _ CDDirectory.Fetch[design, "FetchBufferBit"].object; row _ PW.Inst[design, row, LIST[wdR, byteR], FALSE]; row _ PW.ArrayX[design, row, 8]; cell _ PW.AbutY[design, row, cell]; ENDLOOP; ENDLOOP; midY _ CD.InterestSize[row].y; row _ CDDirectory.Fetch[design, "FetchBufNyblBot"].object; botY _ CD.InterestSize[row].y; row _ PW.ArrayX[design, row, 8]; cell _ PW.AbutY[design, row, cell]; cell _ IFUPW.RenameObjAndPins[design, cell, "FetchBuf", FetchBufAssignNames] }; FetchBufBot: LIST OF REF = IFUPW.LISTn[ "PCBus.", LIST["AlphaAB.", "BetaAB.", "GammaAB.", "DeltaAB."], LIST["OpAB.", NIL, NIL, NIL] ]; module: Rope.ROPE _ "IFUAsmFetchBuf"; FetchBuf: PUBLIC IFUPW.Frame _ IFUPW.NFSFUP[module, y, LIST[ FetchBufferArray ] ]; <<>> FetchBufCT: Commander.CommandProc = {IFUPW.AssembleFrame[IFUAsm.RefDesign[], FetchBuf, cmd ] }; Commander.Register [proc: FetchBufCT, key: module]; END. <<>> <<>>