Easier FPGA Programming
Field Programmable Gate Arrays (FPGAs) are most commonly programmed in chip hardware design languages (HDLs) such as Verilog or VHDL.Â These languages aren’t exactly intuitive for those of us who aren’t chip designers, so a number of companies are pushing various solutions for the rest of us.
NI has created a LabView FPGA module which targets NI hardware such as the RIO OEM board and Compact RIO.Â If you don’t have LabView, expect to pay at least $5000 for LabView and the FPGA module.Â I’m pretty sure this solution only targets NI hardware, not a full custom design.
I give NI a lot of credit for including a FPGA (field programmable gate array) in their new Vector Signal Transceiver.Â Even better, you can program the $45,000-plus instrument’s FPGA using LabView.Â I don’t know of any other test instrument with user programmable FPGAs, especially since the FPGA is programmed in LabView, a language that many test engineers already know.
If you prefer MatLab, MathWorks’ HDL-Coder can create portable HDL code from MatLab functions, Simulink models, and Stateflow charts.Â So HDL-Coder should work with about any FPGA, but you’ll have to learn how to use the FPGA vendor’s tools to compile HDL-Coders’ output code.Â I didn’t see any price, but it’s probably in the same ballpark as the LabView FPGA module.
I know Altium has been encouraging the use of FPGAs for many years with their PCB design suite, including C compilers for various soft-core and hard-core FPGA processors and a C to FPGA compiler.Â Altium does try to provide everything (PCB design, compiler, version control, etc), which can be good or bad depending on how you like their tools; I prefer the best of breed approach.
FPGA Vendor and Related Tools
I’ve seen mention of other C to FPGA tools.Â Another approach (IIRC, from Xilinx) is to analyze your C code and create custom instructions for a soft-core FPGA processor optimized for your code.
I think OpenCL has the potential to become a popular high level way to program FPGAs.Â Why?Â Â Because there will be many more OpenCL programmers than LabView, MatLab, or Altium programmers, since OpenCL is free, and is supported on very high volume targets such as AMD GPUs, NVidia GPUs, ARM SoC GPUs (OpenCL-ES), and x86 CPUs.
Unfortunately, I don’t have the time or money to review these options; I just think it’s a fascinating topic.Â I suspect that each solution has its own sweet spot (e.g. LabView FPGA is probably the easiest to use; OpenCL is probably best for if you need very high speed computations, etc).
As I’ve mentioned before, I enjoy learning about embedded development; FPGA’s are interesting, but traditionally have had a high learning curve.Â These tools can reduce the learning curve (often for a price), but don’t remove all the issues, including licensing issues.Â For example, if you buy a microcontroller with a CAN interface, the manufacturer has already paid the license fee.Â If you add one to a FPGA design, you have to pay Bosch.
Typically dedicated processors have a much higher clock rate than soft-core processors in FPGAs.Â This fact has led to the inverse of the FPGA’s programmable hardware approach: use software on simple, high speed, multi-threaded and/or multi-core systems to replace dedicated hardware (such as serial ports, MACs, and such).Â Examples include Ubicom (now part of Qualcom), XMOS, the Parallax Propeller, and dedicated microcode units such as on the Freescale MPC-8360 and TI Sitara AM335x.