A Method for Automatically Implementing FPGA-basedPipelined Microprocessors

Yu-xiang Zeng, Han Wan, Bo Jiang, Xiaopeng Gao2017 · DOI

Abstract

Designing pipelined microprocessors is a complex task, primarily due to the intricate management of hazards. This paper presents an automated method for generating Verilog implementations of pipelined microprocessors from high-level Register Transfer Language (RTL) descriptions. By employing a mathematical model to optimize hazard resolution and incorporating out-of-order execution for multi-cycle instructions, the proposed framework reduces redundancy and improves instruction throughput. Experimental results on a MIPS architecture demonstrate that the automated designs achieve superior clock frequencies and comparable resource efficiency compared to manual implementations.

Introduction: The "Hazard Headache"

Pipelining is a fundamental technique for enhancing processor performance by overlapping the execution of multiple instructions. However, it introduces various hazards—structural, data, and control—that prevent instructions from executing in consecutive clock cycles. Manually managing these hazards is error-prone and often results in suboptimal hardware utilization. While existing automation tools exist, they frequently suffer from architectural rigidity or generate inefficient, redundant logic. This research addresses these challenges by providing a flexible, automated generation process that optimizes both the controller and the datapath without sacrificing performance.

Methodology

The core of the proposed framework is the automatic synthesis of pipelined logic from RTL sequences. The process involves several key components:

RTL-Based Specification and Pipeline Generation

Users define instructions using a simplified RTL syntax. For instance, a connection is denoted as X.a -> Y.b, and data that must be propagated through pipeline stages is marked with X.a >>. The system analyzes these descriptions to construct the necessary datapath and control signals.

Figure 2: A 5-stage pipeline diagram illustrating the RTL-based specification and data flow across stages.

Optimized Hazard Resolution

The method moves beyond simple stalling by utilizing a mathematical model to determine optimal bypassing or stalling requirements. By identifying and eliminating "redundant stalls"—hazards that are theoretically possible but unreachable in practice—the system reduces hardware overhead. Bypassing is treated as a timing calculation based on the "distance" in cycles between data production and consumption.

Out-of-Order Execution

To efficiently handle multi-cycle operations like multiplication or division, the framework adopts an out-of-order execution mechanism. This prevents slow instructions from stalling the entire pipeline, allowing subsequent independent instructions to proceed.

Evaluation and Results

The framework was evaluated using a 5-stage MIPS architecture supporting 53 instructions. To establish a baseline for human performance, the automated output was compared against designs created by 35 students in a computer architecture course.

Performance Benchmarks

The automated design significantly outperformed the manual efforts in several key metrics:

  • Clock Frequency: The generated design reached 155.65 MHz, surpassing the student average of 67.40 MHz and even the best student design of 137.86 MHz.
  • Resource Utilization: The tool used 1,674 Flip-Flops (FF) and 3,143 Basic Element Logics (BEL). While FF usage was slightly higher than the best manual design, the BEL count was significantly lower than the student average (4,701).
  • Power Efficiency: At 188.15 mW, the automated design was more power-efficient than the average manual design (203.32 mW).

Discussion and Limitations

The primary insight of this work is that mathematical modeling of hazard reachability can drastically reduce hardware redundancy. Furthermore, treating bypassing as a timing problem allows for more efficient logic synthesis.

However, some limitations remain. The current case study focuses on a 5-stage MIPS pipeline; the scalability to deeper (10+ stages) or superscalar architectures is yet to be demonstrated. Additionally, the system currently relies on standard techniques for control hazards, such as static prediction and delay slots, rather than a novel automated approach. Finally, as architectures become more complex, the manual effort required to write accurate RTL descriptions may become a significant bottleneck.

Conclusion

This research provides a robust method for automating the design of high-performance pipelined microprocessors. By bridging the gap between high-level RTL descriptions and optimized Verilog implementations, the framework enables the rapid development of efficient hardware that rivals or exceeds manual design quality.

Summary updated

Abstract

This paper presents a method of automatically generating the Verilog implementation of pipelined micro-processors. Based on the RTL descriptions of instructions, all types of hazards in pipelining are addressed optimally, especially in avoiding redundancy, reducing resource utilization and improving instruction throughput. Moreover, out-of-order execution mechanism is adopted in order to support multi-cycle instructions more efficiently. Besides, all the multiplexers and logics of control signals are analyzed and produced all by the method. The synthesized implementations of both pipelined controllers and datapaths are generated automatically, based on non-fixed architectures. A case study based on MIPS architecture not only explains the framework from input to simulation, but also illustrates the method gains almost equal performance with manual work.
BibTeX
@misc{zeng2017method,
  author = {Yu-xiang ZENG and Han Wan and Bo Jiang and Xiaopeng Gao},
  title = {{A Method for Automatically Implementing FPGA-basedPipelined Microprocessors}},
  year = {2017},
  doi = {10.2991/cnct-16.2017.65},
}
Figure