com.sun.electric.technology
Class PrimitiveNode
java.lang.Object
com.sun.electric.technology.PrimitiveNode
- All Implemented Interfaces:
- NodeProto, java.io.Serializable, java.lang.Comparable<PrimitiveNode>
public class PrimitiveNode
- extends java.lang.Object
- implements NodeProto, java.lang.Comparable<PrimitiveNode>, java.io.Serializable
A PrimitiveNode represents information about a NodeProto that lives in a
Technology. It has a name, and several functions that describe how
to draw it
- See Also:
- Serialized Form
Field Summary |
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. |
Method Summary |
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()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
NORMAL
public static final int NORMAL
- Defines a normal node.
- See Also:
- Constant Field Values
SERPTRANS
public static final int SERPTRANS
- Defines a serpentine transistor.
- See Also:
- Constant Field Values
POLYGONAL
public static final int POLYGONAL
- Defines a polygonal transistor.
- See Also:
- Constant Field Values
LOWVTBIT
public static final int LOWVTBIT
- set if node is a low vt transistor
- See Also:
- Constant Field Values
HIGHVTBIT
public static final int HIGHVTBIT
- set if node is a high vt transistor
- See Also:
- Constant Field Values
NATIVEBIT
public static final int NATIVEBIT
- set if node is a native transistor
- See Also:
- Constant Field Values
OD18BIT
public static final int OD18BIT
- set if node is a od18 transistor
- See Also:
- Constant Field Values
OD25BIT
public static final int OD25BIT
- set if node is a od25 transistor
- See Also:
- Constant Field Values
OD33BIT
public static final int OD33BIT
- set if node is a od33 transistor
- See Also:
- Constant Field Values
CROSSCONTACT
public static final int CROSSCONTACT
- set if node is a cross contact
- See Also:
- Constant Field Values
ALIGNCONTACT
public static final int ALIGNCONTACT
- set if node is an aligned contact
- See Also:
- Constant Field Values
PrimitiveNode
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. Use the factory "newInstance" instead.
writeReplace
protected java.lang.Object writeReplace()
newInstance
public 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.
Size corrector of PrimitiveNode is determined from width and height.
- Parameters:
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.
- Returns:
- the newly created PrimitiveNode.
newInstance0
public 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.
PrimitiveNode has zero size corrector.
- Parameters:
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.
- Returns:
- the newly created PrimitiveNode.
getId
public PrimitiveNodeId getId()
- Method to return NodeProtoId of this NodeProto.
NodeProtoId identifies NodeProto independently of threads.
PrimitiveNodes are shared among threads, so this method returns this PrimitiveNode.
- Specified by:
getId
in interface NodeProto
- Returns:
- NodeProtoId of this NodeProto.
getName
public java.lang.String getName()
- Method to return the name of this PrimitiveNode in the Technology.
- Specified by:
getName
in interface NodeProto
- Returns:
- the name of this PrimitiveNode.
getFullName
public java.lang.String getFullName()
- Method to return the full name of this PrimitiveNode.
Full name has format "techName:primName"
- Returns:
- the full name of this PrimitiveNode.
setFunction
public void setFunction(PrimitiveNode.Function function)
- Method to set the function of this PrimitiveNode.
The Function is a technology-independent description of the behavior of this PrimitiveNode.
- Parameters:
function
- the new function of this PrimitiveNode.
getFunction
public PrimitiveNode.Function getFunction()
- Method to return the function of this PrimitiveNode.
The Function is a technology-independent description of the behavior of this PrimitiveNode.
- Specified by:
getFunction
in interface NodeProto
- Returns:
- the function of this PrimitiveNode.
getGroupFunction
public PrimitiveNode.Function getGroupFunction()
- Method to return the function of this PrimitiveNode, grouped according to its
general function.
For example, all transistors return the same value.
- Returns:
- the group function of this PrimitiveNode.
isTechSpecific
public boolean isTechSpecific()
- Method to tell whether this primitive node prototype has technology-specific information on it.
At the current time, only certain Schematics primitives have this information.
- Returns:
- true this primitive node prototype has technology-specific information on it.
getNodeLayers
public Technology.NodeLayer[] getNodeLayers()
- Method to return the list of NodeLayers that comprise this PrimitiveNode.
- Returns:
- the list of Layers that comprise this PrimitiveNode.
getLayerIterator
public java.util.Iterator<Layer> getLayerIterator()
- Method to return an iterator over the layers in this PrimitiveNode.
- Returns:
- an iterator over the layers in this PrimitiveNode.
getElectricalLayers
public Technology.NodeLayer[] getElectricalLayers()
- Method to return the list of electrical Layers that comprise this PrimitiveNode.
Like the list returned by "getLayers", the results describe this PrimitiveNode,
but each layer is tied to a specific port on the node.
If any piece of geometry covers more than one port,
it must be split for the purposes of an "electrical" description.
For example, the MOS transistor has 2 layers: Active and Poly.
But it has 3 electrical layers: Active, Active, and Poly.
The active must be split since each half corresponds to a different PrimitivePort on the PrimitiveNode.
- Returns:
- the list of electrical Layers that comprise this PrimitiveNode.
setElectricalLayers
public void setElectricalLayers(Technology.NodeLayer[] electricalLayers)
- Method to set the list of electrical Layers that comprise this PrimitiveNode.
Like the list returned by "getLayers", the results describe this PrimitiveNode,
but each layer is tied to a specific port on the node.
If any piece of geometry covers more than one port,
it must be split for the purposes of an "electrical" description.
For example, the MOS transistor has 2 layers: Active and Poly.
But it has 3 electrical layers: Active, Active, and Poly.
The active must be split since each half corresponds to a different PrimitivePort on the PrimitiveNode.
- Parameters:
electricalLayers
- the list of electrical Layers that comprise this PrimitiveNode.
findNodeLayer
public Technology.NodeLayer findNodeLayer(Layer layer,
boolean electrical)
- Method to find the NodeLayer on this PrimitiveNode with a given Layer.
If there are more than 1 with the given Layer, the first is returned.
- Parameters:
layer
- the Layer to find.
- Returns:
- the NodeLayer that has this Layer.
hasMultiCuts
public boolean hasMultiCuts()
- Tells whether this PrimitiveNode has NodeLayer with MULTICUTBOX representation.
For now, multicut primitives and resistor primitives have such NodeLayers.
- Returns:
- true if this PrimitiveNode has NodeLayer with MULTICUTBOX representation.
findMulticut
public Technology.NodeLayer findMulticut()
- Find a NodeLayer of this PrimitiveNode has NodeLayer with MULTICUTBOX representation.
If no such NodeLayer exists, returns null, if many - returns any of them..
- Returns:
- a NodeLayer of this PrimitiveNode has NodeLayer with MULTICUTBOX representation.
isMulticut
public boolean isMulticut()
- Tells whether this PrimitiveNode is multicut, i.e. it has exactly one NodeLayer with MULTICUTBOX representation,
- Returns:
- true if this PrimitiveNode is multicut.
getDefWidth
public double getDefWidth()
- Method to return the default full width of this PrimitiveNode.
- Specified by:
getDefWidth
in interface NodeProto
- Returns:
- the default width of this PrimitiveNode.
getDefHeight
public double getDefHeight()
- Method to return the default full height of this PrimitiveNode.
- Specified by:
getDefHeight
in interface NodeProto
- Returns:
- the default height of this PrimitiveNode.
getDefaultLambdaBaseWidth
public double getDefaultLambdaBaseWidth(EditingPreferences ep)
- Method to return the default base width of this PrimitiveNode in lambda units
in specified EditingPreferences.
- Parameters:
ep
- specified EditingPreferences
- Returns:
- the default base width of this PrimitiveNode in lambda units.
getFactoryDefaultLambdaBaseWidth
public double getFactoryDefaultLambdaBaseWidth()
- Method to return the factory default base width of this PrimitiveNode in lambda units.
- Returns:
- the factory default base width of this PrimitiveNode in lambda units.
getDefaultLambdaBaseHeight
public double getDefaultLambdaBaseHeight(EditingPreferences ep)
- Method to return the default base hwight of this PrimitiveNode in lambda units
in specified EditingPreferences.
- Parameters:
ep
- specified EditingPreferences
- Returns:
- the default base height of this PrimitiveNode in lambda units.
getFactoryDefaultLambdaBaseHeight
public double getFactoryDefaultLambdaBaseHeight()
- Method to return the factory default base hwight of this PrimitiveNode in lambda units.
- Returns:
- the factory default base height of this PrimitiveNode in lambda units.
getDefaultGridBaseWidth
public long getDefaultGridBaseWidth(EditingPreferences ep)
- Method to return the default base width of this PrimitiveNode in grid units
in specified EditingPreferences.
- Parameters:
ep
- specified EditingPreferences
- Returns:
- the default base width of this PrimitiveNode in grid units.
getFactoryDefaultGridBaseWidth
public long getFactoryDefaultGridBaseWidth()
- Method to return the factory default base width of this PrimitiveNode in grid units.
- Returns:
- the factory default base width of this PrimitiveNode in grid units.
getDefaultGridBaseHeight
public long getDefaultGridBaseHeight(EditingPreferences ep)
- Method to return the default base height of this PrimitiveNode in grid units
in specified EditingPreferences.
- Parameters:
ep
- specified EditingPreferences
- Returns:
- the default base height of this PrimitiveNode in grid units.
getFactoryDefaultGridBaseHeight
public long getFactoryDefaultGridBaseHeight()
- Method to return the factory default base height of this PrimitiveNode in grid units.
- Returns:
- the factory default base height of this PrimitiveNode in grid units.
getDefaultLambdaExtendX
public double getDefaultLambdaExtendX(EditingPreferences ep)
- Method to return the defaut extend of this PrimitiveNode over minimal width\
in lambda units in specified EditingPreferences.
- Parameters:
ep
- specified EditingPreferences
- Returns:
- the defaut extend of this PrimitiveNode over minimal width in lambda units.
getDefaultLambdaExtendY
public double getDefaultLambdaExtendY(EditingPreferences ep)
- Method to return the defaut extend of this PrimitiveNode over minimal height\
in lambda units in specified EditingPreferences.
- Parameters:
ep
- specified EditingPreferences
- Returns:
- the defaut extend of this PrimitiveNode overn ninimal height in lambda units.
getDefaultGridExtendX
public long getDefaultGridExtendX(EditingPreferences ep)
- Method to return the defaut extend of this PrimitiveNode over minimal width\
in grid units in specified EditingPreferences.
- Parameters:
ep
- specified EditingPreferences
- Returns:
- the defaut extend of this PrimitiveNode over minimal width in grid units.
getDefaultGridExtendY
public long getDefaultGridExtendY(EditingPreferences ep)
- Method to return the defaut extend of this PrimitiveNode over minimal height\
in grid units in specified EditingPreferences.
- Parameters:
ep
- specified EditingPreferences
- Returns:
- the defaut extend of this PrimitiveNode overn ninimal height in grid units.
getFactoryDefaultGridExtendX
public long getFactoryDefaultGridExtendX()
- Method to return the factory defaut extend of this PrimitiveNode over minimal width\
in grid units.
- Returns:
- the defaut extend of this PrimitiveNode over minimal width in grid units.
getFactoryDefaultGridExtendY
public long getFactoryDefaultGridExtendY()
- Method to return the factory defaut extend of this PrimitiveNode over minimal height\
in grid units.
- Returns:
- the defaut extend of this PrimitiveNode overn ninimal height in grid units.
getDefaultInst
public ImmutableNodeInst getDefaultInst(EditingPreferences ep)
- Method to return the default immutable instance of this PrimitiveNode
in specified EditingPreferences.
- Parameters:
ep
- specified EditingPreferences
- Returns:
- the default immutable instance of this PrimitiveNode
getFactoryDefaultInst
public ImmutableNodeInst getFactoryDefaultInst()
- Method to return the factory default immutable instance of this PrimitiveNode
- Returns:
- the factory default immutable instance of this PrimitiveNode
getProtoSizeOffset
public SizeOffset getProtoSizeOffset()
- Method to get the size offset of this PrimitiveNode.
To get the SizeOffset for a specific NodeInst, use Technology.getSizeOffset(ni).
Use this method only to get the SizeOffset of a PrimitiveNode.
- Specified by:
getProtoSizeOffset
in interface NodeProto
- Returns:
- the size offset of this PrimitiveNode.
getBaseRectangle
public ERectangle getBaseRectangle()
- Method to get the base (highlight) ERectangle of this PrimitiveNode.
Base ERectangle is a highlight rectangle of standard-size NodeInst of
this PrimtiveNode
To get the base ERectangle for a specific NodeInst, use Technology.getBaseRectangle(ni).
Use this method only to get the base ERectangle of a PrimitiveNode.
- Returns:
- the base ERectangle of this PrimitiveNode.
getFullRectangle
public ERectangle getFullRectangle()
- Method to get the full (true) ERectangle of this PrimitiveNode.
Base ERectangle is a highlight rectangle of standard-size NodeInst of
this PrimtiveNode
To get the full (true) ERectangle for a specific NodeInst, use Technology.getBaseRectangle(ni).
Use this method only to get the base ERectangle of a PrimitiveNode.
- Returns:
- the base ERectangle of this PrimitiveNode.
getMinSizeRule
public PrimitiveNode.NodeSizeRule getMinSizeRule()
- Method to return the minimum size rule for this PrimitiveNode.
- Returns:
- the minimum size rule for this PrimitiveNode.
setMinSize
public void setMinSize(double minWidth,
double minHeight,
java.lang.String minSizeRule)
- Method to set the minimum height of this PrimitiveNode.
If no name is provided, it uses the PrimitiveNode name to compose the rule name.
- Parameters:
minHeight
- the minimum height of this PrimitiveNode.
setSizeOffset
public void setSizeOffset(SizeOffset offset)
- Method to set the size offset of this PrimitiveNode.
- Parameters:
offset
- the size offset of this PrimitiveNode.
setAutoGrowth
public void setAutoGrowth(double dX,
double dY)
- Method to set the auto-growth factor on this PrimitiveNode.
The auto-growth factor is the amount to exand the node when new arcs
want to connect to an expandable port and there is no room for the arcs.
The only nodes that have auto-growth factors are the AND, OR, XOR, SWITCH, and MUX
nodes of the Schematics technology.
These nodes have ports that can accomodate any number of arcs.
- Parameters:
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.
getAutoGrowth
public Dimension2D getAutoGrowth()
- Method to get the auto-growth factor for this PrimitiveNode.
The auto-growth factor is the amount to exand the node when new arcs
want to connect to an expandable port and there is no room for the arcs.
The only nodes that have auto-growth factors are the AND, OR, XOR, SWITCH, and MUX
nodes of the Schematics technology.
These nodes have ports that can accomodate any number of arcs.
- Returns:
- the amount to grow this PrimitiveNode when arcs don't fit.
setSpiceTemplate
public void setSpiceTemplate(java.lang.String st)
- Method to set the Spice template on this PrimitiveNode.
The Spice template is a string that has parameters which are
filled-in to produce the line in the Spice deck corresponding to this PrimitiveNode.
- Parameters:
st
- the Spice template on this PrimitiveNode.
getSpiceTemplate
public java.lang.String getSpiceTemplate()
- Method to get the Spice template on this PrimitiveNode.
The Spice template is a string that has parameters which are
filled-in to produce the line in the Spice deck corresponding to this PrimitiveNode.
- Returns:
- the Spice template on this PrimitiveNode.
getTechnology
public Technology getTechnology()
- Method to return the Technology of this PrimitiveNode.
- Specified by:
getTechnology
in interface NodeProto
- Returns:
- the Technology of this PrimitiveNode.
getPrimitiveNodeGroup
public PrimitiveNodeGroup getPrimitiveNodeGroup()
- Method to return the PrimitiveNodeGroup that contains this PrimitiveNode.
Return null if this PrimitiveNode is not contained in any group.
- Returns:
- the Technology of this PrimitiveNode.
addPrimitivePortsFixed
public void addPrimitivePortsFixed(PrimitivePort[] ports)
- Method to add an array of PrimitivePorts to this PrimitiveNode.
fullRectange shift is removed from port sizes.
The method is only used during initialization.
- Parameters:
ports
- the array of PrimitivePorts to add.
addPrimitivePorts
public void addPrimitivePorts(PrimitivePort[] ports,
boolean fixFullRectangle)
- Method to add an array of PrimitivePorts to this PrimitiveNode.
The method is only used during initialization.
- Parameters:
ports
- the array of PrimitivePorts to add.fixFullRectangle
- remove fullRectangle shift from port sizes.
findPortProto
public PortProto findPortProto(java.lang.String name)
- Method to find the PortProto that has a particular name.
- Specified by:
findPortProto
in interface NodeProto
- Returns:
- the PortProto, or null if there is no PortProto with that name.
findPortProto
public PortProto findPortProto(Name name)
- Method to find the PortProto that has a particular Name.
- Specified by:
findPortProto
in interface NodeProto
- Returns:
- the PortProto, or null if there is no PortProto with that name.
getPorts
public java.util.Iterator<PortProto> getPorts()
- Method to return an iterator over all PortProtos of this NodeProto.
- Specified by:
getPorts
in interface NodeProto
- Returns:
- an iterator over all PortProtos of this NodeProto.
getPrimitivePorts
public java.util.Iterator<PrimitivePort> getPrimitivePorts()
- Method to return an iterator over all PrimitivePorts of this PrimitiveNode.
- Returns:
- an iterator over all PrimitvePorts of this NodeProto.
getNumPorts
public int getNumPorts()
- Method to return the number of PortProtos on this NodeProto.
- Specified by:
getNumPorts
in interface NodeProto
- Returns:
- the number of PortProtos on this NodeProto.
getPort
public final PrimitivePort getPort(int portIndex)
- Method to return the PortProto at specified position.
- Specified by:
getPort
in interface NodeProto
- Parameters:
portIndex
- specified position of PortProto.
- Returns:
- the PortProto at specified position..
getPort
public PrimitivePort getPort(PortProtoId portProtoId)
- Method to return the PortProto by thread-independent PortProtoId.
- Specified by:
getPort
in interface NodeProto
- Parameters:
portProtoId
- thread-independent PortProtoId.
- Returns:
- the PortProto.
- Throws:
java.lang.IllegalArgumentException
- if portProtoId is not from this NodeProto.
connectsTo
public PrimitivePort connectsTo(ArcProto arc)
- Method to return the PrimitivePort on this PrimitiveNode that can connect to an arc of the specified type.
The method finds a PrimitivePort that can make the connection.
- Parameters:
arc
- the type of arc to connect to an instance of this PrimitiveNode.
- Returns:
- a PrimitivePort that can connect to this type of ArcProto.
Returns null if this ArcProto cannot connect to anything on this PrimitiveNode.
getSpecialType
public int getSpecialType()
- Method to return the special type of this PrimitiveNode.
It can be one of NORMAL, SERPTRANS, POLYGONAL, or MULTICUT.
- Returns:
- the special type of this PrimitiveNode.
setSpecialType
public void setSpecialType(int specialType)
- Method to set the special type of this PrimitiveNode.
- Parameters:
specialType
- the newspecial type of this PrimitiveNode.
It can be NORMAL, SERPTRANS, POLYGONAL, or MULTICUT.
getSpecialTypeName
public static java.lang.String getSpecialTypeName(int t)
- Method to return the name of a special PrimitiveNode type.
- Parameters:
t
- the integer special type.
- Returns:
- the name of that type.
getSpecialValues
public double[] getSpecialValues()
- Method to return the special values stored on this PrimitiveNode.
The special values are an array of integers that describe unusual features of the PrimitiveNode.
They are only relevant for certain specialType cases:
- for MULTICUT:
- cut size is [0] x [1]
- cut indented [2] x [3] from highlighting
- cuts spaced [4] apart for 1-dimensional contact
- cuts spaced [5] apart for 2-dimensional contact
- for SERPTRANS:
- layer count is [0] (never used)
- active port inset [1] from end of serpentine path
- active port is [2] from poly edge
- poly width is [3]
- poly port inset [4] from poly edge
- poly port is [5] from active edge
- Returns:
- the special values stored on this PrimitiveNode.
getMulticut2Size
public EPoint getMulticut2Size()
setSpecialValues
public void setSpecialValues(double[] specialValues)
- Method to set the special values stored on this PrimitiveNode.
The special values are an array of values that describe unusual features of the PrimitiveNode.
The meaning depends on the specialType (see the documentation for "getSpecialValues").
- Parameters:
specialValues
- the special values for this PrimitiveNode.
isPin
public boolean isPin()
- Method to tell whether this PrimitiveNode is a Pin.
Pin nodes have one port, no valid geometry, and are used to connect arcs.
- Returns:
- true if this PrimitiveNode is a Pin.
describe
public java.lang.String describe(boolean withQuotes)
- Method to describe this PrimitiveNode as a string.
If the primitive is not from the current technology, prepend the technology name.
- Specified by:
describe
in interface NodeProto
- Parameters:
withQuotes
- to wrap description between quotes
- Returns:
- a description of this PrimitiveNode.
isNodeBitOn
public boolean isNodeBitOn(int bit)
- Method to determine if node has a given bit on. This is usefull for different
- Parameters:
bit
- bit containing information to query. It could be LOWVTTRANS,
HIGHVTTRANS, NATIVETRANS, OD18TRANS, OD25TRANS or OD33TRANS in case of transistors.
- Returns:
- true if the given bit is on in the node.
setNodeBit
public void setNodeBit(int bit)
- Method to set certain bit during construction
- Parameters:
bit
-
setSkipSizeInPalette
public void setSkipSizeInPalette()
- Method to allow instances of this PrimitiveNode not to be considered in
tech palette for the calculation of the largest icon.
Valid for menu display
isSkipSizeInPalette
public boolean isSkipSizeInPalette()
- Method to tell if instaces of this PrimitiveNode are special (don't appear in menu).
Valid for menu display
setCanShrink
public void setCanShrink()
- Method to allow instances of this PrimitiveNode to shrink.
Shrinkage occurs on MOS transistors when they are connected to wires at angles that are not manhattan
(the angle between the transistor and the wire is not a multiple of 90 degrees).
The actual transistor must be shrunk back appropriately to prevent little tabs from emerging at the connection site.
This state is only set on primitive node prototypes.
If the actual NodeInst is to shrink, it must be marked with "setShortened".
Note that shrinkage does not apply if there is no arc connected.
clearCanShrink
public void clearCanShrink()
- Method to prevent instances of this PrimitiveNode from shrinking.
Shrinkage occurs on MOS transistors when they are connected to wires at angles that are not manhattan
(the angle between the transistor and the wire is not a multiple of 90 degrees).
The actual transistor must be shrunk back appropriately to prevent little tabs from emerging at the connection site.
This state is only set on primitive node prototypes.
If the actual NodeInst is to shrink, it must be marked with "setShortened".
Note that shrinkage does not apply if there is no arc connected.
canShrink
public boolean canShrink()
- Method to tell if instances of this PrimitiveNode can shrink.
Shrinkage occurs on MOS transistors when they are connected to wires at angles that are not manhattan
(the angle between the transistor and the wire is not a multiple of 90 degrees).
The actual transistor must be shrunk back appropriately to prevent little tabs from emerging at the connection site.
This state is only set on primitive node prototypes.
If the actual NodeInst is to shrink, it must be marked with "setShortened".
Note that shrinkage does not apply if there is no arc connected.
- Returns:
- true if instances of this PrimitiveNode can shrink.
setArcsWipe
public void setArcsWipe()
- Method to set this PrimitiveNode so that instances of it are "arc-wipable".
For display efficiency reasons, pins that have arcs connected to them should not bother being drawn.
Therefore, pin prototypes have this state set, and when instances of the
appropriate arc prototypes connect to instances of these pins, they stop being drawn.
It is necessary for the arc prototype to enable wiping (with setWipable).
A NodeInst that becomes wiped out has "setWiped" called.
clearArcsWipe
public void clearArcsWipe()
- Method to set this PrimitiveNode so that instances of it are not "arc-wipable".
For display efficiency reasons, pins that have arcs connected to them should not bother being drawn.
Therefore, pin prototypes have this state set, and when instances of the
appropriate arc prototypes connect to instances of these pins, they stop being drawn.
It is necessary for the arc prototype to enable wiping (with setWipable).
A NodeInst that becomes wiped out has "setWiped" called.
isArcsWipe
public boolean isArcsWipe()
- Method to tell if instances of this PrimitiveNode are "arc-wipable" by when created.
For display efficiency reasons, pins that have arcs connected to them should not bother being drawn.
Therefore, pin prototypes have this state set, and when instances of the
appropriate arc prototypes connect to instances of these pins, they stop being drawn.
It is necessary for the arc prototype to enable wiping (with setWipable).
A NodeInst that becomes wiped out has "setWiped" called.
- Returns:
- true if instances of this PrimitiveNode are "arc-wipable" by when created.
setSquare
public void setSquare()
- Method to set this PrimitiveNode so that instances of it are "square".
Square nodes must have the same X and Y size.
This is useful for round components that really have only one dimension.
clearSquare
public void clearSquare()
- Method to set this PrimitiveNode so that instances of it are not "square".
Square nodes must have the same X and Y size.
This is useful for round components that really have only one dimension.
isSquare
public boolean isSquare()
- Method to tell if instances of this PrimitiveNode are square.
Square nodes must have the same X and Y size.
This is useful for round components that really have only one dimension.
- Returns:
- true if instances of this PrimitiveNode are square.
setHoldsOutline
public void setHoldsOutline()
- Method to set this PrimitiveNode so that instances of it may hold outline information.
Outline information is an array of coordinates that define the node.
It can be as simple as an opened-polygon that connects the points,
or a serpentine transistor that lays down polysilicon to follow the points.
clearHoldsOutline
public void clearHoldsOutline()
- Method to set this PrimitiveNode so that instances of it may not hold outline information.
Outline information is an array of coordinates that define the node.
It can be as simple as an opened-polygon that connects the points,
or a serpentine transistor that lays down polysilicon to follow the points.
isHoldsOutline
public boolean isHoldsOutline()
- Method to tell if instances of this PrimitiveNode can hold an outline.
Outline information is an array of coordinates that define the node.
It can be as simple as an opened-polygon that connects the points,
or a serpentine transistor that lays down polysilicon to follow the points.
- Returns:
- true if instances of this PrimitiveNode can hold an outline.
setCanBeZeroSize
public void setCanBeZeroSize()
- Method to set this PrimitiveNode so that it can be zero in size.
The display system uses this to eliminate zero-size nodes that cannot be that way.
clearCanBeZeroSize
public void clearCanBeZeroSize()
- Method to set this PrimitiveNode so that it cannot be zero in size.
The display system uses this to eliminate zero-size nodes that cannot be that way.
isCanBeZeroSize
public boolean isCanBeZeroSize()
- Method to tell if instances of this PrimitiveNode can be zero in size.
The display system uses this to eliminate zero-size nodes that cannot be that way.
- Returns:
- true if instances of this PrimitiveNode can be zero in size.
setWipeOn1or2
public void setWipeOn1or2()
- Method to set this PrimitiveNode so that instances of it are wiped when 1 or 2 arcs connect.
This is used in Schematics pins, which are not shown if 1 or 2 arcs connect, but are shown
when standing alone, or when 3 or more arcs make a "T" or other connection to it.
clearWipeOn1or2
public void clearWipeOn1or2()
- Method to set this PrimitiveNode so that instances of it are not wiped when 1 or 2 arcs connect.
Only Schematics pins enable this state.
isWipeOn1or2
public boolean isWipeOn1or2()
- Method to tell if instances of this PrimitiveNode are wiped when 1 or 2 arcs connect.
This is used in Schematics pins, which are not shown if 1 or 2 arcs connect, but are shown
when standing alone, or when 3 or more arcs make a "T" or other connection to it.
- Returns:
- true if instances of this PrimitiveNode are wiped when 1 or 2 arcs connect.
setLockedPrim
public void setLockedPrim()
- Method to set this PrimitiveNode so that instances of it are locked.
Locked Primitives cannot be created, deleted, or modified.
Typically, array technologies (such as FPGA) have lockable primitives which are used for the fixed part of a design,
and then locked to prevent the customization work from damaging the circuit.
clearLockedPrim
public void clearLockedPrim()
- Method to set this PrimitiveNode so that instances of it are not locked.
Locked Primitives cannot be created, deleted, or modified.
Typically, array technologies (such as FPGA) have lockable primitives which are used for the fixed part of a design,
and then locked to prevent the customization work from damaging the circuit.
isLockedPrim
public boolean isLockedPrim()
- Method to tell if instances of this PrimitiveNode are loced.
Locked Primitives cannot be created, deleted, or modified.
Typically, array technologies (such as FPGA) have lockable primitives which are used for the fixed part of a design,
and then locked to prevent the customization work from damaging the circuit.
- Returns:
- true if instances of this PrimitiveNode are loced.
setEdgeSelect
public void setEdgeSelect()
- Method to set this PrimitiveNode so that instances of it are selectable only by their edges.
Artwork primitives that are not filled-in or are outlines want edge-selection, instead
of allowing a click anywhere in the bounding box to work.
clearEdgeSelect
public void clearEdgeSelect()
- Method to set this PrimitiveNode so that instances of it are not selectable only by their edges.
Artwork primitives that are not filled-in or are outlines want edge-selection, instead
of allowing a click anywhere in the bounding box to work.
isEdgeSelect
public boolean isEdgeSelect()
- Method to tell if instances of this PrimitiveNode are selectable on their edges.
Artwork primitives that are not filled-in or are outlines want edge-selection, instead
of allowing a click anywhere in the bounding box to work.
- Returns:
- true if instances of this PrimitiveNode are selectable on their edges.
setArcsShrink
public void setArcsShrink()
- Method to set this PrimitiveNode so that arcs connected to instances will shrink in nonmanhattan situations.
This happens to pins where any combination of multiple arcs in angles that are not increments of 90 degrees
will cause tabs to emerge at the connection site.
clearArcsShrink
public void clearArcsShrink()
- Method to set this PrimitiveNode so that arcs connected to instances will not shrink in nonmanhattan situations.
This happens to pins where any combination of multiple arcs in angles that are not increments of 90 degrees
will cause tabs to emerge at the connection site.
isArcsShrink
public boolean isArcsShrink()
- Method to tell if instances of this PrimitiveNode cause arcs to shrink in nonmanhattan situations.
This happens to pins where any combination of multiple arcs in angles that are not increments of 90 degrees
will cause tabs to emerge at the connection site.
- Returns:
- true if instances of this PrimitiveNode cause arcs to shrink in nonmanhattan situations.
setNotUsed
public void setNotUsed(boolean set)
- Method to set this PrimitiveNode so that it is not used.
Unused nodes do not appear in the component menus and cannot be created by the user.
The state is useful for hiding primitives that the user should not use.
- Parameters:
set
-
isNotUsed
public boolean isNotUsed()
- Method to tell if this PrimitiveNode is used.
Unused nodes do not appear in the component menus and cannot be created by the user.
The state is useful for hiding primitives that the user should not use.
- Returns:
- true if this PrimitiveNode is used.
isPureWellNode
public boolean isPureWellNode()
- Method to determine if PrimitiveNode represents a well node
- Returns:
- true if this PrimitiveNode is a well node
isPureSubstrateNode
public boolean isPureSubstrateNode()
- Method to determine if PrimitiveNode represents substrate node
- Returns:
- true if this PrimitiveNode is a substrate node
getPrimNodeIndexInTech
public final int getPrimNodeIndexInTech()
- Method to retrieve index of the node in the given technology
- Returns:
- the index of this node in its Technology.
setPrimNodeIndexInTech
public void setPrimNodeIndexInTech(int index)
- Method to set the index of this node in its Technology.
- Parameters:
index
- the index to use for this node in its Technology.
compareTo
public int compareTo(PrimitiveNode that)
- Compares PrimtiveNodes by their Technologies and definition order.
- Specified by:
compareTo
in interface java.lang.Comparable<PrimitiveNode>
- Parameters:
that
- the other PrimitiveNode.
- Returns:
- a comparison between the PrimitiveNodes.
toString
public java.lang.String toString()
- Returns a printable version of this PrimitiveNode.
- Overrides:
toString
in class java.lang.Object
- Returns:
- a printable version of this PrimitiveNode.
getZValues
public void getZValues(double[] array)
- Method to get MinZ and MaxZ of the cell calculated based on nodes
- Parameters:
array
- array[0] is minZ and array[1] is max