There are actually two implementations of derived layer functionality. In the original implementation, developed for the DRC system, the geometry of derived layers must be created or updated before the derived layer is referenced. In use, reference to a derived layer in a layer expression retrieves this geometry, very similar to what happens when a normal layer is referenced. Ordinarily, the derived layer geometry will be cleared after final use. The DRC system handles creation and destruction of derived layer geometry transparently.
In the second mode of operation, when the parse tree for the derived layer is created, references to derived layers will be recursively parsed and stitched into the tree. The final parse tree will contain normal layers only, and can therefor be evaluated in any context, without the need for precomputed geometry caches. This method is more convenient and flexible, however the original method may run more quickly, particularly when there are a large number of evaluateions of the same expression, as in DRC.
The derived layer evaluation mode is invisible to the used except tehat it can be specifically set when using the derived layer script library function interface. This provides explicit control of derived layer geometry creation and destruction, and evaluation mode, through functions like EvalDerivedLayers and ClearDerivedLayers.
Derived layers can be defined in the technology file, or the definitions may be imported from a Virtuoso ASCII technology file. Derived layers can also be created with the AddDerivedLayer script function.
A derived layer definition consists of a layer name, a positive integer index number, and a layer expression string. The layer expression can not be null or empty. The index number is used for establishing the order when the derived layers are listed, such as when printing an updated technology file. This number need not be unique among derived layers, derived layers with the same index are ordered alphabetically by name.
The derived layer name may be in the layer:purpose form, or may be a simple alphanumeric name. It either case, it is treated as a case-insensitive atomic token in name comparisons. This is subtly different from normal layers, where for example ``M1'' and ``M1:drawing'' refer to the same Xic layer (the drawing purpose is the default and need not be explicitly specified). As derived layer names, the two forms represent two different derived layers.
Derived layers can be created arbitrarily. If a name is already in use, the existing derived layer definition is updated. It is not an error if a derived layer has a name that matches a normal layer. References to that name will resolve to the normal layer, thus with a few exceptions the derived layer would be inaccessible.