vlsi systems

Upload: aaron-merrill

Post on 30-May-2018

226 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/14/2019 Vlsi Systems

    1/13

    I I IV L S I S Y S T E M S

    The Center or Advanced ComputerStudies, U niversity of Lo uisianaat Lafayette, Lafayette, Louisiana,US A

    covers the broa d sp ect rum of VLSI ar i thmet ic ,u s t o m m em o ry o rg an i za t i o n an d d a t a t r an s fe r , t h e ro l e o fes ign , micro e lect ro mechanical sys tems , and noise analys i s

    Over th e years , the f und am enta l s o f the f i e ld have evolved tof top ics and a broad range o f pract ice . To

    pass such a wide range o f knowledge , the sect ion focuses

    des ign engineer to analyze , des ign , and pred ic t the b ehavio r oflarge-scale systems. While design formulas and tables arel i sted , emphas i s i s p laced on the key concepts and the theor iesunde r ly ing the processes . In order to do so , the mater ia l i sre inforced wi th f requent examples and i l lus t ra t ions .

    T h e co m p i l a t i o n o f t h i s s ec ti o n wo u l d n o t h av e b een p o s -s ib le wi th out the dedica t ion and ef for t s o f the sect ion ed i toran d co n t r i b u t i n g au t h o r s. I w i s h to t h a n k t h em a ll .

    Wai -Ka i C h enE d i t o r

  • 8/14/2019 Vlsi Systems

    2/13

    1Logarithmic and Res idue Number

    System s for V L SI A rithm eticT h a n o s S t o u r a i t i sDepartment o f Electr ical andCom puter Engineering,Universi ty o f P atras,Greece

    1 .1 I n t r od uc t io n . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . .. . . . . . . . 17 91.2 LNS Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 9

    1 . 2. 1 L N S a n d L i n e a r R e p r e s e n t a t i o n s 1 . 2. 2 L N S O p e r a t i o n s . 1 . 2. 3 L N S a n d P o w e rD i s s i p a t i o n

    1 .3 The R e s idue N u m b e r S ys t e m . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . .. 18 51 . 3. 1 R N S B a s i cs 1 . 3. 2 R N S A r c h i t e c t u r e s 1 . 3. 3 E r r o r T o l e r a n c e i n R N S S y s t e m s 1 .3 .4 R N S a n d P o w e r D i s s i p a ti o nR e f e re nc e s . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . .. . . . . . . . . . 190

    1 . 1 I n t r o d u c t i o nery la rge-sca le in tegra te d c i rcui t (VLSI) a r i thm et ic un i ts a re

    e s sen t ia l f o r the o pe r a t ions o f t he da t a pa th s a nd /o r t he a d -dress ing uni ts o f mic ro proces sors , d ig i ta l s igna l processors(DSPs) , a s we l l a s da ta -process ing appl ica t ion-spec i f ic in te -gra ted c i rcui ts (ASICs) and programmable in tegra ted c i rcui ts .

    he i r op t im iz e d r e a l i z at i on , in t e r m s o f pow e r o r e n e r gy c on -sum pt ion , a r e a , a nd /o r spe e d , i s im por t a n t f o r m e e t ingde m a nd ing ope r a t iona l spe c if i c at i ons o f such de v ic e s.

    I n m od e r n V LS I de s ign fl ow s , t he de s ign o f s t a nda r d a r i t h -e t ic uni ts i s ava i lable f rom des ign l ibra r ies . These uni ts

    m p loy b ina r y e nc od ing o f num be r s , suc h a s one ' s o r tw o 'so m p l e m e n t , o r s i g n m a g n i t u d e e n c o d i n g t o p e r f o r m a d -

    u l t i p l ic a t i ons . I f non s t a nd a r d ope r a t ions a r eo r i f h igh pe r f o r m a nc e c om p one n t s a r e ne e de d , t he n

    des ign o f specia l a r i thmet ic uni ts i s necessa ry . In th is case,a r i t hm e t i c sy s t e m is o f u tm os t im po r t a nc e .

    The im pa c t o f a r i t hm e t i c i n a d ig i ta l sy s te m i s no t on lyde f in i t i on o f t he a r c h i t e c tu r e o f a r i t hm e t i c

    Ar i th me t ic a f fec ts several levels o f the des ign abs t rac -t m a y r e duc e the num be r o f ope r a t ions , t he

    igna l a ct iv i ty , a nd the s t r e ng th o f t he ope r a to r s . Th e c ho ic ea y l e a d to subs t a n t i a l pow e r s av ings, r e duc e d

    a , a nd e n ha nc e d spe e d.

    Th i s c ha p te r de sc r ibe s tw o a r i t hm e t i c sy s t e m s tha t e m p loyn o n s t a n d a r d e n c o d i n g o f n u m b e r s . T h e l o g a r it h m i c n u m b e rsys t e m ( LN S ) a nd the r e s idue num be r sy s t e m ( R N S ) a r es ing le d ou t be c a use t he y ha ve be e n show n to o f f e r im por t a n ta dva n tage s i n t he e f f i c ie nc y o f t he i r ope r a t ion a nd m a y b e a tt he s a m e t im e m or e pow e r - o r e ne r gy - e f f ic i e n t , f as t er , a nd /o rsm a l l e r t ha n o the r sy s t e m s .

    A l t h o u g h a d e t a il e d c o m p a r i s o n o f p e r f o r m a n c e o f t h e sesys te m s to t he i r c ou n te r pa r t s i s no t o f f e r e d he r e , one m u s tke e p in m in d tha t suc h c om pa r i sons a r e on ly m e a n ing f u lw he n the sy s t em s und e r que s t ion c ove r t he s a m e dyna m icr a nge a nd p r e se n t t he s a m e p r e c i s ion o f ope r a t ions . Th i snecess i ty usua l ly t r ans la tes in ce r ta in da ta word lengths ,which , in the i r turn , a f fec t the o pera t in g charac te r is t ic s of thesys tems.

    1 .2 L N S B a s i c sTradi t iona l ly , LNS has been cons idered as an a l te rna t iveto f l oa t ing - po in t r e p r e se n ta t i on ( K or e n , 1993 ; S tou r -a it is , 1986) . The org aniza t io n of an LNS wo rd is shown inFigure 1.1.

    The LN S m a ps a l i ne a r r e a l num be r X to a t r i p l e t a sfollows:

    2005 by AcademicPress. 179of reprodu ction in any form reserved.

  • 8/14/2019 Vlsi Systems

    3/13

    18 0 T h a n o s S t o u r a i t i s

    I G U R E 1 .1

    n n - 1 . . . 0

    Sx . . .

    * x= lOgb[X l *

    The Organization of an (n + 1)-bit LNS Digital Wo rd

    X LN_~S (Z x, Sx, x = log b [X[), (1.1)Sx i s the s ign o f X , b i s t h e b a s e o f t h e l o g a r i t h m i c

    e p r e s e n t a t i o n , a n d Z x i s a s ing le -b i t f lag , which , w hen a sse r ted ,en o te s tha t X i s ze ro . A z e ro f lag is r equ i r ed b ecause log b X i so t a f i n it e n u m b e r f o r X = O. S i m i la r ly , s i nc e t h e l o g a r i t h m o f

    a n e g a t i v e n u m b e r i s n o t a r e a l n u m b e r , t h e s i g n i n f o r m a t i o nof X i s s to red in f lag Sx . L o g a r i t h m x = l o g b I x l i s e n c o d e d a s a

    i t m a y c o m p r i s e a n u m b e r o f k i n t eg e r a n dI f r ac t iona l b i t s .

    T h e i n v e r s e m a p p i n g o f a l o g a r i t h m i c t r i p l e ( Z x , S x , x ) to a

    ( Z x , 5 x , X ) L N ~ S - ' X : X = ( 1 - Z x ) ( - 1 ) S x b x . ( 1 . 2 )

    1.2.1 LNS and Linear Rep resen tationsw o i m p o r t a n t i s s u e s i n a f i n i t e w o r d l e n g t h n u m b e r s y s t e m

    are the r ange o f n u m b e r s t h a t c a n b e r e p r e s e n t e d a n d t h er e c i s i on o f t h e r e p r e s e n t a t i o n ( K o r e n , 1 9 9 3) .

    Let (k, 1, b ) - L N S d e n o t e a n L N S o f i nt e g e r a n d f r a c ti o n a ll, r e spec t ive ly , and of base b . These th reei n e t h e p r o p e r t i e s o f t h e L N S a n d c a n b e

    o m p u t e d s o t h a t t h e L N S m e e t s c e r t a i n s p e c i f i c a t i o n s . Fo rx a m p l e , f o r a ( k , l , b ) - L N S t o b e c o n s i d e r e d a s e q u i v a l e n t t on n - b i t l i n e a r f i x e d - p o i n t s y s t e m , t h e f o l l o w i n g t w o r e s tr i c -i o n s m a y b e p o s e d :

    1 . T h e t w o r e p r e s e n t a t i o n s s h o u l d e x h i b i t e q u a l a v e r a g er e p r e s e n t a t i o n a l e r r o r .

    2 . T h e t w o r e p r e s e n t a t i o n s s h o u l d c o v e r e q u i v a l e n t d a t aranges .

    Th e av e rage r epre sen ta t iona l e r ro r , ~ave, i s de f ined a s :XmaxE g r e l ( X )

    X=Xmin8 a ve = ( 1 . 3 )X m a x - X m i n q - 1 '

    here Xmin a n d X m ~ d e f i n e th e r a n g e o f r e p re s e n t a b l en u m b e r s i n e a c h s y s t e m a n d w h e r e g r e l ( X ) i s t h e r e l a t i v er e p r e s e n ta t i o n a l e rr o r o f a n u m b e r X e n c o d e d i n a n u m b e rs y s t e m . T h i s e r r o r i s, i n g e n e r a l , a f u n c t i o n o f t h e v a l u e o f Xand i t i s de f ined a s :

    I x - 2 1gre1(X) - - - - , (1 .4 )Xi n w h i c h X is t h e a c t u a l v a l u e a n d X i s t h e c o r r e s p o n d i n g v a l u er e p r e s e n t a b l e in t h e s y s t e m . N o t i c e t h a t X X d u e t o t h ef i n it e le n g t h o f t h e w o r d s . A s s u m i n g t h a t t h e l o g a r i t h m o f Xi s r e p r e s e n t e d a s a t w o ' s c o m p l e m e n t n u m b e r , t h e r e l a t i v erepre sen ta t iona l e r ro r ~ rel , LNS for a (k, l , b ) -LNS is inde pen d-e n t o f X a n d , t h e r e f o r e , i s e q u a l t o t h e a v e r a g e r e p r e s e n t a t i o n a le r ro r . I t i s g iven by [ r e fe r to K oren (1993) fo r the ca se b = 2 ] .

    g a v e , L N S = g r e l , L N S = b 2 - I - 1. ( 1 . 5 )D u e t o f o r m u l a 1 .3 , t h e a v e r a g e r e p r e s e n t a t i o n a l e r r o r f o r t h en-b i t l inea r f ixed-po in t ca se i s g iven by :

    g a v e , F X P - - 2 n - 1 i = 1 ~ (1 .6 )

    w h i c h , b y c o m p u t i n g t h e s u m o n t h e r i g h t - h a n d s i d e, c a n b ew r i t t e n a s:

    t~(2 n) + ~/gave, FXP - - 2 n - 1 ' (1.7 )w h e r e ~ is t h e E u l e r g a m m a c o n s t a n t a n d f u n c t i o n ~ i s d e f i n e dt h r o u g h :

    t~(x) = d in F( x) , (1.8)

    w h e r e F ( x ) is t h e E u l er g a m m a f u n c t i o n .I n t h e f o l lo w i n g, t h e m a x i m u m n u m b e r r e p re s e n t ab l e in

    e a c h n u m b e r s y s t e m i s c o m p u t e d a n d u s e d t o c o m p a r et h e r a n g e s o f t h e r e p r e s e n t a t i o n s . N o t i c e t h a t d i f f e r e n tf i g u r e s c o u l d a l s o h a v e b e e n u s e d f o r r a n g e c o m p a r i s o n ,such a s the r a t io X m a x / X m i n (Stoura i t i s , 1986) . The maxi -m u m n u m b e r r e p r e s e n t a b l e b y a n n - b i t l i n e a r i n t e g e r i s2 " - 1 ; t h e r e f o r e t h e u p p e r b o u n d o f t h e f i x e d - p o i n t r a n g e isg iven by :

    F X P 2 nX m a~ = - - 1 . ( 1 .9 )T h e m a x i m u m n u m b e r r e p r e s e n t a b l e b y a ( k, l, b ) -L N S e n c o d -ing 1.1 is as follows:

    L N S b 2 k + l - 2 - I "Xm ax = (1.10)T h e r e f o r e , a c c o r d i n g t o t h e e q u i v a l e n c e r e s t r i c t i o n s p o s e da b o v e , t o m a k e a n L N S e q u i v a l e n t t o a n n - b i t l i n e a r f i x e d -p o i n t r e p r e s e n t a t i o n , t h e f o l l o w i n g i n e q u a l it i e s s h o u l d b e s i -m ul tan eou s ly sa t is fied:

  • 8/14/2019 Vlsi Systems

    4/13

    Logarithmic and Residue Nu m ber Sys tems for VL SI Ari thmet i c 181LNS FXPXma _> Xm~~. (1.11)

    E . . . L N S ~ g a v e , F X P ' (1.12), f rom equ at ions 1 .5 and 1 .7 th ro ugh 1 .10 the fo l lowing

    I *(2~)-~-~7 (1.13)l = - l o g 2 lo g b ( l + 2 ~ - 1 " ["k = [log2 log b (2 ~ - 1) + 2 -1 - 1)7. (1.14)

    es o f k and l tha t cor resp ond to var ious va lues o f n fo rseen in Tab le 1 .1 , where fo r each

    M t h o u g h t h e w o rd l en g th s k an d I co m p u t ed v i a eq u a t io n s1 .13 and 1 .14 m eet the po sed equ ivalence specif i ca t ions o fequa t ions 1 .11 and 1 .12 , LNS i s capab le o f cover ing a s ign if i-can t ly l a rger range than the eq u ivalen t f ixed-po in t represen ta-t ion . Let neq deno te the word l eng th o f a f ixed-po in t sys temt h a t can co v e r t h e r an g e o f f e r ed b y an L N S d e f i n ed t h ro u g hequa t ions 1 .13 and 1 .14 . Equivalen tly , l e t neq be the smal les tinteger, w hich satisfies:

    2 r ~q - - 1 > b 2 k + 1 - 2 ' . ( 1 . 1 5 )

    Fro m equa t ion 1 .15 , i t fo l lows tha t :n e q = [ ( 2 k + 1 - - 2 - t ) l o g 2 b 1 . (1.16)

    I t s h o u l d b e s tr e ss ed t h a t w h en r t eq ~ n , the p rec i s ion o f thep a r t i cu l a r f i x ed -p o i n t s y s t em i s b e t t e r t h an t h a t o f t h e L N Sder ived by equat ions 1 .13 and 1 .14 . Equ at ion 1 .16 reveals tha tthe par t i cu lar LNS, whi le meet ing the p rec i s ion o f an n -b i tl inear represen ta t ion , in fac t covers the range p rov ided by anneq-bi t l inear system.

    O f course, the average (relat ive) erro r is no t the on ly wa y tocompare the accuracy o f comput ing sys tems . Especia l ly t ruefor s ignal p rocess ing sys tems , one m ay use the s igna l - to -no i sera t io (SNR), assuming tha t quan t i za t ion er ro rs represen tno i se , to c om pare the p rec i s ion o f two sys tems . In tha t case ,b y eq u a t i n g t h e SN Rs o f th e L N S an d t h e f i x ed -p o i n t s y st emthat covers the requ i red dynamic range , the in teger and f rac-t i o n a l w o rd l en g th s o f t h e L N S ma y b e co mp u t ed .

    1 . 2. 2 L N S O p e r a t i o n sM appin g o f equat ion 1 .1 i s o f p rac t ica l in teres t because i t cans impl i fy cer t a in ar i thm et ic ope ra t ions ( i. e. , i t can reduc e theimplementa t ion complex i ty , a l so ca l l ed s t reng th , o f severa lopera to rs ) . F or examp le , due to the p roper t i es o f the logar i thmfu n c t i o n , th e m u l t i p li ca t i o n o f t w o l i n ea r n u m b er s , X : bxan d Y = by , i s red u ced t o t h e ad d i t i o n o f t h e i r l o g a r i th mi cimages , x and y .

    T h e b as i c a r i th me t i c o p e ra t io n s an d t h e i r L N S co u n t e rp a r t sare sum m arized in Tab le 1 .2, where , fo r s impl ic i ty and wi tho u tloss o f general i ty , the zero f lag zx is o m i t t ed an d i t is a s s u medthat X > Y. Tab le 2 reveals tha t , whi le the co m plex i ty o f mo s to p e ra t i o n s i s r ed u ced , th e co mp l ex i ty o f LN S ad d i t i o n an dLNS sub t rac t ion i s s ign i f i can t . In par t i cu lar , fo r d = Ix - Y l ,L N S ad d i t i o n r equ i re s t h e co m p u t a t i o n o f th e n o n l i n ea r f u n c -t ion :

    s~(d) = logb (1 + b - d ) , (1.17)an d s u b t r ac t io n r eq u i re s t h e co m p u t a t i o n o f t h e n o n l i n ea rfunct ion :

    s,(d) = logb (1 - b-d ) . (1.18)Equat ions 1 .7 and 1 .8 subs tan t i a l ly l imi t the da ta word l eng thsfor which LNS can o f fer e ff i c ien t VLSI implem enta t ions . The

    T A B L E 1 . 1 C o r r e s p o n d e n c e o f n , k , l , a n d n eq f o r V a r i o u s B a s es bn b = 1 .5 b = 2 b = 2 . 5

    k 1 rteq k 1 rteq k 1 tleq5 3 2 6 3 3 9 2 3 76 4 3 10 3 4 9 2 4 77 4 4 10 3 5 9 3 5 128 4 5 10 3 5 9 3 6 129 4 5 10 4 6 17 3 7 12

    10 5 6 20 4 7 17 3 7 1211 5 7 20 4 8 17 3 8 1212 5 8 20 4 9 17 4 9 2313 5 9 20 4 10 17 4 10 2314 5 10 20 4 11 17 4 I I 2315 5 11 20 4 12 17 4 12 23

  • 8/14/2019 Vlsi Systems

    5/13

    182 T h a n o s S t o u r a i t i sTABLE 1.2 Ba sicLinear Arithmetic O perations and Their LNS Counterparts

    Linear operation Logarithmic operationMultiplyDivideRootPowerAddSubtract

    W = X Y = b ~ b = b ~+ r

    w = x m = (b~)mW = X + Y = b ~ + b y = b X ( l + b y ~ )w = x _ y = ~ _ b Y = b ~ ( l _ b y x )

    w = x + y , S w = S x X O R s yw = x - y, sw = sxXOR syw = ~, rn, integer, sw = sxw = r e x , m , inte ger , Sw = sxw = x +lo gb (1 + by-x), sw = Sxw = x + lo g ~ ( 1 - b Y - X ) , s w = s x

    x

    M u l t i p l y /d i v i d e / /A d d /s u b t r a c t

    IOgb(1 + _ b I x - y l ), S u m / d i f f e r e n c e

    ' P r o d u c t / q u o t i e n tIG UR E 1.2 The O rganizat ion o f a Bas ic LNS Processor: the processor comprises an adder, two multiplexers , a sign-invers ion uni t , a look -up

    able , and a f inal adder. I t ma y perform the four op era t ions o f addi t ion, subtract ion, mult ipl ica tion, or division.

    r g a n i z a t io n o f a n L N S p r o c e s s o r t h a t c a n p e r f o r m t h e f o u rc o p e r a t i o n s o f a d d i t i o n , s u b t r a c t i o n , m u l t i p l i c at i o n , o r

    i v i s i o n i s s h o w n i n F i g u r e 1 . 2 . N o t e t h a t t o i m p l e m e n t L N Su b t r a c t i o n ( i.e ., t h e a d d i t i o n o f tw o q u a n t i t ie s o f o p p o s i t ei gn ) a d i f fe r e n t m e m o r y l o o k - u p t a b le ( L U T ) i s r e q u i re d .

    T h e m a i n c o m p l e x i t y o f an L N S p r o c e s so r is th e i m p l e m e n -a t i o n o f t h e L U T s f o r s t o r i n g t h e v a l u es o f t h e f u n c t i o n s s a ( d )n d s s ( d ) . A s t r a i g h t f o r w a r d i m p l e m e n t a t i o n i s o n l y f ea s ib l eo r s m a l l w o r d l e n g t h s . A d i f f e r e n t t e c h n i q u e c a n b e u s e d f o r

    r w o r d l e n g t h s b a s e d o n t h e p a r t i t i o n i n g o f a n L U T i n t on a s s o r t m e n t o f s m a l le r L U T s. T h e p a r t i c u l a r p a r t i t i o n i n g

    e s p o s si b l e d u e t o t h e n o n l i n e a r b e h a v i o r o f t h e a d d i t i o ns u b t r a c t i o n f u n c t i o n s , l o g b ( 1 + b - a ) a n d l o g b ( 1 - b d ) ,a re de p ic t ed in F igure 1 .3 fo r b = 2 . By

    s o f f u n c t i o n s a m p l e s, t h e o v e r al l si ze o f t h e L U T i sr e s s e d , l e a d i n g t o a L U T o r g a n i z a t i o n o f F i g u r e 1 .4 . I n

    t o t h e a b o v e t e c h n i q u e s , r e d u c t i o n o f t h e s iz e o fe m o r y c a n b e a c h i ev e d b y p r o p e r s e le c ti o n o f th e b a s e o f

    i m u m p o w e r c o n s u m p t i o n f o r th e L N S ar it h m e ti c u n i tg t h e b i t a c t i vi ty , as m e n t i o n e d i n t h e n e x t s e c t io n ,

    o r e s u lt i n m i n i m u m L U T s iz es .

    T o u s e t h e b e n e f i ts o f L N S , a c o n v e r s i o n o v e r h e a d i s r e -q u i r e d i n m o s t c a s e s t o p e r f o r m t h e f o r w a r d L N S m a p p i n gd e f i n e d b y e q u a t i o n 1 .1 . I t is n o t e d t h a t c o n v e r s i o n s o f e q u a -t i o n s 1 .1 a n d 1 .2 ar e r e q u i r e d i f a n L N S p r o c e s s o r r e c e iv e si n p u t o r t r a n s m i t s o u t p u t l i n e a r d a t a i n d i g i t a l f o r m a t . S i n c ea l l a r i t h m e t i c o p e r a t i o n s c a n b e p e r f o r m e d i n t h e l o g a r i t h m i cd o m a i n , o n l y a n i n i ti a l c o n v e r s i o n i s im p o s e d ; t h e r e f o r e , a s t h ea m o u n t o f p r o c e ss i n g i m p l e m e n t e d i n L N S g r ow s , th e c o n t r i -b u t i o n o f th e c o n v e r s i o n o v e r h ea d t o p o w e r d i s s ip a t io n a n d t oa r e a - t i m e c o m p l e x i t y b e c o m e s n e g li g i bl e b e c a u s e i t r e m a i n sc o n s t a n t .

    I n s t a n d - a l o n e D S P s y s t e m s , t h e a d o p t i o n o f a d i ff e r e n ts o l u t i o n t o t h e c o n v e r s i o n p r o b l e m i s p o s s i b l e . I n p a r t i c u l a r ,t h e L N S f o r w a r d a n d i n v e r s e m a p p i n g o v e r h e a d c a n b e m i t i -g a t e d b y c o n v e r t i n g t h e a n a l o g d a t a d i r e c t ly i n t o d i g i ta l l o g a -r i t h m s .

    LNS Arithmetic Exa mpleL e t X = 2 . 75 , Y = 5 . 65 , a nd b = 2 . P e r f o r m t h e o p e r a t i o n s X . Y ,X + Y , v / X a n d y 2 u s i n g t h e L N S .

    I n it ia l ly , t h e d a t a a r e t r a n s fe r r e d t o t h e l o g a r i t h m i c d o m a i na s i m p l i e d b y e q u a t i o n 1 . h

  • 8/14/2019 Vlsi Systems

    6/13

    1 L o g a r i t h m i c a n d R e s id u e N u m b e r S y s t e m s f o r V L S I A r i t h m e t i c 1 8 3

    2 4 6(a ) : S a (O )

    1

    0 .8

    0 .6

    0 .4

    0 .2

    (b) : s s (d)

    -3

    i , , , ,

    6 8

    F I G U R E 1 .3 T h e F u n c t i o n s sa(d) a n d s , ( d ) : A p p r o x i m a t i o n s r e q u i r e d f o r L N S a d d i t i o n a n d s u b t r a c t i o n .

    I G U R E 1 .4 T h e P a r t i t i o n i n g o f t h e L U T : T h e p a r t i t i o n i n g st o re sh e a d d i t i o n a n d s u b t r a c t i o n f u n c t i o n s i n t o a s e t o f sm a l l e r L U T s,

    t o m e m o r y c o m p r e s s i o n .

    X L N S ( Z x , S x , X = l o g 2 I x l )= ( 0 , O , x = l o g 2 2 . 7 5 ) = (0 , O , 1 . 4 5 9 4 ). ( 1 . 1 9 )

    y L N S ( Z y , S y , y = l o g 2 ] Y I )= ( 0 , 0 , y = l o g 2 5 . 6 5 ) = ( 0 , 0 , 2 . 4 9 8 3 ) . ( 1 . 2 0 )

    U s i n g t h e L N S i m a g e s f r o m e q u a t i o n s 1 .1 9 a n d 1 .2 0 , t h er e q u i r e d a r i t h m e t i c o p e r a t i o n s a r e p e r f o r m e d a s f o l lo w s : T h eo g a r i t h m i c i m a g e w o f t h e p r o d u c t W = X Y i s g i v e n b y :

    W = X + y = 1 . 4 5 9 4 + 2 . 4 9 8 3 = 3 . 9 5 7 7 . ( 1 . 2 1 )s b o t h o p e r a n d s a r e o f t h e s a m e s i g n ( i. e. , Sx = sy = 0 ) , t h e

    s i g n o f t h e p r o d u c t i s s~ = 0 . I n a d d i t i o n , b e c a u s eZx 1 a n d z y 1 , t h e r e s u l t is n o n - z e r o ( i . e. , z ~ = 0 ) .

    T o r e t r i e v e t h e a c t u a l r e s u l t W f r o m e q u a t i o n 1 .2 1 , i n v e r s ec o n v e r s i o n o f 1 .2 i s u s e d a s f o l l o w s :

    W = (1 - zw ) ( - 1 ) sw2 W = 2 3 . 9 5 7 7 = 1 5 . 5 3 7 7 . ( 1 . 2 2 )

    B y d i r e c t l y m u l t i p l y i n g X b y Y , i t i s f o u n d t h a t W = 1 5 . 5 3 75 .T h e d i f f er e n c e o f 0 .0 0 0 2 i s d u e t o r o u n d - o f f e r r o r d u r i n g t h ec o n v e r s io n f r o m l i ne a r to t h e L N S d o m a i n .

    T h e c a l c u l a t i o n o f t h e l o g a r i t h m i c i m a g e w o f W = v ~ i sp e r f o r m e d a s f o l lo w s :

    1 1w = - x = - 1 . 4 5 9 4 = 0 . 7 2 9 7 . ( 1 . 2 3 )2 2T h e a c t u a l r e s u l t i s r e t r i e v e d a s f o l l o w s :

    W = 2 0 .7 2 9 7 = 1 . 6 5 8 3 . ( 1 . 2 4 )T h e c a l c u l a t i o n o f t h e l o g a r i t h m i c i m a g e w o f W = X 2 c a n b ed o n e a s :

    W = 2 - 1 . 4 5 9 4 = 2 . 9 1 8 8 . ( 1 . 2 5 )

    A g a i n , t h e a c t u a l r e s u l t i s o b t a i n e d a s :

    W = 2 2 " 91 8 8 = 7 . 5 6 2 2 . ( 1 . 2 6 )

    T h e o p e r a t i o n o f l o g a r i t h m i c a d d i t i o n i s r a t h e r a w k w a r d ,a n d i ts r e a l i z a t io n i s u s u a l l y b a s e d o n a m e m o r y L U T o p e r -a t i o n . T h e l o g a r i t h m i c i m a g e w o f t h e s u m W = X + Y i s a sf o l l o w s :

    w = m a x ( x , y ) + l o g 2 ( 1 + 2 m in(x'y)-max(x'y)) ( 1 . 2 7 )= 2 . 4 9 8 3 + l o g 2 ( 1 + 2 - 1 "0 3 89 ) ( 1 . 2 8 )= 3 . 0 7 0 4 . ( 1 . 2 9 )

  • 8/14/2019 Vlsi Systems

    7/13

    18 4 T h a n o s S t o u r a i t i sThe a c tua l value o f the sum W = X + Y i s ob t a ine d a s :

    W = 2 3 . 0 7 0 4 = 8 . 4 0 0 1 . (1.30)1 .2 .3 L N S a n d P o w e r D i s s i p a t i o nPow er d iss ipa t ion mi nim iza t io n i s soug ht a t a l l leve ls of des ign

    bs t r a c t ion , r a ng ing f r om so f tw a r e a nd ha r dw a r e pa r t i t i on ingdow n to t e c hno logy - r e l a t e d is sues . T he a ve r a ge pow e r d i s s ipa -ion in a c i r c u i t i s c om p u te d v i a t he r e l a ti onsh ip :

    P a v e = ~ l k C L g f f l d, ( 1 . 3 1 )C L i s the to ta l swi tching

    capac i tance , Vda is the supply vol tage , and a i s the averagec t iv i ty in a c lock per iod .

    LN S i s a pp l i c a b le f o r l o w - po w e r de s ign be c a use i t r e duc e sp le x i ty o f c e r t a in a r i t hm e t i c op e r a to r s a nd the b i t

    c tivity.

    s p r ope r t i e s o f the l oga r i t hm f unc t ion to r e duc et rength o f severa l a r i thm et ic ope ra t ions ; thus , i t leads to

    p l e x i ty sa vings. B y r e duc ing the a r e a c om ple x i ty o f ope r -CL o f e q u a t i o n 1 . 31 ca n b e

    o r e , r e d uc t ion in l a t e nc y a ll ow s f o r f u r the rin supp ly vo l ta ge , w h ic h a l so r e duc e s pow e r d i s s ipa -

    ( C ha ndr a ka sa n a nd B r ode r se n , 1995 ). A s tudy o f t heo f th e n u m b e r s y s te m o n t h e Q R D - R L S

    r e ve a le d tha t LN S o f f e r s a c c u r a c y c om p a r a b le t of f l oa t ing - po in t op e r a t ions bu t on ly a t a f r a c t ion o f t heon o f t he a lgo r i t hm ( S a c ha a nd1998) . The redu c t io n of average swi tched capac i tance of

    the s im p l i f i c at i on o f bas i c a r i t hm e t i cow n in Ta b le 1 . 2 . I t c a n be s e e n tha t n - b i t

    c a t i o n a n d d i v i s io n a r e re d u c e d t o ( k + / ) - b i t a d d i t io nsub t r a c t ion , r e spe ct ive ly , w h i l e t he c om pu ta t io n o f roots

    t , r e spect ive ly . For the c om m on cases of square r o o tera t io n i s r edu ced to le f t or r ight sh i f t r espec t -

    ly . For exam ple , a ssume t ha t a n-b i t ca r ry-save a r ray mul t i -, which h as a co mp lexi ty of n 2 - n 1-b i t fu l l adders (FAs) ,

    replaced by an n-b i t adder , a ssu ming k + l = n has a com -1993). The r e f o r e , m u l t i p l i c a t i on c om ple x i ty is r e duc e d by a

    rcL, given as:/./2 _ nrcL - - - - - n - 1. (1 .32)n

    A dd i t ion a n d su b t r a c t ion , how e ve r , a r e c om p l i c a t e d in LN ST ope r a t ion f o r t he e va lua t ion o f

    1Ogb(1 b y - X ) , a l though d i f f e r e n t a pp r oa c he s ha ve be e np r opose d in t he l i t e r a tu r e ( O r g inos e t aL , 1995; Pa l iouras an dS tou r a it i s, 1996 ). A n LU T ope r a t io n r e qu i r e s a R O M of n 2 ~bi ts , a s ize tha t c an inh ib i t use o f LNS for la rge va lues of n .I n a n a t t e m p t t o so lve t h i s p r ob le m , e f f i ci e n t t a b l e r e duc t ionte c hn ique s ha ve be e n p r opo se d ( Ta y lo r et a l . , 1988). As a resu lto f t he a bove a nalys is , a pp l i c a t ions w i th a c om pu ta t ion a l l oa dd o m i n a t e d b y o p e r a t i o n s o f s i m p le L N S i m p l e m e n t a t i o n c a nbe e xpe c t e d to ga in pow e r d i s s ipa t ion r e duc t ion due to t heLN S im pa c t on a r c h i t e c tu r e c om ple x i ty .

    S inc e m u l t i p l i c a t i on - a dd i t i ons a r e im por t a n t i n D S P a pp l i -c a t ions , t he pow e r r e qu i r e m e n t s o f a n LN S a nd a l ine a r f ixe d -po in t a dde r - m u l t i p l i e r ha ve be e n c om pa r e d . I t ha s be e nr e p o r t e d t h a t a p p r o x i m a t e l y a tw o t i m e s r e d u c t i o n i n p o w e rdiss ipa t ion i s poss ib le for opera t io ns w i th wo rd s izes of 8 to 14bi ts (Pa l iouras and S toura i t i s , 2001) . Given a suf f ic ient nu m be ro f c onse cu t ive m u l t i p l i c a t i on - a dd i t i ons , t he LN S im p le m e n ta -t i on be c om e s m or e e f f i c i e n t f r om the l ow - pow e r d i s s ipa t ionv ie w po in t , e ve n w he n a c o ns t a n t c on ve r s ion ove r he a d i s t a ke nin to c ons ide r a t ion .P o w e r D i s s i p a t io n a n d L N S E n c o d i n gT h e e n c o d i n g o f d a t a t h r o u g h l o g a r it h m s o f v a ri o u s b a s esimpl ies va r ia t ions in the b i t ac t iv i ty ( i . e . , the a fac tor ofe qua t ion 31 a nd , t he r e f o r e , t he pow e r d i s s ipa tion ) ( P a l iou r a sand S toura i t i s , 1996, 2001) .

    A ssum ing a un i f o r m d i s t r i bu t ion o f l i ne a r n - b i t i npu tnum be r s , t he d i s t r i bu t ion o f b i t a s se rt i ons o f t he c o r r e sp ond-ing LN S w or ds r evea ls t h a t LN S c a n be e xp lo i t e d t o r e du c e theaverage ac t iv ity . Le t P0~ l( i ) be the b i t a sse r t ion probab i l i t ie s( i. e. , the pro bab i l i ty of the / th b i t t r ans i t ion f rom 0 to 1).A ssum ing th a t da t a a r e t e m p or a r i l y i nde pe nde n t , i t ho ld s t hat :

    p o ~ ( i ) = p o ( i) p ~ (i ) = (1 - pl ( i) )P~(i), (1.33)w he r e P 0 ( i ) a nd P l ( i ) i s the p r oba b i l i t y o f t he / th b i t be ing 0 o r1 , r e spe c tively . D ue to t he a s su m pt ion o f un i f o r m da t a d i s t r i -bu t ion , i t ho ld s t ha t:

    1p o ( i ) = p l ( i ) 2 (1.34)which , due to equa t ion 1 .33 , g ives :

    1p o - . l ( i ) = - . ( 1 .35 )4The r e f o r e , al l b it s i n t he l i ne a r f i xe d - po in t r e p r e se n ta t i on e x -h ib i t a n e qua l P 0~ l ( i ) , i = 0 , 1 . . . . n - 1 .

    A c t iv i ti e s o f t he b i t s i n a n LN S - e nc ode d w o r d a r e qua n t i f i e dunde r s im i l a r a s sum pt ions . S inc e t he r e i s a n one - to - one c o r -r e sponde n c e o f li ne a r f i xe d - po in t va lue s t o t h e i r LN S im a ge sde f ine d by e qua t ion 1 . 1 , t he LN S va lues f o l low a p r oba b i l i t yfunc t ion ident ica l to the f ixed-poin t case . In fac t , the LNS

  • 8/14/2019 Vlsi Systems

    8/13

    L o g a r i th m i c a n d R e s id u e N u m b e r S y s t e m s f o r V L S I A r i t h m e t i c 18 5c a n b e c o n s i d e re d as a c o n t i n u o u s t r a n s f o r m a t i o n o f

    ~' r an do m var iable X, which is a word in th e l inearH e nc e , t he tw o d i sc r et e r a nd om va r ia b l es f o l low the

    Th e pLNS probabi l i t ie s o f b i t a sse r t ions in LNS words , h ow -are not con s tant as P0-*l ( i ) o f equ a t ion 1 .35; they de pen d

    the f o l low ing e xpe r im e n t i s pe r f o r m e d . F o r a l l pos -l e va lue s o f X in a n - b i t sy s t em , t he c o r r e sp ond ing L log x j

    ( i ) fo r each b i t a re co mp uted . T hen , poL~Sl i ) i s co m pu ted asa t ion 1 .33 . Th e ac tua l a sse r t ion probabi l i t ie s for the b i t sLNS word , ~LNS i ) , a re depic te d in F igure 1 .5 . I t can be1)0-~1( i ) for the more s igni f icant b i t s i s subs tant ia l ly

    e r than P0-~ l ( i ) for the less s igni f icant b i ts . M oreove r , i t cana t P0-~ l ( i ) depe nds on b . This beh avior , which i s due

    i n h e r e n t d a t a c o m p r e s s i o n p r o p e r t y o f t h e l o g a r it h mds to a r e duc t ion o f t he a ve r a ge ac t iv i ty i n t herd . T he average ac t iv i ty savings percentage , S . . . i s

    u t e d a s:

    P010 . 2 5

    0 .20 . 1 5

    0. 10 . 0 5

    b = 2 . 5

    b = 2

    b = 1 . 5 , - - - - ' 4

    1 2 3 4 5(A) n = 8

    6 7 8

    POl0 . 2 5

    0 .20 . 1 5

    0. 10 . 0 5

    b=2 .5 . . . .

    b=2 . . . .

    b= 1 .5 . . . . . .

    1 2 3 4 5 7 8 9 10 11 12( B ) n = 1 2

    E 1.5 Activities Against Bit Significance i (in an LNS Word8 and n = 12) and V arious Values of the Base b. The horizon-of the corresponding n-bit fixed-point

    K-'~k+1-1 ~,LNS // - . , i=o t ' ~ l ( i ) 100% ,Saw = 1 (1.36)

    w h e r e p F X P ( i ) = 1 / 4 f o r i = O , 1 . . . . n - - 1 ; t h e w o r dle ng ths k a nd l a r e c om p u te d v i a e qua t ions 1 . 13 a nd 1 .14 ,a nd n de no te s t he l e ng th o f t he f i xe d - po in t sy st e m . The sa v ingspercentag e Save is dem on st ra t ed in F igu re 1 .6(A) fo r va r iousva lue s o f n a nd b, a nd the pe r c e n ta ge is f ou nd to be m o r e t ha n15% in cer tain cases.

    A s im p l i e d by the de f in i t i on o f neq in e q ua t ion 1 .16 , how -ever , the l inear sys tem tha t prov ides an equiv a lent r ange to tha tof a (k, l , b )-LNS, requires neq b i t s . I f the redu ced prec is ion of a(k , l , b) -LNS, com par ed to an nCq-bi t f ixed -poin t sys tem, isacceptable for a pa r t icu la r ap pl ica t ion , S'av i s used to desc r ibethe re la t ive e f f ic iency of L N S , ins tead of equa t ion 1 .36 , where :

    x'-~k+l-1 -LNS .~ \2_,i=0 Po- - . ] t t )~Savo= 1 - -5G _100%/(1.37)

    Savings percentage S~v is demonst ra ted in F igure 1 .6(B) forvar ious va lues of n and b . Savings a re fou nd to exceed 50% insom e cases . Not ice tha t F igu re 1 .6 revea ls tha t , for a pa r t icu la rw or d l e ng th n , t he p r o pe r s e l e c t ion o f l oga r i t hm ba se b c a ns igni f icant ly a f fec t the average ac t iv i ty . The re fore , the c hoice o fb i s im por t a n t i n de s ign ing a l ow - pow e r LN S - ba se d syst e m .

    F ina l ly , i t shou ld be no te d tha t ove r he a d i s im pose d f o rl i ne a r - to - loga r i t hm ic a nd loga r i t hm ic - to - l i ne a r c onve r s ion .C onve r s ion ove r he a d c on t r ibu t e s a dd i t i ona l a r e a a nd t im ec om ple x i ty as w e ll as pow e r d i s s ipa tion . A s the nu m b e r o fope r a t ions g r ow s , how e ve r , t he c onve r s ion ove r he a d r e m a insc ons t a n t ; t he r e fo r e , t he ove r he a d ' s c on t r ibu t ion to t he ove r a llbudg e t b e c om e s ne g lig ib l e.

    1.3 The Residue Number SystemA d i f f e r e n t c onc e p t t ha n the non l ine a r l oga r i t hm ic t r a ns f o r -m a t io n i s f o l low e d by m a p p ing o f da t a t o a p p r op r i a t e ly s el ec -t e d f i n i t e fi elds . Th i s m a y be a c h ie ve d th r ough the u se o f one o fthe m a ny a va i l ab l e ve r s ions o f t he r e s idue num be r sy s t e m(RNS) (Szabo and Tanaka , 1967) . RNS a r i thmet ic faces d i f f i -c u l ti e s w i th s ign de t e c t ion , d iv is ion , a nd m a g n i tude c om pa r i -son . These d i f f icu l t ie s may outweigh the benef i t s i t p resentsf o r a dd i t i on , sub t r a c t ion , a nd m u l t i p l i c a t i on a s f ar as ge ne r a lc om pu t ing i s c onc e r ne d . I t s u se i n spe c i a l i z e d c om pu ta t ions ,l ike those for s igna l process ing , of fe r s many advantages . RNShas been used to of fe r super ior faul t to le rance capabi l i t ie sas we l l a s h igh-speed, smal l -a rea , and/or s igni f icant power -d iss ipa t ion savings in the des ign o f s igna l process ing a rchi tec -tures for F IR f i l te r s (Freking and Parhi , 1997) and o ther c i r -c u i ts ( C hr e n , 1998 ). R N S m a y e ve n r e duc e the c om pu ta t iona lloa d in c om ple x - num be r p r oc e s s ing ( Ta y lo r et a l . , 1985), thus

  • 8/14/2019 Vlsi Systems

    9/13

    1 8 6 T h a n o s S t o u r a i t i sSave

    / x / \ \ ~'~ .1 5 / \ / - . - . , k < , .

    1 2 . 5 " t ' ~ ' L ~ / : ' " ~ " " b : 2 . 5: , . 71 0 \ { i / " ! 1 ~ ' - > . .~ ' " ~ - . ~ ~ Z - b = 1 .5

    } , . / b = 1 17 . 5 ; " . , , / i / ~ - " b = 2

    2 .5 .l :i!

    Save6O

    5 0

    4 0

    3 0

    2 0

    6 8 1 0 1 2 1 4 1 6( A ) n - b i t F X P

    " // ~ \ / ', . \ \ " r b = 3/ " \ / \ . \ / x " ,, k \ \ ' \ \ , ~ ' ' b = 1 . 7, / , i x / ~ " , \ / /

    , , , / / / - \ " , . .1 % i \ / I " , - - ~ ' \ . \ " , ~ " \ 1 b = l . a

    \ ' " " ~ ~ b = 2\ /

    6 8 1 0 1 2 1 4 1 6(B) neq- b i t F X P

    neq

    R E 1 .6 P e rc e n ta g e o f A v e ra g e A c t iv i ty R e d u c t io n f ro m U s e o f L N S . T h e p e rc e n ta g e is c o mp a re d to n -b i t a n d to n e q-b it l i n e a r f ix e d -p o in tth e lo g a r i th m . T h e d ia g ra m re ve a ls th a t t h e o p t im a l s e l e c tio n o f b d e p e n d s o n n , a n d i t c a n l e a d to s ig n i f i c a nt p o w e ro n re d u c t io n .

    s p e e d a n d p o w e r s a v i n g s a t th e a l g o r i t h m i c l ev e l o f

    1 . 3 . 1 R N S B a s i c sa p s a n a t u r a l n u m b e r X i n t h e r a n g e [ 0 , M - 1 ],

    = u N = I m i , t o a n N - t u p l e o f r e s i d u e s x i :x R N S { X1, X . . . . X N } , ( 1 . 3 8 )

    x i = ( X ) m i , ( ' )m~ d e n o t e s t h e m o d rn i o p e r a t i o n a n dm i i s a m e m b e r o f th e s e t o f th e c o - p r i m e i n t e g e rs

    = { m l , m 2 . . . . . m N } c a ll e d m o d u l i . C o - p r i m e i n t eg e r s 'g c d ( m i , m j ) = 1, i j . T h e s e t

    R N S m o d u l i i s c a ll e d t h e b a s e o f R N S . T h e m o d u l o o p e r -

    a t i o n ( X ) m r e t u r n s t h e i n t e g e r r e m a i n d e r o f t h e i n t e g e r d i-v i s i o n x d i v m ( i .e . , a n i n t e g e r k s u c h t h a t x = m . l + k ) w h e r el i s a n in t e g e r .

    R N S i s o f i n t e r e s t b e c a u s e b a s i c a r i t h m e t i c o p e r a t i o n s c a n b ep e r f o r m e d i n a d i g i t - p a r a l l e l c a r r y - f r e e m a n n e r , s u c h a s i n :z i = ( x i o Y i )m ~ , ( 1 . 3 9 )

    w h e r e i = 1 , 2 . . . . . N a n d w h e r e t h e s y m b o l o s ta n d s f o ra d d i t i o n , s u b t r a c t i o n , o r m u l t i p l i c a t i o n . E v e r y i n t e g e r i n t h era ng e 0 _< X < I-IN_I m i h a s a u n i q u e R N S r e p r e s e n t a t i o n .

    I n v e r se c o n v e r s io n m a y b e a c c o m p l i s h e d b y m e a n s o f t h eC h i n e s e r e m a i n d e r t h e o r e m ( C R T ) o r t h e m i x e d - r a d i x c o n v e r -s i o n ( S o d e r s t r a n d e t a l . , 1 9 8 6 ). T h e C R T r e t r ie v e s a n i n t e g e rf r o m i ts R N S r e p r e s e n t a t i o n a s:

  • 8/14/2019 Vlsi Systems

    10/13

    L o g a r i th m i c a n d R e s id u e N u m b e r S y s t e m s f o r V L S I A r i t h m e t ic 1 8 7

    ( 1 . 4 0 )

    roT , = G , M = M H N _ l m i, a n d m 7 1 i s t h e m u l t i p l i c a t i v es e o f ~ m o d u l o m i ( i . e . , a n i n t e g e r s u c h t h a t~ 1 ) m i = 1 ) .

    U s i n g a n a s s o c i a t e d m i x e d r a d i x s y s t e m , i n v e rs e c o n v e r s i o na y a l so b e p e r f o r m e d b y t r a n s l a t in g t h e r e s i d u e r e p r e s e n t a -i o n . B y c h o o s i n g t h e R N S

    d u l i t o b e th e w e i g h t s i n t h e m i x e d r a d i x r e p r e s en t a t i o n , t h em a p p i n g i s f a c i l it a t e d b y a s s o c i a t i n g t h e m i x e d r a d i x

    t h e R N S . S p e c if i ca l ly , a n i n t e g e r 0 < X < M c a nN m i x e d r a d i x d ig i t s (x~ l . . . . x ~ ) a s :

    X = m l ) 4 - . . . 4 - x 3 ( m 2 m l )m ( m N - l m N 2 . '4 - 4 m l 4 -X ll , ( 1 . 4 1 )

    X~{X1, X2, X 3 } = { ( 1 0 ) 3 , ( 1 0 ) 5 , ( 1 0 ) 7 1= { 1 , 0 , 3 } . ( 1 . 4 4 )

    Y ~ { y l , Y 2 , Y3} = { (5 )3 , (5 )5 , ( 5 ) 7 } = {2, O, 51. (1 .45 )T h e R N S i m a g e o f t h e s u m Z = X + Y i s o b t a i n e d a s:

    z R N S { z I , Z 2 , Z 3 } = { ( 1 4- 2 )3 , ( 0 4 - 0 5 5 , ( 3 4 - 5 ) 7 ) ( 1 . 4 6 )= { 0 , 0 , 1 } .

    T o r e t r i e v e t h e i n t e g e r t h a t c o r r e s p o n d s t o t h e R N S r e p r e s e n t a -t i o n { 0, 0 , 1 } b y a p p l y i n g t h e C R T o f e q u a t i o n 1 .4 0 , t h ef o l l o w i n g q u a n t i t i e s a r e p r e c o m p u t e d : M = 3 - 5 - 7 = 1 0 5,--ml =- 5=15 3 5 , ~ = - 5 -1 0 5 2 1 , ~ _ 1 0 5 ~ _ = 15 , / 7 " / 1 1 - 1 = 2 ,m~ 1 = 1 , an d m33 1 = 1 . T h e v a l u e o f th e s u m i n i n t e g e rf o r m i s o b t a i n e d b y a p p l y i n g e q u a t i o n 1 .4 0

    !h e r e 0 _< ~ < m i , i = 1 . . . N , a n d t h e x i c a n b e g e n e r a t e de q u e n ti a ll y f r o m t h e x i u s i n g o n l y r e s id u e a r i t h m e t i c , s u c h a s

    in :' ( x )1 ~ ~ X lm l

    x ~ = ( m ~ - l ( x - - X t l ) )m 2( m 2 1 ( m l l ( X X tl ) )= - - - - 4 ) ) m 3 ,

    ( 1 . 4 2 )

    a n d s o o n , o r a s i n t h e f o l l o w i n g :!X 1 = X 1

    4 ( ( x 2 , - 1= - -X l ) m l m 2 ) m 2( ( ( X 3 t - 1 ! - 1= - - x l ) m 1 m 3 - - x 2 ) m 2 m 3 ) m 3

    XN " ' " ' ) m l l m m - - ~ ) m 2 1( ( ( ( x u - x lt - -1m , - . . . - x N 1 ) m , _ l m N ) m N .

    ( 1 . 4 3 )

    T h e d i g i ts x I c a n b e g e n e r a t e d s e q u e n t i a l l y t h r o u g h r e s i d u es u b t r a c t i o n a n d m u l t i p l i c a t i o n b y t h e f ix e d m ~ 1 . T h e s e q u e n -t i al n a t u r e o f c a l c u l a t i o n i n c r e a s e s t h e l a t e n c y o f t h e r e s i d u e sc o n v e r s i o n t o b i n a r y n u m b e r s .

    T h e s e t o f R N S m o d u l i i s o f t e n c h o s e n s o t h a t t h e i m p l e -m e n t a t i o n o f t h e v a r i o u s R N S o p e r a t i o n s ( e. g. , a d d i t i o n ,m u l t i p l i c a ti o n , a n d s c al in g ) b e c o m e s e f f ic i en t . A c o m m o nc h o i c e i s t h e s e t o f m o d u l i { 2 n - 1 , 2 " , 2 " + 1 }, w h i c h m a ya l so f o r m a s u b s e t o f th e b a s e o f R N S .

    R N S A r i t h m e t ic E x a m p l eC o n s i d e r t h e b a s e B = { 3 , 5 , 7 } a n d t w o i n t eg e r s X = I 0 a n dY = 5 . T h e R N S i m a g e s o f X a n d Y a r e a s w r i t t e n h e r e:

    Z = X 4 - Y = ( 3 5 ( 2 . 0 ) 3 4 - 2 1 ( 1 . 0 ) 5 4 - 1 5 ( 1 - 1 )7 )1 0 5= (15)105 = 15 . (1 .4 7)

    T o v e ri f y t h e r e s u l t o f e q u a t i o n 1 .4 6 , n o t i c e t h a tX 4 - Y = 10 4 - 5 = 1 5 a n d t h at :

    R N S15-- -+{ (15) 3 , (15)5 , (15)7 } = {0 , 0 , 1} = {Zl , z2 , z 3 } , ( 1 . 4 8 )w h i c h i s t h e r e s u l t o b t a i n e d i n e q u a t i o n 1 .4 6. T h e s a m e i n t e g e rm a y b e r e t r ie v e d b y u s i n g a n a s s o c i a t e d m i x e d r a d i x s y s t e md e f i n e d b y e q u a t i o n 1 .4 1 as :

    Z = 4 - 1 5 + Z ' " 3 4 - Z ' ,w ith 0 < Ztl < 3 , 0 _< z~ < 5 , 0 _< z~ < 7 an d th e fo l lo w ing :

    Z tl z Z 1 ~ 0Z ~ = ( 3 I ( Z 2 - - Z t l ) ) 5 = ( 2 " z2)5 = 0

    a n dz 3 ( 5 - 1 [ 3 - 1 ( z 3 - z , ) - 4 ] ) 7 = - Z 'l) - 3 . 2 57

    = ( ( 1 - 0 ) - 3 . 0 ) 7 = 1( 1 . 4 9 )

    s o t h a t Z = 1 . 1 5 + 0 . 3 + 0 = 15.

    1 .3 .2 R N S A r c h i t e c t u r e sT h e b a s i c ar c h i t e c tu r e o f a n R N S p r o c e s s o r i n c o m p a r i s o n t o ab i n a r y c o u n t e r p a r t i s d e p i c t e d i n F i g u r e 1 .7 . T h i s f i g u r e s h o w st h a t t h e w o r d l e n g t h n o f t h e b i n a r y c o u n t e r p a r t i s p a r t i -t i o n e d i n t o N s u b w o r d s , t h e r e s i d u e s , t h a t c a n b e p r o c e s s e d

  • 8/14/2019 Vlsi Systems

    11/13

    18 8 Thanos Stouraitis

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . n

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    (A) St ruc ture of a B inary Archi tec tureF I G U R E 1 .7

    8-O

    o

    n/M ~ ~ _ i n/M(B) Correspond ing RNS Processor

    Basic Architectures

    n\

    n d e p e n d e n t l y a n d a r e o f w o r d l e n g th s i g n i f ic a n t ly sma l l e rh a n n . T h e a r c h i t e c tu r e i n F ig u r e 1 .7 a s s u me s , w i th o u t l o s sf g e n er a li ty , t h a t t h e mo d u l i a r e o f e q u a l w o r d l e n g th . T h e i t he si d u e c h a n n e l p e r f o r m s a r i t h m e t i c m o d u l o mi.

    M o s t imp le m e n ta t i o n s o f a r i t h me t i c u n i t s f o r RN S c o n s i s t o fn a c c u m u l a t o r a n d a m u l t i p l ie r a n d a r e b a s e d o n R O M s o r

    et al. (1983) have ana lyzed the e f f ic iency ofI imp le me n ta t i o n s o f RN S a d d e rs . M o r e o v e r , im-

    t a t i o n s o f a r i t h me t i c u n i t s t h a t o p e r a t e i n a fi n i te i n t e g e ring R(m) and tha t a re ca l led AUras a re o f fe red in the l i te ra ture

    (Stoura i t i s , 1993). Th ey a re le ss cos t ly and requi re le ss a rea andr d w a r e c o m p l e x i t y a n d p o w e r c o n s u m p t i o n . T h e y a re

    n t i n u o u s ly d e c o m p o s in g t h e r e s id u e b i t s t h a t c o r -e s p o n d t o p o w e r s o f 2 t h a t a r e l a rg e r t h a n o r e q u a l t o 2 n , u n t i lh e y a re r e d u c e d t o a s e t o f b i t s th a t c o r r e s p o n d t o a s u m o f

    e r s o f 2 tha t i s le ss than 2 n , whe re n = [ log2 m 1 . Thise c o m p o s i t i o n i s imp le m e n te d b y u s in g f u ll a d d e r ( FA ) a rr a y s.

    Fo r a ll mo d u l i , t h e FA - b a s ed A U ra s a re s h o w n to e x e c u t e m u c hf a s te r as w e l l a s h a v e mu c h s ma l l e r h a r d w a r e c o mp le x i t y a n di m e - c o m p l e x i t y p ro d u c t s t h a n R O M - h a se d g e n er al m u l t i -

    p l ie rs . S ince the AUras use fu ll adde r s a s the i r bas ic un i t s , t heyl e a d t o m o d u la r a n d r e g u l a r de s ig n s , w h ic h a r e i n e x p e n s iv e a n de a s y t o im p le m e n t i n V L SI.

    1 .3 . 3 E r r o r T o l e r a n c e i n R N S S y s t e m sBe c a u s e t h e r e i s n o i n t e r a c t i o n a mo n g d ig i t s ( c h a n n e l s ) i nr e s id u e a r i t h me t i c , a n y e r r o r s g e n e r a t e d a t o n e d ig i t c a n n o tp r o p a g a t e a n d c o n t a min a t e o th e r c h a n n e l s d u r in g s u b s e q u e n to p e r a t i o n s , g iv en t h a t n o c o n v e r s io n h a s o c c u r r e d f r o m th eRN S to a w e ig h t e d r e p r e s e n t a ti o n .

    I n a d d i t i o n , b e c a u s e t h e r e i s n o w e ig h t a s s o c i a t e d w i th t h eRN S r e s id u e s ( d ig i t s) , i f a n y d ig i t b e c o me s c o r r u p t e d , t h ea s s o c ia t e d c h a n n e l m a y b e e a s il y id e n t i f i ed a n d d e a l t w i th .

    Ba s e d o n t h e a m o u n t o f r e d u n d a n c y t h a t i s b u i l t i n a n RN Sprocessor , the f au l ty channe ls m ay be r ep laced or jus t i so la ted ,

    w i th t h e r e s t o f t h e s y s t e m o p e r a t i n g i n a " s o f t f a il u r e " mo d e ,b e in g a l l o w e d t o g r a c e f u l ly d e g r a d e i n to a c c u r a te o p e r a t i o n s o fr e d u c e d d y n a mic r a n g e . P r o v id e d t h a t t h e r e ma in in g d y n a micr a n g e c o n t a in s t h e r e s u l t s , t h e r e i s n o p r o b l e m w i th t h i s d e g -r a d a t i o n .

    T h e mo r e r e d u n d a n t a n RN S i s , t h e e a s i e r i t i s t o i d e n t i f ya n d c o r r e c t e r r o r s. A r e d u n d a n t R N S ( RRN S) u s e s a n u m b e r ro f m o d u l i i n a d d i t i o n t o t h e N s t a n d a r d m o d u l i t h a ta re necessa ry for cove r ing the des i r ed dynamic r ange . Al lN r mo d u l i mu s t b e r e la t iv e ly p r ime . I n a n RRN S, a n u m b e rX i s p r e s e n t e d b y a t o t a l o f N n o n r e d u n d a n t r e s id u e d igi t s{X 2 . . . . X N } p lu s r r e d u n d a n t r e s id u e d ig it s { X N + 1 . . . . XN+r}.

    IIN+rm i s r epresen ted byf t h e t o t a l n u m b e r o f s ta te s, MR = i=~ ,the RRNS. Th e M = I IiN1mi f i r st s ta te s con s t i tu te i t s " leg i t im -a t e r a n g e " w h i l e a n y n u m b e r t h a t l ie s in t h e r a n g e (M, MR), isca l led " i l leg i t ima te ."

    A n y s in g l e e r r o r mo v e s a l e g i t ima t e n u mb e r X in to a ni l l e g i t ima t e n u mb e r X t. O n c e i t is v e ri f ie d t h a t t h e n u m b e rbe ing te s ted i s i l leg i t ima te , i t s d ig i t s a re d isca rded one by one ,u n t i l a l e g i t ima t e r e p r e s e n t a t i o n i s f o u n d . T h e d i s c a r d e d d ig i tw h o s e o mi s s io n r e s u l t s i n t h e l e g i t ima t e r e p r e s e n t a t i o n i st h e e r r o n e o u s o n e . A c o r r e c t d ig i t c a n t h e n b e p r o d u c e db y e x t e n d in g t h e b a s e o f th e r e d u c e d R N S t h a t p r o d u c e dth e l e g i t ima t e r e p r e s e n t a t i o n . T h e a b o v e e r r o r - l o c a t i n g - a n d -c o r r e c t in g p r o c e d u r e c a n b e imp le m e n te d i n a v a r i e ty o fw a ys . A s s u min g t h a t t h e mix e d r a d ix r e p r e s e n t a t i o n s o f a llt h e r e d u c e d RN S r e p r e s e n t a t i o n s c a n b e e f f i c ie n t l y g e n e r a t e d ,the leg i t ima te one can be eas i ly iden t i f ied by checking theh ighes t o rde r m ixed rad ix d ig i t aga ins t ze ro . I f i t is ze ro ,the r epresen ta t ion i s leg i t ima te .

    M ix e d r a d ix r e p r e s e n t a t i o n s a s s o c i a t e d w i th t h e RN Sn u m b e r s c a n b e u s e d t o d e t e c t o v e r fl o w s a s w e ll as t o d e t e c ta n d c o r r e c t e r r o r s in r e d u n d a n t RN S s y s t ems . Fo r e x a mp le ,t o d e t e c t o v e r f l o w s , a r e d u n d a n t mo d u lu s mN+l i s added toth e b a s e a n d t h e c o r r e s p o n d in g h ig h e s t o r d e r m ix e d r a d ixd ig i t aN.l i s f o u n d a n d c o mp a r e d t o z e r o . A s s u min g t h a t t h e

  • 8/14/2019 Vlsi Systems

    12/13

  • 8/14/2019 Vlsi Systems

    13/13

    1 9 0 T h a n o s S t o u r a i t i s

    um i, M.A. , Ju l lien , G.A. , and M il le r , W.C. (1983). M ode ls o f VLSIi m p l e m e n t a t i o n o f r e s id u e n u m b e r s y s te m a r i t hm e t i c m o d u l e s .Proceed ings o f 6 th Sympo sium on C ompu ter Arithme t ic , 4 1 2 -4 1 3 .

    a n , A . P . , a n d B ro d e r se n , R . W. (19 9 5 ). Low power d ig i ta lC M O S d e s ig n . Boston : Kluwer Academic Pub l ishe rs .

    . A ., J r. , (1 9 9 8) . O n e -h o t r e s id u e c o d in g fo r l o w d e la y -p o w e rp r o d u c t C M O S d es ig n. IEEE Transac tions on Circu i ts and Sy ste ms --Part I I 45 , 3 0 3 -3 1 3 .

    ng , W .L., and Pa rh i , K.K. (1997). Low -pow er FIR d ig i ta l f i l te rsu s in g r e s id u e a r i t h m e t i c . Proceedings o f Th ir ty -f i rs t Asi lom ar Con-ference on Signals, Systems, and Computers 7 3 9 -7 4 3 .

    , M . K . (1 9 9 4 ). N o v e l d ig i t a l fi lt er im p le m e n ta t io n s u s in gh y b r i d R N S - b i n a r y a r i t h m e t i c . Signal Processing 40, 2 8 7 -2 9 4 .

    Computer ari thme t ic a lgori thms. Englewood Cl i f fs ,NJ: P ren t ice Ha l l .

    inos , I . , Pa l iouras , V., and S toura i t is , T . (1995). A nove l a lgor i thmf o r m u l t i o p e r a n d l o g a r i t h m i c n u m b e r s y s t e m a d d i t i o n a n d s u b -t r a c t i o n u s i n g p o l y n o m i a l a p p r o x i m a t i o n . Proceedings of Inter-na t iona l Symposium on Circu i ts and Systems, I I I . 1 9 9 2 - I I I . 1 9 9 5 .

    a l iouras, V. , and S toura i t is , T . (2001). S igna l ac t iv i ty and po we rc o n s u m p t i o n r e d u c t i o n u s i n g t h e lo g a r i th m i c n u m b e r s y s t e m . Pro-ceed ings o f IEEE In terna tiona l Symp osium on Circu i ts and Systems,I I . 6 5 3 - I I . 6 5 6 .

    and S toura i t is , T . (2001) . Low -pow er p ro per t ie s o f thel o g a r i t h m i c n u m b e r s y s t e m . Proceedings o f the 15 th Sympo sium onC o m p u te r A r i th m e t i c (A R IT H 1 5 ) , 2 2 9 -2 3 6 .

    Pa l iouras , V. , and S toura i t is , T . (1996) . A nove l a lgor i th m fo r accura tel o g a r i t h m i c n u m b e r s y s t e m s u b t r a c t i o n . Proceed ings o f In te r-na t iona l Symposium on Circu i ts and Systems. 4 , 2 6 8 -2 7 1 .

    Peebles, EZ. Jr. (1987). Probability , random variables, and randomsignal principles. N e w Y o rk : M c G ra w -H i l l .

    Soderstrand, M.A., Jenkins, W.K., Jullien, G.A., and Taylor, EJ. (1986).Residue number arithmetic: Modern applications in digital signalprocessing. New York : IEEE Press .

    S toura i t is , T . , Kim , S .W. , and Skavan tzos, A. (1993) . Fu l l adde r-bas edun i ts fo r f in i te in tege r r ings . IEEE Transactions on Circuits andS y s t e m s- -P a r t H 4 0 , 7 4 0 -7 4 5 .

    Tay lor, E , Gi l l , R . , Joseph , J . , and Radke , J . (1988). A 20 -b i t log a r i th -m i c n u m b e r s y s t em p r o c es s o r. IEEE Transactions on Computers, 37,190-199.

    Tay lor , EJ . , Papadourak is , G. , Skavan tzos, A. , and S toura i t is , T . Ara d ix -4 F F T u s in g c o m p le x R N S a r i th m e t i c . IEEE Transactions onComputers C-34, 573-576.

    S a ch a , J . R . , a n d I rw in , M . J . (19 9 8) . T h e lo g a r i th m ic n u m b e r sy s t e mfor s t reng th reduc t ion in adap t ive f i l te r ing . Proceedings ofIn terna t iona l Symp osium on Low-Power E lec tron ics and Design ,2 5 6 -2 6 1 .Stouraitis, T. (1986). Logarithmic number system: Theory, analysis anddesign. Ph.D. d iss. , Un ive rs i ty o f F lo r ida.

    Szab6 , N. , and Tanaka , R . (1967) . Residue ari thm e t ic and i ts app lica -tions to computer technology. N e w Y o rk : M c G ra w -H i l l .