CPU-Eval: Evaluating Large Language Models for CPU Hardware Code Generation
Organizations: School of Informatics, Nagoya University, Nagoya, Japan · Graduate School of Informatics, Nagoya University, Nagoya, Japan
Abstract
Benchmarks such as VerilogEval have supported rapid advances in hardware description language (HDL) generation by large language models (LLMs). However, recent HDL-generation systems achieve pass rates above 90% on VerilogEval, leaving limited headroom for revealing further advances. To provide a challenging target for further progress on a practically important hardware-development task, we introduce CPU-Eval, a benchmark of 339 HDL-generation problems constructed from six CPUs. Drawn from practical CPU designs, including families fabricated in silicon, the problems span CPUs from small embedded cores to Linux-capable out-of-order cores and cover diverse CPU functions written in SystemVerilog, Chisel, and SpinalHDL. In each problem, an LLM performs the real CPU-development task of generating HDL. Across seven state-of-the-art LLMs, mean pass@1 is 45.14 percentage points lower on CPU-Eval than on VerilogEval v2 Spec-to-RTL, exposing capability differences obscured by VerilogEval's high pass rates. CPU-Eval reveals that pass@1 is lower for submodules with more source-code lines, which motivates fine-grained modular design for LLM-aided hardware generation. We also show that pass@1 is lower for CPUs written in less widely used HDLs, motivating designers to verify that an LLM is sufficiently proficient at generating code in the HDL they use before deployment.
Figures & tables
| CPU | Description | HDL | No. of submodules | Source-code lines | ||
|---|---|---|---|---|---|---|
| Median | Mean | Total | ||||
| BOOM | 64-bit out-of-order core with 3-wide decode, a 96-entry reorder buffer, and Linux support | Chisel | 91 | 82 | 171.0 | 15,557 |
| CVA6 | 32/64-bit in-order core with a 6-stage pipeline and Linux-capable configurations | SystemVerilog | 93 | 152 | 368.0 | 34,224 |
| Rift2Core | 64-bit out-of-order core with a 9-stage pipeline and machine, supervisor, and user modes | Chisel | 48 | 38.5 | 75.2 | 3,610 |
| VeeR EL2 | 32-bit in-order core with a 4-stage pipeline, branch prediction, and machine/user modes | SystemVerilog | 71 | 122 | 328.2 | 23,299 |
| VexRiscv | 32-bit in-order core optimized for FPGAs, with optional caches, an MMU, and Linux support | SpinalHDL | 16 | 170 | 275.0 | 4,400 |
| Benchmark | No. of problems | CPU designs included | What the LLM does | How the benchmark evaluates the output |
|---|---|---|---|---|
| VerilogEval v2 [ 2 ] | 156 | None. Small standalone modules from educational exercises | Generate one RTL module from a specification | Simulate using the testbench provided for each problem |
| RTLLM [ 20 ] | 30 | One 518-line simplified RISC CPU | Generate all RTL for one design from a specification | Simulate using the testbench provided for each problem |
| RTLLM 2.0 [ 21 ] | 50 | Small standalone modules such as a 32-bit MIPS ALU | Generate one RTL module from a specification | Simulate using the testbench provided for each problem |
| RealBench [ 10 ] | 64 | One 32-bit embedded RISC-V CPU | Generate one module or an entire design from a specification | Use testbench simulation and formal equivalence checking |
| ChipBench [ 11 ] | 265 | Nine modules from open-source CPUs | Generate or debug Verilog, Python, SystemC, or CXXRTL | Compare the generated output behavior with the golden Verilog implementation |
| ChipVerilog [ 22 ] | 64 | Two small RISC cores: OR1200 and a five-stage MIPS-16 core | Generate one module or an entire IP/core from a specification | Use testbench simulation or formal equivalence checking |
| Gemma 4 31B | gpt-oss-120B | Qwen3.5-397B | DeepSeek-V4.1-Flash | Kimi K2.7 Code | GPT-5.6 Sol | Claude Opus 5 | Mean (7 LLMs) | |||||||||
| Problem set | ||||||||||||||||
| VerilogEval v2 | 69.23 | 76.92 | 69.55 | 83.97 | 69.17 | 82.05 | 74.74 | 85.26 | 69.81 | 84.62 | 90.19 | 94.23 | 92.69 | 95.51 | 76.48 | 86.08 |
| CVA6 | 32.04 | 45.16 | 29.78 | 45.16 | 25.59 | 43.01 | 34.73 | 56.99 | 36.13 | 55.91 | 56.34 | 69.89 | 73.87 | 90.32 | 41.21 | 58.06 |
| Ibex | 24.50 | 30.00 | 22.50 | 30.00 | 16.50 | 30.00 | 26.00 | 40.00 | 25.00 | 35.00 | 47.50 | 60.00 | 68.00 | 90.00 | 32.86 | 45.00 |
| VeeR EL2 | 37.32 | 57.75 | 38.87 | 57.75 | 35.77 | 50.70 | 37.89 | 63.38 | 39.72 | 60.56 | 62.39 | 78.87 | 69.72 | 85.92 | 45.96 | 64.99 |
| Rift2Core | 9.58 | 16.67 | 8.33 | 27.08 | 10.83 | 18.75 | 18.33 | 37.50 | 18.96 | 39.58 | 52.08 | 70.83 | 56.04 | 79.17 | 24.88 | 41.37 |
LLM Code Generation
Large language model code generation studies how models translate instructions and context into executable programs and how to make them reliable.
See all 341 papers