|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectNodeTraffic
ConcreteNodeTraffic
public class ConcreteNodeTraffic
The ConcreteNodeTraffic class extends the functionality of the abstract NodeTraffic class. It defines the traffic configuration of the generated messages of a node and also facilitates the encoding of Header and Data flits.
Field Summary | |
---|---|
static long |
LOCAL_IN
|
static long |
LOCAL_OUT
|
Fields inherited from class NodeTraffic |
---|
address, nextMsgGenTime |
Constructor Summary | |
---|---|
ConcreteNodeTraffic(int address)
Constructor of the class. |
Method Summary | |
---|---|
protected Flit |
createDataFlit(int vcId,
int curCycle,
int destination)
Generates a data flit and return it to message generator method. |
protected Flit |
createHeaderFlit(int destination,
int noOfFlit,
int vcId,
int curCycle)
Generates a header flit and return it to message generator method. |
private int |
generateDestinationForFatTreeNetwork(int address)
Returns the address of a destination node in the fat tree network randomly. |
private int |
generateDestinationForMeshNetwork(int address)
Returns the address of a destination node in the Mesh network randomly. |
private int |
generateDestinationForOctalNetwork(int address)
|
private int |
generateDestinationForTorusNetwork(int address)
Returns the address of a destination node in the Torus network randomly. |
java.util.Vector |
generateMessage(int curCycle,
int curMessageCount)
Generates a packet and sets the next message generation time for the node. |
protected int |
getDestination()
Returns the address of the destination node. |
protected int |
getMessageSize()
Returns the message size in flits, which may be either fixed or exponential random number computed from the average message length(in bytes) and flit length (in bits). |
protected int |
getNextMsgGenTime()
Return the nextMsgGenTime (next message generation time) variable of this class. |
void |
setNextMsgGenTime(int curCycle)
Updates the state variable nextMessageGenTime of this class (inherited from NodeTraffic class) by calculating a time from exponential distribution using the average inter message generation time and adding this time with curCycle. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static long LOCAL_IN
public static long LOCAL_OUT
Constructor Detail |
---|
public ConcreteNodeTraffic(int address)
address
- address of the node to which this class belongsMethod Detail |
---|
public java.util.Vector generateMessage(int curCycle, int curMessageCount)
Generates a packet and sets the next message generation time for the node.
moveNodeTrafficFromNodeToSwitch(nCycle) method of Network object calls the updateOutput(nCycle) method of Node which then checks if actual parameter nCycle is equal to the state variable nextMessageGenTime of NodeTraffic objects and if so then that method calls this generateMessage method.
The methods performs in the following steps.
generateMessage
in class NodeTraffic
curCycle
- current simulation cyclecurMessageCount
- current message stored in the buffer of the node
public void setNextMsgGenTime(int curCycle)
setNextMsgGenTime
in class NodeTraffic
curCycle
- current simulation cycleprotected int getNextMsgGenTime()
getNextMsgGenTime
in class NodeTraffic
protected int getDestination()
getDestination
in class NodeTraffic
protected Flit createHeaderFlit(int destination, int noOfFlit, int vcId, int curCycle)
createHeaderFlit
in class NodeTraffic
destination
- address of the destination nodenoOfFlit
- no of flits in the packetvcId
- virtual channel nocurCycle
- current simulation cycle
protected Flit createDataFlit(int vcId, int curCycle, int destination)
createDataFlit
in class NodeTraffic
destination
- address of the destination nodevcId
- virtual channel nocurCycle
- current simulation cycle
protected int getMessageSize()
Returns the message size in flits, which may be either fixed or exponential random number computed from the average message length(in bytes) and flit length (in bits).
getMessageSize
in class NodeTraffic
private int generateDestinationForMeshNetwork(int address)
row = (destination/(C*N)).
Here C = Number of Columns in the Mesh Network, and N = Number of IP
nodes per Switch.
column = ((destination mod (C*N)) / N)
(pos = destination mod N)
address = row * 2 ^ (bitC + bitN) + col * bitN + pos
bitC = Number of bits used in representing column number the Mesh
Network.
bitN = Number of bits used in representing node number of the Mesh Switch
in Network.
address
- address of the source node
private int generateDestinationForTorusNetwork(int address)
row = (destination/(C*N)).
Here C = Number of Columns in the Torus Network, and N = Number of IP
nodes per Switch.
column = ((destination mod (C*N)) / N)
(pos = destination mod N)
address = row * 2 ^ (bitC + bitN) + col * bitN + pos
bitC = Number of bits used in representing column number the Torus
Network.
bitN = Number of bits used in representing node number of the Torus
Switch in Network.
address
- address of the source node
private int generateDestinationForFatTreeNetwork(int address)
address
- address of the source node
private int generateDestinationForOctalNetwork(int address)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |