Skip to content

Commit

Permalink
CMSIS-DSP: Tuning of link scripts to be able to run bigger tests on I…
Browse files Browse the repository at this point in the history
…PSS.
  • Loading branch information
christophe0606 committed Feb 9, 2021
1 parent 0cf8799 commit 68997f9
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 195 deletions.
17 changes: 11 additions & 6 deletions CMSIS/DSP/Platforms/FVP/ARMCM0/LinkScripts/AC6/lnk.sct
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,27 @@

LOAD_REGION 0x0
{
CODE +0 0x0007ffff
/*

Not enough memory in the model so the read only tables are kept here.

*/
CODE +0 0x100000
{
*.o (RESET, +First)
* (InRoot$$$Sections)
* (+RO-CODE)
* (+RO-CODE)
* (+RO-DATA)
}

DATA 0x20000000 0x60000
DATA 0x20000000 0x10000
{
* (+RO-DATA)
* (+RW,+ZI)
}

ARM_LIB_STACK 0x20062000 ALIGN 64 EMPTY -0x00002000
ARM_LIB_STACK 0x20012000 ALIGN 64 EMPTY -0x00002000
{}
ARM_LIB_HEAP 0x20062000 ALIGN 64 EMPTY 0x0050000
ARM_LIB_HEAP 0x20012000 ALIGN 64 EMPTY 0x00ed000
{}


Expand Down
169 changes: 0 additions & 169 deletions CMSIS/DSP/Platforms/FVP/ARMCM33/ARMCM33_DSP_FP_config.txt

This file was deleted.

12 changes: 6 additions & 6 deletions CMSIS/DSP/Platforms/FVP/ARMCM33/LinkScripts/AC6/lnk.sct
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,23 @@

LOAD_REGION 0x0
{
CODE +0 0x80000
CODE +0 0x00ffffff
{
*.o (RESET, +First)
* (InRoot$$$Sections)
* (+RO-CODE)
* (+RO-CODE)
* (+RO-DATA)
}


DATA 0x20000000 NOCOMPRESS 0x60000
DATA 0x20000000 0x10000
{
* (+RO-DATA)
* (+RW,+ZI)
}

ARM_LIB_STACK 0x20062000 ALIGN 64 EMPTY -0x00002000
ARM_LIB_STACK 0x20012000 ALIGN 64 EMPTY -0x00002000
{}
ARM_LIB_HEAP 0x20062000 ALIGN 64 EMPTY 0x00050000
ARM_LIB_HEAP 0x20012000 ALIGN 64 EMPTY 0x00050000
{}


Expand Down
7 changes: 4 additions & 3 deletions CMSIS/DSP/Platforms/FVP/ARMCM4/LinkScripts/AC6/lnk.sct
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,17 @@

LOAD_REGION 0x0
{
CODE +0 0x0007ffff
CODE +0 0xFF000
{
*.o (RESET, +First)
* (InRoot$$$Sections)
* (+RO-CODE)
* (+RO-CODE)
* (+RO-DATA)
}

DATA 0x20000000 0x60000
{
* (+RO-DATA)

* (+RW,+ZI)
}

Expand Down
18 changes: 9 additions & 9 deletions CMSIS/DSP/Source/fft.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function(fft PROJECT)

if (CONFIGTABLE AND CFFT_F32_16)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_TWIDDLECOEF_F32_16)
if (HELIUM OR MVEF AND (NOT GCC))
if (HELIUM OR MVEF)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_BITREVIDX_FXT_16)
else()
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_BITREVIDX_FLT_16)
Expand All @@ -16,7 +16,7 @@ endif()

if (CONFIGTABLE AND CFFT_F32_32)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_TWIDDLECOEF_F32_32)
if (HELIUM OR MVEF AND (NOT GCC))
if (HELIUM OR MVEF)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_BITREVIDX_FXT_32)
else()
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_BITREVIDX_FLT_32)
Expand All @@ -25,7 +25,7 @@ endif()

if (CONFIGTABLE AND CFFT_F32_64)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_TWIDDLECOEF_F32_64)
if (HELIUM OR MVEF AND (NOT GCC))
if (HELIUM OR MVEF)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_BITREVIDX_FXT_64)
else()
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_BITREVIDX_FLT_64)
Expand All @@ -34,7 +34,7 @@ endif()

if (CONFIGTABLE AND CFFT_F32_128)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_TWIDDLECOEF_F32_128)
if (HELIUM OR MVEF AND (NOT GCC))
if (HELIUM OR MVEF)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_BITREVIDX_FXT_128)
else()
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_BITREVIDX_FLT_128)
Expand All @@ -43,7 +43,7 @@ endif()

if (CONFIGTABLE AND CFFT_F32_256)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_TWIDDLECOEF_F32_256)
if (HELIUM OR MVEF AND (NOT GCC))
if (HELIUM OR MVEF)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_BITREVIDX_FXT_256)
else()
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_BITREVIDX_FLT_256)
Expand All @@ -52,7 +52,7 @@ endif()

