OpenCL for custom systems on SoC prototyping board
Asked Answered
L

4

6

Is it possible to run OpenCL on a system designed by a user on a SoC prototyping board? To be more specific, I have a ZedBoard (Xilinx Zynq) that has Dual ARM cores and a Programmable Logic (PL) Area. If I design a simple system of my own that has a video processing accelerator implemented in the logic area, an ARM core and an AXI interconnect, what do I have to do to provide OpenCL support for this simple system? (In this simple system, the ARM core could be the "Host" and the video processing accelerator could be the "device").

I am a student and I have only some basic knowledge about OpenCL. I have researched about my question and have only ended up confusing myself. What are the things that have to be done to provide OpenCL support for a SoC? I understand that this may be a big project, but I need a guideline where to start and how to proceed.

Langmuir answered 30/6, 2015 at 16:16 Comment(1)
Not sure whether it helps, but at least there are ARM-based processors for which OpenCL implementations exist: ziilabs.com/products/software/opencl.phpSweven
T
1

what do I have to do to provide OpenCL support for this simple system?

Implement a OpenCL platform that makes either use of your ARM CPU or the FPGA (or both). I'd say that is pretty much impossible for you; ARM would surely offer one for the CPU if it was easy (and they definitely have the financial means to employ capable engineers/computer scientists), and implementing accelerators on an FPGA requires in-depth knowledge of FPGA development, as well as compiler theory and experience in systems design. I don't want to sound mean, but you seem to have none of these three.

You asked where to get started; I recommend just writing a first accelerator that e.g. adds up a vector of numbers; as soon as you have that, you will have a clearer idea of your task.

If you want to have a look at a reference: The Ettus USRP E310 is a zynq-based SDR device. Ettus has a technology called RFNoC, which allows users to write their own blocks to push data through. Notice that this took quite a few engineers and quite some time to get started. Notice further that it's much easier than implementing something that converts OpenCL to FPGA implementations.

Tiaratibbetts answered 30/6, 2015 at 16:21 Comment(3)
Thanks for your response. You are right I have very little knowledge, I am an undergrad student and just want to start. You said "Implement an OpenCL platform"; would anything like pocl (www.portablecl.org) help?Langmuir
That's less a problem of knowledge than it is of manpower -- having a working openCL implementation takes developer manyears. You can of course use general purpose CPU OpenCL platforms like pocl, but that won't really give you significant acceleration unless your OpenCL-algorithms match the properties of these platforms extremely well. Generally, believe me when I say that the ARM is not what you want to work on -- it's slower than what you get in smart phones by a solid factor.Inclusive
I knew about Vivado HLS, but that 's not really an option here -- OP can't run Vivado HLS to convert OpenCL to accelerated stuff "on the fly", like you could when actually having OpenCL support on the target machine.Inclusive
P
1

If you have access to the Xilinx tools: Vivado HLS 15.1 System Edition should compile OpenCL kernels. This will also be included in the SDAccel tool suite.

Source: UG973: Vivado Design Suite User Guide Release Notes, Installation,and Licensing

An alternative might be switching to Altera. They provide some good examples for the Altera Cyclone V SoC which is comparable to Xilinx Zynq devices (also includes ARM Cortex-A9) : AlteraSDK for OpenCL

Parley answered 1/7, 2015 at 7:11 Comment(0)
H
1

I am also a student and my current project is also going on a similar direction, i have successfully installed a version of opencl called POCL on the zedboard, it successfully detects the arm cpu of the zedboard. To install pocl, you need llvm and a horde of other things as well. but basic steps to get pocl up on the zedboard are given below:-

  1. Installing pocl:

http://www.hosseinabady.com/install-pocl-opencl

  1. running example: http://www.hosseinabady.com/embedded-system-by-examples/opencl_embedded_system/opencl-vector-addition

  2. Lots of dependency: can resolved easily

but LLVM make sure you install 3.4 version for pocl 0.9

  1. Steps to install llvm

https://github.com/pacs-course/pacs/wiki/Instructions-to-install-clang-3.1-on-ubuntu-12.04.1-and-12.10

POCL 0.9 is successfully working for me, as you do the installation you will face many other missing dependencies like hwloc, mesa libraries, open gl/cl headers icd loaders i hope you can resolve them as its a very big list to put up in stack overflow.

In order to detect your fpga as an open cl device, thats not going to be a trivial thing to do, you can refer to this link question i posted on github

https://github.com/pocl/pocl/issues/285

and also a research paper published by hosseinbady found on the publications link on the pocl website

http://pocl.sourceforge.net/publications.html

hope this helps you

Histiocyte answered 19/12, 2015 at 11:1 Comment(0)
A
0

Try the ARM OpenCL SDK. The Zedboard has an ARM A9 CPU, this should have a NEON SIMD vector unit http://www.arm.com/products/processors/technologies/neon.php which can run OpenCL. See http://www.arm.com/products/multimedia/mali-technologies/opencl-for-neon.php.

The Zedboard isn't listed as an OpenCL conformant platform https://www.khronos.org/conformance/adopters/conformant-products#opencl. So there is a chance the ARM driver will not work.

Good luck!

Abbie answered 30/6, 2015 at 18:38 Comment(3)
I wasn't aware that the A9 was covered! nice. However, if you got a zynq and do your number crunching on the ARM, you're doing something wrong...Inclusive
@buttifulbuttefly that's awesome, but what does it do? Implement a specific vector proc on the FPGA?Inclusive
Here is the link to Xlilinx OpenCL support xilinx.com/products/design-tools/sdx/sdaccel.html but this forum post by a Xilinix engineer reutes any support for Zynq forums.xilinx.com/t5/High-Level-Synthesis-HLS/…Abbie

© 2022 - 2024 — McMap. All rights reserved.