Spec2Doc2RTL: RTL Generation from Specification with Natural Language Representation
This paper presents Spec2Doc2RTL, a hierarchical LLM-based RTL code generation framework leveraging natural language as the intermediate design representation. To address the complexity of design hierarchies and circuit diversity, we propose a universal recursive decomposition method that transforms the circuit design process into the nested module implementations. We introduce a register-transfer-level (RTL) code generation pipeline from design specifications based on natural language representation, which includes two LLM-friendly stages: design document generation (Spec2Doc) and document-to-RTL translation (Doc2RTL). Moreover, a fully automated iterative design workflow is implemented, with script generation, testing, and debugging integrated. Experimental results demonstrate that Spec2Doc2RTL can generate a wide spectrum of circuits, from complex systems like CPUs and NTTs to foundational bottom-level modules with a competitive 78.8% accuracy on the Revisiting VerilogEval benchmark.
Authors
- Yuxuan Qiao (ORCID: https://orcid.org/0009-0009-0817-261X)
- Changxu Liu (ORCID: https://orcid.org/0009-0000-0132-1461)
- Yanping Feng (ORCID: https://orcid.org/0000-0003-4723-5408)
- Yifan Song (ORCID: https://orcid.org/0009-0004-6205-2655)
- Zihan Lin (ORCID: https://orcid.org/0000-0001-6819-062X)
- Julian Y. Zuo (ORCID: https://orcid.org/0000-0002-6743-2137)
- Xinhua Chen (ORCID: https://orcid.org/0000-0003-2379-7596)
- Zhiyi Liu (ORCID: https://orcid.org/0000-0002-8122-8474)
- Fan Yang (ORCID: https://orcid.org/0000-0001-9604-913X)
- Zihao Chen (ORCID: https://orcid.org/0009-0004-5372-3525)
Institutions
- Fudan University (CN)
- Shanghai Fudan Microelectronics (China) (CN)
Publication Details
- Published
- 2025-05-09
- DOI
- https://doi.org/10.1109/iseda65950.2025.11101140
- Primary Topic
- Natural Language Processing Techniques
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- National Natural Science Foundation of China