Finding WCET
Since the early days of embedded computing, embedded software developers have either used:
- end-to-end measurements of code, for example performed by setting an I/O pin on the device to high at the start of the task, and to low at the end of the task and using a logic analyzer to measure the longest pulse width, or by measuring within the software itself using the processor clock or instruction count.
- manual static analysis techniques such as counting assembler instructions for each function, loop etc. and then combining them.
Both of these techniques have limitations. End to end measurements place a high burden on software testing to achieve the longest path; counting instructions is only applicable to simple software and hardware. In both cases a margin for error is often used to account for untested code, hardware performance approximations or mistakes. A margin of 20% is often used, although there is very little justification used for this figure, save for historical confidence (“it worked last time”).
As software and hardware have increased in complexity, it has driven the need for tool support. Complexity is increasingly becoming an issue in both static analysis and measurements. It is difficult to judge how wide the error margin should be and how well tested the software system is. System safety arguments based on a high-water mark achieved during testing are widely used, but become harder to justify as the software and hardware are less predicable.
In the future, it is likely that a requirement for safety critical systems is that they are analyzed using both static and measurement-based approaches.
Read more about this topic: Worst-case Execution Time
Famous quotes containing the word finding:
“For anyone addicted to reading commonplace books ... finding a good new one is much like enduring a familiar recurrence of malaria, with fever, fits of shaking, strange dreams. Unlike a truly paludismic ordeal, however, the symptoms felt while savoring a collection of one mans pet quotations are voluptuously enjoyable ...”
—M.F.K. Fisher (19081992)