Performance analysis of adaptive wormhole routing in a two-dimensional torus