Hardware Solutions for Eliminating Context Switching Latency in Processor-Based Hard Real-Time Systems
Nurmi, Antti; Kalache, Abdesattar; Hämäläinen, Timo D. (2024)
Nurmi, Antti
Kalache, Abdesattar
Hämäläinen, Timo D.
2024
This publication is copyrighted. You may download, display and print it for Your own personal use. Commercial use is prohibited.
Julkaisun pysyvä osoite on
https://urn.fi/URN:NBN:fi:tuni-202501301823
https://urn.fi/URN:NBN:fi:tuni-202501301823
Kuvaus
Peer reviewed
Tiivistelmä
Processor systems in control-oriented applications, such as safety-critical real-time systems, rely on low-latency context switching to service multiple tasks in a concurrent yet timely fashion. Conventional microcontroller systems rely on software-based storing and restoring of the active program context, while some microcontrollers have been optimized to accelerate the stacking of the context with custom hardware. However, these solutions do not address the fundamentally sequential nature of context saving. This publication presents a novel approach to parallelizing context saving and restoring by developing a parallel context stack. We integrate the solution into an existing open-source RISC-V processor and microcontroller platform and demonstrate the effective elimination of the context switch latency from the total interrupt latency. The design is synthesized with a commercial application-specific integrated circuit (ASIC) flow, using an open 45 nm technology library, and achieves a maximal frequency estimate of 500 MHz. The presented solution achieves a best-in-class total interrupt latency of 4 clock cycles, without increasing the critical path delay of the processor. We present a comparison of existing hardware mechanisms for context switching and an argument for improved safety and predictability with isolated context saving.
Kokoelmat
- TUNICRIS-julkaisut [24152]