Home›Industry News›Four Paths From MATLAB Algorithms to FPGAs, and the Trade-offs
← Back to Industry News
Tutorial

Four Paths From MATLAB Algorithms to FPGAs, and the Trade-offs

TutorialFour Paths From MATLABAlgorithms to FPGAs,and the Trade-offsfpga.love
Illustration

Moving a MATLAB algorithm onto an FPGA has never been something a single toolchain can handle end to end. MathWorks, Xilinx and Synopsys each offer an entry point, but they differ markedly in performance, resource use and degree of tool dependency; choosing among them is essentially a trade between convenience and control.

The divide between three vendor toolchains

MathWorks' Simulink HDL Coder can generate synthesizable HDL from Simulink models and embedded MATLAB code, making it suitable for quickly evaluating how a new algorithm performs in hardware. Xilinx's System Generator for DSP provides a library of blocks pre-optimized for its own FPGAs; designs are simulated in Simulink and then compiled onto the board, and the original article considers its performance higher than that of HDL Coder. Synopsys' Synphony HLS generates RTL and C models from MATLAB code and an optimized IP model library; the company says it supports constraint-driven fixed-point propagation and synthesizes against area, speed and power targets. What the three paths share is that they all require the designer to stay inside the MATLAB/Simulink environment; they differ in how thoroughly the block libraries are pre-optimized and in how portable the output RTL is.

The shadow of the discontinued AccelDSP

The original author is reserved about Synphony HLS: having never used it, the author does not assess its design flow and notes only that it sounds similar to Xilinx's discontinued AccelDSP. AccelDSP was positioned precisely as a way to rapidly prototype MATLAB algorithms for FPGA hardware, but the original article states plainly that it usually did not produce high-performance designs. The value of this comparison lies not in a product-to-product assessment but in a reminder: tools that automatically generate RTL from MATLAB code have repeatedly, over the years, stopped at the first notch between "it runs" and "it runs well." Whether Synphony HLS clears that bar is not something the source material establishes: it offers no verifiable tapeout or board-level data, so any conclusion beyond the vendor's claims remains open.

PrincipleSetupVerify
Illustration

Where hand-written HDL remains irreplaceable

The last path is manual coding: understand which multiplications, additions, subtractions and divisions the algorithm performs, write the design from scratch in Verilog or VHDL, instantiate Xilinx IP as needed, then build an HDL testbench and compare the MATLAB input and output vectors against the HDL simulator. The original article's assessment is blunt — engineers have done it this way for decades, but it is slow and error-prone. It also carries two advantages that automated flows struggle to deliver at once: HDL output that does not depend on a specific software tool, and low resource usage. The real issue is that these two advantages carry great weight in domestic-substitution and cross-vendor porting scenarios; the deeper the toolchain lock-in, the more rework is required when changing platforms.

Three takeaways
  • HDL Coder suits rapid evaluation; System Generator offers higher performance but ties users to Xilinx
  • The author has not tested Synphony HLS and only likens it to the discontinued AccelDSP
  • Hand-written HDL is slow and error-prone but tool-agnostic and resource-frugal

What it means for us

For engineers in China working on high-speed interfaces and board design, this material offers limited practical information: it contains no tool versions, resource usage, timing closure or board-level data, so it cannot be used to judge which path is faster in a specific project. The only usable conclusions are qualitative — if the target device is Xilinx and performance is the goal, System Generator's pre-optimized block library is a ready-made entry point; if the project may involve cross-vendor porting or replacement with a domestic FPGA, the tool dependency of automatic RTL generation must be factored into rework costs in advance, and the portability of hand-written HDL becomes a long-term advantage instead. Toolchain selection should first establish whether the device roadmap is locked in, then consider how often the algorithm iterates.

MATLABFPGAHLStoolchain
fpga.love