|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectInputVCBuffer
public class InputVCBuffer
There is one input buffer for each of the input physical link. As we are using wormhole switching and virtual channel technique to avoid deadlock developed in wormhole switching input buffer provides these virtual channel support. A virtual channel is simply a buffer. So input buffer object holds as many buffer objects as many virtual channels are required. InputVCBuffer class defines such input buffer object.
Field Summary | |
---|---|
private boolean[] |
buffMidStatus
An array of booleans of size VCN. |
private java.util.Vector[] |
data
A Vector type object instantiated to hold the Buffer objects. |
private int[] |
flitCounter
An array of integer of size VCN. |
private int[] |
pathInfo
An array of integer of size VCN. |
private int |
pLinkNo
The physical link no. |
private int[] |
routeInfo
An array of integer of size VCN. |
private int |
vcCount
Number of virtual channels per physical channel used in the system. |
Constructor Summary | |
---|---|
InputVCBuffer(int linkNo)
Default Constructor. |
|
InputVCBuffer(int vcCount,
int linkNo)
Instantiates all the necessary data required to manage the input buffer and then initialize all the data. |
Method Summary | |
---|---|
boolean |
addBufferData(Flit flit,
int vcId,
int curCycle)
Stores a flit in a specified virtual channel of the input buffer. |
Flit |
getBufferData(int vcId)
Retrieve the flit from the specified virtual channel number of this input buffer object. |
int |
getFreeVC()
Returns a free virtual channel on the physical link. |
int |
getNumSlotUsed()
Returns total no. |
int |
getPathInfo(int vcId)
Returns the outgoing path information for the packet occupying the virtual channel. |
int |
getRouteInfo(int vcId)
Returns the outgoing physical link no. |
boolean |
hasFlitToSend(int vcId)
Returns whether there are more flits to send from the virtual channel. |
boolean |
hasFreeSlotInVC(int vcId)
Checks whether the virtual channel can hold another incoming flit of the packet that already holds the virtual channel. |
boolean |
isVCFree(int vcId)
Checks whether a virtual channel can be assigned to an incoming packet. |
Flit |
removeBufferData(int vcId,
int curCycle)
Remove the flit from the specified virtual channel of the input buffer. |
void |
resetRouteInfo(int vcId)
Resets the outgoing physical link no. |
void |
setPathInfo(int vcId,
int dest)
Sets the outgoing path information for the packet occupying the virtual channel. |
void |
setRouteInfo(int vcId,
int dest)
Sets the outgoing physical link no. |
void |
updateStatusAfterCycle()
Re-initializes the temporary status variables after each cycle. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.util.Vector[] data
private int vcCount
private int pLinkNo
private int[] routeInfo
private int[] pathInfo
private int[] flitCounter
private boolean[] buffMidStatus
Constructor Detail |
---|
public InputVCBuffer(int linkNo)
linkNo
- Physical link nopublic InputVCBuffer(int vcCount, int linkNo)
vcCount
- Number of virtual channel for the input physical link.linkNo
- Physical link no.Method Detail |
---|
public boolean addBufferData(Flit flit, int vcId, int curCycle)
flit
- Flit datavcId
- Virtual Channel no. to which this flit has to be delegatedcurCycle
- Current timestamp
public Flit removeBufferData(int vcId, int curCycle)
vcId
- Virtual channel number from where the flit is to be removedcurCycle
- Current timestamp
public Flit getBufferData(int vcId)
vcId
- virtual channel number
public void updateStatusAfterCycle()
public boolean isVCFree(int vcId)
vcId
- Virtual channel no.
public boolean hasFreeSlotInVC(int vcId)
vcId
- Virtual channel no.
public void setRouteInfo(int vcId, int dest)
vcId
- Virtual channel no.dest
- Outgoing physical link no.public int getRouteInfo(int vcId)
vcId
- Virtual channel no.
public void resetRouteInfo(int vcId)
vcId
- Virtual channel no.public int getFreeVC()
public boolean hasFlitToSend(int vcId)
vcId
- Virtual channel no.
public void setPathInfo(int vcId, int dest)
vcId
- Virtual channel nodest
- Path informationpublic int getPathInfo(int vcId)
vcId
- Virtual channel no
public int getNumSlotUsed()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |