com.sun.electric.technology
Class Layer

java.lang.Object
  extended by com.sun.electric.technology.Layer

public class Layer
extends java.lang.Object

The Layer class defines a single layer of material, out of which NodeInst and ArcInst objects are created. The Layers are defined by the PrimitiveNode and ArcProto classes, and are used in the generation of geometry. In addition, layers have extra information that is used for output and behavior.


Nested Class Summary
static class Layer.Function
          Function is a typesafe enum class that describes the function of a layer.
 
Field Summary
static double DEFAULT_DISTANCE
           
static double DEFAULT_FACTOR
           
static java.lang.String DEFAULT_MODE
           
static double DEFAULT_THICKNESS
           
static com.sun.electric.technology.Layer.LayerSortByName layerSortByName
          A comparator object for sorting Layers by their name.
 
Method Summary
 double getAreaCoverage()
          Method to return the minimu area coverage that the layer must reach in the technology.
 Pref getBooleanPref(java.lang.String what, java.util.HashMap<Layer,Pref> map, boolean factory)
          Method to get a boolean preference for this Layer and a specific purpose.
 double getCapacitance()
          Method to return the capacitance for this layer.
 Setting getCapacitanceSetting()
          Returns project Setting to tell the capacitance for this Layer.
 java.lang.String getCIFLayer()
          Method to return the CIF name of this layer.
 Setting getCIFLayerSetting()
          Returns project Setting to tell the CIF name of this Layer.
 double getDepth()
          Method to calculate Z value of the upper part of the layer.
 double getDistance()
          Method to return the distance of this layer.
 Pref getDoublePref(java.lang.String what, java.util.HashMap<Layer,Pref> map, double factory)
          Method to get a double-precision preference for this Layer and a specific purpose.
 java.lang.String getDXFLayer()
          Method to return the DXF name of this layer.
 Setting getDXFLayerSetting()
          Returns project Setting to tell the DXF name of this Layer.
 double getEdgeCapacitance()
          Method to return the edge capacitance for this layer.
 Setting getEdgeCapacitanceSetting()
          Returns project Setting to tell the edge capacitance for this Layer.
 Layer.Function getFunction()
          Method to return the Function of this Layer.
 int getFunctionExtras()
          Method to return the Function "extras" of this Layer.
 EGraphics getGraphics()
          Method to return the graphics description of this Layer.
 int getIndex()
          Method to return the index of this Layer.
 Pref getIntegerPref(java.lang.String what, java.util.HashMap<Layer,Pref> map, int factory)
          Method to get an integer preference for this Layer and a specific purpose.
 java.lang.String getName()
          Method to return the name of this Layer.
 Layer getNonPseudoLayer()
          Method to return the non-pseudo layer associated with this pseudo-Layer.
 Layer getPseudoLayer()
          Method to return the pseudo layer associated with this real-Layer.
 PrimitiveNode getPureLayerNode()
          Method to return the Pure Layer Node associated with this Layer.
 double getResistance()
          Method to return the resistance for this layer.
 Setting getResistanceSetting()
          Returns project Setting to tell the resistance for this Layer.
 java.lang.String getSkillLayer()
          Method to return the Skill name of this layer.
 Setting getSkillLayerSetting()
          Returns project Setting to tell the Skill name of this Layer.
 Pref getStringPref(java.lang.String what, java.util.HashMap<Layer,Pref> map, java.lang.String factory)
          Method to get a string preference for this Layer and a specific purpose.
 Technology getTechnology()
          Method to return the Technology of this Layer.
 double getThickness()
          Method to return the thickness of this layer.
 double getTransparencyFactor()
          Method to return the transparency factor of this layer as a string.
 java.lang.String getTransparencyMode()
          Method to return the transparency mode of this layer as a string.
 boolean isDiffusionLayer()
          Method to determine if the layer function corresponds to a diffusion layer.
 boolean isDimmed()
          Method to tell whether this Layer is dimmed.
 boolean isNonElectrical()
          Method to tell whether this layer function is non-electrical.
 boolean isPseudoLayer()
          Method to return true if this is pseudo-Layer.
 boolean isVisible()
          Method to tell whether this Layer is visible.
 boolean isVTImplantLayer()
          Method to determine if the layer corresponds to a VT layer.
 Layer makePseudo()
          Method to create a pseudo-layer for this Layer with a standard name "Pseudo-XXX".
 PrimitiveNode makePureLayerNode(java.lang.String nodeName, double size, Poly.Type style, java.lang.String portName, ArcProto... connections)
          Method to make the Pure Layer Node associated with this Layer.
 PrimitiveNode makePureLayerNode(java.lang.String nodeName, double size, Technology.Distance xmlSize, Poly.Type style, java.lang.String portName, ArcProto... connections)
          Method to make the Pure Layer Node associated with this Layer.
static Layer newInstance(Technology tech, java.lang.String name, EGraphics graphics)
          Method to create a new layer with the given name and graphics.
static Layer newInstanceFree(Technology tech, java.lang.String name, EGraphics graphics)
          Method to create a new layer with the given name and graphics.
static void preserveVisibility()
          Method called when the program exits to preserve any changes to the layer visibility.
 void setDimmed(boolean dimmed)
          Method to set whether this Layer is dimmed.
 void setDistance(double distance)
          Method to set the distance of this layer.
 void setFactory3DInfo(double thickness, double distance, java.lang.String mode, double factor)
          Method to set the 3D distance and thickness of this Layer.
 void setFactoryAreaCoverage(double area)
          Method to set the minimum area to cover with this Layer in a particular cell.
 void setFactoryAreaCoverageInfo(double area)
          Methot to set minimu area coverage that the layer must reach in the technology.
 void setFactoryCIFLayer(java.lang.String cifLayer)
          Method to set the factory-default CIF name of this Layer.
 void setFactoryDXFLayer(java.lang.String dxfLayer)
          Method to set the factory-default DXF name of this Layer.
 void setFactoryParasitics(double resistance, double capacitance, double edgeCapacitance)
          Method to set the Spice parasitics for this Layer.
 void setFactorySkillLayer(java.lang.String skillLayer)
          Method to set the factory-default Skill name of this Layer.
 void setFunction(Layer.Function function)
          Method to set the Function of this Layer.
 void setFunction(Layer.Function function, int functionExtras)
          Method to set the Function of this Layer when the function is complex.
 void setFunction(Layer.Function function, int functionExtras, boolean pseudo)
          Method to set the Function of this Layer when the function is complex.
 void setIndex(int index)
          Method to set the index of this Layer.
 void setPureLayerNode(PrimitiveNode pln)
          Method to set the Pure Layer Node associated with this Layer.
 void setThickness(double thickness)
          Method to set the thickness of this layer.
 void setTransparencyFactor(double factor)
          Method to set the transparency factor of this layer.
 void setTransparencyMode(java.lang.String mode)
          Method to set the transparency mode of this layer.
 void setVisible(boolean newVis)
          Method to set whether this Layer is visible.
 java.lang.String toString()
          Returns a printable version of this Layer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_THICKNESS

public static final double DEFAULT_THICKNESS
See Also:
Constant Field Values

DEFAULT_DISTANCE

public static final double DEFAULT_DISTANCE
See Also:
Constant Field Values

DEFAULT_MODE

public static final java.lang.String DEFAULT_MODE
See Also:
Constant Field Values

DEFAULT_FACTOR

public static final double DEFAULT_FACTOR
See Also:
Constant Field Values

layerSortByName

public static final com.sun.electric.technology.Layer.LayerSortByName layerSortByName
A comparator object for sorting Layers by their name. Created once because it is used often.

Method Detail

newInstance

public static Layer newInstance(Technology tech,
                                java.lang.String name,
                                EGraphics graphics)
Method to create a new layer with the given name and graphics.

Parameters:
tech - the Technology that this layer belongs to.
name - the name of the layer.
graphics - the appearance of the layer.
Returns:
the Layer object.

newInstanceFree

public static Layer newInstanceFree(Technology tech,
                                    java.lang.String name,
                                    EGraphics graphics)
Method to create a new layer with the given name and graphics. Layer is not attached to any technology but still has a technology pointer.

Parameters:
name - the name of the layer.
graphics - the appearance of the layer.
Returns:
the Layer object.

makePseudo

public Layer makePseudo()
Method to create a pseudo-layer for this Layer with a standard name "Pseudo-XXX".

Returns:
the pseudo-layer.

getName

public java.lang.String getName()
Method to return the name of this Layer.

Returns:
the name of this Layer.

getIndex

public int getIndex()
Method to return the index of this Layer. The index is 0-based.

Returns:
the index of this Layer.

setIndex

public void setIndex(int index)
Method to set the index of this Layer. The index is 0-based.

Parameters:
index - the index of this Layer.

getTechnology

public Technology getTechnology()
Method to return the Technology of this Layer.

Returns:
the Technology of this Layer.

getGraphics

public EGraphics getGraphics()
Method to return the graphics description of this Layer.

Returns:
the graphics description of this Layer.

setFunction

public void setFunction(Layer.Function function)
Method to set the Function of this Layer.

Parameters:
function - the Function of this Layer.

setFunction

public void setFunction(Layer.Function function,
                        int functionExtras)
Method to set the Function of this Layer when the function is complex. Some layer functions have extra bits of information to describe them. For example, P-Type Diffusion has the Function DIFF but the extra bits PTYPE.

Parameters:
function - the Function of this Layer.
functionExtras - extra bits to describe the Function of this Layer.

setFunction

public void setFunction(Layer.Function function,
                        int functionExtras,
                        boolean pseudo)
Method to set the Function of this Layer when the function is complex. Some layer functions have extra bits of information to describe them. For example, P-Type Diffusion has the Function DIFF but the extra bits PTYPE.

Parameters:
function - the Function of this Layer.
functionExtras - extra bits to describe the Function of this Layer.
pseudo - true if the Layer is pseudo-layer

getFunction

public Layer.Function getFunction()
Method to return the Function of this Layer.

Returns:
the Function of this Layer.

getFunctionExtras

public int getFunctionExtras()
Method to return the Function "extras" of this Layer. The "extras" are a set of modifier bits, such as "p-type".

Returns:
the Function extras of this Layer.

setPureLayerNode

public void setPureLayerNode(PrimitiveNode pln)
Method to set the Pure Layer Node associated with this Layer.

Parameters:
pln - the Pure Layer PrimitiveNode to use for this Layer.

makePureLayerNode

public PrimitiveNode makePureLayerNode(java.lang.String nodeName,
                                       double size,
                                       Poly.Type style,
                                       java.lang.String portName,
                                       ArcProto... connections)
Method to make the Pure Layer Node associated with this Layer.

Parameters:
nodeName - the name of the PrimitiveNode. Primitive names may not contain unprintable characters, spaces, tabs, a colon (:), semicolon (;) or curly braces ({}).
size - the width and the height of the PrimitiveNode.
style - the Poly.Type this PrimitiveNode will generate (polygon, cross, etc.).
Returns:
the Pure Layer PrimitiveNode to use for this Layer.

makePureLayerNode

public PrimitiveNode makePureLayerNode(java.lang.String nodeName,
                                       double size,
                                       Technology.Distance xmlSize,
                                       Poly.Type style,
                                       java.lang.String portName,
                                       ArcProto... connections)
Method to make the Pure Layer Node associated with this Layer.

Parameters:
nodeName - the name of the PrimitiveNode. Primitive names may not contain unprintable characters, spaces, tabs, a colon (:), semicolon (;) or curly braces ({}).
size - the width and the height of the PrimitiveNode.
xmlSize - expression for default size of this pure layer node depending on tech parameters
style - the Poly.Type this PrimitiveNode will generate (polygon, cross, etc.).
Returns:
the Pure Layer PrimitiveNode to use for this Layer.

getPureLayerNode

public PrimitiveNode getPureLayerNode()
Method to return the Pure Layer Node associated with this Layer.

Returns:
the Pure Layer Node associated with this Layer.

isNonElectrical

public boolean isNonElectrical()
Method to tell whether this layer function is non-electrical. Non-electrical layers do not carry any signal (for example, artwork, text).

Returns:
true if this layer function is non-electrical.

isDiffusionLayer

public boolean isDiffusionLayer()
Method to determine if the layer function corresponds to a diffusion layer. Used in parasitic calculation

Returns:
true if this Layer is diffusion.

isVTImplantLayer

public boolean isVTImplantLayer()
Method to determine if the layer corresponds to a VT layer. Used in DRC

Returns:
true if this layer is a VT layer.

isPseudoLayer

public boolean isPseudoLayer()
Method to return true if this is pseudo-Layer. Pseudo layers are those used in pins, and have no real geometry.

Returns:
true if this is pseudo-layer.

getPseudoLayer

public Layer getPseudoLayer()
Method to return the pseudo layer associated with this real-Layer. Pseudo layers are those used in pins, and have no real geometry.

Returns:
the pseudo layer associated with this read-Layer. If this layer is hass not pseudo, the null is returned.

getNonPseudoLayer

