specification of apertif polyphase filter bank in c ash
play

Specification of APERTIF Polyphase Filter Bank in C aSH Rinse Wester - PowerPoint PPT Presentation

Specification of APERTIF Polyphase Filter Bank in C aSH Rinse Wester a , Dimitrios Sarakiotis a , Eric Kooistra b , Jan Kuper a University of Twente, Enschede ASTRON, Dwingelo August 27, 2012 1 Monday, August 27, 12 Contents


  1. Specification of APERTIF Polyphase Filter Bank in C 흀 aSH Rinse Wester a , Dimitrios Sarakiotis a , Eric Kooistra b , Jan Kuper a University of Twente, Enschede ASTRON, Dwingelo August 27, 2012 1 Monday, August 27, 12

  2. Contents ✤ Introduction ✤ Background ✤ Describing the Filter bank using C λ aSH ✤ Results ✤ Conclusions & Future Work 2 Monday, August 27, 12

  3. Introduction ✤ What is C 흀 aSH? ✤ Functional Language and Compiler for Concurrent Digital Hardware Design ✤ Motivation? ✤ Testing C 흀 aSH on real life complex application ✤ Why APERTIF Polyphase filter bank? ✤ Strict specification on Throughput, Area and clock frequency 3 Monday, August 27, 12

  4. Background ✤ C λ aSH ✤ A functional language and compiler for digital hardware design ✤ On the lowest level, everything is a Mealy machine f(s,i) = (s’,o) ✤ A C λ aSH description is purely structural i.e. all operations are performed in a single clock cycle ✤ Simulation is cycle accurate 4 Monday, August 27, 12

  5. Background s s' a + out * b mac ( State s ) ( a , b ) = ( State s 0 , out ) where = s + a ∗ b s 0 out = s 0 5 Monday, August 27, 12

  6. Background u 0 u 1 u N-1 in * * * c 0 c 1 c N-1 w 0 w 1 w N-1 + + + 0 out fir cs ( State us ) inp = ( State us 0 , out ) where us 0 = inp + � us ws = vzipWith ( ⇤ ) us cs out = vfoldl (+) 0 ws 6 Monday, August 27, 12

  7. Background APERTIF project k ✤ APERTIF Polyphase Filter bank ✤ Increasing field of view of Westerbork telescope using small array ✤ Each antenna in the array requires a polyphase filter bank ✤ Goals: F clk = 200 MHz and throughput = 800 MS/s 7 Monday, August 27, 12

  8. Background ↓ M in * * * c 0 c M c (N-1)M + + ✤ APERTIF Polyphase ↓ M Filter bank * * * M = 1024 c 1 c M+1 c (N-1)M+1 ✤ Polyphase FIR filter + + M-point FFT N = 16 M = 1024 ✤ FFT ↓ M * * * c M-1 c 2M-1 c NM-1 + + 8 Monday, August 27, 12

  9. Describing the PFB ✤ Design method ✤ Polyphase filter ✤ FFT pipeline 9 Monday, August 27, 12

  10. Describing the PFB Design method ✤ Design whole Architecture first in plain Haskell ✤ Perform small modification such that the code is accepted by C 흀 aSH ✤ Lists are replaced by vectors: lists with fixed length ✤ Fixed point representation for numbers ✤ A clear division between structure and low level hardware details Functional description Mathematics C 훌 aSH Hardware Haskell 10 Simulation/behavioral verification Monday, August 27, 12

  11. Describing the PFB Polyphase Filter ✤ A set of FIR filters FIR 0 Coefficients sequentially activated cntr FIR 1 inp inp FIR comb out ✤ Parallelization of P=4 States FIR M-1 needed pfs css ( uss , cntr ) inp = (( uss 0 , cntr 0 ) , out ) where = ( cntr + 1) ‘ mod ‘ ( length css ) cntr 0 = uss ! cntr us = css ! cntr cs ( us 0 , out ) = fir cs us inp = replace cntr us 0 uss uss 0 11 Monday, August 27, 12

  12. Describing the PFB Polyphase Filter ✤ A set of FIR filters FIR 0 Coefficients sequentially activated cntr FIR 1 inp inp FIR comb out ✤ Parallelization of P=4 States FIR M-1 needed pfs css ( uss , cntr ) inp = (( uss 0 , cntr 0 ) , out ) where = ( cntr + 1) ‘ mod ‘ ( length css ) cntr 0 = uss ! cntr us = css ! cntr cs ( us 0 , out ) = fir cs us inp = replace cntr us 0 uss uss 0 11 Monday, August 27, 12

  13. Describing the PFB Polyphase Filter ✤ A set of FIR filters FIR 0 Coefficients sequentially activated cntr FIR 1 inp inp FIR comb out ✤ Parallelization of P=4 States FIR M-1 needed pfs css ( uss , cntr ) inp = (( uss 0 , cntr 0 ) , out ) where = ( cntr + 1) ‘ mod ‘ ( length css ) cntr 0 = uss ! cntr us = css ! cntr cs ( us 0 , out ) = fir cs us inp = replace cntr us 0 uss uss 0 11 Monday, August 27, 12

  14. Describing the PFB Parallel Polyphase Filter Coefficients Coefficients cntr Coefficients cntr Coefficients cntr out 0 inp 0 FIR comb cntr out 1 inp 1 FIR comb out 2 inp 2 FIR comb out 3 inp 3 FIR comb States States States States parpfs csss states inps = ( states 0 , outs ) where = zipWith3 pfs csss states inps res ( states 0 , outs ) = unzip res 12 Monday, August 27, 12

  15. Describing the PFB FIR filter: Haskell → C λ aSH u 0 u 1 u N-1 in * * * c 0 c 1 c N-1 w 0 w 1 w N-1 + + + 0 out fir :: [ Double ] ! ( State [ Double ]) ! Double ! ( State [ Double ] , Double ) ( State us ) = ( State us , out ) fir cs inp where = inp + us � us ws = zipWith ( ⇤ ) uscs out = foldl (+) 0 ws 13 Monday, August 27, 12

  16. Describing the PFB FIR filter: Haskell → C λ aSH u 0 u 1 u N-1 in * * * c 0 c 1 c N-1 w 0 w 1 w N-1 + + + 0 out fir :: [ Double ] ! ( State [ Double ]) ! Double ! ( State [ Double ] , Double ) ( State us ) = ( State us , out ) fir cs inp where = inp + us � us ws = zipWith ( ⇤ ) uscs out = foldl (+) 0 ws fir :: ( Vector D16 S ) ! ( State ( Vector D16 S )) ! S ! ( State ( Vector D16 S ) , S ) ( State us ) inp = ( State us , out ) fir cs where = inp + us � us ws = vzipWith ‘ fpmult ‘ uscs out = vfoldl (+) 0 ws 13 Monday, August 27, 12

  17. Describing the PFB FIR filter: Haskell → C λ aSH u 0 u 1 u N-1 in * * * c 0 c 1 c N-1 w 0 w 1 w N-1 + + + 0 out fir :: [ Double ] ! ( State [ Double ]) ! Double ! ( State [ Double ] , Double ) ( State us ) = ( State us , out ) fir cs inp where = inp + us � us ws = zipWith ( ⇤ ) uscs out = foldl (+) 0 ws fir :: ( Vector D16 S ) ! ( State ( Vector D16 S )) ! S ! ( State ( Vector D16 S ) , S ) ( State us ) inp = ( State us , out ) fir cs where = inp + us � us ws = vzipWith ‘ fpmult ‘ uscs out = vfoldl (+) 0 ws 13 Monday, August 27, 12

  18. Describing the PFB FIR filter: Haskell → C λ aSH u 0 u 1 u N-1 in * * * c 0 c 1 c N-1 w 0 w 1 w N-1 + + + 0 out fir :: [ Double ] ! ( State [ Double ]) ! Double ! ( State [ Double ] , Double ) ( State us ) = ( State us , out ) fir cs inp where = inp + us � us ws = zipWith ( ⇤ ) uscs out = foldl (+) 0 ws fir :: ( Vector D16 S ) ! ( State ( Vector D16 S )) ! S ! ( State ( Vector D16 S ) , S ) ( State us ) inp = ( State us , out ) fir cs where = inp + us � us ws = vzipWith ‘ fpmult ‘ uscs out = vfoldl (+) 0 ws 13 Monday, August 27, 12

  19. Describing the PFB FFT pipeline 8 4 ws 2 1 ws BF2I BF2II BF2I BF2II * * inp out 14 Monday, August 27, 12

  20. Describing the PFB FFT pipeline 8 4 ws 2 1 ws BF2I BF2II BF2I BF2II * * inp out ✤ FFT is implemented using pipeline ✤ Two types of butterflies and Complex multiplier 14 Monday, August 27, 12

  21. Describing the PFB FFT pipeline 8 4 ws 2 1 ws BF2I BF2II BF2I BF2II * * inp out bf2i ( cntr , lst ) inp = (( cntr 0 , lst 0 ) , out ) lstout lstin lst where = length lst n out = ( cntr + 1) ‘ mod ‘ n cntr 0 + lst 0 = lstin + � lst cntr ( out , lstin ) = if cntr > n - then ( lstout + inp , lstout � inp ) inp else ( lstout ) , inp = last lst lstout 14 Monday, August 27, 12

  22. Describing the PFB FFT pipeline 8 4 ws 2 1 ws BF2I BF2II BF2I BF2II * * inp out cmult ws cntr inp = ( cntr 0 , out ) where = length ws n cntr 0 = ( cntr + 1) ‘ mod ‘ n = ws ! cntr w = inp ⇤ w out 14 Monday, August 27, 12

  23. Describing the PFB FFT pipeline 8 4 ws 2 1 ws BF2I BF2II BF2I BF2II * * inp out ff tbb ws ( bf1state , bf2state , cmstate ) inp = (( bf1state 0 , bf2state 0 , cmstate 0 ) , out ) where ( bf1state 0 , a ) = bf2i bf1state inp ( bf2state 0 , b ) = bf2ii bf2state a ( cmstate 0 , out ) = cmult ws cmstate b 14 Monday, August 27, 12

  24. Describing the PFB FFT pipeline 8 4 ws 2 1 ws BF2I BF2II BF2I BF2II * * inp out ff tchain ( ws1 , ws2 , ... ) ( bb1state , bb2state , ... ) inp = (( bb1state 0 , bb2state 0 , ... ) , out ) where ( bb1state 0 , d1 ) = ff tbb ws1 bb1state inp ( bb2state 0 , d2 ) = ff tbb ws2 bb2state d1 � � ( bbNstate 0 , out ) = ff tbb wsN bbNstate d9 14 Monday, August 27, 12

  25. Describing the PFB FFT BF2I: Haskell → C λ aSH bf2i clash ( cntr , lst ) inp = (( cntr 0 , lst 0 ) , out ) bf2i ( cntr , lst ) inp = (( cntr 0 , lst 0 ) , out ) where where = vlength lst = length lst n n cntr 0 = ( cntr + 1) ‘ mod ‘ n cntr 0 = cntr + 1 lst 0 = lstin + = lstin + � lst lst 0 � lst ( out , lstin ) = if cntr > n ( out , lstin ) = if cntr > n then ( lstout + inp , lstout � inp ) then ( lstout + inp , lstout � inp ) else ( lstout ) , inp else ( lstout , inp ) = last lst lstout = vlast lst lstout 15 Monday, August 27, 12

  26. Describing the PFB FFT BF2I: Haskell → C λ aSH bf2i clash ( cntr , lst ) inp = (( cntr 0 , lst 0 ) , out ) bf2i ( cntr , lst ) inp = (( cntr 0 , lst 0 ) , out ) where where = vlength lst = length lst n n cntr 0 = ( cntr + 1) ‘ mod ‘ n cntr 0 = cntr + 1 lst 0 = lstin + = lstin + � lst lst 0 � lst ( out , lstin ) = if cntr > n ( out , lstin ) = if cntr > n then ( lstout + inp , lstout � inp ) then ( lstout + inp , lstout � inp ) else ( lstout ) , inp else ( lstout , inp ) = last lst lstout = vlast lst lstout 15 Monday, August 27, 12

Recommend


More recommend