diff --git a/Platforms/IPSS/ARMCM0/LinkScripts/AC6/lnk.sct b/Platforms/IPSS/ARMCM0/LinkScripts/AC6/lnk.sct index ed2acaf7..5666c6c2 100755 --- a/Platforms/IPSS/ARMCM0/LinkScripts/AC6/lnk.sct +++ b/Platforms/IPSS/ARMCM0/LinkScripts/AC6/lnk.sct @@ -13,18 +13,19 @@ LOAD_REGION 0x0 { *.o (RESET, +First) * (InRoot$$$Sections) - * (+RO-CODE) + * (+RO) } - DATA 0x20000000 0x7000 + DATA 0x20000000 0x60000 { - * (+RO-DATA) * (+RW,+ZI) } - ARM_LIB_STACK 0x2000C000 ALIGN 64 EMPTY -0x00002000 + ARM_LIB_STACK 0x20062000 ALIGN 64 EMPTY -0x00002000 {} - ARM_LIB_HEAP 0x2000C000 ALIGN 64 EMPTY 0x0050000 + ARM_LIB_HEAP 0x20062000 ALIGN 64 EMPTY 0x0050000 {} + + } diff --git a/Platforms/IPSS/ARMCM33/LinkScripts/AC6/lnk.sct b/Platforms/IPSS/ARMCM33/LinkScripts/AC6/lnk.sct index 907ce1de..584b4952 100755 --- a/Platforms/IPSS/ARMCM33/LinkScripts/AC6/lnk.sct +++ b/Platforms/IPSS/ARMCM33/LinkScripts/AC6/lnk.sct @@ -12,21 +12,23 @@ LOAD_REGION 0x0 { - CODE +0 0x30000 + CODE +0 0x80000 { *.o (RESET, +First) * (InRoot$$$Sections) - * (+RO-CODE) + * (+RO) } - DATA 0x20000000 0x7000 + + DATA 0x20000000 NOCOMPRESS 0x60000 { - * (+RO-DATA) * (+RW,+ZI) } - ARM_LIB_STACK 0x2000C000 ALIGN 64 EMPTY -0x00002000 + ARM_LIB_STACK 0x20062000 ALIGN 64 EMPTY -0x00002000 {} - ARM_LIB_HEAP 0x2000C000 ALIGN 64 EMPTY 0x00050000 + ARM_LIB_HEAP 0x20062000 ALIGN 64 EMPTY 0x00050000 {} + + } diff --git a/Platforms/IPSS/ARMCM4/LinkScripts/AC6/lnk.sct b/Platforms/IPSS/ARMCM4/LinkScripts/AC6/lnk.sct index 7f26d631..b71ccabf 100755 --- a/Platforms/IPSS/ARMCM4/LinkScripts/AC6/lnk.sct +++ b/Platforms/IPSS/ARMCM4/LinkScripts/AC6/lnk.sct @@ -25,5 +25,10 @@ LOAD_REGION 0x0 {} ARM_LIB_HEAP 0x20006000 ALIGN 64 EMPTY 0x0050000 {} + + PATTERNS 0x60000000 0x80000 + { + patterndata.c.o (+RO-DATA) + } } diff --git a/Platforms/IPSS/ARMCM7/LinkScripts/AC6/lnk.sct b/Platforms/IPSS/ARMCM7/LinkScripts/AC6/lnk.sct index 6e24b770..f04e1357 100755 --- a/Platforms/IPSS/ARMCM7/LinkScripts/AC6/lnk.sct +++ b/Platforms/IPSS/ARMCM7/LinkScripts/AC6/lnk.sct @@ -9,16 +9,15 @@ LOAD_REGION 0x0 { - CODE +0 0x30000 + CODE +0 0x100000 { *.o (RESET, +First) * (InRoot$$$Sections) - * (+RO-CODE) + * (+RO) } - DATA 0x20000000 0xF0000 + DATA 0x20000000 NOCOMPRESS 0xF0000 { - * (+RO-DATA) * (+RW,+ZI) } @@ -26,6 +25,11 @@ LOAD_REGION 0x0 {} ARM_LIB_HEAP 0x20100000 ALIGN 64 EMPTY 0x00100000 {} + + PATTERNS 0x60000000 0x100000 + { + patterndata.c.o (+RO-DATA) + } } diff --git a/Platforms/IPSS/ARMv81MML/LinkScripts/AC6/lnk.sct b/Platforms/IPSS/ARMv81MML/LinkScripts/AC6/lnk.sct index eb56715e..4665df0d 100755 --- a/Platforms/IPSS/ARMv81MML/LinkScripts/AC6/lnk.sct +++ b/Platforms/IPSS/ARMv81MML/LinkScripts/AC6/lnk.sct @@ -9,16 +9,15 @@ LOAD_REGION 0x0 { - CODE +0 0x30000 + CODE +0 0x100000 { *.o (RESET, +First) - * (InRoot$$$Sections) - * (+RO-CODE) + * (InRoot$$$Sections) + * (+RO) } - DATA 0x20000000 0xF0000 + DATA 0x20000000 NOCOMPRESS 0xF0000 { - * (+RO-DATA) * (+RW,+ZI) } @@ -26,4 +25,9 @@ LOAD_REGION 0x0 {} ARM_LIB_HEAP 0x20100000 ALIGN 64 EMPTY 0x00100000 {} + + PATTERNS 0x60000000 0x100000 + { + patterndata.c.o (+RO-DATA) + } } diff --git a/Testing/CMakeLists.txt b/Testing/CMakeLists.txt index 0a8e236d..d132de86 100644 --- a/Testing/CMakeLists.txt +++ b/Testing/CMakeLists.txt @@ -330,6 +330,10 @@ set_platform_core() core_includes(FrameworkLib) add_executable(Testing main.cpp) +# To see the file in the scatter load, it must not because +# linked in a .a archive +target_include_directories(Testing PRIVATE GeneratedInclude) +target_sources(Testing PRIVATE patterndata.c) # With -O2, generated code is crashing on some cycle accurate models. # (cpp part) diff --git a/Testing/Include/Benchmarks/TransformF32.h b/Testing/Include/Benchmarks/TransformF32.h index d3478c9b..7df040ed 100755 --- a/Testing/Include/Benchmarks/TransformF32.h +++ b/Testing/Include/Benchmarks/TransformF32.h @@ -21,9 +21,11 @@ class TransformF32:public Client::Suite float32_t *pDst; float32_t *pState; - const arm_cfft_instance_f32 *cfftInstance; + arm_cfft_instance_f32 cfftInstance; arm_rfft_fast_instance_f32 rfftFastInstance; + arm_status status; + arm_dct4_instance_f32 dct4Instance; arm_rfft_instance_f32 rfftInstance; arm_cfft_radix4_instance_f32 cfftRadix4Instance; diff --git a/Testing/Source/Benchmarks/TransformF32.cpp b/Testing/Source/Benchmarks/TransformF32.cpp index d742ae8d..58759c19 100755 --- a/Testing/Source/Benchmarks/TransformF32.cpp +++ b/Testing/Source/Benchmarks/TransformF32.cpp @@ -3,34 +3,10 @@ #include "arm_math.h" #include "arm_const_structs.h" -const arm_cfft_instance_f32 *arm_cfft_get_instance_f32(uint16_t fftLen) -{ -switch (fftLen) { - case 16: - return(&arm_cfft_sR_f32_len16); - case 32: - return(&arm_cfft_sR_f32_len32); - case 64: - return(&arm_cfft_sR_f32_len64); - case 128: - return(&arm_cfft_sR_f32_len128); - case 256: - return(&arm_cfft_sR_f32_len256); - case 512: - return(&arm_cfft_sR_f32_len512); - case 1024: - return(&arm_cfft_sR_f32_len1024); - case 2048: - return(&arm_cfft_sR_f32_len2048); - case 4096: - return(&arm_cfft_sR_f32_len4096); - } - return(NULL); -} void TransformF32::test_cfft_f32() { - arm_cfft_f32(this->cfftInstance, this->pDst, this->ifft,this->bitRev); + arm_cfft_f32(&(this->cfftInstance), this->pDst, this->ifft,this->bitRev); } void TransformF32::test_rfft_f32() @@ -76,7 +52,7 @@ switch (fftLen) { this->pSrc=samples.ptr(); this->pDst=output.ptr(); - this->cfftInstance=arm_cfft_get_instance_f32(this->nbSamples); + status=arm_cfft_init_f32(&cfftInstance,this->nbSamples); memcpy(this->pDst,this->pSrc,2*sizeof(float32_t)*this->nbSamples); break; diff --git a/Testing/main.cpp b/Testing/main.cpp index 49990479..559b1c2a 100644 --- a/Testing/main.cpp +++ b/Testing/main.cpp @@ -1,8 +1,10 @@ #include -extern int testmain(); +#include "arm_math.h" +extern int testmain(const char *); +extern "C" const char *patternData; int main() { - return(testmain()); + return(testmain(patternData)); } diff --git a/Testing/patterndata.c b/Testing/patterndata.c new file mode 100755 index 00000000..f5f940d8 --- /dev/null +++ b/Testing/patterndata.c @@ -0,0 +1,15 @@ +#include "arm_math.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include "Patterns.h" + +const char *patternData=(const char*)patterns; + +#ifdef __cplusplus +} +#endif + diff --git a/Testing/testmain.cpp b/Testing/testmain.cpp index 14293c64..aecdb43f 100644 --- a/Testing/testmain.cpp +++ b/Testing/testmain.cpp @@ -19,11 +19,10 @@ using namespace std; // char* array describing the tests and the input patterns. // Reference patterns are ignored in this case. #include "TestDrive.h" -#include "Patterns.h" -int testmain() +int testmain(const char *patterns) { char *memoryBuf=NULL;