25
1 95-1 Under-Graduate Project Adviser: Prof. An-Yeu Wu Mentor: 詹詹詹 詹詹詹 詹詹詹 詹詹詹

95-1 Under-Graduate Project

Embed Size (px)

DESCRIPTION

95-1 Under-Graduate Project. Adviser: Prof. An-Yeu Wu Mentor: 詹承洲 第二組 溫仁揚 溫昌懌. Outline. Purpose of fixed-point Analysis Fixed-point C model Simulation by C language RTL model Conclusion Future work Reference. Purpose of Fixed-Point Analysis. Simulate hardware implementation - PowerPoint PPT Presentation

Citation preview

Page 1: 95-1 Under-Graduate Project

1

95-1 Under-Graduate Project

Adviser: Prof. An-Yeu WuMentor: 詹承洲

第二組溫仁揚 溫昌懌

Page 2: 95-1 Under-Graduate Project

2

Outline

Purpose of fixed-point Analysis Fixed-point C model Simulation by C language RTL model Conclusion Future work Reference

Page 3: 95-1 Under-Graduate Project

3

Purpose of Fixed-Point Analysis

Simulate hardware implementation

Quantization Choose the best allocation of

bits

Page 4: 95-1 Under-Graduate Project

4

Fixed-Point C Model

quantization

saturation

truncation

Work point:

Page 5: 95-1 Under-Graduate Project

5

Fixed-Point C Model

In every clock :

3 4 5 6 7 8 9

64 point

Page 6: 95-1 Under-Graduate Project

6

Fixed-Point C Model

Floating point Exactly the value Hard for hardware implementation

Fixed point Quantization Truncation 、 saturation Easy for hardware implementation

Page 7: 95-1 Under-Graduate Project

7

Fixed-Point C Model

S=1S=1

Take fixed number:

Can reduce ½ of error

error signal caused by the quantization!

The following C model apply the first method

Page 8: 95-1 Under-Graduate Project

8

Fixed-Point C Model

Requirement: Number of bits for input data: 10~14 Number of bits for output data: 16~20 Dynamic range for input data: [-4 4] Integer part of input data: 3~10 fractional part of input data: 3~10 Twiddle factor: 6~13 SQNR ≥ 50dB

Page 9: 95-1 Under-Graduate Project

9

Fixed-Point C Model

SQNR: Signal-to-Quantization-Noise Ratio

SNR (S/N) :Signal-to Noise Ratio

Page 10: 95-1 Under-Graduate Project

10

Fixed-Point C Model

Note that for each bit added to a sample, the SQNR goes up by about 6dB.

xxx.xooo : max error < 0.25xxx.xxoo : max error < 0.125

10log4≈6

½

Page 11: 95-1 Under-Graduate Project

11

Simulation by C Language(1/9)Wordlength Simulation: fractional=10

Integer=6

68

1012

4 6 8 10-100102030405060

50-60

40-50

30-40

20-30

10-20

0-10

-10-0Twiddle factor word length Integer word length

SQNR:Average of 10 points

Page 12: 95-1 Under-Graduate Project

12

Simulation by C Language(2/9)

Wordlength Simulation: twiddle factor=13

Integer=6

35

79

35

79

0

10

20

30

40

50

60

50-60

40-50

30-40

20-30

10-20

0-10

SQNR:

Integer wordlengthFractional wordlength

Average of 10 points

Page 13: 95-1 Under-Graduate Project

13

Simulation by C Language(3/9)

Critical value Take integer wordlength=6

Analyze:

Page 14: 95-1 Under-Graduate Project

14

Simulation by C Language(4/9)

Wordlength Simulation: integer =6

0

10

20

30

40

50

60

70

80

90

第一季 第三季

東部

中部

北部

6

810

12

3

6

9

0

10

20

30

40

50

60

50-60

40-50

30-40

20-30

10-20

0-10

SQNR:

Twiddle factor wordlengthFractional wordlength

Fractional=10t.f=10

Fractional=9t.f=11

Average of 100 points

Page 15: 95-1 Under-Graduate Project

15

Simulation by C Language(5/9)

345678910 6

110

10

20

30

40

50

40-50

30-40

20-30

10-20

0-10

Wordlength Simulation: integer =5

T.F wordlengthFrac. wordlength

Average of 100 points

SQNR:

345678910

6

810

12

0

10

20

30

40

50

60

50-60

40-50

30-40

20-30

10-20

0-10

SQNR:

Wordlength Simulation: integer =7

T.F wordlengthFrac. wordlength

Page 16: 95-1 Under-Graduate Project

16

Simulation by C Language(6/9)Word length Simulation: integer =6

35

79

11

6

9

12

150

0.20.40.6

0.8

1

0.8-1

0.6-0.8

0.4-0.6

0.2-0.4

0-0.2

Twiddle factor wordlengthFractional wordlength

Variance:

Average of 50 points

Page 17: 95-1 Under-Graduate Project

17

Simulation by C Language(7/9)

With larger wordlength ,there should be smaller variance

But some area are not

Should take more point number

Page 18: 95-1 Under-Graduate Project

18

Simulation by C Language(8/9)

35

79

1113

6 8 10 12-202468

10 8-10

6-8

4-6

2-4

0-2

-2-0

Wordlength Simulation: integer =6

Twiddle factor wordlength

Difference of SQNR :

Wordlength Simulation: integer =7

35

79

1113

6 8 10 120

2

4

6

8

10

8-106-84-62-40-2

Difference of SQNR :

Fractional wordlengthTwiddle factor wordlength

Fractional wordlength

T.F = 7 T.F = 7

Average of 20 pointsDifference by twiddle factor:

T.F = 10

T.F = 10

Page 19: 95-1 Under-Graduate Project

19

Simulation by C Language(9/9)

Should be only one maximum

Should take enough point number

Page 20: 95-1 Under-Graduate Project

20

Conclusion:

Work point: Integer =6 Fractional=10 t.f=10 or Integer =6 Fractional=9 t.f=11

Fractional =7 has the best performance when other variable

Page 21: 95-1 Under-Graduate Project

21

RTL model

lib.v main.v Connect the lines

Page 22: 95-1 Under-Graduate Project

22

Lib.v

module BF2ii(Zar,Zai,Zbr,Zbi,Xar,Xai,Xbr,Xbi,s,t);

module BF2i(Zar,Zai,Zbr,Zbi,Xar,Xai,Xbr,Xbi,s);

Already tested successfully.

Page 23: 95-1 Under-Graduate Project

23

Main.v

Still need to work on it.

Page 24: 95-1 Under-Graduate Project

24

Future work:

RTL code to be completed Search for better

performance Synthesis circuit

Page 25: 95-1 Under-Graduate Project

25

Reference : Shousheng He & Torkelson, M.,”A new approach to pipeline

FFT processor,” Proceedings of IPPS’96, 15-19 April 1996, pp766-770.

施信毓 ,”95-1 Under-Graduate Project, Final Project: Fixed_point”,08 Dec 2006.

http://en.wikipedia.org/ http://zh.wikipedia.org/