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!

取消
显示结果 
搜索替代 
您的意思是: 
Observer zhengjia
Observer
251 次查看
注册日期: ‎07-24-2018

sdsoc 添加hls头文件是报错

转到解答

参考https://forums.xilinx.com/t5/SDSoC-Environment-and-reVISION/hls-CvtColor-amp-xf-Threshold/m-p/899203#M2985 这篇文章写的sdsoc + hls::stream

接口函数的程序,已经设置了正确的SYSROOT路径,编译时会出现如下的错误,但是编译xf opencv的例子是正确的,

错误如下:请问如何解决,版本是sdx2018.2 revision平台

15:13:30 **** Incremental Build of configuration Release for project hars ****
make pre-build main-build
sdsoc_make_clean Release

Building file: ../src/top.cpp
Invoking: SDS++ Compiler
sds++ -DHLS_NO_XIL_FPO_LIB -Wall -O3 -I"../src" -I/home/zhengjia/SDSoc/platform/zcu102_rv_1802/zcu102_rv_ss/sw/a53_linux/a53_linux/inc/xfopencv -c -fmessage-length=0 -MT"src/top.o" -I/home/zhengjia/SDSoc/platform/zcu102_rv_1802/sysroot//usr/include/c++/6.2.1 -I/home/zhengjia/SDSoc/platform/zcu102_rv_1802/sysroot//usr/include/c++/6.2.1/aarch64-xilinx-linux -I/home/zhengjia/SDSoc/platform/zcu102_rv_1802/sysroot//usr/include/c++/6.2.1/backward -I/home/zhengjia/SDSoc/platform/zcu102_rv_1802/sysroot//usr/include -I/home/zhengjia/SDSoc/platform/zcu102_rv_1802/sysroot//usr/include/glib-2.0 -I/home/zhengjia/SDSoc/platform/zcu102_rv_1802/sysroot//usr/lib/glib-2.0/include -I/home/tools/SDx2018.2/SDK/2018.2/gnu/aarch64/nt/aarch64-linux/aarch64-linux-gnu/include/c++/6.2.1 -I/home/tools/SDx2018.2/SDK/2018.2/gnu/aarch64/nt/aarch64-linux/aarch64-linux-gnu/include/c++/6.2.1/aarch64-linux-gnu -I/home/tools/SDx2018.2/SDK/2018.2/gnu/aarch64/nt/aarch64-linux/aarch64-linux-gnu/include/c++/6.2.1/backward -I/home/tools/SDx2018.2/SDK/2018.2/gnu/aarch64/nt/aarch64-linux/lib/gcc/aarch64-linux-gnu/6.2.1/include -I/home/tools/SDx2018.2/SDK/2018.2/gnu/aarch64/nt/aarch64-linux/lib/gcc/aarch64-linux-gnu/6.2.1/include-fixed -I/home/tools/SDx2018.2/SDK/2018.2/gnu/aarch64/nt/aarch64-linux/aarch64-linux-gnu/include -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 -hls-target 1 -MMD -MP -MF"src/top.d" -MT"src/top.o" -o "src/top.o" "../src/top.cpp" -sds-hw integralimagehls top.cpp -clkid 2 -sds-end -sds-sys-config a53_linux -sds-proc a53_linux -sds-pf "/home/zhengjia/SDSoc/platform/zcu102_rv_1802/zcu102_rv_ss"
Processing -sds-hw block for integralimagehls
Create data motion intermediate representation
/home/tools/SDx2018.2/Vivado/2018.2/include/ap_int_special.h:99:1: warning: 'complex' defined as a struct template here but previously declared as a class template [-Wmismatched-tags]
struct complex<ap_int<_AP_W> > {
^
/home/tools/SDx2018.2/Vivado/2018.2/include/ap_int_special.h:71:24: note: did you mean struct here?
template<typename _Tp> class complex;
^~~~~
struct
/home/tools/SDx2018.2/Vivado/2018.2/include/ap_fixed_special.h:99:1: warning: 'complex' defined as a struct template here but previously declared as a class template [-Wmismatched-tags]
struct complex<ap_fixed<_AP_W, _AP_I, _AP_Q, _AP_O, _AP_N> > {
^
/home/tools/SDx2018.2/Vivado/2018.2/include/ap_fixed_special.h:71:24: note: did you mean struct here?
template<typename _Tp> class complex;
^~~~~
struct
/home/tools/SDx2018.2/Vivado/2018.2/include/ap_int_special.h:71:24: note: did you mean struct here?
template<typename _Tp> class complex;
^~~~~
struct
/home/tools/SDx2018.2/SDK/2018.2/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.2.1/include/arm_neon.h:30:13: warning: unknown pragma ignored [-Wunknown-pragmas]
#pragma GCC push_options
^
/home/tools/SDx2018.2/SDK/2018.2/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.2.1/include/arm_neon.h:31:13: warning: unknown pragma ignored [-Wunknown-pragmas]
#pragma GCC target ("+nothing+simd")
^
/home/tools/SDx2018.2/SDK/2018.2/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.2.1/include/arm_neon.h:38:9: error: unknown type name '__Int8x8_t'
typedef __Int8x8_t int8x8_t;
^
/home/tools/SDx2018.2/SDK/2018.2/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.2.1/include/arm_neon.h:39:9: error: unknown type name '__Int16x4_t'
typedef __Int16x4_t int16x4_t;
^
/home/tools/SDx2018.2/SDK/2018.2/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.2.1/include/arm_neon.h:40:9: error: unknown type name '__Int32x2_t'; did you mean '__int32_t'?
typedef __Int32x2_t int32x2_t;
^~~~~~~~~~~
__int32_t
/home/zhengjia/SDSoc/platform/zcu102_rv_1802/sysroot//usr/include/bits/types.h:40:20: note: '__int32_t' declared here
typedef signed int __int32_t;
^
/home/tools/SDx2018.2/SDK/2018.2/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.2.1/include/arm_neon.h:41:9: error: unknown type name '__Int64x1_t'; did you mean '__int64_t'?
typedef __Int64x1_t int64x1_t;
^~~~~~~~~~~
__int64_t
/home/zhengjia/SDSoc/platform/zcu102_rv_1802/sysroot//usr/include/bits/types.h:43:25: note: '__int64_t' declared here
typedef signed long int __int64_t;
^
/home/tools/SDx2018.2/SDK/2018.2/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.2.1/include/arm_neon.h:42:9: error: unknown type name '__Float16x4_t'
typedef __Float16x4_t float16x4_t;
^
/home/tools/SDx2018.2/SDK/2018.2/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.2.1/include/arm_neon.h:43:9: error: unknown type name '__Float32x2_t'
typedef __Float32x2_t float32x2_t;
^
/home/tools/SDx2018.2/SDK/2018.2/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.2.1/include/arm_neon.h:44:9: error: unknown type name '__Poly8x8_t'
typedef __Poly8x8_t poly8x8_t;
^
/home/tools/SDx2018.2/SDK/2018.2/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.2.1/include/arm_neon.h:45:9: error: unknown type name '__Poly16x4_t'
typedef __Poly16x4_t poly16x4_t;
^
/home/tools/SDx2018.2/SDK/2018.2/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.2.1/include/arm_neon.h:46:9: error: unknown type name '__Uint8x8_t'
typedef __Uint8x8_t uint8x8_t;
^
/home/tools/SDx2018.2/SDK/2018.2/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.2.1/include/arm_neon.h:47:9: error: unknown type name '__Uint16x4_t'
typedef __Uint16x4_t uint16x4_t;
^
/home/tools/SDx2018.2/SDK/2018.2/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.2.1/include/arm_neon.h:48:9: error: unknown type name '__Uint32x2_t'
typedef __Uint32x2_t uint32x2_t;
^
/home/tools/SDx2018.2/SDK/2018.2/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.2.1/include/arm_neon.h:49:9: error: unknown type name '__Float64x1_t'
typedef __Float64x1_t float64x1_t;
^
/home/tools/SDx2018.2/SDK/2018.2/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.2.1/include/arm_neon.h:50:9: error: unknown type name '__Uint64x1_t'
typedef __Uint64x1_t uint64x1_t;
^
/home/tools/SDx2018.2/SDK/2018.2/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.2.1/include/arm_neon.h:51:9: error: unknown type name '__Int8x16_t'; did you mean '__int16_t'?
typedef __Int8x16_t int8x16_t;
^~~~~~~~~~~
__int16_t
/home/zhengjia/SDSoc/platform/zcu102_rv_1802/sysroot//usr/include/bits/types.h:38:26: note: '__int16_t' declared here
typedef signed short int __int16_t;
^
/home/tools/SDx2018.2/SDK/2018.2/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.2.1/include/arm_neon.h:52:9: error: unknown type name '__Int16x8_t'
typedef __Int16x8_t int16x8_t;
^
/home/tools/SDx2018.2/SDK/2018.2/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.2.1/include/arm_neon.h:53:9: error: unknown type name '__Int32x4_t'; did you mean '__int32_t'?
typedef __Int32x4_t int32x4_t;
^~~~~~~~~~~
__int32_t
/home/zhengjia/SDSoc/platform/zcu102_rv_1802/sysroot//usr/include/bits/types.h:40:20: note: '__int32_t' declared here
typedef signed int __int32_t;
^
/home/tools/SDx2018.2/SDK/2018.2/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.2.1/include/arm_neon.h:54:9: error: unknown type name '__Int64x2_t'; did you mean '__int64_t'?
typedef __Int64x2_t int64x2_t;
^~~~~~~~~~~
__int64_t
/home/zhengjia/SDSoc/platform/zcu102_rv_1802/sysroot//usr/include/bits/types.h:43:25: note: '__int64_t' declared here
typedef signed long int __int64_t;
^
/home/tools/SDx2018.2/SDK/2018.2/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.2.1/include/arm_neon.h:55:9: error: unknown type name '__Float16x8_t'
typedef __Float16x8_t float16x8_t;
^
/home/tools/SDx2018.2/SDK/2018.2/gnu/aarch64/lin/aarch64-linux/lib/gcc/aarch64-linux-gnu/7.2.1/include/arm_neon.h:56:9: error: unknown type name '__Float32x4_t'
typedef __Float32x4_t float32x4_t;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
ERROR: [SdsCompiler 83-5005] clang exited with non-zero code processing /home/zhengjia/SDSoc/sdsoc182/sdx_gui/hars/hars/src/top.cpp
sds++ log file saved as /home/zhengjia/SDSoc/sdsoc182/sdx_gui/hars/hars/Release/_sds/reports/sds_top.log
ERROR: [SdsCompiler 83-5004] Build failed

make: *** [src/top.o] Error 1

15:13:37 Build Finished (took 7s.349ms)

 

补充下,我已经加了下面语句了
#if __SDSCC__
#undef __ARM_NEON__
#undef __ARM_NEON
#include "opencv2/opencv.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
#define __ARM_NEON__
#define __ARM_NEON
#else
#include "opencv2/opencv.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
#endif

进一步测试发现只要添加如下两个头文件就会报错,难道是sdsoc不支持这两个头文件还是说应该特殊处理下

#include "hls_video.h"
#include "hls_opencv.h"

 

0 项奖励
1 个已接受解答

已接受的解答
Moderator
Moderator
216 次查看
注册日期: ‎05-27-2018

回复: sdsoc 添加hls头文件是报错

转到解答

Hi @zhengjia

