Late Breaking Results: A RISC-V ISA Extension for Chaining in Scalar Processors
Luca Colagrande, Jayanth Jonnalagadda, Luca Benini · 2025
Read Late Breaking Results: A RISC-V ISA Extension for Chaining in Scalar Processors by Luca Colagrande, Jayanth Jonnalagadda, Luca Benini (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2503-20609.txt.
Introduction
Luca Colagrande, Jayanth Jonnalagadda, and Luca Benini proposed in 2025 a small hardware extension that keeps simple processor cores fed during chained calculations. Accelerators pack many lean scalar cores that stall whenever a result must wait for its consumer. Software unrolling helps but eats registers.
Their scalar chaining lets one instruction hand its result straight to the next inside the hardware, skipping the register file detour. On register-starved stencil codes, the floating point units stayed busy over ninety-three percent of the time. Average gains ran about four percent in speed and ten percent in energy efficiency over tuned baselines. The design is fully open source, and the experiments reproduce with free tools. The authors pitch chaining as cheap relief for lean cores.
Catalog record
| CREATOR | Luca Colagrande, Jayanth Jonnalagadda, Luca Benini |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 10 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2503-20609
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Late Breaking Results: A RISC-V ISA Extension for Chaining in Scalar Processors Luca Colagrande, Jayanth Jonnalagadda, Luca Benini Abstract Modern general-purpose accelerators integrate a large number of programmable area- and energy-efficient processing elements (PEs), to deliver high performance while meeting stringent power delivery and thermal dissipation constraints. In this context, PEs are often implemented by scalar in-order cores, which are highly sensitive to pipeline stalls. Traditional software techniques, such as loop unrolling, mitigate the issue at the cost of increased register pressure, limiting flexibility. We propose scalar chaining, a novel hardware-software solution, to address this issue without incurring the drawbacks of traditional software-only techniques. We demonstrate our solution on register-limited stencil codes, achieving >93% FPU utilizations and a 4% speedup and 10% higher energy efficiency, on average, over highly-optimized baselines. Our implementation is fully open source and performance experiments are reproducible using free software. 1 1 1 https://github.com/colluca/snitch_cluster/tree/chaining I Introduction As power delivery and thermal dissipation challenge the development of ever more powerful high-performance computers [ 1 ] , designing energy-efficient architectures has become of paramount importance [ 2 ] . To this end, architectures featuring many energy-efficient in-order cores with shallow pipelines are favoured over multicores hosting a few power- and resource-hungry deeply-pipelined out-of-order processors [ 3 ] . While in-order cores are more area- and energy-efficient, they are also more sensitive to pipeline stalls as a consequence of data hazards, leading to reduced performance. Consider the RISC-V code in Figure 1 , implementing the vector operation \mathbf{a}=b*(\mathbf{c}+\mathbf{d}) on the state-of-the-art scalar in-order Snitch processor [ 4 ] . To improve FPU utilization, we take advantage of the Stream Semantic Register (SSR) Instruction Set Architecture (ISA) extension of Snitch: registers ft0 and ft1 implicitly read the next value from the \mathbf{c} and \mathbf{d} arrays, respectively, and ft2 implicitly writes to the next element in the \mathbf{a} array. In an in-order pipelined processor, the Read After Write (RAW) dependency between the fadd and fmul instructions causes the latter to stall until the result from the prior is available, wasting useful cycles, three in the case of Snitch, equal to the number of pipeline stages in its Floating Point Unit (FPU) . ⬇ fadd . d ft3 , ft0 , ft1 fmul . d ft2 , ft3 , %[ b ] addi %[ i ], %[ i ], 1 bneq %[ i ], %[ len ], -12 (a) ⬇ fadd . d ft3 , ft0 , ft1 fadd . d ft4 , ft0 , ft1 fadd . d ft5 , ft0 , ft1 fadd . d ft6 , ft0 , ft1 fmul . d ft2 , ft3 , %[ b ] fmul . d ft2 , ft4 , %[ b ] fmul . d ft2 , ft5 , %[ b ] fmul . d ft2 , ft6 , %[ b ] addi %[ i ], %[ i ], 4 bneq %[ i ], %[ len ], -36 (b) ⬇ li %[ mask ], 8 csrs 0 x7C3 , %[ mask ] fadd . d ft3 , ft0 , ft1 fadd . d ft3 , ft0 , ft1 |\ tikzmark { sinst0 }| fadd . d ft3 , ft0 , ft1 |\ tikzmark { einst0 }| fadd . d ft3 , ft0 , ft1 fmul . d ft2 , ft3 , %[ b ] |\ tikzmark { sinst1 }| |\ tikzmark { einst1 }| fmul . d ft2 , ft3 , %[ b ] fmul . d ft2 , ft3 , %[ b ] fmul . d ft2 , ft3 , %[ b ] |\ tikzmark { sinst2 }| addi %[ i ], %[ i ], 4|\ tikzmark { einst2 }| bneq %[ i ], %[ len ], -36 csrs 0 x7C3 , x0 (c) Fig. 1 : (a) Baseline and (b) unrolling-optimized code variants. (c) A sample execution trace of the chaining-optimized code. The colored issue slots are marked for reference in Figure 2 . Loop unrolling and software pipelining techniques can be adopted to eliminate wasted cycles [ 5 ] , as illustrated in Figure 1 . The downside of this approach is that it increases register pressure, limiting the effectiveness of this technique to small codes, to avoid register spills [ 6 ] . Vector and out-of-order processors with renaming support mitigate this issue by implementing large physical Register Files (RFs) , at the cost of much increased area and energy consumption. In this work, we propose an alternative solution that enables the advantages of loop unrolling without increasing register pressure. By utilizing the pipeline registers within the processor’s functional units to store intermediate results, our approach is well-suited for integration into highly area- and energy-efficient cores. While we demonstrate our implementation on the Snitch processor with its ISA extensions, the solution is not restricted to this particular design. II Implementation The code in Figure 1 uses three additional architectural registers ( ft4 - ft6 ) to store the intermediate results of the fadd instructions, until they are consumed by the respective fmul instructions. Our first insight is that the FPU already provides enough storage for these intermediate results in its three pipeline stages, which led to unrolling the code by four in the first place. By properly balancing the production and consumption rate of intermediate results by the fadd and fmul instructions, we can avoid allocating additional physical registers. This dataflow, which conceptually involves chaining the fadd and fmul instructions, is illustrated in Figure 2 . As pipeline registers are not directly addressable, we need to extend the ISA to implement the desired dataflow. We integrate a custom Control and Status Register (CSR) (at address 0x7c3 ) hosting a 32-bit mask (one bit per architectural register) to dynamically enable and disable chaining on the selected architectural Floating-Point (FP) registers. Enabling chaining alters instruction semantics: writeback to a chaining-enabled register is no longer enforced to be carried out atomically with operation execution. There is thus no notion of Write After Write (WAW) dependency between successive fadd instructions in the code in Figure 1 . Instead, chaining-enabled registers are assigned FIFO semantics , i.e. writes and reads to the register respectively imply push and pop operations from a logical First-In First-Out Queue (FIFO) , which is physically implemented by concatenating the chaining-enabled architectural register ( ft3 in our example) and the functional unit’s pipeline registers. Conversely, the traditional unrolling approach in Figure 1 implements this logical FIFO in the RF , at the cost of precious architectural registers. Thus, chaining benefits are increased for functional units with deeper pipelines. Finally, we add a valid bit per architectural register to implement the backpressure mechanism avoiding that elements in the logical FIFO are overwritten before they are consumed in the occurrence of a stall, as illustrated by the orange issue slot in Figure 1 . Fig. 2 : Block diagram of Snitch’s FP subsystem, illustrating the dataflow associated to the trace in Figure 1 . Elements in different colors represent snapshots at different moments in time, particularly at the respectively-colored issue slots in Figure 1 . Numbered tokens represent the outputs of the instructions at the respectively-numbered issue slots in Figure 1 . III Results We implement a Snitch cluster [ 4