[Boliu BL606P audio and video development board] coremark benchmark performance test
[Copy link]
Preface
According to the evaluation plan, we will conduct performance testing in this article. There are many types of CPU benchmark performance tests, the most common one is coremark, and we will use coremark to conduct CPU benchmark performance tests.
process
Preparing the code
Download the code
git clone
Only keep the following content and add it to the project app directory
Modify the code
core_portme.h中
#define HAS_PRINTF 0 is changed to #define HAS_PRINTF 1
#define ee_printf printf
Change to
#define ee_printf aos_cli_printf
添加#include "aos/cli.h"
Add #define MAIN_HAS_NOARGC 1
Change FLAGS_STR to "-O0" or "-O3" etc. according to actual situation.
typedef size_t ee_size_t; is changed to
typedef unsigned int ee_size_t;
Add #define ITERATIONS 10000
This value needs to be modified according to the actual situation. If it is prompted that the running time is insufficient, modify and increase this value.
core_portme.c
barebones_clock()
{
#error \
"You must implement a method to measure time in barebones_clock()! This function should return current time.\n"
}
Change to
barebones_clock()
{
//#error \
// "You must implement a method to measure time in barebones_clock()! This function should return current time.\n"
return aos_sys_tick_get();
}
Comment out
#if 0
#error \
"Call board initialization routines in portable init (if needed), in particular initialize UART!\n"
#endif
The following two macros determine the unit of getting time ticks
#define TIMER_RES_DIVIDER 1
# define CLOCKS_PER_SEC (100)
The main function in core_main.c is changed to coremark_main
Change crc16 in core_util.c/coremark.h and other files to core_crc16
Called in the main function
void coremark_main(void);
coremark_main();
test
Set the optimization level
2K performance run parameters for coremark.
CoreMark Size : 666
Total ticks : 10261
Total time (secs): 102.610000
Iterations/Sec : 97.456388
Iterations : 10000
Compiler version : GCC10.2.0
Compiler flags : -O3
Memory location : STACK
seedcrc : 0xe9f5
[0]crclist : 0xe714
[0]crcmatrix : 0x1fd7
[0]crcstate : 0x8e3a
[0]crcfinal : 0x988c
Correct operation validated. See README.md for run and reporting rules.
CoreMark 1.0 : 97.456388 / GCC10.2.0 -O3 / STACK
contrast
https://www.eembc.org/coremark/scores.php
Summarize
The above results are for reference only, because they are closely related to the configuration, such as compiler optimization, main frequency, cache enabling, etc.
|