LLM-FSM: 대규모 언어 모델을 활용한 유한 상태 머신 추론을 통한 RTL 코드 생성 성능 향상
LLM-FSM: Scaling Large Language Models for Finite-State Reasoning in RTL Code Generation
유한 상태 머신(FSM) 추론은 하드웨어 설계의 핵심 요소이며, 상태에 의존적인 동작을 이해하고 구현하는 능력을 의미합니다. 본 논문에서는 LLM-FSM이라는 벤치마크를 제시합니다. LLM-FSM은 대규모 언어 모델(LLM)이 자연어 설명을 기반으로 FSM의 동작을 얼마나 정확하게 복원하고 이를 정확한 레지스터 전송 레벨(RTL) 구현으로 변환할 수 있는지를 평가합니다. 기존의 사양-RTL 벤치마크와 달리, LLM-FSM은 수동으로 제작된 예제에 의존하지 않고, 완전 자동화된 파이프라인을 통해 구축되었습니다. LLM-FSM은 먼저 구성 가능한 상태 수와 제약 조건이 있는 전환 구조를 가진 FSM을 생성합니다. 그런 다음, LLM에 각 FSM을 응용 컨텍스트와 함께 구조화된 YAML 형식으로 표현하도록 지시하고, 이를 자연어(NL) 사양으로 변환하도록 합니다. 동일한 YAML을 사용하여 파이프라인은 참조 RTL과 테스트벤치를 생성하며, 이는 '정확성 보장' 방식으로 수행됩니다. 1,000개의 모든 문제는 LLM 기반 및 SAT 해결기 기반 검사를 통해 검증되었으며, 일부는 인간 검토를 거쳤습니다. 실험 결과, 가장 강력한 LLM조차도 FSM의 복잡도가 증가함에 따라 정확도가 크게 감소하는 것을 확인했습니다. 또한, 지도 학습(SFT)을 통한 학습 시간 스케일링은 분산 데이터(OOD) 작업에 효과적으로 적용될 수 있으며, 테스트 시간 컴퓨팅 증가가 추론의 신뢰성을 향상시키는 것을 입증했습니다. 마지막으로, LLM-FSM은 FSM의 복잡도를 향후 모델의 기능에 따라 확장할 수 있도록 설계되어 확장성이 뛰어납니다.
Finite-state reasoning, the ability to understand and implement state-dependent behavior, is central to hardware design. In this paper, we present LLM-FSM, a benchmark that evaluates how well large language models (LLMs) can recover finite-state machine (FSM) behavior from natural-language specifications and translate it into correct register transfer-level (RTL) implementations. Unlike prior specification-to-RTL benchmarks that rely on manually constructed examples, LLM-FSM is built through a fully automated pipeline. LLM-FSM first constructs FSM with configurable state counts and constrained transition structures. It then prompts LLMs to express each FSM in a structured YAML format with an application context, and to further convert that YAML into a natural-language (NL) specification. From the same YAML, our pipeline synthesizes the reference RTL and testbench in a correct-by-construction manner. All 1,000 problems are verified using LLM-based and SAT-solver-based checks, with human review on a subset. Our experiments show that even the strongest LLMs exhibit sharply declining accuracy as FSM complexity increases. We further demonstrate that training-time scaling via supervised fine-tuning (SFT) generalizes effectively to out-of-distribution (OOD) tasks, while increasing test-time compute improves reasoning reliability. Finally, LLM-FSM remains extensible by allowing its FSM complexity to scale with future model capabilities.
No Analysis Report Yet
This paper hasn't been analyzed by Gemini yet.
Log in to request an AI analysis.