0

What can I use for developing on FPGA Virtex-5 or Virtex-7: C, C++, C++11, OpenCL, MPI? And what is mostly usually uses for this?

There are:

Alex
  • 12,578
  • 15
  • 99
  • 195
  • 3
    I think you have to go with System Verilog or something equivalent. "Compiling" to FPGA is not the same as compiling C++ (the architecture is different). – Synxis Sep 11 '13 at 19:07
  • 1
    If you have the Verilog/VHDL to produce a processor in your FPGA, and there is a C or C++ compiler for that processor, I don't see why you can't use C or C++, and possibly also OpenCL or MPI, if the environment provides the resources to run that. But the FPGA itself is produced using a "hardware description language" of some sort. – Mats Petersson Sep 11 '13 at 19:17
  • @Synxis However, I have met a lot of literature that describes how to use C, OpenCL and MPI for FPGA. Has anyone used the MPI for FPGA? – Alex Sep 11 '13 at 19:18

1 Answers1

3

A FPGA is just a big configurable circuit, and developing for it is creating a program that is "compiled" into a gigantic map of how the transistors and other low-level components are configured. It is fundamentally different from a normal CPU, or even a GPU : it is massively parallel at a very low level.

Programming such board requires another way of thinking. There are two main strategies:

  • Develop with System Verilog, or another HDL (Hardware Description Language),
  • Use SystemC, or other wrapper that allows you to use C/C++ for FPGA (it will be less optimized)

Normally, the board should come with a manual indicating what to use to program it.

On a personal side, I never used OpenCL with a FPGA (but I used CUDA for GPGPU), so I don't know how it works (but I think you have some overhead, as you have to emulate some small computing units).

Synxis
  • 9,236
  • 2
  • 42
  • 64
  • Big thanks! There are many C-to-hardware compilers http://stackoverflow.com/questions/5603285/c-to-hardware-compiler-hll-synthesis But, which of these compilers supports Verilog5/7 Xilinx? And does OpenCL support at Altera and Xilinx, as said here? http://stackoverflow.com/questions/5603285/c-to-hardware-compiler-hll-synthesis – Alex Sep 11 '13 at 22:03
  • 1
    As far as I know there are already OpenCL systems on FPGA working much better than C. Altera did already support compiling OpenCL to cores, Xilinx announced it will be possible also. – DarkZeros Sep 12 '13 at 13:46
  • I only programmed an Altera board with System Verilog, so I cannot really help you with C wrappers. However, please keep in mind than even with these wrappers, you have to think differently. – Synxis Sep 12 '13 at 16:31