Skip to content
Merged
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 @@ -53,3 +53,4 @@ build.xcore
lib_mic_array.egg-info
examples/app_mic_array_basic/output.wav
examples/app_mic_array_basic/mic_array_output.bin
tests/src/audio-test-tools
32 changes: 26 additions & 6 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -225,31 +225,51 @@ pipeline {
dir(REPO_NAME){
checkoutScmShallow()
dir("tests") {
withTools(params.TOOLS_VX4_VERSION){
createVenv(reqFile: "requirements.txt")
withVenv {
dir("unit") {
xcoreBuild(toolsVersion: params.TOOLS_VX4_VERSION)
xcoreBuild(
toolsVersion: params.TOOLS_VX4_VERSION,
cmakeOpts: '-DAPP_HW_TARGET=XK-EVK-XU416',
jobs:8
)
}
dir ("signal/BasicMicArray") {
withTools(params.TOOLS_VX4_VERSION){
xcoreBuild(toolsVersion: params.TOOLS_VX4_VERSION, jobs:8)
}
xcoreBuild(
toolsVersion: params.TOOLS_VX4_VERSION,
cmakeOpts: '-DAPP_HW_TARGET=XK-EVK-XU416',
jobs:8
)
}
dir ("signal/profile/app_mips") {
xcoreBuild(
toolsVersion: params.TOOLS_VX4_VERSION,
cmakeOpts: '-DAPP_HW_TARGET=XK-EVK-XU416',
jobs:8
)
}
} // withVenv
} // withTools
} // dir("tests")
} // dir(REPO_NAME)
} // steps
} // stage("Checkout and Build")
stage('Run tests') {
steps {
dir("${REPO_NAME}/tests") {
withTools(params.TOOLS_VX4_VERSION) {
withVenv {
dir("unit") {
withTools(params.TOOLS_VX4_VERSION) {sh "xrun --xscope bin/tests-unit.xe"}
sh "xrun --xscope bin/tests-unit.xe"
}
dir("signal/BasicMicArray") {
withTools(params.TOOLS_VX4_VERSION) {sh 'python -m pytest --level nightly --seed 12345 -k "0isr or OneStageFilter" -v'}
sh 'pytest --level nightly --seed 12345 -k "0isr or OneStageFilter" -v'
}
dir ("signal/profile") {
sh 'pytest test_measure_mips.py --APP_HW_TARGET=XK-EVK-XU416 -v'
}
} // with tools
} // withVenv
}}} // stage('Run tests')
} // stages
Expand Down
1 change: 0 additions & 1 deletion examples/CMakeLists.txt
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

app_mic_array_basic only vx4 (experimental so excluding it here)

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ cmake_minimum_required(VERSION 3.21)
include($ENV{XMOS_CMAKE_PATH}/xcommon.cmake)
project(mic_array_examples)
add_subdirectory(app_mic_array)
add_subdirectory(app_mic_array_basic)
add_subdirectory(app_shutdown)
add_subdirectory(app_par_decimator)
add_subdirectory(app_custom_filter)
22 changes: 3 additions & 19 deletions examples/app_mic_array_basic/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,9 @@ project(app_mic_array)

set(XMOS_SANDBOX_DIR ${CMAKE_CURRENT_LIST_DIR}/../../..)

# conditional depending on target
set(APP_C_SRCS src/app.c)

if(CMAKE_C_COMPILER_VERSION VERSION_EQUAL "3.6.0")
set(APP_HW_TARGET xs3/XK-EVK-XU316-AIV.xn)
set(APP_INCLUDES src xs3)
list(APPEND APP_C_SRCS
xs3/device_pll_ctrl.c
)
list(APPEND APP_XC_SRCS
xs3/mapfile.xc
)
else()
set(APP_HW_TARGET XK-EVK-XU416)
set(APP_INCLUDES src vx4)
list(APPEND APP_C_SRCS
vx4/device_pll_ctrl.c
vx4/mapfile.c
)
# targets (IF NOT DEFINED OR NOT SUPPORTED)
if(NOT DEFINED APP_HW_TARGET OR NOT APP_HW_TARGET STREQUAL "XK-EVK-XU416")
message(FATAL_ERROR "This application is only supported for XK-EVK-XU416. Please re-run cmake with -DAPP_HW_TARGET=XK-EVK-XU416.")
endif()

