Blog

Supporting Duff's Device in RVS

Nested “case” labels are an obscure feature of C, and not often seen. However, examples do exist, typically hidden deep in standard library functions and our customers come across them from time to time. Here's a little article about how we recently brought support for them into RVS.
Read More

Ada enumerations are sometimes functions

In Ada, you declare a new enumeration type by providing a list of literals: type Position is ( Left, Middle, Right );Ada also lets you use character literals in an enumeration: type Calc_Op is ( '*', '/', '+', '-' );or even: type DNACode is ( 'A', 'C', 'G', 'T', Unknown );Once you have an enumeration type, you can use these literals just as you would other literals:
Read More

What happened first? Handling timer wraparound

Suppose you had to determine which of two timestamps occurred first. Clearly the “obvious“ approach is to use a simple numerical comparison, for example:
Read More

Conditional code without branches

The difficulty of showing that real-time software safely executes within an allotted time budget arises from the variability of code execution time. Some of this variation arises from hardware effects but a great deal arises from different paths through software. We can reduce and even eliminate this variation at the expense of increased code size and average-case performance.
Read More

Pages