Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test_i2s_basic_master and test_basic_master_external_clock #104

Merged
merged 4 commits into from
Feb 20, 2024

Conversation

shuchitak
Copy link
Contributor

@shuchitak shuchitak commented Feb 16, 2024

https://xmosjira.atlassian.net/browse/AP-403

Changes in this PR:

  • Fix test_i2s_basic_master and test_basic_master_external_clock tests so they run for 192KHz, 96KHz and 48KHz for both 32bits and 16bits for the smoke test and 192, 96, 48, 176.4, 88.2 and 44.1KHz for 32 and 16bits for the nightly test.

pytest lib_i2s/test_i2s_basic_master.py
pytest lib_i2s/test_basic_master_external_clock.py

pytest lib_i2s/test_i2s_basic_master.py --nightly
pytest lib_i2s/test_basic_master_external_clock.py --nightly

Note that the mclk frequency is set such that the mclk_bclk_ratio is atleast 2 for the worst case (192KHz). I could not get the test to pass reliably if testing with mclk_bclk_ratio set to 1. Sometimes, the bclk clock block would start with a falling edge instead of a rising edge, causing the LR clk to start before the bclk.
With mclk_bclk_ratio of 2 or more, I couldn't recreate this issue.

@shuchitak shuchitak changed the title Get test_i2s_basic_master.py test passing Fix test_i2s_basic_master and test_basic_master_external_clock Feb 19, 2024
@mbanth mbanth assigned shuchitak and unassigned mbanth Feb 19, 2024
@shuchitak shuchitak requested a review from ACascarino February 19, 2024 10:35
Copy link
Contributor

@ACascarino ACascarino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good, assuming they all pass!

@@ -21,7 +21,7 @@ def uncollect_if(bitdepth, num_in, num_out):
if bitdepth == 16 and num_in == 4 and num_out == 4:
return True

@pytest.mark.uncollect_if(func=uncollect_if)
#@pytest.mark.uncollect_if(func=uncollect_if)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may wish to consider removing this mark and the uncollect_if function altogether if we no longer need to skip these tests

@@ -16,6 +16,9 @@ set(APP_LINK_OPTIONS
-target=XCORE-AI-EXPLORER
)

# Compile main.c which contains the i2s_callback_group_t functions in O3 mode
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah same comment as last time - would be good to be able to put actual numbers on "how many ticks can I actually use in the callbacks", since it's obviously lower than we thought it was

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to look at the back pressure test next. Hopefully it does that.

@shuchitak
Copy link
Contributor Author

Looking good, assuming they all pass!

Yes! Passing consistently on my Mac.

@shuchitak shuchitak merged commit 71db570 into xmos:develop Feb 20, 2024
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants