Skip to content

Commit

Permalink
Merge pull request #373 from xmos/all_tools_upd
Browse files Browse the repository at this point in the history
Tools and Submodules Update
  • Loading branch information
xalbertoisorna authored Dec 3, 2024
2 parents 89cc26c + 6348afc commit 6c04d0e
Show file tree
Hide file tree
Showing 47 changed files with 210 additions and 389 deletions.
7 changes: 0 additions & 7 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,9 @@
[submodule "modules/xscope_fileio"]
path = modules/xscope_fileio/xscope_fileio
url = [email protected]:xmos/xscope_fileio.git
[submodule "modules/inferencing/lib_nn"]
path = modules/inferencing/lib_nn
url = [email protected]:xmos/lib_nn.git
[submodule "modules/lib_qspi_fast_read"]
path = modules/lib_qspi_fast_read
url = [email protected]:xmos/lib_qspi_fast_read.git
[submodule "modules/inferencing/lib_tflite_micro"]
path = modules/inferencing/lib_tflite_micro
url = [email protected]:xmos/lib_tflite_micro.git
ignore = dirty
[submodule "modules/xua"]
path = modules/xua
url = [email protected]:xmos/lib_xua.git
Expand Down
10 changes: 8 additions & 2 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ XCORE-VOICE change log
2.3.0
-----

* CHANGED: Updated submodule fwk_io to version v3.6.0 from v3.3.0.
* CHANGED: Updated submodule fwk_core to version v1.1.0 from v1.0.2.
* CHANGED: Updated submodule fwk_voice to version v0.8.0 from v0.7.0.
* CHANGED: Updated Xmosdoc to version v6.2.0.
* CHANGED: Updated XTC Tools to 15.3.0.
* REMOVED: Deleted inferencing submodule.
* ADDED: xmos-ai-tools v1.3.1 Python requirement.
* ADDED: FFVA INT example with Cyberon speech recognition engine and model
(DSpotter v2.2.18.0).
* CHANGED: Moved files in folders device_memory, gpio_ctrl, intent_engine and
Expand All @@ -13,7 +20,7 @@ XCORE-VOICE change log
* ADDED: FFD example with I2S audio input to Cyberon speech recognition
engine and model.
* REMOVED: flash settings in .xn files, as they are not required by XMOS
Tools 15.2.x.
Tools 15.3.0.
* ADDED: Support for reading registers over I2C slave in FFD examples.
* ADDED: Note in ASRC demo documentation about large latency in ASRC
processing. References to alternative application notes have been provided.
Expand Down Expand Up @@ -102,4 +109,3 @@ XCORE-VOICE change log
------

* ADDED: FFD demo using OLED display

