Technical information
Before You Begin: Important Concepts
XAPP1206 v1.1 June 12, 2014 www.xilinx.com 3
Before You
Begin:
Important
Concepts
Before addressing specific optimization techniques, it is important to understand some related
concepts. The sections below describe:
• Software Optimization Basics
• NEON Basics
Software Optimization Basics
In an embedded system, you often optimize for speed, but you can also optimize for battery life,
code density, or memory footprint. Generally speaking, embedded systems use highly
customized hardware and software systems for specific purposes. Most of time you need to
trade off between code density, speed, debug visibility, and other factors. This application note
explains how to increase software speed. This has the additional benefit of improving
performance and can be crucial to lowering power consumption and conserving battery life. If
a task finishes in fewer cycles, you can turn off the power for longer periods.
There are several methods for optimizing software to boost performance. You can, for example:
• Change the algorithm computation order to avoid cache thrashing and improve cache
efficiency. Usually you must do this for computation on matrices. This application note
provides an example of this.
• Develop the algorithm to use the underlying processor architecture more efficiently,
including but not limited to instructions. This application note focuses on how an
understanding of CPU hardware can help to optimize code. This kind of knowledge leads
to better optimization and to higher efficiency in the design algorithm.
The ARM Cortex-A9 processor used in the Zynq-7000 AP SoC has many advanced features
that can increase software performance:
• Superscalar, out-of-order multi-issue with speculation
• Preload engine to load data in advance
• Media processing engine and VFPv3 to improve data processing
• Hit-under-miss behavior to minimize pipeline stalls
• Physically indexed, physically tagged (PIPT) data caches to speed up context switching