Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

force pipeline stages in for loops #150

Open
suarezvictor opened this issue Jan 6, 2023 · 2 comments
Open

force pipeline stages in for loops #150

suarezvictor opened this issue Jan 6, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@suarezvictor
Copy link

It seems that in a foor loop, amount of stages for each iteration ca be fractional, it would be good to force at least one for iteration

for (i=0; i<10; i+=1)
{
    force_pipeline(); //or #pragma
    other_code();
}
@JulianKemmerer
Copy link
Owner

JulianKemmerer commented Jan 6, 2023

Sounding very familiar with Vitis HLS style stuff:
https://docs.xilinx.com/r/en-US/ug1399-vitis-hls/pragma-HLS-pipeline

#pragma HLS pipeline
ex.

   for (int i = 0; i < size; i++) {
       #pragma HLS PIPELINE II=1
        out = in + inc;
    }

image

@JulianKemmerer
Copy link
Owner

Also reminded of #97

Where by specifying a number of loops and pragma pipeline = "~each loop iteration is pipelined" - you are almost specifying the number of pipeline stages to use directly...

@JulianKemmerer JulianKemmerer self-assigned this Jan 6, 2023
@JulianKemmerer JulianKemmerer added the enhancement New feature or request label Jan 6, 2023
@JulianKemmerer JulianKemmerer removed their assignment Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants