SCExtrasImpl.mesa
Copyright Ó 1985, 1986, 1987 by Xerox Corporation. All rights reserved.
Bryan Preas, August 14, 1986 5:07:05 pm PDT
Last Edited by: Bryan Preas June 15, 1987 6:21:04 pm PDT
Don Curry November 8, 1987 2:17:05 pm PST
Jean-Marc Frailong October 14, 1987 6:12:37 pm PDT
Cong, August 25, 1987 8:07:27 pm PDT
Christian Le Cocq February 3, 1988 3:31:32 pm PST
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: BOOLEANFALSE;
Standard Cell Optimization and Construction
PosImprove: PUBLIC PROC [handle: SC.Handle, maxCycles: INT] = {
Improve the positions of instances whithin rows.
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] = {
Improve the positions of instances whithin rows using wire lenght as figure of merit.
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] = {
Improve the orientation of instances.
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] = {
Improve the orientation of instances using wire lenght as figure of merit.
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] = {
Improve the positions of instances whithin rows.
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] = {
Initialize for simulated annealing improvement.
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] = {
determine parameters for simulated placement.
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] = {
Improve the placement for the instances (one at a time) by simulated annealing.
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] = {
Improve the placement for the instances (one at a time) by simulated annealing.
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] = {
Improve the placement for the instances by exhaustive search.
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] = {
Determine strategic paths for the wiring that must cross cell rows.
Uses minimum Stiener tree global routing
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] = {
Determine actual wiring paths.
Works with ExprGlobalRoute
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.ROPENIL, name: Rope.ROPENIL] RETURNS [object: CD.Object] = {
Create a standard cell object by performing the above operations
widthFactor: REALMAX[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;
};
PWCore Interface
The cellType to layout is a record cellType containing elements from MSI; the layout proc flattens the Core description and calls the standard cell router. Placement is obtained from timberwolf.
StandardCellRouteX: PWCore.LayoutProc = {
hMaterial: Rope.ROPE ← "metal";
vMaterial: Rope.ROPE ← "metal2";
widthFactor: REALMAX[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];
SCUtil.ReadTWPlace[handle: handle];
SC.InitialPlace[handle, RTCoreUtil.GetCoreIntProp[cellType, SC.numRows, 0]];
SCExprGlobalRoute.GlobalRouteAllNets[handle];
obj ← SC.ExprDetailRoute[handle].object;
};
The cellType to layout is a record cellType containing elements from MSI; the layout proc flattens the Core description and calls the standard cell placer and router.
StandardCellLayout: PWCore.LayoutProc = {
saParms: SC.SAParms;
initialResult: SC.SAInitialResult;
hMaterial: Rope.ROPE ← "metal";
vMaterial: Rope.ROPE ← "metal2";
widthFactor: REALMAX[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;
};
The cellType to layout is a record cellType containing elements from MSI; the layout proc flattens the Core description and calls the TimberWolf standard cell placer and SC router. Uses an experimental version of the Global Router
StandardCellLayoutTWX: PWCore.LayoutProc = {
twMsg: Rope.ROPE;
hMaterial: Rope.ROPE ← "metal";
vMaterial: Rope.ROPE ← "metal2";
widthFactor: REALMAX[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]];
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];
Experimental Layout ATOMS
SCRouteXAtom: ATOM ← PWCore.RegisterLayoutAtom[$SCRouteX, StandardCellRouteX, SCExtras.StandardCellDecorate, SCExtras.StandardCellAttibutes];
SCTWXAtom: ATOM ← PWCore.RegisterLayoutAtom[$SCRemoteX, StandardCellLayoutTWX, SCExtras.StandardCellDecorate, SCExtras.StandardCellAttibutes];
}.