Synthesis of AMBA AHB from Formal Specification

Yashdeep Godhal, Krishnendu Chatterjee, Thomas A. HenzingerarXiv 2010

Abstract: The standard procedure for hardware design consists of describing circuits in a hardware description language at the logic level followed by extensive verification and logic synthesis. However, this process consumes significant time and effort. An alternative is to use formal specification language as a high-level hardware description language and synthesize hardware directly. This paper presents more complete and compact formal specifications for the AMBA AHB Arbiter, achieving an order-of-magnitude improvement in synthesis results regarding both time and gate count. Additionally, we present formal specifications for the AMBA AHB Master and Slave, and derive principles for writing efficient formal specifications for hardware synthesis.

The Challenge of Manual Hardware Design

Traditional hardware design is a "manual-first" process where engineers write code in Hardware Description Languages (HDLs) like Verilog or VHDL. This is followed by an exhausting cycle of verification and logical synthesis. Verification is often the primary bottleneck, consuming the majority of design time.

The "holy grail" alternative is formal synthesis: providing a mathematical specification of what the circuit should do and letting a tool automatically generate the gate-level implementation. However, synthesizing from general Linear Temporal Logic (LTL) is notoriously difficult due to its doubly exponential complexity. This research addresses this intractability by using a more efficient subset of logic and smarter specification techniques.

System Architecture and Methodology

The researchers utilized the Generalized Reactivity of rank 1 (GR(1)) fragment of LTL. Unlike general LTL, GR(1) synthesis can be solved in polynomial time. The workflow treats synthesis as a two-player game between the "environment" (inputs) and the "system" (outputs). The goal is to find a winning strategy for the system that satisfies the specification regardless of environment behavior.

The AHB Arbiter block diagram showing the interface signals between the environment and the system.

As shown in the block diagram above, the Arbiter must manage requests and locks from multiple masters while providing grants and control signals. The toolchain used Anzu to solve the synthesis game and generate Binary Decision Diagrams (BDDs), followed by the ABC tool to optimize the resulting logic and map it to a standard cell library.

Formal Specification Strategy

A key contribution of this work is the introduction of auxiliary signals (such as DECIDE, GRANTED, and START). These act as internal monitors that simplify the logic, making the state space much easier for the synthesis engine to navigate. By refining the formal specifications to be more "complete and compact," the authors avoided the state-space explosion that plagued previous attempts.

Formal specifications for the AHB Arbiter, categorized into environment assumptions (A) and system guarantees (G).

The specifications shown above define the rigorous logic the system must follow. For example, guarantee G6 ensures that the master is correctly updated based on the ready signal and current grants, while G11 ensures eventual progress (liveness) for bus requests.

Key Results and Performance

The results demonstrate a massive improvement over previous state-of-the-art attempts to synthesize the AHB Arbiter:

  • Synthesis Speed: For an arbiter serving 10 masters, synthesis time dropped from approximately 5 hours to just 11 minutes.
  • Circuit Efficiency: The gate count for the 10-master arbiter was reduced from ~46,000 gates to just ~2,800 gates.
  • Scalability: While previous methods failed beyond 10 masters, this approach successfully scaled to 16 masters (the protocol's maximum) in about an hour.
  • Completeness: This work is the first to successfully synthesize formal specifications for the AHB Master (157 gates) and AHB Slave (214 gates) components, completing the protocol suite.

Conclusion

This research proves that with intelligently written, complete formal specifications, it is possible to automatically synthesize important and widely used industrial protocols. While the approach is currently best suited for control-specific applications rather than data-intensive arithmetic logic, it represents a significant step toward reducing the manual burden of hardware verification and design. Future work may extend these principles to even more complex protocols like AXI.

Summary updated

BibTeX
@misc{godhal2010synthesis,
  author = {Yashdeep Godhal and Krishnendu Chatterjee and Thomas A. Henzinger},
  title = {{Synthesis of AMBA AHB from Formal Specification}},
  year = {2010},
  eprint = {1001.2811},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1001.2811},
}
Figure