Class StatisticalData

java.lang.Object
  extended by StatisticalData

public class StatisticalData
extends java.lang.Object

StatisticalData class captures various performance parameters of the simulator for comparison among various network configurations. The data presented by this class are updated only during the warm up cycles.

Performance parameters are Latency, Throughput, Buffer Utilization, Link Utilization, Hop Count (Routing Performance).

Version:
1.0

Field Summary
private  long[] flitLeavingFromSwitch
          An array capturing the number of flits leaving from each switch
private  long[] flitReceived
          An array capturing the number of the flits received from each node
private  long[] messageNotProduced
          An array capturing the number of the packets NOT generated in each node, due to buffer shortage
private  long[] nodeInBufferUseStatus
          An array capturing the usage status of the slots of the input buffer for each node
private  long[] nodeLinkUseStatus
          An array capturing the physical link usage status for each node
private  long[] nodeOutBufferUseStatus
          An array capturing the usage status of the slots of the output buffer for each node
private  int noOfSwitch
          Number of switches in the network
private  long[] numSwitchLink
          An array capturing the number of physical links in each switch
private  long[] packetDelay
          An array capturing the delay of the packets received in each node
private  long[] packetHopCount
          An array capturing the hop traversed by the packets received in each node
private  long[] packetProduced
          An array capturing the number of the packets generated in each node
private  long[] packetReceived
          An array capturing the number of the packets received in each node
private  long[] packetSent
          An array capturing the number of the packets actually transmitted from each node
 int sameUnit
           
private  long[] switchInBufferUseStatus
          An array capturing the usage status of the slots of the input buffers for each switch
private  long[] switchLinkUseStatus
          An array capturing the physical link usage status for each switch
private  long[] switchOutBufferUseStatus
          An array capturing the usage status of the slots of the output buffers for each switch
 
Constructor Summary
StatisticalData(int netType)
          Constructor of the StatisticalData class.
 
Method Summary
 double getAvgMessageNotProduced()
          Returns the average number of packets NOT produced by the nodes due to lack of internal buffers.
 double getAvgPacketDelay()
           Returns the latency or average packet delay.
 double getAvgPacketHopCount()
           Returns the average hop count.
 double getBufferUtilization()
           Returns the buffer utilization of all Nodes and Switches in a single simulation run.
 double getInputBufferNodeUtilization()
           Returns the input buffer utilization of all Nodes in a single simulation run.
 double getInputBufferSwitchUtilization()
           Returns the input buffer utilization of all Switches in a single simulation run.
 double getLinkUtilization()
           Returns the link utilization of all Nodes and Switches for a single simulation run.
 double getNetworkNodeThroughput()
           Returns the throughput of the network.
 double getNumberOfPacketProduced()
          Returns the number of packets NOT produced by all nodes due to lack of internal buffers.
 double getNumberOfPacketReceived()
          Returns the number of packets received by all nodes.
 double getNumberOfPacketSent()
          Returns the number of packets transmitted by all nodes.
 double getOutputBufferNodeUtilization()
           Returns the output buffer utilization of all Nodes in a single simulation run.
 double getOutputBufferSwitchUtilization()
           Returns the output buffer utilization of all Switches in a single simulation run.
 double getThroughput(int numCycle)
           Returns the average number of flits leaving a switch in every cycle.
 void incrementFlitLeavingFromSwitch(int switchIndex)
          Increments the number of flits moving to an adjacent node/switch from a particular switch.
 void incrementFlitReceived(int nodeIndex)
          Increments the number of flits received in a particular node.
 void incrementMessageNotProduced(int nodeIndex)
          Increments the number of packets that could not be generated in a particular node due to the shortage of internal buffers.
 void incrementNodeInputBufferUse(int nodeIndex, int useCount)
          Increments the count of usage of input buffers of a node by an amount 'useCount'
 void incrementNodeLinkUse(int nodeIndex)
          Increments the count of usage of physical link of a node, if it transmits flit in a particular cycle.
 void incrementNodeOutputBufferUse(int nodeIndex, int useCount)
          Increments the count of usage of output buffers of a node by an amount 'useCount'
 void incrementPacketDelay(int nodeIndex, int delay)
          Increments the total delay experienced by all packets received in a particular node by an amount specified in the arguement 'delay'.
 void incrementPacketHopCount(int nodeIndex, int hop)
          Increments the total hop count traversed by all packets received in a particular node by an amount specified in the arguement 'hop'.
 void incrementPacketProduced(int nodeIndex)
          Increments the number of packets generated from a particular node.
 void incrementPacketSent(int nodeIndex)
          Increments the number of packets sent from a particular node.
 void incrementSwitchInputBufferUse(int switchIndex, int useCount)
          Increments the count of usage of input buffers of a switch by an amount 'useCount'
 void incrementSwitchLinkUse(int switchIndex, int useCount)
          Increments the number of total link usages of a particular switch by an amount 'useCount'.
 void incrementSwitchOutputBufferUse(int switchIndex, int useCount)
          Increments the count of usage of output buffers of a switch by an amount 'useCount'
 void initializeStat()
          Re-initializes the member variables.
 void setSwitchNumLink(int switchIndex, int count)
          Sets the number of physical links for a particular switch.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

