DIRECTORY BitOps, CoreCreate, CoreFlat, Ports, Rosemary, Sisyph, TilingClass; TRDecoder: CEDAR PROGRAM IMPORTS BitOps, CoreCreate, CoreFlat, Ports, Rosemary, Sisyph, TilingClass = BEGIN OPEN CoreCreate; DecoderArray: PROC [n: NAT, cx: Sisyph.Context] RETURNS [ct: CellType] ~ { dec0: CellType _ Sisyph.ES["Decode0.sch", cx]; dec1: CellType _ Sisyph.ES["Decode1.sch", cx]; decEn: CellType _ Sisyph.ES["DecodeEn.sch", cx]; decWDrive: CellType _ Sisyph.ES["WriteDrive.sch", cx]; decRDrive: CellType _ Sisyph.ES["ReadDrive.sch", cx]; decLeft: CellType _ Sisyph.ES["DecoderLeft.sch", cx]; a: NAT _ BitOps.NBits[n]; -- number of address bits RA: Wire _ Seq["RA", a]; nRA: Wire _ Seq["nRA", a]; WA: Wire _ Seq["WA", a]; nWA: Wire _ Seq["nWA", a]; Rd: Wire _ Seq["Rd", n]; Wr: Wire _ Seq["Wr", n]; tileArray: TilingClass.TileArray _ NEW[TilingClass.TileArrayRec[n]]; IF n=0 THEN ERROR; --Please specify the number of rows FOR row: NAT IN [0..n) DO -- create the rows tileArray[row] _ NEW[TilingClass.TileRowRec[2*a+4]]; ENDLOOP; FOR row: NAT IN [0..n) DO tileArray[row][0] _ NEW[TilingClass.TileRec _ [ type: decLeft, renaming: LIST[["Vdd", "Vdd"], ["Gnd", "Gnd"]] ]]; FOR i: NAT IN [0..a) DO -- column 0 is on the left tileArray[row][i+1] _ NEW[TilingClass.TileRec _ [ type: IF BitOps.EBFW[row, i, a] THEN dec1 ELSE dec0, renaming: LIST[["Vdd", "Vdd"], ["Gnd", "Gnd"], ["A", RA[i]], ["nA", nRA[i]]] ]]; ENDLOOP; tileArray[row][a+1] _ NEW[TilingClass.TileRec _ [ type: decRDrive, renaming: LIST[["Vdd", "Vdd"], ["Gnd", "Gnd"], ["out", Rd[row]]] ]]; tileArray[row][a+2] _ NEW[TilingClass.TileRec _ [ type: decEn, renaming: LIST[["Vdd", "Vdd"], ["Gnd", "Gnd"], ["wEn", "wEn"]] ]]; FOR i: NAT IN [0..a) DO -- column 0 is on the left tileArray[row][i+a+3] _ NEW[TilingClass.TileRec _ [ type: IF BitOps.EBFW[row, i, a] THEN dec1 ELSE dec0, renaming: LIST[["Vdd", "Vdd"], ["Gnd", "Gnd"], ["A", WA[i]], ["nA", nWA[i]]] ]]; ENDLOOP; tileArray[row][2*a+3] _ NEW[TilingClass.TileRec _ [ type: decWDrive, renaming: LIST[["Vdd", "Vdd"], ["Gnd", "Gnd"], ["out", Wr[row]], ["CK", "CK"]] ]]; ENDLOOP; ct _ TilingClass.CreateTiling[ name: "DecoderArray", public: Wires[nRA, RA, nWA, WA, "wEn", "CK", Rd, Wr, "Vdd", "Gnd"], tileArray: tileArray, neighborX: TilingClass.LayoutNeighborX, neighborY: TilingClass.LayoutNeighborY ]; [] _ Rosemary.BindCellType[ct, "DPDecoderSeq"]; [] _ CoreFlat.CellTypeCutLabels[ct, "DPMacro"]; Ports.InitPorts[ct, l, none, "Vdd", "Gnd", "wEn", "CK"]; Ports.InitPorts[ct, ls, none, "nRA", "RA", "nWA", "WA"]; Ports.InitPorts[ct, ls, drive, "Rd", "Wr"]; }; END. ‚TRDecoder.mesa Copyright c 1986 by Xerox Corporation. All rights reserved. Decoder -- from the bottom up: rows 0, ... n-1 Κ$– "cedar" style˜codešœ™Kšœ Οmœ1™˜LKšœ˜—Kšžœ˜—šœžœ˜1Kšœ˜Kšœ žœ6˜D—šœžœ˜1Kšœ ˜ Kšœ žœ4˜B—š žœžœžœžœ ˜2šœžœ˜3Kš œžœžœ žœžœ˜4Kšœ žœ>˜LKšœ˜—Kšžœ˜—šœžœ˜3Kšœ˜Kšœ žœD˜R—Kšžœ˜—K˜šœ˜Kšœ˜KšœD˜DKšœ˜Kšœ'˜'Kšœ&˜&Kšœ˜—Kšœ/˜/K˜/Kšœ8˜8Kšœ8˜8Kšœ+˜+K˜K˜—K˜—K˜Kšžœ˜K˜K˜—…—  Έ