Closed swordwest closed 6 years ago
@swordwest,
Please make sure to pass the flag "-hls-target 1" for the build. Example here.
I use SDx 2018.2 in the windows10 system? I set the flag where ?
In SDx GUI, right click on your project and select C/C++ Build Settings. In the opened page, under SDS++ Compiler, select Inferred Options->Software Platform. Specify "-hls-target 1" in the Software Platform Inferred Flags tab.
Thank you. I solved the problem, but a new one has emerged. C:\xf\Fast\Release_sds.llvm>opt -disable-output -mem2reg -basicaa -XidanePass --platform zcu104_rv_ss --dmclkid 2 --repo C:/xf/Fast/Release/_sds/.cdb/xd_ip_db.xml --dmdb C:/Xilinx/SDx/2018.2/data/DM.db -os linux -processor cortex-a53 -partition 0 0<sds_all.o INFO: [DMAnalysis 83-4494] Analyzing hardware accelerators... ERROR: [DMAnalysis 83-4432] An unsupported inferred interface type (ap_memory) was detected for the port p_src_data_V_q0 (name maybe encoded) of accelerator fast_accel. Near C:/xf/Fast/src/xf_fast_accel.cpp:32 [SUGGESTION]: Please check the argument declaration. For array, we recommend linearized array type or pointer type enhanced with pragmas as needed. Please refer to documentation on Pragma SDS data. Data motion generation exited with return code 1
Can you post the content of the file : Release/_sds/vhls/w0_xf_fast.tcl ?
I don't have this file! Only have fast_accel.tcl file。 The content is
_set_directive_latency -min 1 fast_accel
fast_accel_run.tcl file,The content is
open_project fast_accel set_top fast_accel add_files C:/xf/Fast/src/xf_fast_accel.cpp -cflags "-ID:/download/fpga/zcu104-rv-ss-2018-2/petalinux/sdk/sysroots/aarch64-xilinx-linux/usr/include -ID:/download/fpga/zcu104-rv-ss-2018-2/petalinux/sdk/sysroots/aarch64-xilinx-linux/usr/include/features -ID:/download/fpga/zcu104-rv-ss-2018-2/petalinux/sdk/sysroots/aarch64-xilinx-linux/usr/include/glib-2.0 -ID:/download/fpga/zcu104-rv-ss-2018-2/petalinux/sdk/sysroots/aarch64-xilinx-linux/usr/lib/glib-2.0/include -IC:/Xilinx/SDK/2018.2/gnu/aarch64/nt/aarch64-linux/aarch64-linux-gnu/include -IC:/xf/Fast/src -ID:/download/fpga/zcu104-rv-ss-2018-2/zcu104_rv_ss/sw/a53_linux/a53_linux/inc/xfopencv -ID:/download/fpga/zcu104-rv-ss-2018-2/petalinux/sdk/sysroots/aarch64-xilinx-linux/usr/include/c++/7.2.0 -ID:/download/fpga/zcu104-rv-ss-2018-2/petalinux/sdk/sysroots/aarch64-xilinx-linux/usr/include/c++/7.2.0/aarch64-xilinx-linux -ID:/download/fpga/zcu104-rv-ss-2018-2/petalinux/sdk/sysroots/aarch64-xilinx-linux/usr/include/c++/7.2.0/backward -IC:/Xilinx/SDK/2018.2/gnu/aarch64/nt/aarch64-linux/aarch64-linux-gnu/include/c++/7.2.1 -IC:/Xilinx/SDK/2018.2/gnu/aarch64/nt/aarch64-linux/aarch64-linux-gnu/include/c++/7.2.1/aarch64-linux-gnu -IC:/Xilinx/SDK/2018.2/gnu/aarch64/nt/aarch64-linux/aarch64-linux-gnu/include/c++/7.2.1/backward -IC:/Xilinx/SDK/2018.2/gnu/aarch64/nt/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.2.1/include -IC:/Xilinx/SDK/2018.2/gnu/aarch64/nt/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.2.1/include-fixed -ID:/download/fpga/zcu104-rv-ss-2018-2/petalinux/sdk/sysroots/aarch64-xilinx-linux/usr/include/c++/6.2.1 -ID:/download/fpga/zcu104-rv-ss-2018-2/petalinux/sdk/sysroots/aarch64-xilinx-linux/usr/include/c++/6.2.1/aarch64-xilinx-linux -ID:/download/fpga/zcu104-rv-ss-2018-2/petalinux/sdk/sysroots/aarch64-xilinx-linux/usr/include/c++/6.2.1/backward -ID:/download/fpga/zcu104-rv-ss-2018-2/petalinux/sdk/sysroots/aarch64-xilinx-linux/usr/include -ID:/download/fpga/zcu104-rv-ss-2018-2/petalinux/sdk/sysroots/aarch64-xilinx-linux/usr/include/glib-2.0 -ID:/download/fpga/zcu104-rv-ss-2018-2/petalinux/sdk/sysroots/aarch64-xilinx-linux/usr/lib/glib-2.0/include -IC:/Xilinx/SDK/2018.2/gnu/aarch64/nt/aarch64-linux/aarch64-linux-gnu/include/c++/6.2.1 -IC:/Xilinx/SDK/2018.2/gnu/aarch64/nt/aarch64-linux/aarch64-linux-gnu/include/c++/6.2.1/aarch64-linux-gnu -IC:/Xilinx/SDK/2018.2/gnu/aarch64/nt/aarch64-linux/aarch64-linux-gnu/include/c++/6.2.1/backward -IC:/Xilinx/SDK/2018.2/gnu/aarch64/nt/aarch64-linux/lib/gcc/aarch64-linux-gnu/6.2.1/include -IC:/Xilinx/SDK/2018.2/gnu/aarch64/nt/aarch64-linux/lib/gcc/aarch64-linux-gnu/6.2.1/include-fixed -IC:/Xilinx/SDK/2018.2/gnu/aarch64/nt/aarch64-linux/aarch64-linux-gnu/include -DHLS_NO_XIL_FPO_LIB -DPLATFORM_ZCU104 -Wall -O3 -fmessage-length=0 -Wno-overloaded-virtual -Wno-unused-label -Wno-strict-overflow -Wno-uninitialized -Wno-unused-function -Wno-unused-variable -Wno-unknown-attributes -Wno-unused-local-typedefs -Wno-sign-compare -Wno-overloaded-virtual -Wno-unused-label -Wno-strict-overflow -Wno-uninitialized -Wno-unused-function -Wno-unused-variable -Wno-unknown-attributes -Wno-unused-local-typedefs -Wno-sign-compare -mstrict-align -D SDSCC -m64 -target aarch64-linux-gnu -I D:/download/fpga/zcu104-rv-ss-2018-2/zcu104_rv_ss/sw/a53_linux/a53_linux/inc/xfopencv -D HLS_NO_XIL_FPO_LIB -I C:/Xilinx/SDx/2018.2/target/aarch64-linux/include -IC:/Xilinx/SDK/2018.2/gnu/aarch64/nt/aarch64-linux/aarch64-linux-gnu/include/c++/7.2.1 -IC:/Xilinx/SDK/2018.2/gnu/aarch64/nt/aarch64-linux/aarch64-linux-gnu/include/c++/7.2.1/aarch64-linux-gnu -IC:/Xilinx/SDK/2018.2/gnu/aarch64/nt/aarch64-linux/aarch64-linux-gnu/include/c++/7.2.1/backward -IC:/Xilinx/SDK/2018.2/gnu/aarch64/nt/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.2.1/include -IC:/Xilinx/SDK/2018.2/gnu/aarch64/nt/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.2.1/include-fixed -IC:/Xilinx/SDK/2018.2/gnu/aarch64/nt/aarch64-linux/aarch64-linux-gnu/include -IC:/Xilinx/SDK/2018.2/gnu/aarch64/nt/aarch64-linux/aarch64-linux-gnu/libc/usr/include -IC:/xf/Fast/src -D SDSVHLS -D __SDSVHLS_SYNTHESIS__ -I C:/xf/Fast/Release -w" open_solution "solution" -reset set_part { xczu7ev-ffvc1156-2-e }
create_clock -period 3.333333 set_clock_uncertainty 27.0% config_interface -m_axi_addr64 config_rtl -reset_level low source C:/xf/Fast/Release/_sds/vhls/fast_accel.tcl
configrtl -prefix a0 csynth_design export_design -ipname fast_accel -acc exit
What is the function that you have marked for acceleration?
fast_accel
void fast_accel(xf::Mat<XF_8UC1, HEIGHT, WIDTH, NPC1> &_src,xf::Mat<XF_8UC1, HEIGHT, WIDTH, NPC1> &_dst,uchar_t threshold) {
xf::fast<NMS,XF_8UC1,HEIGHT,WIDTH,NPC1>(_src,_dst,threshold);
}
No! xf::fast<...> is the function to accelerate. "fast_accel" is just a wrapper function. See this line in the Makefile for reference.
Now I found another error This command cannot be run, as the BD-design is locked. Locked reason(s) thanks.
OK Now,I Set wrong lic!
Please close the issue if resolved.
I am facing a very similar issue to the one found by @swordwest when he tried to accelerate the wrapper function as noted above, so I hesitate to create a new issue. I am following the "Using the xfOpenCV Library on a non-reVISION Platform" document, and I am stuck at step 30, where I choose the function to accelerate in hardware. The tutorial specifically depicts toggling the "accumulate" function, however there is no such function listed in SDx for which I can toggle HW/SW, as is visible from the screenshot here:
The only function listed is the wrapper function: "accumulateaccel", and after toggling said function I receive the error: "An unsupported inferred interface type (apmemory) was detected"
I'm using SDx 2018.2, and Ubuntu 16.04.
I am thoroughly confused.
@fmascarich The figure in step 30 of the document shows the expanded view of the "Includes" directory in Project Explorer pane. From your screenshot, it seems you are looking for the hardware function in the "src" directory.
The hardware function for accumulate can be found in Includes->xfopencv-include-directory->imgproc->xf_accumulate_image.hpp->xf-namespace->accumulate
@bgouthamb Thanks for the quick reply! I'm losing my mind trying to get any of the examples to run.
Thanks to your comment, I explored some of the other directories in the project explorer, and found it located in libs, instead of Includes. I don't know what would cause this to be different.
ERROR: [SdsCompiler 83-5031] Problem detected in Vivado HLS run - unable to find solution implementation directory for fast_accel C:/xf/Fast/Release/_sds/vhls/fast_accel/solution/impl/ip. For possible causes, review C:/xf/Fast/Release/_sds/vhls/fast_accel/solution/solution.log or C:/xf/Fast/Release/_sds/vhls/fast_accel_vivado_hls.log. C:/xf/Fast/Release/_sds/vhls/fast_accel_vivado_hls.log (last 20 lines): D:/download/fpga/zcu104-rv-ss-2018-2/petalinux/sdk/sysroots/aarch64-xilinx-linux/usr/include\bits/wordsize.h:36:2: error: "__WORDSIZE is not defined"
error "__WORDSIZE is not defined"
^