CPU-Eval: Evaluating Large Language Models for CPU Hardware Code Generation A new benchmark called CPU-Eval, described in a paper accepted as a regular paper at the 2027 Design, Automation and Test in Europe Conference (DATE 2027), evaluates large language models on 339 HDL-generation problems covering six practical RISC-V CPUs. Each problem asks an LLM to generate one submodule in SystemVerilog, Chisel or SpinalHDL; CPU-Eval then integrates the generated code into its CPU, runs the CPU developers' regression test programs, and compares the execution trace against a reference ISA model to pinpoint the instruction and architectural-state update where execution diverges. The six CPUs and their problem counts are BOOM (91), CVA6 (93), Rift2Core (48), VeeR EL2 (71), VexRiscv (16) and Ibex (20). CPU-Eval is a benchmark of 339 HDL-generation problems for evaluating large language models on CPU hardware design. Each problem asks an LLM to generate one submodule of one of six practical RISC-V CPUs, ranging from small embedded cores to Linux-capable out-of-order cores, in SystemVerilog, Chisel or SpinalHDL. CPU-Eval is described in our paper " CPU-Eval: Evaluating Large Language Models for CPU Hardware Code Generation https://arxiv.org/abs/2611.32405 ," accepted as a regular paper at the 2027 Design, Automation and Test in Europe Conference DATE 2027 . CPU-Eval integrates the generated submodule into its CPU, executes test programs that the CPU developers run in their regression testing, and compares the CPU's execution trace with a reference ISA model. When execution diverges, comparison logs identify the instruction and architectural-state update at the divergence. CPU-Eval extends these tests to detect errors that the original tests miss. | CPU | Description | HDL | Problems | |---|---|---|---| | BOOM https://github.com/next-edge-ai-ishihara/cpu-eval/blob/main/cpus/boom/PROBLEMS.tsv | 64-bit out-of-order, Linux-capable | Chisel | 91 | | CVA6 https://github.com/next-edge-ai-ishihara/cpu-eval/blob/main/cpus/cva6/PROBLEMS.tsv | 32/64-bit in-order, Linux-capable | SystemVerilog | 93 | | Rift2Core https://github.com/next-edge-ai-ishihara/cpu-eval/blob/main/cpus/rift2core/PROBLEMS.tsv | 64-bit out-of-order, M/S/U modes | Chisel | 48 | | VeeR EL2 https://github.com/next-edge-ai-ishihara/cpu-eval/blob/main/cpus/veer el2/PROBLEMS.tsv | 32-bit in-order, 4-stage pipeline | SystemVerilog | 71 | | VexRiscv https://github.com/next-edge-ai-ishihara/cpu-eval/blob/main/cpus/vexriscv/PROBLEMS.tsv | 32-bit in-order, FPGA-oriented | SpinalHDL | 16 | | Ibex https://github.com/next-edge-ai-ishihara/cpu-eval/blob/main/cpus/ibex/PROBLEMS.tsv | 32-bit in-order, embedded | SystemVerilog | 20 | Run the commands from the repository root on x86 64 Linux with network access. The host needs Git, Bash, Python 3.12.3 with venv and pip, SingularityCE or Apptainer with build --fakeroot support, riscv64-unknown-elf GCC 13.2.0 and binutils 2.42. Prepare an environment for each CPU once. The command builds the container image and test programs in the new directory given by --output and keeps temporary build files in --work-root : python3 tools/prepare environment.py \ --cpu cva6 --output /path/to/environments/cva6 \ --work-root /path/to/image-build-work Set --cpu to boom , cva6 , ibex , rift2core , veer el2 or vexriscv . Pass --runtime apptainer when preparing with Apptainer, or --image /path/to/cva6-eval.sif to reuse an image built from the same release. Give cpus/cva6/alu/SPEC.md https://github.com/next-edge-ai-ishihara/cpu-eval/blob/main/cpus/cva6/alu/SPEC.md to your LLM as the user prompt, with no system prompt. Save the response as a UTF-8 text file without any reasoning that the API returns in a separate field. The evaluator extracts the code from the response. Evaluate the answer in the prepared environment: python3 tools/evaluate submission.py run \ --problem cva6/alu \ --candidate /path/to/alu-response.txt \ --environment /path/to/environments/cva6 \ --output /path/to/alu-result Evaluation compiles and runs the LLM-generated code on your machine. Run it in an isolated environment, such as a dedicated virtual machine. The command prints the result and, for a failing answer, excerpts from the compiler or comparison logs. It saves the evaluation records in the output directory. To print the result again later, run: python3 tools/evaluate submission.py show /path/to/alu-result Repeat --candidate FILE with run --problem CPU/PROBLEM to evaluate several answers to one problem. Each occurrence counts as one trial. The Ollama Cloud example https://github.com/next-edge-ai-ishihara/cpu-eval/blob/main/examples/ollama-cloud/README.md generates ten answers for every problem of one CPU. A batch job evaluates many answers for the one CPU given by --cpu . Pass each answer as --candidate PROBLEM=FILE , where PROBLEM is a problem name in that CPU's PROBLEMS.tsv and FILE is the saved response: python3 tools/evaluate submission.py prepare --cpu cva6 \ --candidate alu=/path/to/alu-response.txt \ --candidate serdiv=/path/to/serdiv-response.txt \ --environment /path/to/environments/cva6 \ --output /path/to/cva6-job The Genkai example https://github.com/next-edge-ai-ishihara/cpu-eval/blob/main/examples/genkai/README.md shows how to submit a prepared batch job and run its problems in parallel. For local evaluation, use run once per problem and give each invocation its own output directory. Each answer receives PASS or a FAIL verdict that names the error in the answer, such as FAIL CANDIDATE COMPILE or FAIL TRACE MISMATCH . Only PASS counts as correct; for pass@k, count every answer in the sample size. INVALID means that the evaluation stopped before reaching a verdict, for example because memory ran out, and names the cause. The repository includes all 339 problem statements. With Git and network access, reconstruct them from the recorded upstream sources and verify them against the included copies: python3 tools/reconstruct problem statements.py --cache /path/to/source-cache | Location | Contents | |---|---| | cpus/ | Problem lists, statements, source and test recipes, and CPU grading tests. | | tools/ | Commands that users run. Their subdirectories hold the programs and container image definitions that these commands and the evaluation jobs use. | | examples/ | Ollama Cloud generation and Genkai job examples. | | LICENSES/ | License texts and upstream notices of the third-party material. | If you use CPU-Eval, please cite our paper: @inproceedings{iwata2027cpueval, title = {{CPU-Eval}: Evaluating Large Language Models for {CPU} Hardware Code Generation}, author = {Iwata, Yuisei and Masuda, Yutaka and Ishihara, Tohru}, booktitle = {2027 Design, Automation \& Test in Europe Conference DATE }, year = {2027}, note = {in press} } The page numbers and DOI will be added when the DATE 2027 proceedings are published. The preprint is available on arXiv: @misc{iwata2026cpueval, title = {{CPU-Eval}: Evaluating Large Language Models for {CPU} Hardware Code Generation}, author = {Iwata, Yuisei and Masuda, Yutaka and Ishihara, Tohru}, year = {2026}, eprint = {2611.32405}, archivePrefix = {arXiv}, primaryClass = {cs.AR} } Copyright c 2026 Ishihara-Masuda-Lab. CPU-Eval's original code and documentation are licensed under Apache License 2.0 https://github.com/next-edge-ai-ishihara/cpu-eval/blob/main/LICENSE . Third-party source excerpts, tests and derived material retain their original terms. Third-party notices https://github.com/next-edge-ai-ishihara/cpu-eval/blob/main/THIRD PARTY NOTICES.md identify the applicable attribution and licenses. This work is partly supported by JST Research and Development Program for Next-generation Edge AI Semiconductors, Grant Number JPMJES2511.