# Benchmarking Report

Target Device: dsPIC33AK128MC106
XC-DSC Compiler Version: 3.31.01
Optimization Level: 2
System Clock: 200 MHz

ADC

File Name | Shared Data - RAM(Bytes) | Code Size Per File - FLASH(Bytes)
--- | --- | ---
diag_adc_boundary_monitor_test.c | 0 | 260
diag_adc_shared.c | 12 | 500
diag_adc_linearity_monotonicity_test.c | 16 | 468
diag_adc_startup_test.c | 0 | 92
| API Description | Code Size Split - FLASH(Bytes)
DIAG_ADC_BoundaryMonitorTest | 260
DIAG_ADC_GetADCChannel | 4
DIAG_ADC_GetADCInstance | 8
DIAG_ADC_GetLinearityMonotonicityResult | 20
DIAG_ADC_IsChannelValid | 56
DIAG_ADC_LinearityMonotonicityTest | 448
DIAG_ADC_RestoreRegisters | 84
DIAG_ADC_StartupTest | 92
DIAG_ADC_StoreRegisters | 84
DIAG_ADC_TriggerConversionAndGetResult | 224

CLOCK

File Name | Shared Data - RAM(Bytes) | Code Size Per File - FLASH(Bytes)
--- | --- | ---
diag_clock_fscmtest.c | 4 | 196
| API Description | Code Size Split - FLASH(Bytes)
DIAG_CLOCK_FscmTest | 172
DIAG_CLOCK_SetClockMonFaultStatus | 8

CPU

File Name | Shared Data - RAM(Bytes) | Code Size Per File - FLASH(Bytes)
--- | --- | ---
diag_cpu_self_test.c | 92 | 852
diag_cpu_controlreg_test.c | 8 | 2848
diag_cpu_shared.c | 4 | 3180
diag_cpu_regresetstate_test.c | 0 | 244
| API Description | Code Size Split - FLASH(Bytes)
DIAG_CPU_CallSubset | 36
DIAG_CPU_CheckFlagMathError | 44
DIAG_CPU_ControlRegTest | 2680
DIAG_CPU_GetRetValue | 8
DIAG_CPU_MathError | 76
DIAG_CPU_RegResetStateTest | 132
DIAG_CPU_SelfTest | 764
DIAG_CPU_SelfTest_GetStatus | 8
DIAG_CPU_SelfTest_Subset1 | 444
DIAG_CPU_SelfTest_Subset2 | 276
DIAG_CPU_SelfTest_Subset3 | 348
DIAG_CPU_SelfTest_Subset4 | 412
DIAG_CPU_SelfTest_Subset5 | 420
DIAG_CPU_SelfTest_Subset6 | 260
DIAG_CPU_SelfTest_Subset7 | 488
DIAG_CPU_SelfTest_Subset8 | 340
DIAG_CPU_SetRetValue | 8

CRC

File Name | Shared Data - RAM(Bytes) | Code Size Per File - FLASH(Bytes)
--- | --- | ---
diag_crc_shared.c | 4 | 244
diag_crc_functional_test.c | 12 | 896
| API Description | Code Size Split - FLASH(Bytes)
DIAG_CRC_Compute | 236
DIAG_CRC_FunctionalTest | 248
DIAG_CRC_FunctionalTest_GetStatus | 8
DIAG_CRC_SetTestModeFunctional | 8

FLASH

File Name | Shared Data - RAM(Bytes) | Code Size Per File - FLASH(Bytes)
--- | --- | ---
diag_flash_shared.c | 4 | 24
diag_flash_crc_test.c | 4 | 532
diag_flash_integrity_practice.c | 0 | 92
diag_flash_biterror_test.c | 4 | 372
diag_flash_writeverify_test.c | 0 | 96
| API Description | Code Size Split - FLASH(Bytes)
DIAG_FLASH_Callback | 20
DIAG_FLASH_CRCCalculate | 128
DIAG_FLASH_CRCPractice | 396
DIAG_FLASH_ErrorHandler | 4
DIAG_FLASH_IntegrityReadPractice | 92
DIAG_FLASH_SetTestModeBitError | 8
DIAG_FLASH_SetTestModeCrcError | 8
DIAG_FLASH_SingleDoubleErrorDetectionTest | 364
DIAG_FLASH_WriteVerifyPractice | 96

