Focusing on Process 2
, let’s check how we arrive to a TI=258
.
On the node representing Process 2
, use the down pointing arrow on the left to show the code.
We can make the following observations:
The code is using a double nested loop to clear array
C[16][16]
.The performance analysis of Code Analyzer is overlaid in the code snippet, here this is shown between lines 1 and 2 and lines 2 and 3, right at the start of the regions defined by the for-loops. Let’s look into the numbers.
Code Analyzer estimates the performance of the innermost-loop first: Initiation Interval of 1 clock cycle can be achieved to start the next iteration, so
II=1
is reported.Each for-loop is counting from 0 to 15 because constant N=16 is used, so
TRIPCOUNT=16
is reported.The Transaction Interval is
TI=TRIPCOUNT*II
, so for the innermost-loop we getTI=16*1=16
.We repeat the investigations hierarchically up into the parent loop: we compute the sum of all TI(s) of all the statements in the loop body. The TI sum becomes the II of the loop, since we have only the innermost-loop in the loop body we have an
II=16
, and withTRIPCOUNT=16
, so their product gives usTI=16*16=256
.As the loops are the only statements from the extracted process itself, we add 2 extra cycles for the state machine of the process which gives the overall Transaction Interval for
Process 2
ofTI=256+2=258
NOTE: Performance analysis numbers are shown at the beginning of a loop, within its curly braces
{}
, or right after a function call site.