8/16/2019 PP16 Lec11 IN5 Routing.algo
1/16
1.1
Parallel Processingsp2016
lec# 11
Dr M Shamim Baig
8/16/2019 PP16 Lec11 IN5 Routing.algo
2/16
Routing Algorithms & usageExamples:
1.2
8/16/2019 PP16 Lec11 IN5 Routing.algo
3/16
Static INs:
Routing Algorithms & usageExamples
1.3
8/16/2019 PP16 Lec11 IN5 Routing.algo
4/16
1.4
Self-Routing Algorithm & Usage !ample"2-D/ 3-D/ k-d mesh(non-rap!
Routing-Path (on/ off) multiim-mesh: (a) !-" mesh #ith no #raparoun$
(%) -" mesh #ith no #raparoun
8/16/2019 PP16 Lec11 IN5 Routing.algo
5/16
1.
Self-Routing Algorithm $ Usage !ample"
Path %on/ o""! #$per%ue!'
Routing-Path (on/off net#or') from noe P s () to noe P d ()in a three-imensional h*percu%e using self-routing algorithm
&he 'istance (et)een an* t)o no'es is gi+en (* num(er of (it positions in )hich t)o no'e,s (inar* la(els 'iffer .
8/16/2019 PP16 Lec11 IN5 Routing.algo
6/16
unction (ase' Routing Algorithm $ usagee!ample for *percu(e" Path %on/off net)or
Cube Function: C i (x)=
C i(xd-1 xd-2 … xi ……. x2 x1 x0 )= (xd-1 xd-2 ……xi…. x2 x1 x0 )
where x is d-bit binary node-id for p-node cube, # of dim =d= logp, i is dim index
8/16/2019 PP16 Lec11 IN5 Routing.algo
7/16
"*namic INs:
Routing Algorithms $ usage!amples"
1.
8/16/2019 PP16 Lec11 IN5 Routing.algo
8/161.
5et S (e the (inar* representation of the sourcean' D (e that of the 'estination processor.
&he 'ata tra+erses the lin to the first s)itching
no'e. f the most significant (its of S an' D are
the same7 then the 'ata is route' in pass-throughmo'e (* the s)itch else7 it s)itches to crosso+er.
&his process is repeate' for each of the log p
s)itching stages 'i.
ormal Self-Routing Algorithm for 8mega-9:
$ its usage e!ample ;;;;;;;;
Self-routing approach for +mega-,IN
8/16/2019 PP16 Lec11 IN5 Routing.algo
9/16
Self-routing Algorithm $ Usage Examplein ( x )mega-M*+!
Routing-Paths (on MIN): to route-paths (,,-to- & ,-to-,,! %an e
dran ON the M*+ ith *S.
'2 '1 'o
8/16/2019 PP16 Lec11 IN5 Routing.algo
10/161.10
8mega 9:"
unction %S< $ S= (ase' Routing Approach
5et S (e the (inar* representation of the source
an' D (e that of the 'estination processor.
&he 'ata tra+ersing the lin is 'etermine' (* the
Shuffle S
8/16/2019 PP16 Lec11 IN5 Routing.algo
11/161.11
Shuffle & Exchange unctions
use in +mega-,IN
Shu""le is used as (*S.-0un%tion! & Ex%hange is used as (S1-"un%tion! in )mega M*+
Shuffle Function: S(x)= rotate-left-x
S(xd-1 xd-2 ………. x2 x1 x0 )= (xd-2 xd-3 ………. x1 x0 xd-1 )
Exchange Function: E(x)=
E(xd-1 xd-2 ………. x2 x1 x0 )= (xd-1 xd-2 ………. x2 x1 x0 )
If x is positionID in binary for (p x p), d-stage MI where d= logp !
x= xd-1 xd-2 ………. x2 x1 x0
8/16/2019 PP16 Lec11 IN5 Routing.algo
12/16
examples in ( x )mega-M*+!
1ill 1ork een hen all M*+ links/S1s not
dran
Routing-Paths (on/ off MIN): to route-paths (,,-to- & ,-to-,,! %ane dran ON the M*+ ithout *S. #o aout path OFF the M*+
stage2 stage1 stageo
8/16/2019 PP16 Lec11 IN5 Routing.algo
13/16
Interconnection unctions
8/16/2019 PP16 Lec11 IN5 Routing.algo
14/161.14
Plus-,inus-!i (P,!i) Net#or'
Use' in Prefi!-sum computing %later
8/16/2019 PP16 Lec11 IN5 Routing.algo
15/161.1Butterfl* 9: is use' in & computation
utterfl*-unction
Butterfly Function: B(x)=
B(xd-1 xd-2 ………. x2 x1 x0 )= (x0 xd-2 ………. x2 x1 xd-1 )where x is d-bit binary number where d= logp,
B%110C 011
8/16/2019 PP16 Lec11 IN5 Routing.algo
16/16
Important points for Routing
Di""eren%e eteen Routing in Static s >*namic
interconnection net)or.
Di""eren%e eteen Self-routing s unction
%S< $ S= (ase' routing
Di""eren%e eteen Routing Path identi"i%ation'
D 8: the net)or %static/'*namic
D 8 the net)or (Separate4 not on the netork!
Di""eren%e eteen Appl*%use s =rite %gi+e
Routing Algorithm
1 16