dhrystone Example

The Dhrystone example (dhrystone directory) is a classic benchmark for testing CPU performance. When you run this application, it performs dhrystone benchmark testing and displays messages and results on a UART terminal.

The following code shows example results:

Dhrystone Benchmark, Version C, Version 2.2 
   Program compiled without 'register' attribute
   Using rdcycle(), HZ=200000000
   Trying 500 runs through Dhrystone:
   Final values of the variables used in the benchmark:
   Int_Glob:         5
   should be:        5
   Bool_Glob:        1
   should be:        1
   Ch_1_Glob:        A
   should be:        A
   Ch_2_Glob:        B
   should be:        B
   Arr_1_Glob[8]:    7
   should be:        7
   Arr_2_Glob[8][7]: 510
   should be:        Number_Of_Runs + 10
   Ptr_Glob->
   Ptr_Comp:         23088
   should be:        (implementation dependent)
   Discr:            0
   should be:        0
   Enum_Comp:        2
   should be:        2
   Int_Comp:         17
   should be:        17
   Str_Comp:         DHRYSTONE PROGRAM, SOME STRING
   should be:        DHRYSTONE PROGRAM, SOME STRING
   Next_Ptr_Glob->
   Ptr_Comp:         23088
   should be:        (implementation dependent), same as above
   Discr:            0
   should be:        0
   Enum_Comp:        1
   should be:        1
   Int_Comp:         18
   should be:        18
   Str_Comp:         DHRYSTONE PROGRAM, SOME STRING
   should be:        DHRYSTONE PROGRAM, SOME STRING
   Int_1_Loc:        5
   should be:        5
   Int_2_Loc:        13
   should be:        13
   Int_3_Loc:        7
   should be:        7
   Enum_Loc:         1
   should be:        1       
   Str_1_Loc:   DHRYSTONE PROGRAM, 1'ST STRING
   should be:   DHRYSTONE PROGRAM, 1'ST STRING
   Str_2_Loc:   DHRYSTONE PROGRAM, 2'ND STRING
   should be:   DHRYSTONE PROGRAM, 2'ND STRING

   Microseconds for one run through Dhrystone: 2
   Dhrystones per Second:                      9292
   User_Time : 231101
   Number_Of_Runs : 500
   HZ : 200000000
   DMIPS per Mhz:                              1.23