250 likes | 422 Views
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
E N D
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 • Quantization • Choose the best allocation of bits
Fixed-Point C Model saturation Work point: truncation quantization
Fixed-Point C Model In every clock : 3 4 5 6 7 8 9 64 point
Fixed-Point C Model • Floating point • Exactly the value • Hard for hardware implementation • Fixed point • Quantization • Truncation、saturation • Easy for hardware implementation
Fixed-Point C Model Take fixed number: S=1 S=1 Can reduce ½ of error error signal caused by the quantization! The following C model apply the first method
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
Fixed-Point C Model SNR (S/N) :Signal-to Noise Ratio SQNR: Signal-to-Quantization-Noise Ratio
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.25 xxx.xxoo : max error < 0.125 ½ 10log4≈6
Simulation by C Language(1/9) Wordlength Simulation: fractional=10 Average of 10 points SQNR: Integer word length Integer=6 Twiddle factor word length
Simulation by C Language(2/9) Wordlength Simulation: twiddle factor=13 Average of 10 points SQNR: Integer=6 Fractional wordlength Integer wordlength
Simulation by C Language(3/9) • Critical value • Take integer wordlength=6 Analyze:
Simulation by C Language(4/9) Wordlength Simulation: integer =6 Average of 100 points Fractional=10 t.f=10 SQNR: Fractional=9 t.f=11 Fractional wordlength Twiddle factor wordlength
Simulation by C Language(5/9) Average of 100 points Wordlength Simulation: integer =5 Wordlength Simulation: integer =7 SQNR: SQNR: T.F wordlength T.F wordlength Frac. wordlength Frac. wordlength
Simulation by C Language(6/9) Word length Simulation: integer =6 Average of 50 points Variance: Twiddle factor wordlength Fractional wordlength
Simulation by C Language(7/9) • With larger wordlength ,there should be smaller variance • But some area are not • Should take more point number
Simulation by C Language(8/9) Difference by twiddle factor: Average of 20 points Wordlength Simulation: integer =6 Wordlength Simulation: integer =7 Difference of SQNR : Difference of SQNR : T.F = 7 T.F = 7 T.F = 10 T.F = 10 Fractional wordlength Fractional wordlength Twiddle factor wordlength Twiddle factor wordlength
Simulation by C Language(9/9) • Should be only one maximum • Should take enough point number
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
RTL model • lib.v • main.v • Connect the lines
Lib.v Already tested successfully. module BF2ii(Zar,Zai,Zbr,Zbi,Xar,Xai,Xbr,Xbi,s,t); module BF2i(Zar,Zai,Zbr,Zbi,Xar,Xai,Xbr,Xbi,s);
Main.v Still need to work on it.
Future work: • RTL code to be completed • Search for better performance • Synthesis circuit
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/