ΣSigmaStudio Ask AI Русский Log in

Filter calculation ADAU1466 192kHz

SigmaDSP & SigmaStudio fbalk Jan 23, 2018 00:00 3 replies Original on forum ↗
Subscribe
fbalk Question
Jan 23, 2018 00:00

Hi,

we encountered a problem with the calcuation of filter coefficients with the ADAU1466.

With the ADAU1452 we convertet our values to fixedpoint with a constant 0x01000000 but this seems not to work with the 1466, instead we would have to use 0x00800000 like with the SIGMA200 series.

The same problem is also visible with the filter implementation in sigma studio itself. If you create a peak filter with a f0 of 1k, it comes up at 250Hz.

Additional to that, we saw that there is the wrong safe load address written in the export files (0x0000 instead of 0x6000 in this case).

Audio Signal Processors

adau1452

SigmaDSP Audio Processors

adau1466

DaveThib Reply
Jan 23, 2018 00:00

Hello fbalk,

I am not certain exactly how you are doing the conversion. Here is some C code of a simple way of doing it.

Here is a C function implementation:

/**************************************************************************

Converts a floating point value to an 8.24 fixed point value,

which is the native data type on the ADAU145x and ADAU146x

SigmaDSP processors.

The floating point number is multiplied by the maximum possible

value of the fractional part of the fixed point word (2^24). This

scales the floating point mantissa to a fixed point fraction.

If there is an integer portion of the value, the result will extend

above the fractional bits. Both the float and int are 2's complement

so the sign extension is correct.

On a 32-bit native architecture, sizeof(int) == sizeof(long) == 4, so

a simple preprocessor implementation should produce the same result.

***************************************************************************/

long SIGMASTUDIOTYPE_8_24_CONVERT(float inFloatValue)

{

global const long leftShiftedMaxFractionalPart = 2^24;

long outFixedPointValue_8_32;

outFixedPointValue_8_32 = round(inFloatValue * leftShiftedMaxFractionalPart);

return outFixedPointValue_8_32;

}

Next Issue, the corner frequency of the filter.

If the coefficients are know to be good then it is most likely a sampling rate issue. So first make certain that SigmaStudio cells are all set to the correct sampling frequency. However, this does not dictate the actual sampling frequency that the DSP is running at. That is done with register settings and with the actual clocks coming into the DSP. So check all the clock settings, core settings and serial port settings to see if the problem is there.

The last issue with the Safeload address being reported incorrectly. This is a known bug and is on the list to fix. We recently changed the safeload to appear in the same place with all new projects. Older legacy projects stay the same so that the code will compile the same. So this left room for a bug to creep in. For now you will have to manually make the change or just hard code it to 0x6000. It will not change.

Dave T

HayRoger Reply
Jan 25, 2018 00:00

Regarding the Safeload issue: Where actually are the Safeload registers? Based on the description of Table 27. Slave Port Addressing to DSP Core Address Mapping, it appears that 0x6000 is mapped to DM1 0x0000?

Roger H

DaveThib Reply
Jan 25, 2018 00:00

Hello Roger,

Yes, it is placed at the start of DM1.

Dave T