13.07.2015 Views

Efficient canonic signed digit recoding - Universidad de Cantabria

Efficient canonic signed digit recoding - Universidad de Cantabria

Efficient canonic signed digit recoding - Universidad de Cantabria

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

1092G.A. Ruiz, M. Granda / Microelectronics Journal 42 (2011) 1090–1097Since y i takes one of the three values {0, 1, 1¯ }, two bits {y s i , yd i }are necessary to enco<strong>de</strong> it, which are <strong>de</strong>fined from Table 2 as(y d i¼ x i þ 1 ðx i c i 1 Þ¼x i þ 1 d iy s i ¼ x ð10Þi þ 1ðx i c i 1 Þ¼x i þ 1 d iFor the sake of clarity, the following example <strong>de</strong>scribes thedifferent signals used in the CSD <strong>recoding</strong>:X ¼ 001010111Carry ¼ 011111110D ¼ 010101001Y ¼ 010101001In the case of a n-bit two’s complement binary number X, theCSD representation is given byY ¼ x n 1 U2 n 1 þ Xn 2x i U2 i ¼ Xn 1y i U2 ið11Þi ¼ 0i ¼ 0here, only n CSD <strong>digit</strong>s are necessary as the value of the binarynumberislimitedto[ 2 n ,2 n 1 ]. Negative integers in CSD can beobtained trivially from their positive counterpart by changing thesigns of all nonzero <strong>digit</strong>s. For example, the CSD co<strong>de</strong> 0101represents the <strong>de</strong>cimal number 3, while 0101 represents thenumber 3. Therefore, the conversion of a negative n-<strong>digit</strong> two’scomplement binary number X into its CSD representation can beperformed from the well-known property X ¼ X þ1. Then reformulatingthe former equations for the case of a binary number X ina two’s complement representation, the conversion into its CSDrepresentation is given byt i ¼ x i x n 1 , ion 1 ð12Þc 0 i ¼ t i þ 1t i þðt i þ 1 þt i Þc 0 i 1 , being c0 1 ¼ x n 1 ð13Þwhere x n 1 represents the sign of X. From (13), c’ i propagates c i orits complement <strong>de</strong>pending on sign of the X because of all inputs arecomputed according to (12). Therefore, another way to express c’ i isc 0 i ¼ x n 1 c i ð14ÞTable 2CSD coding.Applying these <strong>de</strong>finitions, we getd i ¼ t i c 0 i 1 ¼ðx i x n 1 Þðx n 1 c i 1 Þ¼x i c i 1 ð15ÞThis means that the <strong>de</strong>finition of D is in<strong>de</strong>pen<strong>de</strong>nt of sign X. Ina similar way, the expression of Y is the same as that in (10) as(y d i¼ t i þ 1 d i ¼ t i þ 1 ðt i c 0 i 1 Þ¼ðx i þ 1 x n 1 Þððx i x n 1 Þc 0 i 1 Þ¼x i þ 1d iy s i ¼ t i þ 1d i ¼ t i þ 1 ðt i c 0 i 1 Þ¼ðx i þ 1 x n 1 Þððx i x n 1 Þc 0 i 1 Þ¼x i þ 1d ið16ÞFig. 2 shows the circuit to convert a n¼6 <strong>digit</strong> binary numberinto its CSD representation according to Eqs. (8)–(10), valid forboth un<strong>signed</strong> and two’s complement binary numbers. The onlydifference arises in the last CSD <strong>digit</strong>. By introducing an extra signextension, x n ¼0 for un<strong>signed</strong> numbers and x n ¼x n 1 for two’scomplement numbers, the last section changes <strong>de</strong>pending on thesign of X in the following general expression:8y d n 1 ¼ d n 1>< y s n 1 ¼ 0For an un<strong>signed</strong> number Xy d n ¼ d ð17Þn ¼ c n 1 ¼ x n c n 2>: y s n ¼ 0For a <strong>signed</strong> number X yd n 1 ¼ x nd i ¼ x n 1 c n 2y s n 1 ¼ x nd i ¼ x n 1 c n 2(ð18ÞFor un<strong>signed</strong> X, nþ1 CSD <strong>digit</strong>s are necessary to represent thatbinary number. However, as it is a positive number the two MSB<strong>digit</strong>s of CSD are also positives and, in<strong>de</strong>ed, only their positivedata parts are necessary as shown in Eq. (17); the negative part isalways zero. For <strong>signed</strong> numbers, only n CSD <strong>digit</strong>s are used andthe last <strong>digit</strong> is computed according to Eq. (18). As can be seen inFig. 2, the critical path of the circuit is fixed by the propagation ofthe carry signal, in a similar way to a conventional ripple-carryad<strong>de</strong>r. There is a clear similarity between the carry <strong>de</strong>finition inconventional ad<strong>de</strong>rs and the <strong>de</strong>finition of that carry in Eq. (8). Thissuggests that implementation of fast CSD converters should bebased on fast well-known carry look-ahead structures used inaddition.x i þ1 x i c i 1 y i c i Comments0 0 0 0 0 String of 0s0 0 1 1 0 End of 1s0 1 0 1 0 A single 10 1 1 0 1 String of 1s1 0 0 0 0 String of 0s1 0 1 1¯ 1 A single 01 1 0 1¯ 1 Beginning of 1s1 1 1 0 1 String of 1s3. New CSD <strong>recoding</strong>In the <strong>de</strong>finition of carry in Eq. (8), two adjoining carries sharethe same input variable. This means that the same input x i is usedin the generation of both carries c i 1 and c i . This characteristicallows the algebraic expressions of carry generation to be simplifiedin or<strong>de</strong>r to obtain efficient circuits.Fig. 2. Schematic circuit for the conversion of a binary number into its CSD representation (n¼6).

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!