Class NodeTraffic

java.lang.Object
  extended by NodeTraffic
Direct Known Subclasses:
ConcreteNodeTraffic

abstract class NodeTraffic
extends java.lang.Object

The NodeTraffic abstract class defines the necessary methods for setting up traffic configuration for the generated messages.

Version:
1.0

Field Summary
protected  int address
          Address of the node
protected  int nextMsgGenTime
          It is an int type variable.
 
Constructor Summary
NodeTraffic(int nodeAddress)
          Constructor of the NodeTraffic class
 
Method Summary
protected abstract  Flit createDataFlit(int destination, int vcId, int curCycle)
          Generates an encoded Data flit suitable for the NoC architecture.
protected abstract  Flit createHeaderFlit(int destination, int noOfFlit, int vcId, int curCycle)
          Generates an encoded Header flit suitable for the NoC architecture
abstract  java.util.Vector generateMessage(int curCycle, int curMessageCount)
           Generates a packet including its header flit and all of the data flits and stores into a Vector data structure.
protected abstract  int getDestination()
          Determines a destination for the generated message.
protected abstract  int getMessageSize()
          Determines the number of flits in the the generated message.
protected abstract  int getNextMsgGenTime()
          Returns the next message generation time for the node.
abstract  void setNextMsgGenTime(int curCycle)
          Updates the next message generation time (nextMessageGenTime)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

address

protected int address
Address of the node


nextMsgGenTime

protected int nextMsgGenTime
It is an int type variable. It holds the next timestamp when the node will generate message. The timestamp is calculated by exponential distribution depending on the average message generation time.

Constructor Detail

NodeTraffic

public NodeTraffic(int nodeAddress)
Constructor of the NodeTraffic class

Parameters:
nodeAddress - address of the node
Method Detail

generateMessage

public abstract java.util.Vector generateMessage(int curCycle,
                                                 int curMessageCount)

Generates a packet including its header flit and all of the data flits and stores into a Vector data structure. Also sets the next message generation time for the node.

Parameters:
curCycle - simulation cycle
curMessageCount - number of messages stored in the node's internal buffer
Returns:
a Vector consisting of all flits in the packet

setNextMsgGenTime

public abstract void setNextMsgGenTime(int curCycle)
Updates the next message generation time (nextMessageGenTime)

Parameters:
curCycle - simulation cycle

getNextMsgGenTime

protected abstract int getNextMsgGenTime()
Returns the next message generation time for the node.

Returns:
next message generation time

getDestination

protected abstract int getDestination()
Determines a destination for the generated message.

Returns:
address of the destination

getMessageSize

protected abstract int getMessageSize()
Determines the number of flits in the the generated message.

Returns:
number of flits in the message

createHeaderFlit

protected abstract Flit createHeaderFlit(int destination,
                                         int noOfFlit,
                                         int vcId,
                                         int curCycle)
Generates an encoded Header flit suitable for the NoC architecture

Parameters:
destination - address of the destination node
noOfFlit - number of flits in the message
vcId - virtual channel number
curCycle - simualtion cycle
Returns:
Header flit

createDataFlit

protected abstract Flit createDataFlit(int destination,
                                       int vcId,
                                       int curCycle)
Generates an encoded Data flit suitable for the NoC architecture.

Parameters:
destination - address of the destination node
vcId - virtual channel number
curCycle - simualatin cycle
Returns:
Data flit