Forum Discussion

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

IIR audio filter problem

Hi,

I'm trying to make a IIR lowpass filter in VHDL. i used matlab to design the filter, tested it in simulink and it seemed to work. I also used matlab to generate vhdl code (using filterbuilder function).

Now when i take this code that matlab generated and try to compile it in quartus, i get the following error:

Error (10414): VHDL Unsupported Feature error at Hlp2.vhd(35): cannot synthesize non-constant real objects or values

i'm not sure but i'm think the error comes from the fact that the coefs are real type. (ex: 1.998375)

Now how do i get around this ?

Or how can i make a IIR filter in quartus ?

i did looked into the Basic IIR filter design example,

but documentation is almost inexistent and i do not understand how to use it !

I need help.

Thank you

Lespoils

here is the code generated by matlab

2 Replies

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

    I'm not aware of any VHDL syntehsis tool supporting the real variable for signals. It's an abstract data type available for simulation and compile time calculations, that can be used e.g. in constants. But for filters implemented in FPGA, you have to use synthesizable types. Under special circumstances, IEEE float or double can be be synthesized, but real can't. Most designers are using fixed point arithmetic for it.

    For a profound introduction to filters and digital signal processing, I suggest U. Meyer-Baese "DSP with FPGA".