Hi,

Does have anybody the results of a Dhrystone Benchmark 2.1 for recent
GNU toolchain (GCC-4 based) under eCos? I am sorry, I haven't that. I am
wondering about such results for ARM7 based targets under eCos. I have
got mine. That is for ARM7TDMI-S (Philips LPC2294) and GCC-3.2.1 (GNU
toolchain for ARM from eCosCentric), look at an attached text document,
please. I'll be pleasure to observe yours if this is not a big secret.

thanks,

--Sergei
DHRYSTONE BENCHMARK 2.1 FOR LPC2294 BUILT WITH GCC3


I was wondering about a benchmarking of GNU toolchain (GCC3 based) for
ARM7 CPU (especially for ARM7TDMI-S LPC2XXX from Philips). Dhrystone
Benchmark 2.1 and public eCos environment was selected to get an
answer.  I was wondering about a speed falling when I run a code from
other alternative places (an external static RAM or an external FLASH
memory). For my tests I used a development board from Olimex (Olimex
LPC-L2294-1M development board). Fast 10nS SRAM (1Mb) and 70nS FLASH
(4Mb) are placed on the board.


TEST CONDITIONS

OS       : eCos (CVS 2006/11/30)
Compiler : GCC 3.2.1 (PD build from ecoscentric)
Target   : Olimex LPC-L2294-1M board

CPU IC   : LPC2294 ARM7TDMI-S
CPU mode : ARM
CPU Xtal : 14.7456 Mz
CPU PLLM : 4

CFLAGS = -mcpu=arm7tdmi -mno-short-load-words -Wall -Wpointer-arith\
-Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -O2\
-ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc\
-finit-priority

LDFLAGS = -mcpu=arm7tdmi -mno-short-load-words -Wl,--gc-sections\
-Wl,-static -nostdlib


GOT RESULTS

i. Dhrystones ran on the LPC's on-chip flash memory

Microseconds for one run through Dhrystone:    25.5
Dhrystones per Second:                         39177.3
VAX MIPS rating =     22.298

ii. Dhrystones ran on an external 10nS static RAM

Microseconds for one run through Dhrystone:    43.5
Dhrystones per Second:                         22988.5
VAX MIPS rating =     13.084

iii. Dhrystones ran on an external 70nS flash memory

Microseconds for one run through Dhrystone:   152.9
Dhrystones per Second:                          6540.2
VAX MIPS rating =      3.722

Note: Both .data and .bss segments were located in external RAM. I didn't
use 16K on-chip RAM.



APPENDIX

My scripts to build such tests under eCos

# {{{ ------------------------------------------------------------ >8

TARGET=olpcl2294

# Make default ecos configuration file (ecos.ecc)
ecosconfig new $TARGET

# Make 1st ecm: no debug info (it rejects -g flag)
sed -ne '/CYGBLD_GLOBAL_.*FLAGS {/,/^}/p' ecos.ecc \
| sed  -e '/# user_value/s/# //; s/-g //; /#/d; /^$/d' >NODEBUG.ECM
rm ecos.ecc

# Make 2nd ecm: ROM startup, that's no default
cat <<__EOF >ROMSTART.ECM
cdl_component CYG_HAL_STARTUP {user_value ROM};
__EOF

# Make 3rd ecm: no monitor, no gdb mangling, that's no default
cat <<__EOF >NOMANGLE.ECM
cdl_option CYGSEM_HAL_USE_ROM_MONITOR {inferred_value 0 Generic};
cdl_option CYGSEM_HAL_DIAG_MANGLER {user_value None};
__EOF

# Build eCos tests, RAM startup
mkdir -p build \
&& cd build \
&& ecosconfig new $TARGET \
&& ecosconfig import ../NODEBUG.ECM \
&& ecosconfig import ../NOMANGLE.ECM \
&& ecosconfig --prefix=`pwd`/../RAM tree \
&& make \
&& make -k -C kernel/current tests \
&& cd .. \
&& rm -fr build

# Build eCos tests, ROM startup
mkdir -p build \
&& cd build \
&& ecosconfig new $TARGET \
&& ecosconfig import ../NODEBUG.ECM \
&& ecosconfig import ../ROMSTART.ECM \
&& ecosconfig --prefix=`pwd`/../ROM tree \
&& make \
&& make -k -C kernel/current tests \
&& cd .. \
&& rm -fr build

