Automatic Measurement of Hardware Parameters for Embedded Processors

Embedded processor designs are increasingly based on generalpurpose processor families, modified and extended in various ways. However, the production of software for embedded processors remains a challenging problem. One promising approach for addressing this problem is self-optimizing software: instead of writing a program, one implements a program generator that produces a large number of program variants, and then determines empirically which variant performs best. The particular aspect of performance that is optimized can be execution time, power consumption, throughout, etc. To prevent a combinatorial explosion in the number of program variants that have to be considered, self-optimizing systems bound the search space by exploiting knowledge of hardware parameters such as the number of registers, the capacity of the L1 cache, etc. For software to be truly selfoptimizing, hardware parameter values relevant for software optimization must be determined automatically. This paper makes the following contributions. • We describe X-Ray – a robust and extensible microbenchmark framework for measuring hardware parameters, in which it is very easy to implement new micro-benchmarks. This is particularly important in the embedded processor context because designers constantly add new features to architectures. • We describe novel algorithms for measuring commonly used hardware parameters and show how they can be implemented in this framework. We evaluate our implementation experimentally on both embedded and desktop architectures, and show that it produces more accurate and complete results than existing tools. ∗This work was supported by NSF grants ACI-9870687, EIA-9972853, ACI-0085969, ACI-0090217, ACI-0103723, and ACI-012140.