noOfSwitch

private int noOfSwitch
Number of switches in the network


flitLeavingFromSwitch

private long[] flitLeavingFromSwitch
An array capturing the number of flits leaving from each switch


packetDelay

private long[] packetDelay
An array capturing the delay of the packets received in each node


packetProduced

private long[] packetProduced
An array capturing the number of the packets generated in each node


packetReceived

private long[] packetReceived
An array capturing the number of the packets received in each node


messageNotProduced

private long[] messageNotProduced
An array capturing the number of the packets NOT generated in each node, due to buffer shortage


packetSent

private long[] packetSent
An array capturing the number of the packets actually transmitted from each node


flitReceived

private long[] flitReceived
An array capturing the number of the flits received from each node


switchLinkUseStatus

private long[] switchLinkUseStatus
An array capturing the physical link usage status for each switch


numSwitchLink

private long[] numSwitchLink
An array capturing the number of physical links in each switch


nodeLinkUseStatus

private long[] nodeLinkUseStatus
An array capturing the physical link usage status for each node


switchInBufferUseStatus

private long[] switchInBufferUseStatus
An array capturing the usage status of the slots of the input buffers for each switch


switchOutBufferUseStatus

private long[] switchOutBufferUseStatus
An array capturing the usage status of the slots of the output buffers for each switch


nodeInBufferUseStatus

private long[] nodeInBufferUseStatus
An array capturing the usage status of the slots of the input buffer for each node


nodeOutBufferUseStatus

private long[] nodeOutBufferUseStatus
An array capturing the usage status of the slots of the output buffer for each node


packetHopCount

private long[] packetHopCount
An array capturing the hop traversed by the packets received in each node


sameUnit

public int sameUnit
Constructor Detail

StatisticalData

public StatisticalData(int netType)
Constructor of the StatisticalData class. Initializes the member variables.

Parameters:
netType - type of the network
Method Detail

initializeStat

public void initializeStat()
Re-initializes the member variables. This method is useful if the simulator is executed to compute performance for more than one network in a single execution.


incrementFlitReceived

public void incrementFlitReceived(int nodeIndex)
Increments the number of flits received in a particular node.

Parameters:
nodeIndex - index of the IP node

incrementMessageNotProduced

public void incrementMessageNotProduced(int nodeIndex)
Increments the number of packets that could not be generated in a particular node due to the shortage of internal buffers.

Parameters:
nodeIndex - index of the IP node

incrementFlitLeavingFromSwitch

public void incrementFlitLeavingFromSwitch(int switchIndex)
Increments the number of flits moving to an adjacent node/switch from a particular switch.

Parameters:
switchIndex - index of the switch

incrementPacketHopCount

public void incrementPacketHopCount(int nodeIndex,
                                    int hop)
Increments the total hop count traversed by all packets received in a particular node by an amount specified in the arguement 'hop'.

Parameters:
nodeIndex - index of the IP node
hop - hop count

incrementPacketDelay

public void incrementPacketDelay(int nodeIndex,
                                 int delay)
Increments the total delay experienced by all packets received in a particular node by an amount specified in the arguement 'delay'.

Parameters:
nodeIndex - index of the IP node
delay - delay of the packet to reach the destination

incrementPacketSent

public void incrementPacketSent(int nodeIndex)
Increments the number of packets sent from a particular node.

Parameters:
nodeIndex - index of the IP node

incrementPacketProduced

public void incrementPacketProduced(int nodeIndex)
Increments the number of packets generated from a particular node.

Parameters:
nodeIndex - index of the IP node

incrementSwitchLinkUse

public void incrementSwitchLinkUse(int switchIndex,
                                   int useCount)
Increments the number of total link usages of a particular switch by an amount 'useCount'.

Parameters:
switchIndex - index of the switch
useCount - the number of links used to transmit packets in a single cycle

setSwitchNumLink

public void setSwitchNumLink(int switchIndex,
                             int count)
Sets the number of physical links for a particular switch.

Parameters:
switchIndex - index of the switch
count - number of physical linsk

incrementNodeLinkUse

public void incrementNodeLinkUse(int nodeIndex)
Increments the count of usage of physical link of a node, if it transmits flit in a particular cycle.

Parameters:
nodeIndex - index of the IP node

incrementSwitchInputBufferUse

public void incrementSwitchInputBufferUse(int switchIndex,
                                          int useCount)
Increments the count of usage of input buffers of a switch by an amount 'useCount'

Parameters:
switchIndex - index of the switch
useCount - the number of slots of the input buffers occupied by various flits.

incrementSwitchOutputBufferUse

public void incrementSwitchOutputBufferUse(int switchIndex,
                                           int useCount)
Increments the count of usage of output buffers of a switch by an amount 'useCount'

Parameters:
switchIndex - index of the switch
useCount - the number of slots of the output buffers occupied by various flits.

incrementNodeInputBufferUse

public void incrementNodeInputBufferUse(int nodeIndex,
                                        int useCount)
Increments the count of usage of input buffers of a node by an amount 'useCount'

