Large language models (LLMs) have shown strong performance in Verilog generation from natural language description. However, ensuring the functional correctness of the generated code remains a significant challenge. This paper introduces a method that integrates verification insights from testbench into the training of Verilog generation LLMs, aligning the training with the fundamental goal of hardware design: functional correctness. The main obstacle in using LLMs for Verilog code generation is the lack of sufficient functional verification data, particularly testbenches paired with design specifications and code. To address this problem, we introduce an automatic testbench generation pipeline that decomposes the process and uses feedback from the Verilog compiler simulator (VCS) to reduce hallucination and ensure correctness. We then use the testbench to evaluate the generated codes and collect them for further training, where verification insights are introduced. Our method applies reinforcement learning (RL), specifically direct preference optimization (DPO), to align Verilog code generation with functional correctness by training preference pairs based on testbench outcomes. In evaluations on VerilogEval-Machine, VerilogEval-Human, RTLLM v1.1, RTLLM v2, and VerilogEval v2, our approach consistently outperforms state-of-the-art baselines in generating functionally correct Verilog code. We open source all training code, data, and models at https://anonymous.4open.science/r/VeriPrefer-E88B.
Execution-Anchored Hallucination Calibration Reranking for Verilog Code Generation
State Key Laboratory of Blockchain and Data Security, Zhejiang University(浙江大学区块链与数据安全全国重点实验室);Hangzhou High-Tech Zone (Binjiang) Institute of Blockchain and Data Security(杭州国家高新区(滨江)区块链与数据安全研究院);School of Artificial Intelligence and Computer Science, Nantong University(南通大学人工智能与计算机学院);Department of Computer Science, Monash University(蒙纳士大学计算机科学系);CSIRO’s Data61(澳大利亚联邦科学与工业研究组织数据61)
From Concept to Practice: an Automated LLM-aided UVM Machine for RTL Verification
School of Integrated Circuits, Southeast University(东南大学集成电路学院);National Center of Technology Innovation for EDA(国家EDA技术创新中心);College of Economics, Shenzhen University(深圳大学经济学院);School of Computer Science and Engineering, Sun Yat-sen University(中山大学计算机科学与工程学院);Department of Computer Science, University of York(约克大学计算机科学系);Department of Computer Science, City University of Hong Kong(香港城市大学计算机科学系)
Quality over Quantity: Diversity-Aware Data Selection for Efficient Verilog Code Generation
Northwestern Polytechnical University(西北工业大学);Nantong Normal College(南通师范高等专科学校);East China Normal University(华东师范大学);Nantong University(南通大学);Zhejiang University(浙江大学)
RealBench: Benchmarking Verilog Generation Models with Real-World IP Designs
State Key Lab of Processors, Institute of Computing Technology, CAS(处理器国家重点实验室,计算技术研究所,中国科学院);University of Chinese Academy of Sciences(中国科学院大学);University of Science and Technology of China(中国科学技术大学);Shanghai Innovation Center for Processor Technologies(上海处理器技术创新中心);Cambricon Technologies(Cambricon技术公司)
Comprehensive Verilog Design Problems: A Next-Generation Benchmark Dataset for Evaluating Large Language Models and Agents on RTL Design and Verification
Think with Self-Decoupling and Self-Verification: Automated RTL Design with Backtrack-ToT
State Key Lab of Processors, Institute of Computing Technology, CAS(处理器重点实验室,计算技术研究所,中国科学院);University of Chinese Academy of Sciences(中国科学院大学);Beijing Normal University(北京师范大学);Peking University(北京大学);Chinese University of Hong Kong(香港中文大学)
Large Language Model for Verilog Code Generation: Literature Review and the Road Ahead
Zhejiang University \& Northwestern Polytechnical University China;Northwestern Polytechnical University China;Nantong University China;Zhejiang University China;Monash University Australia;Singapore Management University Singapore;Zhejiang University \& Northwestern Polytechnical University;Northwestern Polytechnical University;Nantong University;Zhejiang University;Monash University;Singapore Management University
School of Technology Management and Engineering, NMIMS(NMIMS技术管理与工程学院);Indian Institute of Technology, Roorkee(鲁尔基印度理工学院);Birla Institute of Technology and Science, Pilani (BITS Pilani)(皮拉尼贝拉理工学院(BITS Pilani))
Veri-Sure: Multi-Agent RTL Code Generation with Temporal Tracing, Slicing and Formal Verification
School of Physics and Astronomy, The University of Edinburgh, Edinburgh, UK(物理与天文学院,爱丁堡大学,爱丁堡,英国);State Key Laboratory of Analog and Mixed-Signal VLSI, University of Macau, Macau(模拟与混合信号VLSI国家重点实验室,澳门大学,澳门);School of Science and Engineering, The Chinese University of Hong Kong, Shenzhen, Shenzhen, China(科学与工程学院,香港中文大学(深圳))
From Prompts to Silicon: Scaling LLM-Assisted Chip Design with the AI Hardware Design League
School of Electrical, Computing, and Software Engineering, University of Arizona(亚利桑那大学电气、计算机与软件工程学院);College of Information Sciences, University of Arizona(亚利桑那大学信息科学学院)
UCAgent: An End-to-End Agent for Block-Level Functional Verification
State Key Lab of Processors, Institute of Computing Technology, CAS(中国科学院计算技术研究所处理器国家重点实验室);University of Chinese Academy of Sciences(中国科学院大学);Beijing Institute of Open Source Chip(北京开源芯片研究院)
GRPO with State Mutations: Improving LLM-Based Hardware Test Plan Generation
Electrical Engineering and Computer Science, Massachusetts Institute of Technology, Cambridge, MA(麻省理工学院电子工程与计算机科学系);NVIDIA Research, Austin, TX(NVIDIA研究部);NVIDIA Research, Taiwan(NVIDIA台湾研究部);NVIDIA Research, Santa Clara, CA(NVIDIA圣克拉拉研究部)