I have got a trick. I build the libraries using an eCos configurartion
for `ROM' startup, but, than (before a building of any executables)
I replace an origin address for `.rom_vectors' by a desired point in an
external flash memory. I choosed a point at 0x80020000 for that. There
is a RedBoot[RAM] image started from 0x80000000 in my FIS. Well, `sed'
does that trick for me.

# Build eCos tests, FLASH startup
FLASHORG=0x80020000 ;# 1st 128K reserved for RedBoot[RAM] image
mkdir -p build \
&& cd build \
&& ecosconfig new $TARGET \
&& ecosconfig import ../NODEBUG.ECM \
&& ecosconfig import ../ROMSTART.ECM \
&& ecosconfig --prefix=`pwd`/../FLASH tree \
&& make \
&& LDSCRIPT=`pwd`/../FLASH/lib/target.ld \
&& cp $LDSCRIPT ${LDSCRIPT}.bak \
&& sed -e "s/0x00000000/$FLASHORG/" ${LDSCRIPT}.bak >$LDSCRIPT \
&& make -C kernel/current tests \
&& cd .. \
&& rm -fr build

# Okay, all needed things are under FLASH, RAM, ROM directories.
# Make other bfds (srec, ihex, binary), to install them on TFTP
GPREFIX=arm-elf-
TFTPSRV=localhost
for m in RAM ROM FLASH ; do
  for t in srec binary ihex ; do
    ${GPREFIX}objcopy -O $t \
      $m/tests/kernel/current/tests/dhrystone dhrystone_$m.$t
      tftp -m binary $TFTPSRV -c put dhrystone_$m.$t dhrystone_$m.$t
  done
done
# }}} ------------------------------------------------------------ >8



I. Dhrystone are running in on-chip flash memory, 22.298 VAX MIPS

# {{{ ------------------------------------------------------------ >8
$ prog_lpc2xxx -elf -file ROM/tests/kernel/current/tests/dhrystone
Batch to program Flash LPC2XXX is started
... Map ROM/tests/kernel/current/tests/dhrystone to memory: Ok
... Check/fix the ARM vector table: fixed
... Reset the board according DTR signal: Ok
... Synchronizing: Ok
... Check a part id number: 0x0501ff13 [LPC2294]
... Get a boot loader version: 1.64
... Unlock the loader: Ok
... Start an erasing: .e
... Start a blanking: .b
... Start to program flash (?align?-write-prepare-copy): .a.w.p.c.w.p.c.w.p.c.w.
p.c.w.p.c.w.p.c.w.p.c.w.p.c.w.p.c
Done in 11.10 seconds.
$

Dhrystone Benchmark, Version 2.1 (Language: C)

Execution starts, 400000 runs through Dhrystone
Execution ends

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]:    400010
        should be:   Number_Of_Runs + 10
Ptr_Glob->
  Ptr_Comp:          -2130677248
        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:          -2130677248
        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

Register option selected?  NO
Microseconds for one run through Dhrystone:    25.5
Dhrystones per Second:                         39177.3
VAX MIPS rating =     22.298

PASS:<Dhrystone test>
EXIT:<done>
# }}} ------------------------------------------------------------ >8



II. Dhrystones are running in External RAM, 13.084 VAX MIPS

# {{{ ------------------------------------------------------------ >8
RedBoot> load dhrystone_RAM.srec
Using default protocol (TFTP)
Entry point: 0x81010040, address range: 0x81010000-0x8101cab0
RedBoot> go

Dhrystone Benchmark, Version 2.1 (Language: C)

Execution starts, 400000 runs through Dhrystone
Execution ends

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]:    400010
        should be:   Number_Of_Runs + 10
Ptr_Glob->
  Ptr_Comp:          -2130560768
        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:          -2130560768
        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

Register option selected?  NO
Microseconds for one run through Dhrystone:    43.5
Dhrystones per Second:                         22988.5
VAX MIPS rating =     13.084

PASS:<Dhrystone test>
EXIT:<done>
# }}} ------------------------------------------------------------ >8



III. Dhrystones are running in External FLASH memory, 3.722 VAX MIPS

# {{{ ------------------------------------------------------------ >8
RedBoot> fis init -f
About to initialize [format] FLASH image system - continue (y/n)? y
*** Initialize FLASH Image System
... Erase from 0x80020000-0x801f0000:
   initialization failed 0x80020000: Device/region is write-protected
... Unlock from 0x801f0000-0x80200000: .
... Erase from 0x801f0000-0x80200000: .
... Program from 0x810f0000-0x81100000 at 0x801f0000: .
... Lock from 0x801f0000-0x80200000: .
RedBoot> fis unlo -f 0x80020000 -l 0x10000
... Unlock from 0x80020000-0x80030000: .
RedBoot> load -r -b %{freememlo} dhrystone_FLASH.binary
Using default protocol (TFTP)
Raw file loaded 0x8100cc00-0x81019633, assumed entry at 0x8100cc00
RedBoot> fis creat -f 0x80020000 dhry
... Erase from 0x80020000-0x80030000: .
... Program from 0x8100cc00-0x81019634 at 0x80020000: .
... Unlock from 0x801f0000-0x80200000: .
... Erase from 0x801f0000-0x80200000: .
... Program from 0x810f0000-0x81100000 at 0x801f0000: .
... Lock from 0x801f0000-0x80200000: .
RedBoot> go 0x80020000

Dhrystone Benchmark, Version 2.1 (Language: C)

Execution starts, 400000 runs through Dhrystone
Execution ends

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]:    400010
        should be:   Number_Of_Runs + 10
Ptr_Glob->
  Ptr_Comp:          -2130677248
        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:          -2130677248
        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

Register option selected?  NO
Microseconds for one run through Dhrystone:   152.9
Dhrystones per Second:                          6540.2
VAX MIPS rating =      3.722

PASS:<Dhrystone test>
EXIT:<done>
# }}} ------------------------------------------------------------ >8

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

Reply via email to