Matlab to FPGA
Hi lawrence_idol, You probably want an IIR filter, because it will be much smaller than an equivalent FIR filter. For example, I used MATLAB's fdatool to design a 2nd-order Butterworth IIR bandpass filter with a center frequency of 1kHz, a bandwidth of 10Hz, and a sample rate of 10kHz. I selected 16-bit quantization, and then generated HDL with MATLAB's CSD method instead of regular multiplier method (I'm pretending that my FPGA doesn't have hardware multipliers). By the way, MATLAB's HDL Coder forces "fully parallel" architecture with IIR filters, and that's wasteful if you don't need blazing speed. Finally, I used Xilinx ISE to synthesize the HDL into a tiny XC3S50 Spartan-3 FPGA. With default optimizations, the filter consumed about 1/3 of the device. I don't know how the size of the XC3S50 compares to your Altera FPGA.