Execution Time Estimator
How long does your control algorithm take on the target – and which processor is fast enough? The Execution Time Estimator answers both before you write a single line of code to the hardware: it predicts the execution cycles, times and CPU load of your X2C model for all supported processors at once, based on execution cycles measured on the real targets.
Know your timing before you flash
Load your model in the X2C Communicator and click the stopwatch in the toolbar. No target, no debugger and no compiler run needed – the estimate is there right away.
Sample time & CPU load
See at a glance whether the model fits into its sample time Ts at your CPU clock – with the worst-case load in percent.
All processors at once
Compare the cycles of your model on every supported processor in one chart.
Min, average, max
Typical effort as bar, best and worst case as whisker – from measurements on the real targets.
Find the expensive blocks
Which blocks take the most cycles? The list per processor shows where optimizing pays off.
Execution time vs. sample time
See the execution time of your model next to its sample time Ts – at the maximum CPU clock of each processor or at the clock your board actually runs at. The worst-case CPU load tells at a glance whether it fits.
In the example, the processors with floating-point unit need at most about half of Ts; those without exceed it many times over – a case for fixed-point blocks.

Execution cycles per processor
The second tab shows the estimated CPU cycles of one sample step of your model for every processor – independent of the clock frequency, so you compare the cores themselves.
- Bar: average
- Whisker: minimum to maximum (worst case)
- Linear code: all blocks in every step
- RTOS code: slower blocks run less often
- Hatched: incomplete coverage
Blocks without measured data are clearly marked – so you know how far you can trust the estimate.

Where the cycles go
Which blocks take the most cycles on your processor? The list, largest share first, shows where a slower sample time or another implementation pays off.
In the example, three blocks take more than a third of all cycles on the TM4C123.

Where the estimate pays off
Before the project
- Select a processor that is fast enough – without building a test setup for each candidate
- Find the shortest sample time your control algorithm can achieve
- Decide between fixed-point and floating-point implementations
During development
- Check after every model change whether the timing still fits – with one click
- Move slow parts of the model to a longer sample time and see the effect right away
- Keep headroom for interrupts, communication and your own code
Want to know more?
The Execution Time Estimator is included in X2C Professional, Plus and Educational. Contact us to learn more.
Contact us