# Benchmarking Report

Target Device: dsPIC33AK512MPS512
XC-DSC Compiler Version: 3.31
Optimization Level: 2
System Clock: 200MHz

ADC

File Name | Shared Data - RAM(Bytes) | Code Size Per File - FLASH(Bytes)
--- | --- | ---
diag_adc_boundary_monitor_test.c | 0 | 256
diag_adc_shared.c | 0 | 512
diag_adc_linearity_monotonicity_test.c | 0 | 480
diag_adc_startup_test.c | 0 | 92
| API Description | Code Size Split - FLASH(Bytes)
DIAG_ADC_BoundaryMonitorTest | 256
DIAG_ADC_GetADCChannel | 4
DIAG_ADC_GetADCInstance | 8
DIAG_ADC_GetLinearityMonotonicityResult | 20
DIAG_ADC_IsChannelValid | 52
DIAG_ADC_LinearityMonotonicityTest | 460
DIAG_ADC_RestoreRegisters | 96
DIAG_ADC_StartupTest | 92
DIAG_ADC_StoreRegisters | 96
DIAG_ADC_TriggerConversionAndGetResult | 256

CLOCK

File Name | Shared Data - RAM(Bytes) | Code Size Per File - FLASH(Bytes)
--- | --- | ---
diag_clock_fscmtest.c | 0 | 188
| API Description | Code Size Split - FLASH(Bytes)
DIAG_CLOCK_FscmTest | 180
DIAG_CLOCK_SetClockMonFaultStatus | 8

CPU

File Name | Shared Data - RAM(Bytes) | Code Size Per File - FLASH(Bytes)
--- | --- | ---
diag_cpu_self_test.c | 32 | 832
diag_cpu_controlreg_test.c | 0 | 2680
diag_cpu_shared.c | 0 | 2996
diag_cpu_regresetstate_test.c | 0 | 132
| API Description | Code Size Split - FLASH(Bytes)
DIAG_CPU_CheckFlagMathError | 44
DIAG_CPU_ControlRegTest | 2680
DIAG_CPU_GetRetValue | 8
DIAG_CPU_MathError | 68
DIAG_CPU_RegResetStateTest | 132
DIAG_CPU_SelfTest | 780
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 | 412
DIAG_CPU_SelfTest_Subset6 | 260
DIAG_CPU_SelfTest_Subset7 | 476
DIAG_CPU_SelfTest_Subset8 | 284
DIAG_CPU_SetRetValue | 8

CRC

File Name | Shared Data - RAM(Bytes) | Code Size Per File - FLASH(Bytes)
--- | --- | ---
diag_crc_shared.c | 0 | 244
diag_crc_functional_test.c | 8 | 256
| 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 | 0 | 24
diag_flash_crc_test.c | 0 | 532
diag_flash_integrity_practice.c | 0 | 92
diag_flash_biterror_test.c | 0 | 372
diag_flash_writeverfiy_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 | 0 | 84
diag_gpio_inputpractice.c | 0 | 140
diag_gpio_iomonitortest.c | 0 | 468
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 | 460
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 | 0 | 208
diag_interrupt_frequency_check.c | 0 | 472
diag_interrupt_shared.c | 0 | 16
diag_interrupt_hardtrap_test.c | 0 | 100
diag_interrupt_isrcleared_check.c | 0 | 256
diag_interrupt_servicing_test.c | 0 | 460
| 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 | 452
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 | 0 | 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 | 0 | 16
diag_sram_ecc_event.c | 0 | 708
diag_sram_replication.c | 0 | 332
| API Description | Code Size Split - FLASH(Bytes)
DIAG_SRAM_GetRetValue | 8
DIAG_SRAM_HandleDoubleBitError | 292
DIAG_SRAM_HandleSingleBitError | 308
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 | 0 | 980
diag_timer_linearity_test.c | 0 | 572
| API Description | Code Size Split - FLASH(Bytes)
DIAG_TIMER_FunctionalTest | 964
DIAG_TIMER_GetResults | 8
DIAG_TIMER_LinearitySetValues | 52
DIAG_TIMER_LinearityTest | 512
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 | 123.112
DIAG_ADC_LinearityMonotonicityTest | 612.491
DIAG_ADC_StartupTest | 99.583

CLOCK

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

CPU

API Description | Execution Time (micro Sec)
--- | ---
DIAG_CPU_ControlRegTest | 6.732
DIAG_CPU_RegResetStateTest | 1.980
DIAG_CPU_SelfTest_Subset1 | 1.782
DIAG_CPU_SelfTest_Subset2 | 1.419
DIAG_CPU_SelfTest_Subset3 | 1.991
DIAG_CPU_SelfTest_Subset4 | 1.573
DIAG_CPU_SelfTest_Subset5 | 1.881
DIAG_CPU_SelfTest_Subset6 | 2.288
DIAG_CPU_SelfTest_Subset7 | 3.971
DIAG_CPU_SelfTest_Subset8 | 1.595

CRC

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

FLASH

API Description | Execution Time (micro Sec)
--- | ---
DIAG_FLASH_CRCCalculate | 37.158
DIAG_FLASH_CRCPractice | 399.707
DIAG_FLASH_IntegrityReadPractice | 0.297
DIAG_FLASH_SingleDoubleErrorDetectionTest | 2.134
DIAG_FLASH_WriteVerifyPractice | 0.539

GPIO

API Description | Execution Time (micro Sec)
--- | ---
DIAG_GPIO_ActivityCheck | 6.435
DIAG_GPIO_InputPractice | 0.561
DIAG_GPIO_IntegrityMonitorTest | 51.414
DIAG_GPIO_InterruptGenTest | 0.737
DIAG_GPIO_OutputTest | 0.638
DIAG_GPIO_PpsOutputConnectionTest | 6.710

INTERRUPT

API Description | Execution Time (micro Sec)
--- | ---
DIAG_INTERRUPT_ExternalInputTest | 1.386
DIAG_INTERRUPT_FrequencyCheck | 1.199
DIAG_INTERRUPT_HardTrapTest | 0.847
DIAG_INTERRUPT_IsrClearedCheck | 0.308
DIAG_INTERRUPT_ServicingTest | 36.311

PC

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

SRAM

API Description | Execution Time (micro Sec)
--- | ---
DIAG_SRAM_IsBackedUpDataValid | 0.605
DIAG_SRAM_ReplicationWrite | 0.539
DIAG_SRAM_SingleDoubleErrorDetectionTest | 1.430

TIMER

API Description | Execution Time (micro Sec)
--- | ---
DIAG_TIMER_FunctionalTest | 4.543
DIAG_TIMER_LinearityTest | 25.531

UTIL

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