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!

Reply

pipelining of hls functions

Accepted Solution Solved
Highlighted
Observer
Posts: 38
Registered: ‎01-14-2008
Accepted Solution

pipelining of hls functions

Hi,

 

I'm currently struggling with the following code which does not meet timing (can't achieve clock period of 20 ns).

 

#include "hls_math.h"
#include "ap_fixed.h"

void gen(ap_fixed<8,4> x, ap_fixed<8,2> *s)
{
#pragma HLS PIPELINE II=1
   *s = hls::sin(x);
}

 

I noticed that HLS does not micro-pipeline the sin function. Is that correct? It seems to choose the sin (cordic block) from a library with fixed implementations. Either a serial version with large initiation interval, or a parallel version with interval 1.

But HLS is not capable of adding additional pipeline stage within the library block to achieve shorter clock time at the expense of latency.

Is that correct, or am I missing something? I seem to have tried all the #pragma optimization options available, but nothing helped.

 

Thank you. 


Accepted Solutions
Scholar
Posts: 1,869
Registered: ‎03-22-2016

Re: pipelining of hls functions

@dsula Go to Solution/Settings and raise the uncertainty. 

I just run it for 5, 10 and 20 ns and it was okay.

A few times HLS fails timing because it apparently estimates it wrong. 

But notice these are just worst case estimates. 

The actual final timing will only be set after the component is integrated, synthesized and elaborated.

 

 

vitorian.com --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.

View solution in original post


All Replies
Scholar
Posts: 1,869
Registered: ‎03-22-2016

Re: pipelining of hls functions

@dsula Go to Solution/Settings and raise the uncertainty. 

I just run it for 5, 10 and 20 ns and it was okay.

A few times HLS fails timing because it apparently estimates it wrong. 

But notice these are just worst case estimates. 

The actual final timing will only be set after the component is integrated, synthesized and elaborated.

 

 

vitorian.com --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.
Observer
Posts: 38
Registered: ‎01-14-2008

Re: pipelining of hls functions

Yes. that was the solution. Raising the uncertainty sufficiently made it work. Thank you