< previous page page_439 next page >

Page 439
relatively straightforward to determine:
d87111c01013bcda00bb8640fdff6754.gif
(Address mod 2n) mod (2k + 1).
This allows distribution of addresses across an odd number of modules (and in the case of k = 2 and 4, a prime number, 5 and 17).
This translation consists of initially decomposing the mod 2n address into p digits, each of k bits. Thus,
d87111c01013bcda00bb8640fdff6754.gif
Xn-1 X0 mod 2n = Yp-12(p-1)k + + Y222k + Y12k + Y0,
where each Yi is a k-bit grouping of binary bits X.
Now observe that Y0 = Xk-1 X0, and
d87111c01013bcda00bb8640fdff6754.gif
2k mod (2k + 1) = -1 mod (2k + 1)
and
d87111c01013bcda00bb8640fdff6754.gif
22k mod (2k + 1) = +1 mos (2k + 1),
since 22k = 2k..2k, or 22k mod (2k+1) = 2k mod (2k+1)..2k mod (2k+1) = (-1)(-1) = +1.
Finally,
d87111c01013bcda00bb8640fdff6754.gif
Yi2ik mod (2k = Yi(±1) (-1 if i is odd, +1 if i is zero or even).
Thus,
Xn-1 X0 mod (2k + 1)
=
Yp-1 Y0 mod (2k + 1)
=
( + Y4 - Y3 + Y2 - Y1 + Y0) mod (2k + 1).

The pairwise differences can be computed using mod 2k arithmetic with sign extension. The results are summed mod 2k with end-around borrow, since if (Xi + Yj) < 2k + 1:
d87111c01013bcda00bb8640fdff6754.gif
(Xi mod 2k + Yj mod 2k + 1) = (Xi + Yj) mod (2k + 1).
If Xi + Yj = 2k, then Xi + Yj = -1 mod (2k + 1), since 10000 with end-around borrow is 0000 - 1 = -1.
If Xi + Yj = 2k +1, then Xi + Yj = 0, since 10001 with end-around borrow becomes 0001 - 1 = 0.
EXAMPLE 7.1
d87111c01013bcda00bb8640fdff6754.gif
k = 4, 2k + 1 = 17.
Consider a 24-bit mod 224 address:
d5d4d3d2d1d0
6 hex digits

 
< previous page page_439 next page >