GPIO

File Name | Shared Data - RAM(Bytes) | Code Size Per File - FLASH(Bytes)
--- | --- | ---
diag_gpio_activitycheck.c | 0 | 176
diag_gpio_shared.c | 4 | 84
diag_gpio_inputpractice.c | 0 | 140
diag_gpio_iomonitortest.c | 4 | 472
diag_gpio_interruptgentest.c | 0 | 172
diag_gpio_outputtest.c | 0 | 132
diag_gpio_ppsoutputtest.c | 0 | 116
| API Description | Code Size Split - FLASH(Bytes)
DIAG_GPIO_ActivityCheck | 176
DIAG_GPIO_CompareOutputInputPorts | 68
DIAG_GPIO_GetRetValue | 8
DIAG_GPIO_InputPractice | 140
DIAG_GPIO_IntegrityMonitorTest | 448
DIAG_GPIO_InterruptGenTest | 172
DIAG_GPIO_IOIM_GetStatus | 8
DIAG_GPIO_OutputTest | 132
DIAG_GPIO_PpsOutputConnectionTest | 116
DIAG_GPIO_SetRetValue | 8

INTERRUPT

File Name | Shared Data - RAM(Bytes) | Code Size Per File - FLASH(Bytes)
--- | --- | ---
diag_interrupt_external_input.c | 8 | 208
diag_interrupt_frequency_check.c | 4 | 472
diag_interrupt_shared.c | 4 | 16
diag_interrupt_hardtrap_test.c | 4 | 100
diag_interrupt_isrcleared_check.c | 4 | 256
diag_interrupt_servicing_test.c | 4 | 492
| API Description | Code Size Split - FLASH(Bytes)
DIAG_INTERRUPT_ExternalInputTest | 192
DIAG_INTERRUPT_ExternalSetIntrTestCompleted | 8
DIAG_INTERRUPT_FrequencyCheck | 260
DIAG_INTERRUPT_GetFreqTestResults | 112
DIAG_INTERRUPT_GetRetValue | 8
DIAG_INTERRUPT_HardTrapTest | 80
DIAG_INTERRUPT_IfsFlagClearedCheckFromIsr | 148
DIAG_INTERRUPT_IsExtIntrTestRunning | 8
DIAG_INTERRUPT_IsInterruptServicingCheckRunning | 8
DIAG_INTERRUPT_IsrClearedCheck | 108
DIAG_INTERRUPT_isTrapInducedByDiag | 8
DIAG_INTERRUPT_resetDiagInducedTrapStatus | 12
DIAG_INTERRUPT_ServicingTest | 448
DIAG_INTERRUPT_SetRetValue | 8
DIAG_INTERRUPT_StartFrequencyTest | 12
DIAG_INTERRUPT_StopFrequencyTest | 8
DIAG_INTERRUPT_UpdateISRNotifications | 80

PC

File Name | Shared Data - RAM(Bytes) | Code Size Per File - FLASH(Bytes)
--- | --- | ---
diag_pc_programcountertest.c | 2 | 120
| API Description | Code Size Split - FLASH(Bytes)
DIAG_PC_HelperFunc1 | 24
DIAG_PC_HelperFunc2 | 24
DIAG_PC_HelperFunc3 | 24
DIAG_PC_ProgramCounterTest | 48

SRAM

File Name | Shared Data - RAM(Bytes) | Code Size Per File - FLASH(Bytes)
--- | --- | ---
diag_sram_shared.c | 4 | 16
diag_sram_ecc_event.c | 8 | 700
diag_sram_replication.c | 0 | 332
| API Description | Code Size Split - FLASH(Bytes)
DIAG_SRAM_GetRetValue | 8
DIAG_SRAM_HandleDoubleBitError | 288
DIAG_SRAM_HandleSingleBitError | 304
DIAG_SRAM_IsBackedUpDataValid | 172
DIAG_SRAM_ReplicationWrite | 160
DIAG_SRAM_SetRetValue | 8
DIAG_SRAM_SetSramDoubleBitTrapEntryStatus | 8
DIAG_SRAM_SetSramSingleBitIsrEntryStatus | 8
DIAG_SRAM_SingleDoubleErrorDetectionTest | 92

