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!

取消
显示结果 
搜索替代 
您的意思是: 
Adventurer
Adventurer
265 次查看
注册日期: ‎06-05-2018

使用xfopencv、使用ap_uint<1>同时随机访问

#pragma SDS data access_pattern("_src.data":SEQUENTIAL, "_threshdst.data":SEQUENTIAL)
#pragma SDS data copy("_src.data"[0:"_src.size"], "_threshdst.data"[0:"_threshdst.size"])
#pragma SDS data mem_attribute("_src.data":NON_CACHEABLE|PHYSICAL_CONTIGUOUS)
#pragma SDS data mem_attribute("_threshdst.data":NON_CACHEABLE|PHYSICAL_CONTIGUOUS)
#pragma SDS data zero_copy("_bit8binary.data"[0:"_bit8binary.size"])
void threshold_accel(xf::Mat<XF_16UC1, HEIGHT, WIDTH, NPIX> &_src,xf::Mat<XF_8UC1, HEIGHT, WIDTH, NPIX> &_bit8binary,xf::Mat<XF_8UC1, HEIGHT, WIDTH, NPIX> &_threshdst,ap_uint<16> thresh_upper,ap_uint<16> thresh_lower)
{
#pragma HLS DATAFLOW
	xf::convertTo<XF_16UC1, XF_8UC1, HEIGHT, WIDTH, NPIX>(_src,_bit8binary,XF_CONVERT_16U_TO_8U,8);
	xf::Threshold<XF_THRESHOLD_TYPE_RANGE,XF_8UC1,HEIGHT, WIDTH,NPIX>(_bit8binary, _threshdst,0,thresh_upper,thresh_lower);
}

我把threshold_accel函数已经添加为Hardware function之一了,但编译时有警告产生:

Generating data motion network
INFO: [DMAnalysis 83-4494] Analyzing hardware accelerators...
WARNING: [DMAnalysis 83-4502] Function xf::convertTo<1,0,192,448,1> @ /home/jumper/FPGA_projects/sdsoc_study/threshnew/libs/xfopencv/include/imgproc/xf_convert_bitdepth.hpp is not a HW accelerator but has SDS pragma applied
WARNING: [DMAnalysis 83-4502] Function xf::Threshold<1,0,192,448,1> @ /home/jumper/FPGA_projects/sdsoc_study/threshnew/libs/xfopencv/include/imgproc/xf_threshold.hpp is not a HW accelerator but has SDS pragma applied
INFO: [DMAnalysis 83-4497] Analyzing callers to hardware accelerators...

我不知道这个警告产生的原因?

 

我另有一个hardware function:

#pragma SDS data copy(stonesimg[0:HEIGHT*WIDTH],valve_column_[0:64],valvearray[0:HEIGHT*64])
#pragma SDS data access_pattern(stonesimg:RANDOM,valve_column_:RANDOM,valvearray:RANDOM)
#pragma SDS data data_mover(stonesimg:AXIDMA_SIMPLE,valve_column_:AXIDMA_SIMPLE,valvearray:AXIDMA_SIMPLE)
void convertvalve(ap_uint<1> stonesimg[HEIGHT*WIDTH],ap_uint<10> valve_column_[64],ap_uint<1> valvearray[HEIGHT*64]);

我想随机访问ap_uint<1>数组,但报错:

Creating block diagram (BD)
Creating top.bd.tcl
ERROR: [CF2XD 83-22322] BRAM data width (1-bits) for port 'stonesimg_V_PORTA' must be a multiple of 8.  
ERROR: [CF2XD 83-22322] You can use a Vivado HLS interface pragma to map to an AXI4 stream interface.
ERROR: [CF2XD 83-2239] failed to create xd_adapter for accelerator comp convertvalve_1
ERROR: [CF2XD 83-2009] An error has occurred during generation of the system block diagram.  For more information, please look for additional ERROR messages in the console and in log files.
Error generating intermediate design file top.xml
Error creating IPI .bd design file, exiting

报错说因为数组为BRAM,要求位宽必须是8的倍数,而我使用的ap_uint<1>不符合。网上说改用流SEQUENTIAL就不会报错了,但改用流后没办法随机访问了啊??这种情况怎么办呢?

 

 

0 项奖励
1 条回复1
Visitor xr3118
Visitor
78 次查看
注册日期: ‎03-27-2017

回复: 使用xfopencv、使用ap_uint<1>同时随机访问

请问这个问题您解决了吗?我也遇到了同样的问题不知道解决方案是什么

0 项奖励