Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
21616 Discussions

IIR audio filter problem

Altera_Forum
Honored Contributor II
1,211 Views

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
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
490 Views

btw i'm using a DE2 board with cyclone II. if it changes anything.

0 Kudos
Altera_Forum
Honored Contributor II
490 Views

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".
0 Kudos
Reply