Remove xc from TwoStageDecimator test#279
Open
Allan-xmos wants to merge 2 commits intoxmos:developfrom
Open
Conversation
remove HW timer, rename
There was a problem hiding this comment.
Pull request overview
This PR converts the TwoStageDecimator test from XC (XMOS C) to C++ by removing the main.xc file and consolidating all functionality into app.cpp. The PR description mentions removing the "HW timer" and renaming, though the actual changes are broader than just that.
Changes:
- Removed main.xc file entirely, consolidating XC code into app.cpp
- Converted parallel XC constructs to C++ PAR_JOBS/PJOB macros
- Updated CMakeLists.txt to set dependencies directly instead of including deps.cmake
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| tests/signal/TwoStageDecimator/src/main.xc | Deleted XC file containing main() and host_words_to_app() |
| tests/signal/TwoStageDecimator/src/app.cpp | Added main() and host_words_to_app(), converted to C++ with PAR_JOBS pattern |
| tests/signal/TwoStageDecimator/CMakeLists.txt | Simplified dependencies by removing deps.cmake include |
| Jenkinsfile | Updated Jenkins shared library version from v0.45.0 to v0.46.0 |
Comments suppressed due to low confidence (2)
tests/signal/TwoStageDecimator/src/app.cpp:14
- The include for xcore/hwtimer.h is not used in this file. No hwtimer functions are called anywhere in the code. This unused include should be removed to keep the code clean and avoid unnecessary dependencies.
tests/signal/TwoStageDecimator/src/app.cpp:181 - The PAR_JOBS macro waits for all jobs to complete before continuing. However, the host_words_to_app function runs in an infinite loop (SELECT_RES with continue), so it will never complete. This means the code at lines 183-186 will never execute, and the program will hang after the run function completes. In the original XC code, the program would exit explicitly when run completed, terminating all parallel tasks. To fix this, you should call exit(0) within the run function after process_signal completes, similar to the original XC implementation.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
remove HW timer, rename