mapss.dif.csdf.sdf
Class SDFEdgeWeight

java.lang.Object
  extended by mapss.dif.DIFEdgeWeight
      extended by mapss.dif.csdf.CSDFEdgeWeight
          extended by mapss.dif.csdf.sdf.SDFEdgeWeight
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
SingleRateEdgeWeight

public class SDFEdgeWeight
extends CSDFEdgeWeight

Information associated with an SDF edge. SDFEdgeWeights are objects associated with Edges that represent SDF edges in Graphs. This class caches frequently-used data associated with SDF edges. It is also useful for intermediate SDF graph representations that do not correspond to Ptolemy II models, and performing graph transformations (e.g., vectorization and retiming). It is intended for use with analysis/synthesis algorithms that operate on generic graph representations of SDF models.

Version:
$Id: SDFEdgeWeight.java 406 2007-05-10 14:27:07Z plishker $
Author:
Michael Rinehart, Shuvra S. Bhattacharyya, Ming-Yung Ko, Chia-Jui Hsu
See Also:
Edge

Constructor Summary
SDFEdgeWeight()
          Construct an edge weight for a homogeneous, zero-delay edge.
SDFEdgeWeight(int productionRate, int consumptionRate, int delay)
          Construct an edge weight for a specified token production rate, token consumption rate, and delay.
SDFEdgeWeight(java.lang.Object sourcePort, java.lang.Object sinkPort, int productionRate, int consumptionRate, int delay)
          Construct an edge weight for a specified source port, sink port, token production rate, token consumption rate, and delay.
 
Method Summary
 int getSDFConsumptionRate()
          Get the token consumption rate of the associated SDF edge.
 int getSDFProductionRate()
          Get the token production rate of the associated SDF edge.
 void setConsumptionRate(java.lang.Object consumptionRate)
          Override DIFEdgeWeight.setConsumptionRate(Object) to check the type of input object.
 void setCSDFConsumptionRates(int[] consumptionRates)
          Override CSDFEdgeWeight.setCSDFConsumptionRates(int[]) to prevent illegal usage.
 void setCSDFProductionRates(int[] productionRates)
          Override CSDFEdgeWeight.setCSDFProductionRates(int[]) to prevent illegal usage.
 void setProductionRate(java.lang.Object productionRate)
          Override DIFEdgeWeight.setProductionRate(Object) to check the type of input object.
 void setSDFConsumptionRate(int consumptionRate)
          Set the token consumption rate of the SDF edge.
 void setSDFProductionRate(int productionRate)
          Set the token production rate of the SDF edge.
 java.lang.String toString()
          Return a string representation of the edge weight.
 
Methods inherited from class mapss.dif.csdf.CSDFEdgeWeight
consumptionPeriodRate, consumptionPhaseCount, getCSDFConsumptionRate, getCSDFConsumptionRates, getCSDFProductionRate, getCSDFProductionRates, getIntDelay, productionPeriodRate, productionPhaseCount, setCSDFConsumptionRate, setCSDFProductionRate, setDelay, setDelay
 
Methods inherited from class mapss.dif.DIFEdgeWeight
_getConsumptionRate, _getDelay, _getProductionRate, _setConsumptionRate, _setDelay, _setProductionRate, clone, getConsumptionRate, getDelay, getProductionRate, getSinkPort, getSourcePort, setSinkPort, setSourcePort
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SDFEdgeWeight

public SDFEdgeWeight()
Construct an edge weight for a homogeneous, zero-delay edge. Production and consumption values are set to 1.


SDFEdgeWeight

public SDFEdgeWeight(int productionRate,
                     int consumptionRate,
                     int delay)
Construct an edge weight for a specified token production rate, token consumption rate, and delay.

Parameters:
productionRate - The token production rate.
consumptionRate - The token consumption rate.
delay - The delay.

SDFEdgeWeight

public SDFEdgeWeight(java.lang.Object sourcePort,
                     java.lang.Object sinkPort,
                     int productionRate,
                     int consumptionRate,
                     int delay)
Construct an edge weight for a specified source port, sink port, token production rate, token consumption rate, and delay. The source port and sink port are ports that correspond to this edge.

Parameters:
sourcePort - The source port.
sinkPort - The sink port.
productionRate - The token production rate.
consumptionRate - The token consumption rate.
delay - The delay.
Method Detail

getSDFConsumptionRate

public int getSDFConsumptionRate()
Get the token consumption rate of the associated SDF edge.

Returns:
The consumption rate.

getSDFProductionRate

public int getSDFProductionRate()
Get the token production rate of the associated SDF edge.

Returns:
The production rate.

setConsumptionRate

public void setConsumptionRate(java.lang.Object consumptionRate)
Override DIFEdgeWeight.setConsumptionRate(Object) to check the type of input object.

Overrides:
setConsumptionRate in class CSDFEdgeWeight
Parameters:
consumptionRate -
Throws:
mocgraph.GraphWeightException - If consumptionRates is not Integer.

setCSDFConsumptionRates

public void setCSDFConsumptionRates(int[] consumptionRates)
Override CSDFEdgeWeight.setCSDFConsumptionRates(int[]) to prevent illegal usage.

Overrides:
setCSDFConsumptionRates in class CSDFEdgeWeight
Parameters:
consumptionRates -
Throws:
mocgraph.GraphWeightException - If consumptionRates contains multiple elements.

setCSDFProductionRates

public void setCSDFProductionRates(int[] productionRates)
Override CSDFEdgeWeight.setCSDFProductionRates(int[]) to prevent illegal usage.

Overrides:
setCSDFProductionRates in class CSDFEdgeWeight
Parameters:
productionRates -
Throws:
mocgraph.GraphWeightException - If productionRates contains multiple elements.

setProductionRate

public void setProductionRate(java.lang.Object productionRate)
Override DIFEdgeWeight.setProductionRate(Object) to check the type of input object.

Overrides:
setProductionRate in class CSDFEdgeWeight
Parameters:
productionRate -
Throws:
mocgraph.GraphWeightException - If productionRate is not Integer.

setSDFConsumptionRate

public void setSDFConsumptionRate(int consumptionRate)
Set the token consumption rate of the SDF edge.

Parameters:
consumptionRate - The token consumption rate in int.

setSDFProductionRate

public void setSDFProductionRate(int productionRate)
Set the token production rate of the SDF edge.

Parameters:
productionRate - The new token production rate.

toString

public java.lang.String toString()
Return a string representation of the edge weight. This string representation is in the following form:

productionRate consumptionRate delay

Overrides:
toString in class CSDFEdgeWeight
Returns:
The string representation of the edge weight.