The IP source code is not functional with the current Vitis Vison library. (2020.1)
I tried to compile and I am getting the following errors:
~/Documents/resizePYNQ$ vivado_hls -f script.tcl
****** Vivado(TM) HLS - High-Level Synthesis from C, C++ and SystemC v2020.1 (64-bit)
**** SW Build 2902540 on Wed May 27 19:54:35 MDT 2020
**** IP Build 2902112 on Wed May 27 22:43:36 MDT 2020
** Copyright 1986-2020 Xilinx, Inc. All Rights Reserved.
source /tools/Xilinx/Vivado/2020.1/scripts/vivado_hls/hls.tcl -notrace
INFO: [HLS 200-10] Running '/tools/Xilinx/Vivado/2020.1/bin/unwrapped/lnx64.o/vivado_hls'
INFO: [HLS 200-10] For user 'iti' on host 'iti-VirtualBox' (Linux_x86_64 version 5.4.0-42-generic) on Wed Oct 07 10:51:48 EDT 2020
INFO: [HLS 200-10] On os Ubuntu 18.04.5 LTS
INFO: [HLS 200-10] In directory '/home/iti/Documents/resizePYNQ'
Sourcing Tcl script 'script.tcl'
INFO: [HLS 200-10] Opening project '/home/iti/Documents/resizePYNQ/resize'.
INFO: [HLS 200-10] Adding design file '../Vitis_Libraries/vision/L2/examples/resize/xf_resize_config.h' to the project
INFO: [HLS 200-10] Adding design file '../Vitis_Libraries/vision/L2/tests/resize/resize_DOWN_BILINEAR_NO_RGB/xf_config_params.h' to the project
INFO: [HLS 200-10] Adding design file 'xf_axis_config.h' to the project
INFO: [HLS 200-10] Adding design file 'xf_resize_accel.cpp' to the project
INFO: [HLS 200-10] Adding test bench file 'xf_resize_tb.cpp' to the project
INFO: [HLS 200-10] Opening solution '/home/iti/Documents/resizePYNQ/resize/solution1'.
INFO: [SYN 201-201] Setting up clock 'default' with a period of 10ns.
INFO: [SYN 201-201] Setting up clock 'default' with an uncertainty of 2.7ns.
INFO: [HLS 200-10] Setting target device to 'xc7z020-clg484-2'
INFO: [SCHED 204-61] Option 'relax_ii_for_timing' is enabled, will increase II to preserve clock frequency constraints.
INFO: [HLS 200-10] Analyzing design file 'xf_resize_accel.cpp' ...
ERROR: [HLS 200-70] Compilation errors found: In file included from xf_resize_accel.cpp:1:
xf_resize_accel.cpp:42:11: error: type 'hls::stream<DATATYPE, 2>' does not provide a subscript operator
_src.data[i*src_cols+j] = src[i*src_cols+j].data;
~~~~~~~~~^~~~~~~~~~~~~
xf_resize_accel.cpp:62:38: error: type 'hls::stream<DATATYPE, 2>' does not provide a subscript operator
dst[i*dst_cols+j].data = _dst.data[i*dst_cols+j];
~~~~~~~~~^~~~~~~~~~~~~
In file included from xf_resize_accel.cpp:1:
In file included from xf_resize_accel.cpp:30:
In file included from ./xf_axis_config.h:36:
In file included from /tools/Xilinx/Vivado/2020.1/common/technology/autopilot/ap_int.h:367:
In file included from /tools/Xilinx/Vivado/2020.1/common/technology/autopilot/ap_fixed.h:55:
/tools/Xilinx/Vivado/2020.1/common/technology/autopilot/ap_fixed_base.h:838:13: warning: shift count is negative [-Wshift-count-negative]
ret.V <<= (_AP_I - _AP_W);
^ ~~~~~~~~~~~~~~~
/tools/Xilinx/Vivado/2020.1/common/technology/autopilot/ap_int_base.h:359:18: note: in instantiation of member function 'ap_fixed_base<53, 21, true, 5, 3, 0>::to_ap_int_base' requested here
Base::V = op.to_ap_int_base().V;
^
/tools/Xilinx/Vivado/2020.1/common/technology/autopilot/ap_int.h:249:9: note: in instantiation of function template specialization 'ap_int_base<17, false>::ap_int_base<53, 21, true, 5, 3, 0>' requested here
: Base((ap_fixed_base<_AP_W2, _AP_I2, true, _AP_Q2, _AP_O2, _AP_N2>)op) {}
^
../Vitis_Libraries/vision/L1/include/imgproc/xf_resize_nn_bilinear.hpp:233:22: note: in instantiation of function template specialization 'ap_uint<17>::ap_uint<53, 21, 5, 3, 0>' requested here
nextYScale = indexy_pre + scaley;
^
../Vitis_Libraries/vision/L1/include/imgproc/xf_resize_nn_bilinear.hpp:397:13: note: in instantiation of function template specialization 'computeInterpolation<1, 42, 20, 17, 48, 16, 48, 16, 1>' requested here
computeInterpolation<INTERPOLATION_TYPE, COMP_INDEX_WIDTH, COMP_INDEX_INT, INDEX_INT, SCALE_WIDTH,
^
../Vitis_Libraries/vision/L1/include/imgproc/xf_resize.hpp:63:9: note: in instantiation of function template specialization 'resizeNNBilinear<9, 2160, 3840, 1, 1080, 1920, 1, 2>' requested here
resizeNNBilinear<TYPE, SRC_ROWS, SRC_COLS, NPC, DST_ROWS, DST_COLS, INTERPOLATION_TYPE, MAX_DOWN_SCALE>(_src,
^
xf_resize_accel.cpp:87:2: note: in instantiation of function template specialization 'xf::cv::resize<1, 9, 2160, 3840, 1080, 1920, 1, 2>' requested here
xf::cv::resize<1, XF_8UC3, 2160, 3840, 1080, 1920, XF_NPPC1, 2>(src_mat, dst_mat);
^
In file included from xf_resize_accel.cpp:1:
In file included from xf_resize_accel.cpp:30:
In file included from ./xf_axis_config.h:36:
In file included from /tools/Xilinx/Vivado/2020.1/common/technology/autopilot/ap_int.h:367:
In file included from /tools/Xilinx/Vivado/2020.1/common/technology/autopilot/ap_fixed.h:55:
/tools/Xilinx/Vivado/2020.1/common/technology/autopilot/ap_fixed_base.h:838:13: warning: shift count is negative [-Wshift-count-negative]
ret.V <<= (_AP_I - _AP_W);
^ ~~~~~~~~~~~~~~~
/tools/Xilinx/Vivado/2020.1/common/technology/autopilot/ap_int_base.h:359:18: note: in instantiation of member function 'ap_fixed_base<42, 20, true, 5, 3, 0>::to_ap_int_base' requested here
Base::V = op.to_ap_int_base().V;
^
/tools/Xilinx/Vivado/2020.1/common/technology/autopilot/ap_int.h:249:9: note: in instantiation of function template specialization 'ap_int_base<17, false>::ap_int_base<42, 20, true, 5, 3, 0>' requested here
: Base((ap_fixed_base<_AP_W2, _AP_I2, true, _AP_Q2, _AP_O2, _AP_N2>)op) {}
^
../Vitis_Libraries/vision/L1/include/imgproc/xf_resize_nn_bilinear.hpp:234:18: note: in instantiation of function template specialization 'ap_uint<17>::ap_uint<42, 20, 5, 3, 0>' requested here
indexy = (ap_uint<INDEX_INT>)indexy_pre;
^
../Vitis_Libraries/vision/L1/include/imgproc/xf_resize_nn_bilinear.hpp:397:13: note: in instantiation of function template specialization 'computeInterpolation<1, 42, 20, 17, 48, 16, 48, 16, 1>' requested here
computeInterpolation<INTERPOLATION_TYPE, COMP_INDEX_WIDTH, COMP_INDEX_INT, INDEX_INT, SCALE_WIDTH,
^
../Vitis_Libraries/vision/L1/include/imgproc/xf_resize.hpp:63:9: note: in instantiation of function template specialization 'resizeNNBilinear<9, 2160, 3840, 1, 1080, 1920, 1, 2>' requested here
resizeNNBilinear<TYPE, SRC_ROWS, SRC_COLS, NPC, DST_ROWS, DST_COLS, INTERPOLATION_TYPE, MAX_DOWN_SCALE>(_src,
^
xf_resize_accel.cpp:87:2: note: in instantiation of function template specialization 'xf::cv::resize<1, 9, 2160, 3840, 1080, 1920, 1, 2>' requested here
xf::cv::resize<1, XF_8UC3, 2160, 3840, 1080, 1920, XF_NPPC1, 2>(src_mat, dst_mat);
^
In file included from xf_resize_accel.cpp:1:
In file included from xf_resize_accel.cpp:30:
In file included from ./xf_axis_config.h:36:
In file included from /tools/Xilinx/Vivado/2020.1/common/technology/autopilot/ap_int.h:367:
In file included from /tools/Xilinx/Vivado/2020.1/common/technology/autopilot/ap_fixed.h:55:
/tools/Xilinx/Vivado/2020.1/common/technology/autopilot/ap_fixed_base.h:838:13: warning: shift count is negative [-Wshift-count-negative]
ret.V <<= (_AP_I - _AP_W);
^ ~~~~~~~~~~~~~~~
/tools/Xilinx/Vivado/2020.1/common/technology/autopilot/ap_int_base.h:359:18: note: in instantiation of member function 'ap_fixed_base<43, 21, true, 5, 3, 0>::to_ap_int_base' requested here
Base::V = op.to_ap_int_base().V;
^
/tools/Xilinx/Vivado/2020.1/common/technology/autopilot/ap_int.h:249:9: note: in instantiation of function template specialization 'ap_int_base<17, false>::ap_int_base<43, 21, true, 5, 3, 0>' requested here
: Base((ap_fixed_base<_AP_W2, _AP_I2, true, _AP_Q2, _AP_O2, _AP_N2>)op) {}
^
../Vitis_Libraries/vision/L1/include/imgproc/xf_resize_nn_bilinear.hpp:237:22: note: in instantiation of function template specialization 'ap_uint<17>::ap_uint<43, 21, 5, 3, 0>' requested here
nextYScale = indexy_pre + (ap_fixed<COMP_INDEX_WIDTH, COMP_INDEX_INT>)scaley;
^
../Vitis_Libraries/vision/L1/include/imgproc/xf_resize_nn_bilinear.hpp:397:13: note: in instantiation of function template specialization 'computeInterpolation<1, 42, 20, 17, 48, 16, 48, 16, 1>' requested here
computeInterpolation<INTERPOLATION_TYPE, COMP_INDEX_WIDTH, COMP_INDEX_INT, INDEX_INT, SCALE_WIDTH,
^
../Vitis_Libraries/vision/L1/include/imgproc/xf_resize.hpp:63:9: note: in instantiation of function template specialization 'resizeNNBilinear<9, 2160, 3840, 1, 1080, 1920, 1, 2>' requested here
resizeNNBilinear<TYPE, SRC_ROWS, SRC_COLS, NPC, DST_ROWS, DST_COLS, INTERPOLATION_TYPE, MAX_DOWN_SCALE>(_src,
^
xf_resize_accel.cpp:87:2: note: in instantiation of function template specialization 'xf::cv::resize<1, 9, 2160, 3840, 1080, 1920, 1, 2>' requested here
xf::cv::resize<1, XF_8UC3, 2160, 3840, 1080, 1920, XF_NPPC1, 2>(src_mat, dst_mat);
^
In file included from xf_resize_accel.cpp:1:
In file included from xf_resize_accel.cpp:30:
In file included from ./xf_axis_config.h:36:
In file included from /tools/Xilinx/Vivado/2020.1/common/technology/autopilot/ap_int.h:367:
In file included from /tools/Xilinx/Vivado/2020.1/common/technology/autopilot/ap_fixed.h:55:
/tools/Xilinx/Vivado/2020.1/common/technology/autopilot/ap_fixed_base.h:838:13: warning: shift count is negative [-Wshift-count-negative]
ret.V <<= (_AP_I - _AP_W);
^ ~~~~~~~~~~~~~~~
/tools/Xilinx/Vivado/2020.1/common/technology/autopilot/ap_int_base.h:359:18: note: in instantiation of member function 'ap_fixed_base<32, 22, true, 5, 3, 0>::to_ap_int_base' requested here
Base::V = op.to_ap_int_base().V;
^
/tools/Xilinx/Vivado/2020.1/common/technology/autopilot/ap_int.h:249:9: note: in instantiation of function template specialization 'ap_int_base<8, false>::ap_int_base<32, 22, true, 5, 3, 0>' requested here
: Base((ap_fixed_base<_AP_W2, _AP_I2, true, _AP_Q2, _AP_O2, _AP_N2>)op) {}
^
../Vitis_Libraries/vision/L1/include/imgproc/xf_resize_nn_bilinear.hpp:57:17: note: in instantiation of function template specialization 'ap_uint<8>::ap_uint<32, 22, 5, 3, 0>' requested here
pixel = (typename DataType<DEPTH, NPPC>::cname)((ap_fixed<32, 22>)(P1 + P2 + P3 + P4));
^
../Vitis_Libraries/vision/L1/include/imgproc/xf_resize_nn_bilinear.hpp:140:13: note: in instantiation of function template specialization 'interpolatePixel<9, 1, 1>' requested here
interpolatePixel<DEPTH, INTERPOLATION_TYPE, NPPC>(
^
../Vitis_Libraries/vision/L1/include/imgproc/xf_resize_nn_bilinear.hpp:498:21: note: in instantiation of function template specialization 'computeOutputPixel<9, 1, 1, 17, 2, 48, 16>' requested here
computeOutputPixel<SRC_TYPE, INTERPOLATION_TYPE, NPPC, INDEX_INT, BUFFER_WORDS, WEIGHT_WIDTH,
^
../Vitis_Libraries/vision/L1/include/imgproc/xf_resize.hpp:63:9: note: in instantiation of function template specialization 'resizeNNBilinear<9, 2160, 3840, 1, 1080, 1920, 1, 2>' requested here
resizeNNBilinear<TYPE, SRC_ROWS, SRC_COLS, NPC, DST_ROWS, DST_COLS, INTERPOLATION_TYPE, MAX_DOWN_SCALE>(_src,
^
xf_resize_accel.cpp:87:2: note: in instantiation of function template specialization 'xf::cv::resize<1, 9, 2160, 3840, 1080, 1920, 1, 2>' requested here
xf::cv::resize<1, XF_8UC3, 2160, 3840, 1080, 1920, XF_NPPC1, 2>(src_mat, dst_mat);
^
4 warnings and 2 errors generated.
Failed during preprocessing.
while executing
"source script.tcl"
("uplevel" body line 1)
invoked from within
"uplevel \#0 [list source $arg] "
INFO: [Common 17-206] Exiting vivado_hls at Wed Oct 7 10:52:00 2020...