Forum Discussion

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

FIR filter design for producing bass and treble sound on FPGA (verilog user)

hey,,

i'm currently searching the best way to implement filter between ADC and DAC.

this filter will act to filter unnecessary frequency. I would to have bass sound when apply the low pass filter and treble sound for high pass filter.

i tried few methods but all didnt work. i tried Fda tool matlab but several verilog code but cant be compiled by quartus like 'real' parameter. so i decide to design filter using megawizard.

but, when the block diagram appear. i do not know where should i implement the input, clock,output n etc.

i would like to have frequensy sampling of 48000hz, cutoff for low pass filter with 500Hz and 10kHz for high pass filter. do not know how to design..pls help me here :(...

i attched the block diagram as u can see the inputs and output involve..tq ya

6 Replies

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

    There's a FIR compiler manual describing the signals and parameters.

    A simple bass/treble equalizer is usually involving first order filters that can be estimated by first order difference equations.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    You use FDA tool to generate the filter coefficients by setting the cut offs and all and then load these coefficients in the FIR compiler along with the entering the info related to the input and coefficients' bit widths and clock and data rate. Then you can generate your filter. Do the highpass/lowpass selection in FDA tool.

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

    --- Quote Start ---

    There's a FIR compiler manual describing the signals and parameters.

    A simple bass/treble equalizer is usually involving first order filters that can be estimated by first order difference equations.

    --- Quote End ---

    Hi,

    but how about try to design it without consider the DE. how about using any tools?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    You use FDA tool to generate the filter coefficients by setting the cut offs and all and then load these coefficients in the FIR compiler along with the entering the info related to the input and coefficients' bit widths and clock and data rate. Then you can generate your filter. Do the highpass/lowpass selection in FDA tool.

    --- Quote End ---

    i try using FDA tool but then the verilog code generated by FDAtool was not applicable/suitable to run in Quartus. have a few parameters which is undefined.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I suggest you use FDA tool to generate the .m file only for the filter and using it store the coefficients onto a file by putting a break point. Load this coefficient file in the FIR compiler and set different parameters as I have already told you and generate the .vhd/.v file as per your requirement. . So your filter is ready. All you have to do in MATLAB is generate the filter coefficients according to your requirements that's all and then do the rest in the latest version of the QUARTUS.

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

    You can also calculate the parameters for the filter manually. I am doing that with Excel for years now. I quickly shows me also the filter curve and the result. For audio it is anyway necessary to add some emphasis and fall off in the lower region, which is not so easy to design with MATLAB.