ADAU1452 Directly Read Held Value in Value Hold Block

On the ADAU1452 I am using 20 instances of the Value Hold block and want my microcontroller to be able to read the held values.

I was using the Indirect Parameter Access Table to accomplish this, however, when I used the "Monitor the overrun errors and free cycles in the framework" feature to measure the number of cycles used, I found that the Indirect Parameter Access Table was causing the DSP to go over the compiler reported Inst (cycles) by 153 cycles.

Since my design is using almost all the available cycles this 153 cycle overage is causing me to run out of cycles. I found that I can also use the DSP Readback block for a cost of 3 cycles per value, which is better but still not ideal. Is there a way to read the held value directly? I assume this value must reside at some readable address in ram just as they are with the Max and Hold block, but unfortunately the parameter address is not listed anywhere that I can find.

Any ideas on how to read the held value in as few cycles as possible would be greatly appreciated.

  • 0
    •  Analog Employees 
    on Oct 14, 2020 8:16 PM

    Hello DRobinson114,

    Another good place to look is on the Params tab in the Capture window. You are correct in that the programmer did not "bring out" the held value as a parameter. There is not much choice but to use a DSP readback cell to capture the value for you. 

    I agree that the IPAT ( Indirect Parameter Access Table) is rather heavy with instructions. I would like to see a simpler version of it but my suggestions are a low priority at the moment. 

    I do not know of another way to get that held value. 

    If you like I can take a look at your program to see if there are some places to save some MIPS. Send me a PM.

    Dave T

  • Hi Dave,

    I revisited this recently. Unfortunately, since the Value Hold block got put into DM1, the Params tab of the Capture window did not list the parameters for that block. Is it true that the capture window can only show DM0?

    Until now we ended up living with the cost of the DSP Readback block. Now, I am trying to squeak out a few additional cycles.

    Today, I was able to discover the addresses used to store the Value Hold parameters by making a build with and without the Value Hold block and then diffing the generated initialization data for DM1.

    This definitely adds a lot of complexity to maintaining our DSP image since we need to do this work around to discover the parameter addresses as they move around with other changes, but I suppose we can live with it for now.

    Is there any way to make a change request, to "bring out" these parameters in a future release of SigmaStudio?

    Best,

    Dylan

  • 0
    •  Analog Employees 
    on Jul 6, 2021 7:55 PM in reply to DRobinson114

    Hello Dylan,

    That is a problem that DM1 cannot be seen with the Params tab. I am not certain when this might be changed. 

    If you want me to take a quick look at your program to see if it can be more efficient let me know. 

    Dave T