ExtractDoc.tioga
Copyright Ó 1986, 1987 by Xerox Corporation. All rights reversed.
Created by Bertrand Serlet, October 14, 1986 0:29:56 am PDT
Bertrand Serlet, September 22, 1987 3:00:27 pm PDT
Jean-Marc Frailong January 4, 1988 6:07:24 pm PST
Extract
CEDAR 7.0 — FOR INTERNAL XEROX USE ONLY
Extract
Interpreting Pictures
Bertrand Serlet
Abstract: Extract is a package grouping the extraction engine [Sinix], the layout extractor and the schematics extractor [Sisyph]. It also defines the important notion of decorated Core [CoreGeometry].
Created by: Bertrand Serlet
Maintained by: Serlet <Serlet.pa>, Frailong <Frailong.pa>, Sindhu <Sindhu.pa>
Keywords: Layout Extractor, Schematics Extractor, Extraction, Technology Independent Extraction, Core, ChipNDale, Schematics, Wire Icons, Icons, Visual Programming, Schematics, Geometry Decorations
XEROX Xerox Corporation
Palo Alto Research Center
3333 Coyote Hill Road
Palo Alto, California 94304
For Internal Xerox Use Only
The documentation describing the Schematics editor is in SisyphDoc.tioga
Structure of the package
CoreGeometry
CoreGeometry interface describes how geometry is attached to Core data structures. This attachment is mostly independent of the semantic of the picture. Conceptually this interface is below all the others of the package, and just above Core and ChipNDale.
A semi private interface CoreGeometryBackdoor allows things like output on file. See me if you need to use it ...
Sinix
Sinix defines the extraction engine.
SinixOps
SinixOps exports allows to link the editor and the Core data structure, by exporting functions to highlight or specify a selection. It also allows registration of extraction modes, and registration of CD commands.
Sisyph
Sisyph defines the schematics extractor.
WireIcons
WireIcons provides the designer with a set of icons for dealing with structured wires.
InstanceTable
This interface, adapted from Intervals in CedarChest has been tailored to Sinix, in particular to be memory and CPU efficient.
SchCDUtils
Provides functions to make icons objects.
Things to do waiting for CoreCDUser
SinixOps: Highlight of both the schematics and the corresponding layout
SinixOps: Registration mechanism for commands like "Sisyph & ..."
Waiting for RB's CoreCDUser.
ExtractAnd [design, allowMultiple, PROC [result, props], incontext: BOOL]
Error catching. Interpreter error not handled right.
Cleanup in the MenuTable. Rename Sequence icon in sequence cell (in the menu)
Extract and Debug command
SinixOps: Highlight by name when pushed does not work
Wait that Push By name is exported
SinixOps: pdif and the like
When highlighting, both wires should be highlighted
SinixOps: Bug Compilo?
Code in SinixOpsImpl used to provoke a Compiler bug. Check if it is still there. [BS+JMF]
SinixOps varia
SinixOps.CDStackToPath fails with ERROR when you select a piece of geometry inside a wire icon. I admit this is quite vicious, but it may nevertheless happen (well, I did fall in that trap...).
In general, wire icons are quite ignored in SinixOps. For example, it's impossible to select a net by selecting a wire icon.
??? Highlight whole icon when trying to highlight an internal => change CoreGeometry ???
Wish List for CoreGeometry and Sinix
Sinix: Parsing satellites and expressions
In Sinix?
SinixOps: Repair Background Extraction
Sinix: Extract Overlaid Cells
New ExtractProc that promotes all the internals to publics.
SinixCMosB.
Touch
TouchProc May be it should be in the decoration!
pwellCont (resp. nwellCont) and pdif (resp. ndif) should not touch!
CoreGeometry.CreateShell
Problem of duplicates: Still there? Check it when one does a PutPins!
Wish List for Sisyph
Promoting public
Wires which have some geometry intersecting the border (the interest rect) are promoted public. In the future more wires than just the ones intersecting the border might be promoted. Users should not depend on the fact the only wires promoted public are the ones intersecting the border. It is NOT possible to do the following rule (because it works only one level): If a property $IsPublic (with an atomic value being $TRUE or $FALSE) is attached to a piece of geometry, the promotion is done accordingly to the value of the "boolean".
Sisyph one day
3 properties: $ConnectedByname, $PromoteToPublic, $PropagateName
Values: $Once=$Always>$SubOnce=$SubAlways>NIL>SUBNIL
SisyphImpl: Contexts
It is possible to displace the CopyTV from the creation of contexts to the evaluation. That would mean much faster copy of contexts.
Sisyph: Imports
Slight problem in extraction of Imports: it is not possible to attach an instance satellite "cI←mumble[]" to an imported object. If you do it, it is just ignored. I have been too lazy to look exactly what is going wrong, but the culprit seems to be the Imports ExtractProc in Sinix.
I've looked a little bit more into the problem. The trick is in Sisyph. The special handling of "cI←..." is done only in ExtractSchematic, and not also in ExtractImport. Net result, it is impossible to set an instance satellite "cI←Mumble.Foo[]" onto an import. Such a thing is sometimes interesting (the example on which the error was detected was using a Logic And gate replicated using Sch.CSeq). An obvious solution from the designer's point of view is to package the import inside a dummy cell, and put the "cI←Mumble.Foo[]" property on this dummy cell.
Nevertheless, this case raises in my mind some doubts as to the correction of the handling of Imports in Sisyph: there are other operations that are performed on cells and not on imports, and it is possible that seem of them are really important. So I believe it would be worthwhile to check a little more on the subject. [JMF]
Stack of design: [JMF]
Separately, Louis and I think we need to make some modification to the context carried around imports. The problem came because there is a new icon around that provides a testProc described in a file (the Oracle, c.f. LogicRosemaryImpl for more details). The problem is, where do we look for the parameter file? Conceptually, the file should be looked for in the directory from which the initial design was read. The trick is that when the Oracle icon is extracted, the context does not carry any information regarding the source design from which the import was called. Hence the idea of keeping in the context a history of the designs through which the extraction process has been (remember that it's possible through CDEnvironment.GetWorkingDirectory to recover the directory from which a design was read). The idea I currently have is to keep track of the list of designs (or the list of design directories) through the Sisyph.Create function, which is the only one that creates new contexts: if there is a previous context, then Store in the new context "designHistory←CONS[newDesign, designHistory from previous context] else Store in the new context either NIL or newDesign according to whether we want the current design to be part of the list. You may of course replace the designs by directory names, thus getting a search path (probably in the wrong order...).
Sisyph: publics
Check that all publics are named.
Sisyph: Color
Design Considerations
Caching
In order to have Lichen work it is important that ct1#ct2 <=> PWCore.Layout[ct1]#PWCore.Layout[ct2]; but also that layout1#layout2 <=> Sinix.Extract[layout1]#Sinix.Extract[layout2]. Therefore the Object cache must be used for all objects that return a cell type. For a counterexample, if there is no object caching on the extraction of rotated objects, two extractions of the same rotated object (with may be different properties) might return different cellTypes.
Dealing with CD pins
Approach that does not work: CD symbolic objects are a pain: the interesting information (layer, name) is located in the instance instead of the object. This is obviously orthogonal to the notion of object. To deal with that a serious hack is implemented: a copy of the pin object is made (to avoid shared objects problem), then the interesting stuff (properties of the instance) is copied on the object.
The one that works: Make a cell object containing a pin.
Copying of properties in wire icons
Slowness of extraction
After some anonymous denunciations, the inspector Gadget strikes again ...
I once again spied schematics extraction on the real life design you gave me (I had not seriously done that in 7.0 yet).
Spying the CPU time does not yield any interesting action item: the time is spend all over the code, and there is nothing worth optimizing.
Spying the Allocations gives the following results:
1 - Copying the contexts: 19.2%
2 - Allocations in the interpreter: 16.2%
3 - Various internal SymTab/RefTab allocations: 16%
4 - CDSatellites.GetSatelliteRopes: 9.8%
5 - Creation of wires in Sinix or Sisyph: 7.7%
6 - CoreProperties.PutProp: 5.3%
It is easy to fight some of 1 by avoiding copying of contexts when not necessary (for extracting wires for example). It cannot be done by reallocating the same tables all over again, since they are still pointed to by the cache. Estimate: 2 man days for a 10% gain.
3 is hard to fight because there is at least 10 different places that allocate/deallocate HashTables, such as in CoreOps. Estimate: 1 afternoon for a few % gain, 1 man day for a 10% gain. The gain would be for all DA, not only for schematics extraction.
I can not do much for the rest.
My conclusion is: there is nothing I can do that is really worth the effort (although I might some day I want to lose time remedy to 1 or 3). And, unless something changes dramatically in the whole system, that was the last time I spied extraction ...
Life is hard.
Varia