Class Network

java.lang.Object
  extended by Network

public class Network
extends java.lang.Object

Network is the object through which all the nodes (Resource blocks) and all the communication switches are connected to perform the desired goal into one unit. According to the input parameters the network is built up. Different types of network topologies can be created but for simulation at a time only one type of network is instantiated. Mesh, Torus, Butterfly Fat Tree and Extended Butterfly Fat Tree, Octal are among the different types of network. N.B. Extended Butterfly Fat Tree (an extension of the Butterfly Fat Tree) and Octal (an extension of the Octagon topology) are two architectures originally proposed by the researchers in Dept. of CSE, BUET)

Version:
1.0

Field Summary
private  java.util.Vector nodeList
          A vector type variable holding the reference of all the resource nodes of the network.
private  java.util.Vector switchList
          A vector type variable holding the reference of all the communication switches of the network.
 
Constructor Summary
Network(int networkType)
          Constructor of the Network.
 
Method Summary
 void createExFatTreeNetwork()
          Instantiates all the nodes and Extended Butterfly Fat Tree switches of the extended fat tree network as well as assigns which node will be connected with which extended fat tree switch.
 void createFatTreeNetwork()
          Instantiates all the nodes and Butterfly Fat Tree switches of the fat tree network as well as assigns which node will be connected with which fat tree switch.
 void createMeshNetwork()
          Instantiates all the nodes and mesh switches of the mesh network as well as assigns which node will be connected with which mesh switch.
 void createOctalNetwork()
          Instantiates all the nodes and mesh switches of the Octal network as well as assigns which node will be connected with which Octal switch.
private  int getStartOfLevel(int level)
          Invoked by Network.setAdjacentFatSwitch() and Network.setAdjacentExFatSwitch() to find out the first parent switch exists in the upper level by using current switch’s level and index in level values.
 void moveNodeTrafficFromInputBufferToNodeMsgCenter(int nCycle)
          This method is used to transfer the incoming flits at the input buffer of resource node to the message center of that node.
 void moveNodeTrafficFromNodeToSwitch(int nCycle)
          This method is used to transfer the outgoing flits at the output buffer of resource node to the input buffer of the parent switch of that node.
 void moveSwitchTrafficFromInputBufferToOutputBuffer(int nCycle)
          This method is used to transfer the incoming flits at the input buffer of the switch to output buffer of that switch depending on the switching info vector.
 void moveSwitchTrafficFromOutputBufferToInputBufferOfNodeSwitch(int nCycle)
          This method is used to transfer the outgoing flits at the output buffer of the switch to input buffer of the adjacent switches and/or resource nodes.
private  void setAdjacentExFatSwitch()
          Completes the creation of extended butterfly fat tree network by setting the adjacency relationship between the switches of consecutive different levels and switches of current level.
private  void setAdjacentFatSwitch()
          This method completes the creation of butterfly fat tree network by setting the adjacency relationship between the switches of consecutive different levels.
private  void setAdjacentMeshSwitch()
          Completes the creation of mesh network by setting the adjacency relationship between the switches of consecutive different rows and columns.
private  void setAdjacentOctalSwitch()
          Completes the creation of octal network by setting the adjacency relationship between the switches of the same unit and the switches of other units.The units are added in the network in row major order i.e.
private  void setAdjacentTorusSwitch()
           This method completes the creation of torus network by setting the adjacency relationship between the switches of consecutive different levels.
 void setInitalEvents()
          This method is called by the controller of the simulator to set initial events required for starting the simulator.
 void updateAfterCycleStatus(int curCycle)
          The method performs its duty by calling nodes’ updateStatusAfterCycle(nCycle) and switches' updateStatusAfterCycle(nCycle) method for every simulation cycle.
 void updateSwitchTrafficPathRequest(int nCycle)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nodeList

private java.util.Vector nodeList
A vector type variable holding the reference of all the resource nodes of the network. This list is used for retrieving nodes’ reference to invoke methods directly from network.


switchList

private java.util.Vector switchList
A vector type variable holding the reference of all the communication switches of the network. This list is used for retrieving switches’ reference to invoke methods directly from network.

Constructor Detail

Network

public Network(int networkType)
Constructor of the Network. In this version of the simulator, the type of the networks that have been implemented are Mesh, Torus, Butterfly Fat Tree, Extended Butterfly Fat Tree, and Octal. The constructor performs in the following fashion.

Parameters:
networkType - An integer which determines which type of network the constructor will build.
See Also:
IConstants
Method Detail

createMeshNetwork

public void createMeshNetwork()
Instantiates all the nodes and mesh switches of the mesh network as well as assigns which node will be connected with which mesh switch. The method performs in the following manner.

