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
Participant dsula
Participant
370 Views

pipelining of hls functions

Jump to solution

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. 

0 Kudos
1 Solution

Accepted Solutions
Scholar hbucher
Scholar
574 Views

Re: pipelining of hls functions

Jump to solution

@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.
2 Replies
Scholar hbucher
Scholar
575 Views

Re: pipelining of hls functions

Jump to solution

@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.
Participant dsula
Participant
326 Views

Re: pipelining of hls functions

Jump to solution

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