ExtractUtilities.mesa
Copyright Ó 1987 by Xerox Corporation. All rights reserved.
Bertrand Serlet September 17, 1987 4:02:40 pm PDT
DIRECTORY CD, Core, CoreFlat, CoreGeometry, Sinix;
ExtractUtilities: CEDAR DEFINITIONS = BEGIN
Theory
Grouped in this interface are various utilities for Extracting and applying processors such as DRC or simulators. Very much in evolution. Usage of those functions can be unsafe.
Some Extract Procs
ExtractCellAsWireWithPins: Sinix.ExtractProc;
Can be used for extracting a whole CD cell as a Core Wire, decorated with all the instances of the CD Cell. Useful for old Pads. Wizards only.
PreExtracted: Sinix.ExtractProc;
Registered as $PreExtracted
Result comes from reading the file with the same name as obj. Can be used for multiple VM extraction.
Computing corresponding cells
MatchSourceToExtracted: PROC [sdecoration, edecoration: CoreGeometry.Decoration, slayer, elayer: CD.Layer, source, extracted: Core.CellType, name: Core.ROPENIL, props: Core.Properties ← NIL] RETURNS [new: Core.CellType];
Given a schematics (source) that reflects the pin out, and the result of the extraction (in some mode), make a new cell that has same public as source, and that contains an instance of extracted.
Looking for a named CellType
Search: PROC [rootCT: Core.CellType, name: Core.ROPE] RETURNS [ct: Core.CellType ← NIL, flat: CoreFlat.FlatCellTypeRec ← CoreFlat.rootCellType];
Useful for Debug.
Sorting Cells by number of instances
RefInts: TYPE = LIST OF REF INT;
Useful type for the interpreter.
CountInstances: PROC [object: CD.Object] RETURNS [instanceCounts: RefInts];
Squeezing Core Structures
KeepChoice: TYPE = {all, none, one};
CleanUpDecorations: PROC [decoration: CoreGeometry.Decoration, cell: Core.CellType, keepObject: BOOLFALSE, keepPins: KeepChoice ← none, keepGeometry: KeepChoice ← one];
FlattenUniques: PROC [decoration: CoreGeometry.Decoration, cell: Core.CellType, flattenNamed: BOOLFALSE] RETURNS [Core.CellType];
END.