Assumptions:

  • This method considers a topology that has either m*n Mesh Switches. Here n = m or m+1.
  • This method also works for the Torus network.
  • The Number of IP Nodes and Switches adjusted according to the n * m switch architecture. Where, n = m or m+1, i.e. the architecture is adjusted to have a square shape.
  • See Also:
    MeshSwitch, NetworkManager, IConstants

    setAdjacentMeshSwitch

    private void setAdjacentMeshSwitch()
    Completes the creation of mesh network by setting the adjacency relationship between the switches of consecutive different rows and columns. The switches are added in the network in row major order i.e. first the earlier rows are filled. The method works in the following steps.

    See Also:
    MeshSwitch, InputLinkController, OutputLinkController, IConstants

    setAdjacentTorusSwitch

    private void setAdjacentTorusSwitch()

    This method completes the creation of torus network by setting the adjacency relationship between the switches of consecutive different levels. The method works in almost the same way as was described for mesh network except the circular relation.

    The switches in the top most and bottom most rows have adjacency relation in top and bottom directions respectively whereas in mesh network they had no adjacency relations. And in similar way leftmost and rightmost columns have adjacency relation in left and right directions respectively whereas in mesh network they had no adjacency relations.

    See Also:
    MeshSwitch, InputLinkController, OutputLinkController, IConstants

    createFatTreeNetwork

    public void createFatTreeNetwork()
    Instantiates all the nodes and Butterfly Fat Tree switches of the fat tree network as well as assigns which node will be connected with which fat tree switch. The method performs in the flowing manner.

    Assumptions:

  • This method also works for the ExtendedButterFly network.
  • The Number of IP Nodes and Switches adjusted according to the a complete fat tree format.
  • See Also:
    FatTreeSwitch, InputLinkController, OutputLinkController, IConstants

    setAdjacentFatSwitch

    private void setAdjacentFatSwitch()
    This method completes the creation of butterfly fat tree network by setting the adjacency relationship between the switches of consecutive different levels. The method works in the following steps.


    createOctalNetwork

    public void createOctalNetwork()
    Instantiates all the nodes and mesh switches of the Octal network as well as assigns which node will be connected with which Octal switch. The switches are added grouped in a unit of 8 switches. These units in the network are then added in row major order i.e. first the earlier rows are filled. The method performs in the following manner.

    See Also:
    OctalSwitch, NetworkManager, IConstants

    setAdjacentOctalSwitch

    private void setAdjacentOctalSwitch()
    Completes the creation of octal network by setting the adjacency relationship between the switches of the same unit and the switches of other units.The units are added in the network in row major order i.e. first the earlier rows are filled. The method works in the following steps.

    createExFatTreeNetwork

    public void createExFatTreeNetwork()
    Instantiates all the nodes and Extended Butterfly Fat Tree switches of the extended fat tree network as well as assigns which node will be connected with which extended fat tree switch. The method performs in the flowing manner.

    The approach is similar to that of Fat Tree Network.

    Assumptions:

  • This method also works for the ExtendedButterFly network.
  • The Number of IP Nodes and Switches adjusted according to a complete fat tree format.
  • See Also:
    ExFatTreeSwitch, InputLinkController, OutputLinkController, IConstants

    setAdjacentExFatSwitch

    private void setAdjacentExFatSwitch()
    Completes the creation of extended butterfly fat tree network by setting the adjacency relationship between the switches of consecutive different levels and switches of current level. Switches of extended butterfly fat tree network have relationship among the switches of the same level depending on specific formula along with the child and parent relationship between the switches of lower and upper level switches. The method performs same works as was done for butterfly fat tree network along with some extra works. Those are described below.


    getStartOfLevel

    private int getStartOfLevel(int level)
    Invoked by Network.setAdjacentFatSwitch() and Network.setAdjacentExFatSwitch() to find out the first parent switch exists in the upper level by using current switch’s level and index in level values.

    Parameters:
    level - Level in the Butterfly Fat Tree, Extended Butterfly Fat Tree topology
    Returns:
    Index value in the switch list
    See Also:
    setAdjacentFatSwitch(), setAdjacentExFatSwitch()

    setInitalEvents

    public void setInitalEvents()
    This method is called by the controller of the simulator to set initial events required for starting the simulator. The method performs in the following steps.

    moveNodeTrafficFromNodeToSwitch

    public void moveNodeTrafficFromNodeToSwitch(int nCycle)
    This method is used to transfer the outgoing flits at the output buffer of resource node to the input buffer of the parent switch of that node. The method performs its duty by calling nodes’ updateOutput(nCycle) method for every simulation cycle.

    Parameters:
    nCycle - Simulation cycle

    updateSwitchTrafficPathRequest

    public void updateSwitchTrafficPathRequest(int nCycle)

    moveSwitchTrafficFromInputBufferToOutputBuffer

    public void moveSwitchTrafficFromInputBufferToOutputBuffer(int nCycle)
    This method is used to transfer the incoming flits at the input buffer of the switch to output buffer of that switch depending on the switching info vector. The method performs its duty by calling switches’ moveInputBufferToOutputBuffer(nCycle) method for every simulation cycle.

    Parameters:
    nCycle - Simulation cycle

    moveSwitchTrafficFromOutputBufferToInputBufferOfNodeSwitch

    public void moveSwitchTrafficFromOutputBufferToInputBufferOfNodeSwitch(int nCycle)
    This method is used to transfer the outgoing flits at the output buffer of the switch to input buffer of the adjacent switches and/or resource nodes. The method performs its assigned activities by calling the switches’ moveSwitchOutputBufferToInputBufferOfNodeSwitch(nCycle) method for every simulation cycle.

    Parameters:
    nCycle - Simulation cycle

    moveNodeTrafficFromInputBufferToNodeMsgCenter

    public void moveNodeTrafficFromInputBufferToNodeMsgCenter(int nCycle)
    This method is used to transfer the incoming flits at the input buffer of resource node to the message center of that node. The method performs its duty by calling nodes’ forwardFlitToNodeMessageCenter(nCycle) method for every simulation cycle

    Parameters:
    nCycle - Simulation cycle

    updateAfterCycleStatus

    public void updateAfterCycleStatus(int curCycle)
    The method performs its duty by calling nodes’ updateStatusAfterCycle(nCycle) and switches' updateStatusAfterCycle(nCycle) method for every simulation cycle.

    Parameters:
    curCycle - Simulation cycle