# HDL-RepoBench: Multi-Paradigm Repository-Level Code Completion for Hardware Design Languages

*Qingyun Zou, Jiahao Cui, Nuo Chen, Bingsheng He, Weng-Fai Wong*

[NeurIPS page](https://neurips.cc/virtual/2026/poster/139340) · [OpenReview](https://openreview.net/forum?id=VhzYiQ95Mx) · [alphaXiv](https://www.alphaxiv.org/abs/2601.03708) · [Open on the map](../papers.html#p139340)

Category: [LLM Agents, Evals & Benchmarks](../pcat/17.md) › [Verified Code Synthesis and Testing](../pgroup/302.md) · Type: benchmark or dataset · Keywords: hardware description languages, repository-level code completion, benchmark, large language models, code semantics, hardware-software differences

Areas: [Code & Coding Agents](../areas/codegen.md) › Code Generation and Optimization › LLM Code Benchmarks; [Evaluation & Benchmarks](../areas/evaluation.md) › Language Model and Agent Benchmarks › Software Engineering Benchmarks

## Summary
HDL-RepoBench introduces the first multilingual repository-level benchmark for hardware description language code completion, revealing distinct performance patterns across HDLs and context lengths.

## Explained to a 5-year-old
HDL-RepoBench is a big collection of hardware code problems for computers to solve. It helps computers learn to finish hardware code snippets, like writing parts of circuit designs. The problems are organized by language, so the computer can practice with different hardware languages. After learning from this collection, smaller computer models can do as well as much bigger ones.

## Explained to a 5-year-old, longer
Imagine you have a toolbox of code puzzles that are like little building blocks for making computer chips. These puzzles are in three different hardware languages, which are like different dialects of building instructions. The toolbox is split into a training part and a test part, so you can teach a computer model how to solve the puzzles and then see how well it does. The puzzles are labeled so the computer knows not just what the code looks like, but also what it means for the hardware. After the computer learns from the training puzzles, it can finish new puzzles that it has never seen before. The results show that the computer learns some interesting things: some hardware languages are easier than others, the computer’s accuracy doesn’t always get better with more context, and some tricks that work for software code don’t work for hardware code. This helps researchers build better tools for designing computer chips.

## For a technical reader
We present a benchmark suite for repository-level code completion in hardware description languages. It includes training and evaluation splits, code-structure and hardware-semantic annotations derived from concrete syntax trees, and functional evaluation metrics. The benchmark reveals that performance varies across HDLs, accuracy plateaus beyond 2,048 tokens, and software-tuned retrieval methods often underperform a simple baseline on hardware repositories.

## Problem
Existing repository-level code completion benchmarks focus on software languages, leaving a gap in evaluating large language models on hardware description languages. This limits understanding of how LLMs perform on hardware code and the differences in coding patterns.

## Method
The authors construct a benchmark comprising training and evaluation splits across three major HDLs, annotate completion targets with code-structure and hardware-oriented semantic labels derived from concrete syntax trees, and evaluate LLMs on repository-level code completion tasks.

## Results
Smaller open-weight models trained on the benchmark outperform larger general-purpose models under matched context windows, and analysis shows that performance varies sharply across HDLs, accuracy is non-monotonic with code-structure depth, plateaus beyond 2,048 tokens, and software-tuned retrievers often underperform a no-retrieval baseline on hardware repositories.

## Contributions
A multilingual repository-level benchmark for HDL code completion with functional evaluation, detailed analysis of hardware-specific completion challenges, and insights into how context length and code structure affect model performance.

## Practical relevance
Provides a standardized evaluation suite for assessing LLMs on hardware design tasks, guiding future model development for electronic engineering applications.

## Research questions this paper is counted under

- [How can we evaluate language models' ability to design, implement, and verify complex systems across software and hardware domains?](../q/204.md)

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. [Suggest a correction](../feedback/?on=p/139340)
