Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
8 years ago

the first code in C++ in Quartus II 13.0sp1 (64-bit) Web Edition

After Regards ,,

I am a beginner in the use of FPGA ALTERA Cycllone II what are the steps to start writing simple code in C language and its implementation please help you friends .

5 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    i need the steps to write simple code in C or C++ example : sum of matrix element

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    i need the steps to write simple code in C or C++ example : sum of matrix element

    --- Quote End ---

    It is unclear what your goal is. Are you looking to write C/C++ code that runs on a processor subsystem instantiated in an FPGA (like NIOS or SOC), or are you expecting to write C/C++ code that is compiled directly to FPGA logic cells / hardware?

    If the former, there are NIOS soft core processors available for the Cyclone II FPGA (and development boards which I suspect you would be using). However, this is not really using an FPGA to be an FPGA; what you would be doing is just running C code on a processor. You could do that on an Arduino board for much less cost, and a much simpler environment.

    Otherwise, if you want to run something that looks like C/C++ on an FPGA, then you might explore the OpenCL environment that is available for some FPGA boards (however not Cyclone II I believe, but I could be wrong). Google 'altera opencl' to get lots of links to doing this.

    Here's the first link I come up with: https://www.altera.com/products/design-software/embedded-software-developers/opencl/overview.html so you might want to start there.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    thank you

    yes i want to write code C++ or C on processor NIOS i use board Cyclone II , Can i use NIOS to implement Deep learning algorithms like Deep Belife network algorithm in FPGA ?? What steps do I need to help you?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    thank you

    yes i want to write code C++ or C on processor NIOS i use board Cyclone II , Can i use NIOS to implement Deep learning algorithms like Deep Belife network algorithm in FPGA ?? What steps do I need to help you?

    --- Quote End ---

    I am not familiar with those specific class of algorithms, but you can run C/C++ programs using the NIOS soft processor on a CycloneII based board. However, be aware the processor is limited in performance (better than an Arduino, not better than a single/dual core ARM on a SOC). Depending on the board design and NIOS system implementation there may be program size restrictions (I am assuming that your algorithms are probably very memory intensive).

    As far as helping me, there is nothing further I need. You however need to do a lot of reading and research.