TIMER

File Name | Shared Data - RAM(Bytes) | Code Size Per File - FLASH(Bytes)
--- | --- | ---
diag_timer_functional_test.c | 24 | 1012
diag_timer_linearity_test.c | 16 | 568
| API Description | Code Size Split - FLASH(Bytes)
DIAG_TIMER_FunctionalTest | 996
DIAG_TIMER_GetResults | 8
DIAG_TIMER_LinearitySetValues | 52
DIAG_TIMER_LinearityTest | 508
DIAG_TIMER_SetTestModeFunctional | 8
DIAG_TIMER_SetTestModeLinearity | 8

UTIL

File Name | Shared Data - RAM(Bytes) | Code Size Per File - FLASH(Bytes)
--- | --- | ---
diag_utility_adc.c | 0 | 184
| API Description | Code Size Split - FLASH(Bytes)
DIAG_UTIL_ADC_RedundantInputsPractice | 184

ADC

API Description | Execution Time (micro Sec)
--- | ---
DIAG_ADC_BoundaryCheck | 110.98
DIAG_ADC_LinearityMonotonicityTest | 343.24
DIAG_ADC_StartupTest | 89.75

CLOCK

API Description | Execution Time (micro Sec)
--- | ---
DIAG_CLOCK_FscmTest | 194.24

CPU

API Description | Execution Time (micro Sec)
--- | ---
DIAG_CPU_ControlRegTest | 5.96
DIAG_CPU_RegResetStateTest | 1.84
DIAG_CPU_SelfTest_Subset1 | 1.49
DIAG_CPU_SelfTest_Subset2 | 1.33
DIAG_CPU_SelfTest_Subset3 | 1.75
DIAG_CPU_SelfTest_Subset4 | 1.42
DIAG_CPU_SelfTest_Subset5 | 1.59
DIAG_CPU_SelfTest_Subset6 | 2.07
DIAG_CPU_SelfTest_Subset7 | 3.21
DIAG_CPU_SelfTest_Subset8 | 1.54

CRC

API Description | Execution Time (micro Sec)
--- | ---
DIAG_CRC_FunctionalTest | 64.93

FLASH

API Description | Execution Time (micro Sec)
--- | ---
DIAG_FLASH_CRCCalculate | 33.80
DIAG_FLASH_CRCPractice | 363.38
DIAG_FLASH_IntegrityReadPractice | 0.28
DIAG_FLASH_SingleDoubleErrorDetectionTest | 1.89
DIAG_FLASH_WriteVerifyPractice | 0.34

GPIO

API Description | Execution Time (micro Sec)
--- | ---
DIAG_GPIO_ActivityCheck | 5.76
DIAG_GPIO_InputPractice | 0.32
DIAG_GPIO_IntegrityMonitorTest | 11.55
DIAG_GPIO_InterruptGenTest | 0.54
DIAG_GPIO_OutputTest | 0.53
DIAG_GPIO_PpsOutputConnectionTest | 6.02

INTERRUPT

API Description | Execution Time (micro Sec)
--- | ---
DIAG_INTERRUPT_ExternalInputTest | 1.61
DIAG_INTERRUPT_FrequencyCheck | 0.87
DIAG_INTERRUPT_HardTrapTest | 0.63
DIAG_INTERRUPT_IsrClearedCheck | 0.22
DIAG_INTERRUPT_ServicingTest | 19.70

PC

API Description | Execution Time (micro Sec)
--- | ---
DIAG_PC_ProgramCounterTest | 0.24

SRAM

API Description | Execution Time (micro Sec)
--- | ---
DIAG_SRAM_IsBackedUpDataValid | 0.52
DIAG_SRAM_ReplicationWrite | 0.42
DIAG_SRAM_SingleDoubleErrorDetectionTest | 1.16

TIMER

API Description | Execution Time (micro Sec)
--- | ---
DIAG_TIMER_FunctionalTest | 4.32
DIAG_TIMER_LinearityTest | 24.36

UTIL

API Description | Execution Time (micro Sec)
--- | ---
DIAG_UTIL_ADC_RedundantInputsPractice | 138.07