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: 
Observer skotti
Observer
928 Views
Registered: ‎06-18-2018

Vivado HLS does not infer loop max and min trip count based on LOOP_TRIPCOUNT pragma in .cl files

Jump to solution

Hello everyone!

I can' understand why HLS pragma does not work for me.

I tried this one : #pragma HLS LOOP_TRIPCOUNT

 

Are there restrictions on scope where  hls tripcount option always works? Or there are some cases when it will not make vivado to infer max and min trip count?
I tried to put it in my examples inside loop body, bit there are still question marks everywhere.
 
for (int c1 = 1; c1 <= -c0 + 500; c1 += 1) {
#pragma HLS LOOP_TRIPCOUNT min=1 max=499
...
    for (int c2 = c1; c2 < c0 + c1 - 1; c2 += 1) {
#pragma HLS LOOP_TRIPCOUNT min=1 max=498
    }
}
 
trip count is shown as 1~? on the outer loop and ? on the inner loop.
Latency is ? everywhere, I suppose based on the max and minimum number I provided it with it can determine that min and  max latency.
 
 
Even in this simple example this pragma does not work...
 
for (int i = 0; i < c0; i++) {
#pragma HLS LOOP_TRIPCOUNT min=1 max=500
        local_table[i] = table[i];
}
 
 
trip count is shown as 1~?
 
I also tried to use assertions ( assert(c1 <= 399); ) but sdaccel is complaining about them.
passing '__constant char *' to parameter of type 'const char *' changes address space of pointer
Can I somehow eliminate this error?
Or this kind of trick is not applicable?
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Xilinx Employee
Xilinx Employee
898 Views
Registered: ‎01-12-2017

Re: Vivado HLS does not infer loop max and min trip count based on LOOP_TRIPCOUNT pragma in .cl files

Jump to solution

Hi @skotti ,

 

SDAccel OpenCL (.cl) looks for only __attribute__ based pragma constructs.

#pragma HLS based pragmas are used in SDAccel (C/C++ - .cpp) based kernels.

 

Thanks

Kali

0 Kudos
2 Replies
Highlighted
Xilinx Employee
Xilinx Employee
899 Views
Registered: ‎01-12-2017

Re: Vivado HLS does not infer loop max and min trip count based on LOOP_TRIPCOUNT pragma in .cl files

Jump to solution

Hi @skotti ,

 

SDAccel OpenCL (.cl) looks for only __attribute__ based pragma constructs.

#pragma HLS based pragmas are used in SDAccel (C/C++ - .cpp) based kernels.

 

Thanks

Kali

0 Kudos
Observer skotti
Observer
874 Views
Registered: ‎06-18-2018

Re: Vivado HLS does not infer loop max and min trip count based on LOOP_TRIPCOUNT pragma in .cl files

Jump to solution

@kalib, for me pragma HLS DATAFLOW also works in .cl files, so I assume that other pragmas should also work.

0 Kudos