if (CONFIGTABLE AND CFFT_F32_512)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_TWIDDLECOEF_F32_512)
if (HELIUM OR MVEF AND (NOT GCC))
if (HELIUM OR MVEF)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_BITREVIDX_FXT_512)
else()
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_BITREVIDX_FLT_512)
Expand All @@ -61,7 +61,7 @@ endif()

if (CONFIGTABLE AND CFFT_F32_1024)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_TWIDDLECOEF_F32_1024)
if (HELIUM OR MVEF AND (NOT GCC))
if (HELIUM OR MVEF)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_BITREVIDX_FXT_1024)
else()
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_BITREVIDX_FLT_1024)
Expand All @@ -70,7 +70,7 @@ endif()

if (CONFIGTABLE AND CFFT_F32_2048)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_TWIDDLECOEF_F32_2048)
if (HELIUM OR MVEF AND (NOT GCC))
if (HELIUM OR MVEF)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_BITREVIDX_FXT_2048)
else()
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_BITREVIDX_FLT_2048)
Expand All @@ -79,7 +79,7 @@ endif()

if (CONFIGTABLE AND CFFT_F32_4096)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_TWIDDLECOEF_F32_4096)
if (HELIUM OR MVEF AND (NOT GCC))
if (HELIUM OR MVEF)
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_BITREVIDX_FXT_4096)
else()
target_compile_definitions(${PROJECT} PUBLIC ARM_TABLE_BITREVIDX_FLT_4096)
Expand Down
2 changes: 2 additions & 0 deletions CMSIS/DSP/Testing/Include/Tests/UnaryTestsF32.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,6 @@ class UnaryTestsF32:public Client::Suite
float64_t *outa;
float64_t *outb;

float32_t snrRel,snrAbs;

};
15 changes: 13 additions & 2 deletions CMSIS/DSP/Testing/Source/Tests/UnaryTestsF32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Comparisons for inverse
/* Not very accurate for big matrix.
But big matrix needed for checking the vectorized code */

#define SNR_THRESHOLD_INV 70
#define SNR_THRESHOLD_INV 67
#define REL_ERROR_INV (1.0e-3)
#define ABS_ERROR_INV (1.0e-3)

Expand All @@ -40,6 +40,9 @@ Comparison for Cholesky
#define REL_ERROR_LDLT (1e-5)
#define ABS_ERROR_LDLT (1e-5)

#define REL_ERROR_LDLT_SPDO (1e-5)
#define ABS_ERROR_LDLT_SDPO (2e-1)

/* Upper bound of maximum matrix dimension used by Python */
#define MAXMATRIXDIM 40

Expand Down Expand Up @@ -631,7 +634,7 @@ void UnaryTestsF32::test_mat_inverse_f32()
ASSERT_EMPTY_TAIL(outputb);


ASSERT_CLOSE_ERROR(outputa,outputb,ABS_ERROR_LDLT,REL_ERROR_LDLT);
ASSERT_CLOSE_ERROR(outputa,outputb,snrAbs,snrRel);



Expand Down Expand Up @@ -728,6 +731,8 @@ void UnaryTestsF32::test_mat_inverse_f32()

output.create(ref.nbSamples(),UnaryTestsF32::OUT_F32_ID,mgr);
a.create(MAXMATRIXDIM*MAXMATRIXDIM,UnaryTestsF32::TMPA_F32_ID,mgr);


break;

case TEST_SOLVE_UPPER_TRIANGULAR_F32_9:
Expand Down Expand Up @@ -772,6 +777,9 @@ void UnaryTestsF32::test_mat_inverse_f32()
tmpbpat.create(MAXMATRIXDIM*MAXMATRIXDIM,UnaryTestsF32::TMPC_F64_ID,mgr);
tmpcpat.create(MAXMATRIXDIM*MAXMATRIXDIM,UnaryTestsF32::TMPD_F64_ID,mgr);

this->snrRel=REL_ERROR_LDLT;
this->snrAbs=ABS_ERROR_LDLT;

break;

case TEST_MAT_LDL_F32_12:
Expand All @@ -792,6 +800,9 @@ void UnaryTestsF32::test_mat_inverse_f32()
tmpbpat.create(MAXMATRIXDIM*MAXMATRIXDIM,UnaryTestsF32::TMPC_F64_ID,mgr);
tmpcpat.create(MAXMATRIXDIM*MAXMATRIXDIM,UnaryTestsF32::TMPD_F64_ID,mgr);

this->snrRel=REL_ERROR_LDLT_SPDO;
this->snrAbs=ABS_ERROR_LDLT_SDPO;


break;

Expand Down

0 comments on commit 68997f9

Please sign in to comment.