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

java.lang.Object
  extended by edu.byu.ece.edif.tools.replicate.nmr.ReplicationDescription
All Implemented Interfaces:
java.io.Serializable

public class ReplicationDescription
extends java.lang.Object
implements java.io.Serializable

A ReplicationDescription persists across multiple executable runs (it gets serialized) and contains information about what types of replication to perform, where to insert voters, where to insert detectors, what do to with detection error signal outputs, a feedback cutset, etc.

See Also:
Serialized Form

Field Summary
protected  boolean _alreadySetPortGroups
           
protected  java.util.Collection<EdifPortRef> _cutsetReference
          This cutset is included for reference only.
protected  java.util.Set<DetectionDomain> _detectionDomains
           
protected  java.util.Map<java.util.List<SinglePortConnection>,DetectionOutputSpecification> _detectionOutputSpecifications0
           
protected  java.util.Map<java.lang.String,DetectionOutputSpecification> _detectionOutputSpecifications1
           
protected  java.util.Set<EdifCellInstance> _instancesToIgnore
           
protected  java.util.Map<EdifCellInstance,ReplicationType> _instancesToReplicate
           
protected  java.util.Set<EdifNet> _netsToIgnore
           
protected  java.util.Map<EdifNet,java.util.Set<OrganSpecification>> _organsToInsert
           
protected  java.util.Map<EdifPort,PreMitigatedPortGroup> _portGroups
           
protected  java.util.Map<EdifNet,java.util.Set<EdifPortRef>> _portRefsToIgnore
           
protected  java.util.Map<EdifPort,ReplicationType> _portsToReplicate
           
protected  java.util.Map<EdifPortRef,WiringPolicy> _wiringPolicies
           
 
Constructor Summary
ReplicationDescription()
          Create an empty ReplicationDescription.
 
Method Summary
 void addDetectionOrganSpecification(DetectionDomain detectionDomain, EdifNet net, OrganSpecification organSpecification)
          Add a detection organ specification.
 void addDetectionOrganSpecifications(DetectionDomain detectionDomain, EdifNet net, java.util.List<OrganSpecification> organSpecifications)
           
 void addInstance(EdifCellInstance instance, ReplicationType replicationType)
          Mark the given EdifCellInstance with the specified ReplicationType.
 void addInstances(java.util.Collection<EdifCellInstance> instances, ReplicationType replicationType)
          Mark the given EdifCellInstances with the specified ReplicationType.
 void addOrganSpecification(EdifNet net, OrganSpecification organSpec)
          Associate an OrganSpecification with the given EdifNet.
 void addOrganSpecifications(EdifNet net, java.util.Collection<OrganSpecification> organSpecs)
           
 void addPort(EdifPort port, ReplicationType replicationType)
          Mark the given EdifPort with the specified ReplicationType.
 void addPorts(java.util.Collection<EdifPort> ports, ReplicationType replicationType)
          Mark the given EdifPorts with the specified ReplicationType.
 void addWiringPolicy(EdifPortRef portRef, WiringPolicy wiringPolicy)
          Associate the given WiringPolicy with the given EdifPortRef.
 boolean alreadySetPortGroups()
           
 void associateDetectionOutputWithDomain(DetectionType detectionType, java.util.List<SinglePortConnection> outputConnection, DetectionDomain domain, DetectionOutputMerger merger, boolean insertOreg, boolean insertObuf, java.lang.String clockNetName)
           
 void associateDetectionOutputWithDomain(DetectionType detectionType, java.lang.String portNameToCreate, DetectionDomain domain, DetectionOutputMerger merger, boolean insertOreg, boolean insertObuf, java.lang.String clockNetName)
           
 void associateDetectionOutputWithDomains(DetectionType detectionType, java.util.List<SinglePortConnection> outputConnection, java.util.List<DetectionDomain> domains, DetectionOutputMerger merger, boolean insertOreg, boolean insertObuf, java.lang.String clockNetName)
           
 void associateDetectionOutputWithDomains(DetectionType detectionType, java.lang.String portNameToCreate, java.util.List<DetectionDomain> domains, DetectionOutputMerger merger, boolean insertOreg, boolean insertObuf, java.lang.String clockNetName)
           
 java.util.Collection<EdifPortRef> getCutsetReference()
           
 java.util.Collection<DetectionOutputSpecification> getDetectionOutputSpecifications()
           
 java.util.Map<EdifCellInstance,ReplicationType> getInstanceReplicationMap()
           
 java.util.Map<EdifNet,java.util.Set<OrganSpecification>> getOrganSpecifications()
           
 java.util.Set<OrganSpecification> getOrganSpecifications(EdifNet net)
          Get the OrganSpecifications associated with the given EdifNet.
 PreMitigatedPortGroup getPortGroup(EdifPort port)
           
 java.util.Collection<EdifPortRef> getPortRefsToIgnore(EdifNet net)
           
 java.util.Map<EdifPort,ReplicationType> getPortReplicationMap()
           
 ReplicationType getReplicationType(EdifCellInstance instance)
          Get the ReplicationType associated with the given EdifCellInstance.
 ReplicationType getReplicationType(EdifPort port)
          Get the ReplicationType associated with the given EdifPort.
 ReplicationType getReplicationType(EdifPortRef epr)
          Get the ReplicationType associated with the given source/sink connection.
 WiringPolicy getWiringPolicy(EdifPortRef portRef)
          Get the WiringPolicy associated with the given EdifPortRef.
 boolean isPreMitigatedPort(EdifPort port)
           
 void markInstancesToIgnore(java.util.Collection<EdifCellInstance> instances)
           
 void markNetsToIgnore(java.util.Collection<EdifNet> nets)
           
 void markPortRefsToIgnore(java.util.Map<EdifNet,java.util.Set<EdifPortRef>> portRefs)
           
 void setCutsetReference(java.util.Collection<EdifPortRef> cutset)
           
 void setInstanceReplicationMap(java.util.Map<EdifCellInstance,ReplicationType> instancesToReplicate)
           
 void setPortGroups(java.util.Collection<PreMitigatedPortGroup> portGroups)
           
 boolean shouldIgnoreInstance(EdifCellInstance eci)
           
 boolean shouldIgnoreNet(EdifNet net)
           
 boolean shouldIgnorePortRef(EdifNet net, EdifPortRef epr)
           
 boolean shouldIgnorePortRefsInNet(EdifNet net)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_instancesToReplicate

