CV32RT:为RISC-V微控制器实现快速中断与上下文切换
CV32RT: Enabling Fast Interrupt and Context Switching for RISC-V Microcontrollers
AI总结:
针对RISC-V微控制器中断处理不足,提出CV32RT核心,通过实现CLIC并扩展fastirq,将中断延迟降至6周期,实现快速上下文切换,媲美专有架构。
摘要:
采用开放RISC-V ISA的处理器在嵌入式领域中的应用日益增多。许多嵌入式用例具有实时性约束,需要灵活、可预测且快速响应的事件处理能力。然而,与经过多年调优的更为成熟的专有架构(如ARM Cortex-M和TriCore)相比,RISC-V处理器在该领域仍显滞后。RISC-V标准化的默认中断控制器——核心本地中断器(CLINT),在中断优先级和抢占配置方面缺乏灵活性。RISC-V核心本地中断控制器(CLIC)规范通过支持可抢占、低延迟的向量中断来解决此问题,同时设想可选扩展以进一步改善中断延迟。在本工作中,我们为CV32E40P(一个工业支持的、开源的32位MCU级RISC-V核心)实现了CLIC,并通过fastirq(一种自定义扩展)对其进行增强,使中断延迟低至6个周期。我们将增强后的核心称为CV32RT。据我们所知,CV32RT是首个完全开源、具备与Arm Cortex-M系列及TriCore相竞争的中断处理特性的RV32核心。所提出的扩展也被证明能改善实时操作系统中的任务上下文切换。
英文摘要:
Processors using the open RISC-V ISA are finding increasing adoption in the embedded world. Many embedded use cases have real-time constraints and require flexible, predictable, and fast reactive handling of incoming events. However, RISC- V processors are still lagging in this area compared to more mature proprietary architectures, such as ARM Cortex-M and TriCore, which have been tuned for years. The default interrupt controller standardized by RISC-V, the Core Local Interruptor (CLINT), lacks configurability in prioritization and preemption of interrupts. The RISC-V Core Local Interrupt Controller (CLIC) specification addresses this concern by enabling pre-emptible, low-latency vectored interrupts while also envisioning optional extensions to improve interrupt latency. In this work, we implement a CLIC for the CV32E40P, an industrially supported open-source 32-bit MCU-class RISC-V core, and enhance it with fastirq: a custom extension that provides interrupt latency as low as 6 cycles. We call CV32RT our enhanced core. To the best of our knowledge, CV32RT is the first fully open-source RV32 core with competitive interrupt-handling features compared to the Arm Cortex-M series and TriCore. The proposed extensions are also demonstrated to improve task context switching in real-time operating systems.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。