QiMeng-CRUX: Narrowing the Gap between Natural Language and Verilog via Core Refined Understanding eXpression
Lei Huang, Rui Zhang, Jiaming Guo, Yang Zhang, Di Huang, Shuyao Cheng, Pengwei Jin, Chongxiao Li, Zidong Du, Xing Hu, Qi Guo, Yunji Chen
TL;DR
QiMeng-CRUX addresses the NL-to-Verilog gap by introducing CRUX, a structured intermediate space comprising Module Interface, Core Functions, and Key Considerations. A two-stage framework—Joint Expression Modeling (NL→CRUX/Verilog via RealSpec and SFT) and Dual-Space Optimization (CRUX-Enhanced GRPO with CRUX-Reward and Code-Reward)—drives accurate HDL generation. Empirical results on VerilogEval and RTLLM benchmarks show state-of-the-art performance and robust transferability when CRUX is used as prompts for other models. The work demonstrates that semantically structured guidance can substantially improve synthesizable Verilog generation and generalize across tasks and models.
Abstract
Large language models (LLMs) have shown promising capabilities in hardware description language (HDL) generation. However, existing approaches often rely on free-form natural language descriptions that are often ambiguous, redundant, and unstructured, which poses significant challenges for downstream Verilog code generation. We treat hardware code generation as a complex transformation from an open-ended natural language space to a domain-specific, highly constrained target space. To bridge this gap, we introduce Core Refined Understanding eXpression (CRUX), a structured intermediate space that captures the essential semantics of user intent while organizing the expression for precise Verilog code generation. We further design a two-stage training framework, comprising Joint Expression Modeling and Dual-Space Optimization, to enhance the quality of both CRUX and Verilog code. Experiments across multiple Verilog generation benchmarks demonstrate that our model, CRUX-V, achieves state-of-the-art performance among general models, particularly under challenging design tasks. Furthermore, the CRUX space proves transferable and beneficial when used as input prompts for other code models, highlighting its effectiveness in narrowing the gap between free-form natural language descriptions and precise Verilog generation.
