• Keine Ergebnisse gefunden

2.4 Routing Algorithms

2.4.4 Routing Algorithms with Virtual Channels

2.4 ROUTINGALGORITHMS 29 Alg. 4 describes the minimal adaptive Last routing algorithm. In the North-Last routing algorithm, packets will be routed at last to North direction after East direc-tion when Xof f set > 0 and Yof f set > 0, as well as at last to North direction after West direction when Xof f set < 0 and Yof f set > 0. Therefore, this adaptive routing algorithm is calledLast Adaptive Routing Algorithm. The degree of adaptiveness of the North-Last adaptive routing algorithm is presented in Equ.2.4.

Alg. 4Minimal Adaptive North-Last (NL) Routing Algorithm

1: Xof f set=XtargetXsource

2: Yof f set=YtargetYsource

3: ifXof f set= 0andYof f set= 0then 4: Routing=LOCAL

5: else ifXof f set>0andYof f set<0then 6: Routing=Select(EAST, SOU T H) 7: else ifXof f set>0andYof f set0then 8: Routing=EAST

9: else ifXof f set<0andYof f set<0then 10: Routing=Select(W EST, SOU T H) 11: else ifXof f set<0andYof f set0then 12: Routing=W EST

13: else ifXof f set= 0andYof f set>0then 14: Routing=N ORT H

15: else ifXof f set= 0andYof f set<0then 16: Routing=SOU T H

17: end if

Anorthlast =

(∆x+ ∆y)!

∆x!∆y! , Ytarget ≤Ysource

1, otherwise

(2.4)

The other well-known adaptive routing algorithm based on the turn models is the adaptive routing based on Odd-Even Turn Model that was firstly introduced in [48]. In this approach, the allowed and prohibited turns in the odd and in the even column of the mesh-based network can be different, but must be still able to guarantee free from deadlock configuration.

(a)X+Subnet (Virtual Net 0) (b) XSubnet (Virtual Net 1)

Fig. 2.15: Mesh Network separated into two virtual networks.

As presented in figure, the virtual networks are calledX+Subnet or Virtual Network 0 as shown in Fig.2.15(a)andXSubnet or Virtual Network 1 as presented in Fig.2.15(b).

In the X+ virtual network, packets can be routed adaptively from West to North and from North to East, as well as from West to South and from South to East. While in the X virtual network, routing from East to North and from North to West, as well as routing from East to South and from South to West are allowed. The proposed network partitioning has been introduced in [47] as a 2D planar adaptive routing algorithm with 2 virtual channels for the two virtual networks. The degree of adaptiveness of the 2D Planar Adaptive Routing Algorithm is shown in Equ.2.5.

Anegf irst =

1, Xtarget =Xsourceor Ytarget =Ysource

(∆x+ ∆y)!

∆x!∆y! , otherwise (2.5)

If the offset between target and source node is greather than zero, i.e. Xof f set = Xtarget−Xsource ≥0, then packets will be routed throughX+Virtual Network. While if the offset between target and source node is less than zero, i.e. Xof f set =Xtarget−Xsource ≤0, then packets will be routed throughXVirtual Network. If theXof f set = 0, then packets can be routed either throughX+orXVirtual Network. Once packets have been routed in the X+ Virtual Network, they will not be routed in theX Virtual Network. In con-trast, once packets have been routed in theX Virtual Network, they will not be routed in theX+Virtual Network. By implementing such routing rules, deadlock configurations can be avoided.

A deadlock-free routing algorithm can be also obtained by allowing packets being routed from the X+ Virtual Network to the X Virtual Network. But once the packets migrate from the X+ Virtual Network into the X Virtual Network, they will not be routed back to theX+Virtual Network. As an alternative, once the packets migrate from theXVirtual Network into theX+Virtual Network, they will not be routed back to the XVirtual Network.

2.4 ROUTINGALGORITHMS 31

virtual channel

physical channel X+ intrarouter connection X− intrarouter connection VC 0

VC 1

VC 0 VC 1

West East

West East

NorthSouth

Router 2 Router 1

SouthNorth

for the Virtual Output Buffers

Channels Channels Input Buffers for the Virtual

(a) 2 switches with VCs

In

West East

Out

Out In

NorthSouth

In Out

Out In

VC 1VC 0 VC 0 VC 1

VC 1

VC 0 VC 0 VC 1

(b) Intra IO paths

Fig. 2.16: Two switches connected with virtual channels and the intra-IO interconnect paths of the switch.

When both virtual networks are combined in a mesh network with full-duplex in-terconnection, then two virtual channels connecting North and South ports must be im-plemented. In the full-duplex interconnection between two adjacent nodes, two single direction physical channels are used to connect the input and output ports between two adjacent port lines of the adjacent nodes. Fig.2.16(a) presents two network routers, i.e.

Router 1and Router 2, connected with virtual channels through their North and South Input-Output ports.

As presented in Fig. 2.16(a), the South-to-North physical linkconnecting the South out-put port of the Router1with the North input port of the Router2consists of two virtual channels. Each virtual channel consists of two physical buffers, one is placed at the input port and the other is located at the output port. Similarly,North-to-South physical link con-necting the North output port of the Router 2with the South input port of the Router1 consists of two virtual channels. The virtual channels are assigned with virtual channel ID 0 (V C0) and virtual channel ID 1 (V C1), respectively.

Packets routed through X+ subnet will be routed through the V C 0, and packets routed throughXsubnet will be routed through theV C 1. The arrow lines presented in Fig.2.16(a)are the physical and the virtual channels of the router. The figure also shows possible turns of routing paths that can be made by the packets throughV C0andV C1.

For example, a packet routed from the West input port of the Router 1 can be routed to the North output port through V C 0, and a packet routed from the East input port of the Router 1 can be routed to the North output port through V C 1. After the packets routed from Router 1 throughV C 0has entered Router 2, then this packet can be routed

adaptively to either theV C 0at the South output port or to the East output port. Mean-while, after the packets routed from Router 1 through V C 1 has entered Router 2, then this packet can be routed adaptively to either theV C1at the South output port or to the West output port.

Alg.5shows the deadlock-free minimal adaptive routing algorithm with VCs for the 2-subnetwork interconnection presented in the Fig.2.15and the switch structure depicted in Fig. 2.16(b). In the Fig. 2.16, the Local IO port connecting the mesh router with a compute element is not presented for the sake of simplicity. As presented in the Alg. 5 and in the Fig.2.16(b), routing paths through theX+Sub-Net is done through the virtual channel ID0 (V C 0), while routing paths through the X−Sub-Net is done through the virtual channel ID1(V C1). The all allowable intra IO crossbar interconnects in the switch with the VCs for both Sub-Nets is presented in the Fig.2.16(b).