public Layer getNonPseudoLayer()
Method to return the non-pseudo layer associated with this pseudo-Layer. Pseudo layers are those used in pins, and have no real geometry.

Returns:
the non-pseudo layer associated with this pseudo-Layer. If this layer is already not pseudo, this layer is returned.

isVisible

public boolean isVisible()
Method to tell whether this Layer is visible.

Returns:
true if this Layer is visible.

setVisible

public void setVisible(boolean newVis)
Method to set whether this Layer is visible. For efficiency, this method does not update preferences, but only changes the field variable. Changes to visibility are saved to Preferences at exit (with "preserveVisibility()").

Parameters:
newVis - true if this Layer is to be visible.

preserveVisibility

public static void preserveVisibility()
Method called when the program exits to preserve any changes to the layer visibility.


isDimmed

public boolean isDimmed()
Method to tell whether this Layer is dimmed. Dimmed layers are drawn darker so that undimmed layers can be highlighted.

Returns:
true if this Layer is dimmed.

setDimmed

public void setDimmed(boolean dimmed)
Method to set whether this Layer is dimmed. Dimmed layers are drawn darker so that undimmed layers can be highlighted.

Parameters:
dimmed - true if this Layer is to be dimmed.

getStringPref

public Pref getStringPref(java.lang.String what,
                          java.util.HashMap<Layer,Pref> map,
                          java.lang.String factory)
Method to get a string preference for this Layer and a specific purpose.

Parameters:
what - the purpose of the preference.
map - a Map of preferences for the purpose.
factory - the factory default value for this Layer/purpose.
Returns:
the string Pref object for this Layer/purpose.

getBooleanPref

public Pref getBooleanPref(java.lang.String what,
                           java.util.HashMap<Layer,Pref> map,
                           boolean factory)
Method to get a boolean preference for this Layer and a specific purpose.

Parameters:
what - the purpose of the preference.
map - a Map of preferences for the purpose.
factory - the factory default value for this Layer/purpose.
Returns:
the boolean Pref object for this Layer/purpose.

getDoublePref

public Pref getDoublePref(java.lang.String what,
                          java.util.HashMap<Layer,Pref> map,
                          double factory)
Method to get a double-precision preference for this Layer and a specific purpose.

Parameters:
what - the purpose of the preference.
map - a Map of preferences for the purpose.
factory - the factory default value for this Layer/purpose.
Returns:
the double-precision Pref object for this Layer/purpose.

getIntegerPref

public Pref getIntegerPref(java.lang.String what,
                           java.util.HashMap<Layer,Pref> map,
                           int factory)
Method to get an integer preference for this Layer and a specific purpose.

Parameters:
what - the purpose of the preference.
map - a Map of preferences for the purpose.
factory - the factory default value for this Layer/purpose.
Returns:
the integer Pref object for this Layer/purpose.

setFactory3DInfo

public void setFactory3DInfo(double thickness,
                             double distance,
                             java.lang.String mode,
                             double factor)
Method to set the 3D distance and thickness of this Layer.

Parameters:
thickness - the thickness of this layer.
distance - the distance of this layer above the ground plane (silicon). Negative values represent layes in silicon like p++, p well, etc.
mode -
factor -

getTransparencyMode

public java.lang.String getTransparencyMode()
Method to return the transparency mode of this layer as a string. Possible values "NONE, "FASTEST", "NICEST", "BLENDED", "SCREEN_DOOR".

Returns:
the transparency mode of this layer for the 3D view..

setTransparencyMode

public void setTransparencyMode(java.lang.String mode)
Method to set the transparency mode of this layer. Possible values "NONE, "FASTEST", "NICEST", "BLENDED", "SCREEN_DOOR".

Parameters:
mode - the transparency mode of this layer.

getTransparencyFactor

public double getTransparencyFactor()
Method to return the transparency factor of this layer as a string. Possible values from 0 (opaque) -> 1 (transparent)

Returns:
the transparency factor of this layer for the 3D view..

setTransparencyFactor

public void setTransparencyFactor(double factor)
Method to set the transparency factor of this layer. Layers can have a transparency from 0 (opaque) to 1(transparent).

Parameters:
factor - the transparency factor of this layer.

getDistance

public double getDistance()
Method to return the distance of this layer. The higher the distance value, the farther from the wafer.

Returns:
the distance of this layer above the ground plane.

setDistance

public void setDistance(double distance)
Method to set the distance of this layer. The higher the distance value, the farther from the wafer.

