|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectTorusRouter
public class TorusRouter
The TorusRouter class is the implementation of the Router interface for the Torus Network.
This version contains an implementation of the deterministic routing algorithm for the Torus Network. To incorporate a different algorithm, modify the determineRoute() method, or you might want to change the class altogether.
Constructor Summary | |
---|---|
TorusRouter()
|
Method Summary | |
---|---|
int |
determineRoute(int source,
int dest,
int switchAddr)
Implementation of the determineRoute() method of the Router interface. |
private int |
torus8_static_route(int source,
int dest,
int switchAddr)
This method also determines the next path to be taken in the switch having switchAddr by using the X-Y routing algorithm. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TorusRouter()
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 torus8_static_route(int source, int dest, int switchAddr)
This method also 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 but with some difference than that of Mesh network. Here the switches are round-way connected along with connection with adjacent switches. So during routing this round-way connection considered for optimal path. Like Mesh, here 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
- address of the source nodedest
- address of the destination nodeswitchAddr
- address of the switch where the routing is taking place
MeshRouter
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |