UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Newbie wypgilbert
Newbie
976 Views
Registered: ‎03-07-2018

Compile an SDAccel program as a dynamic library

Hi,

 

I developed an accelate kernel with SDAccel 2017.1 and got it compiled as a binary application, everything works great.

 

But how can I compile this OpenCL kernel as a dynamic library so others could use this library to build their application without the knowledge of FPGA design and OpenCL architecture?

 

Is there a tutorial available on it?

 

BTW, I found a official tutorial video at https://www.xilinx.com/video/software/using-sdaccel-compiled-libraries.html. But where can I get the reference design in this video? It looks like the "median filter" design in SDAccel Examples on Xilinx Github. But I can't find the "makeSo.mk" file in the video(as attached screenshot shows).

 

Any help will be greatly appreciated.

 

Thanks!

XilinxTV.png
0 Kudos
3 Replies
Xilinx Employee
Xilinx Employee
889 Views
Registered: ‎09-08-2011

Re: Compile an SDAccel program as a dynamic library

Hi wypgilbert,

 

    Can you give me a little context into what you are trying to do?

 

Do you want it to be such that you can call the host application and kennel combined as a library for another user to link to?

 

Or do you want to have the kernel be a dynamic linked lib? 

 

It would help to know a bit more of the detail of what you want to accomplish and I can provide feedback into how feasible it might be.

If at first you don't succeed, try redefining success?
0 Kudos
Xilinx Employee
Xilinx Employee
845 Views
Registered: ‎06-07-2016

Re: Compile an SDAccel program as a dynamic library

@wypgilbert

 

If you want to build a shared library from the Smith-Waterman example on GitHub, you can add this to the end of line 17.

 

-shared -fPIC

 

It should look like:

smithwaterman_CXXFLAGS=-std=c++0x -DFPGA_DEVICE -I./src/ $(opencl_CXXFLAGS) -shared -fPIC

 

-Dutch

0 Kudos
Newbie ampowell
Newbie
559 Views
Registered: ‎07-20-2018

Re: Compile an SDAccel program as a dynamic library

I had exactly the same questions about that demo.

 

What I want to do is provide a set of services to a software team. Ideally, I would provide a library that looks identical to a software-only library currently in use, but which leverages an fpga behind the scenes. That probably means I would provide a layer of software on the host that interfaced between the purely software world, and a C++ HLS kernel on the device. My library would include the OpenCL calls to interface with the kernel so legacy software (ideally) wouldn't need to know anything about it, other than how to know a device is available on the system. Even that should be a call into code I provide.

 

I'm having trouble making the leap between the SDAccel getting_started examples and how to bring non-trivial functionality to a production software environment. Short of tracing through all of what "make check" does, I'm running out of ideas. Any pointers appreciated.

0 Kudos