Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
14 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

    Hi Dave,

    thank you again for your replay. I'm considering everything you say.

    For now i need help in the follwing:

    supose i have a 14 bit DAC whit 1 Vp full scale. Maping the voltagein a 14 14 bit signed representation a have that 8191~=1V and -8192 = -1 V. suppose that my original signal has gain A and a i need to increase/decrese the gain by 1 dB (1.1220 V). How could i represent this number (1.1220) in the 14 bit fixed point representation considering that my range is from 1 to -1? Is that make any sense for you? If not, just help me on implemeting a system with gain control.

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

    +1 dB means (10^(1/20) = 1.220 ratio (not V). -1dB means (10^(-1/20) = 0.8193 ratio. so all you have to do is scale your 14 bit data accordingly.

    for +1dB scale your data level up by 1.22.

    for -1dB scale your data level by 0.8193

    dB is just ratio, it is not absolute value. Confusion is common and is due to this odd case when a ratio seems like having a unit dB while in maths any ratio of same parameters must be unitless.