The growing deployment of floating-point arithmetic in embedded and IoT workloads, ranging from sensor fusion and digital filtering to on-device neural network inference, demands hardware floating-point support in area-constrained RISC-V cores. However, adding a conventional fully pipelined FPU to a compact microcontroller-class processor, which is resource-constrained, incurs a silicon cost that is disproportionate to the floating-point workload density of many such applications. This thesis investigates how to minimize that cost by designing an area-efficient, IEEE 754-compliant, single-precision floating-point unit and systematically reusing the existing integer arithmetic resources of STMicroelectronics’ proprietary RISC-V core, STRIVE-L, rather than duplicating hardware. The FPU is designed from scratch in synthesizable SystemVerilog, implementing the full RISC-V Zfinx single-precision instruction set, which includes operations such as addition, subtraction, multiplication, floating-point-to-integer and integer-to-floating-point conversion, and all five comparison operations along with all five IEEE 754 rounding modes and exception flags. Key area-reduction strategies include a partial-product multiplication algorithm that reduces the mantissa multiplier area by approximately 50% relative to a direct implementation, and a shared normalization and rounding module used by both the addition/subtraction and multiplication paths. A pipelined variant is also developed and evaluated. The standalone FPU achieves a maximum frequency of 179MHz at a stressed area of 18.2KGE, and 295MHz when a pipeline register is inserted between the arithmetic and normalization stages. Functional correctness is validated through approximately 47,000 randomized operand pairs per operation per rounding mode against a trusted reference model, with zero mismatches observed. Integration into STRIVE-L evaluates four resource-sharing strategies. Sharing only the existing 17-bit multiplier through a modified partial-product FSM yields the best balance: the integrated FPU area is reduced by 17.2% relative to the no-sharing baseline, and the full CPU stressed area drops from 44.8KGE to 43.3KGE, with only a modest timing impact of 0.2 ns on the clock period. Adder sharing provides a smaller area improvement and a lower maximum frequency than the partial-fraction multiplier-sharing solution, so it is not selected as the final architecture. Shifter sharing is shown to be detrimental, degrading the maximum frequency from 173MHz to 159MHz for a negligible area gain. The final integrated design is verified at the system level using self-checking RISC-V assembly programs and validated on the Digilent Arty A7-100T FPGA. The resulting design achieves a relaxed area of 34.8KGE at 125 MHz, compared with 35KGE for the incumbent STRIVE-L implementation based on Synopsys DesignWare IP at the same frequency, which is a difference of less than 1%. Unlike the proprietary IP, the custom FPU is fully configurable and FPGA-portable, providing a transparent foundation for future extensions, including hardware division and reduced-precision formats.
La crescente diffusione dell’aritmetica in virgola mobile nei carichi di lavoro embedded e IoT, che spaziano dalla fusione di sensori e dal filtraggio digitale fino all’inferenza di reti neurali on-device, richiede il supporto hardware alla virgola mobile in core RISC-V soggetti a vincoli stringenti di area. Tuttavia, l’aggiunta di una FPU convenzionale completamente pipelineizzata a un processore compatto di classe microcontrollore, già limitato in termini di risorse, introduce un costo in silicio sproporzionato rispetto alla densità di utilizzo della virgola mobile in molte di queste applicazioni. Questa tesi analizza come ridurre tale costo progettando un’unità in virgola mobile a precisione singola, conforme a IEEE 754 e ottimizzata in termini di area, riutilizzando sistematicamente le risorse aritmetiche intere già presenti nel core RISC-V proprietario STRIVE-L di STMicroelectronics, anziché duplicare l’hardware. La FPU è stata progettata da zero in SystemVerilog sintetizzabile e implementa l’intero set di istruzioni RISC-V Zfinx a precisione singola, includendo addizione, sottrazione, moltiplicazione, conversione da virgola mobile a intero e da intero a virgola mobile, oltre alle cinque operazioni di confronto, ai cinque modi di arrotondamento IEEE 754 e ai relativi flag di eccezione. Le principali strategie di riduzione dell’area comprendono un algoritmo di moltiplicazione a prodotti parziali, che riduce l’area del moltiplicatore della mantissa di circa il 50% rispetto a una realizzazione diretta, e un modulo condiviso di normalizzazione e arrotondamento utilizzato sia dal percorso addizione/sottrazione sia da quello di moltiplicazione. È stata inoltre sviluppata e valutata una variante pipelineizzata. La FPU standalone raggiunge una frequenza massima di 179 MHz con un’area stressata di 18,2KGE, e 295 MHz quando viene inserito un registro di pipeline tra la fase aritmetica e quella di normalizzazione. La correttezza funzionale è stata validata tramite circa 47.000 coppie di operandi casuali per operazione e per modo di arrotondamento, confrontate con un modello di riferimento affidabile, senza osservare alcuna discrepanza. L’integrazione in STRIVE-L valuta quattro strategie di condivisione delle risorse. La condivisione del solo moltiplicatore esistente da 17-bit tramite una FSM modificata basata sui prodotti parziali offre il miglior compromesso: l’area della FPU integrata si riduce del 17,2% rispetto al caso senza condivisione, e l’area stressata dell’intero CPU scende da 44.8KGE a 43.3KGE, con un impatto temporale contenuto di soli 0,2 ns sul periodo di clock. La condivisione dell’adder fornisce un miglioramento di area più limitato e una frequenza massima inferiore rispetto alla soluzione con condivisione del moltiplicatore a frazioni parziali, motivo per cui non viene scelta come architettura finale. La condivisione dello shifter, invece, risulta penalizzante, poiché riduce la frequenza massima da 173 MHz a 159 MHz a fronte di un guadagno di area trascurabile. Il progetto integrato finale viene verificato a livello di sistema mediante programmi assembly RISC-V auto-verificanti e validato sulla FPGA Digilent Arty A7-100T. Il design risultante raggiunge un’area relaxed di 34,8KGE a 125 MHz, rispetto ai 35KGE dell’implementazione STRIVE-L basata su IP Synopsys DesignWare alla stessa frequenza, con una differenza inferiore all’1%. A differenza dell’IP proprietario, la FPU sviluppata è completamente configurabile e portabile su FPGA, fornendo una base trasparente per future estensioni, inclusa la divisione hardware e i formati a precisione ridotta.
Optimizing resource allocation between integer arithmetic logic unit and floating-point unit for RISC-V architectures
Ali Iqtadar Jafri
2025/2026
Abstract
The growing deployment of floating-point arithmetic in embedded and IoT workloads, ranging from sensor fusion and digital filtering to on-device neural network inference, demands hardware floating-point support in area-constrained RISC-V cores. However, adding a conventional fully pipelined FPU to a compact microcontroller-class processor, which is resource-constrained, incurs a silicon cost that is disproportionate to the floating-point workload density of many such applications. This thesis investigates how to minimize that cost by designing an area-efficient, IEEE 754-compliant, single-precision floating-point unit and systematically reusing the existing integer arithmetic resources of STMicroelectronics’ proprietary RISC-V core, STRIVE-L, rather than duplicating hardware. The FPU is designed from scratch in synthesizable SystemVerilog, implementing the full RISC-V Zfinx single-precision instruction set, which includes operations such as addition, subtraction, multiplication, floating-point-to-integer and integer-to-floating-point conversion, and all five comparison operations along with all five IEEE 754 rounding modes and exception flags. Key area-reduction strategies include a partial-product multiplication algorithm that reduces the mantissa multiplier area by approximately 50% relative to a direct implementation, and a shared normalization and rounding module used by both the addition/subtraction and multiplication paths. A pipelined variant is also developed and evaluated. The standalone FPU achieves a maximum frequency of 179MHz at a stressed area of 18.2KGE, and 295MHz when a pipeline register is inserted between the arithmetic and normalization stages. Functional correctness is validated through approximately 47,000 randomized operand pairs per operation per rounding mode against a trusted reference model, with zero mismatches observed. Integration into STRIVE-L evaluates four resource-sharing strategies. Sharing only the existing 17-bit multiplier through a modified partial-product FSM yields the best balance: the integrated FPU area is reduced by 17.2% relative to the no-sharing baseline, and the full CPU stressed area drops from 44.8KGE to 43.3KGE, with only a modest timing impact of 0.2 ns on the clock period. Adder sharing provides a smaller area improvement and a lower maximum frequency than the partial-fraction multiplier-sharing solution, so it is not selected as the final architecture. Shifter sharing is shown to be detrimental, degrading the maximum frequency from 173MHz to 159MHz for a negligible area gain. The final integrated design is verified at the system level using self-checking RISC-V assembly programs and validated on the Digilent Arty A7-100T FPGA. The resulting design achieves a relaxed area of 34.8KGE at 125 MHz, compared with 35KGE for the incumbent STRIVE-L implementation based on Synopsys DesignWare IP at the same frequency, which is a difference of less than 1%. Unlike the proprietary IP, the custom FPU is fully configurable and FPGA-portable, providing a transparent foundation for future extensions, including hardware division and reduced-precision formats.| File | Dimensione | Formato | |
|---|---|---|---|
|
2026_07_Ali_Iqtadar_Jafri_Thesis_01.pdf
non accessibile
Descrizione: Main Thesis
Dimensione
1.28 MB
Formato
Adobe PDF
|
1.28 MB | Adobe PDF | Visualizza/Apri |
|
2026_07_Ali_Iqtadar_Jafri_Executive_Summary_02.pdf
non accessibile
Descrizione: Executive Summary
Dimensione
559.41 kB
Formato
Adobe PDF
|
559.41 kB | Adobe PDF | Visualizza/Apri |
I documenti in POLITesi sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.
https://hdl.handle.net/10589/260620