<> <> <> <> <> <> <> <> DIRECTORY CD, Core, Process, PWCore, Rope, RTCoreUtil, SC, SCExprGlobalRoute, SCExtras, SCPlaceUtil, SCPrivate, SCUtil; SCExtrasImpl: CEDAR PROGRAM IMPORTS Process, PWCore, Rope, RTCoreUtil, SC, SCExprGlobalRoute, SCExtras, SCPlaceUtil, SCPrivate, SCUtil EXPORTS SC SHARES SC = { debug: BOOLEAN _ FALSE; <> PosImprove: PUBLIC PROC [handle: SC.Handle, maxCycles: INT] = { <> p: Process.Priority _ Process.GetPriority[]; Process.SetPriority[Process.priorityBackground]; SCPrivate.PosImprove[handle, areaFom, maxCycles]; IF debug THEN SCPlaceUtil.WriteCurPlace[handle]; Process.SetPriority[p]}; PosImproveWL: PUBLIC PROC [handle: SC.Handle, maxCycles: INT] = { <> p: Process.Priority _ Process.GetPriority[]; Process.SetPriority[Process.priorityBackground]; SCPrivate.PosImprove[handle, wlFom, maxCycles]; IF debug THEN SCPlaceUtil.WriteCurPlace[handle]; 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]; IF debug THEN SCPlaceUtil.WriteCurPlace[handle]; Process.SetPriority[p]}; OrientImproveWL: PUBLIC PROC [handle: SC.Handle, maxCycles: INT] = { <> p: Process.Priority _ Process.GetPriority[]; Process.SetPriority[Process.priorityBackground]; SCPrivate.OrientImprove[handle, wlFom, maxCycles]; IF debug THEN SCPlaceUtil.WriteCurPlace[handle]; Process.SetPriority[p]}; FTImprove: PUBLIC PROC [handle: SC.Handle, maxCycles: INT] = { <> p: Process.Priority _ Process.GetPriority[]; Process.SetPriority[Process.priorityBackground]; SCPrivate.FTImprove[handle, wlFom, maxCycles]; IF debug THEN SCPlaceUtil.WriteCurPlace[handle]; Process.SetPriority[p]}; SAInitialPlace: PUBLIC PROC [handle: SC.Handle, widthFactor: REAL, seed: INT] RETURNS [initialResult: SC.SAInitialResult] = { <> p: Process.Priority _ Process.GetPriority[]; Process.SetPriority[Process.priorityBackground]; initialResult _ SCPrivate.SAInitialPlace[handle, widthFactor, seed]; Process.SetPriority[p]}; SAGetParms: PUBLIC PROC [handle: SC.Handle, initialResult: SC.SAInitialResult, cellType: Core.CellType] RETURNS [saParms: SC.SAParms] = { <> p: Process.Priority _ Process.GetPriority[]; Process.SetPriority[Process.priorityBackground]; saParms _ SCPrivate.SAGetParms[handle, initialResult, cellType]; Process.SetPriority[p]}; SAPlaceImprove: PUBLIC PROC [handle: SC.Handle, saParms: SC.SAParms, widthFactor: REAL, seed: INT] = { <> p: Process.Priority _ Process.GetPriority[]; Process.SetPriority[Process.priorityBackground]; SCPrivate.SAPlaceImprove[handle, saParms, widthFactor, seed]; IF debug THEN SCPlaceUtil.WriteCurPlace[handle]; Process.SetPriority[p]}; SAPlaceImproveM: PUBLIC PROC [handle: SC.Handle, saParms: SC.SAParms, widthFactor: REAL, seed: INT] = { <> p: Process.Priority _ Process.GetPriority[]; Process.SetPriority[Process.priorityBackground]; SCPrivate.SAPlaceImproveM[handle, saParms, widthFactor, seed]; IF debug THEN SCPlaceUtil.WriteCurPlace[handle]; Process.SetPriority[p]}; PlaceImprove: PUBLIC PROC [handle: SC.Handle, maxCycles: INT] = { <> p: Process.Priority _ Process.GetPriority[]; Process.SetPriority[Process.priorityBackground]; SCPrivate.PlaceImprove[handle, maxCycles]; IF debug THEN SCPlaceUtil.WriteCurPlace[handle]; Process.SetPriority[p]}; ExprGlobalRoute: PUBLIC PROC [handle: SC.Handle] = { <> <> p: Process.Priority _ Process.GetPriority[]; Process.SetPriority[Process.priorityBackground]; SCExprGlobalRoute.GlobalRouteAllNets[handle]; Process.SetPriority[p]}; ExprDetailRoute: PUBLIC PROC [handle: SC.Handle] RETURNS [result: SC.Result] = { <> <> p: Process.Priority _ Process.GetPriority[]; Process.SetPriority[Process.priorityBackground]; result _ SCExprGlobalRoute.DetailRoute[handle]; Process.SetPriority[p]}; CreateLayout: PUBLIC PROC [technologyKey: ATOM, horizLayer, vertLayer: Rope.ROPE, rowDirection: SC.Direction, numRows: NAT, cellType: Core.CellType, flattenCellType: RTCoreUtil.FlattenCellTypeProc, libName: Rope.ROPE _ NIL, name: Rope.ROPE _ NIL] RETURNS [object: CD.Object] = { <> widthFactor: REAL _ MAX[1.0, MIN[2.0, RTCoreUtil.GetCoreRealProp[cellType, SC.widthFactorProp, 1.1]]]; designRules: SC.DesignRules _ SC.CreateDesignRules[technologyKey, horizLayer, vertLayer, rowDirection]; handle: SC.Handle _ SC.CreateHandle[cellType, flattenCellType, libName, designRules, name]; SC.InitialPlace[handle, RTCoreUtil.GetCoreIntProp[cellType, SC.numRows, 0]]; SC.SAPlaceImprove[handle, SC.SAGetParms[handle, SC.SAInitialPlace[handle, widthFactor], cellType], widthFactor]; SC.GlobalRoute[handle]; object _ SC.DetailRoute[handle].object; }; <> <> StandardCellRouteX: PWCore.LayoutProc = { hMaterial: Rope.ROPE _ "metal"; vMaterial: Rope.ROPE _ "metal2"; rules: SC.DesignRules _ SC.CreateDesignRules[SCExtras.technologyKey, hMaterial, vMaterial, horizontal]; handle: SC.Handle _ SC.CreateHandle[cellType: cellType, flattenCellType: RTCoreUtil.defaultFlatten, libName: SCExtras.libName, designRules: rules]; SCUtil.ReadTWPlace[handle: handle]; SC.InitialPlace[handle, RTCoreUtil.GetCoreIntProp[cellType, SC.numRows, 0]]; SCExprGlobalRoute.GlobalRouteAllNets[handle]; obj _ SC.ExprDetailRoute[handle].object; }; <> StandardCellLayout: PWCore.LayoutProc = { saParms: SC.SAParms; initialResult: SC.SAInitialResult; hMaterial: Rope.ROPE _ "metal"; vMaterial: Rope.ROPE _ "metal2"; widthFactor: REAL _ MAX[1.0, MIN[2.0, RTCoreUtil.GetCoreRealProp[cellType, SC.widthFactorProp, 1.1]]]; rules: SC.DesignRules _ SC.CreateDesignRules[SCExtras.technologyKey, hMaterial, vMaterial, horizontal]; handle: SC.Handle _ SC.CreateHandle[cellType: cellType, flattenCellType: RTCoreUtil.defaultFlatten, libName: SCExtras.libName, designRules: rules]; SC.InitialPlace[handle, RTCoreUtil.GetCoreIntProp[cellType, SC.numRows, 0]]; initialResult _ SC.SAInitialPlace[handle, widthFactor]; saParms _ SC.SAGetParms[handle, initialResult, cellType]; SC.SAPlaceImprove[handle: handle, saParms: saParms, widthFactor: widthFactor]; SC.GlobalRoute[handle]; obj _ SC.DetailRoute[handle].object; }; <> StandardCellLayoutTWX: PWCore.LayoutProc = { twMsg: Rope.ROPE; hMaterial: Rope.ROPE _ "metal"; vMaterial: Rope.ROPE _ "metal2"; rules: SC.DesignRules _ SC.CreateDesignRules[SCExtras.technologyKey, hMaterial, vMaterial, horizontal]; handle: SC.Handle _ SC.CreateHandle[cellType: cellType, flattenCellType: RTCoreUtil.defaultFlatten, libName: SCExtras.libName, designRules: rules]; SC.InitialPlace[handle, RTCoreUtil.GetCoreIntProp[cellType, SC.numRows, 0]]; SCUtil.WriteTWFiles[handle: handle]; twMsg _ SCUtil.TWIt[handle.name]; IF twMsg#NIL THEN SC.Error[callingError, Rope.Cat[twMsg, ", Problem on Unix Placement Server. Check file ", handle.name, ".out"]]; SCUtil.ReadTWPlace[handle: handle]; SC.InitialPlace[handle, RTCoreUtil.GetCoreIntProp[cellType, SC.numRows, 0]]; SCExprGlobalRoute.GlobalRouteAllNets[handle]; obj _ SC.ExprDetailRoute[handle].object; }; SCLayoutAtom: ATOM _ PWCore.RegisterLayoutAtom[$SC, StandardCellLayout, SCExtras.StandardCellDecorate, SCExtras.StandardCellAttibutes]; <> SCRouteXAtom: ATOM _ PWCore.RegisterLayoutAtom[$SCRouteX, StandardCellRouteX, SCExtras.StandardCellDecorate, SCExtras.StandardCellAttibutes]; SCTWXAtom: ATOM _ PWCore.RegisterLayoutAtom[$SCRemoteX, StandardCellLayoutTWX, SCExtras.StandardCellDecorate, SCExtras.StandardCellAttibutes]; }.