Download presentation
Presentation is loading. Please wait.
1
6/3/2015 SHARC99 Conference Copyright M. Smith smith@enel.ucalgary.ca This presentation will probably involve audience discussion, which will create action items. Use PowerPoint to keep track of these action items during your presentation In Slide Show, click on the right mouse button Select “Meeting Minder” Select the “Action Items” tab Type in action items as they come up Click OK to dismiss this box This will automatically create an Action Item slide at the end of your presentation with your points entered. SHARC99 Conference, U.K. November/December, 1999 Finite Precision Effects in Digital Filter Implementations L. E. Turner and M. R. Smith, University of Calgary, Alberta, Canada
2
6/3/2015 SHARC99 Conference Copyright M. Smith smith@enel.ucalgary.ca Format for the Day Why worry? Finite Precision Effects –Multiplier Coefficient Quantization –Signal Quantization –Filter Structure Effects DIGICAP -- Tool details not covered in paper –Filter Response Calculation –Quantization Effect Calculation –Availability Conclusion
3
6/3/2015 SHARC99 Conference Copyright M. Smith smith@enel.ucalgary.ca Why bother? If the filter implementation is incorrect then Incorrect final design Special advantages in newer processor architecture are wasted Problem can be overcome in many cases
4
6/3/2015 SHARC99 Conference Copyright M. Smith smith@enel.ucalgary.ca Example -- IIR filter Direct Form third-order digital Infinite duration Impulse Response Chebychev filter
5
6/3/2015 SHARC99 Conference Copyright M. Smith smith@enel.ucalgary.ca Theoretical Filter Response Filter Coefficients b1 = 1.266 765 327 584 4 PASS BAND b2 = -0.816 689 070 728 84 b3 = 0.211 876 355 985 14 ZOOMED PASS BAND
6
6/3/2015 SHARC99 Conference Copyright M. Smith smith@enel.ucalgary.ca Problems -- Finite number of bits Register Width Data Bus width -- Memory Multiplication truncation Accumulation truncation Many designers familiar with need to scale input to avoid overflow problems when using integer processors
7
6/3/2015 SHARC99 Conference Copyright M. Smith smith@enel.ucalgary.ca Trying to avoid non-ideal effects of finite number of bits during mathematical operations d3d2d1d0????ss? d6d5d4 16-bit integer format Overflow protection Underflow protection Where is the best location to place an 8-bit input signal within a 16-bit integer format? Algorithm dependent
8
6/3/2015 SHARC99 Conference Copyright M. Smith smith@enel.ucalgary.ca Floating point processors are not immune from the effect of truncation d6d5d4d3d2d1d0?s??? SHARC 16-bit short word floating point format 1. f10 ……….. f0 s e3 …….. e0 16-bit float -- Seems to be only 11-bits really available before non-ideal effects come into account -- but see later Floating point operations -- only scale as, and when needed -- convenient -- actually less accurate than equivalent word length integer
9
6/3/2015 SHARC99 Conference Copyright M. Smith smith@enel.ucalgary.ca Truncation effects have effect on Filter response directly “Ideal” b2 = -0.816 689 070 728 84 “Actual” b2 -- 7-bit precision –6 bits and a sign –value = -0.8125 ( 52 / 64) –Truncated because of architecture –OR, effectively truncated because of overflow or underflow protection concerns
10
6/3/2015 SHARC99 Conference Copyright M. Smith smith@enel.ucalgary.ca Direct Form Filter Coefficient Quantization Filter responses using quantized filter coefficients are calculated using the tool DIGICAP available from the L. E. Turner at University of Calgary 7-bits QUANTIZED COEFFICIENTS IDEAL
11
6/3/2015 SHARC99 Conference Copyright M. Smith smith@enel.ucalgary.ca Solutions Modify each filter coefficient in a different manner to minimize the error. –Random Hacking (Guessing) –Simulated Annealing -- see references -- coefficient polishing Change filter form so that filter characteristics are generally less sensitive to truncation effects –LDI filters for example based on Ladder Filter Topology
12
6/3/2015 SHARC99 Conference Copyright M. Smith smith@enel.ucalgary.ca 3rd order Chebychev filters IDEAL QUANTIZED 7-bits DIRECT LDI IDEAL QUANTIZED 7 bits
13
6/3/2015 SHARC99 Conference Copyright M. Smith smith@enel.ucalgary.ca Signal Quantization Overflow can occur when the manipulation (addition, subtraction or multiplication) of a value at a node results in a number that can’t be represented in the finite-number representation used –determined by effective word length available) Overflow counter-balanced by –Sufficient available bits in data path –Scaling of input and internal values -- division, BUT scaling results in loss of precision, non-linearity, limit cycles, dead bands
14
6/3/2015 SHARC99 Conference Copyright M. Smith smith@enel.ucalgary.ca Determining effect of signal quantization Real life division can be represented by an “ideal division operation” + error source
15
6/3/2015 SHARC99 Conference Copyright M. Smith smith@enel.ucalgary.ca Ameliate overflow and underflow by use of guard bits d3d2d1d0????????d7d6d5d4 16-bit integer format Overflow protection Underflow protection Top guard bits -- overflow protection Bottom guard bits -- quantization error protection
16
6/3/2015 SHARC99 Conference Copyright M. Smith smith@enel.ucalgary.ca Overflow Protection Determine maximum gain between Input and any internal node using Bounded Input/Bounded Output response using L1Norm values L1(IN, OUT1) 1.267 L1(IN, OUT2) 1.267 L1(IN, DELAY1) 3.6877 L1(IN, DELAY2) 3.6853 L1(IN, DELAY3) 3.6823 Maximum gain3.6877 Allow for gain of 4 Requires 2 additional sign (guard) bits L1Norms determined with DIGICAP tool
17
6/3/2015 SHARC99 Conference Copyright M. Smith smith@enel.ucalgary.ca Quantization Protection Determine gain between any internal node and the output using L1Norm values and then SUM possible error gains L1(OUT1, OUT2) 1.0000 L1(DELAY1, OUT2) 1.2657 L1(DELAY2, OUT2) 1.2657 L1(DELAY3, OUT2) 1.2657 Error gain possible 4.7973 Allow for ERROR gain of 8 Requires 3 additional quantization (guard) bits L1Norms determined with DIGICAP tool
18
6/3/2015 SHARC99 Conference Copyright M. Smith smith@enel.ucalgary.ca Final filter design required (software or hardware) ANTI-OVERFLOW ANTI-QUANTIZATION ERROR
19
6/3/2015 SHARC99 Conference Copyright M. Smith smith@enel.ucalgary.ca 8 and 12 bit input signal -- 16-bit integer d1d0QE ???sssd6d5d4d3d2 Overflow protection Quantization protection d1d0sd6d5d4d3d2 8-bits of useable signal d5d4d3d2d1QE sssd10d9d8d7d6 For a 12-bit input signal 1 bit of output lost to precision effects Usable signal
20
6/3/2015 SHARC99 Conference Copyright M. Smith smith@enel.ucalgary.ca 8-bit input Floating point processor as integer processor d5d4d3d2d1QE sssd6 SHARC 16-bit short word floating point format d1QEsd6d5d4d3d2 Useable signal? Loss of 1 bit Strictly valid? Remember 1.frac format and exponent bits Exponent Useful bits or not?
21
6/3/2015 SHARC99 Conference Copyright M. Smith smith@enel.ucalgary.ca 12-bit input signal on FP processor d9d8d7d6d5QE sssd10 SHARC 16-bit short word floating point format Exponent Useful bits or not? 5 bits lost? Remember 1.frac format and exponent bits Significant loss of bits if this picture is correct interpretation Considering the actual architecture of floating point processor becomes important
22
6/3/2015 SHARC99 Conference Copyright M. Smith smith@enel.ucalgary.ca Re-interpretation of FP guard bits d3d2d1NE QE sd6d5d4 8-bit input on 16-bit FP format NE Bits -- inaccurate because of quantization noise during FP normalization operations to avoid overflow QE Bits -- lost because of truncation not associated with normalization d7d6d5NE QE sd10d9d8 12-bit input on 16-bit FP format
23
6/3/2015 SHARC99 Conference Copyright M. Smith smith@enel.ucalgary.ca Re-interpretation valid? Not entirely -- Consider 16-bit FP representation 1-bit sign 4 bit exponent 11 bits representing 13 bits of signal because of 1.frac representations + sign bit d2d1d0NE QE sd5d4d3 8-bit input with 16-bit FP format D6 is at worse the 1 in 1.frac No bits lost if 8-bit input
24
6/3/2015 SHARC99 Conference Copyright M. Smith smith@enel.ucalgary.ca Worse case quantization effect on SHARC processor –Packed 16-bit floating point analyse as if for 13-bit integer processor –Standard 32-bit single precision FP analyse as if for 25-bit integer processor –40-bit Extended Precision FP analyse as if for 33-bit integer processor
25
6/3/2015 SHARC99 Conference Copyright M. Smith smith@enel.ucalgary.ca DIGICAP An Analysis Tool Contact turner@enel.ucalgary.ca
26
6/3/2015 SHARC99 Conference Copyright M. Smith smith@enel.ucalgary.ca DIGICAP Tool -- 1 Analyse and implements one dimensional digital filters constructed using multipliers, delay elements, inputs, outputs and summing nodes Filter circuit entered as direct signal flow graph Algorithm represented as a signal flow graph Capable of calculating time or steady state sinusoidal frequency domain responses with full or finite precision.
27
6/3/2015 SHARC99 Conference Copyright M. Smith smith@enel.ucalgary.ca DIGICAP Tool -- 2 Capable of computing and displaying z-domain transfer functions (no multiple poles) State matrix representation of difference equation L1Norm Schedule of filter operations Descriptive program listings suitable for different filter implementations –“C” code –TI320 assembly code –FIRST silicon compiler (bit-serial) –SHARC (not yet)
28
6/3/2015 SHARC99 Conference Copyright M. Smith smith@enel.ucalgary.ca input n1 ac delay n2 n3 delay n3 n4 delay n4 n5 mult n3 n2 -b1 mult n4 n2 -b2 mult n5 n2 -b3 mult n1 n2 1 mult n2 n6 1 output n6 DIGICAP Description N1N2 N5 N6 N3N4
29
6/3/2015 SHARC99 Conference Copyright M. Smith smith@enel.ucalgary.ca Typical DIGICAP Control parameters n_precision n.m (node precision) –n = total bits, m bits to right of binary point (m = 0 for integer arithmetic) n_quanttype (coefficient precision) –magnitude, round, floating etc checkcoeff (design warning) –Coefficient can’t be represented in n.m add_time, multiply_time (parallelism) 100 page manual available
30
6/3/2015 SHARC99 Conference Copyright M. Smith smith@enel.ucalgary.ca DIGICAP Availability Have a DOS version of the disk with me –contact me later with a blank disk Contact -- Dr. L. E. Turner turner @ enel.ucalgary.ca for DIGICAP user manual and diskette Also available on the web from www.enel.ucalgary.ca/~turner
31
6/3/2015 SHARC99 Conference Copyright M. Smith smith@enel.ucalgary.ca Thanks and References Financial support from University of Calgary and NSERC (Natural Sciences and Engineering Research Council of Canada) Other DIGICAP Developers –D.A. Graham, S. D. Worthington, D.R. Motyka and B. D. Green DIGICAP Users Guide -- L. E. Turner, 1989, 1992 R. Kacelenga et al., IEEE Int. Symp. Circuits and Systems, New Orleans 1990 Turner et al., IEEE Trans. Education, May 1993
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.