Changed two-tone test assertions#657
Open
macylibed9 wants to merge 4 commits intoanalogdevicesinc:mainfrom
Open
Changed two-tone test assertions#657macylibed9 wants to merge 4 commits intoanalogdevicesinc:mainfrom
macylibed9 wants to merge 4 commits intoanalogdevicesinc:mainfrom
Conversation
Signed-off-by: Macy Libed <[email protected]>
tfcollins
requested changes
Apr 14, 2025
Collaborator
tfcollins
left a comment
There was a problem hiding this comment.
I think this change makes sense but there is an existing bug in case the tones are far outside the tolerance (else condition) then the test will pass erroneously. Can you add an else clause?
Signed-off-by: Macy Libed <[email protected]>
Contributor
Author
|
Thanks! I simplified the assertion. In this version, if the tones are outside the tolerance, the assertions will still fail as expected, so it won’t pass erroneously. |
Collaborator
|
@macylibed9 please run the precommit formatter |
aafad17 to
e8441c5
Compare
Signed-off-by: Macy Libed <[email protected]>
e8441c5 to
2b9ccef
Compare
Contributor
Author
done with precommit and lints are okay already. Thanks |
Collaborator
|
Hardware tests are failing. Can you check what is going on? Tests that use the updated functions fail |
Signed-off-by: Macy Libed <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
In dds_two_tone, there was a function that originally just grabbed the two highest amplitudes, but that didn’t guarantee they'd be the peaks closest to Frequency1 and Frequency2. So sometimes, it would just give you two peaks from the same frequency.
To fix it, I split the peak detection—one for Frequency1 and one for Frequency2—so each one gets its correct peak. Also, I cleaned up the assertions to make them more straightforward.
Fixes # (issue)
Type of change
Please delete options that are not relevant.
How has this been tested?
Tested it on different actual boards, including ZC702 with FMCOMMS2-3 and ZedBoard with FMCOMMS4. I tried different values for frequency, scale, and peak_min to verify the behavior.
Documentation
If this is a new feature or example please mention or link any documentation. All new hardware interface classes require documentation.
Checklist: