PipelineC
PipelineC copied to clipboard
force pipeline stages in for loops
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();
}
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;
}
Also reminded of https://github.com/JulianKemmerer/PipelineC/issues/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...