set(APP_DEPENDENT_MODULES "lib_mic_array")
Expand Down
30 changes: 0 additions & 30 deletions examples/app_mic_array_basic/README.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ void device_pll_init(void)

// print reg values
printf("PLL Configuration:\n");
printf("PLL DISABLE: 0x%08lX\n", DEVICE_PLL_DISABLE);
printf("PLL MUX VAL: 0x%08lX\n", DEVICE_PLL_MUX_VAL);
printf("PLL CTL VAL: 0x%08lX\n", DEVICE_PLL_CTL_VAL);
printf("PLL DIV VAL: 0x%08lX\n", DEVICE_PLL_DIV_0);
printf("PLL FRAC_NOM: 0x%08lX\n", DEVICE_PLL_FRAC_NOM);
printf("PLL DISABLE: 0x%08X\n", DEVICE_PLL_DISABLE);
printf("PLL MUX VAL: 0x%08X\n", DEVICE_PLL_MUX_VAL);
printf("PLL CTL VAL: 0x%08X\n", DEVICE_PLL_CTL_VAL);
printf("PLL DIV VAL: 0x%08X\n", DEVICE_PLL_DIV_0);
printf("PLL FRAC_NOM: 0x%08X\n", DEVICE_PLL_FRAC_NOM);

// CONFIGURE
sswitch_reg_try_write(tileid, VX_SSB_CSR_PLL1_CTRL_NUM, DEVICE_PLL_DISABLE); // disable PLL before configuration
Expand Down
66 changes: 0 additions & 66 deletions examples/app_mic_array_basic/xs3/XK-EVK-XU316-AIV.xn

This file was deleted.

35 changes: 0 additions & 35 deletions examples/app_mic_array_basic/xs3/device_pll_ctrl.c

This file was deleted.

25 changes: 0 additions & 25 deletions examples/app_mic_array_basic/xs3/mapfile.xc

This file was deleted.

47 changes: 25 additions & 22 deletions tests/signal/BasicMicArray/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,29 @@ set(XMOS_SANDBOX_DIR ${CMAKE_CURRENT_LIST_DIR}/../../../..)

set(APP_DEPENDENT_MODULES "lib_mic_array")

# conditional depending on target
if(CMAKE_C_COMPILER_VERSION VERSION_EQUAL "3.6.0") # XS3 (XTC 15.3.1)
set(APP_HW_TARGET XK-EVK-XU316)
set(COMMON_COMPILER_FLAGS -O2
-g
-report
-mcmodel=large
-Wno-xcore-fptrgroup
-Wno-unknown-pragmas
-Wno-format)

else() # VX4
set(APP_HW_TARGET XK-EVK-XU416)
set(COMMON_COMPILER_FLAGS -Os
-g
-lxc
-Wno-fptrgroup
-Wno-format)
# Target configuration
if(NOT DEFINED APP_HW_TARGET OR APP_HW_TARGET STREQUAL "XK-EVK-XU316")
set(APP_HW_TARGET XK-EVK-XU316)
set(ARCH_COMPILER_FLAGS -O2
-g
-report
-mcmodel=large
-Wno-xcore-fptrgroup
-Wno-unknown-pragmas
-Wno-format)
else()
if(APP_HW_TARGET STREQUAL "XK-EVK-XU416")
set(ARCH_COMPILER_FLAGS -Os
-g
-lxc
-Wno-fptrgroup
-Wno-format)
else()
message(FATAL_ERROR "Unsupported target ${APP_HW_TARGET}.")
endif()
endif()

# Params
set_property(DIRECTORY "${CMAKE_CURRENT_LIST_DIR}" PROPERTY CMAKE_CONFIGURE_DEPENDS
"${CMAKE_CURRENT_LIST_DIR}/test_params.json")

Expand Down Expand Up @@ -54,7 +57,7 @@ math(EXPR NUM_SAMP_FREQ "${NUM_SAMP_FREQ} - 1")
math(EXPR NUM_ONE_MIC_OVERRIDE "${NUM_ONE_MIC_OVERRIDE} - 1")