     1、参考一下这个链接#include "hls_video.h" #include "hls_opencv.h" 这两个头文件,只支持仿真,不支持综合,所以综合会报错。关于如何综合实现参考一下 XAPP1167。

     2、关于你的log上显示的内容,HLS 不支持 #pragma GCC 这个指令所以有报错,以及看到一些data  type 的报错,参考UG902里面对于Vivado HLS

支持的任意精度数据类型的表述。或者   #include <ap_int.h> 查看一下头文件。

     另,如果还有其他问题方便把源文件以附件形式帖一下吗?

 

谢谢,

Wen

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
如果提供的信息能解决您的问题,请标记为“接受为解决方案”。
如果您认为帖子有帮助,请点击“奖励”。谢谢!
-------------------------------------------------------------------------------------------------
0 项奖励
4 条回复
Moderator
Moderator
217 次查看
注册日期: ‎05-27-2018

回复: sdsoc 添加hls头文件是报错

转到解答

Hi @zhengjia

     1、参考一下这个链接#include "hls_video.h" #include "hls_opencv.h" 这两个头文件,只支持仿真,不支持综合,所以综合会报错。关于如何综合实现参考一下 XAPP1167。

     2、关于你的log上显示的内容,HLS 不支持 #pragma GCC 这个指令所以有报错,以及看到一些data  type 的报错,参考UG902里面对于Vivado HLS

支持的任意精度数据类型的表述。或者   #include <ap_int.h> 查看一下头文件。

