file SCWidthUtil.mesa
Copyright © 1986 by Xerox Corporation. All rights reserved.
Bryan Preas, December 31, 1986 12:14:46 pm PST
placement utility routines
-- GetChanWidth - get width of channel specified
-- GetSideWidth - get width of channel on side
-- AllChanWidths - find widths of all channels
DIRECTORY
SC,
SCPrivate;
SCWidthUtil: CEDAR DEFINITIONS =
BEGIN
maxWireSegs: NAT = 2000;
MaxWireSegsSr: TYPE = NAT[1 .. maxWireSegs];
ZMaxWireSegsSr: TYPE = NAT[0 .. maxWireSegs];
WireSegs: TYPE = REF WireSegsRec;
WireSegsRec: TYPE = RECORD [
nWireSegsOnCh: ZMaxWireSegsSr ← 0,
segs: ARRAY MaxWireSegsSr OF WireSeg ← ALL[NIL]];
WireSeg: TYPE = REF WireSegRec;
WireSegRec: TYPE = RECORD [
pos: SC.Number,
endType: SC.Side];
get width of channel specified
GetChanWidth: PROCEDURE[handle: SC.Handle, rowChan: SCPrivate.RowChan, fom: SCPrivate.FomType, doWidth: BOOLEAN]
RETURNS [chanWidth, wireLength: INT];
get width of channel on side
GetSideWidth: PROCEDURE[handle: SC.Handle, lRSide: SCPrivate.LRSide, fom: SCPrivate.FomType] RETURNS [chanWidth, wireLength: INT];
find widths of all channels
AllChanWidths: PROCEDURE[handle: SC.Handle, fom: SCPrivate.FomType];
END.