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

specification of apertif polyphase filter bank in c ash
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

August 27, 2012

Specification of APERTIF Polyphase Filter Bank in C흀aSH

Rinse Westera, Dimitrios Sarakiotisa, Eric Kooistrab, Jan Kupera University of Twente, Enschede ASTRON, Dwingelo

1

Monday, August 27, 12

slide-2
SLIDE 2

Contents

✤ Introduction ✤ Background ✤ Describing the Filter bank using CλaSH ✤ Results ✤ Conclusions & Future Work

2

Monday, August 27, 12

slide-3
SLIDE 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

slide-4
SLIDE 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

slide-5
SLIDE 5

Background

+

a

*

b

  • ut

s' s

mac (State s) (a, b) = (State s0, out) where s0 = s + a ∗ b

  • ut = s0

5

Monday, August 27, 12

slide-6
SLIDE 6

Background

fir cs (State us) inp = (State us0, out) where us0 = inp + us ws = vzipWith (⇤) us cs

  • ut = vfoldl (+) 0 ws

+ *

in

+ * + *

cN-1 c0 c1

  • ut

u0 u1 uN-1 w0 w1 wN-1

6

Monday, August 27, 12

slide-7
SLIDE 7

Background

✤ 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: Fclk = 200 MHz and throughput = 800 MS/s

7

APERTIF project

k Monday, August 27, 12

slide-8
SLIDE 8

Background

✤ APERTIF Polyphase

Filter bank

✤ Polyphase FIR filter ✤ FFT

*

in

+ * + *

c(N-1)M c0 cM

↓M

* + * + *

c(N-1)M+1 c1 cM+1

↓M

* + * + *

cNM-1 cM-1 c2M-1

↓M M = 1024 N = 16 M-point FFT M = 1024

8

Monday, August 27, 12

slide-9
SLIDE 9

Describing the PFB

✤ Design method ✤ Polyphase filter ✤ FFT pipeline

9

Monday, August 27, 12

slide-10
SLIDE 10

Describing the PFB

✤ 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

Design method

Functional description

Mathematics Haskell C훌aSH Hardware

Simulation/behavioral verification

10

Monday, August 27, 12

slide-11
SLIDE 11

Describing the PFB

✤ A set of FIR filters

sequentially activated

✤ Parallelization of P=4

needed Polyphase Filter

FIR0 cntr inp

  • ut

FIR1 FIRM-1 FIRcomb Coefficients States inp

pfs css (uss, cntr) inp = ((uss0, cntr 0), out) where cntr 0 = (cntr + 1) ‘mod‘ (length css) us = uss ! cntr cs = css ! cntr (us0, out) = fir cs us inp uss0 = replace cntr us0 uss

11

Monday, August 27, 12

slide-12
SLIDE 12

Describing the PFB

✤ A set of FIR filters

sequentially activated

✤ Parallelization of P=4

needed Polyphase Filter

FIR0 cntr inp

  • ut

FIR1 FIRM-1 FIRcomb Coefficients States inp

pfs css (uss, cntr) inp = ((uss0, cntr 0), out) where cntr 0 = (cntr + 1) ‘mod‘ (length css) us = uss ! cntr cs = css ! cntr (us0, out) = fir cs us inp uss0 = replace cntr us0 uss

11

Monday, August 27, 12

slide-13
SLIDE 13

Describing the PFB

✤ A set of FIR filters

sequentially activated

✤ Parallelization of P=4

needed Polyphase Filter

FIR0 cntr inp

  • ut

FIR1 FIRM-1 FIRcomb Coefficients States inp

pfs css (uss, cntr) inp = ((uss0, cntr 0), out) where cntr 0 = (cntr + 1) ‘mod‘ (length css) us = uss ! cntr cs = css ! cntr (us0, out) = fir cs us inp uss0 = replace cntr us0 uss

11

Monday, August 27, 12

slide-14
SLIDE 14

Describing the PFB

Parallel Polyphase Filter

cntr FIRcomb Coefficients States inp0

  • ut0

cntr FIRcomb Coefficients States inp1

  • ut1

cntr FIRcomb Coefficients States inp2

  • ut2

cntr FIRcomb Coefficients States inp3

  • ut3

parpfs csss states inps = (states0, outs) where res = zipWith3 pfs csss states inps (states0, outs) = unzip res

12

Monday, August 27, 12

