|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectMeshRouter
public class MeshRouter
The MeshRouter class is the implementation of the Router interface for the Mesh Network.
This version contains an implementation of the deterministic XY routing algorithm for the Mesh Network. To incorporate a different algorithm, modify the determineRoute() method, or you might want to change the class altogether.
Constructor Summary | |
---|---|
MeshRouter()
|
Method Summary | |
---|---|
int |
determineRoute(int source,
int dest,
int switchAddr)
Implementation of the determineRoute() method of the Router interface. |
private int |
mesh8_static_route(int source,
int dest,
int switchAddr)
Deterministic XY routing algorithm for the Mesh Network. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MeshRouter()
Method Detail |
---|
public int determineRoute(int source, int dest, int switchAddr)
Implementation of the determineRoute() method of the Router interface. Returns which path the flit passed be transmitted to ultimately reach the destination.
To incorporate a different routing algorithm, make necessary modifications.
determineRoute
in interface Router
source
- address of the source nodedest
- address of the destination nodeswitchAddr
- address of the switch where the routing is taking place
private int mesh8_static_route(int source, int dest, int switchAddr)
Deterministic XY routing algorithm for the Mesh Network.
This method determines the next path to be taken in the switch having switchAddr by using the X-Y routing algorithm. The algorithm turns the offsets (differences of x and y coordinate value between the source and destination) into zero. If the both the offset is zero then destination is reached. For this first the flits are transferred in one direction (let Y-axis). When the offset in that direction is zero then the flits are transferred in other direction (here X-axis).
This routing algorithm performs in the following way.
source
- dest
- switchAddr
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |