ContractHIL-HLS: Contract-Aligned Multi-Agent Workflow with Hardware-in-the-Loop Feedback for HLS Design

📅 2026-07-28
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work addresses the semantic gap between natural language specifications and hardware implementations in high-level synthesis (HLS), as well as the lack of system-level closed-loop verification. To bridge this gap, the authors propose a structured-contract-based multi-agent collaboration framework that translates natural language requirements into formal interfaces and constraints. The approach integrates HLS, FPGA toolchains, and hardware-in-the-loop (HIL) feedback to establish a closed-loop optimization pipeline spanning code generation to board-level validation. Specialized agents are designed through semantic decomposition and task allocation, while large language models assist HLS and enable seamless integration with Vivado/PYNQ for contract-driven hardware-software co-development. Experiments show a 70.4% single-sample pass rate on HLS-Eval (improving to 76.6% with five samples); in a post-quantum cryptography accelerator case study, the average execution time across six messages drops from 207.3 ms to 52.4 ms while meeting timing and functional correctness requirements.
📝 Abstract
This paper presents ContractHIL-HLS, a contract-aligned multi-agent workflow for practical high-level synthesis (HLS) engineering. The workflow makes three contributions. First, it introduces a structured contract as the semantic-alignment and task-execution artifact that translates natural language requirements into explicit interfaces, constraints, validation checks, and rollback rules. Second, it incorporates hardware information into the feedback loop by feeding HLS, Vivado, PYNQ runtime, power, and failure evidence back into generation, thereby extending LLM-assisted HLS from kernel code toward system- and board-level closure. Third, it decomposes agents by semantic lowering and execution tasks rather than by conversational roles: a Contract Agent lowers natural language into the contract, an HTML Agent renders the contract as persistent structured HTML, and a Hardware-in-the-Loop Agent implements and revises the design with measured evidence. We evaluate ContractHIL-HLS in two parts. On 94 locally executable HLS-Eval tasks, the structured contract provides the largest small design gain, improving the estimated single-sample testbench pass rate from 64.0% to 70.2%; the full flow reaches 70.4% pass@1 and 76.6% pass@5. Because HLS-Eval does not exercise board-level design, we also validate ContractHIL-HLS on a board tested ML-KEM/ML-DSA post-quantum cryptography (PQC) secure-message accelerator, where the retained dual-bitstream organization reduces six-message average text runtime from 207.3 ms to 52.4 ms with positive routed WNS on both images while preserving decrypted-message verification. We open-source our work at BJUT-CS316-LAB/ContractHIL-HLS (https://github.com/BJUT-CS316-LAB/ContractHIL-HLS).
Problem

Research questions and friction points this paper is trying to address.

High-Level Synthesis
Hardware-in-the-Loop
Contract-Based Design
Multi-Agent Workflow
Post-Quantum Cryptography
Innovation

Methods, ideas, or system contributions that make the work stand out.

contract-based design
hardware-in-the-loop
multi-agent workflow
high-level synthesis (HLS)
LLM-assisted hardware design