|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectOutputVCBuffer
public class OutputVCBuffer
There is one output buffer for each of the output physical link. As we are using wormhole switching and virtual channel technique to avoid deadlock developed in wormhole switching output buffer provides these virtual channel support. A virtual channel is simply a buffer. So buffer buffer object holds as many buffer objects as many virtual channels are required. OutputBuffer class defines such output buffer object. Note: some of the codes have been commented as they are deprecated, no longer used. ['not used' precedes such comments.]
Field Summary | |
---|---|
private boolean[] |
buffAssignedStatus
An array of booleans of size VCN. |
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 |
numVCCount
Number of virtual channels per physical channel used in the system. |
private int |
pLinkNo
The physical link no. |
Constructor Summary | |
---|---|
OutputVCBuffer(int linkNo)
Default Constructor. |
|
OutputVCBuffer(int vcCount,
int linkNo)
Instantiates all the necessary data required to manage the output 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 output buffer. |
Flit |
getBufferData(int vcId)
Retrieve the flit from the specified virtual channel number of this output buffer object. |
int |
getFreeVC_NEW(Flit f)
An alternative of the getFreeVC() |
int |
getFreeVC()
Returns a free virtual channel on the physical link. |
int |
getNumSlotUsed()
Returns total no. |
int |
getNumUsedVC()
Returns the number of used VCs in a particular simulation cycle. |
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. |
Flit |
removeBufferData(int vcId,
int curCycle)
Remove the flit from the specified virtual channel of the output buffer. |
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 pLinkNo
private int numVCCount
private int[] flitCounter
private boolean[] buffMidStatus
private boolean[] buffAssignedStatus
Constructor Detail |
---|
public OutputVCBuffer(int linkNo)
linkNo
- Physical link nopublic OutputVCBuffer(int vcCount, int linkNo)
vcCount
- Number of virtual channel for the output 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 void updateStatusAfterCycle()
public Flit getBufferData(int vcId)
vcId
- virtual channel number
public boolean hasFreeSlotInVC(int vcId)
vcId
- Virtual channel no.
public int getFreeVC()
public int getFreeVC_NEW(Flit f)
f
- flit to get its input vc no
public boolean hasFlitToSend(int vcId)
vcId
- Virtual channel no.
public int getNumUsedVC()
public int getNumSlotUsed()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |