User manual

Tutorial: Handel-C advanced optimization
directory. Open the file named Summary.html by double-clicking on it (this should load your computers
default web browser).
The code can be altered to allow the loop to execute in one cycle again by implementing a two-stage
pipeline, where the first stage calculates the values of
C and D, and the second stage adds them
together. The pipeline must be primed before the while() loop begins executing, as shown below:
/* prime pipeline */
par
{
C = A * B;
D = A + B;
}
do
{
par
{
/* pipeline stage 1 */
C = A * B;
D = A + B;
/* pipeline stage 2 */
Output = C + D;
Index++;
}
} while (Index < 10000);
www.celoxica.com
Page 92