edu.byu.ece.edif.tools.flatten
Class PseudoNet

java.lang.Object
  extended by edu.byu.ece.edif.core.NamedPropertyObject
      extended by edu.byu.ece.edif.tools.flatten.PseudoNet
All Implemented Interfaces:
Properties, java.io.Serializable

public class PseudoNet
extends NamedPropertyObject

Represents a net in the process of being created during the cell flattening process. Contains information about the net's very top level ports as well as any other connections. This class' usefulness comes from that fact that many of these nets may need to be joined in the flattening process. It is cleaner and easier to join multiple PseudoNets into one EdifNet than to join multiple EdifNets after they have already been created.

See Also:
Serialized Form

Nested Class Summary
private  class PseudoNet.Connection
          Represents a non top level connection on a PseudoNet.
 
Field Summary
private  java.util.Set<PseudoNet.Connection> _connections
          Represents the rest of the net's connections
private  java.util.Set<HierarchicalNet> _hierarchicalNets
           
private  java.util.Set<EdifNet> _originalNets
          A List of every original net that corresponds to this new one
private  EdifCell _parent
          A reference to the net's parent cell
private  java.util.Set<EdifSingleBitPort> _topLevelConnections
          Represents the net's very top level connections
 
Constructor Summary
PseudoNet(EdifCell parent, EdifNet originalNet)
          Construct a new PseudoNet with the given parent and name.
 
Method Summary
 void addConnection(EdifCellInstance instance, EdifSingleBitPort esbp)
          Add a connection to the PseudoNet.
 void addHierarchicalNet(HierarchicalNet hierarchicalNet)
           
 void addOriginalNet(EdifNet originalNet)
          Register an EdifNet as one of the original nets that corresponds to this new one
 void addTopLevelConnection(EdifSingleBitPort esbp)
          Add a top level connection to the PseudoNet.
 java.util.Set<HierarchicalNet> getHierarchicalNets()
           
 java.util.Collection<EdifNet> getOriginalNets()
           
 java.util.Collection<EdifPortRef> getPortRefs(EdifNet net)
          Create EdifPortRefs which represent this PseudoNets's connection information as applied to the given EdifNet.
 void insertPortRefs(EdifNet net)
          Apply this PseudoNet's connectivity to the given EdifNet
 java.lang.String toString()
           
 
Methods inherited from class edu.byu.ece.edif.core.NamedPropertyObject
addProperty, addProperty, addPropertyList, copyProperties, equals, equalsProperties, getEdifNameable, getName, getOldName, getProperty, getPropertyList
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_connections

private java.util.Set<PseudoNet.Connection> _connections
Represents the rest of the net's connections


_originalNets

private java.util.Set<EdifNet> _originalNets
A List of every original net that corresponds to this new one


_parent

private EdifCell _parent
A reference to the net's parent cell


_topLevelConnections

private java.util.Set<EdifSingleBitPort> _topLevelConnections
Represents the net's very top level connections


_hierarchicalNets

private java.util.Set<HierarchicalNet> _hierarchicalNets
Constructor Detail

PseudoNet

public PseudoNet(EdifCell parent,
                 EdifNet originalNet)
Construct a new PseudoNet with the given parent and name.

Parameters:
parent - the EdifCell to which this PseudoNet belongs
name - an EdifNameable representing the net's name
Method Detail

addConnection

public void addConnection(EdifCellInstance instance,
                          EdifSingleBitPort esbp)
Add a connection to the PseudoNet.

Parameters:
instance - the EdifCellInstance to which the net should connect
esbp - the EdifSingleBitPort the instance to which the net should connect

addOriginalNet

public void addOriginalNet(EdifNet originalNet)
Register an EdifNet as one of the original nets that corresponds to this new one

Parameters:
originalNet - the original EdifNet to register

addHierarchicalNet

public void addHierarchicalNet(HierarchicalNet hierarchicalNet)

getHierarchicalNets

public java.util.Set<HierarchicalNet> getHierarchicalNets()

addTopLevelConnection

public void addTopLevelConnection(EdifSingleBitPort esbp)
Add a top level connection to the PseudoNet. This refers to a top level port of the top level cell in the design.

Parameters:
esbp - the EdifSingleBitPort on the top cell to connect to

getOriginalNets

public java.util.Collection<EdifNet> getOriginalNets()
Returns:
a Collection of all original EdifNets that correspond to this new PseudoNet

getPortRefs

public java.util.Collection<EdifPortRef> getPortRefs(EdifNet net)
Create EdifPortRefs which represent this PseudoNets's connection information as applied to the given EdifNet. This is used to create a new EdifNet with this PseudoNet's connectivity.

Parameters:
net - the EdifNet to use as a reference in creating the EdifPortRefs
Returns:
a Collection of EdifPortRefs representing connectivity as applied to the given EdifNet

insertPortRefs

public void insertPortRefs(EdifNet net)
Apply this PseudoNet's connectivity to the given EdifNet

Parameters:
net - the EdifNet to which this PseudoNet's connectivity should be applied

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object