CERA2

Datasheetcera2 · embedded

Latency budgets: what a deadline actually costs

A real-time system is not a fast system. It is a system whose worst case is known. The distinction decides the architecture, the operating system, and often the processor, and it is the point where most embedded projects first go wrong.

Hard, firm and soft

A hard deadline missed is a failure: the airbag fires late, the servo overshoots, the sample is lost. A firm deadline missed makes the result useless but harmless. A soft deadline missed degrades quality. Each class buys a different amount of engineering, and calling a soft deadline hard is an expensive way to be careful.

Where the time goes

The budget for an interrupt-driven path has four parts: interrupt latency in the silicon, the time the kernel spends before your handler runs, the handler itself, and any priority inversion on the way to the task that finishes the work. The first is in the datasheet. The second is the number that separates an RTOS from a general-purpose kernel. The third you can measure. The fourth is the one that produces the bug you cannot reproduce.

Measuring rather than assuming

A GPIO pin toggled at the entry and exit of the handler, watched on a scope, answers more questions in ten minutes than a week of reasoning about the scheduler. Run it with the caches cold, with the worst-case interrupt load, and at the temperature the enclosure actually reaches. The interesting number is not the average; it is the widest pulse in an hour.

Index

CompactPCI: PCI in a Eurocard

By the mid-nineties the PC industry had a fast, cheap, well-supported bus, and the industrial world had mechanics that could survive a factory floor. CompactPCI, published in 1995,

PC/104: stacking instead of a backplane

PC/104 solved a mechanical problem before it solved an electrical one. An industrial controller that has to survive vibration cannot rely on a card edge sitting in a

VMEbus: the rack that outlived its industry

VMEbus was specified in 1981 around the Motorola 68000 and the Eurocard mechanics that European instrument makers already had on the shelf. Forty years later there are still