Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
16556 Discussions

OpenCL with Terasic Atlas-SOC an Quartus Lite possible?

Altera_Forum
Honored Contributor II
1,700 Views

Hi everyone, 

 

I just bought myself a Terasic DE0 Atlas-SOC board because I'd like to explore the possibilities of OpenCL FPGA programming. 

I've done some VHDL at university once but found it too cumbersome so the prospect of using OpenCL sounds very promising. 

 

I am currently trying to figure out how to get started and it seems as if the OpenCL SDK only comes with Quartus Prime Standard which requires a license. 

Does that mean I cannot test OpenCL without another investment of ~1000$ for a Quartus license? 

 

Thanks!
0 Kudos
10 Replies
Altera_Forum
Honored Contributor II
643 Views

Please refer to this file: 

 

https://www.altera.com/content/dam/altera-www/global/en_us/pdfs/literature/po/ss-quartus-comparison.pdf 

 

OpenCL requires its own license regardless of which version of Quartus you are using. You can run emulations without a license, but you cannot compile against a real BSP. Apart from this, as far as I can see, there is no OpenCL BSP for this board on Terasic's website, meaning that even if you did have an OpenCL license, you still wouldn't be able to use it to program this board because Terasic does not supply an OpenCL BSP for it.
0 Kudos
Altera_Forum
Honored Contributor II
643 Views

Thanks! 

I had a look at the file but wasn't quite sure whether the additional OpenCL license was obtainable for free or not. I guess that's a no then. 

 

I must have misunderstood the fact that there is an OpenCL mandelbrot example for that board out there:  

https://rocketboards.org/foswiki/projects/openclmandelbrotdemoonatlassoc 

That homepage does have a link to a BSP for that AtlasSOC board further down. It might have been developed by a 3rd party though. 

That was proof enough for me to believe that OpenCL was possible on that board. Hence I bought it. 

 

So in short: There really is no easy and cheap option for a newcomer like me to get his hands dirty with OpenCL on an FPGA?
0 Kudos
Altera_Forum
Honored Contributor II
643 Views

You are correct, there seems to be a BSP, but it is developed by a third-party. Of course this doesn't mean the BSP doesn't work; in fact, it probably does, but you should not expect any updates or support. 

 

Regarding license, the only cheap way I know of obtaining an OpenCL license is being affiliated with a university and obtaining one through Altera's university program. Other than that, I have no idea about Altera's licensing options. You can open a support request through their website and ask.
0 Kudos
Altera_Forum
Honored Contributor II
643 Views

Thanks heaps, that clarified a lot to me. 

I found that the DE1-SoC board is labelled as "Recommended for OpenCL" so I wrote an email to terasic asking whether I would be able to start coding with that one. 

About 3 times as expensive but at least still sub $1000 which would be ridiculous for an entry level board. I think the whole fpga community still needs LOTS of work regarding ease of access for newcomers. I spent the whole day today trying to set up a generic openCL IDE on my windows laptop after spending two days before, trying to set up the FPGA OpenCL environment. 

Needless to say, I failed doing both as not a single IDE has worked so far. 

Visual Studio is too new for CUDA SDK, AMD APP installation just fails, OpenCL FPGA needs an extra license and is HUGE, all the download links are hidden in the last corners of the homepages, it takes lots and lots of reading to find the correct package ... and it goes on and on! ARG! 

 

-> Sorry for the rant but I am quite frustrated at the moment. I wonder whether any of you more epxerienced people out there think the same way? Or does all the chaos turn into order and usability after a while? (I am a full-time professional embedded C/C++ developer)
0 Kudos
Altera_Forum
Honored Contributor II
643 Views

I have a tip for you, if you are developing C/C++, switch to Linux; it will save you a lot of time in environment setup. For the particular case of Altera OpenCL, I definitely recommend avoiding Windows at all costs and using CentOS 6.x or 7.x. This is coming from a person who uses Windows for every task other than programming; heck I even code using Notepad++ on Windows and transfer it via WinSCP to my Linux compilation machines, where I just run the compilation command via SSH and wait for compilation to finish to then run it on the board which is installed on another Linux machine. 

 

Unfortunately I have to say you are absolutely correct about OpenCL support on FPGAs; the current level of support is not at all aimed at newcomers, it is mostly aimed at experienced FPGA programmers who want a more productive alternative compared to traditional HDLs. From a hardware programmer's point-of-view, OpenCL is a blessing which saves a huge amount of time in development and debugging, while from a software programmer's point-of-view, the toolchain is probably a broken, unintuitive mess, that makes more trouble than it helps. 

 

I think it took me two weeks when I got my first board up and running with OpenCL, though that was more than two years ago. Now I can do all that in a few minutes. Generally the boards that officially support OpenCL have step-by-step guides as to how you should set up your environment; as long as you read and follow the documents, you will be fine. 

 

P.S. Don't bother with other OpenCL SDKs (NVIDIA/AMD), they will not work on FPGAs. Even with the new ICD driver shipped with Quartus, assuming that you do manage to compile your host code against some other SDK, you will still need Altera's SDK for the kernel compilation. I strongly recommend taking a look at Altera's OpenCL documents to get an idea of how the toolchain works before spending any more money on purchasing boards. The way OpenCL works on FPGAs is completely different from CPUs/GPUs.
0 Kudos
Altera_Forum
Honored Contributor II
643 Views

Thanks for the advice! That's actually some very good news, I'm a big fan of Linux but am still lacking the need to use it apart from my web servers. Do you think Ubuntu works as well? How about MacOS because I actually only have a macbook and don't really want to add a third OS to its hdd. 

 

I only tried the other OpenCL SDKs in case I'm not going to be able to develop or FPGAs. I'm hoping I might at least get some hands-on experience with GPUs. 

 

I also just got a reply from Terasic customer support which I will just paste in below. There seems to be another DE0 BSP available as this one is straight from Terasic and not Rocketboards. 

So this looks like I might get lucky after all - I only need to get my hands on an OpenCL license. I guess I'd have to get in contact with Altera sales directly and kindly ask them whether I may buy one? I wonder why someone shouldn't be allowed to buy it though ... 

 

 

--- Quote Start ---  

 

Hello Valentin, 

 

Thanks for your emails. 

Regarding your questions, please refer to the following answers for your reference. 

 

 

--- Quote Start ---  

 

Now I find out that I need to buy a separate openCL license - another 

$200 as of your website. 

--- Quote End ---  

 

I think you might be referring to the license which is shown on the accessory option zone to DE5/ DE5a-Net board. 

Kindly note that we are not able to sell the license separately to you since the license is set as a bundle for the DE5-Net and DE5a-Net boards. 

FYI, the license/ software are actually not in our sales field. Hence, you will need to check with Altera for purchasing the license directly. 

 

 

 

--- Quote Start ---  

 

sorry to disturb again - I just found that your DE1-SoC Board is "Preferred for OpenCL". 

Does that mean it also comes with an OpenCL SDK license? Will I be able to start developing OpenCL if I buy that board? Or do I still need to buy something else (another license)? 

--- Quote End ---  

 

DE1-SoC is concerned suitable for running OpenCL by Altera, but we don't sell the license along with the board.  

Only DE5-Net/ DE5a-Net comes with the OpenCL license as an optional accessory. 

 

 

--- Quote Start ---  

 

Can you please confirm that after buying that, the OpenCL SDK will work with Quartus Lite? 

Or is there anything else I need to to/get/buy in order to start programming my board with OpenCL? 

--- Quote End ---  

 

Since the OpenCL will need to use the Quartus, you might need to check if the license which Altera/ their distributors provide includes both the Quartus and OpenCL licenses if you don't have the Quartus license yet. 

 

 

--- Quote Start ---  

 

I've seen that there's a 3rd party BSP available on rocketboards. Do you know anything about it? Does it work? Or does terasic maybe have an unpublished BSP for that board available somewhere? 

--- Quote End ---  

 

Yes, you may refer to the BSP shared on rocketboards as your developing reference. 

Or, you may also refer to the following link to download the BSP from Terasic. 

http://mail.terasic.com.tw/~keith/20170703/de0_nano_soc_opencl_bsp.zip 

 

 

Do let us know if you have any questions. 

 

--- Quote End ---  

0 Kudos
Altera_Forum
Honored Contributor II
643 Views

First of all, thanks for your support HRZ! 

The Linux advice is actually really good news. I love Linux but don't have much use for it yet - except for my web servers. Do you think Ubuntu / MacOS might work too? I only have a macbook available and don't want to squeeze another OS on there. 

 

Regarding the other SDKs, I was thinking that at least I might get started doing OpenCL for GPUs - in case I won't be able to get a license from Altera. 

Btw, I have news about the BSP for the Terasic DE0-AtlasSOC: There is another one available coming straight from Terasic. I just received a reply from customer service to my email. I'll quote below: 

 

 

--- Quote Start ---  

Hello Valentin, 

 

Thanks for your emails. 

 

Regarding your questions, please refer to the following answers for your reference. 

 

 

--- Quote Start ---  

 

Now I find out that I need to buy a separate openCL license - another $200 as of your website. 

--- Quote End ---  

 

I think you might be referring to the license which is shown on the accessory option zone to DE5/ DE5a-Net board. 

Kindly note that we are not able to sell the license separately to you since the license is set as a bundle for the DE5-Net and DE5a-Net boards. 

FYI, the license/ software are actually not in our sales field. Hence, you will need to check with Altera for purchasing the license directly. 

 

 

 

--- Quote Start ---  

sorry to disturb again - I just found that your DE1-SoC Board is "Preferred for OpenCL". Does that mean it also comes with an OpenCL SDK license? Will I be able to start developing OpenCL if I buy that board? Or do I still need to buy something else (another license)? 

--- Quote End ---  

 

DE1-SoC is concerned suitable for running OpenCL by Altera, but we don't sell the license along with the board.  

Only DE5-Net/ DE5a-Net comes with the OpenCL license as an optional accessory. 

 

 

--- Quote Start ---  

Can you please confirm that after buying that, the OpenCL SDK will work with Quartus Lite? 

Or is there anything else I need to to/get/buy in order to start programming my board with OpenCL? 

--- Quote End ---  

 

Since the OpenCL will need to use the Quartus, you might need to check if the license which Altera/ their distributors provide includes both the Quartus and OpenCL licenses if you don't have the Quartus license yet. 

 

 

 

--- Quote Start ---  

I've seen that there's a 3rd party BSP available on rocketboards. Do you know anything about it? Does it work? Or does terasic maybe have an unpublished BSP for that board available somewhere? 

--- Quote End ---  

 

Yes, you may refer to the BSP shared on rocketboards as your developing reference. Or, you may also refer to the following link to download the BSP from Terasic.  

 

http://mail.terasic.com.tw/~keith/20170703/de0_nano_soc_opencl_bsp.zip 

 

Do let us know if you have any questions. 

Thanks. 

 

--- Quote End ---  

 

 

So I guess I'd have to ask Altera sales directly whether they sell me an OpenCL license. I hope it's not too expensive as this is all an experiment for me ... 

Anyway, thanks for your support so far HRZ! It's much appreciated.
0 Kudos
Altera_Forum
Honored Contributor II
643 Views

Hmm, I now tried two times to reply to this thread but every time the post vanished, saying it needed moderator's approval but nothing happened over the last couple hours ... 

I will re-post again tomorrow. 

 

In short: I received a BSP from Terasic, they pointed me to Altera support who then redirected me to my distributor (Mouser) who pointed me back to Altera University and is also looking into it. It starts to look like Altera doesn't want to get people into OpenCL? 

 

edit: of course, this reply worked ... :)
0 Kudos
Altera_Forum
Honored Contributor II
643 Views

Reply approval could take a few days, there are only a few moderators watching this forum in their free time (this is a user forum and not monitored by Altera). 

 

Altera, pretty much just like all other similar companies, does not want to give people anything unless they contribute back; this contribution could be in the form of money paid for hardware and license, or papers published by people in academia which work as free advertisement for them.
0 Kudos
Altera_Forum
Honored Contributor II
643 Views

Oh yes, I fully understand. I think part of my frustration stems from the fact that - from a marketing perspective - Altera would actually benefit much more from making it easy for newcomers to get into their ecosystem. I can only point to e.g. STM32 who are doing a much better job there. $25 for a evaluation board and off you go with a free IDE. Everybody is using them now.  

 

And, I would be willing to pay for the license - if I could get it from somewhere. It feels a bit like a broken promise - advertising OpenCL everywhere and then making it hard to get. 

 

Anyway, not much point in me continuing the ranting along. I think I have spread enough misery here. I will report back once I found a solution.
0 Kudos
Reply