4103 views|1 replies

501

Posts

4

Resources
The OP
 

[Beineng cost-effective ATSAMD51 evaluation board] Benchmark performance test 5: coremark test [Copy link]

Preface

According to the manual description, the coremark score is 403, so we actually test it.

process

Add code

Get the code

https://github.com/eembc/coremark

Add header file include path

Porting interface

core_portme.h

typedef size_t ee_size_t;

Change to

typedef ee_u32 ee_size_t;

In core_portme.h, change it to

"-O0" "-O3" "-Ofast" etc.

Increase

#include <stdio.h>

Comment out

//#define NULL ((void *)0)

#define ITERATIONS 1000

This macro controls the number of loops. If the time is insufficient, increase the value.

#define CLOCKS_PER_SEC 1000

This macro specifies the unit of time.

#define HAS_PRINTF 1

Output using printf

Comment out //int ee_printf(const char *fmt, ...);

core_portme.c

accomplish

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 SYSTICK_GetTickCounter();

}

Add header file in front

#include "definitions.h"

Comment out

//#error \

// "Call board initialization routines in portable init (if needed), in particular initialize UART!\n"

We initialize it in the main function

Since we already have printf, we don't need to add ee_printf.c, otherwise we need to implement

uart_send_char

The main function in core_main.c is changed to

coremark_main

test

Declare in Main.c

int coremark_main(int argc, char *argv[]);

Call coremark_main in the main function

-O0

-O3 executes very quickly, not enough time

Change #define ITERATIONS 1000 to

#define ITERATIONS 10000

-Ofast is the same as -O3

You can see how the level of optimization makes a huge difference in the results.

There is still a slight gap between our running score and the 403 described in the manual, which may have something to do with the compiler and optimization environment.

https://www.eembc.org/coremark/scores.php

You can check other chips for comparison.

Summarize

Coremark is relatively simple to port. This article conducts a coremark benchmark test, and it can be seen that the values are slightly different from those in the manual because of the different compiler and other environments. Compiler optimization has a great impact on the score.

This post is from Microchip MCU

Latest reply

What is the running score of 403?   Details Published on 2022-12-2 07:39
 

5998

Posts

6

Resources
2
 

What is the running score of 403?

This post is from Microchip MCU
 
Personal signature

在爱好的道路上不断前进,在生活的迷雾中播撒光引

 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list