ARAIJun 25

Evidence-Driven LLM Agent for C-to-Synthesizable-C Conversion and Verification

arXiv:2606.28409
Originality Incremental advance
AI Analysis

For hardware designers using HLS tools, this work provides a more reliable and reproducible method to convert C code to HLS-C, addressing a key bottleneck in the HLS toolchain.

The paper tackles C-to-synthesizable-C (HLS-C) conversion for high-level synthesis, achieving substantial improvements over state-of-the-art models by formulating it as a closed-loop generation-verification-diagnosis-repair problem with evidence isolation and progressive mismatch localization.

Software-compilable C programs routinely fail to complete the four-stage pipeline of a high-level synthesis (HLS) toolchain -- compilation, C simulation (CSim), synthesis, and C/RTL co-simulation (CoSim) -- because HLS accepts only a synthesizable subset of C (HLS-C). Yet most existing large language model (LLM) systems built for HLS code repair only cover the early pipeline stages and feed raw tool logs directly to the model, yielding brittle and hard-to-reproduce fixes. We formulate C-to-HLS-C conversion as a closed-loop generation-verification-diagnosis-repair problem on an HLS tool (Xilinx Vitis), contributing three components: an end-to-end workflow of cooperating agents closed by the four-stage verifier under strict evidence isolation; a Progressive Mismatch Localization Chain (PMLC) that localizes CSim/CoSim mismatches through log normalization, AST backward slicing, and dual-trace instrumentation; and a typed-query, two-stage evidence RAG backed by a self-evolving, family-routed repair-card pool. Experimental results show that the proposed workflow substantially outperforms all comparable state-of-the-art models.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes