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指令集架构中引入此类近址寻址特性的不同方案,并通过多种代表性工作负载对代码体积的影响进行了评估。