Skip to content

Remove xc from TwoStageDecimator test#279

Open
Allan-xmos wants to merge 2 commits intoxmos:developfrom
Allan-xmos:feature/remove_xc_twostagedecimator
Open

Remove xc from TwoStageDecimator test#279
Allan-xmos wants to merge 2 commits intoxmos:developfrom
Allan-xmos:feature/remove_xc_twostagedecimator

Conversation

@Allan-xmos
Copy link
Contributor

remove HW timer, rename

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

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.

2 participants