Skip to main content
QUICK REVIEW

[논문 리뷰] AutoChip: Automating HDL Generation Using LLM Feedback

Shailja Thakur, Jason Blocklove|arXiv (Cornell University)|2023. 11. 08.
Software Engineering ResearchComputer Science인용 수 17
한 줄 요약

AutoChip는 컴파일러와 시뮬레이터 피드백을 LLM에 공급하여 Verilog 코드 생성을 자동으로 반복하고, 0-shot 생성에 비해 기능적 정확성을 약 24.2% 향상시켰으며 HDLBits에서 여러 LLM으로 평가되었습니다.

ABSTRACT

Traditionally, designs are written in Verilog hardware description language (HDL) and debugged by hardware engineers. While this approach is effective, it is time-consuming and error-prone for complex designs. Large language models (LLMs) are promising in automating HDL code generation. LLMs are trained on massive datasets of text and code, and they can learn to generate code that compiles and is functionally accurate. We aim to evaluate the ability of LLMs to generate functionally correct HDL models. We build AutoChip by combining the interactive capabilities of LLMs and the output from Verilog simulations to generate Verilog modules. We start with a design prompt for a module and the context from compilation errors and debugging messages, which highlight differences between the expected and actual outputs. This ensures that accurate Verilog code can be generated without human intervention. We evaluate AutoChip using problem sets from HDLBits. We conduct a comprehensive analysis of the AutoChip using several LLMs and problem categories. The results show that incorporating context from compiler tools, such as Icarus Verilog, improves the effectiveness, yielding 24.20% more accurate Verilog. We release our evaluation scripts and datasets as open-source contributions at the following link https://github.com/shailja-thakur/AutoChip.

연구 동기 및 목표

  • Verilog 설계의 시간과 오류를 줄이기 위해 자동 HDL 코드 생성 동기를 부여합니다.
  • 반복적이고 도구 정보를 반영한 피드백이 제로샷(zero-shot) 방식보다 LLM이 생성한 Verilog를 개선하는지 평가합니다.
  • 피드백 유형과 컨텍스트 창이 코드 품질과 비용에 미치는 영향을 평가합니다.
  • 다중 LLM 앙상블과 반복 횟수를 탐색하여 컨텍스트 크기와 비용을 제한하면서 기능적 정확도를 최대화합니다.

제안 방법

  • Verilog 컴파일 및 시뮬레이션 출력과 LLM 주도 코드 생성을 다중 라운드로 반복적으로 결합합니다.
  • 시스템 프롬프트와 각 반복의 피드백(컴파일러/시뮬레이터 오류 및 테스트벤치 결과)을 LLM의 입력으로 사용합니다.
  • 토큰 제약에 맞추면서 수정 방향을 제시하기 위해 최근 반복의 컨텍스트로 한정합니다.
  • 여러 문제 카테고리와 LLM에 걸쳐 HDLBits 문제 세트로 평가합니다.
  • 제로샷 생성과 피드백 주도 생성의 차이를 비교하고 반복 횟수 및 컨텍스트 전략에 따른 성능을 분석합니다.

실험 결과

연구 질문

  • RQ1피드백이 제로샷 LLM 출력에 비해 Verilog 생성 품질을 향상시키나요?
  • RQ2반복 횟수와 컨텍스트 전략이 생성된 RTL 코드의 성공률과 오류 유형에 어떤 영향을 미치나요?
  • RQ3가장 최근 컨텍스트 피드백이 전체 컨텍스트 피드백보다 더 효과적이고 비용 효율적인가요?
  • RQ4하나의 모델을 넘어 LLM 앙상블이 결과를 더 개선할 수 있나요?
  • RQ5반복적이고 피드백 주도적인 HDL 생성의 비용과 지연 영향은 어느 정도인가요?

주요 결과

  • 컴파일 및 시뮬레이션 피드백을 LLM 프롬프트에 반영하는 것이 제로샷 생성에 비해 Verilog 정확성을 상당히 개선합니다.
  • LLM 간에 반복 피드백이 Pass@k 지표를 향상시키며, 예를 들어 Claude 2와 GPT-3.5는 반복에서 이익을 보입니다.
  • 가장 최근 컨텍스트 피드백을 사용하면 전체 컨텍스트 피드백보다 더 나은 결과와 더 낮은 컨텍스트 규모 비용을 제공합니다.
  • LLM 앙상블(GPT-3.5와 GPT-4)을 사용하면 단일 모델 실행에 비해 많은 문제에서 성공률이 더 높아집니다.
  • AutoChip은 HDLBits 문제에서 GPT-3.5와 GPT-4를 함께 사용할 때 Pass@10에서 최대 89.19%의 성공률을 달성합니다.
  • 일부 문제 클래스(예: 셀룰러 오토마타 및 특정 테스트벤치 생성 작업)에서는 인간의 입력 없이도 여전히 도전적입니다.

이 논문 읽기

누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.

누빈트에서 이 논문 읽기

이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.