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

java.lang.Object
  extended by edu.byu.ece.edif.tools.flatten.NetConnections

public class NetConnections
extends java.lang.Object

Manages net connectivity during cell flattening. Keeps track of which nets connect to nets on a higher level and also of which nets need to be joined. This class operates on PseudoNets rather than real nets.


Field Summary
(package private)  java.util.Map<InstanceNode,java.util.Map<EdifSingleBitPort,PseudoNet>> _connections
          This map holds all of the net connectivity information for determining which nets match nets on a higher level of hierarchy
(package private)  java.util.List<java.util.Collection<PseudoNet>> _joinedNetLists
          A List of Collections of PseudoNets representing groups of PseudoNets that need to be joined
 
Constructor Summary
NetConnections()
           
 
Method Summary
 void addConnection(PseudoNet newNet, InstanceNode instanceNode, EdifSingleBitPort esbp)
          Add a connection from the given PseudoNet to the given InstanceNode on the given EdifSingleBitPort.
 java.util.Collection<PseudoNet> getJoinedNetList(PseudoNet net)
          Find out if the given PseudoNet is part of a group of nets that should be joined and return that group if it is.
 void markToJoin(java.util.Collection<PseudoNet> joinedNets)
          Mark the given PseudoNets as needing to be joined.
 PseudoNet query(InstanceNode instanceNode, EdifSingleBitPort esbp)
          Given an InstanceNode and an EdifSingleBitPort, find the PseudoNet in the next higher level of hierarchy that connects to the instance on the given port.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_connections

java.util.Map<InstanceNode,java.util.Map<EdifSingleBitPort,PseudoNet>> _connections
This map holds all of the net connectivity information for determining which nets match nets on a higher level of hierarchy


_joinedNetLists

java.util.List<java.util.Collection<PseudoNet>> _joinedNetLists
A List of Collections of PseudoNets representing groups of PseudoNets that need to be joined

Constructor Detail

NetConnections

public NetConnections()
Method Detail

addConnection

public void addConnection(PseudoNet newNet,
                          InstanceNode instanceNode,
                          EdifSingleBitPort esbp)
Add a connection from the given PseudoNet to the given InstanceNode on the given EdifSingleBitPort. This will create an entry in a map specific to the InstanceNode that will be used in the next lower level of hierarchy to know which net to connect to.


getJoinedNetList

public java.util.Collection<PseudoNet> getJoinedNetList(PseudoNet net)
Find out if the given PseudoNet is part of a group of nets that should be joined and return that group if it is.

Parameters:
net - the PseudoNet to check for joining
Returns:
a Collection representing the group of PseudoNets to be joined that the given net belongs to or null if it is not part of any list of nets to be joined

markToJoin

public void markToJoin(java.util.Collection<PseudoNet> joinedNets)
Mark the given PseudoNets as needing to be joined. This method does not actually join the nets. Nets may be marked sequentially (i.e. marking nets A and B and then marking nets B and C will cause nets A, B, and C to all be marked together).

Parameters:
joinedNets - a Collection of PseudoNets which should marked as needing to be joined

query

public PseudoNet query(InstanceNode instanceNode,
                       EdifSingleBitPort esbp)
Given an InstanceNode and an EdifSingleBitPort, find the PseudoNet in the next higher level of hierarchy that connects to the instance on the given port. The query is made to a map specific to the InstanceNode.

Parameters:
instanceNode - the InstanceNode to lookup
esbp - the EdifSingleBitPort by which the instance is connected to the next higher level
Returns:
the PseudoNet from the next higher level of hierarchy that connects to the instance on the given port or null if none is found