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

A BUG somewhere ... either "Capture Window" or "Export System Files" is wrong

SigmaDSP & SigmaStudio dzingoni Feb 10, 2013 00:00 2 replies Original on forum ↗
Subscribe
dzingoni Question
Feb 10, 2013 00:00

Hi everybody,

I'm using Sigmastudio 3.8 with an adau 1701, and have been working with it for some time.

Being ready to implement some external biquad coefficient calculation and to write them inthe DSP I was making some tests, and noticed that

there are always some differences between the hex codes displayed in the Capture Window and those exported by "Export System files".

Let's make an example, using a simple General 2nd order IIR. I set up as a simple parametric filter with only 3 dB of boost at 1000 hz.

We can see the calculated values in the capture window, the green lines.

Now we perform a compile, link, download and then export system files.

One of the exported files contains the parameters for the filter, we can see the in the right part of the picture.

Confronting the numbers ... we see that they are similar but not equal.

For instance:

the first parameter (name: EQ1940Dual10B1) is 1.01676738262177 (Hex: 0x00, 0x82, 0x25, 0x6F) in the capture window, and

its corresponding #define is

#define MOD_GENFILTER1_ALG0_STAGE0_B0_ADDR
0

#define MOD_GENFILTER1_ALG0_STAGE0_B0_FIXPT
0x0082256E

#define MOD_GENFILTER1_ALG0_STAGE0_B0_VALUE
SIGMASTUDIOTYPE_FIXPOINT_CONVERT(1.01676736897541)

so the values differ in the last byte (and some decimals in the floating point number).

Which of the two is wrong?

If I compile my microcontroller code using the generated code I will load 0x0082256E , but I see that Sigmastudio loaded 0x0082256F ....

I know it's just the LSB bit, but there must be some bug in the internals of Sigmastudio somewhere, maybe a different way of truncating the decimals ...

Am I wrong?

Best regards.

capture

export

simgastudio

1701

912040152ea4fcb9c050b4c52732468c.png
912040152ea4fcb9c050b4c52732468c.png
912040152ea4fcb9c050b4c52732468c.png-450x212.png
912040152ea4fcb9c050b4c52732468c.png-450x212.png
ADIApproved Reply
Feb 11, 2013 00:00

My first thought is that maybe there is an inconsistency in the sample rate in the project. Usually that causes the coefficients of filters (and other time-dependent paramters) to shift slightly. As a first step in debugging the issue, would you please try going through the full set of steps as outlined in this tutorial ( https://ez.analog.com/docs/DOC-1431 ) to make sure the sample rate is set correctly? Then try to link-compile-download, and finally export system files again. After that, let's take a look and see if the coefficients are still reading differently in the capture window and export files.

EZAdministrator Reply
Aug 2, 2018 00:00

This question has been assumed as answered either offline via email or with a multi-part answer. This question has now been closed out. If you have an inquiry related to this topic please post a new question in the applicable product forum.

Thank you,
EZ Admin