|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectbyucc.edif.NamedPropertyObject
byucc.edif.EdifNet
public class 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 |
| 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 | |
|---|---|
EdifPortRef |
addPortConnection(EdifCellInstance eci,
EdifPort p)
|
EdifPortRef |
addPortConnection(EdifCellInstance eci,
EdifPort p,
int busMember)
Add a port connection to the net. |
EdifPortRef |
addPortConnection(EdifCellInstance eci,
java.lang.String portName)
Add a port connection to the given port on the given instance onto this net. |
EdifPortRef |
addPortConnection(EdifCellInstance eci,
java.lang.String portName,
int busMember)
Add a port connection to the net. |
EdifPortRef |
addPortConnection(EdifPortRef portref)
Add a pre-defined EdifPortRef port connection to the net. |
EdifPortRef |
addTopLevelPortConnection(EdifPort port)
TODO Remove this method. |
EdifPortRef |
addTopLevelPortConnection(java.lang.String portName)
TODO: We should remove this method. |
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. |
EdifPortRef |
getEdifPortRef(EdifCellInstance inst,
EdifSingleBitPort singlePort)
Returns the EdifPortRef object attached to the given instance and single bit port. |
java.util.Collection |
getInOutPortRefs()
This method will return all EdifPortRef in this EdifNet object that are outputs. |
java.util.Collection |
getInOutPorts()
Provides a Colletion of EdifPortRef objects that are attached to this EdifNet and connected to tri-state ports (inout). |
java.util.Collection |
getInputPortRefs()
This method will return all EdifPortRef in this EdifNet object that are connected to ports of type "input". |
java.util.Collection |
getNetDriven()
Deprecated. Use getSinkPortRefs(boolean) in place of this method. |
java.util.Collection |
getNetDrivers()
Deprecated. Use getSourcePortRefs(boolean) in place of this method. |
java.util.Collection |
getOutputPortRefs()
This method will return all EdifPortRef in this EdifNet object that are connected to ports of type "output". |
java.util.Collection |
getOutputPorts()
Provides a Colletion of EdifPortRef objects that are attached to this EdifNet and connected to true 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. |
java.util.Collection |
getSinkPortRefs(boolean tristate,
boolean includeTopPorts)
This method will return all EdifPortRef objects in this EdifNet object that are "sinks". |
java.util.Collection |
getSourcePortRefs(boolean tristate,
boolean includeTopPorts)
This method will return all EdifPortRef objects in this EdifNet object that are "sources". |
boolean |
hasTopLevelPortConnection()
This method will determine whether or not the given net connects to a top-level port. |
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 |
isAttached(EdifCellInstance cell,
EdifSingleBitPort singlePort)
Determines if this EdifNet object is connected to the given instance and single-bit port. |
boolean |
isLeaf()
Returns True if this net's port refs only refer to ports of leaf cells. |
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, copyProperties, equals, equalsProperties, getEdifNameable, getName, getOldName, 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 EdifPortRef addPortConnection(EdifPortRef portref)
portref - The EdifPortRef to connect to the net.
public EdifPortRef 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
TODO: We should remove this method. We shoudl force the caller
to find the Port rather than doing this here. There is too
much opportunity for run-time errors with this method.
This is only referenced in halflatch and TMR -B
public EdifPortRef addPortConnection(EdifCellInstance eci,
EdifPort p)
eci - p - TODO Remove this method and force the caller to create a new EdifPortRef() and then add that
using addPortConnection(EdifPortRef epr) -Bpublic EdifPortRef addTopLevelPortConnection(java.lang.String portName)
public EdifPortRef addTopLevelPortConnection(EdifPort port)
port -
public EdifPortRef 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
TOTO Remove this method. What happens if the string parameter for the port name fails
to match in the method getPort?
it is never used -B
public EdifPortRef addPortConnection(EdifCellInstance eci,
EdifPort p,
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
TODO Remove this method. Force the caller to create the EdifPortRef first and use the method
addPortConnection(EdifPortRef epr)public 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 getInOutPortRefs()
public java.util.Collection getSourcePortRefs(boolean tristate,
boolean includeTopPorts)
tristate - Indicates whether tristate ports
should be included or not (true indicates that tri-state
ports should be considered as "sources" and thus include
corresponding port refs in the collection. False indicates
that tri-state ports should not be considered as sources and thus
ignore port refs to these connections).includeTopPorts - Indicates whether connections to top-level
ports should be included (true indicates that port refs to top-level
ports should be included, false indicates that these port refs should
be ignored).
EdifPort.isOutput(boolean).
public java.util.Collection getSinkPortRefs(boolean tristate,
boolean includeTopPorts)
tristate - Indicates whether tristate ports
should be ignored or not (true indicates that tri-state
ports should not be ignored). @see EdifPort#isOutput(boolean).
public java.util.Collection getInputPortRefs()
getSinkPortRefs().public java.util.Collection getOutputPorts()
public java.util.Collection getInOutPorts()
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 isAttached(EdifCellInstance cell,
EdifSingleBitPort singlePort)
cell - Instance object to search forsinglePort - The single-bit port to search forgetEdifPortRef
public EdifPortRef getEdifPortRef(EdifCellInstance inst,
EdifSingleBitPort singlePort)
inst - The EdifCellInstance reference attached to this EdifNetsinglePort - The single-bit port within the instance type attached to the net.
public boolean hasTopLevelPortConnection()
public boolean isLeaf()
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()
toString in class java.lang.ObjectString 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 | ||||||||