com.sun.electric.technology
Class Layer

java.lang.Object
  extended by com.sun.electric.technology.Layer
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable

public class Layer
extends java.lang.Object
implements java.io.Serializable, java.lang.Comparable

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.

See Also:
Serialized Form

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_THICKNESS
           
static com.sun.electric.technology.Layer.LayerSortByLevel layerSortByLevel
          A comparator object for sorting Layers by their level.
static com.sun.electric.technology.Layer.LayerSortByName layerSortByName
          A comparator object for sorting Layers by their name.
 
Method Summary
 int compareTo(java.lang.Object other)
           
 void copyState(Layer that)
           
 double getCapacitance()
          Method to return the capacitance for this layer.
 Setting getCapacitanceSetting()
          Returns project preferences to tell the capacitance for this Layer.
 java.lang.String getCIFLayer()
          Method to return the CIF name of this layer.
 Setting getCIFLayerSetting()
          Returns project preferences 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, by default.
 Setting getDistanceSetting()
          Returns project preferences to tell the distance of this layer.
 java.lang.String getDXFLayer()
          Method to return the DXF name of this layer.
 Setting getDXFLayerSetting()
          Returns project preferences to tell the DXF name of this Layer.
 double getEdgeCapacitance()
          Method to return the edge capacitance for this layer.
 Setting getEdgeCapacitanceSetting()
          Returns project preferences to tell the edge capacitance for this Layer.
 EGraphics getFactoryGraphics()
          Method to return the graphics description of this Layer by factory default.
 java.lang.String getFullName()
          Method to return the full name of 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.
 LayerId getId()
          Method to return the Id of this Layer.
 int getIndex()
          Method to return the index of this Layer.
 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 preferences to tell the resistance for this Layer.
 java.lang.String getSkillLayer()
          Method to return the Skill name of this layer.
 Setting getSkillLayerSetting()
          Returns project preferences to tell the Skill name of this Layer.
 Technology getTechnology()
          Method to return the Technology of this Layer.
 double getThickness()
          Method to return the thickness of this layer, by default.
 Setting getThicknessSetting()
          Returns project preferences to tell the thickness of this layer.
 boolean isCarbonNanotubeLayer()
          Method to determine if the layer corresponds to a poly cut layer.
 boolean isDiffusionLayer()
          Method to determine if the layer function corresponds to a diffusion layer.
 boolean isNonElectrical()
          Method to tell whether this layer function is non-electrical.
 boolean isPolyCutLayer()
          Method to determine if the layer corresponds to a poly cut layer.
 boolean isPseudoLayer()
          Method to return true if this is pseudo-Layer.
 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.
static Layer newInstance(Technology tech, java.lang.String name, EGraphics graphics)
          Method to create a new layer with the given name and graphics.
 void setFactory3DInfo(double thickness, double distance)
          Method to set the 3D distance and thickness of this Layer.
 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 setGraphics(EGraphics graphics)
          Method to set the graphics description of this Layer.
 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.
 java.lang.String toString()
          Returns a printable version of this Layer.
protected  java.lang.Object writeReplace()
           
 
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

layerSortByLevel

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


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

compareTo

public int compareTo(java.lang.Object other)
Specified by:
compareTo in interface java.lang.Comparable

writeReplace

protected java.lang.Object writeReplace()

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.

makePseudo

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

Returns:
the pseudo-layer.

getId

public LayerId getId()
Method to return the Id of this Layer.

Returns:
the Id of this Layer.

getName

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

Returns:
the name of this Layer.

getFullName

public java.lang.String getFullName()
Method to return the full name of this Layer. Full name has format "techName:layerName"

Returns:
the full 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.

setGraphics

public void setGraphics(EGraphics graphics)
Method to set the graphics description of this Layer.

Parameters:
graphics - graphics description of this Layer.

getGraphics

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

Returns:
the graphics description of this Layer.

getFactoryGraphics

public EGraphics getFactoryGraphics()
Method to return the graphics description of this Layer by factory default.

Returns:
the factory 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.

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.

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.

isPolyCutLayer

public boolean isPolyCutLayer()
Method to determine if the layer corresponds to a poly cut layer. Used in 3D View

Returns:
true if this layer is a poly cut layer.

isCarbonNanotubeLayer

public boolean isCarbonNanotubeLayer()
Method to determine if the layer corresponds to a poly cut layer. Used in 3D View

Returns:
true if this layer is a poly cut 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.

setFactory3DInfo

public void setFactory3DInfo(double thickness,
                             double distance)
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.

getDistance

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

Returns:
the distance of this layer above the ground plane, by default.

getDistanceSetting

public Setting getDistanceSetting()
Returns project preferences to tell the distance of this layer.

Returns:
project preferences to tell the distance of this layer.

getThickness

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

Returns:
the distance of this layer above the ground plane, by default.

getThicknessSetting

public Setting getThicknessSetting()
Returns project preferences to tell the thickness of this layer.

Returns:
project preferences to tell the thickness of this layer.

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:
Depth of the 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 preferences to tell the CIF name of this Layer.

Returns:
project preferences 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 preferences to tell the DXF name of this Layer.

Returns:
project preferences 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 preferences to tell the Skill name of this Layer.

Returns:
project preferences 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 preferences to tell the resistance for this Layer.

Returns:
project preferences 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 preferences to tell the capacitance for this Layer. Returns project preferences 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 preferences to tell the edge capacitance for this Layer. Returns project preferences to tell the edge capacitance for this Layer.


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.

copyState

public void copyState(Layer that)