To enable debugging and calibration of real time systems, which are in interaction with the real plant, the software used on those systems often has a huge number of global variables. The huge number of global variables exceed the range addressable relative to the global pointer. Therefore, addressing these variables normally needs two instructions. Other CPU architectures commonly used in the real time control systems domain address these by various near addressing modes. This results in significant code size reductions and performance boost. This paper discusses different variants to add such near addressing features to the RISC-V ISA. The impact on the code size is evaluated with different representative workloads.
翻译:为了实现与真实被控对象交互的实时系统的调试与校准,此类系统所使用的软件通常包含大量全局变量。大量全局变量会超出全局指针可寻址的范围,因此通常需要两条指令来访问这些变量。而在实时控制系统领域常用的其他CPU架构,通过多种近端寻址模式来访问这些变量。这显著降低了代码体积并提升了性能。本文讨论了在RISC-V指令集架构中添加此类近端寻址功能的不同方案,并通过多种代表性任务负载评估了其对代码体积的影响。