TL;DR
Imagine you’re handed a mysterious silicon chip with no manual. To figure out what it does, you have to poke its pins with electrical signals and watch how it reacts. This paper introduces ChiProgramBench, a grueling new benchmark that asks LLM agents to do exactly that: reverse-engineer complex hardware circuits from scratch and then build a replacement that isn't just correct, but efficient.
What Problem Does This Paper Address?
In the world of hardware engineering, you often encounter "black boxes"—legacy components with lost documentation or third-party IP provided only as encrypted simulation models. To replace or fix these, an engineer must act like a scientist: design experiments, observe the timing of signals, form a hypothesis about the internal state, and eventually write code (RTL) that replicates the behavior perfectly.
While LLMs have become surprisingly good at writing code from a text description, ChiProgramBench tests a much harder skill: active experimentation. Can an AI agent discover the "spec" of a circuit just by interacting with it? And once it knows what the circuit does, can it implement it using a standard cell library while keeping power, area, and delay (PPA) under control?
Methods
The authors created a closed-loop evaluation environment where an LLM agent acts as the designer.
- The Probe: The agent cannot see the reference circuit's code. It can only interact with it through a "probe"—a tool that allows it to drive input pins, advance simulated time (clock cycles), and read output pins.
- Two Difficulty Modes:
- Black-box discovery: The agent is told nothing except the width of the pins (e.g., "input0 is 8 bits").
- Function-guided reconstruction: The agent gets a hint about the circuit’s purpose (e.g., "this is an image decoder") and the role of each pin.
- The Submission: The agent must submit a gate-level netlist (a map of logic gates like AND, OR, and Flip-Flops) using a public 45nm cell library.
- Scoring: The "Reward" is a brutal 50/50 split between functional correctness and efficiency. If the circuit fails even one cycle of the hidden test cases, it gets zero credit for efficiency.
Datasets: The ChiProgramBench
The benchmark consists of 18 tasks curated from high-quality open-source hardware. These aren't toy problems; they include:
- CPUs & GPUs: RISC-V cores and GPGPUs.
- ML Accelerators: Systolic arrays and attention engines.
- Codecs: JPEG decoders and Gzip compressors.
- Interconnects: DMA and DRAM controllers.
Each task comes with optimized "reference" implementations that the agents are trying to match or beat.
Key Insights and Ideas
- The "99% Correct" Trap: Many agents successfully recovered the core algorithm (like a math function) but failed on "boring" hardware details like reset semantics, backpressure handshakes, or stall logic. In hardware, 99% correct is often 0% useful.
- Discovery vs. Implementation: Even when agents figured out what to build, they struggled with how to build it efficiently. Most successful reconstructions were significantly bulkier and slower than the human-optimized references.
- Context is King: Providing the "function-guided" hints significantly boosted functional scores (from 24.6% to 30.9%), showing that knowing the intent of a design helps agents design much better experiments.
- The Cost of Reasoning: The top-performing models (GPT-6-Astra and Claude Opus 5.5) are significantly more expensive to run but are the only ones capable of closing the loop on complex tasks.
Key Results
- Low Success Rates: Only 12.0% of black-box trials and 14.8% of function-guided trials passed every test case. Eight of the 18 tasks were never fully solved by any agent.
- Efficiency Gap: Of the 58 designs that passed all functional tests, only three actually improved on the reference's PPA. The median successful design used 1.22x the area and 1.52x the power of the original.
- Model Rankings: GPT-6-Astra and Claude Opus 5.5 were the clear leaders, while other models (DeepSeek, Qwen, GLM) struggled to get off the ground, often failing to produce functionally correct circuits for most tasks.
Limitations and Future Work
The authors acknowledge a few key hurdles:
- Data Contamination: Since the tasks are based on open-source designs, there's a chance the LLMs "remembered" the code from their training data rather than purely discovering it through the probe.
- Finite Testing: The benchmark uses cycle-exact test cases rather than formal mathematical equivalence, meaning a design could pass the tests but still have hidden bugs.
- Pre-Layout Metrics: The PPA scores are calculated before "place and route," meaning they don't account for the messy reality of physical wires on a chip.
The road ahead involves teaching agents not just to code, but to think like experimentalists—choosing the specific, high-leverage tests that reveal the hidden corners of a system's behavior.
Summary updated