Post Go back to editing

ReadBack Parameter Issue

Category: Software
Product Number: ADAU1787

Hello,

I am trying to use "ReadBack Parameter" block in my ADAU1787 in order to obtain the FIR coefficients of a NLMS block. These coefficients will be used later on a FIR filter to compensate the secondary Path of an ANC purposes. So my idea is to export the coefficients in a .txt file or pop up window.

However, seems that the ReadBack Parameter Block of the ADAU1787 cannot make such operation given in:

https://wiki.analog.com/resources/tools-software/sigmastudio/toolbox/basicdsp/dspparameterread

Is there any block, tool or configuration that can export my NLMS coeficients into a .txt file or pop up window? Scripting would be a solution?

For an example I attach simple program with sin and cosine functions.

Thak you in advance and I hope someone can clarify me this.

Best regards

.NLMS_proof.dspproj

  • Hello AudioSignalProcessing,

    I have not opened your project but I created a simple project. To make things easier I changed the number of taps to 8 so make it easy to find them in the parameters list. 

    After compiling I can see them here:

    I just used the default cell name of NLMS1. You can see the parameter name is a bit cryptic.

    There are a few things in the variable name I do not understand why it is there. but you can focus on the coefficient name. They are listed in reverse order. 

    This was captured after compiling and BEFORE I turned on the adaptation so the FIR filter is default 1 plus all zeros. 

    Look at the name: "LMSAlg1cc_zm0_9"

    This is coefficient Z-minus 0 so hence the text in the name "c_zm0"

    The next coefficient will be c_zm1 for coefficient zero minus 1, and so on until the eight coefficient xm7

     

    I do not know what the "_9" means or why there are two "c"'s. 

    After I turn on the adaptation for a few seconds and hit "refresh" I get non-zero coefficients.

    Keep in mind that the memory addressing on this part is a bit strange. It is not by the 32 bit word but by the byte. So to pick up the 32 bit words you have to increment the address by four after reading in four bytes in a burst. I suppose you could read them all in one burst. FIR filter size of 8 times four bytes each will be 32 bytes. 

    Note the addresses start at 8460 and go to 8491 which equals 32 storage locations. 

    I have not looked into this but the export files should include the address of these parameters. 

    By the way. I changed the filter size back to the default 256 and recompiled and I see the change:

    The variable is named cc_zm255_9

    So this is where you can pick up the coefficients and overwrite them. 

    If it is not in the export files then worst case you will have to look for them like I did. but, if you recompile they may move. 

    Dave T

  • Hello DaveThib,

    First of all thank you for your quickly reply.

    Ok I understand the coefficients naming in the parameter window, I had already looked that, but I was getting different values when refreshing and whem read a single parameter... So I thought it was not really consistent method.

    Regarding the addressing, I dont really understand what you mean with "to pick up the 32 bit words you have to increment the address by four after reading in four bytes in a burst"

    But what I understand finally is that or I look in the export files in order to see if the parameters values are saved, or I must read (how? Scripting?) The addresses shown in the parameter window. 

    Thank you in advance and sorry  for my misunderdtanding but it is one of my first times working with SignaStudio.

  • Hi dave,

    I tried what you told me and it works. The problem is that I would like to read the parameters automatically and have them in a txt file or just some window where I can copy and paste easily to paste in to anothe FIR filter table.

    Here is my problem, as I tried using scripting:

    As you can see I am getting all zeros. I dont know if I am usign the correct function or if my addressing is bad...

    Could you please advise me about this issue?

    Pd: I look up the export files (paramAddress) and this is what I get:

    Best regards and I hope you can have the time to answer as it would help me a lot.