Workflows vs Agents for Code Translation
Henry Gray, Tom Yotam, Octavian Udrea

TL;DR
This paper compares structured workflows and agentic approaches using LLMs for syntax repair in MATLAB-to-HDL translation, showing agentic methods improve success rates especially in small and mid-sized models.
Contribution
It introduces and evaluates an agentic LLM approach with the Model Context Protocol for syntax repair, demonstrating its effectiveness over traditional workflows in code translation pipelines.
Findings
Agentic approach outperforms structured workflows in syntax error resolution.
Upstream improvements lead to over 20% increase in simulation reach rate.
Agentic frameworks are most effective for small and mid-sized models.
Abstract
Translating algorithms from high-level languages like MATLAB to hardware description languages (HDLs) is a resource-intensive but necessary step for deployment on FPGAs and ASICs. While large language models (LLMs) offer a path to automation, their limited training on HDL code makes end-to-end transpilation brittle and prone to syntax errors. We compare two LLM-driven methods for syntax repair in a MATLAB-to-HDL pipeline: a structured, expert-designed flow that follows a fixed sequence of operations, and a more autonomous agentic approach that uses the Model Context Protocol (MCP) \cite{anthropic2024mcp} to dynamically select its own tools. We study 42 MATLAB signal-processing functions and isolate the syntax-repair stage. Across three model scales, the agentic approach is more effective at resolving initial syntax errors, unblocking a greater number of candidates to proceed through the…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsEmbedded Systems Design Techniques · Model-Driven Software Engineering Techniques · Parallel Computing and Optimization Techniques
