DIRECTORY CD USING [Design], CDOrient USING [mirrorX, mirrorY, Orientation, rotate90, rotate180, rotate270], Rope USING [ROPE]; PW: CEDAR DEFINITIONS = BEGIN ObjName: TYPE = ROPE _ NIL; -- so that user only deals with names (preferred) InstName: TYPE = ObjName; -- old form ROPE: TYPE = Rope.ROPE; -- waiting for some Cedar release when it is predefined ODD: PUBLIC PROC [i: INT] RETURNS [BOOL] = INLINE {RETURN [(i MOD 2 # 0)]}; EVEN: PUBLIC PROC [i: INT] RETURNS [BOOL] = INLINE {RETURN [(i MOD 2 = 0)]}; Log2: PROC [n: INT] RETURNS [INT]; TwoToThe: PROC [x: INT] RETURNS [INT]; TwoToTheLog2: PROC [n: INT] RETURNS [INT] = INLINE {RETURN [TwoToThe[Log2[n]]]}; XthBitOfN: PROC [x, n: INT] RETURNS [BOOL]; AbutX: PROC [t1, t2, t3, t4, t5, t6, t7, t8: ObjName _ NIL] RETURNS [new: ObjName]; AbutY: PROC [t1, t2, t3, t4, t5, t6, t7, t8: ObjName _ NIL] RETURNS [new: ObjName]; AbutListX: PROC [subNames: LIST OF ObjName] RETURNS [new: ObjName]; AbutListY: PROC [subNames: LIST OF ObjName] RETURNS [new: ObjName]; Inst: PUBLIC PROC [name: ObjName, conds: LIST OF ROPE, removeNamed: BOOL _ TRUE] RETURNS [ObjName]; XYFunction: TYPE = PROC [x, y: INT] RETURNS [instName: ObjName]; MapFunction: PROC [function: XYFunction, lx: INT _ 0, ux: INT, ly: INT _ 0, uy: INT] RETURNS [ObjName]; ArrayX: PROC [objName: ObjName, nx: INT _ 1] RETURNS [ObjName]; ArrayY: PROC [objName: ObjName, ny: INT _ 1] RETURNS [ObjName]; Array: PROC [objName: ObjName, nx, ny: INT _ 1] RETURNS [ObjName]; ChangeOrientation: PROC [dir: CDOrient.Orientation, tile: ObjName] RETURNS [ObjName]; FlipX: PROC [tile: ObjName] RETURNS [ObjName] = INLINE {RETURN [ChangeOrientation[CDOrient.mirrorX, tile]]}; FlipY: PROC [tile: ObjName] RETURNS [ObjName] = INLINE {RETURN [ChangeOrientation[CDOrient.mirrorY, tile]]}; Identity: PROC [tile: ObjName] RETURNS [ObjName] = INLINE {RETURN [tile]}; Rot90: PROC [tile: ObjName] RETURNS [ObjName] = INLINE {RETURN [ChangeOrientation[CDOrient.rotate90, tile]]}; Rot180: PROC [tile: ObjName] RETURNS [ObjName] = INLINE {RETURN [ChangeOrientation[CDOrient.rotate180, tile]]}; Rot270: PROC [tile: ObjName] RETURNS [ObjName] = INLINE {RETURN [ChangeOrientation[CDOrient.rotate270, tile]]}; ReName: PROC [oldName: ObjName, instanceName: ROPE] RETURNS [newCellName: ObjName]; MakeObjNonStretchable: PROC [objName: ObjName]; UserProc: TYPE = PROC [design: CD.Design] RETURNS [ObjName]; Register: PROC [userProc: UserProc, name: ROPE]; END. ΄PW.mesa Copyright c 1984 by Xerox Corporation. All rights reversed. Created by: Monier, January 31, 1985 3:11:27 pm PST Last Edited by: Serlet, February 28, 1985 10:53:27 am PST PatchWork (PW) is a program that allows construction of high level cells. The main primitive is the Abut primitive in which constraints are given by Pins. This module is the basic client interface necessary for writing PW-code. See PWDoc.tioga or implementors (Louis Monier & Bertrand Serlet) for more information. -- Basic user types -- Utilities always useful -- Predicates Dealing with Log2 of numbers Extraction of bits in INT Warning: bit 0 is the LOW order bit (lsb) -- Simple Abuts -- Abutment of lists -- Parametrized cells (conditional objects) -- Arrays and other repetitions of Cells Evaluates the function function over the domain [lx..ux)*[ly..uy) and abuts the resulting tiles in an array. Creates empty cell when lx>=ux or ly>=uy. Aligns nx tiles in the X direction. If nx<=0 an empty cell is created Aligns ny tiles in the Y direction. If nx<=0 an empty cell is created -- Rotating cells -- Other functions Naming instances Making objects non stretchable -- Facilities for client interface Κu˜– "Cedar" stylešœ™Jšœ Οmœ1™—š’œžœžœ ˜1Jšžœžœ0˜>——J˜™J™J™Jš’œžœ"žœžœ˜SJ˜J™Jš’œžœ˜/—J˜šœ"™"J™Jš ’œžœžœ žœ žœ ˜