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

[Bug Report] Does the min algorithm work correctly?

SigmaDSP & SigmaStudio J3627 Dec 5, 2012 00:00 9 replies Original on forum ↗
Thread Summary

Thread Summary

The user reported that the Min algorithm was outputting the higher value, similar to the Max algorithm. The issue was confirmed as a bug and has been fixed in the next release. A workaround using a Max cell and inverters, or the AB condition block, was suggested and works effectively.
AI Generated Content
Subscribe
J3627 Question
Dec 5, 2012 00:00

I am trying to use the min algorithm

"The Min algorithm compares 2 (or more) inputs and outputs the input with the lowest value."

But it seems to output the higher value, making it the same as the Max algorithm. Am I doing something wrong?

Audio Signal Processors

bug_report

basicdsp

adau1702

min

bugs

sigmastudio

SigmaDSP Audio Processors

max

Show More

81d1833b03c5f4c403163256d9c28586.png
81d1833b03c5f4c403163256d9c28586.png
81d1833b03c5f4c403163256d9c28586.png-400x465.png
81d1833b03c5f4c403163256d9c28586.png-400x465.png
ADIApproved Reply
Dec 5, 2012 00:00

I just tested this on the latest release version and I confirmed your results. It looks like a bug. Thanks for reporting this. I will forward it to the software team.

ADIApproved Reply
Dec 6, 2012 00:00

Just heard back from the software engineer. He accidentally made a change in the recent build that "broke" the Min cell. He's reverted the change and it should work in the next release. Thanks again for reporting this!

J3627 Reply
Dec 10, 2012 00:00

When will the next release be?

ADIApproved Reply
Dec 10, 2012 00:00

We typically don't have firm release dates set in advance, but I expect the next update will be in January or February.

ADIApproved Reply
Dec 10, 2012 00:00

Luckily, you can make a Min cell using a Max cell and some inverters:

This uses more instructions, but at least it implements the proper functionality.

ccc3f33598224308f75f75868039b59f.jpg
ccc3f33598224308f75f75868039b59f.jpg
ccc3f33598224308f75f75868039b59f.jpg-438x205.jpg
ccc3f33598224308f75f75868039b59f.jpg-438x205.jpg
J3627 Reply
Dec 10, 2012 00:00

Yep, that's what I did to replace it, on a hierarchy board.

J3627 Reply
Jan 2, 2013 00:00

Actually it looks like the AB in/out condition does the same thing, and uses fewer resources than the Max/Min block? Are there any cases in which the AB condition can't be used in place of a Max or Min block?

KJBob Reply
Jan 2, 2013 00:00

I use the AB condition block frequently, as you noted it can perform a min (or max) function, & it has always worked well for me.

ADIApproved Reply
Jan 7, 2013 00:00

J3627,

You're correct. You can implement this function with an AB condition as well. I don't suppose there is any real advantage or disadvantage to either method, except for the difference in instruction count.