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 |
CURVEPIN
set if a nonzero sized curved pin
|
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 fullSizeCorrector,
double defWidth,
double defHeight,
ERectangle baseRectangle,
Technology.NodeLayer[] layers)
The constructor is never called externally.
|
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) |
Modifier and Type | Method and Description |
---|---|
void |
addPrimitivePorts(PrimitivePort... ports)
Method to add an array of PrimitivePorts to this PrimitiveNode.
|
boolean |
canShrink()
Method to tell if instances of this PrimitiveNode can shrink.
|
protected void |
check() |
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 |
clearPartialCircle()
Method to set this PrimitiveNode so that it cannot hold part of a circle.
|
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.
|
protected void |
dump(java.io.PrintWriter out) |
protected void |
dumpNodeLayers(java.io.PrintWriter out,
Technology.NodeLayer[] layers,
boolean isSerp) |
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.
|
void |
genBounds(ImmutableNodeInst n,
long[] gridCoords) |
void |
genElibBounds(CellBackup cellBackup,
ImmutableNodeInst n,
long[] gridCoords) |
void |
genShape(AbstractShapeBuilder b,
ImmutableNodeInst n)
Puts into shape builder s the polygons that describe node "n", given a set of
NodeLayer objects to use.
|
EDimension |
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.
|
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 height 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 |
getDefHeight()
Deprecated.
Use method with explicit EditingPreferences parameter.
|
double |
getDefHeight(EditingPreferences ep)
Method to return the default full height of this PrimitiveNode.
|
EPoint |
getDefSize(EditingPreferences ep)
Method to return the default size of this PrimitiveNode
in specified EditingPreferences.
|
double |
getDefWidth()
Deprecated.
Use method with explicit EditingPreferences parameter.
|
double |
getDefWidth(EditingPreferences ep)
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.
|
EDimension |
getFactoryDefaultBaseDimension()
Method to return the factory default base dimension of this PrimitiveNode.
|
ImmutableNodeInst |
getFactoryDefaultInst()
Method to return the factory default immutable instance of this PrimitiveNode
|
EPoint |
getFactoryDefaultSize()
Method to return the factory default extend of this PrimitiveNode over minimal width and height.
|
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.
|
PrimitiveNode.Function |
getPrimitiveFunction(int techBits)
Method to return the pure "NodeProto Function" a PrimitiveNode in this Technology.
|
int |
getPrimitiveFunctionBits(PrimitiveNode.Function function)
Method to return the technology-specific function bits for a given PrimitiveNode.Function.
|
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 |
getPrimNodeInddexInTech()
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.
|
boolean |
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 |
isCurvedPin()
Method to tell if this is a nonzero sized curved pin.
|
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 locked.
|
boolean |
isMulticut()
Tells whether this PrimitiveNode is multi-cut, 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 |
isPartialCircle()
Method to tell if instances of this PrimitiveNode can hold part of a circle.
|
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 instances 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.
|
java.lang.String |
libDescribe()
Method to describe this PrimitiveNode as a string.
|
protected Xml.PrimitiveNodeGroup |
makeXml(java.util.Map<java.lang.Object,java.util.Map<java.lang.String,java.lang.Object>> additionalAttributes) |
static PrimitiveNode |
newInstance(java.lang.String protoName,
Technology tech,
double width,
double height,
ERectangle baseRectangle,
Technology.NodeLayer[] layers)
Method to create a new PrimitiveNode from the parameters.
|
static PrimitiveNode |
newInstance(java.lang.String protoName,
Technology tech,
double width,
double height,
Technology.NodeLayer[] layers)
Method to create a new PrimitiveNode from the parameters.
|
java.lang.String |
noLibDescribe()
Method to describe this PrimitiveNode as a string.
|
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 |
setCurvedPin()
Method to set this PrimitiveNode so that it is a nonzero sized curved pin.
|
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 |
setPartialCircle()
Method to set this PrimitiveNode so that it can hold part of a circle.
|
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 |
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 CURVEPIN
public static final int CROSSCONTACT
public static final int ALIGNCONTACT
protected PrimitiveNode(java.lang.String protoName, Technology tech, EPoint fullSizeCorrector, double defWidth, double defHeight, ERectangle baseRectangle, Technology.NodeLayer[] layers)
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, 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 static PrimitiveNode newInstance(java.lang.String protoName, Technology tech, double width, double height, ERectangle baseRectangle, 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.baseRectangle
- base rectangle of the reported/selected part 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 PrimitiveNode.Function getPrimitiveFunction(int techBits)
techBits
- tech bitspublic int getPrimitiveFunctionBits(PrimitiveNode.Function function)
function
- the universal function descriptionpublic 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()
public double getDefWidth(EditingPreferences ep)
getDefWidth
in interface NodeProto
ep
- EditingPreferences with default sizes and text descriptors.public double getDefHeight()
public double getDefHeight(EditingPreferences ep)
getDefHeight
in interface NodeProto
ep
- EditingPreferences with default sizes and text descriptors.public EPoint getDefSize(EditingPreferences ep)
getDefSize
in interface NodeProto
ep
- specified EditingPreferences with default sizespublic double getDefaultLambdaBaseWidth(EditingPreferences ep)
ep
- specified EditingPreferencespublic double getDefaultLambdaBaseHeight(EditingPreferences ep)
ep
- specified EditingPreferencespublic long getDefaultGridBaseWidth(EditingPreferences ep)
ep
- specified EditingPreferencespublic long getDefaultGridBaseHeight(EditingPreferences ep)
ep
- specified EditingPreferencespublic EDimension getFactoryDefaultBaseDimension()
public EPoint getFactoryDefaultSize()
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 EDimension getAutoGrowth()
public void genShape(AbstractShapeBuilder b, ImmutableNodeInst n)
b
- shape builder where to put polygonsn
- the ImmutableNodeInst that is being described.public void genBounds(ImmutableNodeInst n, long[] gridCoords)
public void genElibBounds(CellBackup cellBackup, ImmutableNodeInst n, long[] gridCoords)
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 addPrimitivePorts(PrimitivePort... ports)
ports
- the array of PrimitivePorts to add.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 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 java.lang.String libDescribe()
libDescribe
in interface NodeProto
public java.lang.String noLibDescribe()
noLibDescribe
in interface NodeProto
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 setPartialCircle()
public void clearPartialCircle()
public boolean isPartialCircle()
public void setArcsShrink()
public void clearArcsShrink()
public boolean isArcsShrink()
public void setNotUsed(boolean set)
set
- public boolean isNotUsed()
public void setCurvedPin()
public boolean isCurvedPin()
public boolean isPureWellNode()
public boolean isPureSubstrateNode()
public final int getPrimNodeInddexInTech()
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
protected void dump(java.io.PrintWriter out)
protected void dumpNodeLayers(java.io.PrintWriter out, Technology.NodeLayer[] layers, boolean isSerp)
protected Xml.PrimitiveNodeGroup makeXml(java.util.Map<java.lang.Object,java.util.Map<java.lang.String,java.lang.Object>> additionalAttributes)
public boolean getZValues(double[] array)
array
- array[0] is minZ and array[1] is maxprotected void check()