04-18-2019 07:12 AM
My goal is to build xfOpenCV as a C++ library, such that I can call xfOpenCV functions within my C++ program on my PYNQ-Z1, that runs Ubuntu 18.04, as the official PYNQ v2.4 SD card image provides.
The concept should be similar to building an overlay that can be used within Python, except my goal is for C++.
So far from the user manuals (xfOpenCV, SDSoC) I have read about, seems like my closest viable solution is to compile & build my entire C++ program in SDSoC environment, if I am not mistaken.
I do realize that the PYNQ framework is supposed for running Python + overlay to support hardware acceleration.
Therefore, I really wonder if my goal is doable at all?
Thank you so much for any advice in advance!
05-09-2019 02:57 AM
I was looking at this project too, but it seems like it only provides xfOpenCV usage at Python level as overlays.
For my project I would need to use C++, so I am looking for a way to use xfOpenCV in C++ on PYNQ-Z1 board. SDSoC seems to be the right path to go, only if I could build to target PYNQ-Z1 board... and I have already tried building the .dsa file for the PYNQ-Z1 board by running the tcl scripts under this repo:
For my next step, I am trying to create the SDSoC platform for PYNQ-Z1 in 2018.3
I personally found SDSoC workflow to be quite elegant to use, just write the code in C++, perform hardware acceleration for selected functions, then just build everything and copy everything to SD card, except when it comes to non-default supported platforms, then it becomes quite frastruating to make things compatible, especially for newbie like me...
06-03-2019 09:20 AM
06-04-2019 12:01 AM
Hi @khareashish_trimble, thanks for reply the thread!
I think I have successfully built the custom platform, and built some basic samples with SDSoC for Zynq-Z1, which all run totally fine. In order to build the custom platform, one would need to build the HW and SW components from the following repos:
https://github.com/Xilinx/PYNQ/tree/master/sdbuild (For building the SW files & sysroot)
https://github.com/yunqu/PYNQ-derivative-overlays (For building the HW files, bare one worked)
Building sysroot is recommended as it would cross compile all the dependency libraries which may be required during SDSoC project compilation, therefore instead of the already built platforms files, I would rather be sharing how to build everything manually if anyone is interested.
I have also just compiled a couple xfOpenCV sample projects, but I am getting "Bus Error" when running. It only occurs when I have HW accelerated functions toggled, without any HW accelerations it was running fine. I suppose it was becuase I did not copy everything (boot.bin seems to contain the bitstream, I only tried running the .elf)
By the way, does anyone know how to running the Linux TCF agent? It seems like it does not come with the PYNQ image, or maybe I just could not find it yet, but how could I check if there is an existing one, or install it in linux on the board?
I will give more updates on my progress :)
06-21-2019 02:51 AM