Search papers, labs, and topics across Lattice.
This paper explores adding near addressing modes to the RISC-V ISA to reduce code size when dealing with a large number of global variables, a common scenario in real-time embedded systems. The authors propose and evaluate several near addressing variants that allow addressing variables relative to the global pointer with a single instruction instead of two. Experiments with representative workloads demonstrate significant code size reductions, making RISC-V more competitive in real-time control applications.
RISC-V code can shrink significantly by adopting near addressing modes, bringing it closer to the efficiency of other architectures in real-time control.
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.