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

Hardware Slew Sigma DSP

SigmaDSP & SigmaStudio FormerMember Oct 19, 2021 00:00 2 replies Original on forum ↗
Subscribe
FormerMember Question
Oct 19, 2021 00:00

Dear Team ,

I have a question with regard to the Volume Control HW Slew vs Volume Control SW Slew .

The data sheet mentions that the HW version uses fewer instructions per cycle however ,the compiler window shows that the HW version uses more instructions than the SW version.

Am I missing something on the understanding of how the HW Slew should work or is it really this way.

Can someone explain this observation

ADIApproved Reply
Oct 22, 2021 00:00

Hello,

Sorry for the delayed response.

The Hardware slew might take few instructions to set up the registers.So it might take more instructions than the software slew.If you use single channel then the SW slew takes fewer cycle than the HW slew but when the algorithm is grown to large number of channels then we may see the change and improvement in HW slew and it might be faster.

For just few channels, HW slew isn't that efficient but when we go with more algorithm, it really matters and should be better.

Regards,
Lalitha.S

DaveThib Reply
Nov 11, 2021 00:00

Hello Hermione,

Thanks for pointing this out. It was something I never looked at closely enough. Here is why this is the case.

The HW Slew engine in the part is used by many other blocks in a program so to use it you need to set it up with the slew mode, the target and the current gain then calculate the slew factor. So this setup requires several instructions which is the overhead that makes it use more instructions than the SW slew. If you were to grow the HW slew volume control the setup would only need to be done once. So eventually, if grown large enough, the instructions will be less for the HW slew. However, I found that this is not true. Here are the results of my tests:

Here is a screenshot of a single channel:

So the HW slew uses two more instructions.

If grown to be a stereo volume control there is only one extra instruction:

So I continued to grow the volume controls and I found the HW always used one more instruction than the SW slew. I went all the way up to 8 channels and it was still one instruction more. It is highly unlikely that anyone will be growing a single volume control to be larger than 8 channels so I did not go further.

So it looks like it is better to use the SW slew that is the optimized version.

Here a screenshot of my results:

I also quickly did a comparison using the SW RC Accurate version of the volume control. As expected it used more instructions than the optimized version. The optimized version uses a less accurate representation of an RC curve to make it faster to calculate. It is still pretty good but we have the accurate one in case it is important for a certain application. Here are the results:

Thanks for pointing this out so I could better define the usage.

Dave T

4011.pastedimage1636639692162v1.png
4011.pastedimage1636639692162v1.png
1106.pastedimage1636639848224v2.png
1106.pastedimage1636639848224v2.png
7181.pastedimage1636640317672v3.png
7181.pastedimage1636640317672v3.png
0083.pastedimage1636640674420v4.png
0083.pastedimage1636640674420v4.png