Xilinx / xfopencv

Other
329 stars 142 forks source link

xf_delayMat #25

Closed soallak closed 5 years ago

soallak commented 6 years ago

xf::delayMat fails to synthesize/compile with sds++. The reported error is a use a private constructor of hls::stream

bgouthamb commented 6 years ago

@soallak Can you please let us know the SDx version and the OS you were using?

soallak commented 6 years ago

The SDx version is 2018.2 and the OS is Ubuntu 16.04. The problem, as far as I understood, is caused by the pragma hls stream for variable src. Compiling using gcc for example with ignore unknown pragmas flag works

bgouthamb commented 6 years ago

Couldn't replicate the issue. It would be useful if you provide more info on how the function is being called in your code and the full error message. Did you modify something in the _xfdelay.hpp file? Can you check whether you have added all the required includes?

soallak commented 6 years ago

@bgouthamb Sorry for the delay I was quite busy the last two days. To answer your questions. No, I did not modify xf_delay.hpp and I have added the necessary includes files. Otherwise, I would have gotten other errors.

Here is an example snapshot of how I want to call delayMat: `#pragma SDS resource(0)

pragma SDS async(0)

xf::boxFilter<FILTER_BORDER, FILTER_SIZE>(l, fl); 

pragma SDS resource(1)

pragma SDS async(1)

xf::boxFilter<FILTER_BORDER, FILTER_SIZE>(r, fr); 

pragma SDS wait(0)

pragma SDS wait(1)

pragma SDS resource(0)

pragma SDS async(2)

xf::delayMat<XF_WIDTH>(fl, rl); 

pragma SDS resource(1)

pragma SDS async(3)

xf::delayMat<XF_WIDTH>(fr, rr); 

`

Here is the exact error I get: /home/soallak/Dev/sdsoc_ws/src/xxx_xfopencv/include/xxx_xfopencv/imgproc/xf_delay.hpp:43:19: error: calling a private constructor of class 'hls::stream<ap_uint<8> >' _ssdm_SpecStream( src, 0, MAXDELAY, ""); ^ /home/soallak/Dev/sdsoc_ws/src/xxx_sdsoc_function/_sds/vhls/w2_xf_delayMat.cpp:41:9: note: in instantiation of function template specialization 'xf::delayMat<1920, 0, 1080, 1920, 1>' requested here return xf::delayMat<1920,0,1080,1920,1>(_src, _dst); ^ /home/soallak/.local/opt/xilinx/Vivado/2018.2/common/technology/autopilot/hls_stream.h:91:43: note: declared private here inline __attribute__((always_inline)) stream(const stream< __STREAM_T__ >& chn):V(chn.V)

I would rule out that there is something wrong with my invokation of sds++ because:

  1. The code compiles perfectly (sds++) when removing the delayMat invokation
  2. The code compiles perfectly when using g++
bgouthamb commented 6 years ago

@soallak I tried the exact flow of function calls as you specified, but still do not see any issue. It just synthesizes fine. It would be really helpful for us if you can provide your example file, which if built, throws the said error.
It could also serve us a corner case if the issue is found to be genuine.

bgouthamb commented 5 years ago

Unable to replicate the issue. Please reopen if needed by attaching appropriate files through which the error can be reproducible.