CoreMark integration

CoreMark® is a CPU benchmark provided by Embedded Microprocessor Benchmark Consortium (EEMBC) to verify SoCs performance. You can use it to perform series of tests in each benchmark iteration. The benchmark score is calculated based on the number of iterations per second the Device Under Test (DUT) can perform. Integrating CoreMark into the nRF Connect SDK allows users to easily verify SoCs performance.

Integration prerequisites

Before you start the nRF Connect SDK integration with CoreMark, make sure that the following prerequisites are completed:

Solution architecture

Adding the CoreMark repository to the nRF Connect SDK manifest automatically includes it in the repository as the nRF Connect SDK module. You can find it under the modules/benchmark/coremark path. CoreMark needs a porting layer to run correctly on a SoC. You can find the files of porting layer for devices supported in the nRF Connect SDK under the nrf/modules/coremark path.

CoreMark benchmark consists of continuously repeated iterations. Each iteration, in turn, consists of the following workloads:

  • Linked list

  • Matrix multiply

  • State machine

For detailed description of each of those workloads, see the CoreMark GitHub repository.

Integration steps

To integrate CoreMark into the nRF Connect SDK, configure CoreMark as described in the following section.

Configuring CoreMark

To include CoreMark in your build, complete the following steps:

  1. Add the following Kconfig options in your prj.conf file:

    CONFIG_COREMARK=y
    
  2. Choose any of the following memory methods for dealing with the CoreMark data. Make sure that you allocate enough memory, depending on the method you choose.

    • Memory method stack:

      COREMARK_MEMORY_METHOD_STACK=y
      CONFIG_MAIN_STACK_SIZE=4096
      
    • Memory method heap:

      CONFIG_COREMARK_MEMORY_METHOD_MALLOC=y
      CONFIG_HEAP_MEM_POOL_SIZE=4096
      
    • Memory method static:

      CONFIG_COREMARK_MEMORY_METHOD_STATIC=y
      

To see an example, refer to the Configuration section of the CoreMark documentation.

Submitting score

You can see the submitted scores in the official CoreMark database. If you want to submit your own score, follow steps in the CoreMark GitHub repository.

Applications and samples

The following sample demonstrates the CoreMark integration in the nRF Connect SDK:

  • CoreMark - This sample is used to obtain the CoreMark score for boards supported in the nRF Connect SDK.