com.sun.electric.tool.ncc.netlist
Class Resistor

java.lang.Object
  extended by com.sun.electric.tool.ncc.netlist.NetObject
      extended by com.sun.electric.tool.ncc.netlist.Part
          extended by com.sun.electric.tool.ncc.netlist.Resistor
All Implemented Interfaces:
NetObjReport.NetObjReportable, PartReport.PartReportable

public class Resistor
extends Part


Nested Class Summary
 
Nested classes/interfaces inherited from class com.sun.electric.tool.ncc.netlist.NetObject
NetObject.Type
 
Field Summary
static PartTypeTable TYPES
           
 
Fields inherited from class com.sun.electric.tool.ncc.netlist.Part
BIPOLAR, pins, RESISTOR, SUBCIRCUIT, TRANSISTOR, TYPE_FIELD_WIDTH
 
Constructor Summary
Resistor(PartType type, NccNameProxy.PartNameProxy name, double width, double length, Wire w1, Wire w2)
           
 
Method Summary
 void connect(Wire ss, Wire ee)
           
 java.lang.String connectionDescription(int n)
          human readable description of things connected this NetObject
 java.lang.String connectionDescription(Wire w)
          comma separated list of pins connected to w
 double getLength()
           
 int[] getPinCoeffs()
          Here is an accessor method for the coefficiant array for this Part.
 PinType getPinTypeOfNthPin(int n)
           
 double getWidth()
           
 java.lang.Integer hashCodeForParallelMerge()
          Compute a hash code for this part for the purpose of performing parallel merge.
 boolean parallelMerge(Part p)
          Never perform series/parallel combination of resistors.
 int typeCode()
          returns a unique int value for each distinct Part type
 java.lang.String typeString()
          returns String describing Part's type
 java.lang.String valueDescription()
          Report the numeric values of this Part, for example: width, length, resistance.
 
Methods inherited from class com.sun.electric.tool.ncc.netlist.Part
checkMe, computeHashCode, getConnected, getHashFor, getName, getNameProxy, getNetObjType, getNumWiresConnected, instanceDescription, isDeleted, isMos, isResistor, numDistinctWires, numPins, numPinsConnected, setDeleted
 
Methods inherited from class com.sun.electric.tool.ncc.netlist.NetObject
error, fullDescription, getCode, getParent, setParent, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.sun.electric.tool.ncc.result.NetObjReport.NetObjReportable
fullDescription
 

Field Detail

TYPES

public static final PartTypeTable TYPES
Constructor Detail

Resistor

public Resistor(PartType type,
                NccNameProxy.PartNameProxy name,
                double width,
                double length,
                Wire w1,
                Wire w2)
Method Detail

getPinCoeffs

public int[] getPinCoeffs()
Description copied from class: Part
Here is an accessor method for the coefficiant array for this Part. The terminal coefficients are used to compute new hash codes.

Specified by:
getPinCoeffs in class Part
Returns:
the array of terminal coefficients for this Part

valueDescription

public java.lang.String valueDescription()
Description copied from class: Part
Report the numeric values of this Part, for example: width, length, resistance.

Specified by:
valueDescription in class Part
Returns:
a String describing the Part's numeric values.

hashCodeForParallelMerge

public java.lang.Integer hashCodeForParallelMerge()
Description copied from class: Part
Compute a hash code for this part for the purpose of performing parallel merge. If two parallel Parts should be merged into one then hashCodeForParallelMerge() must return the same value for both Parts.

Specified by:
hashCodeForParallelMerge in class Part

getWidth

public double getWidth()
Specified by:
getWidth in interface PartReport.PartReportable
Overrides:
getWidth in class Part

getLength

public double getLength()
Specified by:
getLength in interface PartReport.PartReportable
Overrides:
getLength in class Part

connect

public void connect(Wire ss,
                    Wire ee)

parallelMerge

public boolean parallelMerge(Part p)
Never perform series/parallel combination of resistors. For layout resistors, resistance is a vendor dependent function of resistor width and length. We'll simply annotate resistor width and length and compare these between schematic and layout. See Jon Lexau for rationale.

Specified by:
parallelMerge in class Part
Parameters:
p - the other Part with which to merge
Returns:
true if merge was successful, false otherwise

typeCode

public int typeCode()
Description copied from class: Part
returns a unique int value for each distinct Part type

Specified by:
typeCode in class Part

getPinTypeOfNthPin

public PinType getPinTypeOfNthPin(int n)
Specified by:
getPinTypeOfNthPin in class Part
Returns:
the PinType for the nth pin

typeString

public java.lang.String typeString()
Description copied from class: Part
returns String describing Part's type

Specified by:
typeString in interface PartReport.PartReportable
Specified by:
typeString in class Part

connectionDescription

public java.lang.String connectionDescription(int n)
Description copied from class: NetObject
human readable description of things connected this NetObject

Specified by:
connectionDescription in class NetObject

connectionDescription

public java.lang.String connectionDescription(Wire w)
Description copied from class: Part
comma separated list of pins connected to w

Specified by:
connectionDescription in class Part