slide-15
SLIDE 15

fir :: [Double ] ! (State [Double ]) ! Double ! (State [Double ], Double) fir cs (State us) inp = (State us , out) where us = inp + us ws = zipWith (⇤) uscs

  • ut = foldl (+) 0 ws

Describing the PFB

FIR filter: Haskell → CλaSH

13 + *

in

+ * + *

cN-1 c0 c1

  • ut

u0 u1 uN-1 w0 w1 wN-1 Monday, August 27, 12

slide-16
SLIDE 16

fir :: (Vector D16 S) ! (State (Vector D16 S)) ! S ! (State (Vector D16 S), S) fir cs (State us) inp = (State us,

  • ut)

where us = inp + us ws = vzipWith ‘fpmult‘ uscs

  • ut = vfoldl (+) 0 ws

fir :: [Double ] ! (State [Double ]) ! Double ! (State [Double ], Double) fir cs (State us) inp = (State us , out) where us = inp + us ws = zipWith (⇤) uscs

  • ut = foldl (+) 0 ws

Describing the PFB

FIR filter: Haskell → CλaSH

13 + *

in

+ * + *

cN-1 c0 c1

  • ut

u0 u1 uN-1 w0 w1 wN-1 Monday, August 27, 12

slide-17
SLIDE 17

fir :: (Vector D16 S) ! (State (Vector D16 S)) ! S ! (State (Vector D16 S), S) fir cs (State us) inp = (State us,

  • ut)

where us = inp + us ws = vzipWith ‘fpmult‘ uscs

  • ut = vfoldl (+) 0 ws

fir :: [Double ] ! (State [Double ]) ! Double ! (State [Double ], Double) fir cs (State us) inp = (State us , out) where us = inp + us ws = zipWith (⇤) uscs

  • ut = foldl (+) 0 ws

Describing the PFB

FIR filter: Haskell → CλaSH

13 + *

in

+ * + *

cN-1 c0 c1

  • ut

u0 u1 uN-1 w0 w1 wN-1 Monday, August 27, 12

slide-18
SLIDE 18

fir :: (Vector D16 S) ! (State (Vector D16 S)) ! S ! (State (Vector D16 S), S) fir cs (State us) inp = (State us,

  • ut)

where us = inp + us ws = vzipWith ‘fpmult‘ uscs

  • ut = vfoldl (+) 0 ws

fir :: [Double ] ! (State [Double ]) ! Double ! (State [Double ], Double) fir cs (State us) inp = (State us , out) where us = inp + us ws = zipWith (⇤) uscs

  • ut = foldl (+) 0 ws

Describing the PFB

FIR filter: Haskell → CλaSH

13 + *

in

+ * + *

cN-1 c0 c1

  • ut

u0 u1 uN-1 w0 w1 wN-1 Monday, August 27, 12

slide-19
SLIDE 19

Describing the PFB

FFT pipeline

14

inp

*

  • ut

8 BF2I 4 BF2II ws

*

2 BF2I 1 BF2II ws Monday, August 27, 12

slide-20
SLIDE 20

✤ FFT is implemented using pipeline ✤ Two types of butterflies and Complex multiplier

Describing the PFB

FFT pipeline

14

inp

*

  • ut

8 BF2I 4 BF2II ws

*

2 BF2I 1 BF2II ws Monday, August 27, 12

slide-21
SLIDE 21

Describing the PFB

FFT pipeline

14

bf2i (cntr, lst) inp = ((cntr 0, lst0), out) where n = length lst cntr 0 = (cntr + 1) ‘mod‘ n lst0 = lstin + lst (out, lstin) = if cntr > n then (lstout + inp, lstout inp) else (lstout , inp ) lstout = last lst

lst

+

  • cntr

lstin lstout inp

  • ut

inp

*

  • ut

8 BF2I 4 BF2II ws

*

2 BF2I 1 BF2II ws Monday, August 27, 12

slide-22
SLIDE 22

Describing the PFB

FFT pipeline

14

cmult ws cntr inp = (cntr 0, out) where n = length ws cntr 0 = (cntr + 1) ‘mod‘ n w = ws ! cntr

  • ut

= inp ⇤ w

inp

*

  • ut

8 BF2I 4 BF2II ws

*

2 BF2I 1 BF2II ws Monday, August 27, 12

slide-23
SLIDE 23