# Remove ISR if vx4 as it's not supported
if (APP_HW_TARGET STREQUAL "XK-EVK-XU416")
if(APP_HW_TARGET STREQUAL "XK-EVK-XU416")
set(USE_ISR_LIST "[0]")
set(NUM_USE_ISR 0)
endif()
Expand Down Expand Up @@ -113,7 +116,7 @@ foreach(l RANGE 0 ${NUM_SAMP_FREQ})
set(CONFIG "${N_MICS}ch_${FRAME_SIZE}smp_${USE_ISR}isr_${USE_1MIC_OVERRIDE}mo_${samp_freq_str}")

message(${CONFIG})
set(APP_COMPILER_FLAGS_${CONFIG} ${COMMON_COMPILER_FLAGS}
set(APP_COMPILER_FLAGS_${CONFIG} ${ARCH_COMPILER_FLAGS}
-DMIC_ARRAY_CONFIG_USE_PDM_ISR=${USE_ISR}
-DMIC_ARRAY_CONFIG_SAMPLES_PER_FRAME=${FRAME_SIZE}
-DMIC_ARRAY_CONFIG_MIC_COUNT=${N_MICS}
Expand All @@ -131,7 +134,7 @@ endforeach()

set(APP_INCLUDES src ${AUTOGEN_OUT_DIR})
# One stage filter (small_768k_to_12k_filter.h) + 1-mic override
set(APP_COMPILER_FLAGS_1stg_filter_1mic_override ${COMMON_COMPILER_FLAGS}
set(APP_COMPILER_FLAGS_1stg_filter_1mic_override ${ARCH_COMPILER_FLAGS}
-DMIC_ARRAY_CONFIG_USE_PDM_ISR=0
-DMIC_ARRAY_CONFIG_SAMPLES_PER_FRAME=2
-DMIC_ARRAY_CONFIG_MIC_COUNT=2 # Set to something other than 1 to test 1-mic overriding
Expand All @@ -142,7 +145,7 @@ set(APP_COMPILER_FLAGS_1stg_filter_1mic_override ${COMMON_COMPILER_FLAGS}
)

# One stage filter (small_768k_to_12k_filter.h)
set(APP_COMPILER_FLAGS_1stg_filter ${COMMON_COMPILER_FLAGS}
set(APP_COMPILER_FLAGS_1stg_filter ${ARCH_COMPILER_FLAGS}
-DMIC_ARRAY_CONFIG_USE_PDM_ISR=0
-DMIC_ARRAY_CONFIG_SAMPLES_PER_FRAME=2
-DMIC_ARRAY_CONFIG_MIC_COUNT=2 # Set to something other than 1 to test 1-mic overriding
Expand Down
13 changes: 9 additions & 4 deletions tests/signal/pdmrx_isr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@ set(APP_COMPILER_FLAGS -Os
-DMIC_ARRAY_CONFIG_USE_PDM_ISR=1
)

if(CMAKE_C_COMPILER_VERSION VERSION_EQUAL "3.6.0") # XS3 (XTC 15.3.1)
set(APP_HW_TARGET XK-EVK-XU316)
else() # VX4
set(APP_HW_TARGET XK-EVK-XU416)
# Default target
if(NOT DEFINED APP_HW_TARGET)
set(APP_HW_TARGET XK-EVK-XU316)
endif()

# Supported targets
set(SUPPORTED_TARGETS "XK-EVK-XU316;XK-EVK-XU416")
if(NOT APP_HW_TARGET IN_LIST SUPPORTED_TARGETS)
message(FATAL_ERROR "Unsupported target ${APP_HW_TARGET}. Supported: ${SUPPORTED_TARGETS}")
endif()

XMOS_REGISTER_APP()
4 changes: 4 additions & 0 deletions tests/signal/profile/app_memory/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ set(XMOS_SANDBOX_DIR ${CMAKE_CURRENT_LIST_DIR}/../../../../..)

set(APP_DEPENDENT_MODULES "lib_mic_array")

if(APP_HW_TARGET STREQUAL "XK-EVK-XU416")
message(FATAL_ERROR "Unsupported target ${APP_HW_TARGET}. This test is only supported on XK-VOICE-L71.xn.")
endif()

set(APP_HW_TARGET XK-VOICE-L71.xn)

set(NAME_MAP custom;default)
Expand Down
Loading