MATLAB Answers

How does DA ignore zero valued coefficients?

1 view (last 30 days)
Tong Xu
Tong Xu on 2 Jan 2019
Commented: Tong Xu on 4 Jan 2019
Hi everyone,
I'm using Filter Design HDL Coder to generate FIR filters based on DA architecture. I generate the filter coefficients by using FDA tool in matlab. Then I converts the coefficients into DA filter by using Filter Design HDL Coder. However, sometimes the generated DA filters have very strange output. I noticed that this problem occurs occassionally, but I don't know the reason.
I did the simulation under Xilinx System Generator 2015.4. The sampling rate of this DA filter is 1600MHz and it has a passband of [200,300] MHz. For this BPF, its Apass = 0.5dB, Astop = 30dB. The filter order is 108.
The input to this DA based BPF is shown as below.
Below shows the output of this BPF. It looks incorrect and strange.
I modified this BPF by changing its Apass = 1dB, Astop = 30dB. Then the filter order becomes 114. I generate the Verilog code for DA filter. Below shows the output of this modified DA based BPF. Now it looks right.
I read the manual of Filter Design HDL Coder, and found it says "DA ignores taps that have zero-valued coefficients and reduces the size of the DA LUT accordingly."
Can anyone tell me how will this affect the output of DA filter?
Thank you very much.
Regards,
Tong

Accepted Answer

Garrey Rice
Garrey Rice on 3 Jan 2019
Hi Tong,
The filter output should not be affected by the fact that "DA ignores taps that have zero-valued coefficients and reduces the size of the DA LUT accordingly". All this means is that the HDL implementation is optimized by taking account any zero-valued coefficients. The filter output and response should be the same irrespective of the implementation.
Regarding the strange/incorrect looking output, have you tried simulating the filter using the dsp.FIRFilter System object or Discrete FIR Filter block? It would definitely be worth verifying the filter performance and fixed-point settings in MATLAB or Simulink before generating HDL code. You can then use the HDL test bench generated by Filter Design HDL Coder to check that the HDL code works as expected.
Regards,
Garrey
  1 Comment
Tong Xu
Tong Xu on 4 Jan 2019
Hi Garrey,
Thank you very much.
I figured out there are some problem regarding the delays in my design, there is no problem with the Filter Design HDL Coder.
Regards,
Tong

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!