TL;DR
VeriPPA is a novel, open-source framework that leverages Large Language Models (LLMs) to automate the generation of Verilog code that is both functionally correct and optimized for Power, Performance, and Area (PPA). By introducing a two-stage refinement process that couples simulation feedback with physical logic synthesis, VeriPPA significantly outperforms existing state-of-the-art methods while reducing computational token costs.
What Problem Does This Paper Address?
As chip design grows exponentially complex, traditional Electronic Design Automation (EDA) tools are pushed to their limits, demanding massive amounts of time and human expertise. Recently, researchers have turned to LLMs to translate natural language specifications into Hardware Description Languages (HDLs) like Verilog.
However, existing LLM-based code generation approaches suffer from a major blind spot: they only focus on making the code work (functional and syntactic correctness). In the real world, a piece of hardware isn't just judged by whether it works, but by its PPA (Power, Performance, and Area) metrics. Until now, no automated LLM framework provided a feedback loop capable of optimizing these critical physical constraints.
Methods
The authors introduce VeriPPA, a systematic two-stage framework designed to bridge the gap between AI text generation and physical hardware implementation.
- Stage 1: Code Generation and Testing (VeriRectify): The framework passes a text-based hardware description to an LLM (such as GPT-4 or Llama-3.1) to generate initial Verilog code. This code is immediately tested using the open-source ICARUS Verilog simulator against design-specific testbenches. If the code fails, an automated multi-round dialogue mechanism called VeriRectify feeds the exact syntax errors or testbench failures back to the LLM for iterative correction (up to 4 rounds).
- Stage 2: PPA Optimization: Once the code passes simulation, it enters the physical synthesis stage. VeriPPA invokes Synopsys Design Compiler alongside the ASAP 7nm Predictive Process Design Kit (PDK) to generate real-world PPA reports. If the design fails to meet specified PPA constraints (e.g., the clock period is too slow), the framework uses In-Context Learning (ICL). It provides the LLM with a 4-shot prompt detailing specific hardware optimization strategies—such as pipelining, clock gating, parallel operations, or hierarchical restructuring—to guide the model in refactoring the code for better physical performance.
Datasets
The framework was evaluated using two prominent hardware generation benchmarks:
- RTLLM: A dataset containing 29 complex circuit designs.
- VerilogEval: Consisting of two subsets derived from the HDLBits instructional website: VerilogEval-human (156 designs) and VerilogEval-machine (108 designs).
Key Insights and Ideas
- Closing the EDA Loop: VeriPPA is the first framework to successfully feed physical synthesis metrics (PPA) back into an LLM prompt, moving AI hardware generation beyond simple code compilation into true hardware engineering.
- Targeted Refactoring via ICL: Instead of blindly asking the LLM to "make it faster," providing explicit architectural strategies (like pipelining vs. parallel execution) allows the LLM to act like an experienced engineer, choosing the right structural tool for the job.
- Efficiency Over Open-Ended Planning: By utilizing precise error diagnostics from simulators rather than complex autonomous agent planning, VeriPPA achieves better accuracy with significantly lower computational overhead.
Key Results
VeriPPA achieved state-of-the-art (SOTA) results across multiple models and benchmarks:
- RTLLM Dataset: Reached 81.37% syntactic correctness and 62.06% functional correctness, outperforming previous SOTA methods by +8.3% and +16% respectively.
- VerilogEval Dataset: Achieved an impressive 99.56% syntactic correctness and 43.79% functional correctness using GPT-4.
- Open-Source Viability: When applied to the massive Llama-3.1-405B model, VeriPPA boosted functional accuracy from 20.68% to 44.82%.
- PPA Optimization Success: For an
adder_32bitdesign, the framework successfully optimized the code to drop the achievable clock period from a non-optimized 500ps down to a highly efficient 180ps. - Computational Cost Reduction: In a head-to-head single-iteration comparison against SOTA self-planning methods, VeriPPA used 14.71% fewer tokens and required trillions fewer Multiply-Accumulate (MAC) operations while delivering superior accuracy.
Limitations and Future Work
While VeriPPA is highly effective with frontier models (like GPT-4 and Llama-3.1-405B), the authors noted that smaller open-source models (such as Llama-2-7B or CodeLlama-7B) still struggle. Though VeriPPA improved their syntax accuracy, these smaller models failed to achieve functional correctness under rigorous testbenches.
Future work will likely focus on optimizing the framework to help smaller, edge-deployable LLMs handle complex hardware verification and multi-module PPA optimization tasks.
Summary updated