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,512  
Lines : 3,993  

[-] File details

File Name Lines of Code Lines Generated On
PMSM_Controller.c 1,177 3,097 05/23/2022 4:15 PM
PMSM_Controller.h 182 542 05/23/2022 4:15 PM
PMSM_Controller_data.c 90 199 05/23/2022 4:15 PM
rtwtypes.h 44 103 05/23/2022 4:15 PM
zero_crossing_types.h 19 52 05/23/2022 4:15 PM

2. Global Variables [hide]

Global variables defined in the generated code.
Global Variable Size (bytes) Reads / Writes Reads / Writes in a Function
[+] rtP 36 18  16 
Total 36 18 

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 140 116 866 2,482 149
[+]  PMSM_Controller_initialize 12 12 15 60 1