CabbageImpl.mesa 
Copyright © 1986 by Xerox Corporation. All rights reversed.
Created by Bryan Preas, May 21, 1986 2:59:18 pm PDT
DIRECTORY
Cabbage,
CabbagePrivate,
Connections,
CD,
Rope;
CabbageImpl: CEDAR PROGRAM
IMPORTS CabbagePrivate
EXPORTS Cabbage =
BEGIN
Error: PUBLIC ERROR[errorType: Cabbage.ErrorType ← callingError, explanation: Rope.ROPENIL] = CODE;
Signal: PUBLIC SIGNAL[errorType: Cabbage.ErrorType ← callingError, explanation: Rope.ROPENIL] = CODE;
defaultPadRingParams: PUBLIC Cabbage.PadRingParams ← NEW[Cabbage.PadRingParamsRec ← ["metal", "metal2"]];
Returns the innerPos needed for centering the inner in the pad frame. This is usually what is desired. However the position of the inner cell can be positioned other than in the center.
Center: PUBLIC PROC [inner, bottomLeft, bottom, bottomRight, right, topRight, top, topLeft, left: Cabbage.Object, parms: Cabbage.PadRingParams] RETURNS [innerPos: CD.Position] = {
handle: CabbagePrivate.Handle ← CabbagePrivate.CreateHandle[inner, bottomLeft, bottom, bottomRight, right, topRight, top, topLeft, left, NIL, parms, NIL, normal];
lowerY: INT ← handle.bottom.orgin.y + handle.bottom.size.y;
upperY: INT ← handle.top.orgin.y - handle.inner.size.y;
lowerX: INT ← handle.left.orgin.x + handle.left.size.x;
upperX: INT ← handle.right.orgin.x - handle.inner.size.x;
innerPos ← [(lowerX + upperX)/2, (lowerY + upperY)/2]};
Extends the wires of oldInner to make an proper inner. The extension takes into account the routing layer.
MakeInner: PUBLIC PROC [oldInner: Cabbage.Object, connections: Connections.Table, parms: Cabbage.PadRingParams] RETURNS [inner: Cabbage.Object] = {
};
Extends the wires of oldPadSides to make an proper PadSides. The extension takes into account the routing layer.
MakeOuter: PUBLIC PROC [oldOuter: Cabbage.Object, side: Cabbage.Side, connections: Connections.Table, parms: Cabbage.PadRingParams] RETURNS [outer: Cabbage.Object] = {
};
Route the chip
PadRoute: PUBLIC PROC [inner, bottomLeft, bottom, bottomRight, right, topRight, top, topLeft, left: Cabbage.Object, innerPos: CD.Position, connections: Connections.Table, parms: Cabbage.PadRingParams ← defaultPadRingParams, name: Rope.ROPE] RETURNS [chip: Cabbage.Object] = {
handle: CabbagePrivate.Handle ← CabbagePrivate.CreateHandle[inner, bottomLeft, bottom, bottomRight, right, topRight, top, topLeft, left, connections, parms, name, normal];
CabbagePrivate.CheckInnerPos[handle, innerPos];
CabbagePrivate.GlobalRoute[handle];
CabbagePrivate.DetailedRoute[handle];
chip ← CabbagePrivate.MakeChip[handle];
};
Route a pad limited chip
PadLimitedRoute: PUBLIC PROC [inner, bottomLeft, bottom, bottomRight, right, topRight, top, topLeft, left: Cabbage.Object, innerPos: CD.Position, connections: Connections.Table, parms: Cabbage.PadRingParams ← defaultPadRingParams, name: Rope.ROPE] RETURNS [chip: Cabbage.Object] = {
handle: CabbagePrivate.Handle ← CabbagePrivate.CreateHandle[inner, bottomLeft, bottom, bottomRight, right, topRight, top, topLeft, left, connections, parms, name, padLimited];
CabbagePrivate.CheckInnerPos[handle, innerPos];
CabbagePrivate.GlobalRoute[handle];
CabbagePrivate.DetailedRoute[handle];
chip ← CabbagePrivate.MakeChip[handle];
};
END.