The CCM (Core Compare Module) implements the CPU lockstep mechanism. In the AWR2944, two R5F cores can be configured in lockstep mode, where the CCM compares the outputs (instructions, addresses, data) of both cores at every clock cycle, determining a CPU hardware fault when a discrepancy is detected. The CCM supports two categories of monitoring:
- Output Compare Block monitoring (SDL_CCM_MONITOR_TYPE_OUTPUT_COMPARE_BLOCK), comparing the instruction-level execution outputs of the master and slave cores;
- VIM Compare monitoring (SDL_CCM_MONITOR_TYPE_VIM). The lockstep mode makes CPU1 run as the diagnostic mirror of CPU0, with both executing the same interrupt handling. Interrupt signals are simultaneously sent to CPU0 and to CPU1 through a delay circuit, and their respective outputs are sent to the CCMR5 module via a dedicated bus for comparison. The output of CPU0 is also delayed to align timing. The CCMR5 compares the two signal paths, and if a mismatch occurs, it generates an MSS_CCMR5_ERR error interrupt, thereby detecting hardware faults in the CPU cores, with the error reported through the ESM module.
The low-level mechanism of this module is described in reference [1]: the lockstep comparator continuously monitors the CPU instruction and data buses, triggering an ESM safety response immediately upon detecting any deviation.
The CCM functional test (sdl_ccm_example) contains three sub-items:
- Normal self-test: SDL_CCM_selfTest() verifies the basic functionality of the output compare block.
- Error-forcing self-test: Calling SDL_CCM_selfTest() with the SDL_CCM_SELFTEST_TYPE_ERROR_FORCING mode to force error injection and verify the detection path.
- Error injection: SDL_CCM_injectError() injects comparison errors to verify the ESM interrupt response and clearing workflow.
The VIM test (sdl_ccm_vim) targets comparison errors in the VIM path with a similar workflow.
Table 2-2 CCM Module Function Descriptions
| Key Function |
Functions |
| SDL_CCM_init |
Initializes the CCM module |
| SDL_CCM_verifyConfig |
Verifies the CCM configuration |
| SDL_CCM_selfTest |
Executes self-test (normal/error-forcing modes) |
| SDL_CCM_injectError |
Injects a CCM error |
| SDL_CCM_getErrorType |
Gets the error type |
| SDL_CCM_clearError |
Clears the CCM error |