Migration from MCU/DSP to FPGA for Power Electronics: Part 1 Software

In a recent discussion we were asked about the migration path from MCU/DSP to FPGA.

“I am probably not alone when I use MCU/DSP devices to implement control algorithms, protection, logic etc to control the power hardware, using code such as ASM, C or C++, but want the advantages of FPGA. What suggestions do you have to start this migration, both in terms of a cheap evaluation board, and software tools, that can be targeted at driving various topologies and speeds.”

Thanks to Anthony W. for the question.  We get asked similar migration from MCU/DSP to FPGA for power electronics questions where the emphasis is more about retaining the value of an existing code base and coding team expertise while leveraging the flexibility of the FPGA.

As the first question states MCU/DSP devices are a common tool to implement control algorithms, protection, logic and sequencing for  control power hardware, using code such as ASM, C or C++.  However they do not have the power and flexibility of FPGAs. What is the best way to approach a migration from MCU/DSP to FPGA, both in terms of evaluation boards, and software tools, for a wide range of power electronic applications?

Best migration path MCU/DSP to FPGA for Power Electronics

There are a number of pathways to do this. The first one is High Level Synthesis. This is basically writing FPGA code in C. It is a very powerful tool but it does take some know how to make sure that you can get the most benefit out of the transition to FPGA. The downside of this is that it is quite expensive. There are however a couple of FPGA kits out there that do come with a kit-locked license (node-locked and locked to the FPGA model on the board).

Processor Inside

Another way is to use an FPGA with a processor, or processors, inside it. These processor can be soft-cores like Xilinx’s Microblaze or hard-cores like the twin ARM A9s in Xilinx’s Zynq series. (Reports on FPGA development projects show that almost 50% have some sort of processor.)  This processor allows you to directly port your code from your MCU/DSP to the Zynq/Microblaze and be ready to go. This may seem counter-productive as going from one processor to another without really gaining FPGA power is work for no reward.  The advantages come when you move parts of your code (the high intensity tasks such as the control algorithms) from C to the FPGA hardware. This provides a power boost for the important parts of your code whilst still having the simplicity of C for the easy flow of your code. A good analogy would be that the FPGA parts are the equivalent of the ASM parts on the MCU/DSP but with the superman type speed advantage of doing things in parallel in the FPGA fabric.

Best of both

Xilinx has also combined the HLS and the C coding options with their SDSoC product. It is designed for the Zynq SoC .  The coding is done in C. However you can use HLS to accelerate certain parts of the code for you to gain the most benefit.

Getting the most out of the Zynq solution does require either the expensive HLS toolchain and training in that or writing your own HDL. Another option is to purchase IP that other companies have written.  This allows you to create a fast and efficient system without needing to know coding of an FPGA in HDL or C.  ELMG Digital Power has a large suite of power electronics IP to get your application off the ground fast.

Prototyping and Development Platforms

In part 2 of this blog post, which is coming later, the answers to the questions

“How can I prototype this when the chip is BGA only?”

and

“What is an appropriate development platform or dev board?”

are covered.

Download the report ‘Your Digital Power Future – Roadblocks to Avoid’ to learn about the three key issues to watch out for in the Digital Control of Power electronics.


Download report now