|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.byu.ece.edif.tools.replicate.nmr.AbstractDeviceUtilizationTracker
public abstract class AbstractDeviceUtilizationTracker
An abstract implementation of a device utilization tracker.
| Field Summary | |
|---|---|
protected java.util.HashMap<java.lang.String,java.lang.Double> |
_cachedCurrentUtilizationMap
|
protected java.util.HashMap<java.lang.String,java.lang.Double> |
_currentUtilizationMap
|
protected java.util.HashMap<java.lang.String,java.lang.Integer> |
_maxUtilizationMap
|
protected int |
_numInstances
|
protected int |
_origNumInstances
|
protected ResourceMapper |
_resourceMapper
|
protected double |
coverage_factor
|
| Constructor Summary | |
|---|---|
AbstractDeviceUtilizationTracker()
|
|
| Method Summary | |
|---|---|
protected void |
_init(EdifCell cell)
|
protected void |
addResourceForTracking(java.lang.String resourceType,
double currentUtilization,
int maxUtilization)
|
void |
addSingleCell(EdifCell cell)
|
void |
addSingleInstance(EdifCellInstance eci)
This function adds the instance eci to the normal cell instances list and adds the appropriate utilization to the device utilization count. |
void |
addSingleInstances(java.util.Collection<EdifCellInstance> ecis)
This function adds a collection of instances to add to the normal cell instances list. |
protected void |
cacheCurrentUtilization()
|
int |
getResourceLimit(EdifCell cell)
|
int |
getResourceLimit(EdifCellInstance eci)
|
protected int |
getResourceLimit(java.lang.String resourceType)
|
double |
getResourceUtilization(EdifCell cell)
|
double |
getResourceUtilization(EdifCellInstance eci)
|
protected double |
getResourceUtilization(java.lang.String resourceType)
|
double |
getResourceUtilizationRatio(EdifCell cell)
|
double |
getResourceUtilizationRatio(EdifCellInstance eci)
|
double |
getResourceUtilizationRatio(java.lang.String resourceType)
Return the utilization ratio of the given resource type, which is calculated as from the current usage of resource divided by the resource limit |
void |
nmrCell(EdifCell cell,
int replicationFactor)
|
void |
nmrInstance(EdifCellInstance eci,
int replicationFactor)
This function adds the instance eci to the list of instances to be replicated. |
private void |
nmrInstances(java.util.Collection<EdifCellInstance> ecis,
boolean skipEstimatedStops,
boolean skipHardStops,
int replicationFactor,
java.util.Collection<EdifCellInstance> actuallyReplicated)
Adds the instances in the collection ecis for replication. |
void |
nmrInstancesAsManyAsPossible(java.util.Collection<EdifCellInstance> ecis,
int replicationFactor,
java.util.Collection<EdifCellInstance> actuallyReplicated)
Adds as many instances as it can from the collection ecis for replication, skipping instances which cause estimated stops and/or hard stops. |
void |
nmrInstancesAtomic(java.util.Collection<EdifCellInstance> ecis,
int replicationFactor)
Adds all instances in the collection ecis for replication. |
void |
removeNMRInstance(EdifCellInstance eci,
int replicationFactor)
This function removes the instance eci from the list of instances to be replicated. |
void |
removeNMRInstances(java.util.Collection<EdifCellInstance> ecis,
int replicationFactor)
This function removes a collection of instances from the list of instances to be replicated. |
void |
removeSingleInstance(EdifCellInstance eci)
This function removes the utilization corresponding to eci from the device utilization count. |
void |
removeSingleInstances(java.util.Collection<EdifCellInstance> ecis)
This function removes a collection of instances from the normal list of cell instances. |
protected void |
restoreCurrentUtilization()
|
protected void |
setDesiredCoverageFactor(double factorValue)
|
java.lang.String |
toString()
|
| 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.DeviceUtilizationTracker |
|---|
decrementResourceCount, incrementResourceCount |
| Field Detail |
|---|
protected double coverage_factor
protected java.util.HashMap<java.lang.String,java.lang.Double> _cachedCurrentUtilizationMap
protected java.util.HashMap<java.lang.String,java.lang.Double> _currentUtilizationMap
protected java.util.HashMap<java.lang.String,java.lang.Integer> _maxUtilizationMap
protected int _numInstances
protected int _origNumInstances
protected ResourceMapper _resourceMapper
| Constructor Detail |
|---|
public AbstractDeviceUtilizationTracker()
| Method Detail |
|---|
public void addSingleCell(EdifCell cell)
throws OverutilizationEstimatedStopException,
OverutilizationHardStopException,
UnsupportedResourceTypeException
addSingleCell in interface DeviceUtilizationTrackerOverutilizationEstimatedStopException
OverutilizationHardStopException
UnsupportedResourceTypeException
public void addSingleInstance(EdifCellInstance eci)
throws OverutilizationEstimatedStopException,
OverutilizationHardStopException,
UnsupportedResourceTypeException
addSingleInstance in interface DeviceUtilizationTrackereci - Instance to add to the instances list.
OverutilizationEstimatedStopException
OverutilizationHardStopException
UnsupportedResourceTypeException
public void addSingleInstances(java.util.Collection<EdifCellInstance> ecis)
throws OverutilizationEstimatedStopException,
OverutilizationHardStopException,
UnsupportedResourceTypeException
addSingleInstances in interface DeviceUtilizationTrackerecis - Collection of instances to add to instances list.
OverutilizationEstimatedStopException
OverutilizationHardStopException
UnsupportedResourceTypeExceptionprotected void cacheCurrentUtilization()
protected void restoreCurrentUtilization()
public int getResourceLimit(EdifCellInstance eci)
throws UnsupportedResourceTypeException
getResourceLimit in interface DeviceUtilizationTrackerUnsupportedResourceTypeException
public int getResourceLimit(EdifCell cell)
throws UnsupportedResourceTypeException
getResourceLimit in interface DeviceUtilizationTrackerUnsupportedResourceTypeExceptionprotected int getResourceLimit(java.lang.String resourceType)
public double getResourceUtilization(EdifCellInstance eci)
throws UnsupportedResourceTypeException
getResourceUtilization in interface DeviceUtilizationTrackerUnsupportedResourceTypeException
public double getResourceUtilization(EdifCell cell)
throws UnsupportedResourceTypeException
getResourceUtilization in interface DeviceUtilizationTrackerUnsupportedResourceTypeException
protected double getResourceUtilization(java.lang.String resourceType)
throws UnsupportedResourceTypeException
UnsupportedResourceTypeException
public double getResourceUtilizationRatio(EdifCellInstance eci)
throws UnsupportedResourceTypeException
UnsupportedResourceTypeException
public double getResourceUtilizationRatio(EdifCell cell)
throws UnsupportedResourceTypeException
UnsupportedResourceTypeException
public double getResourceUtilizationRatio(java.lang.String resourceType)
throws UnsupportedResourceTypeException
resourceType - String name of the specified resource
UnsupportedResourceTypeException
public void removeSingleInstance(EdifCellInstance eci)
throws UnsupportedResourceTypeException
removeSingleInstance in interface DeviceUtilizationTrackereci - Instance to remove from instances list.
UnsupportedResourceTypeException
public void removeSingleInstances(java.util.Collection<EdifCellInstance> ecis)
throws UnsupportedResourceTypeException
removeSingleInstances in interface DeviceUtilizationTrackerecis - Collection of instances to be removed.
UnsupportedResourceTypeException
public void removeNMRInstance(EdifCellInstance eci,
int replicationFactor)
throws UnsupportedResourceTypeException
removeNMRInstance in interface DeviceUtilizationTrackereci - Instance to remove from replication list.replicationFactor - represents the n factor of NMR
UnsupportedResourceTypeException
public void removeNMRInstances(java.util.Collection<EdifCellInstance> ecis,
int replicationFactor)
throws UnsupportedResourceTypeException
removeNMRInstances in interface DeviceUtilizationTrackerecis - Collection of instances to be removed.replicationFactor - the N factor of NMR
UnsupportedResourceTypeException
public void nmrCell(EdifCell cell,
int replicationFactor)
throws OverutilizationEstimatedStopException,
OverutilizationHardStopException,
UnsupportedResourceTypeException
nmrCell in interface DeviceUtilizationTrackerOverutilizationEstimatedStopException
OverutilizationHardStopException
UnsupportedResourceTypeException
public void nmrInstance(EdifCellInstance eci,
int replicationFactor)
throws OverutilizationEstimatedStopException,
OverutilizationHardStopException,
UnsupportedResourceTypeException
nmrInstance in interface DeviceUtilizationTrackereci - Instance to add to triplication list.replicationFactor - factor of replication for NMR (i/e TMR is 3, DWC
is 2, etc.)
OverutilizationEstimatedStopException
OverutilizationHardStopException
UnsupportedResourceTypeException
public void nmrInstancesAtomic(java.util.Collection<EdifCellInstance> ecis,
int replicationFactor)
throws OverutilizationEstimatedStopException,
OverutilizationHardStopException,
UnsupportedResourceTypeException
nmrInstancesAtomic in interface DeviceUtilizationTrackerecis - Collection of instances to be added for replication.replicationFactor - N factor for NMR
OverutilizationEstimatedStopException
OverutilizationHardStopException
UnsupportedResourceTypeException
public void nmrInstancesAsManyAsPossible(java.util.Collection<EdifCellInstance> ecis,
int replicationFactor,
java.util.Collection<EdifCellInstance> actuallyReplicated)
throws OverutilizationEstimatedStopException,
OverutilizationHardStopException,
UnsupportedResourceTypeException
nmrInstancesAsManyAsPossible in interface DeviceUtilizationTrackerecis - Collection of instances to be added for replication.replicationFactor - N factor for NMR
OverutilizationEstimatedStopException
OverutilizationHardStopException
UnsupportedResourceTypeException
private void nmrInstances(java.util.Collection<EdifCellInstance> ecis,
boolean skipEstimatedStops,
boolean skipHardStops,
int replicationFactor,
java.util.Collection<EdifCellInstance> actuallyReplicated)
throws OverutilizationEstimatedStopException,
OverutilizationHardStopException,
UnsupportedResourceTypeException
ecis - Collection of instances to be added for replication.skipEstimatedStops - boolean flag to optionally ignore estimated
stops.skipHardStops - boolean flag to optionally ignore hard stops.replicationFactor - the N factor in NMR
OverutilizationEstimatedStopException
OverutilizationHardStopException
UnsupportedResourceTypeExceptionpublic java.lang.String toString()
toString in interface DeviceUtilizationTrackertoString in class java.lang.Object
protected void addResourceForTracking(java.lang.String resourceType,
double currentUtilization,
int maxUtilization)
protected void _init(EdifCell cell)
throws OverutilizationEstimatedStopException,
OverutilizationHardStopException
OverutilizationEstimatedStopException
OverutilizationHardStopExceptionprotected void setDesiredCoverageFactor(double factorValue)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||