TL;DR
This paper revisits the design of RISC CPUs for the Internet of Things (IoT) era, moving beyond custom instruction sets to optimize the core microarchitecture. By exploring various combinations of instruction fetch mechanisms, branch prediction, and bus widths on an FPGA-based RISC-V platform, the authors provide practical design guidelines for efficient IoT processors.
What Problem Does This Paper Address?
The explosion of the Internet of Things (IoT) has created a demand for low-power, high-performance computing architectures. The current trend is to extend the Instruction Set Architecture (ISA) of RISC CPUs with custom instructions to handle complex IoT tasks like AI and augmented reality. However, this approach can lead to reduced flexibility and increased design complexity. This paper argues that a more fundamental optimization of the RISC CPU's microarchitectural design, focusing on communication and memory access, can achieve similar or better results with greater flexibility. The challenge is to systematically evaluate and understand the trade-offs between different microarchitectural components (instruction cache, branch prediction, bus width) in the context of FPGA implementations, which are increasingly relevant for IoT.
Methods
The authors developed a reference System-on-Chip (SoC) featuring a 32-bit RISC-V CPU with Integer, Multiply, and Floating Point (IMF) extensions. This SoC was implemented on an FPGA (Xilinx Artix 100t) to allow for detailed gate-level analysis of area, timing, and performance. They systematically explored various microarchitectural configurations for the Instruction Fetch (IF) stage, including:
- Branch Prediction Schemes: Always-not-taken (baseline), static (backward-taken/forward-not-taken), and dynamic (saturation and gShare).
- Instruction Cache/FIFO: A miniCache (4-line, fully associative) and an 8-instruction FIFO queue, compared against no cache.
- Instruction Bus Width: Both 32-bit and 64-bit instruction buses were evaluated on the 32-bit CPU architecture.
The performance was evaluated using a suite of 29 WCET (Worst-Case Execution Time) benchmarks. The results were analyzed to understand the interplay between these components and to derive design guidelines.
Datasets
The paper uses a suite of 29 WCET benchmarks, which are described as a representative mix of algorithm types from both embedded and general-purpose computing domains. These benchmarks were executed on the developed FPGA platform and also on an x86-64 laptop for validation. No new benchmarks were introduced; instead, existing ones were used to stress-test the different microarchitectural configurations.
Key Insights and Ideas
- FIFO Outperforms MiniCache for Area-Constrained Designs: The instruction FIFO queue consistently offers better performance than the miniCache, especially when area is a critical concern. Its ability to abort burst transactions and its efficient prefetching scheme contribute to this advantage.
- 64-bit Instruction Bus is a Win-Win: Employing a 64-bit instruction bus on a 32-bit architecture significantly reduces instruction fetch latency with negligible impact on area and timing. This is crucial for improving performance, particularly for cache-line refills.
- Branch Prediction is Crucial, but Simplicity Can Suffice: While advanced branch predictors like gShare offer better performance, even a simple backward-taken/forward-not-taken scheme provides substantial improvements over no prediction. The choice depends on the area constraints.
- Interplay Matters: The performance of different components is not independent. For instance, the choice of branch prediction scheme can influence the effectiveness of cache designs.
- FPGA as a Viable Platform: The study highlights the suitability of FPGAs for exploring and validating microarchitectural designs for IoT, offering a good balance between performance estimation and implementation feasibility.
Key Results
- Performance: The best-performing configurations (e.g., using a 64-bit bus, FIFO, and gShare predictor) achieved significant performance improvements compared to the worst-case scenario (no cache, no prediction, 32-bit bus). For example, the FIFO queue showed up to a 10% performance improvement over the miniCache. The 64-bit instruction bus provided an average performance improvement of 5.25% for the miniCache.
- Area: The area overhead for LUTs and flip-flops was generally modest, with LUT overhead being more significant (up to 9%) and influenced by the FIFO/miniCache and branch predictor complexity.
- Timing: Timing slack was primarily affected by the branch prediction scheme, but overall, the designs maintained reasonable timing margins at 70 MHz.
- Design Guidelines: The paper provides three key guidelines:
- FIFO for Area-Constrained Designs: Prioritize FIFO for designs where area is critical.
- 64-bit Instruction Bus: Use a 64-bit instruction bus on 32-bit architectures for performance gains with minimal overhead.
- Branch Prediction: Select a scheme based on area constraints (backT/FwdNT) or performance needs (gShare), being mindful of resource utilization.
Limitations and Future Work
- Limited ISA Extension Exploration: The study focuses solely on microarchitectural optimizations and does not explore the impact of ISA extensions, which is a common practice in IoT.
- FPGA-Specific Implementation: While FPGAs are relevant for IoT, the results are tied to the specific FPGA used and may not directly translate to ASIC implementations without further analysis.
- Single-Core Focus: The research primarily focuses on a single-core CPU. Future work could explore multi-core scenarios and their associated interconnect challenges.
- Future Work: The authors suggest further exploration of more complex microarchitectures, including out-of-order execution, and investigating the impact of ISA extensions in conjunction with optimized microarchitectures. They also propose extending the analysis to multi-core platforms and exploring different FPGA families.
Summary updated