Pipeline Block
The PipeStream block orchestrates the first level of sub-blocks or CCEs as pipeline stages. At each stage, Kathryn automatically synchronizes execution with its preceding and succeeding stages. For example, if the first stage has completed execution at line 5 while the second stage has not yet completed execution at line 13, the first stage will not re-execute in that cycle. However, once line 13 of the second stage completes at cycle t, the first stage is allowed to complete the operation at line 5 in cycle t + 1.
-
pipStream.cpp
void flow() override{ pipStream{ /// stage 1 par{ a <<= a * 2; b <<= b * 2; } /// stage 2 seq{ par{ sqrtInt(a, r1); sqrtInt(b, r2); } par{ res2 <<= r1 * r2;} } /// stage 3 par{ res3 <<= res2 * 3; } /// stage 4 res4 <<= res3 *4 } } -
The state-machine will be like this