mapss.dif
Class DIFEdgeWeight

java.lang.Object
  extended by mapss.dif.DIFEdgeWeight
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
BDFEdgeWeight, CSDFEdgeWeight, MDSDFEdgeWeight, PSDFEdgeWeight

public class DIFEdgeWeight
extends java.lang.Object
implements java.lang.Cloneable

Information associated with an DIF edge. DIFEdgeWeights are objects associated with Edges that represent DIF edges in Graphs. This class caches frequently-used data associated with DIF edges. It is also useful for performing graph transformations (e.g., vectorization and re-timing). It is intended for use with analysis/synthesis algorithms that operate on generic graph representations of DIF models.

Version:
$Id: DIFEdgeWeight.java 409 2007-05-13 19:47:16Z plishker $
Author:
Michael Rinehart, Shuvra S. Bhattacharyya, Chia-Jui Hsu
See Also:
Edge

Constructor Summary
DIFEdgeWeight()
          Construct an edge weight for a homogeneous, zero-delay edge.
DIFEdgeWeight(java.lang.Object productionRate, java.lang.Object consumptionRate, java.lang.Object delay)
          Construct an edge weight for a specified production, consumption, and delay.
DIFEdgeWeight(java.lang.Object sourcePort, java.lang.Object sinkPort, java.lang.Object productionRate, java.lang.Object consumptionRate, java.lang.Object delay)
          Construct an edge weight for a specified production, consumption, and delay.
 
Method Summary
protected  java.lang.Object _getConsumptionRate()
          Return the token consumption rate of the associated DIF edge.
protected  java.lang.Object _getDelay()
          Return the delay of the associated DIF edge.
protected  java.lang.Object _getProductionRate()
          Return the token production rate of the associated DIF edge.
protected  void _setConsumptionRate(java.lang.Object consumptionRate)
          Set the token consumption rate of the associated DIF edge.
protected  void _setDelay(java.lang.Object delay)
          Set the delay of the associated DIF edge.
protected  void _setProductionRate(java.lang.Object productionRate)
          Set the token production rate of the associated DIF edge.
 java.lang.Object clone()
          Clone this DIFEdgeWeight object or the derived class object.
 java.lang.Object getConsumptionRate()
          Return the token consumption rate of the associated DIF edge.
 java.lang.Object getDelay()
          Return the delay of the associated DIF edge.
 java.lang.Object getProductionRate()
          Return the token production rate of the associated DIF edge.
 java.lang.Object getSinkPort()
          Get the sink port of the associated DIF edge .
 java.lang.Object getSourcePort()
          Get the source port of the associated DIF edge .
 void setConsumptionRate(java.lang.Object consumptionRate)
          Set the token consumption rate of the associated DIF edge.
 void setDelay(java.lang.Object delay)
          Set the delay of the associated DIF edge.
 void setProductionRate(java.lang.Object productionRate)
          Set the token production rate of the associated DIF edge.
 void setSinkPort(java.lang.Object sinkPort)
          Set the sink port of the associated DIF edge to a port that is represented by the sink of the edge.
 void setSourcePort(java.lang.Object sourcePort)
          Set the source port of the associated DIF edge to a port that is represented by the source of the edge.
 java.lang.String toString()
          Return a string representation of the edge weight (an empty string).
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DIFEdgeWeight

public DIFEdgeWeight()
Construct an edge weight for a homogeneous, zero-delay edge.


DIFEdgeWeight

public DIFEdgeWeight(java.lang.Object productionRate,
                     java.lang.Object consumptionRate,
                     java.lang.Object delay)
Construct an edge weight for a specified production, consumption, and delay.

Parameters:
productionRate - The production object
consumptionRate - The consumption object.
delay - The delay object.

DIFEdgeWeight

public DIFEdgeWeight(java.lang.Object sourcePort,
                     java.lang.Object sinkPort,
                     java.lang.Object productionRate,
                     java.lang.Object consumptionRate,
                     java.lang.Object delay)
Construct an edge weight for a specified production, consumption, 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 production object.
consumptionRate - The consumption object.
delay - The delay object.
Method Detail

clone

public java.lang.Object clone()
Clone this DIFEdgeWeight object or the derived class object. All the derived class must be back compatiable with the setProductionRate(java.lang.Object), setConsumptionRate(java.lang.Object), and setDelay(java.lang.Object).

Overrides:
clone in class java.lang.Object
Returns:
A cloned version DIFEdgeWeight (or subclass) object.

getConsumptionRate

public java.lang.Object getConsumptionRate()
Return the token consumption rate of the associated DIF edge. The sum of the token consumption rates over all phases is returned.

Returns:
The token consumption rate.

getDelay

public java.lang.Object getDelay()
Return the delay of the associated DIF edge.

Returns:
The delay.

getProductionRate

public java.lang.Object getProductionRate()
Return the token production rate of the associated DIF edge. The sum of the token production rates over all phases is returned.

Returns:
The token production rate.

getSinkPort

public java.lang.Object getSinkPort()
Get the sink port of the associated DIF edge .

Returns:
The sink port.

getSourcePort

public java.lang.Object getSourcePort()
Get the source port of the associated DIF edge .

Returns:
The source port.

setConsumptionRate

public void setConsumptionRate(java.lang.Object consumptionRate)
Set the token consumption rate of the associated DIF edge. This method should be overridden in more specialized edge weight classes to ensure that the consumption objects are compatible with the corresponding dataflow model.

Parameters:
consumptionRate - The new token consumption rates.

setDelay

public void setDelay(java.lang.Object delay)
Set the delay of the associated DIF edge. This method should be overridden in more specialized edge weight classes to ensure that the delay objects are compatible with the corresponding dataflow model.

Parameters:
delay - The new delay object.

setProductionRate

public void setProductionRate(java.lang.Object productionRate)
Set the token production rate of the associated DIF edge. This method should be overridden in more specialized edge weight classes to ensure that the production objects are compatible with the corresponding dataflow model.

Parameters:
productionRate - The new token production rates.

setSinkPort

public void setSinkPort(java.lang.Object sinkPort)
Set the sink port of the associated DIF edge to a port that is represented by the sink of the edge.

Parameters:
sinkPort - The sink port.

setSourcePort

public void setSourcePort(java.lang.Object sourcePort)
Set the source port of the associated DIF edge to a port that is represented by the source of the edge.

Parameters:
sourcePort - The source port.

toString

public java.lang.String toString()
Return a string representation of the edge weight (an empty string).

Overrides:
toString in class java.lang.Object
Returns:
The string representation of the edge weight (an empty string).

_getConsumptionRate

protected final java.lang.Object _getConsumptionRate()
Return the token consumption rate of the associated DIF edge.

Returns:
The token consumption rate.

_getDelay

protected final java.lang.Object _getDelay()
Return the delay of the associated DIF edge.

Returns:
The delay.

_getProductionRate

protected final java.lang.Object _getProductionRate()
Return the token production rate of the associated DIF edge.

Returns:
The token production rate.

_setConsumptionRate

protected final void _setConsumptionRate(java.lang.Object consumptionRate)
Set the token consumption rate of the associated DIF edge.

Parameters:
consumptionRate - The new token consumption rate.

_setDelay

protected final void _setDelay(java.lang.Object delay)
Set the delay of the associated DIF edge.

Parameters:
productionRate - The delay.

_setProductionRate

protected final void _setProductionRate(java.lang.Object productionRate)
Set the token production rate of the associated DIF edge.

Parameters:
productionRate - The new token production rate.