edu.byu.ece.edif.tools.replicate.nmr
Class AbstractOrgan

java.lang.Object
  extended by edu.byu.ece.edif.tools.replicate.nmr.AbstractOrgan
All Implemented Interfaces:
Organ, java.io.Serializable
Direct Known Subclasses:
XilinxDWCComparator, XilinxTMRComparator, XilinxTMRVoter

public abstract class AbstractOrgan
extends java.lang.Object
implements Organ

In the BYU EDIF Replication framework, there are two main types of organs: restoring organs and detection organs. Voters are an example of restoring organs. Restoring organs take a signal from some number of domains and produce and output that feeds forward in the circuit. Detecting organs take a signal from some number of domains and produce an auxiliary output that goes somewhere else in the circuit (i.e. detection merging circuitry).

See Also:
Serialized Form

Field Summary
protected  java.util.Map<OrganSpecification,java.util.List<EdifCellInstance>> _createdOrgans
           
protected  EdifCell _organCell
           
protected  java.util.Map<EdifCellInstance,PortConnection> _organOutputs
           
protected  java.lang.String _organSuffix
           
 
Constructor Summary
protected AbstractOrgan(java.lang.String organSuffix)
          Initialize the data structures needed for keeping track of created organs and their output port connections.
 
Method Summary
protected  void createOrgan(OrganSpecification os, EdifCell organCell, int numOrgans, EdifNet origNet, EdifCell newCell, java.lang.String organOutputName, Property instanceProperty)
          Create numOrgans organs of type organCell in newCell .
protected  EdifCell getOrganCell(EdifCell parent, java.lang.String primitiveName)
          Get the organ cell in the design's library (insert it into the library if needed).
 java.lang.String getOrganSuffix()
           
 java.util.List<PortConnection> getOutputs(OrganSpecification os)
          Get the organ outputs associated with the organs created for the given net (origNet).
 java.lang.String toString()
           
protected  void wireInputs(OrganSpecification os, EdifNet origNet, java.util.List<PortConnection> driverConnections, NetManager netManager, java.lang.String[] organInputNames)
          Wire the organ inputs.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.byu.ece.edif.tools.replicate.nmr.Organ
createOrgan, wireInputs
 

Field Detail

_organCell

protected EdifCell _organCell

_organSuffix

protected java.lang.String _organSuffix

_organOutputs

protected java.util.Map<EdifCellInstance,PortConnection> _organOutputs

_createdOrgans

protected java.util.Map<OrganSpecification,java.util.List<EdifCellInstance>> _createdOrgans
Constructor Detail

AbstractOrgan

protected AbstractOrgan(java.lang.String organSuffix)
Initialize the data structures needed for keeping track of created organs and their output port connections.

Method Detail

createOrgan

protected void createOrgan(OrganSpecification os,
                           EdifCell organCell,
                           int numOrgans,
                           EdifNet origNet,
                           EdifCell newCell,
                           java.lang.String organOutputName,
                           Property instanceProperty)
Create numOrgans organs of type organCell in newCell . The organs will be associated with origNet. If an organOutputName is given (not null, it the port with the given name will be inserted into the _organOutputs map. If an instanceProperty is given (not null), the property will be associated with each instance of the organ created. All of the created organs will be inserted into the _createdOrgans map.

Parameters:
organCell -
numOrgans -
origNet -
newCell -
organOutputName -
instanceProperty -

wireInputs

protected void wireInputs(OrganSpecification os,
                          EdifNet origNet,
                          java.util.List<PortConnection> driverConnections,
                          NetManager netManager,
                          java.lang.String[] organInputNames)
Wire the organ inputs. origNet is used to lookup the organ(s) associated with the net. The organ input names are given by organInputNames. The connections in driverConnections are wired to the organs using netManager.

Parameters:
origNet -
driverConnections -
netManager -
organInputNames -

getOrganCell

protected EdifCell getOrganCell(EdifCell parent,
                                java.lang.String primitiveName)
Get the organ cell in the design's library (insert it into the library if needed). The primitive cell type (i.e. LUT3 for a 3-input voter) is given by primitiveName. The cell will be inserted into the library associated with parent if not in one of the design's libraries already.

Parameters:
parent -
primitiveName -
Returns:

getOutputs

public java.util.List<PortConnection> getOutputs(OrganSpecification os)
Get the organ outputs associated with the organs created for the given net (origNet).

Specified by:
getOutputs in interface Organ

getOrganSuffix

public java.lang.String getOrganSuffix()
Specified by:
getOrganSuffix in interface Organ

toString

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