DIRECTORY CD, CDSimpleRules, Core, Process, Rope, Route, RTBasic, SC, SCChanUtil, SCInitialPlace, SCInstUtil, SCPlaceUtil, SCPrivate, SCRowUtil, SCSmash, SCWidthUtil, SCUtil; SCImpl: CEDAR PROGRAM IMPORTS CD, CDSimpleRules, Process, Route, RTBasic, SC, SCChanUtil, SCInitialPlace, SCInstUtil, SCPlaceUtil, SCPrivate, SCRowUtil, SCSmash, SCWidthUtil, SCUtil EXPORTS SC SHARES SC = { debug: BOOLEAN _ FALSE; unconnectedProp: PUBLIC ATOM _ $Unconnected; Error: PUBLIC ERROR[errorType: SC.ErrorType _ callingError, explanation: Rope.ROPE _ NIL] = CODE; Signal: PUBLIC SIGNAL[signalType: SC.ErrorType _ callingError, explanation: Rope.ROPE _ NIL] = CODE; CreateDesignRules: PUBLIC PROC [technologyKey: ATOM, horizLayer, vertLayer: Rope.ROPE, rowDirection: SC.Direction, properties: SC.PropList _ NIL] RETURNS [designRules: SC.DesignRules] = BEGIN hLayer, vLayer: SC.Layer; designRules _ NEW[SC.DesignRulesRec]; designRules.technology _ CD.FetchTechnology[technologyKey]; hLayer _ CDSimpleRules.GetLayer[technologyKey, horizLayer]; vLayer _ CDSimpleRules.GetLayer[technologyKey, vertLayer]; designRules.horizLayer _ horizLayer; designRules.vertLayer _ vertLayer; designRules.rowRules _ Route.CreateDesignRules[technologyKey, hLayer, vLayer, rowDirection, properties]; designRules.sideRules _ Route.CreateDesignRules[technologyKey, hLayer, vLayer, RTBasic.OtherDirection[rowDirection], properties]; END; CreateHandle: PUBLIC PROC [cellType: Core.CellType, cdDesign, libDesign: CD.Design, designRules: SC.DesignRules, name: Rope.ROPE, properties: SC.PropList _ NIL] RETURNS [handle: SC.Handle] = BEGIN parms: SCPrivate.Parms _ NARROW[NEW[SCPrivate.ParmsRec], SCPrivate.Parms]; IF designRules = NIL THEN SC.Signal[callingError, "No design rules."]; IF cellType = NIL THEN SC.Signal[callingError, "No Core cell type."]; IF libDesign = NIL THEN SC.Signal[callingError, "No ChipNDale library."]; handle _ NEW[SC.HandleRec]; handle.name _ name; handle.rules _ designRules; handle.properties _ properties; handle.coreCellType _ cellType; parms.libDesign _ libDesign; parms.cdDesign _ cdDesign; handle.parms _ parms; IF ~SCPrivate.SetUpLayout[handle, cellType] THEN SC.Signal[callingError, "Unable to construct layout data"]; IF ~SCPrivate.GetStructure[handle, cellType] THEN SC.Signal[callingError, "Unable to construct structure data"]; END; InitialPlace: PUBLIC PROC [handle: SC.Handle, numRows: NAT _ 0] = { layoutData: SCPrivate.LayoutData _ NARROW[handle.layoutData]; p: Process.Priority _ Process.GetPriority[]; Process.SetPriority[Process.priorityBackground]; SCSmash.RemoveSmash[handle]; SCPlaceUtil.ClrCurPlac[handle, TRUE]; SCChanUtil.InitChanWidths[handle]; SCInitialPlace.PrePlace[handle, numRows, TRUE]; SCInitialPlace.RowInit[handle]; SCInitialPlace.PosInit[handle]; [layoutData.lgRows.maxRowWidth, layoutData.lgRows.numMaxRows] _ SCRowUtil.FindMaxRow[handle]; SCWidthUtil.AllChanWidths[handle, areaFom]; SCInstUtil.AsgnChanPos[handle]; IF debug THEN SCPlaceUtil.WriteCurPlace[handle]; [] _ SCUtil.WriteResults["End initial placement\n initial size: ", handle, 0]; Process.SetPriority[p]}; PosImprove: PUBLIC PROC [handle: SC.Handle, maxCycles: INT] = { p: Process.Priority _ Process.GetPriority[]; Process.SetPriority[Process.priorityBackground]; SCPrivate.PosImprove[handle, areaFom, maxCycles]; Process.SetPriority[p]}; OrientImprove: PUBLIC PROC [handle: SC.Handle, maxCycles: INT] = { p: Process.Priority _ Process.GetPriority[]; Process.SetPriority[Process.priorityBackground]; SCPrivate.OrientImprove[handle, areaFom, maxCycles]; Process.SetPriority[p]}; PlaceImprove: PUBLIC PROC [handle: SC.Handle, t0, alpha, eqVarLimit, fzVarLimit: REAL, eqTabSize, fzTabSize, seed: INT] = { p: Process.Priority _ Process.GetPriority[]; Process.SetPriority[Process.priorityBackground]; SCPrivate.SAPlace[handle, t0, alpha, eqVarLimit, fzVarLimit, eqTabSize, fzTabSize, seed]; Process.SetPriority[p]}; GlobalRoute: PUBLIC PROC [handle: SC.Handle] = { p: Process.Priority _ Process.GetPriority[]; Process.SetPriority[Process.priorityBackground]; SCSmash.RemoveSmash[handle]; SCSmash.SmashAllNets[handle, TRUE]; Process.SetPriority[p]}; DetailRoute: PUBLIC PROC [handle: SC.Handle] RETURNS [result: SC.Result] = { p: Process.Priority _ Process.GetPriority[]; Process.SetPriority[Process.priorityBackground]; result _ SCPrivate.DetailRoute[handle]; Process.SetPriority[p]}; CreateLayout: PUBLIC PROC [technologyKey: ATOM, horizLayer, vertLayer: Rope.ROPE, rowDirection: SC.Direction, numRows: NAT, cellType: Core.CellType, cdDesign, libDesign: CD.Design _ NIL, name: Rope.ROPE _ NIL, properties: SC.PropList _ NIL] RETURNS [object: CD.Object] = { result: SC.Result; designRules: SC.DesignRules _ SC.CreateDesignRules[technologyKey, horizLayer, vertLayer, rowDirection, properties]; handle: SC.Handle _ SC.CreateHandle[cellType, cdDesign, libDesign, designRules, name, properties]; SC.InitialPlace[handle, 0]; SC.PlaceImprove[handle]; SC.GlobalRoute[handle]; result _ SC.DetailRoute[handle]; RETURN [result.object]; }; Destroy: PUBLIC PROC [handle: SC.Handle] ~ { SCPrivate.DestroyLayout[handle]; SCPrivate.DestroyStructure[handle]; SCUtil.DestroyRules[handle]; SCUtil.DestroyParms[handle]; handle.name _ NIL; handle.coreCellType _ NIL; handle.properties _ NIL}; }. –SCImpl.mesa ///StdCell/SCImpl.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. Bryan Preas, November 7, 1985 10:11:54 am PST Define the standard cell design rules. technologyKey values are predefinded for now. horizLayer, vertLayer should be "poly", "metal" or "metal2". Create a standard cell design. The standard cell design definition includes the design rules (conductor and via widths and spacings) and the circuit definition. set up the layout data set up the structure data Determine an initial placement for the instances. Improve the positions of instances whithin rows. Improve the orientation of instances . Improve the placement for the instances. Determine strategic paths for the wiring that must cross cell rows. Determine actual wiring paths. Create a standard cell object by performing the above operations Remove circular references so garbage collection can work Ê ˜šœ#™#Jšœ Ïmœ1™—Jšžœ˜——˜J˜š   œžœžœ žœžœ ˜CJ™1J™Jšœ#žœ˜=Jšœ,˜,Jšœ0˜0Jšœ˜Jšœžœ˜%Jšœ"˜"Jšœ)žœ˜/Jšœ˜Jšœ˜Jšœ]˜]Jšœ+˜+Jšœ˜J˜Jšžœžœ#˜0JšœN˜NJšœ˜—J˜š   œžœžœ žœžœ˜?J™0J˜Jšœ,˜,Jšœ0˜0Jšœ1˜1šœ˜J˜——š   œžœžœ žœžœ˜BJ™&J˜Jšœ,˜,Jšœ0˜0Jšœ4˜4šœ˜J˜——š   œžœžœ žœ,žœžœ˜{J™(J˜Jšœ,˜,Jšœ0˜0JšœY˜Yšœ˜J˜——š  œžœžœ žœ ˜0J™CJ™Jšœ,˜,Jšœ0˜0Jšœ˜Jšœžœ˜#Jšœ˜—J˜š   œžœžœ žœ žœ žœ ˜LJšœ ™ J™Jšœ,˜,Jšœ0˜0Jšœ'˜'Jšœ˜—J˜J˜š  œžœžœžœžœžœžœ0žœ žœ žœžœžœ žœžœ žœ ˜Jšœ@™@J™Jšœžœ˜Jšœ žœžœS˜sJšœžœ žœL˜bJšžœ˜Jšžœ˜Jšžœ˜Jšœ žœ˜ Jšžœ˜Jšœ˜—J˜š œžœžœ žœ ˜,Jšœ9™9J™Jšœ ˜ Jšœ#˜#Jšœ˜Jšœ˜Jšœžœ˜Jšœžœ˜Jšœžœ˜—Jšœ˜—J˜J˜J˜J˜—…—ªL