The dream of using artificial intelligence to design computer chips has long been tantalizing but fraught with peril. Large language models (LLMs) like GPT-5 can generate hardware description language (HDL) code from specifications, promising to revolutionize integrated circuit design by automating what has traditionally been a labor-intensive manual process. However, these models suffer from a critical flaw: they hallucinate. Just as they might invent facts in a conversation, they introduce functional errors into the generated hardware designs—errors that can be subtle, difficult to detect, and catastrophic for a chip's operation. This fundamental reliability issue has kept LLMs on the sidelines of serious hardware design, forcing engineers to choose between the automation of AI and the certainty of traditional s. Now, a breakthrough framework called CorrectHDL is bridging that gap by giving AI a functional reference to check its own work, potentially unlocking a new era of AI-assisted chip design.
Developed by researchers from the Technical University of Munich, Darmstadt, and Ilmenau, CorrectHDL introduces a clever hybrid approach that marries the generative power of LLMs with the rigorous correctness of established electronic design automation (EDA) tools. The framework starts with a C/C++ program that specifies the target circuit's functionality—a more precise input than natural language, directly usable by system engineers. This program is fed to an LLM to generate an initial HDL design, but instead of stopping there, CorrectHDL runs that same C/C++ program through a conventional high-level synthesis (HLS) tool. HLS tools, while mature and reliable, produce functionally correct but often bloated and inefficient HDL code with poor readability. This HLS-generated design serves as a 'golden reference'—a bit-accurate benchmark of what the circuit should do. The LLM's output is then iteratively compared against this reference, with any discrepancies used to guide the AI in correcting its own errors.
Ology behind CorrectHDL is a sophisticated, three-stage agentic process that tackles both syntactic and functional errors systematically. First, complex C/C++ algorithms are decomposed into LLM-friendly submodules using strict rules: function-level granularity, explicit I/O definitions with fixed bit widths, and single clear semantics. This decomposition prevents attention dilution in the LLM, improving initial generation quality. For each submodule, the LLM produces an HDL design, with syntax errors repaired via a Retrieval-Augmented Generation (RAG) mechanism that matches compiler error logs against a library of HDL syntax rules, boosting compilation pass rates by an average of 15.49%. Second, the core innovation kicks in: differential verification. The HLS tool generates a golden reference HDL for each submodule, and both it and the LLM's design are simulated with identical test stimuli. Outputs are compared automatically; mismatches trigger a repair loop where the LLM receives structured feedback—including the erroneous code, the C/C++ specification, and mismatch logs—to debug functional issues like rounding errors or state-retention bugs, improving functional pass rates by 28.05%.
Experimental on 12 real-world benchmarks—including AES encryption, edge detection, and MIPS processors—demonstrate CorrectHDL's transformative impact. The framework achieved an average functional simulation pass rate of 65.63% for top-level designs, a massive leap from the 12.5% seen with direct LLM generation using C/C++ inputs. More impressively, the HDL designs produced are not just correct; they're efficient. Compared to traditional HLS-generated circuits, CorrectHDL's outputs showed an average area reduction of 24.83% and power reduction of 26.98%, approaching the quality of human-engineered designs in many cases. For example, in the AES benchmark, CorrectHDL generated 386 lines of readable HDL versus HLS's 1,879 lines, with area overhead dropping from 9,591 µm² to 7,836 µm². This combination of correctness, efficiency, and readability addresses key industry barriers, where HLS designs are often rejected for ASIC flows due to suboptimal performance and maintainability issues.
Of this work extend far beyond academic curiosity. By providing a reliable functional reference, CorrectHDL mitigates the hallucination problem that has stalled LLM adoption in hardware design, enabling a practical, automated workflow from algorithm to implementation. It represents a shift toward agentic design, where AI tools interact with EDA toolkits—HLS, simulators, synthesis tools—in a closed loop, reducing human intervention. The framework is open-sourced, inviting industry adoption and further refinement. However, limitations remain: the process still requires human verification of testbenches adapted for LLM-generated HDL, and it relies on the availability of C/C++ specifications, though the researchers note natural language could be translated to C/C++ via LLMs as a future step. As AI continues to infiltrate chip design, CorrectHDL offers a blueprint for harnessing its creativity without sacrificing the rigor that hardware demands—a critical step toward faster, cheaper, and more innovative electronics.
Original Source
Read the complete research paper
About the Author
Guilherme A.
Former dentist (MD) from Brazil, 41 years old, husband, and AI enthusiast. In 2020, he transitioned from a decade-long career in dentistry to pursue his passion for technology, entrepreneurship, and helping others grow.
Connect on LinkedIn