[Paper Review] CoopetitiveV: Leveraging LLM-powered Coopetitive Multi-Agent Prompting for High-quality Verilog Generation
This paper proposes PromptV, a novel LLM-powered multi-agent prompting framework that leverages cooperative and competitive agent dynamics with a teacher-learner mechanism to mitigate the degeneration issue in single-agent LLM-based Verilog generation. It achieves state-of-the-art performance, attaining 96.4% pass@10 on VerilogEval-Machine and 96.5% on VerilogEval-Human, with 100% syntax and 99.9% functionality pass@5 on RTLLM.
Recent advances in agentic LLMs have demonstrated great capabilities in Verilog code generation. However, existing approaches either use LLM-assisted single-agent prompting or cooperation-only multi-agent learning, which will lead to: (i) Degeneration issue for single-agent learning: characterized by diminished error detection and correction capabilities; (ii) Error propagation in cooperation-only multi-agent learning: erroneous information from the former agent will be propagated to the latter through prompts, which can make the latter agents generate buggy code. In this paper, we propose an LLM-based coopetitive multi-agent prompting framework, in which the agents cannot collaborate with each other to form the generation pipeline, but also create a healthy competitive mechanism to improve the generating quality. Our experimental results show that the coopetitive multi-agent framework can effectively mitigate the degeneration risk and reduce the error propagation while improving code error correction capabilities, resulting in higher quality Verilog code generation. The effectiveness of our approach is validated through extensive experiments. On VerilogEval Machine and Human dataset, CoopetitiveV+GPT-4 achieves 99.2% and 99.1% pass@10 scores, respectively. While on RTLLM, CoopetitiveV+GPT-4 obtains 100% syntax and 99.9% functionality pass@5 scores.
Motivation & Objective
- To address the degeneration issue in LLM-assisted single-agent prompt learning for Verilog code generation, where performance and error correction capabilities deteriorate over time.
- To improve the quality of automatically generated RTL code by introducing a multi-agent collaborative architecture that separates and specializes tasks such as code generation, testbench creation, and error correction.
- To enhance error detection and correction through a teacher-learner mechanism, where a teacher agent analyzes errors and provides suggestions, and learner agents apply them to code and testbench.
- To evaluate the framework on standard benchmarks and demonstrate superior performance compared to both foundation models and domain-specific fine-tuned models.
Proposed method
- The framework employs a multi-agent architecture with specialized agents: a code-generation agent, a testbench generation agent, a teacher agent for error analysis and suggestion generation, and dual learner agents for correcting code and testbench based on teacher feedback.
- The teacher agent performs comprehensive error analysis on both code and testbench, identifying syntax errors, logical inconsistencies, and verification failures, and generates targeted correction suggestions.
- Learner agents operate in parallel, applying the teacher’s suggestions to correct code and testbench independently, ensuring efficient and non-interfering refinement.
- An iterative simulation loop uses Icarus Verilog (Icarus) to validate corrected code and testbench; if simulation fails, the system triggers a new correction cycle.
- After three failed correction rounds, the framework regenerates code and testbench from the original module description and error logs, restarting the process to avoid stagnation.
- The framework integrates a teacher-learner learning mechanism to systematically improve correction quality and reduce degeneration over time.

Experimental results
Research questions
- RQ1Does single-agent LLM-based prompt learning for Verilog generation suffer from a degeneration issue that reduces code quality and error correction capability?
- RQ2Can a multi-agent framework with specialized roles improve code generation quality and error correction compared to single-agent approaches?
- RQ3How effective is the integration of a teacher-learner mechanism in mitigating degeneration and enhancing correction accuracy in RTL code generation?
- RQ4What is the performance of the proposed framework on standard Verilog generation benchmarks such as VerilogEval and RTLLM?
- RQ5Can the framework achieve high syntax and functionality pass rates while minimizing reliance on computationally expensive fine-tuning or pretraining?
Key findings
- PromptV+GPT-4 achieves a 96.4% pass@10 score on the VerilogEval-Machine benchmark, significantly outperforming the next best baseline (BetterV-CodeQwen at 84.5%) by 11.9 percentage points.
- On the VerilogEval-Human benchmark, PromptV+GPT-4 achieves a 96.5% pass@10 score, demonstrating superior human-annotated code quality compared to all baselines.
- On the RTLLM benchmark, PromptV+GPT-4 achieves 100% syntax pass@5 and 99.9% functionality pass@5, indicating near-perfect correctness in both structural and functional verification.
- PromptV+GPT-3.5 achieves 95.9% pass@10 on VerilogEval-Machine and 91.0% pass@1 on VerilogEval-Human, showing substantial gains over GPT-3.5’s original performance (46.7% and 69.1% respectively).
- The framework reduces the degeneration issue observed in single-agent prompting by enabling iterative, agent-specialized correction cycles with feedback from a dedicated teacher agent.
- The teacher-learner mechanism enables consistent error correction across multiple rounds, with simulation-driven feedback ensuring that only verified, correct code is retained.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.