Faver: Boosting LLM-based RTL Generation with Function Abstracted Verifiable Middleware
Mu, Shi, Wang et al.
LLM-based RTL generation is an interesting research direction, as it holds the potential to liberate the least automated stage in the current chip design. However, due to the substantial semantic gap between high-level specifications and RTL, coupled with limited training data, existing models struggle with generation accuracy. Drawing on human experience, design with verification helps improving accuracy. However, as the RTL testbench data are even more scarce, it is not friendly for LLMs. Although LLMs excel at higher-level languages like Python/C, they have a huge semantic gap from RTL. When implementing the same functionality, Python/C code and hardware code differ significantly in the spatiotemporal granularity, requiring the LLM not only to consider high-level functional semantics but also to ensure the low-level details align with the circuit code. It is not an easy task. In this paper, we propose a function abstracted verifiable middleware (Faver) that streamlines RTL verification in LLM-based workflows. By mixing LLM-friendly code structures with a rule-based template, Faver decouples the details of circuit verification, allowing the LLM to focus on the functionality itself. In our experiments on the SFT model and open-source models, Faver improved the model's generation accuracy by up to 14%.
본 논문은 대규모 언어 모델(LLM) 기반 RTL 코드 생성의 정확성 문제를 해결하기 위해 함수 추상화 검증 가능 미들웨어(Faver)를 제안합니다. 이 방법은 LLM 친화적 코드 구조와 규칙 기반 템플릿을 결합하여 회로 검증의 세부 사항을 분리함으로써 LLM이 기능 자체에 집중할 수 있도록 합니다. SFT 모델과 오픈소스 모델에 대한 실험에서 Faver는 모델의 생성 정확도를 최대 14%까지 향상시켰습니다.
class ref_model(Model):
def __init__(self):
global state_flag0, state_flag1 # 레지스터를 전역 변수로 매핑
@driver_hook()
def reset(self): # 전용 리셋 함수
pass
@driver_hook()
def step(self): # 통합 기능 인터페이스
pass
def func1(self): # 기타 기능 함수
pass
종합 평가: 이는 LLM 기반 RTL 생성 분야에서 중요한 기여를 하는 고품질 논문입니다. 혁신적인 함수 추상화 미들웨어 설계를 통해 소프트웨어-하드웨어 검증 간의 의미론적 격차 문제를 효과적으로 해결하며, 설득력 있는 실험 결과와 우수한 실용적 가치 및 학술적 영향력을 보유하고 있습니다.