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!

AR# 50502

Vivado HLS - Why is the loop's trip count and latency undetermined?

Description

Why is the loop's trip count and latency undetermined?

Solution

Based on the loop bounds there are two broad categories, which break down into three types:

  1. Constants: the loop bound is a constant.
  2. Variables

a. The loop bound is a variable & HLS can determine the upper bounds of the loop.
b. The loop bound is a variable & HLS cannot determine the upper bound of the loop.

In all cases HLS can synthesize hardware to implement the loop. In the worst case, it will be a counter the size of the loop index variable.

For loop types 1 and 2a, HLS can determine how many iterations the loop will perform and able to report the loop latency, which is calculated as number of iterations * latency of the loop body. If required, it can unroll the loop since it knows how many copies of the loop body are required to implement the same functionality.

For type 2b, HLS will not be able to report the loop latency (since it does not know the number of iterations) and a question mark (?) will be shown in the report. In this case, the tripcount directive can be used to specify a value to be used for reporting.In addition, for type 2b, HLS will not be able to unroll the loop since it does not know how many copies of the loop body to create.

AR# 50502
Date Created 06/19/2012
Last Updated 10/05/2012
Status Active
Type Solution Center
Tools
  • AutoESL - 2012.1
  • Vivado