|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbyucc.edif.NamedPropertyObject
byucc.edif.EdifNet
Represents an EDIF signal net. A net within EDIF is defined by a collection of edif port references. Specifically, the net is connected to each edif port reference in the collection.
This implementation of EdifNet contains contains a
reference to the EdifCell that contains this net. This
class also contains an array of EdifPortRef objects that
attach to the net.
Sample EDIF code for an EdifNet:
(net sgn_exp (joined (portRef (member sgn_exp 0)) (portRef DI (instanceRef L_3_U2)) (portRef I1 (instanceRef L_3_l_4)) ))
To Do:
connectedToEdifCell(), which returns a boolean
connectedToTopLevelInput() and
connectedToTopLevelOutput() - this would add storage
of only 2 booleans per EdifNet, and should be relatively easy to
keep track of when a net is created and connections are added. It
would most likely result in a great speed-up to the TMR stuff.
EdifPortRef,
Serialized Form| Field Summary | |
private java.util.ArrayList |
_attachedPortRefs
List of EdifPortRef objects that this net is connected to. |
private EdifCell |
_parent
The reference to the parent EdifCell |
| Fields inherited from class byucc.edif.NamedPropertyObject |
|
| Constructor Summary | |
EdifNet(EdifNameable name)
Constructs an empty, parentless, named EdifNet Object. |
|
EdifNet(EdifNameable name,
EdifCell parent)
Constructs an empty, named EdifNet Object with the specified parent. |
|
EdifNet(java.lang.String name)
Constructs an empty, parentless, named EdifNet Object. |
|
EdifNet(java.lang.String name,
EdifCell parent)
Constructs an empty, named EdifNet Object with the specified parent. |
|
| Method Summary | |
void |
addPortConnection(EdifCellInstance eci,
EdifPort p)
|
void |
addPortConnection(EdifCellInstance eci,
EdifPort p,
int busMember)
Add a port connection to the net. |
void |
addPortConnection(EdifCellInstance eci,
java.lang.String portName)
Add a port connection to the given port on the given instance onto this net. |
void |
addPortConnection(EdifCellInstance eci,
java.lang.String portName,
int busMember)
Add a port connection to the net. |
void |
addPortConnection(EdifPortRef portref)
Add a pre-defined EdifPortRef port connection to the net. |
void |
addTopLevelPortConnection(EdifPort port)
|
void |
addTopLevelPortConnection(java.lang.String portName)
|
EdifNet |
copy(EdifCell parent)
Returns a deep copy of this Object. |
boolean |
deletePortConnection(EdifPortRef delete)
Detaches an EdifPortRef from this EdifNet. |
java.util.Collection |
getAttachedPortRefs(EdifCellInstance cell)
This method will return a list of all EdifPortRef objects attached to the given EdifCellInstance. |
java.util.Collection |
getConnectedPortRefs()
Returns a list of EdifPortRef objects which are attached to this net. |
java.util.Collection |
getNetDriven()
This method will return all portrefs that can be driven on the current net. |
java.util.Collection |
getNetDrivers()
This method will return all portrefs that can drive on the current net. |
java.util.Collection |
getOutputPortRefs()
This method will return all portrefs in this EdifNet object that are outputs. |
java.util.Collection |
getOutputPorts()
Returns all output Ports. |
EdifCell |
getParent()
Returns a reference to the parent EdifCell (owner of net). |
java.util.Iterator |
getPortRefIterator()
Create an iterator for the EdifPortRef objects owned by this net. |
boolean |
isAttached(EdifCellInstance cell)
This method will examine the EdifPortRef objects connected to this net and determine whether the given EdifCellInstance is connected or not to the given EdifNet. |
boolean |
isAttached(EdifCellInstance cell,
EdifPort port)
This method will return true if the given EdifPort/EdifCellInstance combination are attached to the given EdifNet. |
boolean |
isLeaf()
Returns True if this net's port refs only refer to ports of leaf cells. |
boolean |
matchesWithin(java.util.Collection netList)
Returns true if the current net matches within the passed-in collection of EdifNet Objects. |
boolean |
matchesWithin(java.util.Map netList)
Returns true if the current net matches within the passed-in Map of EdifNet Objects. |
(package private) void |
modifyBusToSinglePorts(EdifPort oldPort,
java.util.Collection newPorts)
Modifies all EdifPortRefs in this object that matches the passed-in old EdifPort Object to point one of those in the Collection of newPorts. |
(package private) void |
modifyCellTypeInNets(EdifCell oldType,
EdifCell newType)
This method will iterate through all EdifPortRef objects contained in this net and modify the port connection for each EdifPortRef that points to an EdifCellInstance of type "oldType". |
(package private) void |
modifySinglePortsToBus(java.util.Collection oldPorts,
EdifPort newPort)
Modifies all EdifPortRefs in this object that match one of those in the Collection of oldPorts to point to the newPort. |
boolean |
samePorts(EdifNet net)
This method does a deep compare on the current net with the passed-in net. |
(package private) void |
setParent(EdifCell cell)
Set the reference to the parent EdifCell. |
void |
toEdif(EdifPrintWriter epw)
Converts this object to EDIF format and writes it to the passed-in EdifPrintWriter Object. |
java.lang.String |
toString()
String representation of the EdifNet with detailed information. |
void |
trimToSize()
Trims to size this object and all contained Trimmable Objects. |
| Methods inherited from class byucc.edif.NamedPropertyObject |
addProperty, addProperty, equals, equalsProperties, getEdifNameable, getName, getProperty, getPropertyList, rename, rename |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private java.util.ArrayList _attachedPortRefs
private EdifCell _parent
| Constructor Detail |
public EdifNet(java.lang.String name)
name - The name of this EdifNet Objectpublic EdifNet(EdifNameable name)
name - The Object that contains name information about
this object
public EdifNet(java.lang.String name,
EdifCell parent)
name - The name of this EdifNet Objectparent - The parent EdifCell Object of this EdifNet
public EdifNet(EdifNameable name,
EdifCell parent)
name - The Object that contains name information about
this objectparent - The parent EdifCell Object of this EdifNet| Method Detail |
public void addPortConnection(EdifPortRef portref)
portref - The EdifPortRef to connect to the net.
public void addPortConnection(EdifCellInstance eci,
java.lang.String portName)
eci - The EdifCellInstance whose parent contains the port
referred to by the passed-in portNameportName - The name of the port contained by the parent to
the passed-in EdifCellInstance Object
public void addPortConnection(EdifCellInstance eci,
EdifPort p)
public void addTopLevelPortConnection(java.lang.String portName)
public void addTopLevelPortConnection(EdifPort port)
public void addPortConnection(EdifCellInstance eci,
java.lang.String portName,
int busMember)
eci - The EdifCellInstance whose parent contains the port
referred to by the passed-in portNameportName - The name of the port contained by the parent to
the passed-in EdifCellInstance Object
public void addPortConnection(EdifCellInstance eci,
EdifPort p,
int busMember)
eci - The EdifCellInstance whose parent contains the port
referred to by the passed-in portNamepublic EdifNet copy(EdifCell parent)
parent - The EdifCell Object that will become the parent
of the copied EdifNet
public boolean deletePortConnection(EdifPortRef delete)
delete - The EdifPortRef to remove from this EdifNet
Objects list of EdifPortRefs
public java.util.Collection getAttachedPortRefs(EdifCellInstance cell)
cell - The instance to find port refs of this EdifNet that
attach to this instance
public java.util.Iterator getPortRefIterator()
public java.util.Collection getConnectedPortRefs()
public java.util.Collection getOutputPortRefs()
public java.util.Collection getOutputPorts()
public java.util.Collection getNetDriven()
public java.util.Collection getNetDrivers()
public EdifCell getParent()
EdifCell objectpublic boolean isAttached(EdifCellInstance cell)
cell - The EdifCellInstance Object that will be tested to
see if it connects to this EdifNet Object
public boolean isAttached(EdifCellInstance cell,
EdifPort port)
cell - An EdifCellInstance Object to check if one of the
EdifPortRefs in this EdifNet Object connect to a port of that
instanceport - An EdifPort Object to check if one of the
EdifPortRefs in this EdifNet Object refer to that port
public boolean isLeaf()
public boolean matchesWithin(java.util.Collection netList)
netList - The collection of EdifNets to check if this
EdifNet has a match within
public boolean matchesWithin(java.util.Map netList)
netList - The Map of EdifNets to check if this
EdifNet has a match within
void modifySinglePortsToBus(java.util.Collection oldPorts,
EdifPort newPort)
oldPorts - A Collection of EdifPort Objects to match up
with those in this ObjectnewPort - The EdifPort Object to have the old EdifPortRef
Objects point to
void modifyBusToSinglePorts(EdifPort oldPort,
java.util.Collection newPorts)
oldPort - The old EdifPort Object to match up with
EdifPortRefs in this ObjectnewPorts - The Collection of EdifPort Objects to have the
old EdifPortRef Objects point to
void modifyCellTypeInNets(EdifCell oldType,
EdifCell newType)
This method assumes that the EdifCellInstances refer to the old type and have not yet been modified.
oldType - The old Cell whose information needs to be
updated to the information in the new cellnewType - The new cell that contains the information that
the old cell needs to be updated toEdifCell.modifyCellType(byucc.edif.EdifCell, byucc.edif.EdifCell, boolean)public boolean samePorts(EdifNet net)
net - The net to compare to this net
void setParent(EdifCell cell)
cell - an EdifCell value that will become the
new parent cell of this EdifNetpublic void toEdif(EdifPrintWriter epw)
toEdif in interface EdifOutepw - The EdifPrintWriter Object that the EDIF data will
be written topublic java.lang.String toString()
String value representing this Object
and its EdifPortRefspublic void trimToSize()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||