Skip to main content
QUICK REVIEW

[Paper Review] LLM4DV: Using Large Language Models for Hardware Test Stimuli Generation

Zixi Zhang, Szekely, Balint|arXiv (Cornell University)|Oct 6, 2023
VLSI and Analog Circuit TestingComputer Science9 citations
TL;DR

The paper proposes LLM4DV, a benchmarking framework that uses prompted LLMs to generate hardware test stimuli, evaluates it on three DUT modules, and shows promising coverage for simpler designs but limited gains on a full CPU.

ABSTRACT

Hardware design verification (DV) is a process that checks the functional equivalence of a hardware design against its specifications, improving hardware reliability and robustness. A key task in the DV process is the test stimuli generation, which creates a set of conditions or inputs for testing. These test conditions are often complex and specific to the given hardware design, requiring substantial human engineering effort to optimize. We seek a solution of automated and efficient testing for arbitrary hardware designs that takes advantage of large language models (LLMs). LLMs have already shown promising results for improving hardware design automation, but remain under-explored for hardware DV. In this paper, we propose an open-source benchmarking framework named LLM4DV that efficiently orchestrates LLMs for automated hardware test stimuli generation. Our analysis evaluates six different LLMs involving six prompting improvements over eight hardware designs and provides insight for future work on LLMs development for efficient automated DV.

Motivation & Objective

  • Reduce manual effort in hardware design verification by leveraging LLMs to generate test stimuli.
  • Create a reusable benchmarking framework (LLM4DV) for design verification tasks.
  • Promote prompt engineering techniques to improve LLM-driven test stimulus generation.
  • Provide open-source DUT modules and framework for researchers to experiment with LLM-based DV.

Proposed method

  • Design a stimulus generation agent that interacts with a DUT and a coverage monitor.
  • Develop a Coverage-Feedback Template with system messages, initial and iterative queries.
  • Propose four prompting improvements: missed-bin sampling, best-iterative-message sampling, dialogue restarting, and best-iterative-message buffer resetting.
  • Use GPT-3.5-turbo-0613 (and ablations with Llama 2) to generate stimuli within a fixed token budget.
  • Evaluate against traditional constrained-random testing (CRT) on three DUTs: Primitive Data Prefetcher Core, Ibex Instruction Decoder, and Ibex CPU.
(a) Example coverage plan
(a) Example coverage plan

Experimental results

Research questions

  • RQ1Can an LLM-based Stimulus Generation Agent achieve high coverage on hardware DUTs compared to CRT?
  • RQ2Which prompting strategies most effectively guide LLMs to hit coverage bins in DV tasks?
  • RQ3How does task complexity affect LLM-driven test stimuli effectiveness across different DUTs?
  • RQ4What are the limitations of LLMs in generating stimuli for full CPU-scale designs?

Key findings

  • LLM4DV can achieve high coverage on simpler DUTs, e.g., Primitive Data Prefetcher Core reaching 98.94% with optimal configuration.
  • Ibex Instruction Decoder achieved 86.19% coverage with best configurations.
  • For the full Ibex CPU, the framework achieved 5.61% coverage with the best setup, still better than CRT in relative terms.
  • Four prompting improvements significantly influence performance, with configurations yielding up to near-100% coverage on some DUTs.
  • Open-sourcing the framework and DUTs to enable community experimentation.
(b) LLM4DV framework
(b) LLM4DV framework

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.