Preserving temporal behaviour of legacy real-time software across static binary translation

In contrast to the shorter and shorter life cycles of electronic components, some embedded systems like automotive ECUs need to be supplied for decades. Thus, an embedded system may be subject to several hardware redesigns during its life cycle which may cause tremendous software porting and redevelopment efforts. Static binary translation has the potential to significantly cut these redevelopment costs by automating the software retargeting process. While static binary translation has been successfully applied to non-real-time software, there is hardly any work in the real-time field. Besides preserving the functional software behaviour, static binary translation of real-time software requires that its temporal behaviour at the machine code level is preserved to a certain extent. Traditionally, this is achieved by maintaining the source machine time (number of CPU clock cycles elapsed on the original machine since its activation) on the target machine. However, this does not scale for processors with pipelines or caches. The contribution of this paper is a scalable approach to preserve the temporal behaviour of the original software on the target machine by statically generated temporal barriers. It reduces the runtime overhead of the traditional approach and provides a safe upper bound of the maximum temporal displacement, i.e. the time that the execution of any program point on the target is at most ahead or behind its execution on the source machine.