protected java.util.Map<EdifCellInstance,ReplicationType> _instancesToReplicate

_portsToReplicate

protected java.util.Map<EdifPort,ReplicationType> _portsToReplicate

_organsToInsert

protected java.util.Map<EdifNet,java.util.Set<OrganSpecification>> _organsToInsert

_wiringPolicies

protected java.util.Map<EdifPortRef,WiringPolicy> _wiringPolicies

_detectionDomains

protected java.util.Set<DetectionDomain> _detectionDomains

_detectionOutputSpecifications0

protected java.util.Map<java.util.List<SinglePortConnection>,DetectionOutputSpecification> _detectionOutputSpecifications0

_detectionOutputSpecifications1

protected java.util.Map<java.lang.String,DetectionOutputSpecification> _detectionOutputSpecifications1

_alreadySetPortGroups

protected boolean _alreadySetPortGroups

_portGroups

protected java.util.Map<EdifPort,PreMitigatedPortGroup> _portGroups

_instancesToIgnore

protected java.util.Set<EdifCellInstance> _instancesToIgnore

_netsToIgnore

protected java.util.Set<EdifNet> _netsToIgnore

_portRefsToIgnore

protected java.util.Map<EdifNet,java.util.Set<EdifPortRef>> _portRefsToIgnore

_cutsetReference

protected java.util.Collection<EdifPortRef> _cutsetReference
This cutset is included for reference only. (Useful for persistence detection in JEdifDetectionSelection and also for JEdifMoreFrequentVoting). This list is NOT used to create voters directly. It is used (before even becoming part of the ReplicationDescription) to create OrganSpecifications which are added to the ReplicationDescription and then used to create voters.

Constructor Detail

ReplicationDescription

public ReplicationDescription()
Create an empty ReplicationDescription.

Method Detail

addInstance

public void addInstance(EdifCellInstance instance,
                        ReplicationType replicationType)
Mark the given EdifCellInstance with the specified ReplicationType. Previous assignments will be overridden.

Parameters:
instance -
replicationType -

addInstances

public void addInstances(java.util.Collection<EdifCellInstance> instances,
                         ReplicationType replicationType)
Mark the given EdifCellInstances with the specified ReplicationType. Previous assignments will be overridden.

Parameters:
instances -
replicationType -

addOrganSpecification

public void addOrganSpecification(EdifNet net,
                                  OrganSpecification organSpec)
Associate an OrganSpecification with the given EdifNet. Multiple OrganSpecifications may be associated with each net.

Parameters:
net -
organSpec -

addOrganSpecifications

public void addOrganSpecifications(EdifNet net,
                                   java.util.Collection<OrganSpecification> organSpecs)

addPort

public void addPort(EdifPort port,
                    ReplicationType replicationType)
Mark the given EdifPort with the specified ReplicationType. Previous assignments will be overridden.

Parameters:
port -
replicationType -

addPorts

public void addPorts(java.util.Collection<EdifPort> ports,
                     ReplicationType replicationType)
Mark the given EdifPorts with the specified ReplicationType. Previous assignments will be overridden.

Parameters:
ports -
replicationType -

addWiringPolicy

public void addWiringPolicy(EdifPortRef portRef,
                            WiringPolicy wiringPolicy)
Associate the given WiringPolicy with the given EdifPortRef.

Parameters:
portRef -
wiringPolicy -

getInstanceReplicationMap

public java.util.Map<EdifCellInstance,ReplicationType> getInstanceReplicationMap()

setInstanceReplicationMap

public void setInstanceReplicationMap(java.util.Map<EdifCellInstance,ReplicationType> instancesToReplicate)

