edu.byu.ece.edif.util.graph
Class EdifCellBadCutGroupings

java.lang.Object
  extended by edu.byu.ece.edif.util.graph.EdifCellInstanceGroupings
      extended by edu.byu.ece.edif.util.graph.EdifCellBadCutGroupings
All Implemented Interfaces:
java.io.Serializable

public class EdifCellBadCutGroupings
extends EdifCellInstanceGroupings

Since:
Created on Jan 9, 2006
Author:
See Also:
Serialized Form

Field Summary
(package private)  NMRArchitecture _arch
          The architecture which defines what are bad cuts to make in the specified cell _cell *
(package private)  EdifCellInstanceGraph _connectivity
          Defines the connectivity of all instances within the parent cell _cell *
 
Fields inherited from class edu.byu.ece.edif.util.graph.EdifCellInstanceGroupings
_cell, _edifCellInstanceGroups, _edifCellInstanceGroupsMap
 
Constructor Summary
EdifCellBadCutGroupings(EdifCell cell, NMRArchitecture arch, EdifCellInstanceGraph ecic)
          Creates a new instance of EdifCellBadCutGroupings.
 
Method Summary
protected  EdifCellInstanceCollection createAtomicGroup(EdifCellInstance startECI)
          Returns a Collection of EdifCellInstances that form an atomic unit, meaning there is no "bad cut" at the edge of the group.
static java.util.Collection getBadCutSinkECIs(EdifCellInstance eci, EdifCellInstanceGraph ecic, NMRArchitecture tmrArch)
          Determines the outputs on the specified EdifCellInstance which are bad to cut.
static java.util.Collection getBadCutSourceECIs(EdifCellInstance eci, EdifCellInstanceGraph ecic, NMRArchitecture tmrArch)
          Determines the inputs on the specified EdifCellInstance which are bad to cut.
protected  void groupCellByBadCuts()
          Groups the cell instances inside of the specified _cell according to their bad cuts specified by the specific architecture in _arch.
static boolean isBadCutEdge(Edge edge, NMRArchitecture nmrArch)
          Checks if the given Edge represents a connection that cannot be cut due to architectural restrictions.
static boolean isBadCutEdge(EdifCellInstanceEdge edge, NMRArchitecture nmrArch)
          Checks if the given EdifCellInstanceEdge represents a connection that cannot be cut due to architectural restrictions.
static void main(java.lang.String[] args)
           
 
Methods inherited from class edu.byu.ece.edif.util.graph.EdifCellInstanceGroupings
_init, clone, getGroup, getInstanceGroups, getNumberGroups, groupInstances, groupInstances, mergeCollections, mergeGroupIntoGroup, removeOldSingleInstanceGroups, retainGroups, updateMap
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_arch

NMRArchitecture _arch
The architecture which defines what are bad cuts to make in the specified cell _cell *


_connectivity

EdifCellInstanceGraph _connectivity
Defines the connectivity of all instances within the parent cell _cell *

Constructor Detail

EdifCellBadCutGroupings

public EdifCellBadCutGroupings(EdifCell cell,
                               NMRArchitecture arch,
                               EdifCellInstanceGraph ecic)
Creates a new instance of EdifCellBadCutGroupings. The groups are formed at object instantiation.

Parameters:
cell - The EdifCell which will have its instances formed into atomic groups which don't have bad cuts on the edges.
arch - The TMRArchitecture which specifies what a 'bad cut' is.
ecic - The EdifCellInstanceGraph. The caller must be certain that the connectivity is current for the specified EdifCell cell.
Method Detail

groupCellByBadCuts

protected void groupCellByBadCuts()
Groups the cell instances inside of the specified _cell according to their bad cuts specified by the specific architecture in _arch.


createAtomicGroup

protected EdifCellInstanceCollection createAtomicGroup(EdifCellInstance startECI)
Returns a Collection of EdifCellInstances that form an atomic unit, meaning there is no "bad cut" at the edge of the group.

TODO: Idea: Use EPRs ?? on the stack rather than instances to speed up the method.

Currently all 'bad' connections are checked twice. For example, if cell instance A has a bad cut on output O which drives input I on cell instance B, then B gets put on the stack. But then B turns right around and says that it has a bad cut on input I and tries to add A back onto the stack (the code takes care of not getting into an infinite loop, but if there was a way to avoid the second check, it could speed up the code) KSM

Parameters:
startECI - The EdifCellInstance to start with
Returns:
An atomic set of ECIs forming a "good" cut

getBadCutSourceECIs

public static java.util.Collection getBadCutSourceECIs(EdifCellInstance eci,
                                                       EdifCellInstanceGraph ecic,
                                                       NMRArchitecture tmrArch)
Determines the inputs on the specified EdifCellInstance which are bad to cut.

Parameters:
eci - The EdifCellInstance to examine for bad cut inputs.
ecic - The connectivity of the EdifCell to which the specified EdifCellInstance eci belongs.
tmrArch - The TMRArchitecture which specifies what inputs are bad to cut on the specified EdifCellInstance eci.
Returns:
A Collection of EdifCellInstance objects on the source end of a bad cut.

getBadCutSinkECIs

public static java.util.Collection getBadCutSinkECIs(EdifCellInstance eci,
                                                     EdifCellInstanceGraph ecic,
                                                     NMRArchitecture tmrArch)
Determines the outputs on the specified EdifCellInstance which are bad to cut.

Parameters:
eci - The EdifCellInstance to examine for bad cut outputs.
ecic - The connectivity of the EdifCell to which the specified EdifCellInstance eci belongs.
tmrArch - The TMRArchitecture which specifies what outputs are bad to cut on the specified EdifCellInstance eci.
Returns:
A Collection of EdifCellInstance objects on the sink end of a bad cut.

isBadCutEdge

public static boolean isBadCutEdge(EdifCellInstanceEdge edge,
                                   NMRArchitecture nmrArch)
Checks if the given EdifCellInstanceEdge represents a connection that cannot be cut due to architectural restrictions.

Parameters:
edge - The EdifCellInstanceEdge object to check
nmrArch - The NMR architecture to use as a reference
Returns:
true if the Edge should not be cut, false if okay to cut

isBadCutEdge

public static boolean isBadCutEdge(Edge edge,
                                   NMRArchitecture nmrArch)
Checks if the given Edge represents a connection that cannot be cut due to architectural restrictions. Currently supported objects are EdifCellInstanceEdge and EdifCellInstanceCollectionLink.

Parameters:
edge - The Edge object to check
nmrArch - The NMR architecture to use as a reference
Returns:
true if the Edge should not be cut, false if okay to cut

main

public static void main(java.lang.String[] args)