PrePlacLg:
PROCEDURE[handle:
SC.Handle, instance: SCPrivate.Instance, initialized:
BOOLEAN] = {
preplace the logic component instance
layoutData: SCPrivate.LayoutData ← NARROW[handle.layoutData];
lgRows: SCPrivate.LgRows ← layoutData.lgRows;
iRow, fRow: SCPrivate.ZMaxRowSr;
IF initialized
THEN {
instance.curRow ← instance.initRow;
instance.curPos ← instance.initPos;
instance.curOrien ← instance.initOrien};
check if this instance has a currently defined position
fRow ← IntBounds[instance.fnlRow, 0, SCPrivate.maxLgRows, 0, instance.name];
iRow ← IntBounds[instance.initRow, 0, SCPrivate.maxLgRows, 0, instance.name];
IF instance.preRow > 0
THEN {
instance.preRow ← IntBounds[instance.preRow, 1, SCPrivate.maxLgRows, 0, instance.name];
instance.prePos ← IntBounds[instance.prePos, 1, SCPrivate.maxPos, 0, instance.name];
instance.preOrien ← IntBounds[instance.preOrien, 1, SCPrivate.maxOrien, SCInstUtil.defltLgOrien, instance.name];
IF instance.preRow = 0
OR instance.prePos = 0
OR instance.preOrien = 0
THEN {
instance.preRow ← 0;
instance.prePos ← 0;
instance.preOrien ← 0}}
check if the final position is specified
ELSE
IF fRow > 0
THEN {
instance.preRow ← fRow;
instance.prePos ← IntBounds[ChooseNonZero[instance.fnlPos, instance.initPos], 0, SCPrivate.maxPos, 0, instance.name];
instance.preOrien ← IntBounds[ChooseNonZero[instance.fnlOrien, instance.initOrien, SCInstUtil.defltLgOrien], 1, SCPrivate.maxOrien, SCInstUtil.defltLgOrien, instance.name]}
check for initial position specified
ELSE
IF iRow > 0
THEN {
instance.preRow ← iRow;
instance.prePos ← IntBounds[ChooseNonZero[instance.fnlPos, instance.initPos], 0, SCPrivate.maxPos, 0, instance.name];
instance.preOrien ← IntBounds[ChooseNonZero[instance.fnlOrien, instance.initOrien, SCInstUtil.defltLgOrien], 1, SCPrivate.maxOrien, SCInstUtil.defltLgOrien, instance.name]};
IF instance.preRow > 0 THEN SCPlaceUtil.PutLgRow[handle, instance, instance.preRow, instance.preOrien]
ELSE {instance.curRow ← 0; instance.curPos ← 0; instance.curOrien ← 0};
check if this instance restricts a row by specifying a position on a row
IF instance.preRow > 0
AND instance.prePos > 0
THEN {
IF fRow > 0 AND instance.fnlPos > 0 THEN lgRows.rows[fRow].fnlLgFxd ← TRUE;
IF iRow > 0 AND instance.initPos > 0 THEN lgRows.rows[iRow].initLgFxd ← TRUE}};
PrePlacBp:
PROCEDURE[handle:
SC.Handle, instance: SCPrivate.Instance, initialized:
BOOLEAN] = {
preplace the bonding pad component instance
layoutData: SCPrivate.LayoutData ← NARROW[handle.layoutData];
bpRows: SCPrivate.BpRows ← layoutData.bpRows;
iSide, fSide: SC.SideOrNone;
IF initialized
THEN {
instance.curSide ← instance.initSide;
instance.curPos ← instance.initPos;
instance.curOrien ← instance.initOrien};
check if this instance has a currently defined position
iSide ← SideBounds[instance.initSide, bottom, none, none, instance.name];
fSide ← SideBounds[instance.fnlSide, bottom, none, none, instance.name];
IF instance.preSide # none
THEN {
instance.preSide ← SideBounds[instance.preSide, bottom, right, none, instance.name];
instance.prePos ← IntBounds[instance.prePos, 1, SCPrivate.maxPos, 0, instance.name];
instance.preOrien ← IntBounds[instance.preOrien, 1, SCPrivate.maxOrien, SCInstUtil.defltBpOrien[instance.preSide], instance.name];
IF instance.preSide = none
OR instance.prePos = 0
OR instance.preOrien = 0
THEN {
instance.preSide ← none;
instance.prePos ← 0;
instance.preOrien ← 0}}
check if the final position is specified
ELSE
IF fSide # none
THEN {
instance.preSide ← fSide;
instance.prePos ← IntBounds[ChooseNonZero[instance.fnlPos, instance.initPos], 0, SCPrivate.maxPos, 0, instance.name];
instance.preOrien ← IntBounds[ChooseNonZero[instance.fnlOrien, instance.initOrien, SCInstUtil.defltBpOrien[instance.preSide]], 1, SCPrivate.maxOrien, SCInstUtil.defltBpOrien[instance.preSide], instance.name]}
check for initial position specified
ELSE
IF iSide # none
THEN {
instance.preSide ← iSide;
instance.prePos ← IntBounds[ChooseNonZero[instance.fnlPos, instance.initPos], 0, SCPrivate.maxPos, 0, instance.name];
instance.preOrien ← IntBounds[ChooseNonZero[instance.fnlOrien, instance.initOrien, SCInstUtil.defltBpOrien[iSide]], 1, SCPrivate.maxOrien, SCInstUtil.defltBpOrien[iSide], instance.name]};
IF instance.preSide # none THEN SCPlaceUtil.PutBpSide[handle, instance, instance.preSide]
ELSE {instance.curSide ← none; instance.curPos ← 0; instance.curOrien ← 0};
check to see if this bp restricts this side by having a position assigned
IF instance.preSide # none
AND instance.prePos > 0
THEN {
IF fSide # none AND instance.fnlPos > 0 THEN bpRows[fSide].fnlBpFxd ← TRUE;
IF iSide # none AND instance.initPos >0 THEN bpRows[iSide].initBpFxd ← TRUE}};