edu.byu.ece.edif.tools.replicate.nmr.tmr
Class TMRReplicationType

java.lang.Object
  extended by edu.byu.ece.edif.tools.replicate.nmr.AbstractReplicationType
      extended by edu.byu.ece.edif.tools.replicate.nmr.tmr.TMRReplicationType
All Implemented Interfaces:
ReplicationType, java.io.Serializable

public class TMRReplicationType
extends AbstractReplicationType

The TMRReplicationType class is used to perform triplication. It also handles signal restoration (voter) issues.

See Also:
Serialized Form

Field Summary
protected static java.util.Map<Organ,TMRReplicationType> _instances
           
protected  Organ _tmrVoterType
           
protected  boolean _useVoterForDownscale
           
protected  boolean _useVoterForUpscale
           
protected  boolean _useVoterOutputsForNonCutSinks
           
protected static java.lang.String[] TMR_SUFFIXES
           
 
Fields inherited from class edu.byu.ece.edif.tools.replicate.nmr.AbstractReplicationType
_replicationFactor, _replicationName
 
Constructor Summary
protected TMRReplicationType(Organ tmrVoterType)
           
 
Method Summary
 java.util.List<OrganSpecification> antiRestore(EdifNet net, ReplicationDescription desc)
          This method doesn't do anything for this particular class.
 java.util.List<OrganSpecification> defaultRestore(EdifNet net, ReplicationDescription desc)
          Determine the voters that need to be inserted based on upscaling/downscaling.
 java.util.List<OrganSpecification> forceRestore(EdifNet net, java.util.List<EdifPortRef> forceRestoreRefs, java.util.Collection<OrganSpecification> prevSpecs, ReplicationDescription desc)
          Force the insertion of voter(s) at this location.
 java.util.List<OrganSpecification> forceRestore(EdifNet net, java.util.List<EdifPortRef> forceRestoreRefs, ReplicationDescription desc)
          Force the insertion of voter(s) at this location.
static TMRReplicationType getInstance(NMRArchitecture arch)
           
static TMRReplicationType getInstance(Organ tmrVoterType)
           
protected  java.lang.String getReplicationSuffix(int domain)
          Create a new String to be added to the end of a triplicated element that incorporates the NMR domain number.
private  java.lang.Object readResolve()
          This method ensures that during deserialization, the _instances map will be referred to and possibly modified so that extra instances (more than necessary) don't get created.
 void setUseVoterForDownScale(boolean useVoterForDownscale)
          Set whether to use voters for downscaling regardless of whether there is a feedback cut.
 void setUseVoterForUpscale(boolean useVoterForUpscale)
          Set whether to use voters for upscaling regardless of whether there is a feedback cut.
 void setUseVoterOutputsForNonCutSinks(boolean useVoterOutputsForNonCutSinks)
          Set whether or not to use voter outputs for non-cut sinks when there are enough voters being created anyways for other sinks.
 
Methods inherited from class edu.byu.ece.edif.tools.replicate.nmr.AbstractReplicationType
getReplicationFactor, getReplicationInstanceNameable, getReplicationNetNameable, getReplicationPortNameable, getReplicationString, replicate, replicate, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TMR_SUFFIXES

protected static java.lang.String[] TMR_SUFFIXES

_instances

protected static java.util.Map<Organ,TMRReplicationType> _instances

_useVoterOutputsForNonCutSinks

protected boolean _useVoterOutputsForNonCutSinks

_useVoterForDownscale

protected boolean _useVoterForDownscale

_useVoterForUpscale

protected boolean _useVoterForUpscale

_tmrVoterType

protected Organ _tmrVoterType
Constructor Detail

TMRReplicationType

protected TMRReplicationType(Organ tmrVoterType)
Method Detail

getInstance

public static TMRReplicationType getInstance(Organ tmrVoterType)

getInstance

public static TMRReplicationType getInstance(NMRArchitecture arch)

antiRestore

public java.util.List<OrganSpecification> antiRestore(EdifNet net,
                                                      ReplicationDescription desc)
This method doesn't do anything for this particular class. It is part of the interface in case any replication types need to know about locations where the user has specified not to converge the domains.

Parameters:
net -
desc -
Returns:

forceRestore

public java.util.List<OrganSpecification> forceRestore(EdifNet net,
                                                       java.util.List<EdifPortRef> forceRestoreRefs,
                                                       ReplicationDescription desc)
Force the insertion of voter(s) at this location. The number of voters to insert will be determined by the replication factor(s) of the sink(s). If forceRestoreRefs is null or if it contains of the the drivers, then all sinks will get voter outputs. Otherwise, only sinks contained in forceRestoreRefs will get voter outputs.

Parameters:
net -
forceRestoreRefs -
desc -
Returns:

forceRestore

public java.util.List<OrganSpecification> forceRestore(EdifNet net,
                                                       java.util.List<EdifPortRef> forceRestoreRefs,
                                                       java.util.Collection<OrganSpecification> prevSpecs,
                                                       ReplicationDescription desc)
Force the insertion of voter(s) at this location. The number of voters to insert will be determined by the replication factor(s) of the sink(s). If forceRestoreRefs is null or if it contains of the the drivers, then all sinks will get voter outputs. Otherwise, only sinks contained in forceRestoreRefs will get voter outputs.

Parameters:
net -
forceRestoreRefs -
desc -
Returns:

defaultRestore

public java.util.List<OrganSpecification> defaultRestore(EdifNet net,
                                                         ReplicationDescription desc)
Determine the voters that need to be inserted based on upscaling/downscaling.

Parameters:
net -
desc -
Returns:

getReplicationSuffix

protected java.lang.String getReplicationSuffix(int domain)
Create a new String to be added to the end of a triplicated element that incorporates the NMR domain number.

Overrides:
getReplicationSuffix in class AbstractReplicationType
Parameters:
domain - The domain number
Returns:
the String with the replication suffix and domain number.

setUseVoterOutputsForNonCutSinks

public void setUseVoterOutputsForNonCutSinks(boolean useVoterOutputsForNonCutSinks)
Set whether or not to use voter outputs for non-cut sinks when there are enough voters being created anyways for other sinks.

Parameters:
useVoterOutputsForNonCutSinks -

setUseVoterForDownScale

public void setUseVoterForDownScale(boolean useVoterForDownscale)
Set whether to use voters for downscaling regardless of whether there is a feedback cut.

Parameters:
useVoterForDownscale -

setUseVoterForUpscale

public void setUseVoterForUpscale(boolean useVoterForUpscale)
Set whether to use voters for upscaling regardless of whether there is a feedback cut.

Parameters:
useVoterForUpscale -

readResolve

private java.lang.Object readResolve()
                              throws java.io.ObjectStreamException
This method ensures that during deserialization, the _instances map will be referred to and possibly modified so that extra instances (more than necessary) don't get created.

Returns:
Throws:
java.io.ObjectStreamException