Skip to main content
QUICK REVIEW

[Paper Review] RTLLM: An Open-Source Benchmark for Design RTL Generation with Large Language Model

Yao Lu, Shang Liu|arXiv (Cornell University)|Aug 10, 2023
Ferroelectric and Negative Capacitance DevicesEngineering12 citations
TL;DR

RTLLM provides an open-source benchmark of 30 design RTL generation tasks from natural language, plus a self-planning prompt technique to boost LLM performance, enabling evaluation of syntax, functionality, and design quality.

ABSTRACT

Inspired by the recent success of large language models (LLMs) like ChatGPT, researchers start to explore the adoption of LLMs for agile hardware design, such as generating design RTL based on natural-language instructions. However, in existing works, their target designs are all relatively simple and in a small scale, and proposed by the authors themselves, making a fair comparison among different LLM solutions challenging. In addition, many prior works only focus on the design correctness, without evaluating the design qualities of generated design RTL. In this work, we propose an open-source benchmark named RTLLM, for generating design RTL with natural language instructions. To systematically evaluate the auto-generated design RTL, we summarized three progressive goals, named syntax goal, functionality goal, and design quality goal. This benchmark can automatically provide a quantitative evaluation of any given LLM-based solution. Furthermore, we propose an easy-to-use yet surprisingly effective prompt engineering technique named self-planning, which proves to significantly boost the performance of GPT-3.5 in our proposed benchmark.

Motivation & Objective

  • Provide a fair, scalable benchmark for RTL generation from natural language that covers syntax, functionality, and design quality.
  • Enable automatic evaluation of any LLM-based RTL generation solution against ground-truth hand-crafted RTLs.
  • Introduce self-planning prompt engineering to improve LLM performance in RTL code generation.

Proposed method

  • Define three progressive evaluation goals: syntax, functionality, and design quality.
  • Assemble 30 diverse RTL designs with ground-truth VHs, testbenches, and HDL, plus descriptive L files.
  • Use automated tooling to synthesize, simulate, and compare generated RTL against references.
  • Propose self-planning as a two-step prompt technique that includes reasoning steps and syntax-safety checks.
  • Evaluate five LLMs (GPT-3.5, GPT-4, Thakur et al. 2023, StarCoder, and GPT-3.5/4 with self-planning).
  • Provide ground-truth baselines and automatic metrics for design quality (area, power, timing) after synthesis.

Experimental results

Research questions

  • RQ1How well do LLMs generate correct Verilog/VHDL/Chisel RTL from natural-language descriptions under a standardized benchmark?
  • RQ2To what extent can prompt engineering, especially self-planning, improve syntax correctness and functional correctness of generated RTL?
  • RQ3How do LLM-generated designs compare to human-crafted references in terms of synthesis metrics (PPA) and functional validity?
  • RQ4Which LLMs and prompting strategies yield the best overall RTL design quality across diverse design types and scales?

Key findings

  • GPT-4 achieves the highest syntax correctness (81%) and functionality correctness (15/30) among evaluated models.
  • GPT-3.5 with self-planning substantially improves over plain GPT-3.5 (73% syntax, 14/30 functionality) approaching GPT-4 performance.
  • Self-planning significantly enhances RTL generation accuracy for several designs compared to GPT-3.5 without planning.
  • Academic models (Thakur et al., StarCoder) show lower performance than commercial LLMs in both syntax and functionality under RTLLM.
  • The benchmark enables automatic evaluation of syntax, functionality, and design quality against ground-truth designs across 30 diverse RTL tasks.

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.