95-1 under-graduate project

Post on 03-Jan-2016

45 Views

Category:

Documents

2 Downloads

Preview:

Click to see full reader

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

TRANSCRIPT

1

95-1 Under-Graduate Project

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

第二組溫仁揚 溫昌懌

2

Outline

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

3

Purpose of Fixed-Point Analysis

Simulate hardware implementation

Quantization Choose the best allocation of

bits

4

Fixed-Point C Model

quantization

saturation

truncation

Work point:

5

Fixed-Point C Model

In every clock :

3 4 5 6 7 8 9

64 point

6

Fixed-Point C Model

Floating point Exactly the value Hard for hardware implementation

Fixed point Quantization Truncation 、 saturation Easy for hardware implementation

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

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

9

Fixed-Point C Model

SQNR: Signal-to-Quantization-Noise Ratio

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

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

½

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

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

13

Simulation by C Language(3/9)

Critical value Take integer wordlength=6

Analyze:

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

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

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

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

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

19

Simulation by C Language(9/9)

Should be only one maximum

Should take enough point number

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

21

RTL model

lib.v main.v Connect the lines

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.

23

Main.v

Still need to work on it.

24

Future work:

RTL code to be completed Search for better

performance Synthesis circuit

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/

top related