SEX.mesa
Copyright © 1985 by Xerox Corporation. All rights reversed.
Created by Louis Monier October 31, 1985 11:41:45 am PST
Louis Monier November 1, 1985 6:47:28 pm PST
SEX:
CEDAR
DEFINITIONS =
BEGIN
Theory
SEX (Schematic EXtractor) is an extractor going from schematics in ChipNDale (CMosB for now) to Core. It tries to be as compatible as possible with Sinix, the geometry extractor.
As ever
CellType: TYPE = Core.CellType;
Wire: TYPE = Core.Wire;
Object: TYPE = CD.Object;
Instance: TYPE = CD.Instance;
ROPE: TYPE = Rope.ROPE;
Context: TYPE = CoreCompose.Context;
Properties hanging on the resulting Core (shared with Sinix)
layoutProp:
ATOM;
-- CD.Object on CellType
-- same atom as PWCore.layoutProp
coreProp:
ATOM;
-- CellType on a CD.Object: real source of the layout
-- same atom as PWCore.coreProp
extractedCoreProp:
ATOM;
-- CellType on CD.Object to specify the corresponding CellType.
pinsProp:
ATOM;
-- pins(LIST OF CD.Instance) on each publicWire
wireGeometryProp:
ATOM;
-- LIST OF CD.Instance on every internal Core.Wire
instanceProp:
ATOM;
-- CD.Instance on CoreRecord.Instance
errorsProp:
ATOM;
-- LIST OF ROPE on the CellType to specify the list of errors found during check.
Properties Particular to SEX
iconNameProp:
ATOM;
-- name of CD.Object or StructureProc
forContextProp:
ATOM;
-- list of props for context
cacheNameProp:
ATOM;
-- entry in cellType cache
satellitesProp:
ATOM;
-- list of instances (text) or props (pairs)
isSatelliteOfProp:
ATOM;
-- CD.Instance (master)
sexKey:
ATOM;
-- used for avoiding double reg. error
extractObjProcProp:
ATOM;
ExtractObjProc is put on property on each class of object that does not use the default (default is expand). It is also possible to have those properties on the object or the instance.
Extraction
ExtractInstProc:
TYPE =
PROC [inst: Instance, context: Context]
RETURNS [cellType: CellType ←
NIL, ok:
BOOL ←
TRUE];
The extracted cellType is put as a property of the instance.
ExtractObjProc:
TYPE =
PROC [obj: Object, context: Context]
RETURNS [cellType: CellType ←
NIL, ok:
BOOL ←
TRUE];
The extracted cellType is put as a property of the object.
ExtractInst: ExtractInstProc;
DefaultExtractObj: ExtractObjProc;
Expands the object and calls again ExtractObj. Some ExtractObjProc might use this function.
AtomicExtractObj: ExtractObjProc;
Used for all objects such as rectangles or contacts that are one electric component plus themselves as geometry.
Operations for an easy management of the properties
GetPinPropFromWire: PROC [wire: Wire] RETURNS [pins: LIST OF CD.Instance];
PutPinPropOnWire: PUBLIC PROC [wire: Wire, pins: LIST OF CD.Instance];
AddPinPropOnWire: PROC [wire: Core.Wire, pin: CD.Instance];
AppendPinPropOnWire: PUBLIC PROC [wire: Wire, pins: LIST OF CD.Instance];
GetWireGeometryPropFromWire: PROC [wire: Wire] RETURNS [geometry: LIST OF CD.Instance];
PutWireGeometryPropOnWire: PROC [wire: Wire, geometry: LIST OF CD.Instance];
AddWireGeometryPropOnWire: PROC [wire: Wire, cdInstance: CD.Instance];
AppendWireGeometryPropOnWire: PROC [wire: Wire, geometry: LIST OF CD.Instance];
AddError: PROC [cellType: CellType, errorMessage: ROPE] RETURNS [false: BOOL ← FALSE];
FALSE is returned for convenience only (Lisp's style)
Geometry Primitives
TouchProc: TYPE = PROC [instance1, instance2: CD.Instance] RETURNS [yes: BOOL ← FALSE];
TouchProcs are put on property on each class of object that does not use the default (default is expand). It is also possible to have that properties on an object. The callable function Touch is soforth programmed in an Object Oriented manner.
touchProcProp: ATOM;
Touch: TouchProc;
AtomicTouchProc: TouchProc;
For atomic objects (rList)
Geometry Utilities
TouchRect: PROC [instance: CD.Instance, rect: CD.Rect, layer: CD.Layer] RETURNS [yes: BOOL ← FALSE];
Transform: PROC [transformation, instance: CD.Instance] RETURNS [result: CD.Instance];
TransformList: PROC [transformation: CD.Instance, instances: LIST OF CD.Instance] RETURNS [result: LIST OF CD.Instance ← NIL];
TouchList: PROC [instances: LIST OF CD.Instance, instance: CD.Instance] RETURNS [yes: BOOL ← FALSE];
TouchListList: PROC [instances1, instances2: LIST OF CD.Instance] RETURNS [yes: BOOL ← FALSE];