Parameters:
distance - the distance of this layer above the ground plane.

getDepth

public double getDepth()
Method to calculate Z value of the upper part of the layer. Note: not called getHeight to avoid confusion with getDistance()) Don't call distance+thickness because those are factory values.

Returns:
Height of the layer

getThickness

public double getThickness()
Method to return the thickness of this layer. Layers can have a thickness of 0, which causes them to be rendered flat.

Returns:
the thickness of this layer.

setThickness

public void setThickness(double thickness)
Method to set the thickness of this layer. Layers can have a thickness of 0, which causes them to be rendered flat.

Parameters:
thickness - the thickness of this layer.

setFactoryCIFLayer

public void setFactoryCIFLayer(java.lang.String cifLayer)
Method to set the factory-default CIF name of this Layer.

Parameters:
cifLayer - the factory-default CIF name of this Layer.

getCIFLayer

public java.lang.String getCIFLayer()
Method to return the CIF name of this layer.

Returns:
the CIF name of this layer.

getCIFLayerSetting

public Setting getCIFLayerSetting()
Returns project Setting to tell the CIF name of this Layer.

Returns:
project Setting to tell the CIF name of this Layer.

setFactoryDXFLayer

public void setFactoryDXFLayer(java.lang.String dxfLayer)
Method to set the factory-default DXF name of this Layer.

Parameters:
dxfLayer - the factory-default DXF name of this Layer.

getDXFLayer

public java.lang.String getDXFLayer()
Method to return the DXF name of this layer.

Returns:
the DXF name of this layer.

getDXFLayerSetting

public Setting getDXFLayerSetting()
Returns project Setting to tell the DXF name of this Layer.

Returns:
project Setting to tell the DXF name of this Layer.

setFactorySkillLayer

public void setFactorySkillLayer(java.lang.String skillLayer)
Method to set the factory-default Skill name of this Layer.

Parameters:
skillLayer - the factory-default Skill name of this Layer.

getSkillLayer

public java.lang.String getSkillLayer()
Method to return the Skill name of this layer.

Returns:
the Skill name of this layer.

getSkillLayerSetting

public Setting getSkillLayerSetting()
Returns project Setting to tell the Skill name of this Layer.

Returns:
project Setting to tell the Skill name of this Layer.

setFactoryParasitics

public void setFactoryParasitics(double resistance,
                                 double capacitance,
                                 double edgeCapacitance)
Method to set the Spice parasitics for this Layer. This is typically called only during initialization. It does not set the "option" storage, as "setResistance()", "setCapacitance()", and ""setEdgeCapacitance()" do.

Parameters:
resistance - the resistance of this Layer.
capacitance - the capacitance of this Layer.
edgeCapacitance - the edge capacitance of this Layer.

getResistance

public double getResistance()
Method to return the resistance for this layer.

Returns:
the resistance for this layer.

getResistanceSetting

public Setting getResistanceSetting()
Returns project Setting to tell the resistance for this Layer.

Returns:
project Setting to tell the resistance for this Layer.

getCapacitance

public double getCapacitance()
Method to return the capacitance for this layer.

Returns:
the capacitance for this layer.

getCapacitanceSetting

public Setting getCapacitanceSetting()
Returns project Setting to tell the capacitance for this Layer. Returns project Setting to tell the capacitance for this Layer.


getEdgeCapacitance

public double getEdgeCapacitance()
Method to return the edge capacitance for this layer.

Returns:
the edge capacitance for this layer.

getEdgeCapacitanceSetting

public Setting getEdgeCapacitanceSetting()
Returns project Setting to tell the edge capacitance for this Layer. Returns project Setting to tell the edge capacitance for this Layer.


setFactoryAreaCoverage

public void setFactoryAreaCoverage(double area)
Method to set the minimum area to cover with this Layer in a particular cell.

Parameters:
area - the minimum area coverage of this layer.

getAreaCoverage

public double getAreaCoverage()
Method to return the minimu area coverage that the layer must reach in the technology.

Returns:
the minimum area coverage (in percentage).

setFactoryAreaCoverageInfo

public void setFactoryAreaCoverageInfo(double area)
Methot to set minimu area coverage that the layer must reach in the technology.

Parameters:
area - the minimum area coverage (in percentage).

toString

public java.lang.String toString()
Returns a printable version of this Layer.

Overrides:
toString in class java.lang.Object
Returns:
a printable version of this Layer.