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

java.lang.Object
  extended by edu.byu.ece.edif.tools.sterilize.lutreplace.EdifEnvironmentCopy
      extended by edu.byu.ece.edif.tools.sterilize.lutreplace.AbstractEdifEnvironmentCopyReplace
          extended by edu.byu.ece.edif.tools.sterilize.lutreplace.BasicEdifEnvironmentCopyReplace

public class BasicEdifEnvironmentCopyReplace
extends AbstractEdifEnvironmentCopyReplace

Provides a mechanism to copy an EdifEnvironment and replace instances in the environment with different instances. This class overrides several of the parent class methods to operate differently during the copy process. This class does not actually do the replacement. Instead, it builds a copy and saves all the information necessary for adding replacement circuitry at a later time by a different class.


Field Summary
protected  java.util.ArrayList<EdifCell> _cellTypesToReplace
           
protected  java.util.ArrayList<EdifCell> _oldCellsNOTToReplace
           
protected  java.util.ArrayList<EdifCell> _oldCellsToReplace
           
 
Fields inherited from class edu.byu.ece.edif.tools.sterilize.lutreplace.AbstractEdifEnvironmentCopyReplace
_oldInstancesToReplace
 
Fields inherited from class edu.byu.ece.edif.tools.sterilize.lutreplace.EdifEnvironmentCopy
_cellMap, _instanceMap, _libMap, _netMap, _newEnv, _origEnv, _portMap
 
Constructor Summary
BasicEdifEnvironmentCopyReplace(EdifEnvironment env, java.util.ArrayList<EdifCell> replacements)
          Perform the copy.
 
Method Summary
protected  void addChildEdifCellInstance(EdifCell origCell, EdifCell newCell, EdifCellInstance oldChildInstance)
          Overrides the parent addChildEdifCellInstance method.
protected  EdifCell matchingReplacementCell(EdifCellInstance oldChildInstance)
           
 
Methods inherited from class edu.byu.ece.edif.tools.sterilize.lutreplace.AbstractEdifEnvironmentCopyReplace
addEdifPortRef, attachesToReplacedCell, getReplacementContexts
 
Methods inherited from class edu.byu.ece.edif.tools.sterilize.lutreplace.EdifEnvironmentCopy
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

_oldCellsToReplace

protected java.util.ArrayList<EdifCell> _oldCellsToReplace

_oldCellsNOTToReplace

protected java.util.ArrayList<EdifCell> _oldCellsNOTToReplace

_cellTypesToReplace

protected java.util.ArrayList<EdifCell> _cellTypesToReplace
Constructor Detail

BasicEdifEnvironmentCopyReplace

public BasicEdifEnvironmentCopyReplace(EdifEnvironment env,
                                       java.util.ArrayList<EdifCell> replacements)
                                throws EdifNameConflictException
Perform the copy. Note that several of the methods in this class will be called by the parent methods.

Parameters:
env -
replacements - A list of EdifCell objects that should be replaced.
Throws:
EdifNameConflictException
Method Detail

addChildEdifCellInstance

protected void addChildEdifCellInstance(EdifCell origCell,
                                        EdifCell newCell,
                                        EdifCellInstance oldChildInstance)
                                 throws EdifNameConflictException
Overrides the parent addChildEdifCellInstance method. This method will check to see if the instance is of a type that needs to be replaced. If so, it will not add the instance and create a ReplacementContext for this instance. If it doesn't match, the instance will be added as usual.

Overrides:
addChildEdifCellInstance in class EdifEnvironmentCopy
Throws:
EdifNameConflictException

matchingReplacementCell

protected EdifCell matchingReplacementCell(EdifCellInstance oldChildInstance)