MATLAB: How to generate a HDL code for a buck converter using Mtalab simulink and xilinx system Generator

fpgahdl codeHDL CoderMATLABsimpowersystemsSimscape Electricalsimulinkxilinx system generator

Hello,
Im working on implementing a buck converter model with it PID Controller on FPGA (Spartan 3 and 3An Xc3s700a package :fg484 speed-4 ) using simulink of Matlab2012 a and xilinx system generator 14.2 i want to generate a HDL code for this model which is based on simpowersystems in Simulink. Can you please help me find a solution for this problem ? Do i have to eliminate the buck converter model and replace it with it transfert function or another simulink model?

Best Answer

HDL Coder does not support SimPowerSystems components. This is logical; you cannot synthesize power components onto a FPGA. You will need to consider what portion of your design (e.g., the PID controller) is part of the control design that can be placed on a FPGA, and separate it from the portion that uses blocks that cannot be implemented on a FPGA. Once you have your design partitioned you can generate HDL code for the controller portion of your design.