edu.byu.ece.edif.tools.sterilize.lutreplace
Class AbstractEdifEnvironmentCopyReplace

java.lang.Object
  extended by edu.byu.ece.edif.tools.sterilize.lutreplace.EdifEnvironmentCopy
      extended by edu.byu.ece.edif.tools.sterilize.lutreplace.AbstractEdifEnvironmentCopyReplace
Direct Known Subclasses:
BasicEdifEnvironmentCopyReplace, HalfLatchCopyReplace

public abstract class AbstractEdifEnvironmentCopyReplace
extends EdifEnvironmentCopy

This is the base class for doing a copy/replace operation on an EdifEnvironment (copying the EdifEnvironment but replacing certain instances of it with others along the way). Subclasses should override the addChildEdifCellInstance method in order to specify which instances should be replaced. Instances to be replaced should have a SimpleReplacementContext created for them and be added into the _oldInstancesToReplace map (see the BasicEdifEnvironmentCopyReplace class for an example).


Field Summary
protected  java.util.HashMap<EdifCellInstance,ReplacementContext> _oldInstancesToReplace
           
 
Fields inherited from class edu.byu.ece.edif.tools.sterilize.lutreplace.EdifEnvironmentCopy
_cellMap, _instanceMap, _libMap, _netMap, _newEnv, _origEnv, _portMap
 
Constructor Summary
protected AbstractEdifEnvironmentCopyReplace(EdifEnvironment env)
           
 
Method Summary
protected  void addEdifPortRef(EdifNet newNet, EdifPortRef oldRef)
          This method overloads the default parent addEdifPortRef.
protected  ReplacementContext attachesToReplacedCell(EdifPortRef oldRef)
          This method will check an old EdifPortRef and see if it connects to an instance that is being replaced.
 java.util.Collection<ReplacementContext> getReplacementContexts()
           
 
Methods inherited from class edu.byu.ece.edif.tools.sterilize.lutreplace.EdifEnvironmentCopy
addChildEdifCellInstance, addChildEdifCellInstances, addEdifPorts, addNet, addNets, copyEdifCell, copyEdifCell, copyEdifCell, copyEdifLibrary, copyEdifLibrary, createEdifEnvironment, createEdifEnvironment, createTopCell, createTopDesign, getNewEnvironment, setEdifEnvironmentDateAuthorProgramVersion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_oldInstancesToReplace

protected java.util.HashMap<EdifCellInstance,ReplacementContext> _oldInstancesToReplace
Constructor Detail

AbstractEdifEnvironmentCopyReplace

protected AbstractEdifEnvironmentCopyReplace(EdifEnvironment env)
                                      throws EdifNameConflictException
Throws:
EdifNameConflictException
Method Detail

getReplacementContexts

public java.util.Collection<ReplacementContext> getReplacementContexts()

addEdifPortRef

protected void addEdifPortRef(EdifNet newNet,
                              EdifPortRef oldRef)
This method overloads the default parent addEdifPortRef. This method will examine the EdifPortRef and add it to the net if it attaches to a top-level port or an instance that is not being replaced. If it is attached to an instance that is being replaced, it will add the information to the ReplacementContext so that the replacement can be hooked up at a later time.

Overrides:
addEdifPortRef in class EdifEnvironmentCopy

attachesToReplacedCell

protected ReplacementContext attachesToReplacedCell(EdifPortRef oldRef)
This method will check an old EdifPortRef and see if it connects to an instance that is being replaced. If it is, it returns the ReplacementContext associated with this instance. If it does not, it returns null.

Parameters:
oldRef -
Returns: