TL;DR
RocketPPA is an ultra-fast estimator that predicts Power, Performance (delay), and Area (PPA) directly from Verilog code by combining a Large Language Model (LLM) with a Mixture-of-Experts (MoE) architecture. It achieves state-of-the-art accuracy while running up to 30x faster than existing methods, effectively removing the "synthesis bottleneck" in the hardware design loop.
What Problem Does This Paper Address?
In modern VLSI (Very Large Scale Integration) design, the "inner loop" of development is painfully slow. To know if a change in your Verilog code actually improved the design, you typically have to run it through a synthesis and timing analysis flow. This process can take minutes or even hours for complex modules.
While researchers have tried to use Machine Learning to predict these metrics, they usually rely on manual feature engineering (like counting gates) or abstract models that fail to capture the nuanced interactions of modern circuits. Existing LLM-based approaches are either too slow (relying on Chain-of-Thought reasoning) or struggle with the massive dynamic range of PPA values (where one module might be 1,000x larger than another).
Methods
RocketPPA introduces a specialized neural architecture designed for regression rather than text generation:
- LLM Backbone: The model uses a foundation LLM (like Llama-3.1-8B or CodeLlama-7B) as a sophisticated feature extractor. Instead of predicting the next token, the authors extract the hidden-layer representations of the input Verilog code.
- Mixture-of-Experts (MoE) Regressor: Rather than using a single prediction head, the model employs a "Mixture of Experts." It consists of $N$ distinct Multi-Layer Perceptron (MLP) experts. A gating network analyzes the code embedding and selects the top-$k$ experts most suited for that specific design (e.g., one expert might specialize in arithmetic logic, another in finite state machines).
- Parameter-Efficient Fine-Tuning: The authors use LoRA (Low-Rank Adaptation) to fine-tune the LLM. This allows them to adapt an 8-billion parameter model to the hardware domain by only training a tiny fraction (~0.11%) of the parameters.
- Fragment Averaging: To handle Verilog files that exceed the LLM’s token limit, RocketPPA splits the code into 512-token fragments, processes them individually, and averages their embeddings to create a single, unified representation.
- Numerical Stability: They employ a log-transformation followed by Z-score normalization to compress the wide range of PPA values into a standard normal distribution, making the regression task much more stable.
Datasets
The authors compiled a massive dataset of ~21,000 Verilog modules from three primary sources:
- MG-Verilog: A large-scale repository of Verilog modules.
- verilog_github: A curated collection of hardware code from GitHub.
- VeriGen: A dataset designed for Verilog code generation.
Key Innovation: Because raw "scraped" code is often buggy, the authors developed an LLM-based HDL code repair framework. This "purifies" the dataset by automatically fixing syntax errors, ensuring every module in the training set is actually synthesizable and has valid ground-truth PPA data.
For evaluation, they used the VerilogEval benchmark, specifically focusing on "Level 3" tasks, which represent the most complex and challenging designs.
Key Insights and Ideas
- Semantics > Syntax: Traditional tools look at gate counts; RocketPPA looks at intent. By using an LLM, the model understands the high-level logic of the code, which often correlates more strongly with physical implementation than simple text-based features.
- Specialization Wins: The MoE architecture consistently outperformed standard "dense" regression heads. This suggests that hardware designs fall into distinct categories that benefit from specialized sub-models.
- The "Huber" Advantage: Using Smooth L1 (Huber) loss was critical. It acts like Mean Squared Error (MSE) for small errors but becomes linear for large errors, preventing extreme outliers in the dataset from "breaking" the model during training.
Key Results
- Accuracy Boost: At a 10% relative error threshold, RocketPPA improved the "pass rate" (the percentage of designs predicted accurately) by 13.6% for area, 9.4% for delay, and 14.7% for power compared to the previous state-of-the-art (Llama3-MetRex-8B).
- Massive Speedup: RocketPPA processed the entire test set in just 16 seconds. This is 20x faster than MetRex and 30x faster than MasterRTL.
- Robustness on Complex Code: On the difficult Level-3 VerilogEval designs, where other models' accuracy plummeted, RocketPPA maintained high performance, showing only a minor drop in pass rate.
Limitations and Future Work
- Module-Level Focus: Currently, the model is trained on individual Verilog modules. Predicting PPA for an entire System-on-Chip (SoC) with millions of gates remains a future challenge.
- Embedding Averaging: While fragment averaging works for long files, it might lose some structural dependencies between distant parts of the code. Exploring "Longformer" architectures or hierarchical attention could be a next step.
- Closing the Loop: The authors suggest that RocketPPA could eventually be integrated into an automated design agent that not only predicts PPA but also suggests code rewrites to optimize it.
Summary updated