|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbyucc.edif.EdifCellInterface
Represents the port interface of an EdifCell object.
| Field Summary | |
private EdifCell |
_parent
Parent EdifCell that owns this interface |
private ArrayListNameSpaceResolver |
_portList
This List is used to hold all the EdifPort objects of the current Cell. |
| Constructor Summary | |
EdifCellInterface(EdifCell parent)
Constructs an Empty EdifCellInterface Object with the passed-in EdifCell object as its parent. |
|
| Method Summary | |
EdifPort |
addPort(EdifNameable name,
int width,
int direction)
Adds a new port to the EdifCellInterface. |
EdifPort |
addPort(java.lang.String name,
int width,
int direction)
Adds a new port to the EdifCellInterface. |
boolean |
busMatch(EdifCellInterface cell)
Compares the two cell interfaces, taking into account the fact that one may have no busses, and the other might. |
boolean |
canContractPorts(java.util.Collection ports)
1. make sure ports isn't null 2. make sure ports has a length greater than 1 3. make sure each port is contained within the EdifCellInterface 4. check to see if they all have same base name 5. make sure all ports have a bit position 6. make sure all ports aren't busses 7. make sure that the number of ports equals number of ports that exist in the range 8. check to make sure continuous bits are present |
boolean |
canExpandPort(EdifPort port)
make sure the port isn't null. |
boolean |
contains(EdifPort contain)
Checks to see if the passed-in EdifPort is already contained within this EdifCellInterface. |
EdifPort |
contractPorts(java.util.Collection ports)
Contracts a Collection of port objects, if canContractPorts returns true. |
EdifCellInterface |
copy(EdifCell parent)
Returns a deep copy of this EdifCellInterface Object. |
void |
deletePort(EdifPort port)
Removes a port from this EdifCellInterface. |
void |
equalizeInterfaces(EdifCellInterface cell)
Overloaded method that defaults to contracting ports to busses. |
void |
equalizeInterfaces(EdifCellInterface cell,
boolean contract)
Overloaded method that defaults to not making expanded port directions equal to the left alone port directions. |
void |
equalizeInterfaces(EdifCellInterface cell,
boolean contract,
boolean makeExpandedDirectionsEqualOther)
Overloaded method that defaults to making it ok to modify the given EdifCellInterface. |
void |
equalizeInterfaces(EdifCellInterface cell,
boolean contract,
boolean makeExpandedDirectionsEqualOther,
boolean dontModifyGivenCell)
Equalizes this interface to the passed-in interface. |
boolean |
equals(EdifCellInterface cell)
Overloaded method that defaults to not comparing by possible bus. |
boolean |
equals(EdifCellInterface cell,
boolean comparePossibleBus)
Overloaded method that defaults to ignoring individual port directions when comparing against a bus. |
boolean |
equals(EdifCellInterface cell,
boolean comparePossibleBus,
boolean ignoreBusDirection)
Determines whether the given EdifCell object matches the interface of the current EdifCell object. |
java.util.Collection |
expandPort(EdifPort port)
Expands the passed-in port, if it exists in this EdifCellInterface into a bunch of EdifPorts. |
java.util.Collection |
findSinglePortsWithMatchingBaseName(java.lang.String baseName)
Returns all ports whose baseName matches the passed-in String. |
EdifCell |
getEdifCell()
Return the parent EdifCell that owns this object. |
java.util.Collection |
getInOutPorts()
Returns a Collection of only inout ports. |
java.util.Collection |
getInputOnlyPorts()
Returns a Collection of only input ports. |
java.util.Collection |
getInputPorts()
Returns a Collection of input and inout ports. |
EdifPort |
getMatchingPort(EdifPort port)
Returns a port contained within this EdifCellInterface that matches the passed-in port by base name, bit position, and by calling EdifPort.equals(EdifPort). |
java.util.Collection |
getOutputOnlyPorts()
Returns a Collection of only output ports. |
java.util.Collection |
getOutputPorts()
Returns a Collection of output and inout ports. |
EdifPort |
getPort(java.lang.String name)
Returns the EdifPort object which defines a port on the current EdifCell object and corresponds to the given name. |
java.util.List |
getPortList()
Returns a Collection containing all of the EdifPort objects currently associated with this EdifCell object. |
java.util.Collection |
getSortedPortList()
Returns a sorted Collection containing all of the EdifPort objects currently associated with this EdifCell object. |
boolean |
inOutPortCountEquals(EdifCellInterface cell)
Returns true if the # of inout ports match in this and the passed-in interface. |
boolean |
inputOnlyPortCountEquals(EdifCellInterface cell)
Returns true if the # of input ports match in this and the passed-in interface. |
boolean |
outputOnlyPortCountEquals(EdifCellInterface cell)
Returns true if the # of output ports match in this and the passed-in interface. |
boolean |
portCountEquals(EdifCellInterface cell)
Returns true if the # of output, input, and inout ports match for the current and passed-in cell interfaces. |
void |
toEdif(EdifPrintWriter epw)
Writes the EDIF representation of this EdifCell object to the EdifPrintWriter passed as a parameter. |
java.lang.String |
toString()
|
void |
trimToSize()
Trims this object and all other contained Trimmable Objects down to size. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private ArrayListNameSpaceResolver _portList
private EdifCell _parent
| Constructor Detail |
public EdifCellInterface(EdifCell parent)
parent - The parent EdifCell Object, or owner if this
EdifCellInterface| Method Detail |
public EdifPort addPort(EdifNameable name,
int width,
int direction)
name - The name of the new port to addwidth - The width of the new port to adddirection - The direction of the new port to add
public EdifPort addPort(java.lang.String name,
int width,
int direction)
name - The name of the new port to addwidth - The width of the new port to adddirection - The direction of the new port to add
public boolean busMatch(EdifCellInterface cell)
cell - The interface used for comparison
EdifCell.busMatch(byucc.edif.EdifCell)public boolean canContractPorts(java.util.Collection ports)
ports - The Collection of ports to contract to a single
port
public boolean canExpandPort(EdifPort port)
port - The port to expand into multiple ports
public boolean contains(EdifPort contain)
contain - The EdifPort to compare against the
EdifPort Objects contained within this EdifCellInterface Object
to check to see if it already exists in this EdifCellInterface
public EdifPort contractPorts(java.util.Collection ports)
ports - The Collection of port objects to contract
public EdifCellInterface copy(EdifCell parent)
parent - The EdifCell that will be the parent to this copy
public void deletePort(EdifPort port)
port - The port to remove
public void equalizeInterfaces(EdifCellInterface cell,
boolean contract,
boolean makeExpandedDirectionsEqualOther,
boolean dontModifyGivenCell)
cell - The interface that will be equalized with this onecontract - Specifies whether to contract ports or to
expand bussesmakeExpandedDirectionsEqualOther - If true, and if
contract is false by inference, when the port is expanded, the
ports of one interface will be set to the same direction as the
corresponding port in the other interfacedontModifyGivenCell - If true, the passed-in
EdifCellInterface will not be modified, and the passed-in
contract flag will be ignoredequalizeInterfaces(EdifCellInterface),
equalizeInterfaces(EdifCellInterface,boolean)
public void equalizeInterfaces(EdifCellInterface cell,
boolean contract,
boolean makeExpandedDirectionsEqualOther)
cell - The interface to match with this onecontract - Specifies whether to contract ports or to
expand bussesmakeExpandedDirectionsEqualOther - If true, and if
contract is false by inference, when the port is expanded, the
ports of one interface will be set to the same direction as the
corresponding port in the other interfaceequalizeInterfaces(EdifCellInterface,boolean,
boolean,boolean)
public void equalizeInterfaces(EdifCellInterface cell,
boolean contract)
cell - The interface to match with this onecontract - Specifies whether to contract ports or to
expand bussesequalizeInterfaces(EdifCellInterface,boolean,
boolean)public void equalizeInterfaces(EdifCellInterface cell)
cell - The interface to match with this oneequalizeInterfaces(EdifCellInterface,boolean)
public boolean equals(EdifCellInterface cell,
boolean comparePossibleBus,
boolean ignoreBusDirection)
EdifPort.equals(byucc.edif.EdifPort)).
cell - EdifCell object to compare against the current
EdifCell objectcomparePossibleBus - Allows that the case when one port is
a bus and the other port isn't or vice versa to be considered
for interface equalityignoreBusDirection - If true, the direction of the individual
ports will be ignored
equals(EdifCellInterface),
equals(EdifCellInterface,boolean)
public boolean equals(EdifCellInterface cell,
boolean comparePossibleBus)
cell - The interface to match with this onecomparePossibleBus - Allows that the case when one port is
a bus and the other port isn't or vice versa to be considered
for interface equality
equals(EdifCellInterface,boolean,boolean)public boolean equals(EdifCellInterface cell)
cell - The interface to match with this one
equals(EdifCellInterface,boolean,boolean)public java.util.Collection expandPort(EdifPort port)
port - The port to expand into a bunch of EdifPorts
public java.util.Collection findSinglePortsWithMatchingBaseName(java.lang.String baseName)
baseName - The baseName to match all return ports with
EdifCell.findSinglePortsWithMatchingBaseName(java.lang.String)public EdifCell getEdifCell()
public EdifPort getPort(java.lang.String name)
name - A string indicating the name of the EdifPort
object desired to be found
public EdifPort getMatchingPort(EdifPort port)
EdifPort.equals(EdifPort).
port - The EdifPort Object to match within this interfacepublic java.util.Collection getInputOnlyPorts()
public java.util.Collection getInputPorts()
public java.util.Collection getOutputOnlyPorts()
public java.util.Collection getOutputPorts()
public java.util.Collection getInOutPorts()
public java.util.List getPortList()
public java.util.Collection getSortedPortList()
public boolean inputOnlyPortCountEquals(EdifCellInterface cell)
cell - The interface used for comparison
public boolean inOutPortCountEquals(EdifCellInterface cell)
cell - The interface used for comparison
public boolean outputOnlyPortCountEquals(EdifCellInterface cell)
cell - The interface used for comparison
public boolean portCountEquals(EdifCellInterface cell)
cell - The interface used for comparison
public void toEdif(EdifPrintWriter epw)
EdifPrintWriter passed as a parameter.
toEdif in interface EdifOutepw - EdifPrintWriter to which EDIF will be writtenpublic java.lang.String toString()
public void trimToSize()
trimToSize in interface Trimable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||