• 検索結果がありません。

There are many ways in which this thesis can be extended. Some of the possible areas are recommended below:

Various levels of inter-connectivity has not been studied in this research, which can be a special factor for achieving the high performance of 3D-TESH network.

The dynamic performance comparison against the 5D-torus and Tofu networks has not been studied here, which can also be an important factor in implementing 3D-TESH network in real systems.

References

1. W.J. Dally, Performance Analysis of k-ary cube Interconnection Net-works”, IEEE Trans. Comput., vol. 39, pp. 775-785, June 1990.

2. Daniel Sanchez, George Michelogiannakis, Christos Kozyrakis, An analysis of on-chip interconnection networks for large-scale chip multi-processors , ACM Transactions on Architecture and Code Optimiza-tion, Vol. 7, Issue 1, Article 4, April 2010.

3. M.M. Hafizur Rahman, Susumu Horiguchi, HTN: a new hierarchi-cal interconnection network for massively parallel computers”, IEICE Trans. on Information and Systems, Vol. E86-D, pp. 1479-1486, 2003.

4. Ajima, Y.; Inoue, T.; Hiramoto, S.; Takagi, Y. ; Shimizu, T. The Tofu Interconnect , Micro, IEEE, DOI. 10.1109/HOTI.2011.21, Vol.

32, pp. 21-31, JAN-FEB. 2012.

5. V.K. Jain, T.Ghirmai, and S.Horiguchi, TESH:A new hierarichical in-terconnection network for massively parallel computing”,IEICE Trans.

on Inf. & Syst., vol. E80-D, pp. 837-846, 1997.

6. M.M. Hafizur Rahman, Yukinori Sato and Yasushi Inoguchi, High and stable performance under adverse traffic patterns of tori-connected torus network”, Computers & Electrical Engineering, vol. 39, pp. 973-983, 2013.

7. M.M. Hafizur Rahman, Yasushi Inoguchi, Faiz Al Faisal and Monz Kumar Kundu, Symmetric and Folded Tori Connected Torus Net-work”, Journal of Networks, Academy Publisher, DOI. 10.1109/IC-CIT.2009.5407144, Vol. 6, No. 1, pp. 26-35, Jan., 2011.

8. M.M. Hafizur Rahman, Yasushi Inoguchi, Yukinori Sato, Yasuyuki Miura, Susumu Horiguchi, Dynamic Communication Performance of the TESH Network under Non-uniform Traffic Patterns”, Proc. of the ICCIT, pp. 365-370, 2008.

9. Interconnection Networks, CMU 15-418, Spring 2012, http://www.cs.cmu.edu/

10. K computer, Tofu interconnect, http://en.wikipedia.org/wiki/K computer 11. The 6D Mesh/Torus Interconnect of K computer,

http://www.fujitsu.com/downloads/TC/sc10/interconnect-of-k-computer.pdf 12. Turing, IBM Blue Gene/Q Hardware configuration, Jan 7, 2015.

