Design Tradeoffs Using Truncated Multipliers in FIR Filter Implementtion

  • Upload
    a-villa

  • View
    217

  • Download
    0

Embed Size (px)

Citation preview

  • 7/28/2019 Design Tradeoffs Using Truncated Multipliers in FIR Filter Implementtion

    1/12

    Design tradeoffs using truncated multipliers

    in FIR filter implementations

    E. George Walters III and Michael J. Schulte

    Computer Architecture and Arithmetic LaboratoryComputer Science and Engineering Department

    Lehigh University

    Bethlehem, PA 18015, USA

    ABSTRACT

    This paper presents a general FIR filter architecture utilizing truncated tree multipliers for computation. Theaverage error, maximum error, and variance of error due to truncation are derived for the proposed architecture.A novel technique that reduces the average error of the filter and is independent of the number of unformedcolumns is presented, as well as equations describing the signal-to-noise ratio of the truncation error. A softwaretool written in Java is described that automatically generates structural VHDL models for specific filters based

    on this architecture, given parameters such as the number of taps, operand lengths, number of multipliers, andthe number of truncated columns. We show that a 22.5% reduction in area can be achieved for a 24-tap filterwith 16-bit coefficients. The ratio of the average error to the full scale value is only 1.4 109, with only an8.4 dB reduction in SNR for this implementation.

    Keywords: FIR filters, truncated multipliers, automatic VHDL generation, computer arithmetic, application-specific designs

    1. INTRODUCTION

    Finite Impulse Response (FIR) filters are an important component in many digital signal processing systems.For fast FIR filter implementations, much of the area, delay, and power consumption is due to multiplicationcircuits. Truncated multipliers offer improvements in each of these areas,1 at the expense of computationalaccuracy. The error introduced by using truncated multipliers can be quantified in terms of maximum absoluteerror, average error, and variance of error. When implemented as described in this paper, the average errorof the filter due to truncation is independent of the number of unformed columns and approaches zero as thenumber of taps increases. This indicates that many applications can take advantage of the area, delay, andpower improvements offered by the use of truncated multiplication with a minimal impact on the accuracy ofthe output.

    A software tool written in Java has been developed to generate structural VHDL models for specific filtersbased on this architecture, given parameters such as the number of taps, operand lengths, number of multipliers,and the number of truncated columns. The tool is based on a package of Java classes that model the buildingblocks of computational systems, such as adders and multipliers. These classes generate VHDL descriptions,and are used by other classes in hierarchical fashion to generate VHDL descriptions of more complex systems.Filter models with various parameters were generated using this tool, and then synthesized to get area anddelay estimates.

    Sections 1.1 through 1.3 provide background necessary for understanding the twos complement truncatedmultipliers used in the proposed FIR filter architecture, which is described in Section 2. Section 3 describes thetool for automatically generating VHDL models of those filters. Synthesis results of specific filter implementa-tions are presented in Section 4, with concluding remarks given in Section 5.

  • 7/28/2019 Design Tradeoffs Using Truncated Multipliers in FIR Filter Implementtion

    2/12

    A a7 a6 a5 a4 a3 a2 a1 a0B b7 b6 b5 b4 b3 b2 b1 b0

    1 a7b0 a6b0 a5b0 a4b0 a3b0 a2b0 a1b0 a0b0a7b1 a6b1 a5b1 a4b1 a3b1 a2b1 a1b1 a0b1

    a7b2 a6b2 a5b2 a4b2 a3b2 a2b2 a1b2 a0b2

    a7b3 a6b3 a5b3 a4b3 a3b3 a2b3 a1b3 a0b3

    a7b4 a6b4 a5b4 a4b4 a3b4 a2b4 a1b4 a0b4

    a7b5 a6b5 a5b5 a4b5 a3b5 a2b5 a1b5 a0b5

    a7b6 a6b6 a5b6 a4b6 a3b6 a2b6 a1b6 a0b61 a7b7 a6b7 a5b7 a4b7 a3b7 a2b7 a1b7 a0b7

    p15 p14 p13 p12 p11 p10 p9 p8 p7 p6 p5 p4 p3 p2 p1 p0

    Figure 1. Partial product bit matrix (twos complement).

    1.1. Twos Complement Multipliers

    Parallel tree multipliers form a matrix of partial product bits which are then added to produce a product.Consider an m-bit multiplicand, A, and an n-bit multiplier, B. If A and B are integers in twos complementform, then

    A = am12m1 +

    m

    2i=0

    ai2i, and B = bn12

    n1 +n

    2j=0

    bj 2j . (1)

    Multiplying A and B together yields the following expression:

    A B = am1bn12m+n2 +

    m2i=0

    n2j=0

    aibj 2i+j

    m2i=0

    bn1ai2i+n1

    n2j=0

    am1bj 2j+m1. (2)

    The first two terms in (2) are positive. The third term is either zero (if bn1 = 0) or negative with a

    magnitude ofm2

    i=0 ai2i+n1 (if bn1 = 1). Similarly, the fourth term is either zero or a negative number.

    To produce the product of A B, the first two terms are added as is. Since the third and fourth terms arenegative (or zero), they are added by complementing each bit, adding 1 to the LSB column, and sign extendingwith a leading 1. With these substitutions, the product is computed without any subtractions as

    P = am1bn12m+n2 +

    m2i=0

    n2j=0

    aibj 2i+j +

    m2i=0

    bn1ai2i+n1 +

    n2j=0

    am1bj 2j+m1

    +n2j=0

    am1bj 2j+m1 + 2m+n1 + 2n1 + 2m1.

    (3)

    Figure 1 shows the multiplication of two 8-bit integers in twos complement form. The partial product bitmatrix is described by (3), and is implemented using an array of and and nand gates. The matrix is thenreduced using techniques such as Wallace,2 Dadda,3 or Reduced Area reduction.4

    1.2. Reduced Area (RA) Reduction

    Reduced Area (RA) reduction, presented by Bickerstall et al,4 is a modified reduction scheme that uses a smallerfinal carry propagate adder than Wallace or Dadda, and reduces the overall multiplier area in comparison toWallace and Dadda multipliers. The rules for RA reduction are as follows:

    1. For each stage, the number of full adders used in each column is bi/3, where bi is the number of bits incolumn i.

  • 7/28/2019 Design Tradeoffs Using Truncated Multipliers in FIR Filter Implementtion

    3/12

    Figure 2. Reduced Area (RA) reduction for an 8 8 multiplier.

    2. Half adders are used only (a) when required to reduce the number of bits in a column to the number ofbits specified by the Dadda series, or (b) to reduce the rightmost column containing exactly two bits.

    The first rule minimizes the number of bits entering the next stage, a benefit especially useful in pipelinedmultipliers. The second rule reduces the length of the final carry propagate adder by one in each stage. Figure 2shows the dot diagram for RA reduction of an 8 8 multiplier. In such diagrams, dots represent bits. Columnsof three bits that are inputs to a full adder are circled. The outputs of the full adder, a sum bit and a carrybit, are depicted in the next stage connected by a diagonal line. Columns of two bits that are input to a halfadder are also circled, but the sum and carry outputs are connected by a diagonal line with a slash through it.

    1.3. Truncated Multipliers

    Truncated m n multipliers that produce results less than m + n bits long are described by Schulte andSwartzlander.5 Benefits of truncated multipliers include reduced area, delay, and power consumption.1 Anoverview of truncated multipliers, which discusses several methods for correcting the error introduced due tounformed partial product bits, is given by Swartzlander.6 The method used in this paper is constant correction,as described by Schulte and Swartzlander.5

    Figure 3 shows an 8 8 truncated parallel multiplier with a correction constant added. The final result isl-bits long. We define k as the number of truncated columns that are formed, and r as the number of columnsthat are not formed. In this example, the five least significant columns of partial product bits are not formed(l = 8, k = 3, r = 5).

    Truncation saves an and gate for each bit not formed and eliminates the full adders and half adders that

    would otherwise be required to reduce them to two rows. The delay due to reducing the partial product matrixis not improved because the height of the matrix is unchanged. However, a shorter carry propagate adder isrequired, which improves the overall delay of the multiplier.

    The correction constant, Cr, and the 1 added for rounding are normally included in the reduction matrix.In Figure 3 they are explicitly shown to make the concept more clear.

    A consequence of truncation is that a reduction error is introduced due to the discarded bits. For simplicity,the operands are assumed to be integers, but the technique can also be applied to fractional or mixed number

  • 7/28/2019 Design Tradeoffs Using Truncated Multipliers in FIR Filter Implementtion

    4/12

    Figure 3. Truncated twos complement multiplier with constant correction.

    systems as well. With r unformed columns, the reduction error is

    Er = r1

    i=0

    i

    j=0

    aijbj 2i. (4)

    The maximum reduction error occurs when each of the truncated partial product bits is a 1, and is

    Er max = r1q=0

    (q+ 1)2q

    = ((r 1) 2r + 1) . (5)

    The reduction error could be zero, so the range of error is

    (r 1) 2r 1 E 0. (6)

    If A and B are random with a uniform probability density, then the average value of each partial product bit

    is14 , so the average reduction error is

    Er avg = (r 1) 2r2 22. (7)

    The variance of the reduction error, which is too complex to derive in this paper, is7

    2r =3

    16

    r1q=0

    (q+ 1)22q +1

    8

    r1i=0

    ri1j=0

    2i+j

    i1k=0

    2k+j +

    j1l=0

    2l+i

    . (8)

    In order to minimize the average error, a constant is added to the partial product matrix.5 The correctionconstant, Cr, is chosen to offset Er avg. After rounding,

    Cr = round(2r Er avg) 2

    r

    = round

    (r 1) 22 + 2(r+2) 2r, (9)

    where round(x) indicates x is rounded to the nearest integer. Using this correction constant, the range of errorbecomes

    Cr (r 1) 2r 1 E Cr. (10)

    The maximum error, in terms of absolute magnitude, becomes

    Emax = max(Cr, (r 1) 2r + 1 Cr) . (11)

  • 7/28/2019 Design Tradeoffs Using Truncated Multipliers in FIR Filter Implementtion

    5/12

    The average error of the l + k-bit product becomes

    Eavg = Cr (r 1) 2r2 22, (12)

    and the variance remains the same as given by Equation (8).

    Modeling the variance of reduction error as noise, which is commonly done for quantization error,8 thereduction error SNR for a single truncated multiplier using constant corection is

    SNRr = 10 log10

    2x2r

    dB, (13)

    where 2x is the signal variance (power).

    2. PROPOSED FIR FILTER ARCHITECTURE

    This section describes the architecture used in this work. The architecture is parameterized, allowing the choiceof the number of taps, the number of multipliers, the amount of truncation, etc. Section 2.1 gives an overviewof the architecture, Section 2.2 describes components within the architecture, and Section 2.3 presents an erroranalysis.

    2.1. Architecture Overview

    An FIR filter with T taps computes the following difference equation,

    y[n] =

    T1k=0

    bkx[n k], (14)

    where x[ ] is the input data stream, bk is the kth tap coefficient, and y[ ] is the output data stream. This can be

    recognized as the discrete convolution of the input stream, x[n], with the impulse response, h[n].8

    Figure 4 shows the block diagram of the proposed FIR filter architecture. This architecture has two datainputs, x in and coeff, and one data output, y out. There are two control inputs which are not shown, clkand loadtap.

    The input data stream enters at the x in port. When the filter is ready to process a new sample, the data atx in is clocked into the register labeled x[n] in the block diagram. This register stores x[n] of (14), the currentinput. The x[n] register is one of T shift registers, where T is the number of taps in the filter. When x in isclocked into the x[n] register, the values in the other registers are shifted right in the diagram, with the oldestvalue, x[n T + 1] being discarded.

    The tap coefficients are stored in another set of shift registers, labeled b0 through bT1 on the block diagram.Coefficients are loaded into the registers by applying the coefficient values to the coeff port in sequence andcycling the loadtap signal to load each one.

    The filter is pipelined with four stages: operand selection, multiplication, summation, and final addition.

    Operand Selection: The number of multipliers in the architecture is configurable. For a filter with T taps

    and M multipliers, each multiplier performs T /M multiplications per input sample. The operands foreach multiplier are selected each clock cycle by an operand bus and clocked into registers.

    Multiplication: Each multiplier has two input operand registers, which are loaded by an operand bus in theprevious stage. Each pair of operands is multiplied, and the final two rows of the reduction tree (theproduct in carry-save form) are clocked into a register where they become an input to the multi-operandadder in the next stage. Keeping the product in carry-save form rather than using a carry propagateadder reduces the overall area and delay.

  • 7/28/2019 Design Tradeoffs Using Truncated Multipliers in FIR Filter Implementtion

    6/12

    Figure 4. Proposed FIR filter architecture.

    Summation: The multi-operand adder has carry-save inputs from each multiplier, as well as a carry-save inputfrom the accumulator. After each of the T /M multiplications have been performed, the output of themulti-operand adder (in carry-save form) is clocked into the final CPA register where it is added in thenext pipeline stage.

    Final Addition: In the last stage, the carry-save vectors from the multi-operand adder and a correctionconstant are added by a specialized carry-save adder and a carry propagate adder to produce a singleresult vector. The result is then clocked into an output register, which is connected to the y out outputport of the filter.

    The clk signal clocks the system. The clock period is set so that the multipliers and the multi-operand addercan complete their operation within one clock cycle. Therefore, T /M clock cycles are required to process eachinput sample. The final addition stage only needs to operate once per input sample, so it has T /M clockcycles to complete its calculation and is generally not on the critical path.

    2.2. Architecture Components

    This section discusses the components of the FIR filter architecture.

  • 7/28/2019 Design Tradeoffs Using Truncated Multipliers in FIR Filter Implementtion

    7/12

    Figure 5. Multi-operand adder example.

    2.2.1. Multipliers

    In this paper, twos complement parallel tree multipliers using Reduced Area reduction are used. When per-forming truncated multiplication, the constant correction method5 is used. The output of each multiplier is thefinal two rows remaining after reduction of the partial product bits, which is the result in carry-save form.9

    As described in Section 1.1, the last three terms in (3) are constants. In this architecture, these constantsare not included in the partial product matrix. Likewise, if using truncated multipliers, the correction constantis not included either. Instead, the constants for each multiplication are added in a single operation in the finaladdition stage of the filter. This is described in more detail in Section 2.2.3.

    2.2.2. Multi-operand adder and accumulatorAs (14) shows, the output of an FIR filter is a sum of products. In this architecture, M of these productsare computed per clock cycle. In each clock cycle, the outputs of each multiplier are added and saved in theaccumulator register in carry-save form. The accumulator is included in the sum, except with the first group ofmultiplies for a new input sample. This is done by clearing the accumulator when the first group of productsarrives at the input to the multi-operand adder.

    Figure 2 shows the Reduced Area reduction tree for an 8 8 multiplier. Figure 5 shows the dot diagramfor a multi-operand adder that adds the outputs of three such multipliers and a 16-bit accumulator register,which is in carry-save form. The multi-operand adder is simply a counter reduction tree using Reduced Areareduction, similar to a counter reduction tree for a multiplier, except that it begins with operand bits from eachinput instead of a partial product bit matrix. The output of the multi-operand adder is the final two rows ofbits remaining after reduction, which is the sum in carry-save form. This output is clocked into the accumulator

    register every clock cycle, and clocked into the CPA operand register every T /M cycles.2.2.3. Correction constant adder

    As stated above in Section 2.2.1, the constants required for twos complement multipliers and the correctionconstant for unformed bits in truncated multipliers are not included in the reduction tree, but are added duringthe final addition stage. The 1 that is added to round the filter output is also added in this stage. All of theseconstants for each multiplier are added as a single constant, CTOTAL.

  • 7/28/2019 Design Tradeoffs Using Truncated Multipliers in FIR Filter Implementtion

    8/12

    All multipliers used in this paper operate on twos complement oprands. From (3), the constant which mustbe added for an m n multiplier is 2m+n1 + 2n1 + 2m1. With T taps there are T multiply operations,assuming T is evenly divisible by M. Thus, a total value of

    CM = T (2m+n1 + 2n1 + 2m1) (15)

    must be added in the final addition stage.

    The multipliers may be truncated, with unformed columns of partial product bits. If so, the total averagereduction error of the filter is T Er avg. The correction for this is

    CR = round

    T (r 1) 22 + T 2(r+2) 2r. (16)

    To round the filter output to l bits, the rounding constant which must be used is

    CRND = 2r+k1. (17)

    Combining these constants, the total correction constant for the filter is

    CTOTAL = CM + CR + CRND . (18)

    Adding CTOTAL to the summer output is done using a specialized carry-save adder (SCSA) which is simplya carry-save adder optimized for adding a constant bit vector. A carry-save adder uses full adders to reducethree bit vectors to two. SCSAs differ in that half adders are used in columns where the constant is a 0 andspecial half adders are used in columns where the constant is a 1. A special half adder computes the sum andcarry-out of two bits plus a 1, the logic equations being

    si = ai bi, and ci+1 = ai + bi. (19)

    The output of the SCSA is then input to the final carry propagate adder.

    There are two benefits to adding one large correction constant at the end. First, if the constants were addedto the multiplier partial product matrix, it might increase the matrix height enough to require an additional

    reduction stage, thereby increasing the delay of the multiplier. Second, it improves the average error due totruncation. When adding the correction constant to a single multiplier, it must be rounded and truncated. Theportion that is lost drives the average error away from zero. When the correction constant is added at the endof the filter, it is first multiplied by T before rounding, so fewer bits are lost.

    2.2.4. Final carry propagate adder

    The output of the special carry-save adder is the output for the current sample, y[n], in carry-save form. Afinal carry propagate adder (CPA) is required to compute the final result. The final addition stage has T /Mclock cycles to complete, so for many applications a simple ripple-carry adder will be fast enough. If additionalperformance is required, a carry-lookahead adder may be used. Using a faster CPA does not increase throughput,but does improve latency.

    2.2.5. Control

    A filter with T taps and M multipliers requires T /M clock cycles to process each input sample. The controlcircuit is a state machine with T /M states, implemented using a modulo-T /M counter. The present state isthe output of the counter and is used to control which operands are selected by each operand bus. In addition tothe present state, the control circuit generates four other signals: 1) shiftData, used to shift the input samples,2) clearAccum, which clears the accumulator, 3) loadCpaReg, which loads the summer output into the CPAoperand register, and 4) loadOutput, which loads the final sum into the output register.

  • 7/28/2019 Design Tradeoffs Using Truncated Multipliers in FIR Filter Implementtion

    9/12

    2.3. Error Analysis

    Using truncated multipliers in the FIR filter introduces calculation errors due to the unformed partial productbits. These errors can be described by their average value, maximum value, variance, and signal-to-noise ratio.

    The average error due to the unformed partial product bits of a single truncated multiplier, Er avg, is givenin (7). As discussed in Section 2.2.3, T multiplications are performed with variable operands. Therefore, the

    total average error due to unformed partial product bits is T Er avg. This is compensated for by the finalcorrection constant, yielding an average error for the filter of

    EAV G = CR T (r 1) 2r2 + T 22. (20)

    If the correction constants were added at the multipliers rather than in the final CPA, the average error ofthe filter would be larger. By adding the correction constant at the end, the combined average error of eachmultiplier is multiplied by T before rounding, and less precision is lost.

    The maximum error for an uncorrected truncated multiplier is given in (5) and the range of error is givenin (6). With T multiplications per input sample, the maximum error for the filter without correction becomesT (r 1) 2r T). By adding a corrrection constant to the filter, the range of the filter output error is

    CR T (r 1) 2r T E CR, (21)

    and the maximum error of the filter output is

    EMAX = max(CR, T (r 1) 2r + T CR) . (22)

    The variance of error for a single truncated multiplier is given in (8). Since the operands of each multiplicationare independent for a given input sample, the total variance of error for the filter is

    2R = T 2r , (23)

    and the reduction error signal-to-noise ratio for the filter is

    SNRR = 10log10 2x2R dB. (24)

    To see the effect that the number of taps has on the SNR of the filter, (24) can be rewritten as

    SNRR = 10log10

    2x

    T 2r

    = 10log10

    2x2r

    10 log10(T), (25)

    which shows that the SNR of a T tap filter is 10 log10(T) less than the SNR for a single multiplier.

    3. FILTER GENERATION SOFTWARE (FGS)

    The architecture described in Section 2 provides a great deal of flexibility in terms of operand size, the number

    of taps, and the type of multipliers used. This implies that the design space is quite large. In order to facilitatethe development of a large number of specific implementations, a tool was designed that automatically generatescompiler-ready structural VHDL models given a set of parameters. The tool, which is named FGS, also generatestest benches and files of test vectors to verify the filter models.

    FGS is written in Java and consists of two main packages. The arithmetic package, discussed in Section 3.1,is suitable for general useage and is the foundation of FGS. The fgs package, discussed in Section 3.2, isspecifically for generating the filters described previously. It uses the arithmetic package to generate the necessarycomponents.

  • 7/28/2019 Design Tradeoffs Using Truncated Multipliers in FIR Filter Implementtion

    10/12

    3.1. The arithmetic Package

    The arithmetic package includes classes for modeling and simulating digital components. The simplest com-ponents include D flip-flops, half adders, and full adders. Larger components such as ripple-carry adders andparallel multipliers use the smaller components as building blocks. These components in turn are used to modelcomplex systems such as FIR filters.

    3.1.1. Common classes and interfaces

    The arithmetic package has several common the classes and interfaces which are used by arithmetic subpackages.The most significant of these are VHDLGenerator, Parameterized, and Simulator.

    VHDLGenerator is an abstract class. Any class that represents a digital component and can generate aVHDL model of itself is derived from this class. It defines three abstract methods which must beimplemented by all subclasses. genCompleteVHDL() generates a complete VHDL file describing thecomponent. This file includes synthesizable entity-architecture descriptions of all subcomponents used.genComponentDeclaration() generates the component declaration which must be included in the entity-architecture descriptions of other components which use this component. genEntityArchitecture()generatesthe entity-architecture description of this component.

    Parameterized is an interface implemented by classes whose instances can be defined by a set of parameters.The interface includes the methods getParameters() and setParameters() to access those parameters.

    Simulator is an interface implemented by classes that can simulate their operation. The interface has only onemethod, simulate, which accepts a vector of inputs and returns a vector of outputs. These inputs andoutputs are vectors of IEEE VHDL std logic vectors.10

    3.1.2. arithmetic subpackages

    The arithmetic package contains several subpackages:

    smallcomponents provides fundamental components including D flip-flops and full adders which are used asbuilding blocks for larger components such as registers, adders, and multipliers.

    matrixreduction provides classes that reduce the bit matrix formed by multi-operand adders and parallel treemultipliers. Classes are included to perform Wallace,2 Dadda,3 and Reduced Area4 reduction. Each ofthese classes are derived from the abstract class ReductionTree.

    adders provides classes that model various types of adders including carry propagate adders, carry-save adders,and multi-operand adders.

    multipliers provides a the ParallelMultiplier class for modeling parallel tree multipliers. Parameters can beset to configure the multiplier for unsigned, twos complement, or combined operation. The number ofunformed columns, if any, and the type of reduction, Wallace, Dadda, or Reduced Area, may also bespecified. Through polymorphism (dynamic binding), the appropriate subclass ofReductionTree reducesthe bit matrix to two rows. These two rows can then be passed to a CarryPropagateAdder object for finaladdition, or in the case of the FIR filter, to a multi-operand adder. The architecture of FGS makes it easy

    to change the reduction scheme and final addition method. New computer arithmetic techniques can beincorporated seamlessly by subclassing appropriate abstract classes.

    misccomponents provides support classes that provide essential functionality. This includes classes for model-ing the operand busses and registers used in the FIR filter.

    firfilters includes classes for modeling ideal FIR filters as well as FIR filters based on the truncated architecturedescribed in Section 2. Ideal FIR filters provide a baseline for comparison with practical FIR filters andallow measurement of computational errors.

  • 7/28/2019 Design Tradeoffs Using Truncated Multipliers in FIR Filter Implementtion

    11/12

    Filter Synthesis Results Improvement Reduction Error

    Total A DArea Delay Product Total A D SN RR

    T M r (gates) (ns) (gatesns) Area Delay Product (dB) R22B

    EAVG

    22B

    12 2 0 16241 40.80 662633 0 012 2 12 12437 40.68 505937 23.4% 0.3% 23.6% 89.70 4.09E-6 -6.98E-10

    12 2 16 10211 40.08 409257 37.1% 1.8% 38.2% 64.22 7.69E-5 -6.98E-1016 2 0 17369 54.40 944874 0 016 2 12 13529 54.24 733813 22.1% 0.3% 22.3% 88.45 4.73E-6 -9.31E-1016 2 16 11303 53.44 604032 34.9% 1.8% 36.1% 62.97 8.88E-5 -9.31E-1020 2 0 19278 68.00 1310904 0 020 2 12 15475 67.80 1049205 19.7% 0.3% 20.0% 87.48 5.28E-6 -1.16E-920 2 16 13249 66.80 885033 31.3% 1.8% 32.5% 62.00 9.93E-5 -1.16E-924 2 0 20828 81.60 1699565 0 024 2 12 17007 81.36 1383690 18.3% 0.3% 18.6% 86.69 5.79E-6 -1.40E-924 2 16 14781 80.16 1184845 29.0% 1.8% 30.3% 61.21 1.09E-4 -1.40E-9

    12 4 0 25355 20.40 517242 0 012 4 12 18671 20.34 379768 26.4% 0.3% 26.6% 89.70 4.09E-6 -6.98E-1012 4 16 14521 20.04 291001 42.7% 1.8% 43.7% 64.22 7.69E-5 -6.98E-10

    16 4 0 26133 27.20 710818 0 016 4 12 19413 27.12 526481 25.7% 0.3% 25.9% 88.45 4.73E-6 -9.31E-1016 4 16 15264 26.72 407854 41.6% 1.8% 42.6% 62.97 8.88E-5 -9.31E-1020 4 0 28468 34.00 967912 0 020 4 12 21786 33.90 738545 23.5% 0.3% 23.7% 87.48 5.28E-6 -1.16E-920 4 16 17636 33.40 589042 38.0% 1.8% 39.1% 62.00 9.93E-5 -1.16E-924 4 0 29802 40.80 1215922 0 024 4 12 23101 40.68 939749 22.5% 0.3% 22.7% 86.69 5.79E-6 -1.40E-924 4 16 18950 40.08 759516 36.4% 1.8% 37.5% 61.21 1.09E-4 -1.40E-9

    Table 1. Synthesis results, B = m = n = 16 (optimized for area).

    testing provides classes for testing components generated by other classes, including parallel multipliers and

    FIR filters. The FIR filter test class generates a test bench and an input file of test vectors. It alsogenerates a .vec file for simulation using Altera Max+Plus II.

    gui provides graphical user interface (GUI) components for setting parameters and generating VHDL modelsfor all of the larger components such as parallel multipliers and FIR filters. The GUI for each componentis a Java Swing JPanel, which can be used in any Swing application. These panels make setting componentparameters and generating VHDL files simple and convenient.

    3.2. The fgs Package

    Whereas the arithmetic package is suitable for general use, the fgs package is specific to the FIR filter architecturedescribed in Section 2. fgs includes classes for automating much of the work done to analyze the use of truncatedmultipliers in FIR filters. For example, this package includes a driver class that automatically generates a largenumber of different FIR filter configurations for synthesis and testing. Complete VHDL models are then

    generated as well as Tcl scripts to drive the synthesis tool. The Tcl script commands the synthesis programto write area and delay reports to disk files that are then parsed by another class in the fgs package whichsummarizes the data and writes it to a CSV file for analysis by a spreadsheet application.

    4. RESULTS

    Table 1 presents some representative synthesis results that were obtained from the synthesis tool, Leonardo, andthe LCA300K 0.6 micron CMOS standard cell library. While this is only a small sample of the data collected,it illustrates the main findings, which are:

  • 7/28/2019 Design Tradeoffs Using Truncated Multipliers in FIR Filter Implementtion

    12/12

    1. Using truncated multipliers in FIR filters results in significant improvements in area. For example, thearea of a 24-bit filter with 4 multipliers and 12 taps improves by 22.5% with 12 unformed columns andby 36.4% with 16 unformed columns. We estimate substantial power savings would be realized as well.Truncation has little impact on the overall delay of the filter.

    2. The computational error introduced by truncation is tolerable for many applications. For example, the

    reduction error SNR for a 16-bit filter with 24 taps is 86.7 dB with 12 unformed columns and 61.2 dBwith 16 unformed columns. In comparison, the quantization error for a 16-bit quantizer is 95.1 dB.8

    3. The average error of a filter is independent of r (for T > 4), and much less than that of a single truncatedmultiplier. For a 16-bit filter with 24 taps, the ratio of the average error to the full range of the output is1.40 109. In comparison, the average error of a single 16-bit multiplier with r = 12 is 2.38 105.

    5. CONCLUSIONS

    This paper presented a parameterized FIR filter architecture used to study the effects of truncated multipliersin FIR filters. A tool for generating structural VHDL models of specific instances of these filters was discussed.The computation errors introduced by using truncated multipliers are analyzed and quantified in terms ofaverage error, maximum error, variance of error, and reduction error signal-to-noise ratio. Synthesis results of

    several specific implementations of the proposed architecture are presented. These results show that significantarea and power improvements can be achieved with an moderate decrease in error SNR and a very small averageerror.

    REFERENCES

    1. M.J. Schulte, J.E. Stine, and J.G. Jansen, Reduced Power Dissipation Through Truncated Multiplication,IEEE Alessandro Volta Memorial Workshop on Low Power Design, Como, Italy, 1999, pp. 61-69.

    2. C.S. Wallace, A Suggestion for a Fast Multiplier, IEEE Transactions on Electronic Computers, Vol.EC-13, pp. 14-17, 1964.

    3. L. Dadda, Some Schemes for Parallel Multipliers, Alta Frequenza, Vol. 34, pp. 349-356, 1965.

    4. K.C. Bickerstaff, M.J. Schulte, and E.E. Swartzlander, Jr., Parallel Reduced Area Multipliers, IEEEJournal of VLSI Signal Processing, Vol. 9, pp. 181-191, 1995.

    5. M.J. Schulte and E.E Swartzlander, Jr., Truncated Multiplication with Correction Constant, VLSI SignalProcessing, VI, IEEE Press, New York, NY, 1993, pp. 388-396.

    6. E.E. Swartzlander, Jr., Truncated Multiplication with Approximate Rounding, 33rd Asilomar Conferenceon Signals, Circuits, and Systems, 1999, pp. 1480-1483.

    7. E.G. Walters III, Design Tradeoffs Using Truncated Multipliers in FIR Filter Implementations, MastersThesis, Lehigh University, May 2002.

    8. A.V. Oppenheim and R.W. Schafer, Discrete-Time Signal Processing, 2nd edition, Prentice Hall, UpperSaddle River, NJ, 1999.

    9. I. Koren, Computer Arithmetic Algorithms, Prentice Hall, Englewood Cliffs, NJ, 1993.

    10. IEEE Standard Multivalue Logic System for VHDL Model Interoperability (Stdlogic1164): IEEE Std 1164-1993, IEEE, 26 May 1993.