07-18-2018 04:54 AM - edited 07-18-2018 05:44 AM
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 ?
07-19-2018 03:50 AM - edited 07-19-2018 03:50 AM
There are bunch of SDSoC Git Examples which are defining hw function into separate file. Please refer below:
For 2017.2 release related, you can go to respective branch of GitHub:
You will find that hw function is implemented inside matmult.cpp file which is outside of main.cpp.
07-19-2018 04:05 AM
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?