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: 
Explorer
Explorer
511 Views
Registered: ‎05-21-2017

How to use a separate cpp file to describe functions used by the HW function?

 

Hello,

 

I tried to do what the title of this post says but I got a "has no function body" error for the functions described in the separate cpp file. When I put all the code in the same file with the HW function everything builds smoothly.

 

Additionally, my project builds fine with the separate cpp file when testing it with g++. So, it is not a matter of coding error.

 

So, the questions are:

a) Is this a limitation of the SDSoC SW (I'm using version 2017.2) ?

b) If it is not a limitation of the SDSoC SW, what someone has to do to achieve the desired coding style ?

 

 

Cheers,

Panos

Without proper software tools the hardware is unusable no matter how good and well designed it is.
0 Kudos
2 Replies
Xilinx Employee
Xilinx Employee
480 Views
Registered: ‎07-18-2014

Re: How to use a separate cpp file to describe functions used by the HW function?

Hi @pmousoul,

There are bunch of SDSoC Git Examples which are defining hw function into separate file. Please refer below:

 

https://github.com/Xilinx/SDSoC_Examples/tree/master/cpp/getting_started

 

For 2017.2 release related, you can go to respective branch of GitHub:

https://github.com/Xilinx/SDSoC_Examples/tree/2017.2/cpp/getting_started

 

For example:

https://github.com/Xilinx/SDSoC_Examples/tree/2017.2/cpp/getting_started/array_partition/src

 

You will find that hw function is implemented inside matmult.cpp file which is outside of main.cpp.

 

-Heera

 

 

0 Kudos
Explorer
Explorer
473 Views
Registered: ‎05-21-2017

Re: How to use a separate cpp file to describe functions used by the HW function?

 

Hi @heeran

 

Thank you for your answer.

 

Maybe I was not very clear but what I want to achieve is describe the hw function using multiple cpp files. In the example you provided, what I ask is how could I implement the "void matmul_partition_accel()" function using multiple cpp files.

 

My hw function uses many sub-functions and in order to achieve better productivity, multiple cpp files would help a lot. In HLS this can be done, but how can I achieve this in SDSoC?

 

 

Cheers,

Panos

Without proper software tools the hardware is unusable no matter how good and well designed it is.
0 Kudos