[Embench] [Pull request] Python build system for Embench

Jeremy Bennett jeremy.bennett at embecosm.com
Fri Aug 16 20:27:57 CEST 2019

Hash: SHA1

Hi all,

I have submitted a pull request for a first version of the Python
build system for Embench.


It provides three commands:
- - build_all.py to build all the benchmarks
- - benchmark_size.py to yield the Embench code size statistics
- - benchmark_speed.py to yield the Embench code speed statistics

This is still work in progress. Benchmarking speed in particular needs
to be highly configurable to deal with all sorts of hardware and
simulators. At present there is only one style of target set, which
relies on a gdb being able to launch its own debug server to the target.

All commands have docstrings and --help works to list options. However
I have yet to update the main documentation - that is the next job.

Here is how I run it using a gdbserver based on a Verilator model of
the PULP RI5CY core:

To build everything:

  ./build_all.py --arch riscv32 --chip size-test-gcc \
    --board ri5cyverilator --cc riscv32-unknown-elf-gcc

To get the size benchmark statistics:


To rebuild for speed optimization

  ./build_all.py --clean --arch riscv32 --chip speed-test \
    --board ri5cyverilator --cc riscv32-unknown-elf-gcc

To get the speed benchmark

  ./benchmark_speed.py --absolute \
    --target-module run-gdbserver-sim \
    --gdb-command riscv32-unknown-elf-gdb \
    --gdbserver-command riscv32-gdbserver \
    --gdbserver-target ri5cy

Review and feedback much appreciated.

Best wishes,


- -- 
Tel: +44 (1590) 610184
Cell: +44 (7970) 676050
SkypeID: jeremybennett
Twitter: @jeremypbennett
Email: jeremy.bennett at embecosm.com
Web: www.embecosm.com
PGP key: 1024D/BEF58172FB4754E1 2009-03-20


More information about the Embench mailing list