SCInstUtil.mesa
Copyright © 1985, 1986 by Xerox Corporation. All rights reserved.
last edited: Bryan Preas December 19, 1986 4:53:06 pm PST
Jean-Marc Frailong October 11, 1987 9:45:39 pm PDT
compoments utility routines
-- InstWidth - find width of component at current orientation
-- InstHeight - find height of component at current orientation
-- BpHeight - find height of bp when considering side it is on
-- BpWidth - find width of bp when considering side it is on
-- MinMaxBPOffset - find min and max offsets of bonding pads on side
-- BpOffsets - find offsets of bonding pads on side
-- BpPos - find position of inst on side
-- PosOf- find the position (side, x, and y) of a component on a pin
-- RotateRect- Rotate a rectangle of a cell
-- LgOffsets- determine offsets of components in row
-- AllOffsets - determine all component offsets
-- AsgnChanPos - assign current positions to horizontal and vertical channels
-- RowsForInsts - find rows that these comps are on
-- CheckInsts - check row and position of comps
-- CheckInst - check row and position of a inst
-- EnumeratePinsOnInst - enumerate the net pins on an instance
-- CDOrien - get the CD orientation on an instance
DIRECTORY
CD, CoreClasses, CoreFlat, SC, SCPrivate, Rope, RTBasic;
SCInstUtil: CEDAR DEFINITIONS =
BEGIN
defltLgOrien: SCPrivate.Orientation;
defltBpOrien: ARRAY SC.Side OF SCPrivate.Orientation;
find width of component at current orientation
InstWidth: PROC[inst: SCPrivate.Instance] RETURNS[width: SC.Number];
find height of component at current orientation
InstHeight: PROC[inst: SCPrivate.Instance] RETURNS[height: SC.Number];
find height of bp when considering side it is on this is perpendicular to side
BpHeight: PROC[inst: SCPrivate.Instance] RETURNS[height: SC.Number];
find width of bp when considering side it is on this is along to side
BpWidth: PROC[inst: SCPrivate.Instance] RETURNS[width: SC.Number];
find min and max offsets of bonding pads on side
MinMaxBPOffset: PROC[handle: SC.Handle, side: SC.Side] RETURNS [minOffset, maxOffset: SC.Number];
find offsets of bonding pads on side
BpOffsets: PROC[handle: SC.Handle, side: SC.Side, pos1, pos2: SCPrivate.ZMaxPosSr ← 0];
check offsets of bonding pads on side
CheckBpOffsets: PROC[handle: SC.Handle, side: SC.Side];
find position of inst on side
FUNCTION assumes that channel and bp positions have been assigned.
BpPos: PROC[handle: SC.Handle, inst: SCPrivate.Instance] RETURNS[result: SC.Number];
find position of inst
assumes that channel and instance positions have been assigned.
InstPosOf: PROC[handle: SC.Handle, inst: SCPrivate.Instance, pin: SCPrivate.ObjectPin] RETURNS[pos: RTBasic.PQPos];
find the position (side, x, and y) of a component on a pin
PinDescription: TYPE = RECORD [
xPos, yPos: SC.Number, sideOn: SC.Side];
PosOf: PROC[inst: SCPrivate.Instance, pin: SCPrivate.ObjectPin]
RETURNS [pinDes: PinDescription];
find the position of a rotated rectangle wintin a component
RotateRect: PROC[inst: SCPrivate.Instance, defRect: SC.Rect]
RETURNS [newRect: SC.Rect];
determine offsets of components in row
LgOffsets: PROC[handle: SC.Handle, row: SCPrivate.ZMaxRowSr, pos1, pos2: SCPrivate.ZMaxPosSr ← 0];
determine all component offsets
AllOffsets: PROC[handle: SC.Handle];
assign current positions to horizontal and vertical channels
AsgnChanPos: PROC[handle: SC.Handle];
find chans that these comps touch
ChansForInsts: PROC[handle: SC.Handle, insts: SCPrivate.InstanceList]
RETURNS [touchesChan: SCPrivate.ChanSet];
check row and position of a inst
CheckInst: PROC[handle: SC.Handle, inst: SCPrivate.Instance];
check row and position of a inst
CheckInsts: PROC[handle: SC.Handle];
EnumerateInstances: PROC [handle: SC.Handle, startInst, stopInst: SCPrivate.MaxInstanceSr, eachInstance: EachInstanceProc] RETURNS [quit: BOOL];
EnumerateAllInstances: PROC [handle: SC.Handle, eachInstance: EachInstanceProc] RETURNS [quit: BOOL];
EachInstanceProc: TYPE = PROC [instance: SCPrivate.Instance] RETURNS [quit: BOOLFALSE];
EnumeratePinsOnInst: PROC [instance: SCPrivate.Instance, eachPin: EachPinProc] RETURNS [quit: BOOL];
EachPinProc: TYPE = PROC [instance: SCPrivate.Instance, pin: NAT, netPin: SCPrivate.PinNet] RETURNS [quit: BOOLFALSE];
DefineInstance: PROC [handle: SC.Handle, instanceName: Rope.ROPE, object: SCPrivate.Object, equivName: Rope.ROPENIL]
RETURNS [instance: SCPrivate.Instance ← NIL];
NumInstsOnList: PROC [instsances: SCPrivate.InstanceList] RETURNS [count: SCPrivate.ZMaxInstanceSr];
CDOrien: PROC[instance: SCPrivate.Instance] RETURNS [orien: CD.Orientation];
FindSourceInstance: PROC [handle: SC.Handle, flatCT: CoreFlat.FlatCellType] RETURNS [instance: SCPrivate.Instance];
Find the instance for a source flat cell from the global table, scream if not found.
DefineSourceInstance: PROC [handle: SC.Handle, flatCT: CoreFlat.FlatCellType, instance: SCPrivate.Instance];
Register the instance for a source flat cell from the global table, scream if already there
.
END.