(http://www.idris.fr/eng/turing/hw-turing-eng.html)

13. Topics in parallel computing, Virtual channels and deadlocks, (http://pages.cs.wisc.edu/ tvrdik/8/html/Section8.html)

14. Pablo Abad, Pablo Prieto, Lucia G. Menezo, Adrian Colaso, Valentin Puente, Jose-Angel Gregorio, TOPAZ: An Open- Source Intercon-nection Network Simulator for Chip Multiprocessors and Supercomput-ers”,Sixth IEEE/ACM International Symposium on Networks-on-Chip (NoCs), DOI. 10.1109/NOCS.2012.19, pp. 99-106, 2012.

15. M.M. Hafizur Rahman, Yukinori Sato, and Yasushi Inoguchi, Dy-namic Communication Performance Enhancement in Hierarchical Torus Network by Selection Algorithm ,Journal of Networks, DOI. 10.1109/IC-CITECHN.2010.5723855, Vol. 7, No. 3, March 2012.

16. Ikki Fujiwara, Michihiro Koiuchi, Henri Casanova, Cabinet Layout Optimization of Supercomputer Topologies for Shorter Cable Length”, 13th International Conference on Parallel and Distributed Computing, DOI. 10.1109/PDCAT.2012.86, pp. 227232, Dec. 2012.

17. M. Yokokawa, F. Shoji, A. Uno, Motoyoshi Kurokawa, T. Watan-abe, The K computer: Japanese next-generation supercomputer de-velopment project”, Low Power Electronics & Design, IEEE, DOI.

10.1109/ISLPED.2011.5993668, pp. 371-372, 2011.

18. Andrew B. Kahng, Bin Li, Li-Shiuan Peh, Kambiz Samadi, ”ORION 2.0: A Power-Area Simulator for Interconnection Networks”, IEEE Transactions on Very Large Scale Integration (VLSI) Systems, DOI.

10.1109/TVLSI.2010.2091686, vol. 20, Issue. 1, March 2011.

19. Agarwal, N., Krishna, T., Li-Shiuan Peh, Jha, N.K., GARNET: A de-tailed on-chip network model inside a full-system simulator”,IEEE In-ternational Symposium on Performance Analysis of Systems and Soft-ware, DOI. 10.1109/ISPASS.2009.4919636, pp. 33-42, 26-28 April, 2009.

20. Hoyeol Cho, Pawan Kapur, Krishna C. Saraswat, ”Power Comparison Between High-Speed Electrical and Optical Interconnects for Interchip Communication”, Journal of Lightwave Technology, DOI. 10.1109/I-ITC.2004.1345710, VOL. 22, NO. 9, September 2004.

21. J.A. Gregorio, R. Beivide, F. Vallejo, Modeling of interconnection sub-systems for massively parallel computers”,Performance Evaluation 47, DOI. 10.1016/S0166-5316(01)00058-X, pp. 105-129. February 2002.

22. Qutaibah M. Malluhi and Magdy A. Bayoumi, The Hierarchical Hypercube: A New Interconnection Topology for Massivelv Parallel Svstems”, IEEE Transaction on parallel and distributed systems, DOI.

10.1109/71.262585, vol. 5, no. 1, Janu. 1994.

Publications

Faiz Al Faisal, ○ M.M. Hafizur Rahman, Yasushi Inoguchi, Dy-namic Communication Performance of TTN with Uniform and Non-uniform Traffic Patterns using Virtual Cut-Through Flow Control , International Conference on Advanced Computer Science Applications and Technologies (ACSAT2014), 2014, in press.

○ Faiz Al Faisal, M.M. Hafizur Rahman, Yasushi Inoguchi, ”Dynamic Communication Performance of STTN under various Traffic Patterns using Virtual Cut-Through Flow Control”, International Conference on Frontier of Computer Science and Technology (FCST2014), 2014, in press.

○Faiz Al Faisal, Yukinori Sato, Yasushi Inoguchi, Introduction of a New Interconnection Network that achieves high performance for Many-Core Processors , Presented in JHES, 2014, in press.

Appendix A

Routing program for 3D-TESH(2, L, 0)

#include <i o s t r e a m>

#include <s t d i o . h>

#include <math . h>

#include <c s t d l i b>

#define DIMENSION 4

i n t o u t l e t x (i n t s , i n t d , i n t L , i n t VH, i n t r o u t e d i r ) {

i n t o u t l e t n o d e x ;

i f (VH == 1 and r o u t e d i r == 0 ){

i f ( L == 2 ) return o u t l e t n o d e x = 0 ; e l s e i f ( L == 3 ) return o u t l e t n o d e x = 0 ;

e l s e i f ( ( L % 2 ) == 0 ) return o u t l e t n o d e x = 0 ; e l s e i f ( ( L % 2 ) != 0 ) return o u t l e t n o d e x = 3 ; e l s e return 1; }

i f (VH == 0 and r o u t e d i r == 0 ){

i f ( L == 2 )return o u t l e t n o d e x = 3 ; i f ( L == 3 ) return o u t l e t n o d e x = 3 ;

e l s e i f ( ( L % 2 ) == 0 ) return o u t l e t n o d e x = L 2 ; e l s e i f ( ( L % 2 ) != 0 ) return o u t l e t n o d e x = L 3 ; e l s e return 1;}

i f (VH == 1 and r o u t e d i r == 1 ) {

i f ( L == 2 ) return o u t l e t n o d e x = 0 ;

e l s e i f ( L == 3 ) return o u t l e t n o d e x = 0 ; e l s e i f ( ( L % 2 ) == 0 ) return o u t l e t n o d e x = 0 ; e l s e i f ( ( L % 2 ) != 0 ) return o u t l e t n o d e x = 3 ; e l s e return 1; }

i f (VH == 0 and r o u t e d i r == 1 ) {

i f ( L == 2 ) return o u t l e t n o d e x = 3 ; e l s e i f ( L == 3 ) return o u t l e t n o d e x = 3 ;

e l s e i f ( ( L % 2 ) == 0 ) return o u t l e t n o d e x = L 3 ; e l s e i f ( ( L % 2 ) != 0 ) return o u t l e t n o d e x = L 4 ; e l s e return 1; }

}

i n t o u t l e t y (i n t s , i n t d , i n t L , i n t VH, i n t r o u t e d i r ) {

i n t o u t l e t n o d e y ;

i f (VH == 1 and r o u t e d i r == 0 ) {

i f ( L == 2 ) return o u t l e t n o d e y = 0 ; e l s e i f ( L == 3 ) return o u t l e t n o d e y = 3 ;

e l s e i f ( ( L % 2 ) == 0 ) return o u t l e t n o d e y = L 2 ; e l s e i f ( ( L % 2 ) != 0 ) return o u t l e t n o d e y = L 3 ; e l s e return 1;

}

i f (VH == 0 and r o u t e d i r == 0 ) { i f ( L == 2 ) return o u t l e t n o d e y = 0 ; e l s e i f ( L == 3 ) return o u t l e t n o d e y = 3 ;

e l s e i f ( ( L % 2 ) == 0 ) return o u t l e t n o d e y = 0 ; e l s e i f ( ( L % 2 ) != 0 ) return o u t l e t n o d e y = 3 ; e l s e return 1;

}

i f (VH == 1 and r o u t e d i r == 1 ) {

i f ( L == 2 ) return o u t l e t n o d e y = 0 ; e l s e i f ( L == 3 ) return o u t l e t n o d e y = 3 ;

e l s e i f ( ( L % 2 ) == 0 ) return o u t l e t n o d e y = L 3 ; e l s e i f ( ( L % 2 ) != 0 ) return o u t l e t n o d e y = L 4 ; e l s e return 1;

}

i f (VH == 0 and r o u t e d i r == 1 ) { i f ( L == 2 ) return o u t l e t n o d e y = 0 ; e l s e i f ( L == 3 ) return o u t l e t n o d e y = 3 ; e l s e i f ( ( L % 2 ) == 0 ) return o u t l e t n o d e y = 0 ; e l s e i f ( ( L % 2 ) != 0 ) return o u t l e t n o d e y = 3 ; e l s e return 1;

} }

i n t r e c e i v i n g n o d e x (i n t s , i n t d , i n t L , i n t VH, i n t r o u t e d i r ) {

i n t r e c e i v i n g n o d e x ;

i f (VH == 1 and r o u t e d i r == 0 ) {

i f ( L == 2 ) return r e c e i v i n g n o d e x = 0 ; e l s e i f ( L == 3 ) return r e c e i v i n g n o d e x = 0 ; e l s e i f ( ( L % 2 ) == 0 ) return r e c e i v i n g n o d e x = 0 ; e l s e i f ( ( L % 2 ) != 0 ) return r e c e i v i n g n o d e x = 3 ; e l s e return 1;

}

i f (VH == 0 and r o u t e d i r == 0 ) {

i f ( L == 2 ) return r e c e i v i n g n o d e x = 3 ; e l s e i f ( L == 3 ) return r e c e i v i n g n o d e x = 3 ;

e l s e i f ( ( L % 2 ) == 0 ) return r e c e i v i n g n o d e x = L 3 ; e l s e i f ( ( L % 2 ) != 0 ) return r e c e i v i n g n o d e x = L 4 ; e l s e return 1;

}

i f (VH == 1 and r o u t e d i r == 1 ) {

i f ( L == 2 ) return r e c e i v i n g n o d e x = 0 ; e l s e i f ( L == 3 ) return r e c e i v i n g n o d e x = 0 ; e l s e i f ( ( L % 2 ) == 0 ) return r e c e i v i n g n o d e x = 0 ; e l s e i f ( ( L % 2 ) != 0 ) return r e c e i v i n g n o d e x = 3 ; e l s e return 1;

}

i f (VH == 0 and r o u t e d i r == 1 ) {

i f ( L == 2 ) return r e c e i v i n g n o d e x = 3 ; e l s e i f ( L == 3 ) return r e c e i v i n g n o d e x = 3 ;

e l s e i f ( ( L % 2 ) == 0 ) return r e c e i v i n g n o d e x = L 2 ; e l s e i f ( ( L % 2 ) != 0 ) return r e c e i v i n g n o d e x = L 3 ; e l s e return 1;

} }

i n t r e c e i v i n g n o d e y (i n t s , i n t d , i n t L , i n t VH, i n t r o u t e d i r ) {

i n t r e c e i v i n g n o d e y ;

i f (VH == 1 and r o u t e d i r == 0 ) {

i f ( L == 2 ) return r e c e i v i n g n o d e y = 0 ; e l s e i f ( L == 3 ) return r e c e i v i n g n o d e y = 3 ;

e l s e i f ( ( L % 2 ) == 0 ) return r e c e i v i n g n o d e y = L 3 ;

e l s e i f ( ( L % 2 ) != 0 ) return r e c e i v i n g n o d e y = L 4 ; e l s e return 1;

}

i f (VH == 0 and r o u t e d i r == 0 ) {

i f ( L == 2 ) return r e c e i v i n g n o d e y = 0 ; e l s e i f ( L == 3 ) return r e c e i v i n g n o d e y = 3 ;

e l s e i f ( ( L % 2 ) == 0 ) return r e c e i v i n g n o d e y = 0 ; e l s e i f ( ( L % 2 ) != 0 ) return r e c e i v i n g n o d e y = 3 ; e l s e return 1;

}

i f (VH == 1 and r o u t e d i r == 1 ) {

i f ( L == 2 ) return r e c e i v i n g n o d e y = 0 ; e l s e i f ( L == 3 ) return r e c e i v i n g n o d e y = 3 ;

e l s e i f ( ( L % 2 ) == 0 ) return r e c e i v i n g n o d e y = L 2 ; e l s e i f ( ( L % 2 ) != 0 ) return r e c e i v i n g n o d e y = L 3 ; e l s e return 1;

}

i f (VH == 0 and r o u t e d i r == 1 ) {

i f ( L == 2 ) return r e c e i v i n g n o d e y = 0 ; e l s e i f ( L == 3 ) return r e c e i v i n g n o d e y = 3 ; e l s e i f ( ( L % 2 ) == 0 ) return r e c e i v i n g n o d e y = 0 ; e l s e i f ( ( L % 2 ) != 0 ) return r e c e i v i n g n o d e y = 3 ; e l s e return 1;

} }

// D e f i n e s t h e r o u t e d i r e c t i o n f o r message r o u t i n g . . . i n t SP Routing (i n t s ,i n t d ,i n t L ,i n t i )

{

i n t r o u t e d i r = 0 ;

i f ( ( ( d [ i ] s [ i ] + 4 ) % 4 ) > 4 / 2 ) {

return r o u t e d i r = 1 ; }

e l s e i f ( ( ( ( d [ i ] s [ i ] + 4 ) % 4 ) == 4 / 2 ) ) {

i f ( ( L % 2 ) == 0 ) {

i f ( ( i % 2 ) == 0 ) {return r o u t e d i r = 0 ;} e l s e {return r o u t e d i r = 1 ;}

} e l s e {

i f ( ( i % 2 ) == 0 ) {return r o u t e d i r = 1 ;} e l s e {return r o u t e d i r = 0 ;}

}e l s e{ }

return r o u t e d i r = 0 ; } }

long BM routing (i n t sy , i n t sx ,i n t sZ , i n t dy , i n t dx , i n t dZ ) {

long d i a m e t e r = 0 ;

i n t movedir = 0 ; // 0 i s f o r p o s i t i v e move and 1 i s f o r n e g a t i v e move i n t d e l z = dZ sZ ;

i n t d e l x = dx s x ; i n t d e l y = dy s y ;

i f ( ( d e l z > 0 and d e l z <= 2 ) or ( d e l z < 0 and d e l z == 3)) {movedir = 0 ;} i f ( ( d e l z > 0 and d e l z == 3 ) or ( d e l z < 0 and d e l z >= 2)) {movedir = 1 ;} i f ( movedir == 0 and d e l z > 0 ) {d e l z = d e l z ;}

i f ( movedir == 0 and d e l z < 0 ) {d e l z = d e l z + 2 ;} i f ( movedir == 1 and d e l z < 0 ) {d e l z = d e l z ;} i f ( movedir == 1 and d e l z > 0 ) {d e l z = d e l z 2 ;} while( d e l z != 0 )

{

i f ( d e l z > 0 ) {d e l z = d e l z 1 ; i f ( sZ + 1 >= 4 ) {sZ = 4 + sZ + 1 ;} e l s e {sZ = sZ + 1 ;}} // move t h e p a c k e t t o +z d i r e c t i o n

i f ( d e l z < 0 ) {d e l z = d e l z + 1 ; i f ( sZ 1 < 0 ) {sZ = 4 + sZ 1 ;} e l s e {sZ = sZ 1 ;}} // move t h e p a c k e t t o z d i r e c t i o n

}

while( d e l x != 0 ) {

i f ( d e l x > 0 ) {d e l x = d e l x 1 ; i f ( s x + 1 >= 4 ) {s x = 4 + s x + 1 ;} e l s e {s x = s x + 1 ;}} // move t h e p a c k e t t o +x d i r e c t i o n

i f ( d e l x < 0 ) {d e l x = d e l x + 1 ; i f ( s x 1 < 0 ) {s x = 4 + s x 1 ;} e l s e {s x = s x 1 ;}} // move t h e p a c k e t t o x d i r e c t i o n

}

while( d e l y != 0 ) {

i f ( d e l y > 0 ) {d e l y = d e l y 1 ; i f ( s y + 1 >= 4 ) {s y = 4 + s y + 1 ;}

e l s e {s y = s y + 1 ;}} // move t h e p a c k e t t o +y d i r e c t i o n

i f ( d e l y < 0 ) {d e l y = d e l y + 1 ; i f ( s y 1 < 0 ) {s y = 4 + s y 1 ;} e l s e {s y = s y 1 ;}} // move t h e p a c k e t t o y d i r e c t i o n

} }

long Routing (i n t s10 , i n t s9 ,i n t s8 , i n t s7 , i n t s6 , i n t s5 , i n t s4 ,i n t s3 ,i n t s2 , i n t s1 ,i n t s0 ,i n t d10 , i n t d9 ,i n t d8 , i n t d7 , i n t d6 , i n t d5 , i n t d4 ,i n t d3 ,i n t d2 , i n t d1 ,i n t d0 ) {

i n t d [ 1 1 ] = { d0 , d1 , d2 , d3 , d4 , d5 , d6 , d7 , d8 , d9 , d10}; i n t s [ 1 1 ] = { s0 , s1 , s2 , s3 , s4 , s5 , s6 , s7 , s8 , s9 , s 1 0}; i n t t [ 1 1 ] = {0};

i n t o u t l e t n o d e x= 0 ; i n t o u t l e t n o d e y= 0 ; i n t d i a m e t e r = 0 ;

i n t r o u t e d i r = 0 ; // 0 i s f o r p o s i t i v e and 1 i s f o r n e g a t i v e move f o r (i n t i = 1 0 ; i>=3; i−−)

{

r o u t e d i r = SP Routing ( s , d , f l o o r ( ( i1)/2 + 1 ) , i ) ;

i f ( r o u t e d i r == 0 ) { t [ i ] = ( d [ i ] s [ i ] + 4 ) % 4 ; } e l s e { t [ i ] = 4 ( ( d [ i ] s [ i ] + 4 ) % 4 ) ; } while( t [ i ] != 0 )

{

i f ( ( i % 2 ) == 1 ) {

o u t l e t n o d e x = o u t l e t x ( s , d , f l o o r ( ( i1)/2 + 1 ) , 0 , r o u t e d i r ) ; o u t l e t n o d e y = o u t l e t y ( s , d , f l o o r ( ( i1)/2 + 1 ) , 0 , r o u t e d i r ) ; }

e l s e {

o u t l e t n o d e x = o u t l e t x ( s , d , f l o o r ( ( i1)/2 + 1 ) , 1 , r o u t e d i r ) ; o u t l e t n o d e y = o u t l e t y ( s , d , f l o o r ( ( i1)/2 + 1 ) , 1 , r o u t e d i r ) ; }

BM routing ( s [ 2 ] , s [ 1 ] , 0 , o u t l e t n o d e y , o u t l e t n o d e x , 0 ) ; i f ( r o u t e d i r == 0 ) {i f ( s [ i ] + 1 >= 4 ) s [ i ]= 4 + s [ i ] + 1 ; e l s e {s [ i ] = s [ i ] + 1 ;}} // move t h e p a c k e t t o t h e n e x t BM

e l s e {i f ( s [ i ] 1 < 0 ) s [ i ]= 4 + s [ i ] 1 ; e l s e {s [ i ] = s [ i ] 1 ;}}

// move t h e p a c k e t t o t h e p r e v i o u s BM i f ( t [ i ] > 0 ) t [ i ] = t [ i ] 1 ; i f ( t [ i ] < 0 ) t [ i ] = t [ i ] + 1 ;

i f ( ( i % 2 ) == 1 ) {

s [ 1 ] = r e c e i v i n g n o d e x ( s , d , f l o o r ( ( i1)/2 + 1 ) , 0 , r o u t e d i r ) ; s [ 2 ] = r e c e i v i n g n o d e y ( s , d , f l o o r ( ( i1)/2 + 1 ) , 0 , r o u t e d i r ) ; }

e l s e {

s [ 1 ] = r e c e i v i n g n o d e x ( s , d , f l o o r ( ( i1)/2 + 1 ) , 1 , r o u t e d i r ) ; s [ 2 ] = r e c e i v i n g n o d e y ( s , d , f l o o r ( ( i1)/2 + 1 ) , 1 , r o u t e d i r ) ; } }

}

BM routing ( s [ 2 ] , s [ 1 ] , s [ 0 ] , d [ 2 ] , d [ 1 ] , d [ 0 ] ) ; }

i n t main (void) {

// / S o u r c e Node . . . . i n t s 1 0 = 0 ; i n t s 9 = 0 ;

i n t s 8 = 0 ; i n t s 7 = 0 ;

i n t s 6 = 1 ; i n t s 5 = 2 ;

i n t l 2 s 4 = 1 ; i n t l 2 s 3 = 2 ;

i n t s 2 = 1 ; i n t s 1 = 2 ; i n t s 0 = 0 ;

// / D e s t i n a t i o n Node . . . . i n t d10 = 0 ; i n t d9 = 0 ;

i n t d8 = 0 ; i n t d7 = 0 ;

i n t d6 = 2 ; i n t d5 = 1 ;

i n t d4 = 2 ; i n t d3 = 1 ;

i n t d2 = 2 ; i n t d1 = 1 ; i n t d0 = 0 ;

Routing ( s10 , s9 , s8 , s7 , s6 , s5 , s4 , s3 , s2 , s1 , s0 , d10 , d9 , d8 , d7 , d6 , d5 , d4 , d3 , d2 , d1 , d0 ) ;

return 0 ; }

Appendix B

Virtual channel implementation at Topaz simulator [14]

i n t g e t V n e t ( ) const {

return m vnet ; }

B o o l e a n c l e a n I n t e r f a c e s ( ) const { return m C l e a n I n t e r f a c e s ; } void s e t C l e a n I n t e r f a c e s ( B o o l e a n v a l u e )

{ m C l e a n I n t e r f a c e s = v a l u e ; }

//∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗

// f : v i r t u a l v o i d i n i t i a l i z e ( ) ; // d :

//∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗

void TPZSimpleRouterFlowTorus : : i n i t i a l i z e ( ) {

I n h e r e i t e d : : i n i t i a l i z e ( ) ;

m vnets =(( TPZSimpleRouter&)getComponent ( ) ) . g e t V n e t s ( ) ;

m p o r t s =(( TPZSimpleRouter&)getComponent ( ) ) . numberOfInputs ( ) ; unsigned p o r t s=m vnetsm p o r t s +1;

m c h a n g e D i r e c t i o n=new B o o l e a n [ p o r t s ] ;

f o r(i n t i =0; i<p o r t s ; i ++) {

m c h a n g e D i r e c t i o n [ i ] = f a l s e; }

}

B o o l e a n TPZSimpleRouterFlowTorus : : i n p u t R e a d i n g ( ) {

unsigned o u t P o r t ; unsigned i n P o r t ;

unsigned v i r t u a l C h a n n e l ; c l e a n O u t p u t I n t e r f a c e s ( ) ;

//∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗

// PART 4 : Loop t h r o u g h a l l o u t p u t p o r t s .

// We move t h e d a t a f l i t s f o r a l r e a d y e s t a b l i s h e d c o n n e c t i o n s //∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗

f o r( o u t P o r t = 1 ; o u t P o r t <= m p o r t s ; o u t P o r t++) {

// Find t h e i n p u t p o r t a s s i g n e d t o o u t p o r t . // I f n o t a s s i g n e d , go t o t h e n e x t .

i f( ! ( i n P o r t = m c o n n e c t i o n s [ o u t P o r t ] ) ) {

continue; }

v i r t u a l C h a n n e l =( i n P o r t1)/ m p o r t s +1;

i f( i n P o r t % m p o r t s == 0 ) {

v i r t u a l C h a n n e l=m r o u t i n g [ i n P o r t ]>g e t V n e t ( ) ; i f( i n P o r t>m p o r t s )continue;

}

i f( o u t P o r t == m p o r t s ) v i r t u a l C h a n n e l =1;

// I f t h e r e i s a message r o u t i n g i f( ! ( m r o u t i n g t i m e [ i n P o r t ]−− ) ) {

TPZMessage mess=m r o u t i n g [ i n P o r t ] ; m r o u t i n g [ i n P o r t ] = 0 ;

}

o u t p u t I n t e r f a z ( o u t P o r t)>sendData ( mess , v i r t u a l C h a n n e l ) ; } }

//∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗

// PART 3 : P r o c e s s t h e c o n n e c t i o n o f t h e c r o s s b a r // t h e t o k e n i s t o b e round r o b i n a r b i t r a t i o n

//∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗

i n P o r t = m p o r t sm vnets ; m token = 0 ;

i n t i ;

f o r( i = 0 ; i < m p o r t sm vnets ; i ++, i n P o r t = i n P o r t 1 ) {

v i r t u a l C h a n n e l =( i n P o r t1)/ m p o r t s +1;

// E x t r a c t t h e o u t p u t p o r t

o u t P o r t = extractOutputPortNumber ( m r o u t i n g [ i n P o r t ] ) ;

i f( i n P o r t == m p o r t s ) {

v i r t u a l C h a n n e l=m r o u t i n g [ i n P o r t ]>g e t V n e t ( ) ; i f( i n P o r t>m p o r t s )continue;

}

i f( o u t P o r t == m p o r t s ) v i r t u a l C h a n n e l =1;

i f( o u t p u t I n t e r f a z ( o u t P o r t)>i s S t o p A c t i v e ( v i r t u a l C h a n n e l ) ) {

i f( ! m token ) m token = i n P o r t ; continue;

}

// i f we a r e c h a n g i n g d i r e c t i o n o r i n j e c t i n g , b u b b l e must b e v e r i f i e d i f( ! m c o n n e c t i o n s [ o u t P o r t ] &&

( ! m c h a n g e D i r e c t i o n [ i n P o r t ] | |

bubbleReady ( o u t P o r t+m p o r t s( v i r t u a l C h a n n e l1)) ) ) {

// Occupy t h e p o r t

m c o n n e c t i o n s [ o u t P o r t ] = i n P o r t ; }

e l s e {

// I f t h i s i s t h e f i r s t p o r t r e j e c t e d i n t h i s round // s e r v e i t f i r s t i n t h e f o l l o w i n g round

i f( ! m token ) {

m token = i n P o r t ; } }

}

// No p o r t s were r e j e c t e d

i f( ! m token ) m token = i n P o r t ;

//∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗

// PART 2 : Loop t h r o u g h a l l t h e r o u t i n g

// F i l l i n g t h o s e t h a t a r e empty w i t h d a t a from t h e f i f o

//∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗

f o r( i n P o r t = 1 ; i n P o r t <= m p o r t sm vnets ; i n P o r t++) // t h e i n p o r t s from t h e p e r s p e c t i v e o f t h e o u t p u t p o r t {

// I f t h e r o u t i n g i s empty

関連したドキュメント