52 changes: 23 additions & 29 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,22 @@ pipeline {
parameters {
string(
name: 'TOOLS_VERSION',
defaultValue: '15.2.1',
defaultValue: '15.3.0',
description: 'The XTC tools version'
)
string(
name: 'XMOSDOC_VERSION',
defaultValue: 'v6.1.2',
defaultValue: 'v6.2.0',
description: 'The xmosdoc version'
)
booleanParam(name: 'NIGHTLY_TEST_ONLY',
defaultValue: false,
description: 'Tests that only run during nightly builds.')

}
description: 'Tests that only run during nightly builds.'
)
} // parameters
environment {
REPO = 'sln_voice'
VIEW = getViewName(REPO)
PYTHON_VERSION = "3.8.11"
VENV_DIRNAME = ".venv"
BUILD_DIRNAME = "dist"
VRD_TEST_RIG_TARGET = "XCORE-AI-EXPLORER"
Expand All @@ -57,20 +56,18 @@ pipeline {
}
stage('Build tests') {
steps {
script {
uid = sh(returnStdout: true, script: 'id -u').trim()
gid = sh(returnStdout: true, script: 'id -g').trim()
}
// pull docker images
sh "docker pull ghcr.io/xmos/xcore_builder:latest"
sh "docker pull ghcr.io/xmos/xcore_voice_tester:develop"
// host apps
sh "docker run --rm -u $uid:$gid -w /sln_voice -v $WORKSPACE:/sln_voice ghcr.io/xmos/xcore_builder:latest bash -l tools/ci/build_host_apps.sh"
// test firmware and filesystems
sh "docker run --rm -u $uid:$gid -w /sln_voice -v $WORKSPACE:/sln_voice ghcr.io/xmos/xcore_builder:latest bash -l tools/ci/build_tests.sh"
// List built files for log
sh "ls -la dist_host/"
sh "ls -la dist/"
createVenv(reqFile: "requirements.txt")
withTools(params.TOOLS_VERSION) {
withVenv {
// host apps
sh "tools/ci/build_host_apps.sh"
// test firmware and filesystems
sh "tools/ci/build_tests.sh"
// List built files for log
sh "ls -la dist_host/"
sh "ls -la dist/"
} // venv
} // tools
}
}
stage('ASRC Unit tests') {
Expand Down Expand Up @@ -102,14 +99,11 @@ pipeline {
}
}
}
stage('Create virtual environment') {
stage('Install test requirements') {
when {
expression { params.NIGHTLY_TEST_ONLY == true }
}
steps {
// Create venv
sh "pyenv install -s $PYTHON_VERSION"
sh "~/.pyenv/versions/$PYTHON_VERSION/bin/python -m venv $VENV_DIRNAME"
// Install dependencies
withVenv() {
sh "pip install git+https://github0.xmos.com/xmos-int/xtagctl.git"
Expand Down Expand Up @@ -186,10 +180,8 @@ pipeline {
withTools(params.TOOLS_VERSION) {
withVenv {
script {
uid = sh(returnStdout: true, script: 'id -u').trim()
gid = sh(returnStdout: true, script: 'id -g').trim()
withXTAG(["$VRD_TEST_RIG_TARGET"]) { adapterIDs ->
sh "docker run --rm -u $uid:$gid --privileged -v /dev/bus/usb:/dev/bus/usb -w /sln_voice -v $WORKSPACE:/sln_voice ghcr.io/xmos/xcore_voice_tester:develop bash -l test/device_firmware_update/check_dfu.sh " + adapterIDs[0]
sh "test/device_firmware_update/check_dfu.sh " + adapterIDs[0]
}
sh "pytest test/device_firmware_update/test_dfu.py --readback_image test/device_firmware_update/test_output/readback_upgrade.bin --upgrade_image test/device_firmware_update/test_output/test_ffva_dfu_upgrade.bin"
}
Expand Down Expand Up @@ -224,6 +216,7 @@ pipeline {
withTools(params.TOOLS_VERSION) {
withVenv {
script {
sh "xtagctl reset_all $VRD_TEST_RIG_TARGET"
withXTAG(["$VRD_TEST_RIG_TARGET"]) { adapterIDs ->
sh "test/pipeline/check_pipeline.sh $BUILD_DIRNAME/test_pipeline_ffva_adec_altarch.xe $PIPELINE_TEST_VECTORS test/pipeline/ffva_quick.txt test/pipeline/ffva_test_output $WORKSPACE/amazon_wwe " + adapterIDs[0]
}
Expand All @@ -240,6 +233,7 @@ pipeline {
steps {
withTools(params.TOOLS_VERSION) {
withVenv {
sh "xtagctl reset_all $VRD_TEST_RIG_TARGET"
script {
withXTAG(["$VRD_TEST_RIG_TARGET"]) { adapterIDs ->
sh "test/pipeline/check_pipeline.sh $BUILD_DIRNAME/test_pipeline_ffd.xe $PIPELINE_TEST_VECTORS test/pipeline/ffd_quick.txt test/pipeline/ffd_test_output $WORKSPACE/amazon_wwe " + adapterIDs[0]
Expand All @@ -258,13 +252,13 @@ pipeline {
withTools(params.TOOLS_VERSION) {
withVenv {
script {
sh "xtagctl reset_all $VRD_TEST_RIG_TARGET"
withXTAG(["$VRD_TEST_RIG_TARGET"]) { adapterIDs ->
sh "test/asr/check_asr.sh Sensory $ASR_TEST_VECTORS test/asr/ffd_quick_sensory.txt test/asr/sensory_output " + adapterIDs[0]
sh "test/asr/check_asr.sh Cyberon $ASR_TEST_VECTORS test/asr/ffd_quick_cyberon.txt test/asr/cyberon_output " + adapterIDs[0]
}
sh "pytest test/asr/test_asr.py --log test/asr/sensory_output/results.csv"
sh "pytest test/asr/test_asr.py --log test/asr/cyberon_output/results.csv"

}
}
}
Expand All @@ -288,7 +282,7 @@ pipeline {
checkout scm
sh 'git submodule update --init --recursive --depth 1 --jobs \$(nproc)'
warnError("Docs") {
buildDocs()
buildDocs(archiveZipOnly: true)
} // warnError("Docs")
} // steps
post {
Expand Down
63 changes: 0 additions & 63 deletions doc/README.rst

This file was deleted.

5 changes: 3 additions & 2 deletions doc/programming_guide/asr/deploying/linux_macos.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@ Before running the host application, you may need to add the location of ``xscop
Building the Firmware
=====================

Run the following commands in the root folder to build the firmware:
After having your python environment activated, run the following commands in the root folder to build the firmware:

.. code-block:: console
pip install -r requirements.txt
cmake -B build --toolchain=xmos_cmake_toolchain/xs3a.cmake
cd build
make example_asr
Expand Down Expand Up @@ -64,7 +65,7 @@ From the build folder run:

.. code-block:: console
xrun --xscope-realtime --xscope-port localhost:12345 example_asr.xe
xrun --xscope --xscope-port localhost:12345 example_asr.xe
In a second console, run the following command in the ``examples/speech_recognition`` folder to run the host server:

Expand Down
5 changes: 3 additions & 2 deletions doc/programming_guide/asr/deploying/native_windows.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,11 @@ Before running the host application, you may need to add the location of ``xscop
Building the Firmware
=====================

Run the following commands in the root folder to build the firmware:
After having your python environment activated, run the following commands in the root folder to build the firmware:

.. code-block:: console
pip install -r requirements.txt
cmake -G Ninja -B build --toolchain=xmos_cmake_toolchain/xs3a.cmake
cd build
ninja example_asr
Expand Down Expand Up @@ -86,7 +87,7 @@ From the build folder run:

.. code-block:: console
xrun --xscope-realtime --xscope-port localhost:12345 example_asr.xe
xrun --xscope --xscope-port localhost:12345 example_asr.xe
In a second console, run the following command in the ``examples/speech_recognition`` folder to run the host server:

Expand Down
13 changes: 7 additions & 6 deletions doc/programming_guide/asrc/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,12 @@ something like this:
Linux or Mac
------------

To build for the first time, run ``cmake`` to create the
To build for the first time, activate your python environment, run ``cmake`` to create the
make files:

::

$ pip install -r requirements.txt
$ mkdir build
$ cd build
$ cmake --toolchain ../xmos_cmake_toolchain/xs3a.cmake ..
Expand All @@ -127,10 +128,9 @@ Following initial ``cmake`` build, for subsequent builds, as long as new source
Windows
-------

It is highly recommended to use ``Ninja`` as the make system under
``cmake``. Not only is it a lot faster than MSVC ``nmake``, it also
works around an issue where certain path names may cause an issue with
the XMOS compiler under Windows.
It is recommended to use `Ninja` or `xmake` as the make system under Windows.
`Ninja` has been observed to be faster than `xmake`, however `xmake` comes natively with XTC tools.
This firmware has been tested with `Ninja` version v1.11.1.

To install Ninja, follow these steps:

Expand All @@ -142,11 +142,12 @@ To install Ninja, follow these steps:
set the path in the current command line session using something
like ``set PATH=%PATH%;C:\Users\xmos\utils\ninja``

To build for the first time, run ``cmake`` to create the
To build for the first time, activate your python environment, run ``cmake`` to create the
make files:

::

$ pip install -r requirements.txt
$ md build
$ cd build
$ cmake -G "Ninja" --toolchain ..\xmos_cmake_toolchain\xs3a.cmake ..
Expand Down
3 changes: 2 additions & 1 deletion doc/programming_guide/ffd/deploying/linux_macos.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,11 @@ The host applications will be installed at ``/opt/xmos/bin``, and may be moved i
Building the Firmware
=====================

Run the following commands in the root folder to build the firmware:
After having your python environment activated, run the following commands in the root folder to build the firmware:

.. code-block:: console
pip install -r requirements.txt
cmake -B build --toolchain=xmos_cmake_toolchain/xs3a.cmake
cd build
make example_ffd_<speech_engine>
Expand Down
3 changes: 2 additions & 1 deletion doc/programming_guide/ffd/deploying/native_windows.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,11 @@ The host applications will be installed at ``%USERPROFILE%\.xmos\bin``, and may
Building the Firmware
=====================

Run the following commands in the root folder to build the firmware:
After having your python environment activated, run the following commands in the root folder to build the firmware:

.. code-block:: console
pip install -r requirements.txt
cmake -G Ninja -B build --toolchain=xmos_cmake_toolchain/xs3a.cmake
cd build
ninja example_ffd_<speech_engine>
Expand Down
9 changes: 6 additions & 3 deletions doc/programming_guide/ffva/deploying/linux_macos.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,26 +27,29 @@ The host applications will be installed at ``/opt/xmos/bin``, and may be moved i
Building the Firmware
=====================

Run the following commands in the root folder to build the |I2S| firmware:
After having your python environment activated, run the following commands in the root folder to build the |I2S| firmware:

.. code-block:: console
pip install -r requirements.txt
cmake -B build --toolchain=xmos_cmake_toolchain/xs3a.cmake
cd build
make example_ffva_int_fixed_delay
Run the following commands in the root folder to build the |I2S| firmware with the Cyberon ASR engine:
After having your python environment activated, run the following commands in the root folder to build the |I2S| firmware with the Cyberon ASR engine:

.. code-block:: console
pip install -r requirements.txt
cmake -B build --toolchain=xmos_cmake_toolchain/xs3a.cmake
cd build
make example_ffva_int_cyberon_fixed_delay
Run the following commands in the root folder to build the USB firmware:
After having your python environment activated, run the following commands in the root folder to build the USB firmware:

.. code-block:: console
pip install -r requirements.txt
cmake -B build --toolchain=xmos_cmake_toolchain/xs3a.cmake
cd build
make example_ffva_ua_adec_altarch
Expand Down
Loading

0 comments on commit 6c04d0e

Please sign in to comment.