Skip to main content

HDL Coder Workflow

Oftentimes, it can be beneficial to not only leverage FPGAs for high frequency signal acquisition and generation, see also further below, but to also run controls, plant simulation, or signal processing algorithms on the FPGAs using automatic VHDL code generation with HDL Coder™ from MathWorks.

Common applications include:

  • Closed-loop rates of 20kHz to 1 MHz required for some loops, e.g. for motor control and simulation, power conversion, and battery systems
  • Pre-processing of high speed analog signals, e.g. by applying filters, or to store large amounts of data, but leverage average or sample values only for closed-loop controls
  • Pre-processing of vision data, e.g. to analyze and store data, and to then provide input for the closed loop if needed
  • Final embedded target leverages FPGAs or ASIC, and prototyping on FPGAs therefore simplifies migration towards the embedded platform

Fastest closed-loop sample rates leveraging FPGAs can be achieved given the massively parallel nature of FPGAs, and by leveraging FPGA I/O modules providing all required I/O and protocols support through to one or multiple FPGAs with low-latency interconnects, eliminating PCIe bus latencies.

Running Simulink designs on Speedgoat FPGA I/O modules is comparably fast and easy, with no VHDL knowledge required:

  • Automatically generate VHDL code and synthesize your floating-point (available with MATLAB R2016b+) or fixed-point Simulink model
  • Automatically build and download your real-time application to the FPGA I/O module either installed in a Speedgoat target machine, or operating on a stand-alone carrier
  • Run the application in real-time with the click of a button, log data, monitor and tune parameters

Note that for some Simulink blocks, floating and fixed-point support restrictions may apply. Floating-point support with HDL Coder is ideal for algorithms such as IIR filters, tangents, divisions, and any feedback loop that’s difficult to converge; and fixed-point implementations are oftentimes more suitable for algorithms like FIR filters, FFTs, or NCO/mixers.

Hardware requirements

Software requirements

For more information about software and hardware prerequisites see the software installation and configuration guide.