Describing the PFB

FFT pipeline

14

fftbb ws (bf1state, bf2state, cmstate) inp = ((bf1state0, bf2state0, cmstate0), out) where (bf1state0, a) = bf2i bf1state inp (bf2state0, b) = bf2ii bf2state a (cmstate0, out) = cmult ws cmstate b

inp

*

  • ut

8 BF2I 4 BF2II ws

*

2 BF2I 1 BF2II ws Monday, August 27, 12

slide-24
SLIDE 24

Describing the PFB

FFT pipeline

14

fftchain (ws1, ws2, ...) (bb1state, bb2state, ...) inp = ((bb1state0, bb2state0, ...), out) where (bb1state0, d1) = fftbb ws1 bb1state inp (bb2state0, d2) = fftbb ws2 bb2state d1

  • (bbNstate0, out) = fftbb wsN bbNstate d9

inp

*

  • ut

8 BF2I 4 BF2II ws

*

2 BF2I 1 BF2II ws Monday, August 27, 12

slide-25
SLIDE 25

Describing the PFB

FFT BF2I: Haskell → CλaSH

15

bf2i (cntr, lst) inp = ((cntr 0, lst0), out) where n = length lst cntr 0 = (cntr + 1) ‘mod‘ n lst0 = lstin + lst (out, lstin) = if cntr > n then (lstout + inp, lstout inp) else (lstout , inp ) lstout = last lst

bf2i clash (cntr, lst) inp = ((cntr 0, lst0), out) where n = vlength lst cntr 0 = cntr + 1 lst0 = lstin + lst (out, lstin) = if cntr > n then (lstout + inp, lstout inp) else (lstout, inp) lstout = vlast lst

Monday, August 27, 12

slide-26
SLIDE 26

Describing the PFB

FFT BF2I: Haskell → CλaSH

15

bf2i (cntr, lst) inp = ((cntr 0, lst0), out) where n = length lst cntr 0 = (cntr + 1) ‘mod‘ n lst0 = lstin + lst (out, lstin) = if cntr > n then (lstout + inp, lstout inp) else (lstout , inp ) lstout = last lst

bf2i clash (cntr, lst) inp = ((cntr 0, lst0), out) where n = vlength lst cntr 0 = cntr + 1 lst0 = lstin + lst (out, lstin) = if cntr > n then (lstout + inp, lstout inp) else (lstout, inp) lstout = vlast lst

Monday, August 27, 12

slide-27
SLIDE 27

Describing the PFB

FFT BF2I: Haskell → CλaSH

15

bf2i (cntr, lst) inp = ((cntr 0, lst0), out) where n = length lst cntr 0 = (cntr + 1) ‘mod‘ n lst0 = lstin + lst (out, lstin) = if cntr > n then (lstout + inp, lstout inp) else (lstout , inp ) lstout = last lst

bf2i clash (cntr, lst) inp = ((cntr 0, lst0), out) where n = vlength lst cntr 0 = cntr + 1 lst0 = lstin + lst (out, lstin) = if cntr > n then (lstout + inp, lstout inp) else (lstout, inp) lstout = vlast lst

Monday, August 27, 12

slide-28
SLIDE 28

Results

✤ Polyphase filter bank has been fully implemented using C흀aSH ✤ Simulation shows that the PFB operates correctly ✤ Synthesis revealed some limitations of the current compiler

16

Polyphase filter(256 elements) 1k-points FFT Logic utilization 91% 6% blockRAMS DSP blocks 128 70

  • Max. Fclk

114 MHz 195 MHz

Monday, August 27, 12

slide-29
SLIDE 29

Conclusions

✤ The complete Polyphase Filter Bank has been implemented ✤ Haskell code needs only small modifications before it is accepted by

the C흀aSH compiler

✤ The description is purely parallel (structural) and cycle accurate ✤ Shortcomings of C흀aSH compiler ✤ Large coefficient vectors not supported ✤ BlockRAM not supported, limiting Fclk

17

Monday, August 27, 12

slide-30
SLIDE 30

Future Work

✤ Develop area vs time time trade off based on functional description ✤ Improvements for the C흀aSH compiler ✤ Support for blockRAMs on FPGA ✤ Support for memory initialization files for coefficient vectors

18

Monday, August 27, 12

slide-31
SLIDE 31

Questions ?

19

Monday, August 27, 12