CMSIS-DSP: DSP_Lib_TestSuite can be built with cmake.
DSP_Lib_TestSuite can be built with cmake and run on FVP. Some issues with CMSIS-DSP cmake where discovered and corrected. Comments added to arm_biqaud_cascade_df2T+f32 since the Neon version must be initialized differently (and thus the corresponding test in DSP_Lib_TestSuite will have to be updated to pass with Neon version).pull/19/head
parent
c0f96fe5d8
commit
bf1f324a6d
@ -0,0 +1,86 @@
|
||||
cmake_minimum_required (VERSION 3.6)
|
||||
cmake_policy(SET CMP0077 NEW)
|
||||
# The tests are assuming that MATRIX_CHECK is enabled when building
|
||||
# CMSIS-DSP.
|
||||
set(MATRIXCHECK ON)
|
||||
set(FASTMATHCOMPUTATIONS OFF)
|
||||
option(DUMPPATTERN "Dump test patterns when test is failing" ON)
|
||||
project(DSP_Lib_TestSuite)
|
||||
|
||||
# Needed to find the config modules
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/..)
|
||||
|
||||
|
||||
set(ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../../..)
|
||||
|
||||
|
||||
file(GLOB MAIN "Common/src/*.c")
|
||||
file(GLOB BASICMATH_TESTS "Common/src/basic_math_tests/*.c")
|
||||
file(GLOB COMPLEXMATH_TESTS "Common/src/complex_math_tests/*.c")
|
||||
file(GLOB CONTROLLER_TESTS "Common/src/controller_tests/*.c")
|
||||
file(GLOB FASTMATH_TESTS "Common/src/fast_math_tests/*.c")
|
||||
file(GLOB FILTERING_TESTS "Common/src/filtering_tests/*.c")
|
||||
file(GLOB INTRINSINCS_TESTS "Common/src/intrinsics_tests/*.c")
|
||||
file(GLOB MATRIX_TESTS "Common/src/matrix_tests/*.c")
|
||||
file(GLOB STATISTICS_TESTS "Common/src/statistics_tests/*.c")
|
||||
file(GLOB SUPPORT_TESTS "Common/src/support_tests/*.c")
|
||||
file(GLOB TRANSFORM_TESTS "Common/src/transform_tests/*.c")
|
||||
file(GLOB JTEST_MAIN "Common/JTest/src/*.c")
|
||||
|
||||
set(TESTSRC ${MAIN}
|
||||
${BASICMATH_TESTS}
|
||||
${COMPLEXMATH_TESTS}
|
||||
${CONTROLLER_TESTS}
|
||||
${FASTMATH_TESTS}
|
||||
${FILTERING_TESTS}
|
||||
${INTRINSINCS_TESTS}
|
||||
${MATRIX_TESTS}
|
||||
${STATISTICS_TESTS}
|
||||
${SUPPORT_TESTS}
|
||||
${TRANSFORM_TESTS}
|
||||
${JTEST_MAIN}
|
||||
)
|
||||
|
||||
set(JINCS
|
||||
Common/JTest/inc
|
||||
Common/JTest/inc/arr_desc
|
||||
Common/inc/basic_math_tests
|
||||
Common/inc/complex_math_tests
|
||||
Common/inc/controller_tests
|
||||
Common/inc/fast_math_tests
|
||||
Common/inc/filtering_tests
|
||||
Common/inc/intrinsics_tests
|
||||
Common/inc/matrix_tests
|
||||
Common/inc/statistics_tests
|
||||
Common/inc/support_tests
|
||||
Common/inc/transform_tests
|
||||
)
|
||||
|
||||
add_subdirectory(../Source bin_dsp)
|
||||
add_subdirectory(RefLibs bin_ref)
|
||||
|
||||
|
||||
add_executable(DSP_Lib_TestSuite)
|
||||
|
||||
if (DUMPPATTERN)
|
||||
target_compile_definitions(DSP_Lib_TestSuite PRIVATE DUMPPATTERN)
|
||||
endif()
|
||||
|
||||
# Change behavior of configBoot for scatter file
|
||||
set(TESTFRAMEWORK ON)
|
||||
|
||||
include(configBoot)
|
||||
|
||||
file(COPY ${ROOT}/CMSIS/DSP/Examples/ARM/boot/RTE_Components.h DESTINATION tempLink)
|
||||
|
||||
target_link_libraries(DSP_Lib_TestSuite PRIVATE CMSISDSP)
|
||||
target_link_libraries(DSP_Lib_TestSuite PRIVATE DspRefLibs)
|
||||
|
||||
target_sources(DSP_Lib_TestSuite PRIVATE ${TESTSRC})
|
||||
|
||||
### Includes
|
||||
target_include_directories(DSP_Lib_TestSuite PRIVATE "Common/inc")
|
||||
target_include_directories(DSP_Lib_TestSuite PRIVATE "Common/inc/templates")
|
||||
target_include_directories(DSP_Lib_TestSuite PRIVATE ${JINCS})
|
||||
|
||||
|
||||
@ -0,0 +1,78 @@
|
||||
cmake_minimum_required (VERSION 3.6)
|
||||
|
||||
project(DspRefLibs)
|
||||
|
||||
# Needed to find the config modules
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../..)
|
||||
|
||||
|
||||
|
||||
|
||||
set(REFSRC src/BasicMathFunctions/abs.c
|
||||
src/BasicMathFunctions/add.c
|
||||
src/BasicMathFunctions/dot_prod.c
|
||||
src/BasicMathFunctions/mult.c
|
||||
src/BasicMathFunctions/negate.c
|
||||
src/BasicMathFunctions/offset.c
|
||||
src/BasicMathFunctions/scale.c
|
||||
src/BasicMathFunctions/shift.c
|
||||
src/BasicMathFunctions/sub.c
|
||||
src/ComplexMathFunctions/cmplx_conj.c
|
||||
src/ComplexMathFunctions/cmplx_dot_prod.c
|
||||
src/ComplexMathFunctions/cmplx_mag.c
|
||||
src/ComplexMathFunctions/cmplx_mag_squared.c
|
||||
src/ComplexMathFunctions/cmplx_mult_cmplx.c
|
||||
src/ComplexMathFunctions/cmplx_mult_real.c
|
||||
src/ControllerFunctions/pid.c
|
||||
src/ControllerFunctions/sin_cos.c
|
||||
src/FastMathFunctions/cos.c
|
||||
src/FastMathFunctions/sin.c
|
||||
src/FastMathFunctions/sqrt.c
|
||||
src/FilteringFunctions/biquad.c
|
||||
src/FilteringFunctions/conv.c
|
||||
src/FilteringFunctions/correlate.c
|
||||
src/FilteringFunctions/fir.c
|
||||
src/FilteringFunctions/fir_decimate.c
|
||||
src/FilteringFunctions/fir_interpolate.c
|
||||
src/FilteringFunctions/fir_lattice.c
|
||||
src/FilteringFunctions/fir_sparse.c
|
||||
src/FilteringFunctions/iir_lattice.c
|
||||
src/FilteringFunctions/lms.c
|
||||
src/HelperFunctions/mat_helper.c
|
||||
src/HelperFunctions/ref_helper.c
|
||||
src/Intrinsics/intrinsics.c
|
||||
src/MatrixFunctions/mat_add.c
|
||||
src/MatrixFunctions/mat_cmplx_mult.c
|
||||
src/MatrixFunctions/mat_inverse.c
|
||||
src/MatrixFunctions/mat_mult.c
|
||||
src/MatrixFunctions/mat_scale.c
|
||||
src/MatrixFunctions/mat_sub.c
|
||||
src/MatrixFunctions/mat_trans.c
|
||||
src/StatisticsFunctions/max.c
|
||||
src/StatisticsFunctions/mean.c
|
||||
src/StatisticsFunctions/min.c
|
||||
src/StatisticsFunctions/power.c
|
||||
src/StatisticsFunctions/rms.c
|
||||
src/StatisticsFunctions/std.c
|
||||
src/StatisticsFunctions/var.c
|
||||
src/SupportFunctions/copy.c
|
||||
src/SupportFunctions/fill.c
|
||||
src/SupportFunctions/fixed_to_fixed.c
|
||||
src/SupportFunctions/fixed_to_float.c
|
||||
src/SupportFunctions/float_to_fixed.c
|
||||
src/TransformFunctions/bitreversal.c
|
||||
src/TransformFunctions/cfft.c
|
||||
src/TransformFunctions/dct4.c
|
||||
src/TransformFunctions/rfft.c
|
||||
)
|
||||
|
||||
add_library(DspRefLibs STATIC ${REFSRC})
|
||||
|
||||
include(config)
|
||||
configdsp(DspRefLibs ../../Source)
|
||||
|
||||
### Includes
|
||||
target_include_directories(DspRefLibs PUBLIC "inc")
|
||||
target_include_directories(DspRefLibs PUBLIC "../../Include")
|
||||
|
||||
|
||||
Loading…
Reference in New Issue