cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
okskman
Visitor
Visitor
1,244 Views
Registered: ‎05-08-2019

HLS SYNTHESIS Report's latency & interval value is "?"

Jump to solution

Hi, In below screenshot i have got

캡처.PNG

 

 

 

 

there is part of my pseudo code.

for(B_offset = 0; B_offset < J; B_offset += 8) {
    if(B_NNZ > 7) {
        for(A_offset = 0; A_offset < I; A_offset += 8) {
            if(A_NNZ > 7) {
                A_row_index0 = A_row[A_offset];

                ....

            }

            else

                break;

        }

       ........

    }
    else
        break;
}

1. How to solve this problem?

2. Is there any problem with export RTL with this problem?

0 Kudos
1 Solution

Accepted Solutions
shameera
Moderator
Moderator
1,232 Views
Registered: ‎05-31-2017

Hi @okskman ,

When the loop bound in your code is a variable, HLS cannot be able to report the loop latency as it does not know the number of iterations as mentioned in AR#50502

To overcome this you can use the Tripcount directive. Please note that the Tripcount directive has no effect on synthesis, it is used only for reporting purpose.

View solution in original post

7 Replies
shameera
Moderator
Moderator
1,233 Views
Registered: ‎05-31-2017

Hi @okskman ,

When the loop bound in your code is a variable, HLS cannot be able to report the loop latency as it does not know the number of iterations as mentioned in AR#50502

To overcome this you can use the Tripcount directive. Please note that the Tripcount directive has no effect on synthesis, it is used only for reporting purpose.

View solution in original post

adedamola
Newbie
Newbie
1,167 Views
Registered: ‎07-22-2018

Hi @shameera , I have this same problem.

However, I followed the instruction of using Tripcount directive in my code but the report is still "?" for latency.

Any other suggestion? this is a snippet of my code (it is a lot of code and functions)

for (i = 2; i < 30; i++)
{
#pragma HLS loop_tripcount min=30 max=36
term = fix16_mul(term, fix16_div(inValue, fix16_from_int(i)));
result += term;

if ((term < 500) && ((i > 15) || (term < 20)))
break;
}

if (neg) result = fix16_div(fix16_one, result);

#ifndef FIXMATH_NO_CACHE
_fix16_exp_cache_index[tempIndex] = inValue;
_fix16_exp_cache_value[tempIndex] = result;
#endif

return result;
}

0 Kudos
shameera
Moderator
Moderator
1,138 Views
Registered: ‎05-31-2017

Hi @adedamola ,

You are using the tripcount on the loop where the loop bound is a constant, because of this you might be still seeing the question marks in the latency. You need to use the tripcount pragma on the loop where the loop bound is a variable & HLS cannot determine the upper bound of the loop.

Generally when the loop bound is a variable & HLS cannot determine the upper bound of the loop, 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, HLS will not be able to unroll the loop since it does not know how many copies of the loop body to create.

The TRIPCOUNT pragma is for analysis only and does not impact the results of synthesis.

0 Kudos
u4223374
Advisor
Advisor
1,124 Views
Registered: ‎04-26-2015

@shameera The loop bound here is actually variable, because of the "break" statement in there.

 

@adedamola What is the latency for your fix16_mul and fix16_div functions? My guess is that they're variable, and that's where your problem is (a fixed trip-count doesn't help if the time for each iteration is unknown).

adedamola
Newbie
Newbie
1,089 Views
Registered: ‎07-22-2018

Thank you so much @shameera and @u4223374 

I will look into the other functions and find the loop

0 Kudos
shameera
Moderator
Moderator
1,066 Views
Registered: ‎05-31-2017

@u4223374 ,

Thanks for pointing this out.

0 Kudos
okskman
Visitor
Visitor
1,014 Views
Registered: ‎05-08-2019

Hi, @shameera @adedamola @u4223374 

Thanks for all the answers.

 

I solved this problem using "assert macro".

 

If you want to get information, look for the assertion part of the Vivado Design Suite User Guide: High-Level Synthesis (UG902).

 

0 Kudos