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

Optimized vs. non-optimized functions

SigmaDSP & SigmaStudio DannySmith Oct 7, 2017 00:00 2 replies Original on forum ↗
Subscribe
DannySmith Question
Oct 7, 2017 00:00

Hi,

I am using sigmastudio together with the adau1761 for an audio-project and have some questions related to optimized vs. non-optimized functions available in sigmastudio. For instance, this RMS compressor:

RMS
Mono
No Ext Detector
RMS (Gain)
49

uses 49 instructions where as the optimized version:

RMS
Mono
No Ext Detector
RMS (Gain) Optimized
15

uses only 15 instructions.

Do we lose anything (performance etc.) by using the optimized vs. the non-optimized function? When I tested the optimized SuperBass function, I seemed to get non-modulo memory usage which does not seem to work well in a Linux environment (signal becomes distorted). Does optimized functions use non-modulo memory or is it not related?

Best Regards,

Danny

Audio Signal Processors

SigmaDSP Audio Processors

adau1761

DaveThib Reply
Oct 12, 2017 00:00

Hello Danny,

Well, this is an excellent question. The answer is that it is optimized but the question is really optimized for what? The "Optimized version is optimized for program memory usage but the tradeoff is MIPS usage. The Non-optimized version uses much more program memory but uses less MIPS.

The reason is that the optimized version uses "subroutines" that are called many times for a repetitive function so that it saves on memory. However, the overhead of dealing with switching context uses up some more instruction cycles than the non-optimized version that is just in-line code for the entire algorithm.

They both work the exact same way and perform the same. So you can make a choice based on code-size or instruction usage.

Now your comments about a Linux environment is perplexing. The SigmaStudio code runs on the SigmaDSP and not in SigmaStudio or any other system that may be controlling the part. So unless the Linux driver is writing to memory where it is not supposed to be, or changing the modulo number that is assigned by the compiler, then the operating system should have no influence on the operation of the DSP code. With the obvious exception of writing to objects to change settings etc. We did have some issues with the Superbass cell so which version of SigmaStudio are you using?

Dave T

DannySmith Reply
Oct 12, 2017 00:00

Hi Dave,

Thank for the clarification on optimizations. Regarding the linux-remark I am referring to this commit on the linux firmware utility:

https://github.com/analogdevicesinc/sigmadsp-genfirmware/commit/c365537faf911783b6d7589a09f4241afaa930a3

"Emit warning for designs using non modulo RAM

Non modulo RAM is currently not supported by the Linux drivers. Emit a

warning if a design uses it, since it might not work correctly."

Are using the latest version of sigmastudio. The designs using nonmodulo ram works well on a adau1761 development card but not in our hw where we run a linux os. If we remove the functions using nonmodulo ram everything works as expected.

Regards,

Danny

Från: DaveThib

Skickat: den 12 oktober 2017 20:13

Till: Danny Smith

Ämne: Re: - Re: Optimized vs. non-optimized functions

EngineerZone <https://ez.analog.com/?et=watches.email.thread>;

Re: Optimized vs. non-optimized functions

reply from DaveThib<DaveThib> in SigmaDSP Processors and SigmaStudio Development Tool - View the full discussion<https://ez.analog.com/message/321482-re-optimized-vs-non-optimized-functions?commentID=321482&et=watches.email.thread#comment-321482>;