DIRECTORY Core, Rope, Route, SC, SCChanUtil, SCPrivate, SCRowUtil, TerminalIO; SCSetUpLayoutImpl: CEDAR PROGRAM IMPORTS SC, SCChanUtil, SCRowUtil EXPORTS SCPrivate SHARES SC = BEGIN GetRopeProp: PROCEDURE[from: Core.Properties, key: ATOM, default: Rope.ROPE _ NIL] RETURNS [val: Rope.ROPE] = { RETURN[default]}; GetRopeListProp: PROCEDURE[from: Core.Properties, key: ATOM, default: LIST OF Rope.ROPE _ NIL] RETURNS [val: LIST OF Rope.ROPE] = { RETURN[default]}; GetIntProp: PROCEDURE[from: Core.Properties, key: ATOM, default: INT _ 0] RETURNS [val: INT] = { RETURN[default]}; GetBoolProp: PROCEDURE[from: Core.Properties, key: ATOM, default: BOOL _ FALSE] RETURNS [val: BOOL] = { RETURN[default]}; SetUpLayout: PUBLIC PROCEDURE[handle: SC.Handle, cellType: Core.CellType] RETURNS [canContinue: BOOL _ TRUE] = BEGIN ProcPower: PROCEDURE [default: Rope.ROPE, lRSide: SCPrivate.LRSide] RETURNS [powerSide: SCPrivate.PowerBus] = { powerSide _ NEW[SCPrivate.PowerBusRec]; powerSide.name _ default}; layoutData: SCPrivate.LayoutData _ NARROW[NEW[SCPrivate.LayoutDataRec], SCPrivate.LayoutData]; layoutParms: SCPrivate.LayoutParms _ NEW[SCPrivate.LayoutParmsRec]; sideRules: Route.DesignRules _ handle.rules.sideRules; rowRules: Route.DesignRules _ handle.rules.rowRules; bottomRow: SCPrivate.BpRow _ NEW[SCPrivate.BpRowRec]; rightRow: SCPrivate.BpRow _ NEW[SCPrivate.BpRowRec]; topRow: SCPrivate.BpRow _ NEW[SCPrivate.BpRowRec]; leftRow: SCPrivate.BpRow _ NEW[SCPrivate.BpRowRec]; layoutData.bpRows _ NEW[SCPrivate.BpRowsRec]; layoutData.lgRows _ NEW[SCPrivate.LgRowsRec]; layoutData.sideChans[left] _ NEW[SCPrivate.SideChanRec]; layoutData.sideChans[right] _ NEW[SCPrivate.SideChanRec]; layoutData.rowChans _ NEW[SCPrivate.RowChansRec]; layoutData.layoutParms _ layoutParms; handle.layoutData _ layoutData; layoutParms.whichFom _ wlFom; layoutParms.useInteriorChanExits _ GetBoolProp[cellType.properties, $UseInteriorChanExits, TRUE]; layoutParms.rowDirection _ handle.rules.rowRules.trunkDirection; layoutData.powerBuses[left] _ ProcPower["Vdd", left]; layoutData.powerBuses[right] _ ProcPower["Gnd", right]; FOR chan: SCPrivate.MaxChanSr IN SCPrivate.MaxChanSr DO channel: SCPrivate.RowChan _ NEW[SCPrivate.RowChanRec]; channel.exits _ NEW[SCPrivate.ExitArrayOb]; channel.chanNum _ chan; layoutData.rowChans.chans[chan] _ channel; channel.initChanWidth _ rowRules.trunkToTrunk*30; ENDLOOP; FOR side: SCPrivate.LRSide IN SCPrivate.LRSide DO channel: SCPrivate.SideChan _ NEW[SCPrivate.SideChanRec]; channel.side _ side; layoutData.sideChans[side] _ channel; channel.initSideChanWidth _ sideRules.trunkToTrunk*10; ENDLOOP; FOR row: NAT IN SCPrivate.MaxRowSr DO layoutData.lgRows.rows[row] _ NEW[SCPrivate.LgRowRec]; layoutData.lgRows.rows[row].rowNum _ row; ENDLOOP; layoutData.bpRows[bottom] _ bottomRow; bottomRow.bpSpacing _ GetIntProp[cellType.properties, SC.bottomExitSpacing, rowRules.branchToBranch]; bottomRow.initMaxBpsOnSide _ GetIntProp[cellType.properties, SC.bottomMaxExits, 0]; layoutData.bpRows[right] _ rightRow; rightRow.bpSpacing _ GetIntProp[cellType.properties, SC.rightExitSpacing, sideRules.trunkToTrunk]; rightRow.initMaxBpsOnSide _ GetIntProp[cellType.properties, SC.rightMaxExits, 0]; layoutData.bpRows[top] _ topRow; topRow.bpSpacing _ GetIntProp[cellType.properties, SC.topExitSpacing, rowRules.branchToBranch]; topRow.initMaxBpsOnSide _ GetIntProp[cellType.properties, SC.topMaxExits, 0]; layoutData.bpRows[left] _ leftRow; leftRow.bpSpacing _ GetIntProp[cellType.properties, SC.leftExitSpacing, sideRules.trunkToTrunk]; leftRow.initMaxBpsOnSide _ GetIntProp[cellType.properties, SC.leftMaxExits, 0]; RETURN[canContinue]; END; DestroyLayout: PUBLIC PROC [handle: SC.Handle] ~ { EachRow: SCRowUtil.EachRowProc ~ { EachInst: SCRowUtil.EachInstProc ~ { lgRow.lgsOnRow[pos] _ NIL}; [] _ SCRowUtil.EnumerateAllInstsOnRow[handle, row, EachInst]; layoutData.lgRows.rows[row] _ NIL}; EachSide: SCRowUtil.EachSideProc ~ { EachInst: SCRowUtil.EachInstProc ~ { bpRow.bpsOnSide[pos] _ NIL}; [] _ SCRowUtil.EnumerateAllInstsOnSide[handle, side, EachInst]; layoutData.bpRows[side] _ NIL}; EachRowChan: SCChanUtil.EachRowChanProc ~ { EachExit: SCChanUtil.EachExitProc ~ { exit.net _ NIL}; [] _ SCChanUtil.EnumerateExits[handle, rowChan, left, EachExit]; [] _ SCChanUtil.EnumerateExits[handle, rowChan, right, EachExit]; layoutData.rowChans.chans[chan] _ NIL}; EachSideChan: SCChanUtil.EachSideChanProc ~ { layoutData.sideChans[lrSide] _ NIL}; layoutData: SCPrivate.LayoutData _ NARROW[handle.layoutData]; [] _ SCRowUtil.EnumerateRows[handle, EachRow]; [] _ SCRowUtil.EnumerateSides[handle, EachSide]; [] _ SCChanUtil.EnumerateRowChans[handle, EachRowChan]; layoutData.bpRows _ NIL; layoutData.lgRows _ NIL; layoutData.sideChans[left] _ layoutData.sideChans[right] _ NIL; layoutData.rowChans _ NIL; layoutData.powerBuses[left] _ layoutData.powerBuses[right] _ NIL; layoutData.layoutParms _ NIL; layoutData.placeDat _ NIL; layoutData.globalRoute _ NIL; handle.layoutData _ NIL}; END. Òfile: ///stdcell/SCSetUpLayoutImpl.mesa -- Copyright (C) 1985, 1986 by Xerox Corporation. All rights reserved. last modified by Preas, May 8, 1986 3:07:45 pm PDT Frank Bowers February 6, 1986 9:55:23 am PST the high level Sloop initialization: get Power signals get fom type and CD units get whether to use only maxRoute channels for exits get number of rows -- do rest of power buses in GetStructure initialize the channel widths side data io and row data Ê›˜Jšœ'™'JšÏcœ ,™Gšœ2™2Icode™,—J˜Jšœ$™$J˜šÏk ˜ J˜Jšœ˜J˜Jšžœ˜J˜ J˜ J˜ Jšœ ˜ J˜—šÏnœžœž˜ Jšžœ˜!Jšžœ ˜Jšžœžœ˜ J˜Jšž˜J˜š Ÿ œž œžœžœžœ˜RJšžœ žœ˜Jšžœ ˜J˜—šŸœž œžœ žœžœžœžœ˜^Jšžœžœžœžœ˜$Jšžœ ˜J˜—š Ÿ œž œžœ žœžœžœ˜`Jšžœ ˜J˜—š Ÿ œž œžœ žœžœ˜OJšžœžœ˜Jšžœ ˜J˜—šŸ œžœž œ žœ"žœžœžœ˜oJšž˜J˜Jšœ™šŸ œž œ/˜CJšžœ$˜+J˜Jšœ žœ˜'Jšœžœ˜J˜—Jšœ#žœžœ1˜^Kšœ%žœ˜CKšœ6˜6Kšœ4˜4Jšœžœ˜5Jšœžœ˜4Jšœžœ˜2Jšœžœ˜3J˜Jšœžœ˜-Jšœžœ˜-Jšœžœ˜8Jšœžœ˜9Jšœžœ˜1Jšœ%˜%Jšœ˜J˜Jšœ™Jšœ˜J˜Jšœ3™3Jšœ[žœ˜aJ˜Jšœ™Jšœ@˜@J˜J™)Jšœ5˜5Jšœ7˜7J™Jšœ™šžœžœžœ˜8Jšœžœ˜7Jšœžœ˜,Jšœ˜Jšœ*˜*Jšœ1˜1Jšžœ˜—J˜Jšœ ™ šžœžœžœ˜2Jšœžœ˜9Jšœ˜Jšœ%˜%Jšœ6˜6Jšžœ˜—J˜Jšœ™šžœžœžœžœ˜&Jšœžœ˜6Jšœ)˜)Jšžœ˜—J˜Jšœ&˜&Jšœe˜eJšœS˜SJ˜Jšœ$˜$Jšœb˜bJšœQ˜QJ˜Jšœ ˜ Jšœ_˜_JšœM˜MJ˜Jšœ"˜"Jšœ`˜`JšœO˜OJ˜Jšžœ˜Jšžœ˜—J˜šŸ œžœžœ žœ ˜2K˜šŸœ˜"K˜šŸœ˜$Kšœžœ˜K˜—Kšœ=˜=Kšœžœ˜#K˜—šŸœ˜$K˜šŸœ˜$Kšœžœ˜K˜—Kšœ?˜?Kšœžœ˜K˜—šŸ œ ˜+K˜šŸœ˜%Kšœ žœ˜—K˜Kšœ@˜@KšœA˜AKšœ"žœ˜'K˜—šŸ œ!˜-K˜Kšœžœ˜$K˜—Kšœ#žœ˜=Kšœ.˜.Kšœ0˜0Kšœ7˜7Kšœžœ˜Kšœžœ˜Kšœ;žœ˜?Kšœžœ˜Kšœ=žœ˜AKšœžœ˜Kšœžœ˜Kšœžœ˜Kšœžœ˜—Jšžœ˜—J˜J˜—…—¬