<> <> <> <> DIRECTORY Core, Pipal, PipalCore, PipalInt, RefTab; PatchWork: CEDAR DEFINITIONS = BEGIN <> <> <> LayoutProc: TYPE = PROC [cellType: Core.CellType] RETURNS [obj: Pipal.Object]; <> <> <> <<>> DecorateProc: TYPE = PROC [cellType: Core.CellType, obj: Pipal.Object]; <> <<>> AttributesProc: TYPE = PROC [cellType: Core.CellType]; <> <<>> RegisterLayoutAtom: PROC [layoutAtom: ATOM, layoutProc: LayoutProc, decorateProc: DecorateProc _ NIL, attributesProc: AttributesProc _ NIL] RETURNS [sameAtom: ATOM]; <> <> <> GetLayoutAtomRegistration: PROC [layoutAtom: ATOM] RETURNS [layoutProc: LayoutProc _ NIL, decorateProc: DecorateProc _ NIL, attributesProc: AttributesProc _ NIL]; <> <> <<>> layoutAtomProp: ATOM; -- = $Layout. Property on cellTypes to specifies layoutAtoms GetLayoutAtom: PROC [cellType: Core.CellType] RETURNS [layoutAtom: ATOM _ NIL]; <> <> <<>> Layout: PROC [cellType: Core.CellType] RETURNS [obj: Pipal.Object]; <> <<- fetching the layoutAtom with the function GetLayoutAtom (property layoutAtomProp), and finding the corresponding layoutProc and decorateProc, >> <<- if that fails start all over again with the recast of cellType.>> <<- evaluating the attributesProc (if present), >> <<- evaluating layoutProc, >> <<- using the decorateProc (if present) to decorate the original cellType>> <> <> <> <<$Get and $GetAndFlatten: the Object of name the name of the CellType concatenated with maskSuffix is fetched and extracted. Publics of the extracted CellType must correspond [by full name] to the original public. GetAndFlatten flattens the layout, so that corresponding transistors inter-cells are fused.>> <<$AbutX, $AbutY, $ReverseAbutX, $ReverseAbutY: the cellType must be a recordCell. Sorts the instances according to the Sisyph decoration.>> <<$Abut: the cellType must be a recordCell. Decides if it is an Abut in X or Y by looking at the Sisyph decorations. Then sorts the instances according to the Sisyph decoration.>> <<$ArrayX, $ArrayY, $ArrayFlipX, $ArrayFlipY, ReverseArrayX, $ReverseArrayY: the cellType must be a sequenceCell.>> <<$FlipX, $FlipY, $Rot90, $Rot180, $Rot270: the cellType must be a RecordCell with a unique instance. >> <> <<$Value: expects a $PWCoreValue property [of type Object] on the cellType. The Object is extracted, and publics of the extracted CellType must correspond [by full name] to the original public. No indirection is added, so that if different cell types (e.g. extracted by Sisyph in different contexts) need the same layout they must insert an indirection level in the Pipal hierarchy.>> <<$RawAbutX, $RawAbutY, $RawReverseAbutX, $RawReverseAbutY: the cellType must be a recordCell. The order of the cell instances is important.>> <<$Recast: the cellType must have a Recast proc and the recasted cellType must have layout. >> maskSuffix: Core.ROPE; <> <> SetLayout: PROC [cellType: Core.CellType, layoutAtom: ATOM, userDataProp: ATOM _ NIL, userData: REF _ NIL]; <> <> <> <> <> <<>> SetGet: PROC [cellType: Core.CellType] = INLINE {SetLayout[cellType, $Get]}; <> <<>> SetLayoutAndDecoration: PROC [cellType: Core.CellType, layout: Pipal.Object] = INLINE {SetLayout[cellType, $ValueNoDecorate, $PWCoreValue, layout]}; <> <<>> SetAbutX: PROC [cellType: Core.CellType] = INLINE {SetLayout[cellType, $RawAbutX]}; SetAbutY: PROC [cellType: Core.CellType] = INLINE {SetLayout[cellType, $RawAbutY]}; SetArrayX: PROC [cellType: Core.CellType] = INLINE {SetLayout[cellType, $ArrayX]}; SetArrayY: PROC [cellType: Core.CellType] = INLINE {SetLayout[cellType, $ArrayY]}; RotateCellType: PROC [rotatedCellType: Core.CellType, orientation: ATOM] RETURNS [cellType: Core.CellType]; <> <> SortProc: TYPE = PROC [PipalInt.Position, PipalInt.Position] RETURNS [BOOL]; <> <<>> SortInX: SortProc; SortInY: SortProc; ReverseSortInX: SortProc; ReverseSortInY: SortProc; DecorateValue: DecorateProc; <> <<>> DecorateEnumeration: PROC [cellType: Core.CellType, obj: Pipal.Object, reverse: BOOL _ FALSE]; <> <> <> <> <<>> DecorateRecasted: DecorateProc; <> <> <> <<>> DecorateTransformed: DecorateProc; <> <> <<>> InstancesInXOrY: PROC [decoration: PipalCore.Decoration, record: Core.CellType, fudge: INT _ 0] RETURNS [ambiguous, inX: BOOL]; <> <> <> <> SortInstances: PROC [decoration: PipalCore.Decoration, cellType: Core.CellType, sort: SortProc]; <> <> <> <<>> Store: PROC [cellType: Core.CellType, withCuteFonts: BOOL _ FALSE]; <> <.core".>> <Layout.pipal".>> <Shell.pipal". This shell is only for documentation.>> <<>> Retrieve: PROC [name: Core.ROPE] RETURNS [cellType: Core.CellType]; <.core".>> <> LayoutInfo: PROC [sourceCT: Core.CellType] RETURNS [layout: Pipal.Object, extractedCT: Core.CellType, extractedToSource: RefTab.Ref, key: INT]; <> GetPWCoreExtractedCTKey: PROC [extractedCT: Core.CellType] RETURNS [key: INT _ 0]; <> <> <<>> IsPatchWorkGenerated: PROC [obj: Pipal.Object] RETURNS [BOOL]; <> <> <> Signal: SIGNAL [cellType: Core.CellType]; <> <<>> Error: ERROR [type: ATOM, message: Core.ROPE, cellType: Core.CellType]; <> <<$NoLayoutAtom>> <<$NoRegistration>> <<$InternalBug>> <<$CallerBug>> <<>> PinsCorrespondingToSeveralPublics: SIGNAL [cellType: Core.CellType, obj: Pipal.Object, publics: Core.Wires, geometry: Pipal.Object]; <> <<>> NoPinsOnAtomicPublic: SIGNAL [cellType: Core.CellType, obj: Pipal.Object, public: Core.Wire, message: Core.ROPE _ NIL]; <> <> FromLayoutWithoutPublic: PROC [obj: Pipal.Object] RETURNS [cellType: Core.CellType]; <> <<>> END.