Content of Exported SigmaStudio PARAM.H file
Hi,
I am puzzling over some of the parameters generated by Sigma Studio 3.5 for General Second Order filters for the ADAU1442 as presented in the exported PARAM.H file.
The addresses and values for B2, B1, B0, A2 and A1 make sense.
I am wondering what the values for DATA_ADR_ADDR, DATAR_ADR_ADDR, COEFF_ADR_ADDR and LOOP_ADDR are about.
I have used an older version of SigmaStudio (V2.6 - yes somewhat old!) for AD1940, and did not get these parameters for 2nd order filters.
What are these parameters for? They would not appear to be conventional IIR parameters. Given I am loading the parameters from a micro, and generating these on loading code into the DSP, how should I be generating the values for these? (The normal IIR filter coefficients are fine.)
A snippet of the code is below...
/* Module B0_HPF1 - General (2nd order)*/
#define MOD_B0_HPF1_COUNT 9
#define MOD_B0_HPF1_DEVICE "IC1"
#define MOD_B0_HPF1_ALG0_STAGE0_B2_ADDR 75
#define MOD_B0_HPF1_ALG0_STAGE0_B2_FIXPT 0x007FDAE1
#define MOD_B0_HPF1_ALG0_STAGE0_B2_VALUE SIGMASTUDIOTYPE_FIXPOINT_CONVERT(0.998867231486796)
#define MOD_B0_HPF1_ALG0_STAGE0_B2_TYPE SIGMASTUDIOTYPE_FIXPOINT
#define MOD_B0_HPF1_ALG0_STAGE0_B1_ADDR 76
#define MOD_B0_HPF1_ALG0_STAGE0_B1_FIXPT 0xFF004A3D
#define MOD_B0_HPF1_ALG0_STAGE0_B1_VALUE SIGMASTUDIOTYPE_FIXPOINT_CONVERT(-1.99773446297359)
#define MOD_B0_HPF1_ALG0_STAGE0_B1_TYPE SIGMASTUDIOTYPE_FIXPOINT
#define MOD_B0_HPF1_ALG0_STAGE0_B0_ADDR 77
#define MOD_B0_HPF1_ALG0_STAGE0_B0_FIXPT 0x007FDAE1
#define MOD_B0_HPF1_ALG0_STAGE0_B0_VALUE SIGMASTUDIOTYPE_FIXPOINT_CONVERT(0.998867231486796)
#define MOD_B0_HPF1_ALG0_STAGE0_B0_TYPE SIGMASTUDIOTYPE_FIXPOINT
#define MOD_B0_HPF1_ALG0_STAGE0_A2_ADDR 78
#define MOD_B0_HPF1_ALG0_STAGE0_A2_FIXPT 0xFF804A36
#define MOD_B0_HPF1_ALG0_STAGE0_A2_VALUE SIGMASTUDIOTYPE_FIXPOINT_CONVERT(-0.997735318739846)
#define MOD_B0_HPF1_ALG0_STAGE0_A2_TYPE SIGMASTUDIOTYPE_FIXPOINT
#define MOD_B0_HPF1_ALG0_STAGE0_A1_ADDR 79
#define MOD_B0_HPF1_ALG0_STAGE0_A1_FIXPT 0x00FFB5BC
#define MOD_B0_HPF1_ALG0_STAGE0_A1_VALUE SIGMASTUDIOTYPE_FIXPOINT_CONVERT(1.99773360720734)
#define MOD_B0_HPF1_ALG0_STAGE0_A1_TYPE SIGMASTUDIOTYPE_FIXPOINT
#define MOD_B0_HPF1_ALG0_DATA_ADR_ADDR 80
#define MOD_B0_HPF1_ALG0_DATA_ADR_FIXPT 0x000000A3
#define MOD_B0_HPF1_ALG0_DATA_ADR_VALUE SIGMASTUDIOTYPE_INTEGER_CONVERT(163)
#define MOD_B0_HPF1_ALG0_DATA_ADR_TYPE SIGMASTUDIOTYPE_INTEGER
#define MOD_B0_HPF1_ALG0_DATAR_ADR_ADDR 81
#define MOD_B0_HPF1_ALG0_DATAR_ADR_FIXPT 0x000000AC
#define MOD_B0_HPF1_ALG0_DATAR_ADR_VALUE SIGMASTUDIOTYPE_INTEGER_CONVERT(172)
#define MOD_B0_HPF1_ALG0_DATAR_ADR_TYPE SIGMASTUDIOTYPE_INTEGER
#define MOD_B0_HPF1_ALG0_COEFF_ADR_ADDR 82
#define MOD_B0_HPF1_ALG0_COEFF_ADR_FIXPT 0x0000004E
#define MOD_B0_HPF1_ALG0_COEFF_ADR_VALUE SIGMASTUDIOTYPE_INTEGER_CONVERT(78)
#define MOD_B0_HPF1_ALG0_COEFF_ADR_TYPE SIGMASTUDIOTYPE_INTEGER
#define MOD_B0_HPF1_ALG0_LOOP_ADDR 83
#define MOD_B0_HPF1_ALG0_LOOP_FIXPT 0x00000001
#define MOD_B0_HPF1_ALG0_LOOP_VALUE SIGMASTUDIOTYPE_INTEGER_CONVERT(1)
#define MOD_B0_HPF1_ALG0_LOOP_TYPE SIGMASTUDIOTYPE_INTEGER
This last chunk is puzzling me.
What should I be doing with these parameters in an embedded - microcontroller loaded implementation of the ADAU1442?
Regards
Phil
ad1940
Audio Signal Processors
adau1442
SigmaDSP Audio Processors
Phil,
You have discovered the inner workings of our "Optimized" filter algorithms. These algorithms exist only on newer SigmaDSP architectures, and they rely on iterating through a loop of code in order to create a more efficient calculation for multiple filters in the project. It's kind of like a subroutine. The parameters you highlighted are related to the dynamic addressing calculations required to keep the loop working as it should.
There's no easy way calculate these on your own. So, I would suggest following SigmaStudio's lead and simply copying the output values given to you by the compiler. The values that you highlighted should not change unless you change the number of filter bands or channels (but then again, that would require a recompilation anyway).
Brett,
Thanks for the info.
Given that in my application I will be updating corner frequencies for crossovers (and centre frequency, Q etc for parametric EQ's) via an embedded microcontroller, can I safely simply update the values of B2, B1, B0, A2 and A1 for the IIR filters, and leave the dynamic addressing stuff as exported by the compiler?
(Please say yes!!!)
Regards
Phil
Have done a few tests and am fairly confident that the parameters :
_DATA_ADR_ADDR, _DATAR_ADR_ADDR , _COEFF_ADR_ADDR and _LOOP_ADDR
are constants for a particular compilation and should simply be left as generated by Sigma Studio.
Hi Phil,
Sorry for the late response. I was out of the office frequently over the past several weeks. I'm especially sorry because the answer is quite simple! The answer is YES, you can update filter coefficients at any time. Just don't edit the values for the loop and subroutine calls. It looks like you figured that out on your own, but I just wanted to confirm for you that you're correct!
Please log in to reply.