Abstract
This paper introduces DeepCircuitX, a comprehensive repository-level dataset designed to advance RTL (Register Transfer Level) code understanding, generation, and power-performance-area (PPA) analysis. Unlike existing datasets that are limited to either file-level RTL code or physical layout data, DeepCircuitX provides a holistic, multilevel resource that spans repository, file, module, and block-level RTL code. This structure enables more nuanced training and evaluation of large language models (LLMs) for RTL-specific tasks. DeepCircuitX is enriched with Chain of Thought (CoT) annotations, offering detailed descriptions of functionality and structure at multiple levels. These annotations enhance its utility for a wide range of tasks, including RTL code understanding, generation, and completion. Additionally, the dataset includes synthesized netlists and PPA metrics, facilitating early-stage design exploration and enabling accurate PPA prediction directly from RTL code. We demonstrate the dataset's effectiveness on various LLMs finetuned with our dataset and confirm the quality with human evaluations. Our results highlight DeepCircuitX as a critical resource for advancing RTL-focused machine learning applications in hardware design automation. Our data is available at https://zeju.gitbook.io/lcm-team.
Introduction
In the domain of hardware design, Register Transfer Level (RTL) code serves as the fundamental blueprint for silicon implementation. Despite the success of Large Language Models (LLMs) in software engineering, their application to RTL design has been hindered by three primary challenges: a narrow scope of existing datasets, a lack of hierarchical context, and the "physical gap" between code and hardware metrics like Power, Performance, and Area (PPA). DeepCircuitX addresses these gaps by providing a massive, multimodal repository-level dataset that bridges high-level RTL intent with low-level physical implementation.
Methodology
The construction of DeepCircuitX involves a sophisticated pipeline designed to capture the complexity of hardware projects, moving from raw repository data to enriched, synthesized outputs.
Multilevel Hierarchy and CoT Annotation
Unlike snippet-based datasets, DeepCircuitX organizes data into four tiers: Repository, File, Module, and Block. This structure enables models to learn cross-file dependencies and global design constraints. To enhance semantic understanding, the authors utilized LLMs (GPT-4 and Claude) to generate Chain-of-Thought (CoT) annotations. These annotations provide natural language descriptions and Q&A pairs at every hierarchy level, effectively "explaining" the hardware logic to the training model.
Circuit Transformation
To bridge the physical gap, RTL code is processed through commercial Electronic Design Automation (EDA) tools. This transformation produces structural representations such as Abstract Syntax Trees (ASTs) and Control/Data Flow Graphs (CDFGs), as well as physical implementations like post-mapping netlists and And-Inverter Graphs (AIGs). Crucially, the dataset includes real-world PPA reports across technology nodes ranging from 180nm to 7nm, providing the ground truth necessary for predictive modeling.
Dataset Characteristics
DeepCircuitX comprises over 4,000 repository-level RTL projects, encompassing 140,000+ files across 77 functional categories, including IPs, SoCs, and arithmetic units. It includes synthesis results for multiple technology nodes, such as GlobalFoundries 180nm, Skywater 130nm, Nangate 45nm, and ASAP 7nm. This diversity makes it a robust benchmark for RTL understanding, generation, and neural-network-based PPA prediction.
Results and Evaluation
Fine-tuning LLMs on DeepCircuitX yielded significant performance improvements. For instance, CodeGen2.5 (7B) saw its Pass@1 score on the RTLLM benchmark increase from 17.24% to 24.14%. In PPA prediction tasks, models trained on the dataset achieved a Mean Absolute Error Percentage (MAPE) as low as 0.33% for area prediction. Human evaluation of the AI-generated CoT annotations confirmed high quality, with an average accuracy score of 3.7/4.0, validating the top-down annotation approach.
Conclusion
DeepCircuitX represents a significant advancement in EDA-focused machine learning. By providing a repository-level context and linking RTL code to physical metrics, it enables the development of more capable AI assistants for hardware design. Future work will focus on improving timing (delay) prediction, which remains a challenge due to non-linear synthesis optimizations, and enhancing cross-library generalization.
Summary updated