FormalRTL: Verified RTL Synthesis at Scale

FormalRTL is a novel end-to-end multi-agent framework that leverages software reference models as formal specifications to enable scalable, verified, and reliable register-transfer level (RTL) code generation for complex industrial hardware designs.

Kezhi Li, Min Li, Xiangyu Wen, Shibo Zhao, Jieying Wu, Junhua Huang, Qiang Xu

Published Wed, 11 Ma
📖 5 min read🧠 Deep dive

Imagine you are trying to build a massive, incredibly complex skyscraper (a computer chip). In the past, you had to hire a team of architects and engineers to draw every single brick, beam, and wire by hand. It took years, cost a fortune, and if they made one tiny mistake in the blueprint, the whole building could collapse.

Recently, we discovered a magical new tool: an AI that can write blueprints just by listening to your description. But there's a catch. If you just tell the AI, "Build me a skyscraper with a glass roof," it might build a house, or a tower with a roof made of jelly. It's great at writing words, but it's terrible at understanding the strict laws of physics and engineering required to keep a building standing.

This is the problem the paper FormalRTL solves.

The Problem: The "Vague Instructions" Trap

Current AI tools try to turn human language directly into hardware code.

  • The Issue: Human language is fuzzy. You might say "make it fast," but the AI doesn't know if that means "fast like a race car" or "fast like a cheetah."
  • The Result: The AI generates code that looks okay but fails when tested. In the chip world, this is like building a bridge that looks beautiful but collapses when a truck drives over it.

The Solution: The "Golden Blueprint"

The authors of this paper realized that in the real world, engineers don't just guess. They have a "Golden Blueprint" (a software reference model written in C/C++). This is a perfect, mathematically proven simulation of how the chip should work before they ever build the real thing.

FormalRTL is a new system that acts like a super-smart construction foreman. Instead of letting the AI guess the blueprint, it forces the AI to follow the Golden Blueprint step-by-step.

How It Works: The Three-Worker Team

The system uses three specialized AI "agents" (workers) that talk to each other to build the chip:

1. The Planner (The Site Manager)

  • What it does: Before building, the Planner looks at the Golden Blueprint (the C code) and breaks the giant skyscraper down into small, manageable rooms (sub-modules).
  • The Analogy: Imagine you are baking a massive wedding cake. Instead of telling the baker, "Make the whole cake," the Planner says, "First, bake the bottom tier. Then, bake the middle tier. Finally, bake the top." It uses a map of the dependencies (what needs to be built before what) so the team never gets confused.

2. The Builder (The Mason)

  • What it does: The Builder takes one small "room" (sub-module) and the Golden Blueprint for that specific room. It writes the actual hardware code (RTL) to build it.
  • The Analogy: The Builder is a master mason. They look at the plan for the "kitchen" and lay the bricks. Crucially, they don't just guess; they build it so it matches the Golden Blueprint exactly.

3. The Inspector & Fixer (The Quality Control)

  • What it does: This is the most important part. Once the Builder finishes a room, the Inspector immediately checks it against the Golden Blueprint.
    • If it matches: Great! Move to the next room.
    • If it fails: The Inspector doesn't just say "Wrong." It finds the exact brick that is out of place and tells the Builder, "You put a red brick where a blue one should be." The Builder then fixes it.
  • The Analogy: Think of this like a spell-checker for math. If you write 2 + 2 = 5, a normal spell-checker might not catch it. But this Inspector is a math genius that instantly sees the error, points to the number 5, and says, "Change this to 4."

Why This is a Big Deal

  • No More "Black Boxes": Old AI methods were like throwing darts in the dark. This method is like following a GPS.
  • Scalability: They tested this on designs with over 1,000 lines of code (which is huge for AI). The system successfully built complex math chips (like those used in AI processors) that previous AI tools failed to create.
  • Formal Proof: The system doesn't just "hope" the chip works; it mathematically proves the hardware matches the software blueprint. It's like having a guarantee from the universe that the bridge won't fall.

The Trade-off

The paper admits that the chips built by this AI aren't quite as perfectly optimized (smaller or faster) as chips built by a human genius engineer who has spent 20 years on the project.

  • The Analogy: The AI-built chip is like a house built by a very fast, very accurate robot. It's 100% safe and functional, but a human architect might have squeezed in one extra closet or made the windows slightly larger.
  • The Benefit: However, getting a working chip in days instead of years is a massive win. Engineers can then take this "good enough" base and tweak it to make it perfect.

Summary

FormalRTL is like giving an AI a strict, mathematically perfect recipe (the software model) and a team of specialized workers (planner, builder, inspector) to follow it. Instead of guessing how to build a computer chip, the AI is forced to prove, step-by-step, that its construction matches the recipe. This turns the chaotic process of "AI guessing" into a reliable, industrial-grade manufacturing line.