Class InputLinkController

java.lang.Object
  extended by InputLinkController

public class InputLinkController
extends java.lang.Object

InputLinkController controls the incoming flits and helps in determining the route of the flits in a switch. It works as a wrapper of the input buffer where input virtual channels are implemented.

Version:
1.0

Field Summary
private  InputVCBuffer inputBuffer
          InputVCBuffers associated with the physical link
private  int linkNo
          The input physical link to whitch the link controller is associated
private  int numLinkCount
          The number of physical links for the switch
private  int numVCCount
          The number of virtual channels per physical link
private  Switch parentSwitch
          Base class type variable of different types of switches for different types of networks.
 
Constructor Summary
InputLinkController(Switch parent, int linkNo, int vcCount, int linkCount)
          Constructor for the InputLinkController class.
 
Method Summary
 boolean addInputBufferData(Flit flit, int curCycle)
          Adds an incoming flit to a input FIFO buffer at a specified virtual channel.
private  int getFreeVC()
          Returns free virtual channel index for the corresponding physical link.
 InputVCBuffer getInputBuffer()
          Returns the input buffer associated with the input link controller.
 boolean hasFreeSlotInVCBuffer(int vcId)
          Returns true, if the virtual channel has more slots to store additional flit.
 boolean isVCFree(int vcId)
          Returns 'true' if the virual channel is free, false-otherwise.
 Flit removeInputBufferData(int vcId, int curCycle)
          Removes a flit from a virtual channel.
 void setOutPathRequest(int curCycle)
          Invoked in every simulation cycle to set a request for switching the flits through the crossbar switch to the output link controller of the switch.
 void updateStatusAfterCycle()
          Updates status information at the end of each simulation cycle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parentSwitch

private Switch parentSwitch
Base class type variable of different types of switches for different types of networks. It holds the reference of the switch to which the link controller is attached.

See Also:
Switch

linkNo

private int linkNo
The input physical link to whitch the link controller is associated


numVCCount

private int numVCCount
The number of virtual channels per physical link


numLinkCount

private int numLinkCount
The number of physical links for the switch


inputBuffer

private InputVCBuffer inputBuffer
InputVCBuffers associated with the physical link

Constructor Detail

InputLinkController

public InputLinkController(Switch parent,
                           int linkNo,
                           int vcCount,
                           int linkCount)
Constructor for the InputLinkController class.

Parameters:
parent - switch to which the link controller is attached.
linkNo - physical link to which the link controller is attached.
vcCount - total no. of virtual channels per physical link
linkCount - total no. of physical links associated with the switch
Method Detail

addInputBufferData

public boolean addInputBufferData(Flit flit,
                                  int curCycle)
Adds an incoming flit to a input FIFO buffer at a specified virtual channel.

Invoked by the adjacent IP nodes and Switches of the parent switch through the reference of the parent switch. It performs its functionalities in following steps.

Parameters:
flit - flit data, either Header or Data flit
curCycle - cycle at which the operation is being performed
Returns:
boolean value whether the operation has been successful or not.
See Also:
InputVCBuffer, Flit

removeInputBufferData

public Flit removeInputBufferData(int vcId,
                                  int curCycle)
Removes a flit from a virtual channel.

Parameters:
vcId - virtual channel index
curCycle - current simulation cycle
Returns:
Flit
See Also:
InputVCBuffer

hasFreeSlotInVCBuffer

public boolean hasFreeSlotInVCBuffer(int vcId)
Returns true, if the virtual channel has more slots to store additional flit. False-otherwise.

Parameters:
vcId - virtual channel index
Returns:
boolean value
See Also:
InputVCBuffer

isVCFree

public boolean isVCFree(int vcId)
Returns 'true' if the virual channel is free, false-otherwise.

Parameters:
vcId - virtual channel index
Returns:
boolean value
See Also:
InputVCBuffer

getFreeVC

private int getFreeVC()
Returns free virtual channel index for the corresponding physical link.

Returns:
the index of the free virtual channel for this input link
See Also:
InputVCBuffer

getInputBuffer

public InputVCBuffer getInputBuffer()
Returns the input buffer associated with the input link controller.

Returns:
input buffer
See Also:
InputVCBuffer

updateStatusAfterCycle

public void updateStatusAfterCycle()
Updates status information at the end of each simulation cycle.

See Also:
InputVCBuffer

setOutPathRequest

public void setOutPathRequest(int curCycle)
Invoked in every simulation cycle to set a request for switching the flits through the crossbar switch to the output link controller of the switch. It works in the following steps.

Parameters:
curCycle - the simulation cycle at which the operation is being performed