Document API IEC60730 Library
Functions

Header file list of test cases for the verification operate functions in invariable memory module. More...

Functions

uint32_t * unit_test_iec60730_imc_mock_init_run_crc (void)
 
sl_iec60730_test_result_t unit_test_mock_check_integrity (void)
 
bool unit_test_iec60730_imc_mock_enable_gpcrc (void)
 
bool unit_test_iec60730_imc_mock_sw_enable_cal_crc (void)
 
void test_sl_iec60730_imc_init_param_null (void)
 
void test_sl_iec60730_imc_post_pass_check (void)
 
void test_sl_iec60730_imc_post_fail_check (void)
 
void test_sl_iec60730_imc_bist_pass_all_check (void)
 
void test_sl_iec60730_imc_bist_fail_check_integrity (void)
 
void test_sl_iec60730_imc_bist_iec60730_run_crc_greater_than_rom_end_address (void)
 
void test_sl_iec60730_imc_bist_fail_compare_crc (void)
 
void test_sl_iec60730_update_crc_with_data_buffer_params_null (void)
 
void test_sl_iec60730_update_crc_with_data_buffer_calculation_crc (void)
 

Detailed Description

Header file list of test cases for the verification operate functions in invariable memory module.

IEC60730 Invariable Memory Unit Tests

These test cases run unit tests to check the operation of the functions in invariable memory module.

Hardware setup:

Function Documentation

◆ test_sl_iec60730_imc_bist_fail_check_integrity()

void test_sl_iec60730_imc_bist_fail_check_integrity ( void  )

Public Check sl_iec60730_imc_bist() operate

Returns
None.

If the check integrity of the pointer fails, the function sl_iec60730_imc_bist() returns SL_IEC60730_TEST_FAILED.

◆ test_sl_iec60730_imc_bist_fail_compare_crc()

void test_sl_iec60730_imc_bist_fail_compare_crc ( void  )

Public Check sl_iec60730_imc_bist() operate

Returns
None.

In the case of SL_IEC60730_CRC_DEBUG_ENABLE == 1, if the value crc calculated value is not equal value calculated from sl_iec60730_imc_post(), or in the case of SL_IEC60730_CRC_DEBUG_ENABLE == 0, the initial crc calculated value is not equal to the value stored in check_sum. The function sl_iec60730_imc_bist() returns SL_IEC60730_TEST_FAILED.

◆ test_sl_iec60730_imc_bist_iec60730_run_crc_greater_than_rom_end_address()

void test_sl_iec60730_imc_bist_iec60730_run_crc_greater_than_rom_end_address ( void  )

Public Check sl_iec60730_imc_bist() operate

Returns
None.

If iec60730_run_crc init greater than rom end address before iec60730_cur_crc is calculated. Then the function sl_iec60730_imc_bist() returns SL_IEC60730_TEST_FAILED.

◆ test_sl_iec60730_imc_bist_pass_all_check()

void test_sl_iec60730_imc_bist_pass_all_check ( void  )

Public Check sl_iec60730_imc_bist() operate

Returns
None.

In the case of SL_IEC60730_CRC_DEBUG_ENABLE == 1, if the value crc calculated value is equal value calculated from sl_iec60730_imc_post(), or in the case of SL_IEC60730_CRC_DEBUG_ENABLE == 0, the initial crc calculated value is equal to the value stored in check_sum. The function returns# SL_IEC60730_TEST_PASSED.

Public Check sl_iec60730_imc_bist() operate

Returns
None.

In the case of SL_IEC60730_CRC_DEBUG_ENABLE == 1, if the value crc calculated value is equal value calculated from sl_iec60730_imc_post(), or in the case of SL_IEC60730_CRC_DEBUG_ENABLE == 0, the initial crc calculated value is equal to the value stored in check_sum. The function sl_iec60730_imc_bist() returns SL_IEC60730_TEST_PASSED.

◆ test_sl_iec60730_imc_init_param_null()

void test_sl_iec60730_imc_init_param_null ( void  )

Public Check sl_iec60730_imc_init() operate

Returns
None.

If the passed parameter value is NULL, the sl_iec60730_imc_init() function will fail. When calling the function sl_iec60730_imc_post(), the value will be returned SL_IEC60730_TEST_FAILED.

◆ test_sl_iec60730_imc_post_fail_check()

void test_sl_iec60730_imc_post_fail_check ( void  )

Public Check sl_iec60730_imc_post() operate

Returns
None.

In the case of SL_IEC60730_CRC_DEBUG_ENABLE == 1, if the initial crc calculated value is 0, or in the case of SL_IEC60730_CRC_DEBUG_ENABLE == 0, the initial crc calculated value is not equal to the value stored in check_sum. The function returns SL_IEC60730_TEST_FAILED.

◆ test_sl_iec60730_imc_post_pass_check()

void test_sl_iec60730_imc_post_pass_check ( void  )

Public Check sl_iec60730_imc_post() operate

Returns
None.

If the passed parameter value is valid, the sl_iec60730_imc_init() function will success. When calling the function sl_iec60730_imc_post(), the value will be returned SL_IEC60730_TEST_PASSED.

◆ test_sl_iec60730_update_crc_with_data_buffer_calculation_crc()

void test_sl_iec60730_update_crc_with_data_buffer_calculation_crc ( void  )

Public Check sl_iec60730_update_crc_with_data_buffer() operate

Returns
None.

Calculate the CRC value of the input string, check whether the returned CRC value is correct or not.

◆ test_sl_iec60730_update_crc_with_data_buffer_params_null()

void test_sl_iec60730_update_crc_with_data_buffer_params_null ( void  )

Public Check sl_iec60730_update_crc_with_data_buffer() operate

Returns
None.

If the passed parameter value is NULL, the sl_iec60730_update_crc_with_data_buffer() function will fail. returns SL_IEC60730_TEST_FAILED.

◆ unit_test_iec60730_imc_mock_enable_gpcrc()

bool unit_test_iec60730_imc_mock_enable_gpcrc ( void  )

Public Function mock enable gpcrc hardware operate.

Returns
boolean.

◆ unit_test_iec60730_imc_mock_init_run_crc()

uint32_t* unit_test_iec60730_imc_mock_init_run_crc ( void  )

Public Function mock returns the starting address value of the ram test area

Returns
pointer uint32_t*.

◆ unit_test_iec60730_imc_mock_sw_enable_cal_crc()

bool unit_test_iec60730_imc_mock_sw_enable_cal_crc ( void  )

Public Function mock enable calculate crc by software.

Returns
boolean.

◆ unit_test_mock_check_integrity()

sl_iec60730_test_result_t unit_test_mock_check_integrity ( void  )

Public Function simulates the result of variable value integrity check.

Returns
boolean.