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!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor anle_bs
Visitor
36 Views
Registered: ‎06-01-2018

Estimation of xfOpenCV functions in HLS

Hello,

I have started working with HLS for a couple of months and I am interested in the possibility of integrating xfOpenCV in this environment. For doing this, I have followed the resources available on this link https://github.com/Xilinx/xfopencv/tree/master/HLS_Use_Model.

I was able to compile the Dilation function used in the example and now I am trying with the pyramiding down.

Step 1

Problem: in both the cases I cannot get a right understanding of the latency report. The range of variation between min and max latency’s values is just too wide.

Question: am I reading it correctly? How can I get a more precise report on my function?

Step 2

Problem: I have checked the Analysis tab that HLS provides. Initially the analysis shows the number of clock cycles spent by the overall function and its interfaces. In my cases they are equal to a single clock cycle.

If I expand the function to check more in detail the time spend by every part, the number of clock cycles increases.

Question: how can I get from the analysis the total number of clock cycles for my function?

Step 3

Problem: to understand it better I have tried to reproduce the performances given in the xfOpenCV documentation. Let’s consider the pyramid down example. It’s documentation can be found here: https://www.xilinx.com/support/documentation/sw_manuals/xilinx2018_2/ug1233-xilinx-opencv-user-guide.pdf#_OPENTOPIC_TOC_PROCESSING_d92e29336.

Performances are estimated in Vivado HLS 2018.2 for the Xilinx xczu9eg-ffvb1156-1-i-es1 FPGA. I have used the same Vivado HLS 2018.2 for the Xilinx xczu9eg-ffvb1156-1-i-es2 FPGA (notice: not -es1 but -es2!).

Documentation says that max latency corresponds to 6.99 ms but in my case HLS reports a latency in the range between 30 and 2094887 clock cycles. I’m operating with a frequency of 3.33 ns (~300MHz) at 1 pixel per cycle and 1920x1080 size for the image in input as in accordance with documentation.

Question: why numbers are not even close to each other’s? This happens also with the resource’s estimation.

Thanks in advance for your help.

Andrea

vivado_hls_analysis_0.pngstep2 - compact viewvivado_hls_analysis_1.pngstep2 - expanded view

 

vivado_hls_xfopencv_pyrdown.pngstep 3

0 Kudos