readme.txt 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. File: CoreMark
  2. Topic: Welcome
  3. Copyright © 2009 EEMBC All rights reserved.
  4. CoreMark is a trademark of EEMBC and EEMBC is a registered trademark of the Embedded Microprocessor Benchmark Consortium.
  5. CoreMark’s primary goals are simplicity and providing a method for testing only a processor’s core features.
  6. For more information about EEMBC's comprehensive embedded benchmark suites, please see www.eembc.org.
  7. Topic: Building and running
  8. Download the release files from the www.coremark.org.
  9. You can verify the download using the coremark_<version>.md5 file
  10. > md5sum -c coremark_<version>.md5
  11. Unpack the distribution (tar -vzxf coremark_<version>.tgz && tar -vzxf coremark_<version>_docs.tgz)
  12. then change to the coremark_<version> folder.
  13. To build and run the benchmark, type
  14. > make
  15. Full results are available in the files run1.log and run2.log.
  16. CoreMark result can be found in run1.log.
  17. For self hosted Linux or Cygwin platforms, a simple make should work.
  18. Cross Compile:
  19. For cross compile platforms please adjust <core_portme.mak>, <core_portme.h> (and possibly <core_portme.c>)
  20. according to the specific platform used.
  21. When porting to a new platform, it is recommended to copy one of the default port folders
  22. (e.g. mkdir <platform> && cp linux/* <platform>), adjust the porting files, and run
  23. > make PORT_DIR=<platform>
  24. Systems without make:
  25. The following files need to be compiled:
  26. - <core_list_join.c>
  27. - <core_main.c>
  28. - <core_matrix.c>
  29. - <core_state.c>
  30. - <core_util.c>
  31. - <PORT_DIR>/<core_portme.c>
  32. For example
  33. > gcc -O2 -o coremark.exe core_list_join.c core_main.c core_matrix.c core_state.c core_util.c simple/core_portme.c -DPERFORMANCE_RUN=1 -DITERATIONS=1000
  34. > ./coremark.exe > run1.log
  35. The above will compile the benchmark for a performance run and 1000 iterations. Output is redirected to run1.log.
  36. Make targets:
  37. run - Default target, creates run1.log and run2.log.
  38. run1.log - Run the benchmark with performance parameters, and output to run1.log
  39. run2.log - Run the benchmark with validation parameters, and output to run2.log
  40. run3.log - Run the benchmark with profile generation parameters, and output to run3.log
  41. compile - compile the benchmark executable
  42. link - link the benchmark executable
  43. check - test MD5 of sources that may not be modified
  44. clean - clean temporary files
  45. ITERATIONS:
  46. By default, the benchmark will run between 10-100 seconds.
  47. To override, use ITERATIONS=N
  48. > make ITERATIONS=10
  49. Will run the benchmark for 10 iterations.
  50. It is recommended to set a specific number of iterations in certain situations e.g.:
  51. - Running with a simulator
  52. - Measuring power/energy
  53. - Timing cannot be restarted
  54. Minimum required run time:
  55. Results are only valid for reporting if the benchmark ran for at least 10 secs!
  56. XCFLAGS:
  57. To add compiler flags from the command line, use XCFLAGS e.g.
  58. > make XCFLAGS="-g -DMULTITHREAD=4 -DUSE_FORK=1"
  59. o CORE_DEBUG
  60. Define to compile for a debug run if you get incorrect CRC.
  61. > make XCFLAGS="-DCORE_DEBUG=1"
  62. o Parallel Execution
  63. Use XCFLAGS=-DMULTITHREAD=N where N is number of threads to run in parallel.
  64. Several implementations are available to execute in multiple contexts,
  65. or you can implement your own in <core_portme.c>.
  66. > make XCFLAGS="-DMULTITHREAD=4 -DUSE_PTHREAD"
  67. Above will compile the benchmark for execution on 4 cores, using POSIX Threads API.
  68. REBUILD:
  69. To force rebuild, add the flag REBUILD to the command line
  70. > make REBUILD=1
  71. Check core_portme.mak for more important options.
  72. Run parameters for the benchmark executable:
  73. Coremark executable takes several parameters as follows (if main accepts arguments).
  74. 1st - A seed value used for initialization of data.
  75. 2nd - A seed value used for initialization of data.
  76. 3rd - A seed value used for initialization of data.
  77. 4th - Number of iterations (0 for auto : default value)
  78. 5th - Reserved for internal use.
  79. 6th - Reserved for internal use.
  80. 7th - For malloc users only, ovreride the size of the input data buffer.
  81. The run target from make will run coremark with 2 different data initialization seeds.
  82. Alternative parameters:
  83. If not using malloc or command line arguments are not supported, the buffer size
  84. for the algorithms must be defined via the compiler define TOTAL_DATA_SIZE.
  85. TOTAL_DATA_SIZE must be set to 2000 bytes (default) for standard runs.
  86. The default for such a target when testing different configurations could be ...
  87. > make XCFLAGS="-DTOTAL_DATA_SIZE=6000 -DMAIN_HAS_NOARGC=1"
  88. Topic: Documentation
  89. When you unpack the documentation (tar -vzxf coremark_<version>_docs.tgz) a docs folder will be created.
  90. Check the file docs/html/index.html and the website http://www.coremark.org for more info.
  91. Topic: Submitting results
  92. CoreMark results can be submitted on the web.
  93. Open a web browser and go to http://www.coremark.org/benchmark/index.php?pg=benchmark
  94. Select the link to add a new score and follow the instructions.
  95. Topic: Run rules
  96. What is and is not allowed.
  97. Required:
  98. 1 - The benchmark needs to run for at least 10 seconds.
  99. 2 - All validation must succeed for seeds 0,0,0x66 and 0x3415,0x3415,0x66,
  100. buffer size of 2000 bytes total.
  101. o If not using command line arguments to main:
  102. > make XCFLAGS="-DPERFORMANCE_RUN=1" REBUILD=1 run1.log
  103. > make XCFLAGS="-DVALIDATION_RUN=1" REBUILD=1 run2.log
  104. 3 - If using profile guided optimization, profile must be generated using seeds of 8,8,8,
  105. and buffer size of 1200 bytes total.
  106. > make XCFLAGS="-DTOTAL_DATA_SIZE=1200 -DPROFILE_RUN=1" REBUILD=1 run3.log
  107. 4 - All source files must be compiled with the same flags.
  108. 5 - All data type sizes must match size in bits such that:
  109. o ee_u8 is an 8 bits datatype.
  110. o ee_s16 is an 16 bits datatype.
  111. o ee_u16 is an 16 bits datatype.
  112. o ee_s32 is an 32 bits datatype.
  113. o ee_u32 is an 32 bits datatype.
  114. Allowed:
  115. - Changing number of iterations
  116. - Changing toolchain and build/load/run options
  117. - Changing method of acquiring a data memory block
  118. - Changing the method of acquiring seed values
  119. - Changing implementation in core_portme.c
  120. - Changing configuration values in core_portme.h
  121. - Changing core_portme.mak
  122. Not allowed:
  123. - Changing of source file other then core_portme* (use make check to validate)
  124. Topic: Reporting rules
  125. How to report results on a data sheet?
  126. CoreMark 1.0 : N / C [/ P] [/ M]
  127. N - Number of iterations per second with seeds 0,0,0x66,size=2000)
  128. C - Compiler version and flags
  129. P - Parameters such as data and code allocation specifics
  130. - This parameter *may* be omitted if all data was allocated on the heap in RAM.
  131. - This parameter *may not* be omitted when reporting CoreMark/MHz
  132. M - Type of parallel execution (if used) and number of contexts
  133. This parameter may be omitted if parallel execution was not used.
  134. e.g.
  135. > CoreMark 1.0 : 128 / GCC 4.1.2 -O2 -fprofile-use / Heap in TCRAM / FORK:2
  136. or
  137. > CoreMark 1.0 : 1400 / GCC 3.4 -O4
  138. If reporting scaling results, the results must be reported as follows:
  139. CoreMark/MHz 1.0 : N / C / P [/ M]
  140. P - When reporting scaling results, memory parameter must also indicate memory frequency:core frequency ratio.
  141. - If the core has cache and cache frequency to core frequency ratio is configurable, that must also be included.
  142. e.g.
  143. > CoreMark/MHz 1.0 : 1.47 / GCC 4.1.2 -O2 / DDR3(Heap) 30:1 Memory 1:1 Cache
  144. Topic: Log File Format
  145. The log files have the following format
  146. (start example)
  147. 2K performance run parameters for coremark. (Run type)
  148. CoreMark Size : 666 (Buffer size)
  149. Total ticks : 25875 (platform dependent value)
  150. Total time (secs) : 25.875000 (actual time in seconds)
  151. Iterations/Sec : 3864.734300 (Performance value to report)
  152. Iterations : 100000 (number of iterations used)
  153. Compiler version : GCC3.4.4 (Compiler and version)
  154. Compiler flags : -O2 (Compiler and linker flags)
  155. Memory location : Code in flash, data in on chip RAM
  156. seedcrc : 0xe9f5 (identifier for the input seeds)
  157. [0]crclist : 0xe714 (validation for list part)
  158. [0]crcmatrix : 0x1fd7 (validation for matrix part)
  159. [0]crcstate : 0x8e3a (validation for state part)
  160. [0]crcfinal : 0x33ff (iteration dependent output)
  161. Correct operation validated. See readme.txt for run and reporting rules. (*Only when run is successful*)
  162. CoreMark 1.0 : 6508.490622 / GCC3.4.4 -O2 / Heap (*Only on a successful performance run*)
  163. (end example)
  164. Topic: Legal
  165. See LICENSE.txt or the word document file under docs/LICENSE.doc.
  166. For more information on your legal rights to use this benchmark, please see
  167. http://www.coremark.org/download/register.php?pg=register
  168. Topic: Credits
  169. Many thanks to all of the individuals who helped with the development or testing of CoreMark including (Sorted by company name)
  170. o Alan Anderson, ADI
  171. o Adhikary Rajiv, ADI
  172. o Elena Stohr, ARM
  173. o Ian Rickards, ARM
  174. o Andrew Pickard, ARM
  175. o Trent Parker, CAVIUM
  176. o Shay Gal-On, EEMBC
  177. o Markus Levy, EEMBC
  178. o Ron Olson, IBM
  179. o Eyal Barzilay, MIPS
  180. o Jens Eltze, NEC
  181. o Hirohiko Ono, NEC
  182. o Ulrich Drees, NEC
  183. o Frank Roscheda, NEC
  184. o Rob Cosaro, NXP
  185. o Shumpei Kawasaki, RENESAS