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

Access bit or register to know if a algorithm is completed (ADAU1451)

SigmaDSP & SigmaStudio Cmo Sep 2, 2019 00:00 4 replies Original on forum ↗
Subscribe
Cmo Question
Sep 2, 2019 00:00

Hello,

I would like to use an ADAU1451 to do a custom algorithm, with a cpu host (i.e. Raspberry pi) to get the result of this algorithm on this last one, is it possible and how to do ? (Use the ADAU as co-processor to carry out a parallel task). Can we create a flag allowing to know if the result of this algorithm is ready, and to get this result through a register ?

I know, this is not a usually use :).

Thank you in advance for your answer.

Kwanja.

Audio Signal Processors

adau1451

SigmaDSP Audio Processors

Ken.M Reply
Sep 2, 2019 00:00

Kwanza,

Yes. There are two ways to do this.

First, you must create the logic in your schematic to indicate that the value of ready. Once you have this value, you can

Poll the register with the RPi corresponding to the output value of the block with the logic.

Feed the logic to a GPIO (MPx) pin.

In the first case, the host would poll for the data ready flag, then read the value from another register. In the second case, the pin could be used to interrupt the host for (potentially) faster response. You can use the Register Window or the exported files to identify the addresses, or use the Indirect Parameter Access Table to lock it down.

Ken

Cmo Reply
Sep 2, 2019 00:00

Thank you Ken for your prompt reply.

Do you have an example for the second case ?

What do you mean with : "You can use the Register Window" and "or use the Indirect Parameter Access Table to lock it down" ?

thank you.

DaveThib Reply
Sep 3, 2019 00:00

Hello kwanja,

Ken was talking about polling the output of a block to read the value. It can be done with a Readback cell or other methods. The address of this cell can change if you make any changes to the program and re-compile it. This means that you will have to change the address in your host. You can do this two ways. If it is not often you can find the address of the object using the Register Window in SigmaStudio. Then you can change the address in your host processor and recompile that program.

Another way is to use the Indirect Parameter Access Table to "fix" the address so you do not have to recompile your code. The actual object in memory may change to a new address but a pointer to it is always stored in the table in the same address in memory. This is what he meant by "locking it down" locking down the address of the object.

I do want to bring up a point that the SigmaDSP operates on a sample by sample basis. So the program is run every sample period then it stops. There is some block processing available but it is probably not what you need. So if your algorithm goes over many sample periods then determining when it is "done" might be a little tricky.

Also, you do need to be using SigmaStudio for developing the code. Once you have the application done you can compile it and then have the host boot up the DSP or have the DSP boot itself up.

Dave T

Cmo Reply
Sep 3, 2019 00:00

Many thanks, I am going to look at all that.

Kwanja