Static Code Metrics Report

The static code metrics report provides statistics of the generated code. Metrics are estimated from static analysis of the generated code using the C data types specified in the 'Device details' section of the Configuration Parameter > Hardware Implementation pane: char 8, short 16, int 32, long 32, float 32, double 64, pointer 32 bits. If your model contains a Variant block, the Static Code Metrics Report does not contain data for the inactive variant. Actual object code metrics might differ due to target specific compiler and platform settings. Consult the Code Generation Advisor help.png for options to improve code efficiency.

Table of Contents

  1. File Information
  2. Global Variables
  3. Function Information

1. File Information [hide]

[-] Summary (excludes ert_main.c)

Number of .c files : 2  
Number of .h files : 3  
Lines of code : 1,626  
Lines : 4,276  

[-] File details

File Name Lines of Code Lines Generated On
PMSM_Controller.c 1,265 3,308 05/28/2022 2:25 PM
PMSM_Controller.h 198 556 05/28/2022 2:25 PM
PMSM_Controller_data.c 100 257 05/28/2022 2:25 PM
rtwtypes.h 44 103 05/28/2022 2:25 PM
zero_crossing_types.h 19 52 05/28/2022 2:25 PM

2. Global Variables [hide]

Global variables defined in the generated code.
Global Variable Size (bytes) Reads / Writes Reads / Writes in a Function
[+] rtP 56 60  58 
Total 56 60 

3. Function Information [hide]

View function metrics in a call tree format or table format. Accumulated stack numbers include the estimated stack size of the function plus the maximum of the accumulated stack size of the subroutines that the function calls.
View:Call Tree | Table
Function Name Accumulated Stack Size (bytes) Self Stack Size (bytes) Lines of Code Lines Complexity
[+]  PMSM_Controller_step 158 134 923 2,652 155
[+]  PMSM_Controller_initialize 12 12 18 67 1