This paper introduces thread integration, a new method of providing low-cost concurrency for microcontrollers and microprocessors. This post-pass compiler technology effectively interleaves multiple threads of control at the instruction level for execution on a uniprocessor and implicitly provides very fine-grain multithreading without context switching overhead. Such efficient concurrency allows implementation of real-time functions in software rather than dedicated peripheral hardware. Thread integration's position in the design space is evaluated to help identify when and where to apply the technique. A number of code transformations have been developed that allow a guest thread of computation to be systematically integrated into a host thread while meeting all the real-time requirements of the guest thread. The thread integration concept and the associated code transformations have been successfully applied to several example applications.
Alexander G. Dean, John Paul Shen