com.sun.electric.database.prototype
Interface PortProto

All Known Implementing Classes:
Export, PrimitivePort

public interface PortProto

The PortProto interface defines a type of PortInst. It is be implemented as PrimitivePort (for primitives from Technologies) or as Export (for cells in Libraries).

Every port in the database appears as one prototypical object and many instantiative objects. Thus, for a PrimitivePort such as the "poly-left" port on a CMOS P-transistor there is one object (called a PrimitivePort, which is a PortProto) that describes the transistor prototype and there are many objects (called PortInsts), one for every port on an instance of that transistor in a circuit. Similarly, for every Export, there is one object (called an Export, which is a PortProto) that describes the Export on a Cell and there are many objects (also called PortInsts) for every port on a use of that Cell in some other Cell. PrimitivePorts are statically created and placed in the Technology objects, but complex Exports are created by the tools and placed in Library objects.

A PortProto has a descriptive name, which may be overridden by another PortProto at a higher level in the schematic or layout hierarchy. The PortProto also has a parent cell, characteristics, and more.


Method Summary
 boolean connectsTo(ArcProto arc)
          Method to return true if the specified ArcProto can connect to this PortProto.
 PrimitivePort getBasePort()
          method to return the base-level port that this PortProto is created from.
 PortCharacteristic getCharacteristic()
          Method to return the PortCharacteristic of this PortProto.
 PortProtoId getId()
          Method to return PortProtoId of this PortProto.
 java.lang.String getName()
          Method to return the name of this PortProto.
 Name getNameKey()
          Method to return the name key of this PortProto.
 NodeProto getParent()
          Method to return the parent NodeProto of this PortProto.
 int getPortIndex()
          Method to get the index of this PortProto.
 boolean isGround()
          Method to determine whether this PortProto is of type Ground.
 boolean isPower()
          Method to determine whether this PortProto is of type Power.
 

Method Detail

getId

PortProtoId getId()
Method to return PortProtoId of this PortProto. PortProtoId identifies PortProto independently of threads.

Returns:
PortProtoId of this PortProto.

getPortIndex

int getPortIndex()
Method to get the index of this PortProto. This is a zero-based index of ports on the NodeProto.

Returns:
the index of this PortProto.

getNameKey

Name getNameKey()
Method to return the name key of this PortProto.

Returns:
the Name key of this PortProto.

getName

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

Returns:
the name of this PortProto.

getParent

NodeProto getParent()
Method to return the parent NodeProto of this PortProto.

Returns:
the parent NodeProto of this PortProto.

getCharacteristic

PortCharacteristic getCharacteristic()
Method to return the PortCharacteristic of this PortProto.

Returns:
the PortCharacteristic of this PortProto.

isPower

boolean isPower()
Method to determine whether this PortProto is of type Power. This is determined by either having the proper Characteristic, or by having the proper name (starting with "vdd", "vcc", "pwr", or "power").

Returns:
true if this PortProto is of type Power.

isGround

boolean isGround()
Method to determine whether this PortProto is of type Ground. This is determined by either having the proper PortCharacteristic, or by having the proper name (starting with "vss", "gnd", or "ground").

Returns:
true if this PortProto is of type Ground.

getBasePort

PrimitivePort getBasePort()
method to return the base-level port that this PortProto is created from. For a PrimitivePort, it simply returns itself. For an Export, it returns the base port of its sub-port, the port on the NodeInst from which the Export was created.

Returns:
the base-level port that this PortProto is created from.

connectsTo

boolean connectsTo(ArcProto arc)
Method to return true if the specified ArcProto can connect to this PortProto.

Parameters:
arc - the ArcProto to test for connectivity.
Returns:
true if this PortProto can connect to the ArcProto, false if it can't.