![]() |
NMSIS-Core
Version 1.6.0
NMSIS-Core support for Nuclei processor-based devices
|
Functions that related to the ECC feature. More...
Macros | |
| #define | ECC_ERROR_RAMID_MASK_ICACHE 1U |
| #define | ECC_ERROR_RAMID_MASK_DCACHE 2U |
| #define | ECC_ERROR_RAMID_MASK_TLB 4U |
| #define | ECC_ERROR_RAMID_MASK_ILM 8U |
| #define | ECC_ERROR_RAMID_MASK_DLM 16U |
Functions | |
| __STATIC_FORCEINLINE int32_t | ECC_IsGlobalSupportECC (void) |
| Check if the core globally supports ECC. More... | |
| __STATIC_FORCEINLINE int32_t | ECC_IsICacheSupportECC (void) |
| Check if I-Cache supports ECC. More... | |
| __STATIC_FORCEINLINE int32_t | ECC_IsDCacheSupportECC (void) |
| Check if D-Cache supports ECC. More... | |
| __STATIC_FORCEINLINE int32_t | ECC_IsTLBSupportECC (void) |
| Check if TLB supports ECC. More... | |
| __STATIC_FORCEINLINE int32_t | ECC_IsILMSupportECC (void) |
| Check if ILM supports ECC. More... | |
| __STATIC_FORCEINLINE int32_t | ECC_IsDLMSupportECC (void) |
| Check if DLM supports ECC. More... | |
| __STATIC_FORCEINLINE int32_t | ECC_IsXorErrorInjectMode (void) |
| Check if XOR error injection mode is supported. More... | |
| __STATIC_FORCEINLINE void | ECC_EnableICacheECC (void) |
| Enable ECC for I-Cache. More... | |
| __STATIC_FORCEINLINE void | ECC_DisableICacheECC (void) |
| Disable ECC for I-Cache. More... | |
| __STATIC_FORCEINLINE void | ECC_EnableICacheECCExcp (void) |
| Enable ECC exception for I-Cache. More... | |
| __STATIC_FORCEINLINE void | ECC_DisableICacheECCExcp (void) |
| Disable ECC exception for I-Cache. More... | |
| __STATIC_FORCEINLINE void | ECC_EnableICacheECCCheck (void) |
| Enable ECC checking for I-Cache. More... | |
| __STATIC_FORCEINLINE void | ECC_DisableICacheECCCheck (void) |
| Disable ECC checking for I-Cache. More... | |
| __STATIC_FORCEINLINE void | ECC_EnableDCacheECC (void) |
| Enable ECC for D-Cache. More... | |
| __STATIC_FORCEINLINE void | ECC_DisableDCacheECC (void) |
| Disable ECC for D-Cache. More... | |
| __STATIC_FORCEINLINE void | ECC_EnableDCacheECCExcp (void) |
| Enable ECC exception for D-Cache. More... | |
| __STATIC_FORCEINLINE void | ECC_DisableDCacheECCExcp (void) |
| Disable ECC exception for D-Cache. More... | |
| __STATIC_FORCEINLINE void | ECC_EnableDCacheECCCheck (void) |
| Enable ECC checking for D-Cache. More... | |
| __STATIC_FORCEINLINE void | ECC_DisableDCacheECCCheck (void) |
| Disable ECC checking for D-Cache. More... | |
| __STATIC_FORCEINLINE void | ECC_ICacheTRamErrInject (uint32_t ecc_code, void *addr) |
| Inject error into I-Cache Tag RAM. More... | |
| __STATIC_FORCEINLINE void | ECC_ICacheDRamErrInject (uint32_t ecc_code, void *addr) |
| Inject error into I-Cache Data RAM. More... | |
| __STATIC_FORCEINLINE void | ECC_ICacheErrRestore (void *addr) |
| Restore I-Cache error at specified address. More... | |
| __STATIC_FORCEINLINE void | ECC_DCacheTRamErrInject (uint32_t ecc_code, void *addr) |
| Inject error into D-Cache Tag RAM. More... | |
| __STATIC_FORCEINLINE void | ECC_DCacheDRamErrInject (uint32_t ecc_code, void *addr) |
| Inject error into D-Cache Data RAM. More... | |
| __STATIC_FORCEINLINE void | ECC_DCacheErrRestore (void *addr) |
| Restore D-Cache error at specified address. More... | |
| __STATIC_FORCEINLINE void | ECC_EnableILM (void) |
| Enable ILM. More... | |
| __STATIC_FORCEINLINE void | ECC_DisableILM (void) |
| Disable ILM. More... | |
| __STATIC_FORCEINLINE void | ECC_EnableILMECC (void) |
| Enable ECC for ILM. More... | |
| __STATIC_FORCEINLINE void | ECC_DisableILMECC (void) |
| Disable ECC for ILM. More... | |
| __STATIC_FORCEINLINE void | ECC_EnableILMECCExcp (void) |
| Enable ECC exception for ILM. More... | |
| __STATIC_FORCEINLINE void | ECC_DisableILMECCExcp (void) |
| Disable ECC exception for ILM. More... | |
| __STATIC_FORCEINLINE void | ECC_EnableILMECCCheck (void) |
| Enable ECC checking for ILM. More... | |
| __STATIC_FORCEINLINE void | ECC_DisableILMECCCheck (void) |
| Disable ECC checking for ILM. More... | |
| __STATIC_FORCEINLINE void | ECC_ILMErrInject (uint32_t ecc_code, void *addr) |
| Inject error into ILM. More... | |
| __STATIC_FORCEINLINE void | ECC_ILMErrRestore (void *addr) |
| Restore ILM error at specified address. More... | |
| __STATIC_FORCEINLINE void | ECC_EnableDLM (void) |
| Enable DLM. More... | |
| __STATIC_FORCEINLINE void | ECC_DisableDLM (void) |
| Disable DLM. More... | |
| __STATIC_FORCEINLINE void | ECC_EnableDLMECC (void) |
| Enable ECC for DLM. More... | |
| __STATIC_FORCEINLINE void | ECC_DisableDLMECC (void) |
| Disable ECC for DLM. More... | |
| __STATIC_FORCEINLINE void | ECC_EnableDLMECCExcp (void) |
| Enable ECC exception for DLM. More... | |
| __STATIC_FORCEINLINE void | ECC_DisableDLMECCExcp (void) |
| Disable ECC exception for DLM. More... | |
| __STATIC_FORCEINLINE void | ECC_EnableDLMECCCheck (void) |
| Enable ECC checking for DLM. More... | |
| __STATIC_FORCEINLINE void | ECC_DisableDLMECCCheck (void) |
| Disable ECC checking for DLM. More... | |
| __STATIC_FORCEINLINE void | ECC_DLMErrInject (uint32_t ecc_code, void *addr) |
| Inject error into DLM. More... | |
| __STATIC_FORCEINLINE void | ECC_DLMErrRestore (void *addr) |
| Restore DLM error at specified address. More... | |
| __STATIC_FORCEINLINE int32_t | ECC_IsAnySingleBitErrorOccured (void) |
| Check if any single-bit error has occurred. More... | |
| __STATIC_FORCEINLINE int32_t | ECC_IsICacheSingleBitErrorOccured (void) |
| Check if I-Cache single-bit error has occurred. More... | |
| __STATIC_FORCEINLINE int32_t | ECC_IsDCacheSingleBitErrorOccured (void) |
| Check if D-Cache single-bit error has occurred. More... | |
| __STATIC_FORCEINLINE int32_t | ECC_IsTLBSingleBitErrorOccured (void) |
| Check if TLB single-bit error has occurred. More... | |
| __STATIC_FORCEINLINE int32_t | ECC_IsILMSingleBitErrorOccured (void) |
| Check if ILM single-bit error has occurred. More... | |
| __STATIC_FORCEINLINE int32_t | ECC_IsDLMSingleBitErrorOccured (void) |
| Check if DLM single-bit error has occurred. More... | |
| __STATIC_FORCEINLINE void | ECC_ClearAllSingleBitError (void) |
| Clear all single-bit errors. More... | |
| __STATIC_FORCEINLINE void | ECC_ClearICacheSingleBitError (void) |
| Clear I-Cache single-bit error. More... | |
| __STATIC_FORCEINLINE void | ECC_ClearDCacheSingleBitError (void) |
| Clear D-Cache single-bit error. More... | |
| __STATIC_FORCEINLINE void | ECC_ClearTLBSingleBitError (void) |
| Clear TLB single-bit error. More... | |
| __STATIC_FORCEINLINE void | ECC_ClearILMSingleBitError (void) |
| Clear ILM single-bit error. More... | |
| __STATIC_FORCEINLINE void | ECC_ClearDLMSingleBitError (void) |
| Clear DLM single-bit error. More... | |
| __STATIC_FORCEINLINE int32_t | ECC_IsAnyDoubleBitErrorOccured (void) |
| Check if any double-bit error has occurred. More... | |
| __STATIC_FORCEINLINE int32_t | ECC_IsICacheDoubleBitErrorOccured (void) |
| Check if I-Cache double-bit error has occurred. More... | |
| __STATIC_FORCEINLINE int32_t | ECC_IsDCacheDoubleBitErrorOccured (void) |
| Check if D-Cache double-bit error has occurred. More... | |
| __STATIC_FORCEINLINE int32_t | ECC_IsTLBDoubleBitErrorOccured (void) |
| Check if TLB double-bit error has occurred. More... | |
| __STATIC_FORCEINLINE int32_t | ECC_IsILMDoubleBitErrorOccured (void) |
| Check if ILM double-bit error has occurred. More... | |
| __STATIC_FORCEINLINE int32_t | ECC_IsDLMDoubleBitErrorOccured (void) |
| Check if DLM double-bit error has occurred. More... | |
| __STATIC_FORCEINLINE void | ECC_ClearAllDoubleBitError (void) |
| Clear all double-bit errors. More... | |
| __STATIC_FORCEINLINE void | ECC_ClearICacheDoubleBitError (void) |
| Clear I-Cache double-bit error. More... | |
| __STATIC_FORCEINLINE void | ECC_ClearDCacheDoubleBitError (void) |
| Clear D-Cache double-bit error. More... | |
| __STATIC_FORCEINLINE void | ECC_ClearTLBDoubleBitError (void) |
| Clear TLB double-bit error. More... | |
| __STATIC_FORCEINLINE void | ECC_ClearILMDoubleBitError (void) |
| Clear ILM double-bit error. More... | |
| __STATIC_FORCEINLINE void | ECC_ClearDLMDoubleBitError (void) |
| Clear DLM double-bit error. More... | |
| static uint8_t | ECC_GenerateECCCodeU32 (uint32_t a) |
| Generate ECC code for a 32-bit value. More... | |
| static uint8_t | ECC_GenerateECCCodeU64 (uint64_t a) |
| Generate ECC code for a 64-bit value. More... | |
Functions that related to the ECC feature.
These functions provide access to the Error Correction Code (ECC) feature available in Nuclei N/NX processor cores. ECC is a memory protection mechanism that can detect and correct single-bit errors and detect double-bit errors in memory systems such as caches and local memories.
The ECC feature includes:
| #define ECC_ERROR_RAMID_MASK_DCACHE 2U |
Definition at line 652 of file core_feature_ecc.h.
| #define ECC_ERROR_RAMID_MASK_DLM 16U |
Definition at line 655 of file core_feature_ecc.h.
| #define ECC_ERROR_RAMID_MASK_ICACHE 1U |
Definition at line 651 of file core_feature_ecc.h.
| #define ECC_ERROR_RAMID_MASK_ILM 8U |
Definition at line 654 of file core_feature_ecc.h.
| #define ECC_ERROR_RAMID_MASK_TLB 4U |
Definition at line 653 of file core_feature_ecc.h.
| __STATIC_FORCEINLINE void ECC_ClearAllDoubleBitError | ( | void | ) |
Clear all double-bit errors.
This function clears all double-bit errors by clearing the appropriate bits in the machine ECC code CSR.
Definition at line 885 of file core_feature_ecc.h.
References __RV_CSR_CLEAR, CSR_MECC_CODE, and MECC_CODE_RAMID.
| __STATIC_FORCEINLINE void ECC_ClearAllSingleBitError | ( | void | ) |
Clear all single-bit errors.
This function clears all single-bit errors by clearing the appropriate bits in the machine ECC code CSR.
Definition at line 741 of file core_feature_ecc.h.
References __RV_CSR_CLEAR, CSR_MECC_CODE, and MECC_CODE_SRAMID.
| __STATIC_FORCEINLINE void ECC_ClearDCacheDoubleBitError | ( | void | ) |
Clear D-Cache double-bit error.
This function clears the double-bit error in the D-Cache by clearing the appropriate bits in the machine ECC code CSR.
Definition at line 907 of file core_feature_ecc.h.
References __RV_CSR_CLEAR, CSR_MECC_CODE, and MECC_CODE_RAMID_DC.
| __STATIC_FORCEINLINE void ECC_ClearDCacheSingleBitError | ( | void | ) |
Clear D-Cache single-bit error.
This function clears the single-bit error in the D-Cache by clearing the appropriate bits in the machine ECC code CSR.
Definition at line 763 of file core_feature_ecc.h.
References __RV_CSR_CLEAR, CSR_MECC_CODE, and MECC_CODE_SRAMID_DC.
| __STATIC_FORCEINLINE void ECC_ClearDLMDoubleBitError | ( | void | ) |
Clear DLM double-bit error.
This function clears the double-bit error in the DLM by clearing the appropriate bits in the machine ECC code CSR.
Definition at line 940 of file core_feature_ecc.h.
References __RV_CSR_CLEAR, CSR_MECC_CODE, and MECC_CODE_RAMID_DLM.
| __STATIC_FORCEINLINE void ECC_ClearDLMSingleBitError | ( | void | ) |
Clear DLM single-bit error.
This function clears the single-bit error in the DLM by clearing the appropriate bits in the machine ECC code CSR.
Definition at line 796 of file core_feature_ecc.h.
References __RV_CSR_CLEAR, CSR_MECC_CODE, and MECC_CODE_SRAMID_DLM.
| __STATIC_FORCEINLINE void ECC_ClearICacheDoubleBitError | ( | void | ) |
Clear I-Cache double-bit error.
This function clears the double-bit error in the I-Cache by clearing the appropriate bits in the machine ECC code CSR.
Definition at line 896 of file core_feature_ecc.h.
References __RV_CSR_CLEAR, CSR_MECC_CODE, and MECC_CODE_RAMID_IC.
| __STATIC_FORCEINLINE void ECC_ClearICacheSingleBitError | ( | void | ) |
Clear I-Cache single-bit error.
This function clears the single-bit error in the I-Cache by clearing the appropriate bits in the machine ECC code CSR.
Definition at line 752 of file core_feature_ecc.h.
References __RV_CSR_CLEAR, CSR_MECC_CODE, and MECC_CODE_SRAMID_IC.
| __STATIC_FORCEINLINE void ECC_ClearILMDoubleBitError | ( | void | ) |
Clear ILM double-bit error.
This function clears the double-bit error in the ILM by clearing the appropriate bits in the machine ECC code CSR.
Definition at line 929 of file core_feature_ecc.h.
References __RV_CSR_CLEAR, CSR_MECC_CODE, and MECC_CODE_RAMID_ILM.
| __STATIC_FORCEINLINE void ECC_ClearILMSingleBitError | ( | void | ) |
Clear ILM single-bit error.
This function clears the single-bit error in the ILM by clearing the appropriate bits in the machine ECC code CSR.
Definition at line 785 of file core_feature_ecc.h.
References __RV_CSR_CLEAR, CSR_MECC_CODE, and MECC_CODE_SRAMID_ILM.
| __STATIC_FORCEINLINE void ECC_ClearTLBDoubleBitError | ( | void | ) |
Clear TLB double-bit error.
This function clears the double-bit error in the TLB by clearing the appropriate bits in the machine ECC code CSR.
Definition at line 918 of file core_feature_ecc.h.
References __RV_CSR_CLEAR, CSR_MECC_CODE, and MECC_CODE_RAMID_TLB.
| __STATIC_FORCEINLINE void ECC_ClearTLBSingleBitError | ( | void | ) |
Clear TLB single-bit error.
This function clears the single-bit error in the TLB by clearing the appropriate bits in the machine ECC code CSR.
Definition at line 774 of file core_feature_ecc.h.
References __RV_CSR_CLEAR, CSR_MECC_CODE, and MECC_CODE_SRAMID_TLB.
| __STATIC_FORCEINLINE void ECC_DCacheDRamErrInject | ( | uint32_t | ecc_code, |
| void * | addr | ||
| ) |
Inject error into D-Cache Data RAM.
This function injects an error into the D-Cache Data RAM at the specified address with the given ECC code.
| [in] | ecc_code | ECC code to inject |
| [in] | addr | Address where error should be injected |
Definition at line 386 of file core_feature_ecc.h.
References __LW(), __RV_CSR_CLEAR, __RV_CSR_SET, __RV_CSR_WRITE, __RWMB, CSR_MCACHE_CTL, CSR_MECC_CODE, ECC_DisableDCacheECCCheck(), ECC_EnableDCacheECCCheck(), MCACHE_CTL_DC_DRAM_ECC_INJ_EN, and MFlushInvalDCacheLine().
| __STATIC_FORCEINLINE void ECC_DCacheErrRestore | ( | void * | addr | ) |
Restore D-Cache error at specified address.
This function restores the correct ECC code for the D-Cache line at the specified address.
| [in] | addr | Address to restore |
Definition at line 407 of file core_feature_ecc.h.
References ECC_DisableDCacheECCCheck(), ECC_EnableDCacheECCCheck(), MFlushInvalDCacheLine(), and MLockDCacheLine().
| __STATIC_FORCEINLINE void ECC_DCacheTRamErrInject | ( | uint32_t | ecc_code, |
| void * | addr | ||
| ) |
Inject error into D-Cache Tag RAM.
This function injects an error into the D-Cache Tag RAM at the specified address with the given ECC code.
| [in] | ecc_code | ECC code to inject |
| [in] | addr | Address where error should be injected |
Definition at line 363 of file core_feature_ecc.h.
References __LW(), __RV_CSR_CLEAR, __RV_CSR_SET, __RV_CSR_WRITE, __RWMB, CSR_MCACHE_CTL, CSR_MECC_CODE, ECC_DisableDCacheECCCheck(), ECC_EnableDCacheECCCheck(), MCACHE_CTL_DC_TRAM_ECC_INJ_EN, and MFlushInvalDCacheLine().
| __STATIC_FORCEINLINE void ECC_DisableDCacheECC | ( | void | ) |
Disable ECC for D-Cache.
This function disables ECC for the data cache by clearing the appropriate bit in the machine cache control CSR.
Definition at line 249 of file core_feature_ecc.h.
References __RV_CSR_CLEAR, CSR_MCACHE_CTL, and MCACHE_CTL_DC_ECC_EN.
| __STATIC_FORCEINLINE void ECC_DisableDCacheECCCheck | ( | void | ) |
Disable ECC checking for D-Cache.
This function disables ECC checking for the data cache by clearing the appropriate bit in the machine cache control CSR.
Definition at line 293 of file core_feature_ecc.h.
References __RV_CSR_CLEAR, CSR_MCACHE_CTL, and MCACHE_CTL_DC_ECC_CHK_EN.
Referenced by ECC_DCacheDRamErrInject(), ECC_DCacheErrRestore(), and ECC_DCacheTRamErrInject().
| __STATIC_FORCEINLINE void ECC_DisableDCacheECCExcp | ( | void | ) |
Disable ECC exception for D-Cache.
This function disables ECC exception for the data cache by clearing the appropriate bit in the machine cache control CSR.
Definition at line 271 of file core_feature_ecc.h.
References __RV_CSR_CLEAR, CSR_MCACHE_CTL, and MCACHE_CTL_DC_ECC_EXCP_EN.
| __STATIC_FORCEINLINE void ECC_DisableDLM | ( | void | ) |
Disable DLM.
This function disables DLM by clearing the appropriate bit in the machine DLM control CSR.
Definition at line 549 of file core_feature_ecc.h.
References __RV_CSR_CLEAR, CSR_MDLM_CTL, and MDLM_CTL_DLM_EN.
| __STATIC_FORCEINLINE void ECC_DisableDLMECC | ( | void | ) |
Disable ECC for DLM.
This function disables ECC for DLM by clearing the appropriate bit in the machine DLM control CSR.
Definition at line 569 of file core_feature_ecc.h.
References __RV_CSR_CLEAR, CSR_MDLM_CTL, and MDLM_CTL_DLM_ECC_EN.
| __STATIC_FORCEINLINE void ECC_DisableDLMECCCheck | ( | void | ) |
Disable ECC checking for DLM.
This function disables ECC checking for DLM by clearing the appropriate bit in the machine DLM control CSR.
Definition at line 609 of file core_feature_ecc.h.
References __RV_CSR_CLEAR, CSR_MDLM_CTL, and MDLM_CTL_DLM_ECC_CHK_EN.
Referenced by ECC_DLMErrInject(), and ECC_DLMErrRestore().
| __STATIC_FORCEINLINE void ECC_DisableDLMECCExcp | ( | void | ) |
Disable ECC exception for DLM.
This function disables ECC exception for DLM by clearing the appropriate bit in the machine DLM control CSR.
Definition at line 589 of file core_feature_ecc.h.
References __RV_CSR_CLEAR, CSR_MDLM_CTL, and MDLM_CTL_DLM_ECC_EXCP_EN.
| __STATIC_FORCEINLINE void ECC_DisableICacheECC | ( | void | ) |
Disable ECC for I-Cache.
This function disables ECC for the instruction cache by clearing the appropriate bit in the machine cache control CSR.
Definition at line 183 of file core_feature_ecc.h.
References __RV_CSR_CLEAR, CSR_MCACHE_CTL, and MCACHE_CTL_IC_ECC_EN.
| __STATIC_FORCEINLINE void ECC_DisableICacheECCCheck | ( | void | ) |
Disable ECC checking for I-Cache.
This function disables ECC checking for the instruction cache by clearing the appropriate bit in the machine cache control CSR.
Definition at line 227 of file core_feature_ecc.h.
References __RV_CSR_CLEAR, CSR_MCACHE_CTL, and MCACHE_CTL_IC_ECC_CHK_EN.
| __STATIC_FORCEINLINE void ECC_DisableICacheECCExcp | ( | void | ) |
Disable ECC exception for I-Cache.
This function disables ECC exception for the instruction cache by clearing the appropriate bit in the machine cache control CSR.
Definition at line 205 of file core_feature_ecc.h.
References __RV_CSR_CLEAR, CSR_MCACHE_CTL, and MCACHE_CTL_IC_ECC_EXCP_EN.
| __STATIC_FORCEINLINE void ECC_DisableILM | ( | void | ) |
Disable ILM.
This function disables ILM by clearing the appropriate bit in the machine ILM control CSR.
Definition at line 432 of file core_feature_ecc.h.
References __RV_CSR_CLEAR, CSR_MILM_CTL, and MILM_CTL_ILM_EN.
| __STATIC_FORCEINLINE void ECC_DisableILMECC | ( | void | ) |
Disable ECC for ILM.
This function disables ECC for ILM by clearing the appropriate bit in the machine ILM control CSR.
Definition at line 452 of file core_feature_ecc.h.
References __RV_CSR_CLEAR, CSR_MILM_CTL, and MILM_CTL_ILM_ECC_EN.
| __STATIC_FORCEINLINE void ECC_DisableILMECCCheck | ( | void | ) |
Disable ECC checking for ILM.
This function disables ECC checking for ILM by clearing the appropriate bit in the machine ILM control CSR.
Definition at line 492 of file core_feature_ecc.h.
References __RV_CSR_CLEAR, CSR_MILM_CTL, and MILM_CTL_ILM_ECC_CHK_EN.
Referenced by ECC_ILMErrInject(), and ECC_ILMErrRestore().
| __STATIC_FORCEINLINE void ECC_DisableILMECCExcp | ( | void | ) |
Disable ECC exception for ILM.
This function disables ECC exception for ILM by clearing the appropriate bit in the machine ILM control CSR.
Definition at line 472 of file core_feature_ecc.h.
References __RV_CSR_CLEAR, CSR_MILM_CTL, and MILM_CTL_ILM_ECC_EXCP_EN.
| __STATIC_FORCEINLINE void ECC_DLMErrInject | ( | uint32_t | ecc_code, |
| void * | addr | ||
| ) |
Inject error into DLM.
This function injects an error into the DLM at the specified address with the given ECC code.
| [in] | ecc_code | ECC code to inject |
| [in] | addr | Address where error should be injected |
Definition at line 621 of file core_feature_ecc.h.
References __LW(), __RV_CSR_CLEAR, __RV_CSR_SET, __RV_CSR_WRITE, __RWMB, __SW(), CSR_MDLM_CTL, CSR_MECC_CODE, ECC_DisableDLMECCCheck(), ECC_EnableDLMECCCheck(), and MDLM_CTL_DLM_ECC_INJ_EN.
| __STATIC_FORCEINLINE void ECC_DLMErrRestore | ( | void * | addr | ) |
Restore DLM error at specified address.
This function restores the correct ECC code for the DLM at the specified address.
| [in] | addr | Address to restore |
Definition at line 642 of file core_feature_ecc.h.
References __LW(), __RWMB, __SW(), ECC_DisableDLMECCCheck(), and ECC_EnableDLMECCCheck().
| __STATIC_FORCEINLINE void ECC_EnableDCacheECC | ( | void | ) |
Enable ECC for D-Cache.
This function enables ECC for the data cache by setting the appropriate bit in the machine cache control CSR.
Definition at line 238 of file core_feature_ecc.h.
References __RV_CSR_SET, CSR_MCACHE_CTL, and MCACHE_CTL_DC_ECC_EN.
| __STATIC_FORCEINLINE void ECC_EnableDCacheECCCheck | ( | void | ) |
Enable ECC checking for D-Cache.
This function enables ECC checking for the data cache by setting the appropriate bit in the machine cache control CSR.
Definition at line 282 of file core_feature_ecc.h.
References __RV_CSR_SET, CSR_MCACHE_CTL, and MCACHE_CTL_DC_ECC_CHK_EN.
Referenced by ECC_DCacheDRamErrInject(), ECC_DCacheErrRestore(), and ECC_DCacheTRamErrInject().
| __STATIC_FORCEINLINE void ECC_EnableDCacheECCExcp | ( | void | ) |
Enable ECC exception for D-Cache.
This function enables ECC exception for the data cache by setting the appropriate bit in the machine cache control CSR.
Definition at line 260 of file core_feature_ecc.h.
References __RV_CSR_SET, CSR_MCACHE_CTL, and MCACHE_CTL_DC_ECC_EXCP_EN.
| __STATIC_FORCEINLINE void ECC_EnableDLM | ( | void | ) |
Enable DLM.
This function enables DLM by setting the appropriate bit in the machine DLM control CSR.
Definition at line 539 of file core_feature_ecc.h.
References __RV_CSR_SET, CSR_MDLM_CTL, and MDLM_CTL_DLM_EN.
| __STATIC_FORCEINLINE void ECC_EnableDLMECC | ( | void | ) |
Enable ECC for DLM.
This function enables ECC for DLM by setting the appropriate bit in the machine DLM control CSR.
Definition at line 559 of file core_feature_ecc.h.
References __RV_CSR_SET, CSR_MDLM_CTL, and MDLM_CTL_DLM_ECC_EN.
| __STATIC_FORCEINLINE void ECC_EnableDLMECCCheck | ( | void | ) |
Enable ECC checking for DLM.
This function enables ECC checking for DLM by setting the appropriate bit in the machine DLM control CSR.
Definition at line 599 of file core_feature_ecc.h.
References __RV_CSR_SET, CSR_MDLM_CTL, and MDLM_CTL_DLM_ECC_CHK_EN.
Referenced by ECC_DLMErrInject(), and ECC_DLMErrRestore().
| __STATIC_FORCEINLINE void ECC_EnableDLMECCExcp | ( | void | ) |
Enable ECC exception for DLM.
This function enables ECC exception for DLM by setting the appropriate bit in the machine DLM control CSR.
Definition at line 579 of file core_feature_ecc.h.
References __RV_CSR_SET, CSR_MDLM_CTL, and MDLM_CTL_DLM_ECC_EXCP_EN.
| __STATIC_FORCEINLINE void ECC_EnableICacheECC | ( | void | ) |
Enable ECC for I-Cache.
This function enables ECC for the instruction cache by setting the appropriate bit in the machine cache control CSR.
Definition at line 172 of file core_feature_ecc.h.
References __RV_CSR_SET, CSR_MCACHE_CTL, and MCACHE_CTL_IC_ECC_EN.
| __STATIC_FORCEINLINE void ECC_EnableICacheECCCheck | ( | void | ) |
Enable ECC checking for I-Cache.
This function enables ECC checking for the instruction cache by setting the appropriate bit in the machine cache control CSR.
Definition at line 216 of file core_feature_ecc.h.
References __RV_CSR_SET, CSR_MCACHE_CTL, and MCACHE_CTL_IC_ECC_CHK_EN.
| __STATIC_FORCEINLINE void ECC_EnableICacheECCExcp | ( | void | ) |
Enable ECC exception for I-Cache.
This function enables ECC exception for the instruction cache by setting the appropriate bit in the machine cache control CSR.
Definition at line 194 of file core_feature_ecc.h.
References __RV_CSR_SET, CSR_MCACHE_CTL, and MCACHE_CTL_IC_ECC_EXCP_EN.
| __STATIC_FORCEINLINE void ECC_EnableILM | ( | void | ) |
Enable ILM.
This function enables ILM by setting the appropriate bit in the machine ILM control CSR.
Definition at line 422 of file core_feature_ecc.h.
References __RV_CSR_SET, CSR_MILM_CTL, and MILM_CTL_ILM_EN.
| __STATIC_FORCEINLINE void ECC_EnableILMECC | ( | void | ) |
Enable ECC for ILM.
This function enables ECC for ILM by setting the appropriate bit in the machine ILM control CSR.
Definition at line 442 of file core_feature_ecc.h.
References __RV_CSR_SET, CSR_MILM_CTL, and MILM_CTL_ILM_ECC_EN.
| __STATIC_FORCEINLINE void ECC_EnableILMECCCheck | ( | void | ) |
Enable ECC checking for ILM.
This function enables ECC checking for ILM by setting the appropriate bit in the machine ILM control CSR.
Definition at line 482 of file core_feature_ecc.h.
References __RV_CSR_SET, CSR_MILM_CTL, and MILM_CTL_ILM_ECC_CHK_EN.
Referenced by ECC_ILMErrInject(), and ECC_ILMErrRestore().
| __STATIC_FORCEINLINE void ECC_EnableILMECCExcp | ( | void | ) |
Enable ECC exception for ILM.
This function enables ECC exception for ILM by setting the appropriate bit in the machine ILM control CSR.
Definition at line 462 of file core_feature_ecc.h.
References __RV_CSR_SET, CSR_MILM_CTL, and MILM_CTL_ILM_ECC_EXCP_EN.
|
static |
Generate ECC code for a 32-bit value.
This function calculates the ECC code for a 32-bit input value using Hamming code algorithm. It generates a 7-bit ECC code that can be used to detect and correct single-bit errors and detect double-bit errors.
| [in] | a | 32-bit value for which ECC code is to be generated |
Definition at line 954 of file core_feature_ecc.h.
|
static |
Generate ECC code for a 64-bit value.
This function calculates the ECC for a 64-bit input value using Hamming code algorithm. It generates an 8-bit ECC code that can be used to detect and correct single-bit errors and detect double-bit errors.
| [in] | a | 64-bit value for which ECC code is to be generated |
Definition at line 999 of file core_feature_ecc.h.
| __STATIC_FORCEINLINE void ECC_ICacheDRamErrInject | ( | uint32_t | ecc_code, |
| void * | addr | ||
| ) |
Inject error into I-Cache Data RAM.
This function injects an error into the I-Cache Data RAM at the specified address with the given ECC code.
| [in] | ecc_code | ECC code to inject |
| [in] | addr | Address where error should be injected |
Definition at line 328 of file core_feature_ecc.h.
References __RV_CSR_CLEAR, __RV_CSR_SET, __RV_CSR_WRITE, __RWMB, CSR_MCACHE_CTL, CSR_MECC_CODE, MCACHE_CTL_IC_DRAM_ECC_INJ_EN, MInvalICacheLine(), and MLockICacheLine().
| __STATIC_FORCEINLINE void ECC_ICacheErrRestore | ( | void * | addr | ) |
Restore I-Cache error at specified address.
This function restores the correct ECC code for the I-Cache line at the specified address.
| [in] | addr | Address to restore |
Definition at line 346 of file core_feature_ecc.h.
References MInvalICacheLine(), and MLockICacheLine().
| __STATIC_FORCEINLINE void ECC_ICacheTRamErrInject | ( | uint32_t | ecc_code, |
| void * | addr | ||
| ) |
Inject error into I-Cache Tag RAM.
This function injects an error into the I-Cache Tag RAM at the specified address with the given ECC code.
| [in] | ecc_code | ECC code to inject |
| [in] | addr | Address where error should be injected |
Definition at line 308 of file core_feature_ecc.h.
References __RV_CSR_CLEAR, __RV_CSR_SET, __RV_CSR_WRITE, __RWMB, CSR_MCACHE_CTL, CSR_MECC_CODE, MCACHE_CTL_IC_TRAM_ECC_INJ_EN, MInvalICacheLine(), and MLockICacheLine().
| __STATIC_FORCEINLINE void ECC_ILMErrInject | ( | uint32_t | ecc_code, |
| void * | addr | ||
| ) |
Inject error into ILM.
This function injects an error into the ILM at the specified address with the given ECC code.
| [in] | ecc_code | ECC code to inject |
| [in] | addr | Address where error should be injected |
Definition at line 504 of file core_feature_ecc.h.
References __LW(), __RV_CSR_CLEAR, __RV_CSR_SET, __RV_CSR_WRITE, __RWMB, __SW(), CSR_MECC_CODE, CSR_MILM_CTL, ECC_DisableILMECCCheck(), ECC_EnableILMECCCheck(), and MILM_CTL_ILM_ECC_INJ_EN.
| __STATIC_FORCEINLINE void ECC_ILMErrRestore | ( | void * | addr | ) |
Restore ILM error at specified address.
This function restores the correct ECC code for the ILM at the specified address.
| [in] | addr | Address to restore |
Definition at line 525 of file core_feature_ecc.h.
References __LW(), __RWMB, __SW(), ECC_DisableILMECCCheck(), and ECC_EnableILMECCCheck().
| __STATIC_FORCEINLINE int32_t ECC_IsAnyDoubleBitErrorOccured | ( | void | ) |
Check if any double-bit error has occurred.
This function checks if any double-bit error has occurred by reading the machine ECC code CSR.
Definition at line 807 of file core_feature_ecc.h.
References __RV_CSR_READ, CSR_MECCCODE_Type::b, CSR_MECC_CODE, CSR_MECCCODE_Type::d, and CSR_MECCCODE_Type::ramid.
| __STATIC_FORCEINLINE int32_t ECC_IsAnySingleBitErrorOccured | ( | void | ) |
Check if any single-bit error has occurred.
This function checks if any single-bit error has occurred by reading the machine ECC code CSR.
Definition at line 663 of file core_feature_ecc.h.
References __RV_CSR_READ, CSR_MECCCODE_Type::b, CSR_MECC_CODE, CSR_MECCCODE_Type::d, and CSR_MECCCODE_Type::sramid.
| __STATIC_FORCEINLINE int32_t ECC_IsDCacheDoubleBitErrorOccured | ( | void | ) |
Check if D-Cache double-bit error has occurred.
This function checks if a double-bit error has occurred in the D-Cache.
Definition at line 833 of file core_feature_ecc.h.
References __RV_CSR_READ, CSR_MECCCODE_Type::b, CSR_MECC_CODE, CSR_MECCCODE_Type::d, ECC_ERROR_RAMID_MASK_DCACHE, and CSR_MECCCODE_Type::ramid.
| __STATIC_FORCEINLINE int32_t ECC_IsDCacheSingleBitErrorOccured | ( | void | ) |
Check if D-Cache single-bit error has occurred.
This function checks if a single-bit error has occurred in the D-Cache.
Definition at line 689 of file core_feature_ecc.h.
References __RV_CSR_READ, CSR_MECCCODE_Type::b, CSR_MECC_CODE, CSR_MECCCODE_Type::d, ECC_ERROR_RAMID_MASK_DCACHE, and CSR_MECCCODE_Type::sramid.
| __STATIC_FORCEINLINE int32_t ECC_IsDCacheSupportECC | ( | void | ) |
Check if D-Cache supports ECC.
This function checks if both D-Cache and ECC are supported in the core.
Definition at line 101 of file core_feature_ecc.h.
References __RV_CSR_READ, CSR_MCFGINFO_Type::b, CSR_MDCFGINFO_Type::b, CSR_MCFG_INFO, CSR_MDCFG_INFO, CSR_MCFGINFO_Type::d, CSR_MDCFGINFO_Type::d, CSR_MCFGINFO_Type::dcache, and CSR_MDCFGINFO_Type::ecc.
| __STATIC_FORCEINLINE int32_t ECC_IsDLMDoubleBitErrorOccured | ( | void | ) |
Check if DLM double-bit error has occurred.
This function checks if a double-bit error has occurred in the DLM.
Definition at line 872 of file core_feature_ecc.h.
References __RV_CSR_READ, CSR_MECCCODE_Type::b, CSR_MECC_CODE, CSR_MECCCODE_Type::d, ECC_ERROR_RAMID_MASK_DLM, and CSR_MECCCODE_Type::ramid.
| __STATIC_FORCEINLINE int32_t ECC_IsDLMSingleBitErrorOccured | ( | void | ) |
Check if DLM single-bit error has occurred.
This function checks if a single-bit error has occurred in the DLM.
Definition at line 728 of file core_feature_ecc.h.
References __RV_CSR_READ, CSR_MECCCODE_Type::b, CSR_MECC_CODE, CSR_MECCCODE_Type::d, ECC_ERROR_RAMID_MASK_DLM, and CSR_MECCCODE_Type::sramid.
| __STATIC_FORCEINLINE int32_t ECC_IsDLMSupportECC | ( | void | ) |
Check if DLM supports ECC.
This function checks if both DLM and ECC are supported in the core.
Definition at line 144 of file core_feature_ecc.h.
References __RV_CSR_READ, CSR_MCFGINFO_Type::b, CSR_MDCFGINFO_Type::b, CSR_MCFG_INFO, CSR_MDCFG_INFO, CSR_MCFGINFO_Type::d, CSR_MDCFGINFO_Type::d, CSR_MCFGINFO_Type::dlm, and CSR_MDCFGINFO_Type::lm_ecc.
| __STATIC_FORCEINLINE int32_t ECC_IsGlobalSupportECC | ( | void | ) |
Check if the core globally supports ECC.
This function reads the machine configuration info CSR and checks if ECC is supported globally in the core.
Definition at line 73 of file core_feature_ecc.h.
References __RV_CSR_READ, CSR_MCFGINFO_Type::b, CSR_MCFG_INFO, CSR_MCFGINFO_Type::d, and CSR_MCFGINFO_Type::ecc.
| __STATIC_FORCEINLINE int32_t ECC_IsICacheDoubleBitErrorOccured | ( | void | ) |
Check if I-Cache double-bit error has occurred.
This function checks if a double-bit error has occurred in the I-Cache.
Definition at line 820 of file core_feature_ecc.h.
References __RV_CSR_READ, CSR_MECCCODE_Type::b, CSR_MECC_CODE, CSR_MECCCODE_Type::d, ECC_ERROR_RAMID_MASK_ICACHE, and CSR_MECCCODE_Type::ramid.
| __STATIC_FORCEINLINE int32_t ECC_IsICacheSingleBitErrorOccured | ( | void | ) |
Check if I-Cache single-bit error has occurred.
This function checks if a single-bit error has occurred in the I-Cache.
Definition at line 676 of file core_feature_ecc.h.
References __RV_CSR_READ, CSR_MECCCODE_Type::b, CSR_MECC_CODE, CSR_MECCCODE_Type::d, ECC_ERROR_RAMID_MASK_ICACHE, and CSR_MECCCODE_Type::sramid.
| __STATIC_FORCEINLINE int32_t ECC_IsICacheSupportECC | ( | void | ) |
Check if I-Cache supports ECC.
This function checks if both I-Cache and ECC are supported in the core.
Definition at line 86 of file core_feature_ecc.h.
References __RV_CSR_READ, CSR_MCFGINFO_Type::b, CSR_MICFGINFO_Type::b, CSR_MCFG_INFO, CSR_MICFG_INFO, CSR_MCFGINFO_Type::d, CSR_MICFGINFO_Type::d, CSR_MICFGINFO_Type::ecc, and CSR_MCFGINFO_Type::icache.
| __STATIC_FORCEINLINE int32_t ECC_IsILMDoubleBitErrorOccured | ( | void | ) |
Check if ILM double-bit error has occurred.
This function checks if a double-bit error has occurred in the ILM.
Definition at line 859 of file core_feature_ecc.h.
References __RV_CSR_READ, CSR_MECCCODE_Type::b, CSR_MECC_CODE, CSR_MECCCODE_Type::d, ECC_ERROR_RAMID_MASK_ILM, and CSR_MECCCODE_Type::ramid.
| __STATIC_FORCEINLINE int32_t ECC_IsILMSingleBitErrorOccured | ( | void | ) |
Check if ILM single-bit error has occurred.
This function checks if a single-bit error has occurred in the ILM.
Definition at line 715 of file core_feature_ecc.h.
References __RV_CSR_READ, CSR_MECCCODE_Type::b, CSR_MECC_CODE, CSR_MECCCODE_Type::d, ECC_ERROR_RAMID_MASK_ILM, and CSR_MECCCODE_Type::sramid.
| __STATIC_FORCEINLINE int32_t ECC_IsILMSupportECC | ( | void | ) |
Check if ILM supports ECC.
This function checks if both ILM and ECC are supported in the core.
Definition at line 129 of file core_feature_ecc.h.
References __RV_CSR_READ, CSR_MCFGINFO_Type::b, CSR_MICFGINFO_Type::b, CSR_MCFG_INFO, CSR_MICFG_INFO, CSR_MCFGINFO_Type::d, CSR_MICFGINFO_Type::d, CSR_MCFGINFO_Type::ilm, and CSR_MICFGINFO_Type::lm_ecc.
| __STATIC_FORCEINLINE int32_t ECC_IsTLBDoubleBitErrorOccured | ( | void | ) |
Check if TLB double-bit error has occurred.
This function checks if a double-bit error has occurred in the TLB.
Definition at line 846 of file core_feature_ecc.h.
References __RV_CSR_READ, CSR_MECCCODE_Type::b, CSR_MECC_CODE, CSR_MECCCODE_Type::d, ECC_ERROR_RAMID_MASK_TLB, and CSR_MECCCODE_Type::ramid.
| __STATIC_FORCEINLINE int32_t ECC_IsTLBSingleBitErrorOccured | ( | void | ) |
Check if TLB single-bit error has occurred.
This function checks if a single-bit error has occurred in the TLB.
Definition at line 702 of file core_feature_ecc.h.
References __RV_CSR_READ, CSR_MECCCODE_Type::b, CSR_MECC_CODE, CSR_MECCCODE_Type::d, ECC_ERROR_RAMID_MASK_TLB, and CSR_MECCCODE_Type::sramid.
| __STATIC_FORCEINLINE int32_t ECC_IsTLBSupportECC | ( | void | ) |
Check if TLB supports ECC.
This function checks if TLB ECC is supported in the core.
Definition at line 116 of file core_feature_ecc.h.
References __RV_CSR_READ, CSR_MTLBCFGINFO_Type::b, CSR_MTLBCFG_INFO, CSR_MTLBCFGINFO_Type::d, and CSR_MTLBCFGINFO_Type::ecc.
| __STATIC_FORCEINLINE int32_t ECC_IsXorErrorInjectMode | ( | void | ) |
Check if XOR error injection mode is supported.
This function reads the machine ECC code CSR and checks if error injection mode is supported.
Definition at line 159 of file core_feature_ecc.h.
References __RV_CSR_READ, CSR_MECCCODE_Type::b, CSR_MECC_CODE, CSR_MECCCODE_Type::d, and CSR_MECCCODE_Type::ecc_inj_mode.