LayoutPadFrame: PWCore.LayoutProc = {
data: CoreClasses.RecordCellType ← NARROW [cellType.data];
ia: CoreRoute.InstanceArray ←
NARROW[CoreProperties.GetCellTypeProp
[cellType, $PadFrameInstanceArray]];
cornersOK: BOOL ← ConstructCorners[ia];
innerDX: INT ← GetCTPropInt[cellType, $innerDX, 0];
innerDY: INT ← GetCTPropInt[cellType, $innerDY, 0];
outerChanWidth: INT ← GetCTPropInt[cellType, $outerWidth, 90];
powerCellWidth: INT ← GetCTPropInt[cellType, $powerWidth, 200];
leftSize: CD.Position ← CD.InterestSize[PWCore.Layout[ia[1][0].type]];
rightSize: CD.Position ← CD.InterestSize[PWCore.Layout[ia[1][2].type]];
topSize: CD.Position ← CD.InterestSize[PWCore.Layout[ia[2][1].type]];
bottomSize: CD.Position ← CD.InterestSize[PWCore.Layout[ia[0][1].type]];
innerPos: CD.Position;
bottomLeftInst: CellInstance ← ia[0][0];
bottomInst: CellInstance ← ia[0][1];
bottomRightInst: CellInstance ← ia[0][2];
leftInst: CellInstance ← ia[1][0];
innerInst: CellInstance ← ia[1][1];
rightInst: CellInstance ← ia[1][2];
topLeftInst: CellInstance ← ia[2][0];
topInst: CellInstance ← ia[2][1];
topRightInst: CellInstance ← ia[2][2];
params: Cabbage.PadRingParams;
metalLayer: CD.Layer ← CDSimpleRules.GetLayer[technologyKey, "Metal"];
vLayer: CD.Layer;
hLayer: CD.Layer;
nets: Connections.Table ← Connections.CreateForRopes[];
[vLayer, hLayer] ← CoreRoute.GetCellTypePropLayer[cellType, $VerticalMetal, $met2];
params ←
NEW [Cabbage.PadRingParamsRec ← [
horizLayer: IF hLayer=metalLayer THEN "Metal" ELSE "Metal2",
vertLayer: IF vLayer=metalLayer THEN "Metal" ELSE "Metal2",
technologyKey: technologyKey, -- $cmosB
outerBTChanWidth: outerChanWidth, -- enough for xxx tracks
outerLRChanWidth: outerChanWidth, -- enough for xxx tracks
powerBTCellWidth: powerCellWidth, -- xxx lambda power busses
powerLRCellWidth: powerCellWidth, -- xxx lambda power busses
opt: noIncompletes,
signalSinglePinNets: TRUE ]];
IF NOT(bottomSize.x=topSize.x AND leftSize.y=rightSize.y) THEN ERROR;
Layer changes from inner to pads; vLayer is vertical for inner and horizontal for pads.
ConnectionsFromList[data, nets, leftInst, right, vLayer];
ConnectionsFromList[data, nets, rightInst, left, vLayer];
ConnectionsFromList[data, nets, topInst, bottom, hLayer];
ConnectionsFromList[data, nets, bottomInst, top, hLayer];
ConnectionsFromList[data, nets, innerInst, right, hLayer];
ConnectionsFromList[data, nets, innerInst, left, hLayer];
ConnectionsFromList[data, nets, innerInst, bottom, vLayer];
ConnectionsFromList[data, nets, innerInst, top, vLayer];
innerPos ← CDBasics.AddPoints[
[innerDX*lambda, innerDY*lambda],
Cabbage.Center[
inner: InstLayout[innerInst],
bottomLeft: InstLayout[bottomLeftInst],
bottom: InstLayout[bottomInst],
bottomRight: InstLayout[bottomRightInst],
right: InstLayout[rightInst],
topRight: InstLayout[topRightInst],
top: InstLayout[topInst],
topLeft: InstLayout[topLeftInst],
left: InstLayout[leftInst],
parms: params] ];
innerPos.x ← (innerPos.x/lambda)*lambda;
innerPos.y ← (innerPos.y/lambda)*lambda;
PutInstTrans[innerInst, innerPos];
PutInstTrans[bottomLeftInst, [0, 0]];
PutInstTrans[bottomInst, [leftSize.x, 0]];
PutInstTrans[bottomRightInst, [leftSize.x+bottomSize.x, 0]];
PutInstTrans[rightInst, [leftSize.x+bottomSize.x, bottomSize.y]];
PutInstTrans[topLeftInst, [0, bottomSize.y+leftSize.y]];
PutInstTrans[topInst, [leftSize.x, bottomSize.y+leftSize.y]];
PutInstTrans[topRightInst, [leftSize.x+bottomSize.x, bottomSize.y+leftSize.y]];
PutInstTrans[leftInst, [0, bottomSize.y]];
obj ← Cabbage.PadLimitedRoute[
inner: InstLayout[innerInst],
bottomLeft: InstLayout[bottomLeftInst],
bottom: InstLayout[bottomInst],
bottomRight: InstLayout[bottomRightInst],
right: InstLayout[rightInst],
topRight: InstLayout[topRightInst],
top: InstLayout[topInst],
topLeft: InstLayout[topLeftInst],
left: InstLayout[leftInst],
innerPos: innerPos,
connections: nets,
parms: params,
name: CoreOps.GetCellTypeName[cellType] ] };