Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@
# Built documentation
doc/_build/pdf/*.pdf
**/doc/pdf/*.pdf
**/.vscode/settings.json
7 changes: 7 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
lib_src change log
==================

2.7.1
-----

* Changes to dependencies:

- lib_logging: 3.3.1 -> 3.4.0

2.7.0
-----

Expand Down
216 changes: 117 additions & 99 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,37 +1,46 @@
// This file relates to internal XMOS infrastructure and should be ignored by external users

@Library('xmos_jenkins_shared_library@v0.35.0') _
@Library('xmos_jenkins_shared_library@v0.43.3') _

getApproval()

pipeline {
agent none
environment {
REPO = 'lib_src'
}
options {
buildDiscarder(xmosDiscardBuildSettings())
buildDiscarder(xmosDiscardBuildSettings(onlyArtifacts = false))
skipDefaultCheckout()
timestamps()
}
parameters {
string(
name: 'TOOLS_VERSION',
defaultValue: '15.3.0',
defaultValue: '15.3.1',
description: 'The XTC tools version'
)
string(
name: 'XMOSDOC_VERSION',
defaultValue: 'v6.2.0',
defaultValue: 'v8.0.1',
description: 'The xmosdoc version'
)
string(
name: 'INFR_APPS_VERSION',
defaultValue: 'v2.0.1',
defaultValue: 'v3.3.0',
description: 'The infr_apps version'
)
}
stages {
stage('Setup') {
agent {
label 'linux'
}
steps {
script {
def (server, user, repo) = extractFromScmUrl()
env.REPO_NAME = repo
}
}
}

stage ('Build and test') {
parallel {
stage('Build and sim test') {
Expand All @@ -42,27 +51,26 @@ pipeline {
stage('Build examples') {
steps {
println "Stage running on ${env.NODE_NAME}"
dir("${REPO}") {
checkout scm
dir(REPO_NAME) {
checkoutScmShallow()
dir("examples") {
withTools(params.TOOLS_VERSION) {
sh 'cmake -G "Unix Makefiles" -B build'
sh 'xmake -C build -j 16'
}
xcoreBuild()
}
} // dir("${REPO}")
} // dir("${REPO_NAME}")
} // steps
} // stage('Build examples')

stage('Library checks') {
steps {
runLibraryChecks("${WORKSPACE}/${REPO}", "${params.INFR_APPS_VERSION}")
warnError("Repo checks failed"){
runRepoChecks("${WORKSPACE}/${REPO_NAME}")
}
}
}

stage('Simulator tests') {
steps {
dir("${REPO}/tests") {
dir("${REPO_NAME}/tests") {
withTools(params.TOOLS_VERSION) {
createVenv(reqFile: "requirements.txt")
withVenv {
Expand All @@ -80,8 +88,8 @@ pipeline {
} // stages
post {
always {
junit "${REPO}/tests/sim_tests/pytest_result_prepare.xml"
junit "${REPO}/tests/sim_tests/pytest_result_run.xml"
junit "${REPO_NAME}/tests/sim_tests/pytest_result_prepare.xml"
junit "${REPO_NAME}/tests/sim_tests/pytest_result_run.xml"
}
cleanup {
xcoreCleanSandbox()
Expand All @@ -95,91 +103,92 @@ pipeline {
}
steps {
println "Stage running on ${env.NODE_NAME}"
sh 'git clone https://github0.xmos.com/xmos-int/xtagctl.git'
sh 'git -C xtagctl checkout v2.0.0'
dir("${REPO}") {
checkout scm
dir("tests") {
createVenv(reqFile: "requirements.txt")
dir("hw_tests") {
withTools(params.TOOLS_VERSION) {
sh "cmake -G 'Unix Makefiles' -B build"
sh "xmake -C build -j 8"
withVenv {
sh "pip install -e ${WORKSPACE}/xtagctl"
withXTAG(["XCORE-AI-EXPLORER"]) { xtagIds ->
sh "pytest -n1 --junitxml=pytest_hw.xml"
sh "xrun --xscope --adapter-id ${xtagIds[0]} asynchronous_fifo_asrc_test/bin/asynchronous_fifo_asrc_test.xe"
}
} // withVenv
} // withTools
} // dir(hw_tests")
} // dir(tests)
} // dir ("${REPO}")
} //steps
post {
always {
junit "${REPO}/tests/hw_tests/pytest_hw.xml"
}
cleanup {
xcoreCleanSandbox()
}
} // post
} // stage('Hardware tests')

stage('SNR plots') {
agent {
label 'xcore.ai && uhubctl'
}
steps {
println "Stage running on ${env.NODE_NAME}"
sh 'git clone https://github0.xmos.com/xmos-int/xtagctl.git'
sh 'git -C xtagctl checkout v2.0.0'
dir("${REPO}") {
checkout scm
dir("doc/python") {
createVenv(reqFile: "requirements.txt")
withVenv {
sh "pip install -e ${WORKSPACE}/xtagctl"
withTools(params.TOOLS_VERSION) {
sh "pip install git+ssh://git@github.com/xmos/xscope_fileio@v1.2.0"
sh 'git clone https://github0.xmos.com/xmos-int/xtagctl.git'
sh 'git -C xtagctl checkout v3.0.0'
dir(REPO_NAME) {
checkoutScmShallow()
dir("tests") {
createVenv(reqFile: "requirements.txt")
dir("hw_tests") {
withTools(params.TOOLS_VERSION) {
sh "cmake -G 'Unix Makefiles' -B build"
sh "xmake -C build -j 8"
withVenv {
sh "pip install -e ${WORKSPACE}/xtagctl"
withXTAG(["XCORE-AI-EXPLORER"]) { xtagIds ->
sh "python -m doc_asrc.py --adapter-id " + xtagIds[0]
stash name: 'doc_asrc_output', includes: '_build/**'
sh "pytest -n1 --junitxml=pytest_hw.xml"
sh "xrun --xscope --adapter-id ${xtagIds[0]} asynchronous_fifo_asrc_test/bin/asynchronous_fifo_asrc_test.xe"
}
} // withTools
} // withVenv
} // dir("doc/python")
} // dir("${REPO}")
} // steps
post {
cleanup {
xcoreCleanSandbox()
}
} // post
} // stage('SNR plots')
} // withVenv
} // withTools
} // dir("hw_tests")
} // dir("tests")
} // dir (REPO_NAME)
} //steps
post {
always {
junit "${REPO_NAME}/tests/hw_tests/pytest_hw.xml"
}
cleanup {
xcoreCleanSandbox()
}
} // post
} // stage('Hardware tests')

stage('Legacy CMake build') {
stage('SNR plots') {
agent {
label 'xcore.ai && uhubctl'
}
steps {
println "Stage running on ${env.NODE_NAME}"
sh 'git clone https://github0.xmos.com/xmos-int/xtagctl.git'
sh 'git -C xtagctl checkout v3.0.0'
dir(REPO_NAME) {
checkoutScmShallow()
dir("doc/python") {
createVenv(reqFile: "requirements.txt")
withVenv {
sh "pip install -e ${WORKSPACE}/xtagctl"
withTools(params.TOOLS_VERSION) {
sh "pip install git+ssh://git@github.com/xmos/xscope_fileio@v1.3.1"
withXTAG(["XCORE-AI-EXPLORER"]) { xtagIds ->
sh "python -m doc_asrc.py --adapter-id " + xtagIds[0]
stash name: 'doc_asrc_output', includes: '_build/**'
}
} // withTools
} // withVenv
} // dir("doc/python")
} // dir(REPO_NAME)
} // steps
post {
cleanup {
xcoreCleanSandbox()
}
} // post
} // stage('SNR plots')

stage('Legacy CMake build') {
agent {
label 'x86_64 && linux'
}
steps {
println "Stage running on ${env.NODE_NAME}"
dir("${REPO}") {
checkout scm
sh "git clone git@github.com:xmos/xmos_cmake_toolchain.git --branch v1.0.0"
withTools(params.TOOLS_VERSION) {
sh 'cmake -G "Unix Makefiles" -B build_legacy_cmake -DCMAKE_TOOLCHAIN_FILE=xmos_cmake_toolchain/xs3a.cmake'
sh 'xmake -C build_legacy_cmake lib_src'
}
} // dir("${REPO}")
} // steps
post {
cleanup {
xcoreCleanSandbox()
steps {
println "Stage running on ${env.NODE_NAME}"
dir(REPO_NAME) {
checkoutScmShallow()
// Clone "Boston" cmake
sh "git clone git@github.com:xmos/xmos_cmake_toolchain.git --branch v1.0.0"
withTools(params.TOOLS_VERSION) {
sh 'cmake -G "Unix Makefiles" -B build_legacy_cmake -DCMAKE_TOOLCHAIN_FILE=xmos_cmake_toolchain/xs3a.cmake'
sh 'xmake -C build_legacy_cmake lib_src'
}
} // post
} // stage('Legacy CMake build')
} // dir(REPO_NAME)
} // steps
post {
cleanup {
xcoreCleanSandbox()
}
} // post
} // stage('Legacy CMake build')
} // parallel
} // stage ('Build and test')

Expand All @@ -190,8 +199,8 @@ pipeline {
}
steps {
println "Stage running on ${env.NODE_NAME}"
dir("${REPO}") {
checkout scm
dir(REPO_NAME) {
checkoutScmShallow()

dir("doc/python") {
unstash 'doc_asrc_output'
Expand All @@ -208,5 +217,14 @@ pipeline {
}
} // post
} // stage('Build Documentation')

stage('🚀 Release') {
when {
expression { triggerRelease.isReleasable() }
}
steps {
triggerRelease()
}
}
} // stages
} // pipeline
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ lib_src: Sample rate conversion
###############################

:vendor: XMOS
:version: 2.7.0
:version: 2.7.1
:scope: General Use
:description: SSRC/ASRC for xcore
:category: Audio
:keywords: SRC, SSRC, ASRC, DSP
:keywords: SRC, DSP
:devices: xcore.ai, xcore-200

*******
Expand Down
2 changes: 1 addition & 1 deletion doc/python/asrc_utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023-2024 XMOS LIMITED.
# Copyright 2023-2026 XMOS LIMITED.
# This Software is subject to the terms of the XMOS Public Licence: Version 1.
from subprocess import Popen, PIPE
from subprocess import run as srun
Expand Down
2 changes: 1 addition & 1 deletion doc/python/doc_asrc.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2023-2024 XMOS LIMITED.
# Copyright 2023-2026 XMOS LIMITED.
# This Software is subject to the terms of the XMOS Public Licence: Version 1.
from asrc_utils import asrc_util
import numpy as np
Expand Down
2 changes: 1 addition & 1 deletion examples/app_asrc_task/asrc_task/src/asrc_task_config.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 XMOS LIMITED.
// Copyright 2024-2026 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.

#define MAX_ASRC_CHANNELS_TOTAL 8 // Used for buffer sizing and FIFO sizing (static)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 XMOS LIMITED.
// Copyright 2024-2026 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.

#include "asrc_task.h"
Expand Down
2 changes: 1 addition & 1 deletion examples/app_asrc_task/asrc_task/src/asrc_task_test.xc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 XMOS LIMITED.
// Copyright 2024-2026 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
// General includes
#include <stdlib.h>
Expand Down
2 changes: 1 addition & 1 deletion examples/app_asrc_task/src/asrc_task_config.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 XMOS LIMITED.
// Copyright 2024-2026 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.

#define MAX_ASRC_CHANNELS_TOTAL 8 // Used for buffer sizing and FIFO sizing (static)
Expand Down
2 changes: 1 addition & 1 deletion examples/app_asrc_task/src/asrc_task_receive_samples.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 XMOS LIMITED.
// Copyright 2024-2026 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.

#include "asrc_task.h"
Expand Down
2 changes: 1 addition & 1 deletion examples/app_asrc_task/src/asrc_task_test.xc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 XMOS LIMITED.
// Copyright 2024-2026 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
// General includes
#include <stdlib.h>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 XMOS LIMITED.
// Copyright 2024-2026 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.

#include <xcore/parallel.h>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 XMOS LIMITED.
// Copyright 2024-2026 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.

#include <xcore/parallel.h>
Expand Down
2 changes: 1 addition & 1 deletion lib_src/api/asrc_timestamp_interpolation.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2024 XMOS LIMITED.
// Copyright 2024-2026 XMOS LIMITED.
// This Software is subject to the terms of the XMOS Public Licence: Version 1.

#ifndef _asrc_timestamp_interpolation_h_
Expand Down
Loading