Altera Nios II C2H Compiler User Manual
Page 107

Altera Corporation
9.1
4–13
November 2009
Nios II C2H Compiler User Guide
Understanding the C2H View
Figure 4–5. CRC Dependency Graph
Since the critical path does not involve the pointer
data
the only
operations are on local scalar types and a read operation from the array
table
. The calculation of
lut_addr
only depends on the scalar critical
loop variable
crc
, while the calculation of
crc
depends on a memory
reference to critical loop array variable
table
.
Each time the C2H accelerator finishes calculating the value of
crc
for
loop iteration n, it can start calculating
crc
for iteration n+1. On the same
clock cycle, it can also start calculating the value of
lut_addr
for
iteration n+2. This means that the accelerator always gets a one-loop head
start on calculating
lut_addr
. Thus, although the accelerator requires
lut_addr
to calculate
crc
,
lut_addr
does not limit the loop speed,
because it is always ready as soon as
crc
is.
The report shows that the critical path is either
0--->6
, or
6--->11
.
Since the C2H Compiler pipelines the logic contained in loops, multiple
states are active concurrently.
represents the pipelined timing
of
. Notice that since the assignment of
crc
is
the critical path, the accelerator begins each execution of that statement as
crc=(crc>>8)^
table
[lut_addr];
crc=(crc>>8)^table[
lut_addr
];
lut_addr=(
crc
&0xFF)^*data++;
lut_addr=(crc&0xFF)^
*data++
;