getOrganSpecifications

public java.util.Set<OrganSpecification> getOrganSpecifications(EdifNet net)
Get the OrganSpecifications associated with the given EdifNet. Return null if there are no OrganSpecifications associated with the net.

Parameters:
net -
Returns:

getOrganSpecifications

public java.util.Map<EdifNet,java.util.Set<OrganSpecification>> getOrganSpecifications()

getReplicationType

public ReplicationType getReplicationType(EdifPort port)
Get the ReplicationType associated with the given EdifPort. Return null if there is no ReplicationType associated with the EdifPort.

Parameters:
port -
Returns:

getPortReplicationMap

public java.util.Map<EdifPort,ReplicationType> getPortReplicationMap()

getReplicationType

public ReplicationType getReplicationType(EdifCellInstance instance)
Get the ReplicationType associated with the given EdifCellInstance. Return null if there is no ReplicationType associated with the EdifPort.

Parameters:
instance -
Returns:

getReplicationType

public ReplicationType getReplicationType(EdifPortRef epr)
Get the ReplicationType associated with the given source/sink connection. This method should never return null

Parameters:
epr -
Returns:

getWiringPolicy

public WiringPolicy getWiringPolicy(EdifPortRef portRef)
Get the WiringPolicy associated with the given EdifPortRef. Return null if there is no WiringPolicy associated with the EdifPortRef.

Parameters:
portRef -
Returns:

addDetectionOrganSpecification

public void addDetectionOrganSpecification(DetectionDomain detectionDomain,
                                           EdifNet net,
                                           OrganSpecification organSpecification)
Add a detection organ specification. This has two effects. The first is to put the organ specification into the Net->OrganSpecifications map. The second is to associate the organ specification with the given detection domain in the list of detection domains.

Parameters:
detectionDomain -
net -
organSpecification -

addDetectionOrganSpecifications

public void addDetectionOrganSpecifications(DetectionDomain detectionDomain,
                                            EdifNet net,
                                            java.util.List<OrganSpecification> organSpecifications)

associateDetectionOutputWithDomain

public void associateDetectionOutputWithDomain(DetectionType detectionType,
                                               java.util.List<SinglePortConnection> outputConnection,
                                               DetectionDomain domain,
                                               DetectionOutputMerger merger,
                                               boolean insertOreg,
                                               boolean insertObuf,
                                               java.lang.String clockNetName)

associateDetectionOutputWithDomain

public void associateDetectionOutputWithDomain(DetectionType detectionType,
                                               java.lang.String portNameToCreate,
                                               DetectionDomain domain,
                                               DetectionOutputMerger merger,
                                               boolean insertOreg,
                                               boolean insertObuf,
                                               java.lang.String clockNetName)

associateDetectionOutputWithDomains

public void associateDetectionOutputWithDomains(DetectionType detectionType,
                                                java.util.List<SinglePortConnection> outputConnection,
                                                java.util.List<DetectionDomain> domains,
                                                DetectionOutputMerger merger,
                                                boolean insertOreg,
                                                boolean insertObuf,
                                                java.lang.String clockNetName)

associateDetectionOutputWithDomains

public void associateDetectionOutputWithDomains(DetectionType detectionType,
                                                java.lang.String portNameToCreate,
                                                java.util.List<DetectionDomain> domains,
                                                DetectionOutputMerger merger,
                                                boolean insertOreg,
                                                boolean insertObuf,
                                                java.lang.String clockNetName)

getDetectionOutputSpecifications

public java.util.Collection<DetectionOutputSpecification> getDetectionOutputSpecifications()

setPortGroups

public void setPortGroups(java.util.Collection<PreMitigatedPortGroup> portGroups)

getPortGroup

public PreMitigatedPortGroup getPortGroup(EdifPort port)

isPreMitigatedPort

public boolean isPreMitigatedPort(EdifPort port)

alreadySetPortGroups

public boolean alreadySetPortGroups()

markInstancesToIgnore

public void markInstancesToIgnore(java.util.Collection<EdifCellInstance> instances)

markNetsToIgnore

public void markNetsToIgnore(java.util.Collection<EdifNet> nets)

markPortRefsToIgnore

public void markPortRefsToIgnore(java.util.Map<EdifNet,java.util.Set<EdifPortRef>> portRefs)

shouldIgnoreInstance

public boolean shouldIgnoreInstance(EdifCellInstance eci)

shouldIgnoreNet

public boolean shouldIgnoreNet(EdifNet net)

shouldIgnorePortRefsInNet

public boolean shouldIgnorePortRefsInNet(EdifNet net)

getPortRefsToIgnore

public java.util.Collection<EdifPortRef> getPortRefsToIgnore(EdifNet net)

shouldIgnorePortRef

public boolean shouldIgnorePortRef(EdifNet net,
                                   EdifPortRef epr)

setCutsetReference

public void setCutsetReference(java.util.Collection<EdifPortRef> cutset)

getCutsetReference

public java.util.Collection<EdifPortRef> getCutsetReference()