public class PrimitiveNode extends java.lang.Object implements NodeProto, java.lang.Comparable<PrimitiveNode>, java.io.Serializable
Modifier and Type | Class and Description |
---|---|
class |
PrimitiveNode.AsymmetricNodeSizeRule
Class to detect those asymmetric metal contacts in new technologies where
witdh and height are different but they don't care about orientation
|
static class |
PrimitiveNode.Function
Function is a typesafe enum class that describes the function of a NodeProto.
|
class |
PrimitiveNode.NodeSizeRule
Class to define a single rule on a node.
|
Modifier and Type | Field and Description |
---|---|
static int |
ALIGNCONTACT
set if node is an aligned contact
|
static int |
CROSSCONTACT
set if node is a cross contact
|
static int |
HIGHVTBIT
set if node is a high vt transistor
|
static int |
LOWVTBIT
set if node is a low vt transistor
|
static int |
NATIVEBIT
set if node is a native transistor
|
static int |
NORMAL
Defines a normal node.
|
static int |
OD18BIT
set if node is a od18 transistor
|
static int |
OD25BIT
set if node is a od25 transistor
|
static int |
OD33BIT
set if node is a od33 transistor
|
static int |
POLYGONAL
Defines a polygonal transistor.
|
static int |
SERPTRANS
Defines a serpentine transistor.
|
Modifier | Constructor and Description |
---|---|
protected |
PrimitiveNode(java.lang.String protoName,
Technology tech,
EPoint sizeCorrector1,
EPoint sizeCorrector2,
java.lang.String minSizeRule,
double defWidth,
double defHeight,
ERectangle fullRectangle,
ERectangle baseRectangle,
Technology.NodeLayer[] layers)
The constructor is never called externally.
|
Modifier and Type | Method and Description |
---|---|
void |
addPrimitivePorts(PrimitivePort[] ports,
boolean fixFullRectangle)
Method to add an array of PrimitivePorts to this PrimitiveNode.
|
void |
addPrimitivePortsFixed(PrimitivePort[] ports)
Method to add an array of PrimitivePorts to this PrimitiveNode.
|
boolean |
canShrink()
Method to tell if instances of this PrimitiveNode can shrink.
|
void |
clearArcsShrink()
Method to set this PrimitiveNode so that arcs connected to instances will not shrink in nonmanhattan situations.
|
void |
clearArcsWipe()
Method to set this PrimitiveNode so that instances of it are not "arc-wipable".
|
void |
clearCanBeZeroSize()
Method to set this PrimitiveNode so that it cannot be zero in size.
|
void |
clearCanShrink()
Method to prevent instances of this PrimitiveNode from shrinking.
|
void |
clearEdgeSelect()
Method to set this PrimitiveNode so that instances of it are not selectable only by their edges.
|
void |
clearHoldsOutline()
Method to set this PrimitiveNode so that instances of it may not hold outline information.
|
void |
clearLockedPrim()
Method to set this PrimitiveNode so that instances of it are not locked.
|
void |
clearSquare()
Method to set this PrimitiveNode so that instances of it are not "square".
|
void |
clearWipeOn1or2()
Method to set this PrimitiveNode so that instances of it are not wiped when 1 or 2 arcs connect.
|
int |
compareTo(PrimitiveNode that)
Compares PrimtiveNodes by their Technologies and definition order.
|
PrimitivePort |
connectsTo(ArcProto arc)
Method to return the PrimitivePort on this PrimitiveNode that can connect to an arc of the specified type.
|
java.lang.String |
describe(boolean withQuotes)
Method to describe this PrimitiveNode as a string.
|
Technology.NodeLayer |
findMulticut()
Find a NodeLayer of this PrimitiveNode has NodeLayer with MULTICUTBOX representation.
|
Technology.NodeLayer |
findNodeLayer(Layer layer,
boolean electrical)
Method to find the NodeLayer on this PrimitiveNode with a given Layer.
|
PortProto |
findPortProto(Name name)
Method to find the PortProto that has a particular Name.
|
PortProto |
findPortProto(java.lang.String name)
Method to find the PortProto that has a particular name.
|
Dimension2D |
getAutoGrowth()
Method to get the auto-growth factor for this PrimitiveNode.
|
ERectangle |
getBaseRectangle()
Method to get the base (highlight) ERectangle of this PrimitiveNode.
|
long |
getDefaultGridBaseHeight(EditingPreferences ep)
Method to return the default base height of this PrimitiveNode in grid units
in specified EditingPreferences.
|
long |
getDefaultGridBaseWidth(EditingPreferences ep)
Method to return the default base width of this PrimitiveNode in grid units
in specified EditingPreferences.
|
long |
getDefaultGridExtendX(EditingPreferences ep)
Method to return the defaut extend of this PrimitiveNode over minimal width\
in grid units in specified EditingPreferences.
|
long |
getDefaultGridExtendY(EditingPreferences ep)
Method to return the defaut extend of this PrimitiveNode over minimal height\
in grid units in specified EditingPreferences.
|
ImmutableNodeInst |
getDefaultInst(EditingPreferences ep)
Method to return the default immutable instance of this PrimitiveNode
in specified EditingPreferences.
|
double |
getDefaultLambdaBaseHeight(EditingPreferences ep)
Method to return the default base hwight of this PrimitiveNode in lambda units
in specified EditingPreferences.
|
double |
getDefaultLambdaBaseWidth(EditingPreferences ep)
Method to return the default base width of this PrimitiveNode in lambda units
in specified EditingPreferences.
|
double |
getDefaultLambdaExtendX(EditingPreferences ep)
Method to return the defaut extend of this PrimitiveNode over minimal width\
in lambda units in specified EditingPreferences.
|
double |
getDefaultLambdaExtendY(EditingPreferences ep)
Method to return the defaut extend of this PrimitiveNode over minimal height\
in lambda units in specified EditingPreferences.
|
double |
getDefHeight()
Method to return the default full height of this PrimitiveNode.
|
double |
getDefWidth()
Method to return the default full width of this PrimitiveNode.
|
Technology.NodeLayer[] |
getElectricalLayers()
Method to return the list of electrical Layers that comprise this PrimitiveNode.
|
long |
getFactoryDefaultGridBaseHeight()
Method to return the factory default base height of this PrimitiveNode in grid units.
|
long |
getFactoryDefaultGridBaseWidth()
Method to return the factory default base width of this PrimitiveNode in grid units.
|
long |
getFactoryDefaultGridExtendX()
Method to return the factory defaut extend of this PrimitiveNode over minimal width\
in grid units.
|
long |
getFactoryDefaultGridExtendY()
Method to return the factory defaut extend of this PrimitiveNode over minimal height\
in grid units.
|
ImmutableNodeInst |
getFactoryDefaultInst()
Method to return the factory default immutable instance of this PrimitiveNode
|
double |
getFactoryDefaultLambdaBaseHeight()
Method to return the factory default base hwight of this PrimitiveNode in lambda units.
|
double |
getFactoryDefaultLambdaBaseWidth()
Method to return the factory default base width of this PrimitiveNode in lambda units.
|
java.lang.String |
getFullName()
Method to return the full name of this PrimitiveNode.
|
ERectangle |
getFullRectangle()
Method to get the full (true) ERectangle of this PrimitiveNode.
|
PrimitiveNode.Function |
getFunction()
Method to return the function of this PrimitiveNode.
|
PrimitiveNode.Function |
getGroupFunction()
Method to return the function of this PrimitiveNode, grouped according to its
general function.
|
PrimitiveNodeId |
getId()
Method to return NodeProtoId of this NodeProto.
|
java.util.Iterator<Layer> |
getLayerIterator()
Method to return an iterator over the layers in this PrimitiveNode.
|
PrimitiveNode.NodeSizeRule |
getMinSizeRule()
Method to return the minimum size rule for this PrimitiveNode.
|
EPoint |
getMulticut2Size() |
java.lang.String |
getName()
Method to return the name of this PrimitiveNode in the Technology.
|
Technology.NodeLayer[] |
getNodeLayers()
Method to return the list of NodeLayers that comprise this PrimitiveNode.
|
int |
getNumPorts()
Method to return the number of PortProtos on this NodeProto.
|
PrimitivePort |
getPort(int portIndex)
Method to return the PortProto at specified position.
|
PrimitivePort |
getPort(PortProtoId portProtoId)
Method to return the PortProto by thread-independent PortProtoId.
|
java.util.Iterator<PortProto> |
getPorts()
Method to return an iterator over all PortProtos of this NodeProto.
|
PrimitiveNodeGroup |
getPrimitiveNodeGroup()
Method to return the PrimitiveNodeGroup that contains this PrimitiveNode.
|
java.util.Iterator<PrimitivePort> |
getPrimitivePorts()
Method to return an iterator over all PrimitivePorts of this PrimitiveNode.
|
int |
getPrimNodeIndexInTech()
Method to retrieve index of the node in the given technology
|
SizeOffset |
getProtoSizeOffset()
Method to get the size offset of this PrimitiveNode.
|
int |
getSpecialType()
Method to return the special type of this PrimitiveNode.
|
static java.lang.String |
getSpecialTypeName(int t)
Method to return the name of a special PrimitiveNode type.
|
double[] |
getSpecialValues()
Method to return the special values stored on this PrimitiveNode.
|
java.lang.String |
getSpiceTemplate()
Method to get the Spice template on this PrimitiveNode.
|
Technology |
getTechnology()
Method to return the Technology of this PrimitiveNode.
|
void |
getZValues(double[] array)
Method to get MinZ and MaxZ of the cell calculated based on nodes
|
boolean |
hasMultiCuts()
Tells whether this PrimitiveNode has NodeLayer with MULTICUTBOX representation.
|
boolean |
isArcsShrink()
Method to tell if instances of this PrimitiveNode cause arcs to shrink in nonmanhattan situations.
|
boolean |
isArcsWipe()
Method to tell if instances of this PrimitiveNode are "arc-wipable" by when created.
|
boolean |
isCanBeZeroSize()
Method to tell if instances of this PrimitiveNode can be zero in size.
|
boolean |
isEdgeSelect()
Method to tell if instances of this PrimitiveNode are selectable on their edges.
|
boolean |
isHoldsOutline()
Method to tell if instances of this PrimitiveNode can hold an outline.
|
boolean |
isLockedPrim()
Method to tell if instances of this PrimitiveNode are loced.
|
boolean |
isMulticut()
Tells whether this PrimitiveNode is multicut, i.e.
|
boolean |
isNodeBitOn(int bit)
Method to determine if node has a given bit on.
|
boolean |
isNotUsed()
Method to tell if this PrimitiveNode is used.
|
boolean |
isPin()
Method to tell whether this PrimitiveNode is a Pin.
|
boolean |
isPureSubstrateNode()
Method to determine if PrimitiveNode represents substrate node
|
boolean |
isPureWellNode()
Method to determine if PrimitiveNode represents a well node
|
boolean |
isSkipSizeInPalette()
Method to tell if instaces of this PrimitiveNode are special (don't appear in menu).
|
boolean |
isSquare()
Method to tell if instances of this PrimitiveNode are square.
|
boolean |
isTechSpecific()
Method to tell whether this primitive node prototype has technology-specific information on it.
|
boolean |
isWipeOn1or2()
Method to tell if instances of this PrimitiveNode are wiped when 1 or 2 arcs connect.
|
static PrimitiveNode |
newInstance(java.lang.String protoName,
Technology tech,
double width,
double height,
SizeOffset offset,
Technology.NodeLayer[] layers)
Method to create a new PrimitiveNode from the parameters.
|
static PrimitiveNode |
newInstance0(java.lang.String protoName,
Technology tech,
double width,
double height,
Technology.NodeLayer[] layers)
Method to create a new PrimitiveNode from the parameters.
|
void |
setArcsShrink()
Method to set this PrimitiveNode so that arcs connected to instances will shrink in nonmanhattan situations.
|
void |
setArcsWipe()
Method to set this PrimitiveNode so that instances of it are "arc-wipable".
|
void |
setAutoGrowth(double dX,
double dY)
Method to set the auto-growth factor on this PrimitiveNode.
|
void |
setCanBeZeroSize()
Method to set this PrimitiveNode so that it can be zero in size.
|
void |
setCanShrink()
Method to allow instances of this PrimitiveNode to shrink.
|
void |
setEdgeSelect()
Method to set this PrimitiveNode so that instances of it are selectable only by their edges.
|
void |
setElectricalLayers(Technology.NodeLayer[] electricalLayers)
Method to set the list of electrical Layers that comprise this PrimitiveNode.
|
void |
setFunction(PrimitiveNode.Function function)
Method to set the function of this PrimitiveNode.
|
void |
setHoldsOutline()
Method to set this PrimitiveNode so that instances of it may hold outline information.
|
void |
setLockedPrim()
Method to set this PrimitiveNode so that instances of it are locked.
|
void |
setMinSize(double minWidth,
double minHeight,
java.lang.String minSizeRule)
Method to set the minimum height of this PrimitiveNode.
|
void |
setNodeBit(int bit)
Method to set certain bit during construction
|
void |
setNotUsed(boolean set)
Method to set this PrimitiveNode so that it is not used.
|
void |
setPrimNodeIndexInTech(int index)
Method to set the index of this node in its Technology.
|
void |
setSizeOffset(SizeOffset offset)
Method to set the size offset of this PrimitiveNode.
|
void |
setSkipSizeInPalette()
Method to allow instances of this PrimitiveNode not to be considered in
tech palette for the calculation of the largest icon.
|
void |
setSpecialType(int specialType)
Method to set the special type of this PrimitiveNode.
|
void |
setSpecialValues(double[] specialValues)
Method to set the special values stored on this PrimitiveNode.
|
void |
setSpiceTemplate(java.lang.String st)
Method to set the Spice template on this PrimitiveNode.
|
void |
setSquare()
Method to set this PrimitiveNode so that instances of it are "square".
|
void |
setWipeOn1or2()
Method to set this PrimitiveNode so that instances of it are wiped when 1 or 2 arcs connect.
|
java.lang.String |
toString()
Returns a printable version of this PrimitiveNode.
|
protected java.lang.Object |
writeReplace() |
public static final int NORMAL
public static final int SERPTRANS
public static final int POLYGONAL
public static final int LOWVTBIT
public static final int HIGHVTBIT
public static final int NATIVEBIT
public static final int OD18BIT
public static final int OD25BIT
public static final int OD33BIT
public static final int CROSSCONTACT
public static final int ALIGNCONTACT
protected PrimitiveNode(java.lang.String protoName, Technology tech, EPoint sizeCorrector1, EPoint sizeCorrector2, java.lang.String minSizeRule, double defWidth, double defHeight, ERectangle fullRectangle, ERectangle baseRectangle, Technology.NodeLayer[] layers)
protected java.lang.Object writeReplace()
public static PrimitiveNode newInstance(java.lang.String protoName, Technology tech, double width, double height, SizeOffset offset, Technology.NodeLayer[] layers)
protoName
- the name of the PrimitiveNode.
Primitive names may not contain unprintable characters, spaces, tabs, a colon (:), semicolon (;) or curly braces ({}).tech
- the Technology of the PrimitiveNode.width
- the width of the PrimitiveNode.height
- the height of the PrimitiveNode.offset
- the offset from the edges of the reported/selected part of the PrimitiveNode.layers
- the Layers that comprise the PrimitiveNode.public static PrimitiveNode newInstance0(java.lang.String protoName, Technology tech, double width, double height, Technology.NodeLayer[] layers)
protoName
- the name of the PrimitiveNode.
Primitive names may not contain unprintable characters, spaces, tabs, a colon (:), semicolon (;) or curly braces ({}).tech
- the Technology of the PrimitiveNode.width
- the width of the PrimitiveNode.height
- the height of the PrimitiveNode.layers
- the Layers that comprise the PrimitiveNode.public PrimitiveNodeId getId()
public java.lang.String getName()
public java.lang.String getFullName()
public void setFunction(PrimitiveNode.Function function)
function
- the new function of this PrimitiveNode.public PrimitiveNode.Function getFunction()
getFunction
in interface NodeProto
public PrimitiveNode.Function getGroupFunction()
public boolean isTechSpecific()
public Technology.NodeLayer[] getNodeLayers()
public java.util.Iterator<Layer> getLayerIterator()
public Technology.NodeLayer[] getElectricalLayers()
public void setElectricalLayers(Technology.NodeLayer[] electricalLayers)
electricalLayers
- the list of electrical Layers that comprise this PrimitiveNode.public Technology.NodeLayer findNodeLayer(Layer layer, boolean electrical)
layer
- the Layer to find.public boolean hasMultiCuts()
public Technology.NodeLayer findMulticut()
public boolean isMulticut()
public double getDefWidth()
getDefWidth
in interface NodeProto
public double getDefHeight()
getDefHeight
in interface NodeProto
public double getDefaultLambdaBaseWidth(EditingPreferences ep)
ep
- specified EditingPreferencespublic double getFactoryDefaultLambdaBaseWidth()
public double getDefaultLambdaBaseHeight(EditingPreferences ep)
ep
- specified EditingPreferencespublic double getFactoryDefaultLambdaBaseHeight()
public long getDefaultGridBaseWidth(EditingPreferences ep)
ep
- specified EditingPreferencespublic long getFactoryDefaultGridBaseWidth()
public long getDefaultGridBaseHeight(EditingPreferences ep)
ep
- specified EditingPreferencespublic long getFactoryDefaultGridBaseHeight()
public double getDefaultLambdaExtendX(EditingPreferences ep)
ep
- specified EditingPreferencespublic double getDefaultLambdaExtendY(EditingPreferences ep)
ep
- specified EditingPreferencespublic long getDefaultGridExtendX(EditingPreferences ep)
ep
- specified EditingPreferencespublic long getDefaultGridExtendY(EditingPreferences ep)
ep
- specified EditingPreferencespublic long getFactoryDefaultGridExtendX()
public long getFactoryDefaultGridExtendY()
public ImmutableNodeInst getDefaultInst(EditingPreferences ep)
ep
- specified EditingPreferencespublic ImmutableNodeInst getFactoryDefaultInst()
public SizeOffset getProtoSizeOffset()
getProtoSizeOffset
in interface NodeProto
public ERectangle getBaseRectangle()
public ERectangle getFullRectangle()
public PrimitiveNode.NodeSizeRule getMinSizeRule()
public void setMinSize(double minWidth, double minHeight, java.lang.String minSizeRule)
minHeight
- the minimum height of this PrimitiveNode.public void setSizeOffset(SizeOffset offset)
offset
- the size offset of this PrimitiveNode.public void setAutoGrowth(double dX, double dY)
dX
- the X amount to grow this PrimitiveNode when arcs don't fit.dY
- the Y amount to grow this PrimitiveNode when arcs don't fit.public Dimension2D getAutoGrowth()
public void setSpiceTemplate(java.lang.String st)
st
- the Spice template on this PrimitiveNode.public java.lang.String getSpiceTemplate()
public Technology getTechnology()
getTechnology
in interface NodeProto
public PrimitiveNodeGroup getPrimitiveNodeGroup()
public void addPrimitivePortsFixed(PrimitivePort[] ports)
ports
- the array of PrimitivePorts to add.public void addPrimitivePorts(PrimitivePort[] ports, boolean fixFullRectangle)
ports
- the array of PrimitivePorts to add.fixFullRectangle
- remove fullRectangle shift from port sizes.public PortProto findPortProto(java.lang.String name)
findPortProto
in interface NodeProto
public PortProto findPortProto(Name name)
findPortProto
in interface NodeProto
public java.util.Iterator<PortProto> getPorts()
public java.util.Iterator<PrimitivePort> getPrimitivePorts()
public int getNumPorts()
getNumPorts
in interface NodeProto
public final PrimitivePort getPort(int portIndex)
public PrimitivePort getPort(PortProtoId portProtoId)
public PrimitivePort connectsTo(ArcProto arc)
arc
- the type of arc to connect to an instance of this PrimitiveNode.public int getSpecialType()
public void setSpecialType(int specialType)
specialType
- the newspecial type of this PrimitiveNode.
It can be NORMAL, SERPTRANS, POLYGONAL, or MULTICUT.public static java.lang.String getSpecialTypeName(int t)
t
- the integer special type.public double[] getSpecialValues()
public EPoint getMulticut2Size()
public void setSpecialValues(double[] specialValues)
specialValues
- the special values for this PrimitiveNode.public boolean isPin()
public java.lang.String describe(boolean withQuotes)
public boolean isNodeBitOn(int bit)
bit
- bit containing information to query. It could be LOWVTTRANS,
HIGHVTTRANS, NATIVETRANS, OD18TRANS, OD25TRANS or OD33TRANS in case of transistors.public void setNodeBit(int bit)
bit
- public void setSkipSizeInPalette()
public boolean isSkipSizeInPalette()
public void setCanShrink()
public void clearCanShrink()
public boolean canShrink()
public void setArcsWipe()
public void clearArcsWipe()
public boolean isArcsWipe()
public void setSquare()
public void clearSquare()
public boolean isSquare()
public void setHoldsOutline()
public void clearHoldsOutline()
public boolean isHoldsOutline()
public void setCanBeZeroSize()
public void clearCanBeZeroSize()
public boolean isCanBeZeroSize()
public void setWipeOn1or2()
public void clearWipeOn1or2()
public boolean isWipeOn1or2()
public void setLockedPrim()
public void clearLockedPrim()
public boolean isLockedPrim()
public void setEdgeSelect()
public void clearEdgeSelect()
public boolean isEdgeSelect()
public void setArcsShrink()
public void clearArcsShrink()
public boolean isArcsShrink()
public void setNotUsed(boolean set)
set
- public boolean isNotUsed()
public boolean isPureWellNode()
public boolean isPureSubstrateNode()
public final int getPrimNodeIndexInTech()
public void setPrimNodeIndexInTech(int index)
index
- the index to use for this node in its Technology.public int compareTo(PrimitiveNode that)
compareTo
in interface java.lang.Comparable<PrimitiveNode>
that
- the other PrimitiveNode.public java.lang.String toString()
toString
in class java.lang.Object
public void getZValues(double[] array)
array
- array[0] is minZ and array[1] is max