Process 2 analysis - 2024.1 English - XD261

Vitis Tutorials: Vitis HLS (XD261)

Document ID
XD261
Release Date
2024-06-19
Version
2024.1 English

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.

Code Analyzer Process 2 folded

We can make the following observations:

  1. The code is using a double nested loop to clear array C[16][16].

  2. 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.

  3. 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.

  4. Each for-loop is counting from 0 to 15 because constant N=16 is used, so TRIPCOUNT=16 is reported.

  5. The Transaction Interval is TI=TRIPCOUNT*II, so for the innermost-loop we get TI=16*1=16.

  6. 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 with TRIPCOUNT=16, so their product gives us TI=16*16=256.

  7. 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 of TI=256+2=258

Code Analyzer Process 2 investigations

NOTE: Performance analysis numbers are shown at the beginning of a loop, within its curly braces {}, or right after a function call site.