Parameters:
nodeIndex - index of the IP node
useCount - the number of slots of the input buffer occupied by various flits.

incrementNodeOutputBufferUse

public void incrementNodeOutputBufferUse(int nodeIndex,
                                         int useCount)
Increments the count of usage of output buffers of a node by an amount 'useCount'

Parameters:
nodeIndex - index of the IP node
useCount - the number of slots of the output buffer occupied by various flits.

getThroughput

public double getThroughput(int numCycle)

Returns the average number of flits leaving a switch in every cycle. This is calculated by dividing the total number of flits leaving from all the switches with in the total simulation cycles by the multiplication of number of switches and number of simulation cycles.

Don't be confused by the name of the method. It's not the exact Throughput. See another method getNetworkNodeThroughput() in the same class which supplies the original throughput.

Parameters:
numCycle - total number of simulation cycles
Returns:
average number of flits leaving a switch in every cycle

getAvgPacketDelay

public double getAvgPacketDelay()

Returns the latency or average packet delay.

Latency is defined as the number of clock cycles required for complete transfer of a packet from source node to destination on average. This calculated by dividing the summation of all the packets’ delay by number of packets reached to the destination.

Returns:
latency or average packet delay

getAvgPacketHopCount

public double getAvgPacketHopCount()

Returns the average hop count. This is computed by dividing the total hop counts by the the number of packets received by the nodes.

Returns:
average number of hops traversed by the packets

getNumberOfPacketSent

public double getNumberOfPacketSent()
Returns the number of packets transmitted by all nodes.

Returns:
the number of packets sent

getNumberOfPacketReceived

public double getNumberOfPacketReceived()
Returns the number of packets received by all nodes.

Returns:
the number of packets received

getNumberOfPacketProduced

public double getNumberOfPacketProduced()
Returns the number of packets NOT produced by all nodes due to lack of internal buffers.

Returns:
the number of packets not produced

getAvgMessageNotProduced

public double getAvgMessageNotProduced()
Returns the average number of packets NOT produced by the nodes due to lack of internal buffers.

Returns:
the average number of packets not produced

getLinkUtilization

public double getLinkUtilization()

Returns the link utilization of all Nodes and Switches for a single simulation run.

This is the indication of how much time the physical links are used in transferring data out of its total duration. This is calculated by dividing the summation of number of physical links used in flit transfer in every simulation cycle by the multiplication of total number of simulation cycle and total number of physical links.

Returns:
link utilization of all nodes and switches

getInputBufferNodeUtilization

public double getInputBufferNodeUtilization()

Returns the input buffer utilization of all Nodes in a single simulation run.

This is the indication of how much of the input buffers are used in storing flits out of its maximum possible usage. This is calculated by dividing the summation of number of input buffer in flit unit used in storing flit in every simulation cycle by the multiplication of total number of simulation cycle and total amount of input buffer in flit unit.

Returns:
the input buffer utilization of all nodes

getOutputBufferNodeUtilization

public double getOutputBufferNodeUtilization()

Returns the output buffer utilization of all Nodes in a single simulation run.

This is the indication of how much of the output buffers are used in storing flits out of its maximum possible usage. This is calculated by dividing the summation of number of output buffer in flit unit used in storing flit in every simulation cycle by the multiplication of total number of simulation cycle and total amount of output buffer in flit unit.

Returns:
the output buffer utilization of all nodes

getInputBufferSwitchUtilization

public double getInputBufferSwitchUtilization()

Returns the input buffer utilization of all Switches in a single simulation run.

This is the indication of how much of the input buffers are used in storing flits out of its maximum possible usage. This is calculated by dividing the summation of number of input buffer in flit unit used in storing flit in every simulation cycle by the multiplication of total number of simulation cycle and total amount of input buffer in flit unit.

Returns:
the input buffer utilization of all switches

getOutputBufferSwitchUtilization

public double getOutputBufferSwitchUtilization()

Returns the output buffer utilization of all Switches in a single simulation run.

This is the indication of how much of the output buffers are used in storing flits out of its maximum possible usage. This is calculated by dividing the summation of number of output buffers in flit unit used in storing flit in every simulation cycle by the multiplication of total number of simulation cycle and total amount of output buffers in flit unit.

Returns:
the output buffer utilization of all switches

getBufferUtilization

public double getBufferUtilization()

Returns the buffer utilization of all Nodes and Switches in a single simulation run.

This is the indication of how much of the input and output buffers are used in storing flits out of its maximum possible usage. This is calculated by dividing the summation of number of input output buffer in flit unit used in storing flit in every simulation cycle by the multiplication of total number of simulation cycle and total amount of input and output buffers in flit unit by

Returns:
the buffer utilization of all nodes and switches

getNetworkNodeThroughput

public double getNetworkNodeThroughput()

Returns the throughput of the network.

Throughput is measured as average number of flits received in a node in every cycle. This is calculated by dividing the total number of flits received in all nodes within the total simulation cycles by the multiplication of the number of nodes and number of simulation cycles.

Don't be confused by a similar function getThroughput() in the same class. See the API for that function, it operates in a different way.

Returns:
throughput