     另,如果还有其他问题方便把源文件以附件形式帖一下吗?

 

谢谢,

Wen

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
如果提供的信息能解决您的问题,请标记为“接受为解决方案”。
如果您认为帖子有帮助,请点击“奖励”。谢谢!
-------------------------------------------------------------------------------------------------
0 项奖励
Observer zhengjia
Observer
211 次查看
注册日期: ‎07-24-2018

回复: sdsoc 添加hls头文件是报错

转到解答
好的,谢谢,明白了
如果我想用resize api,由于xf::resize只支持单通道,而hl::resize不被支持综合,如果想处理rgb 的resize功能,需要硬件加速,只能手写了吗?有没有其它替代方法
0 项奖励
Moderator
Moderator
196 次查看
注册日期: ‎05-27-2018

回复: sdsoc 添加hls头文件是报错

转到解答

Hi @zhengjia

    尝试将RGB的通道分开分别进行resize呢?

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
如果提供的信息能解决您的问题,请标记为“接受为解决方案”。
如果您认为帖子有帮助,请点击“奖励”。谢谢!
-------------------------------------------------------------------------------------------------
0 项奖励
Observer zhengjia
Observer
121 次查看
注册日期: ‎07-24-2018

回复: sdsoc 添加hls头文件是报错

转到解答
那样就慢了
0 项奖励