Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
15 years ago

Gain control using fpga

Hi,

i have four FIR filters and i want to control the gain in the output of each filter and then sum their outputs. The result is sended to an DAC.

it is possible to control the gain in fpga?

12 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Dear Dave,

    thank you for your reply. i'm just wondering why everybody control the gain using an amplifier. I need to change the gain in steps of 1 db till 20 dB. If DAC can handle this?

    thank you.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    i have four FIR filters and i want to control the gain in the output of each filter and then sum their outputs. The result is sended to an DAC.

    it is possible to control the gain in fpga?

    --- Quote End ---

    There's a couple of solutions;

    1) Add a gain block (multiplier) between each FIR filter output and the summing block.

    2) If the FIR filter coefficients are re-loadable, then use the coefficients to implement the gain function, by scaling them appropriately.

    The second option requires a little care regarding the dynamic range of the signals. However, depending on the bit-widths of your signal and coefficients, the scaling may be available 'for free', eg. lets say you have a design with 16-bit data and coefficients, and the design is using hardware multiplers, because the multipliers are 18x18-bit, you have a couple of extra bits that you can use for the gain function. If that is sufficient, then you get your gain function for free.

    Cheers,

    Dave