Advanced Search
Turn off MathJax
Article Contents
LI Tuo, WANG Changhong, CHENG Chao, LI Guoqing, LI Nanjun. V-Agent: A Protocol-Driven Multi-Agent Framework for RISC-V Custom Arithmetic IP Integration[J]. Journal of Electronics & Information Technology. doi: 10.11999/JEIT260073
Citation: LI Tuo, WANG Changhong, CHENG Chao, LI Guoqing, LI Nanjun. V-Agent: A Protocol-Driven Multi-Agent Framework for RISC-V Custom Arithmetic IP Integration[J]. Journal of Electronics & Information Technology. doi: 10.11999/JEIT260073

V-Agent: A Protocol-Driven Multi-Agent Framework for RISC-V Custom Arithmetic IP Integration

doi: 10.11999/JEIT260073 cstr: 32379.14.JEIT260073
  • Received Date: 2026-01-21
  • Accepted Date: 2026-09-17
  • Rev Recd Date: 2026-09-17
  • Available Online: 2026-09-24
  •   Objective  Large Language Models (LLMs) can assist with Register Transfer Level (RTL) code generation. However, processor-level designs require coordination among independently generated control, datapath, top-level integration, and verification modules. Inconsistencies in port names, directions, widths, or signal types can prevent compilation and require manual diagnosis for repair. This study proposes V-Agent, a protocol-driven multi-agent framework that converts implicit interface assumptions into explicit, machine-checkable contracts and returns tool-generated diagnostics to the agent responsible for the affected module. Four specialized agents handle architecture specification, control logic, datapath integration, and verification. A single-cycle RISC-V processor integrating a predefined Intellectual Property (IP) core for 32-bit signed combinational multiplication serves as a controlled benchmark task for evaluating multi-module generation, localized error correction, and differences among LLM backends. The framework addresses the gap between isolated code generation and executable processor-level verification by exposing structural assumptions early enough to support bounded regeneration of individual modules.  Methods  V-Agent receives a hierarchical JavaScript Object Notation (JSON) configuration specifying the selected LLM backend, generation and retry parameters, architectural attributes, task operations, data widths, and test cases. The Architect Agent generates the top-level ports, control signals, datapath components, and opcode mappings. The Control Unit Agent produces synthesizable instruction-decoding and control logic. The Datapath Agent generates arithmetic, register-file, program-counter, routing, and top-level integration logic and instantiates the predefined multiplier IP core. The Verification Agent generates memory models, testbenches, Verilator drivers, and execution scripts. The processor and accelerator organization is shown in Fig. 1, and the multi-agent and verification feedback loops are summarized in Figs. 2 and 3. JSON interface contracts record port names, directions, widths, and types. A static analyzer parses the Verilog Abstract Syntax Tree (AST) and compares the generated port signatures with the corresponding contracts. Compilation and simulation provide additional diagnostics on syntax, connectivity, and functional behavior. When a check fails, the resulting diagnostic is returned to the responsible agent to trigger regeneration. The maximum number of retries is set to 3 (max_retries = 3). A fallback template is used only when repeated generation reaches the retry limit, allowing the remaining integration and verification steps to continue. The evaluated design supports two standard instructions and three experimental custom operations: MLOAD, PMUL, and PMAC. Six LLM backends, DeepSeek-V3, Claude Sonnet 4.5, Doubao-1.5 Pro, Gemini 1.5 Flash, Qwen3-235B, and GPT-5.1, are compared using module-compilation results, automatic-test performance, Code Quality Score, line-level code changes during manual repair, and Power, Performance, and Area (PPA) metrics from downstream implementation analysis. Fully automated results are recorded before manual modification, whereas Human-in-the-Loop (HITL) results are measured after localized repair.  Results and Discussions  The outputs of the monolithic, one-shot baseline fail system-level compilation because of context, interface, connection, or incomplete-state-logic problems. By contrast, the V-Agent pipeline produces designs that can proceed to system-level compilation (Table 4). This finding is limited to the present benchmark. In the fully automated evaluation, DeepSeek-V3 and Claude Sonnet 4.5 complete all five task operations, compile all eight RTL modules, and pass 70 of 78 automatic tests (Table 6). Doubao-1.5 Pro and Gemini 1.5 Flash compile 6 of 8 modules, GPT-5.1 compiles 7 of 8, and Qwen3-235B compiles 4 of 8. The generated designs support different numbers of executable automatic tests. Therefore, the results retain the raw counts and denominators rather than treating all test totals as directly comparable. Figure 4 presents the task-operation completion and automatic-test pass ratios. An interface-width mismatch illustrates how the feedback mechanism supports localized correction. The Datapath Agent initially defines MemToReg as a one-bit signal, while the additional multiplier-result path requires a two-bit selector. The contract checker identifies the mismatch and returns the diagnostic to the responsible agent. The agent regenerates the affected module in approximately 15 s, after which compilation and testing pass (Table 7). In the complete case study, the four agents generate eight RTL modules and 17 verification files in about 5 min. All eight modules compile, and four system-level programs produce the expected final register states and waveforms. The generated arithmetic execution and writeback path is shown in Fig. 5. After localized HITL edits, all six designs compile all eight RTL modules and pass the same set of 78 tests. The average line-level code-change rate is 4.37%, ranging from 1.3% to 9.5% (Table 9). PPA analysis shows that Claude Sonnet 4.5, DeepSeek-V3, and Gemini 1.5 Flash complete synthesis and timing analysis. GPT-5.1 completes gate-level mapping, but its timing analysis fails to converge because of a combinational loop. The unusually small implementations produced by Doubao-1.5 Pro and Qwen3-235B exhibit large-scale logic pruning during synthesis (Table 8). Among 126 classified errors at the generation and compilation stages, 54 are Verilog semantic errors, 36 are interface-width errors, 26 are cascading failures, and 10 are custom-operation semantic errors (Table 10).  Conclusions  V-Agent structures processor RTL generation as a coordinated workflow among specialized agents connected by explicit interface contracts and tool feedback. The evaluated RISC-V arithmetic-IP task shows that structural interface mismatches can be localized and corrected without regenerating the entire design. HITL results further distinguish initial generation quality from engineering repairability. The principal contribution is a coordination mechanism that converts cross-module assumptions into machine-checkable contracts and returns AST, compilation, and simulation diagnostics to the responsible agent. The framework complements existing synthesis, simulation, high-level synthesis, and verification tools rather than replacing them. The evidence is limited to a single-cycle RISC-V core, a predefined 32-bit multiplier IP core, task configurations containing 5–15 operations, and nonuniform executable test workloads. Verilator cannot expose every timing defect, and the PPA study requires more complete activity information, supply conditions, and netlist checks. Future work will extend the workflow to pipelined processors and coverage-guided automated repair.
  • loading
  • [1]
    MIRHOSEINI A, GOLDIE A, YAZGAN M, et al. A graph placement methodology for fast chip design[J]. Nature, 2021, 594(7862): 207–212. doi: 10.1038/s41586-021-03544-w.
    [2]
    MOLESKY S, LIN Zin, PIGGOTT A Y, et al. Inverse design in nanophotonics[J]. Nature Photonics, 2018, 12(11): 659–670. doi: 10.1038/s41566-018-0246-9.
    [3]
    PATTERSON D A and HENNESSY J L. Computer Organization and Design RISC-V Edition: The Hardware Software Interface[M]. San Francisco: Morgan Kaufmann Publishers Inc. , 2017.
    [4]
    BREUER M A, FRIEDMAN A D, and IOSUPOVICZ A. A survey of the state of the art of design automation[J]. Computer, 1981, 14(10): 58–75. doi: 10.1109/C-M.1981.220210.
    [5]
    XILINX. Vivado design suite user guide: High-level synthesis[R]. UG902 (v2020.1), 2021.
    [6]
    CHEN M, TWOREK J, JUN H, et al. Evaluating large language models trained on code[EB/OL]. https://arxiv.org/abs/2107.03374, 2021.
    [7]
    BROWN T B, MANN B, RYDER N, et al. Language models are few-shot learners[C]. The 34th International Conference on Neural Information Processing Systems, Vancouver, Canada, 2020: 159. doi: 10.5555/3495724.3495883.
    [8]
    THAKUR S, BLOCKLOVE J, PEARCE H, et al. AutoChip: Automating HDL generation using LLM feedback[EB/OL]. https://arxiv.org/abs/2311.04887, 2023.
    [9]
    BLOCKLOVE J, GARG S, KARRI R, et al. Chip-Chat: Challenges and opportunities in conversational hardware design[C]. The 2023 ACM/IEEE 5th Workshop on Machine Learning for CAD, Snowbird, USA, 2023: 1–6. doi: 10.1109/MLCAD58807.2023.10299874.
    [10]
    SANGIOVANNI-VINCENTELLI A, DAMM W, and PASSERONE R. Taming Dr. Frankenstein: Contract-based design for cyber-physical systems[J]. European Journal of Control, 2012, 18(3): 217–238. doi: 10.3166/ejc.18.217-238.
    [11]
    CANIS A, CHOI J, ALDHAM M, et al. LegUp: High-level synthesis for FPGA-based processor/accelerator systems[C]. The 19th ACM/SIGDA International Symposium on Field Programmable Gate Arrays, Monterey, USA, 2011: 33–36. doi: 10.1145/1950413.1950423.
    [12]
    SIEMENS EDA. Catapult high-level synthesis and verification[EB/OL]. https://eda.sw.siemens.com/en-US/eda-cloud-solutions/ic/catapult-high-level-synthesis/, 2026.
    [13]
    LIU Shang, FANG Wenji, LU Yao, et al. RTLCoder: Fully open-source and efficient LLM-assisted RTL code generation technique[J]. IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, 2025, 44(4): 1448–1461. doi: 10.1109/TCAD.2024.3483089.
    [14]
    CHANG Kaiyan, WANG Ying, REN Haimeng, et al. ChipGPT: How far are we from natural language hardware design[EB/OL]. https://arxiv.org/abs/2305.14019, 2023.
    [15]
    THAKUR S, AHMAD B, PEARCE H, et al. VeriGen: A large language model for Verilog code generation[J]. ACM Transactions on Design Automation of Electronic Systems, 2024, 29(3): 46. doi: 10.1145/3643681.
    [16]
    QIAN Chen, LIU Wei, LIU Hongzhang, et al. ChatDev: Communicative agents for software development[C]. The 62nd Annual Meeting of the Association for Computational Linguistics, Bangkok, Thailand, 2024: 15174–15186. doi: 10.18653/v1/2024.acl-long.810.
    [17]
    HONG Sirui, ZHUGE Mingchen, CHEN J, et al. MetaGPT: Meta programming for a multi-agent collaborative framework[C]. The 12th International Conference on Learning Representations, Vienna, Austria, 2024.
    [18]
    RICHARDS T. AutoGPT: An autonomous GPT-4 experiment[EB/OL]. https://github.com/Significant-Gravitas/AutoGPT, 2026.
    [19]
    QIN Haiyan, FENG Jiahao, FENG Xiaotong, et al. Towards optimal circuit generation: Multi-agent collaboration meets collective intelligence[EB/OL]. https://arxiv.org/abs/2504.14625, 2025.
    [20]
    QIN Haiyan, KOU Jing, ZHANG Liang, et al. Multi-agent yield analysis for circuit design[C]. The 62nd ACM/IEEE Design Automation Conference, San Francisco, USA, 2025: 1–7. doi: 10.1109/DAC63849.2025.11133334.
    [21]
    TASNIA K, GARCIA A, FARHEEN T, et al. VeriOpt: PPA-aware high-quality Verilog generation via multi-role LLMs[C]. The 2025 IEEE/ACM International Conference on Computer Aided Design, Munich, Germany, 2025: 1–9. doi: 10.1109/ICCAD66269.2025.11240771.
    [22]
    陈溪源, 姜宇轩, 夏莹杰, 等. VCodePPA: 面向集成电路物理约束优化的Verilog代码数据集[J]. 电子与信息学报, 2025, 47(11): 4606–4619. doi: 10.11999/JEIT250449.

    CHEN Xiyuan, JIANG Yuxuan, XIA Yingjie, et al. VCodePPA: A large-scale Verilog dataset with PPA annotations[J]. Journal of Electronics & Information Technology, 2025, 47(11): 4606–4619. doi: 10.11999/JEIT250449.
    [23]
    MIN K, CHO K, JANG J, et al. REvolution: An evolutionary framework for RTL generation driven by large language models[C]. The 2026 31st Asia and South Pacific Design Automation Conference, Lantau, China, 2026: 282–288. doi: 10.1109/ASP-DAC66049.2026.11420420.
    [24]
    LIU Mingjie, PINCKNEY N R, KHAILANY B, et al. Invited paper: VerilogEval: Evaluating large language models for Verilog code generation[C]. The 2023 IEEE/ACM International Conference on Computer Aided Design, San Francisco, USA, 2023: 1–8. doi: 10.1109/ICCAD57390.2023.10323812.
    [25]
    CHEN Zhirong, CHANG Kaiyan, LI Zhuolin, et al. ChipSeek-R1: Generating human-surpassing RTL with LLM via hierarchical reward-driven reinforcement learning[EB/OL]. https://arxiv.org/html/2507.04736v1, 2025.
    [26]
    WANG Yiting, YE Wanghao, GUO Ping, et al. SymRTLO: Enhancing RTL code optimization with LLMs and neuron-inspired symbolic reasoning[C]. The 39th Conference on Neural Information Processing Systems, San Diego, USA, 2025: 55809–55834. doi: 10.52202/085713-1670.
    [27]
    TSAI Y, LIU Mingjie, and REN Haoxing. RTLFixer: Automatically fixing RTL syntax errors with large language models[C]. The 61st ACM/IEEE Design Automation Conference, San Francisco, USA, 2024: 53. doi: 10.1145/3649329.3657353.
    [28]
    于斌, 闵玉新, 张自豪, 等. 基于RISC-V指令扩展的双线性对协处理器设计[J]. 电子与信息学报, 2025, 47(9): 3137–3145. doi: 10.11999/JEIT250367.

    YU Bin, MIN Yuxin, ZHANG Zihao, et al. Design of a bilinear pairing coprocessor based on RISC-V instruction extension[J]. Journal of Electronics & Information Technology, 2025, 47(9): 3137–3145. doi: 10.11999/JEIT250367.
    [29]
    唐时博, 朱嘉诚, 慕德俊, 等. RISC-V处理器权限正确性验证与提权漏洞自动挖掘方法[J]. 电子与信息学报, 2025, 47(9): 3081–3092. doi: 10.11999/JEIT250362.

    TANG Shibo, ZHU Jiacheng, MU Dejun, et al. Verification of privilege correctness and automated exploitation of privilege escalation vulnerabilities in RISC-V processors[J]. Journal of Electronics & Information Technology, 2025, 47(9): 3081–3092. doi: 10.11999/JEIT250362.
    [30]
    WOLF C. Yosys open SYnthesis suite[EB/OL]. https://yosyshq.net/yosys/, 2026.
  • 加载中

Catalog

    通讯作者: 陈斌, bchen63@163.com
    • 1. 

      沈阳化工大学材料科学与工程学院 沈阳 110142

    1. 本站搜索
    2. 百度学术搜索
    3. 万方数据库搜索
    4. CNKI搜索

    Figures(5)  / Tables(10)

    Article Metrics

    Article views (281) PDF downloads(14) Cited by()
    Proportional views
    Related

    /

    DownLoad:  Full-Size Img  PowerPoint
    Return
    Return