Xilinx / xfopencv

Other
329 stars 142 forks source link

xf::equalizeHist does not work with pragma dataflow #76

Open 3togo opened 4 years ago

3togo commented 4 years ago

It won't work even it is for a very simple program

include "top.h"

include "imgproc/xf_hist_equalize.hpp"

include "imgproc/xf_duplicateimage.hpp"

void equalizeHist(AXI_STREAM& src_axi, AXI_STREAM& dst_axi) {

pragma HLS INTERFACE axis port=src_axi

pragma HLS INTERFACE axis port=dst_axi

pragma HLS dataflow

XGRAY_SRC_IMAGE src(src_rows, src_cols); XGRAY_DST_IMAGE dst(dst_rows, dst_cols); XGRAY_DST_IMAGE dst1(dst_rows, dst_cols); XGRAY_DST_IMAGE dst2(dst_rows, dst_cols);

pragma HLS STREAM variable=src depth=64

pragma HLS STREAM variable=dst depth=64

pragma HLS STREAM variable=dst1 depth=64

pragma HLS STREAM variable=dst2 depth=64

xf::AXIvideo2xfMat(src_axi, src);
xf::duplicateMat<XF_8UC1, src_rows, src_cols, XF_NPPC1>(src, dst1, dst2);
xf::equalizeHist<XF_8UC1, dst_rows, dst_cols, XF_NPPC1>(dst1, dst2, dst);
xf::xfMat2AXIvideo(dst, dst_axi);

}