Am I right assuming that, if I want to implement a FIR filter in Sigma Studio for a ADAU1452 of 2400 taps, I have to set the length in SigmaStudio to 2401? I've read somewhere that the last coefficient of the filter is used as a bypass function. If the last coefficient is 1.0 then the FIR is bypassed, if 0.0 the filter is active.
For debugging purposses I implemented a 10 tap FIR filter and saw that the last coefficient toggles between 1.0 and 0.0 when I toggle the bypass control on the component in SigmaStudio :-)
I feel a bit stupid, now that I found that the last coefficient sent, is actually the first. I now think the "bypass" button on the FIR component does nothing more than creating a kind of unity fir filter when bypassed is chosen and uses the coefficients from the table when the FIR is not bypassed. Is that assumption correct?
Note: I installed SigmaStudio 4.5, but the help is empty...
With kind regards,
After some checking, it is now clear to me that the FIR is working flawless. The reason why my FIR's didn't act as expected is that I had added a 2-way mux for bypassing the FIR. These multiplexers expect a floatingpoint number to set the correct input. I used them before and I should know that :-) Of course, I supplied a integer number 1 instead of a fixed point 8.24 number 1.0 and the mux always bypassed the FIR...
So, my issue isn't an issue anymore.
Thanks for watching!
Yes, the last coefficient is the bypass and when you click on the bypass button all the other coefficients are changed to zero. So when you select a 10 tap filter you use 11 memory locations. However, you do not have to plan for this. If you want a 2400 tap filter you select 2400 taps. The compiler will add the one extra storage location for the bypass.
Now regarding the 2-Way MUX. They do NOT expect a floating point number. They expect an unsigned integer. So if you use a readback cell to look at the data you need to set it to HEX or 32.0 in fixed format. If you use a DC cell to test the Mux you set it the same, for a 32.0 or Hex number. So the 2-way will react to the LSB only. If you give it a number that is higher you will get unpredictable results. The number is used as a pointer to the location of the audio data. If it is pointed to some memory location that it not part of the switch you will get unexpected results.
Thanks Dave for your clarification!