![]() |
NMSIS-Core
Version 1.5.0
NMSIS-Core support for Nuclei processor-based devices
|
Functions that configure Cluster Cache by CCM. More...
Data Structures | |
| struct | SMPCC_CMD_Type |
| Cluster Cache Control and Command Registers. More... | |
Macros | |
| #define | SMPCC_CMD_CTRL_SUP_EN_Pos 9U |
| SMPCC_CMD CC_CTRL SUP_EN Position. More... | |
| #define | SMPCC_CMD_CTRL_SUP_EN_Msk (0x1UL << SMPCC_CMD_CTRL_SUP_EN_Pos) |
| SMPCC_CMD CC_CTRL SUP_EN Mask. More... | |
| #define | SMPCC_CMD_CTRL_SUP_EN_ENABLE 1U |
| SMPCC_CMD CC_CTRL SUP_EN Enable. More... | |
| #define | SMPCC_CMD_CTRL_SUP_EN_DISABLE 0U |
| SMPCC_CMD CC_CTRL SUP_EN Disable. More... | |
| #define | SMPCC_CMD_CTRL_USE_EN_Pos 10U |
| SMPCC_CMD CC_CTRL USE_EN Position. More... | |
| #define | SMPCC_CMD_CTRL_USE_EN_Msk (0x1UL << SMPCC_CMD_CTRL_USE_EN_Pos) |
| SMPCC_CMD CC_CTRL USE_EN Mask. More... | |
| #define | SMPCC_CMD_CTRL_USE_EN_ENABLE 1U |
| SMPCC_CMD CC_CTRL USE_EN Enable. More... | |
| #define | SMPCC_CMD_CTRL_USE_EN_DISABLE 0U |
| SMPCC_CMD CC_CTRL USE_EN Disable. More... | |
| #define | SMPCC_CMD_xCMD_CMD_Pos 0U |
| SMPCC_CMD register xCMD field CMD Position. More... | |
| #define | SMPCC_CMD_xCMD_CMD_Msk (0x1FUL << SMPCC_CMD_xCMD_CMD_Pos) |
| SMPCC_CMD register xCMD field CMD Mask. More... | |
| #define | SMPCC_CMD_xCMD_CMD_WB_ALL 0x7U |
| SMPCC_CMD xCMD CMD WB_ALL. More... | |
| #define | SMPCC_CMD_xCMD_CMD_WBINVAL_ALL 0x6U |
| SMPCC_CMD xCMD CMD WBINVAL_ALL. More... | |
| #define | SMPCC_CMD_xCMD_RESULT_Pos 26U |
| SMPCC_CMD xCMD RESULT Position. More... | |
| #define | SMPCC_CMD_xCMD_RESULT_Msk (0x1FUL << SMPCC_CMD_xCMD_RESULT_Pos) |
| SMPCC_CMD xCMD RESULT Mask. More... | |
| #define | SMPCC_CMD_xCMD_RESULT_SUCCESS 0x0U |
| SMPCC_CMD xCMD RESULT Success. More... | |
| #define | SMPCC_CMD_xCMD_RESULT_ENTRY_EXCEED_LIMIT 0x1U |
| SMPCC_CMD xCMD RESULT Exceed the upper entry num of lockable way. More... | |
| #define | SMPCC_CMD_xCMD_RESULT_REFILL_BUS_ERROR 0x3U |
| SMPCC_CMD xCMD RESULT Refill Bus Error. More... | |
| #define | SMPCC_CMD_xCMD_RESULT_ECC_ERROR 0x4U |
| SMPCC_CMD xCMD RESULT ECC Error. More... | |
| #define | SMPCC_CMD_xCMD_RESULT_CPBACK_BUS_ERROR 0x5U |
| SMPCC_CMD xCMD RESULT Copy Back Bus Error. More... | |
| #define | SMPCC_CMD_xCMD_COMPLETE_Pos 31U |
| SMPCC_CMD xCMD COMPLETE Position. More... | |
| #define | SMPCC_CMD_xCMD_COMPLETE_Msk (0x1UL << SMPCC_CMD_xCMD_COMPLETE_Pos) |
| SMPCC_CMD xCMD COMPLETE Mask. More... | |
| #define | SMPCC_CMD_INVALID_ALL_Pos 0U |
| SMPCC_CMD INVALID_ALL Position. More... | |
| #define | SMPCC_CMD_INVALID_ALL_Msk (0x1UL << SMPCC_CMD_INVALID_ALL_Pos) |
| SMPCC_CMD INVALID_ALL Mask. More... | |
| #define | SMPCC_CMD_BASE __SMPCC_BASEADDR |
| SMPCC CMD Base Address. More... | |
| #define | SMPCC_CMD ((SMPCC_CMD_Type *)SMPCC_CMD_BASE) |
| SMPCC CMD configuration struct. More... | |
| __STATIC_INLINE unsigned long | MLockCCacheLine (unsigned long addr) |
| Lock one Cluster Cache line specified by address in M-Mode. More... | |
| __STATIC_INLINE unsigned long | MLockCCacheLines (unsigned long addr, unsigned long cnt) |
| Lock several Cluster Cache lines specified by address in M-Mode. More... | |
| __STATIC_INLINE unsigned long | SLockCCacheLine (unsigned long addr) |
| Lock one Cluster Cache line specified by address in S-Mode. More... | |
| __STATIC_INLINE unsigned long | SLockCCacheLines (unsigned long addr, unsigned long cnt) |
| Lock several Cluster Cache lines specified by address in S-Mode. More... | |
| __STATIC_INLINE unsigned long | ULockCCacheLine (unsigned long addr) |
| Lock one Cluster Cache line specified by address in U-Mode. More... | |
| __STATIC_INLINE unsigned long | ULockCCacheLines (unsigned long addr, unsigned long cnt) |
| Lock several Cluster Cache lines specified by address in U-Mode. More... | |
| __STATIC_INLINE void | MUnlockCCacheLine (unsigned long addr) |
| Unlock one Cluster Cache line specified by address in M-Mode. More... | |
| __STATIC_INLINE void | MUnlockCCacheLines (unsigned long addr, unsigned long cnt) |
| Unlock several Cluster Cache lines specified by address in M-Mode. More... | |
| __STATIC_INLINE void | SUnlockCCacheLine (unsigned long addr) |
| Unlock one Cluster Cache line specified by address in S-Mode. More... | |
| __STATIC_INLINE void | SUnlockCCacheLines (unsigned long addr, unsigned long cnt) |
| Unlock several Cluster Cache lines specified by address in S-Mode. More... | |
| __STATIC_INLINE void | UUnlockCCacheLine (unsigned long addr) |
| Unlock one Cluster Cache line specified by address in U-Mode. More... | |
| __STATIC_INLINE void | UUnlockCCacheLines (unsigned long addr, unsigned long cnt) |
| Unlock several Cluster Cache lines specified by address in U-Mode. More... | |
Functions that configure Cluster Cache by CCM.
| #define SMPCC_CMD ((SMPCC_CMD_Type *)SMPCC_CMD_BASE) |
SMPCC CMD configuration struct.
Definition at line 109 of file core_feature_cache.h.
| #define SMPCC_CMD_BASE __SMPCC_BASEADDR |
SMPCC CMD Base Address.
Definition at line 108 of file core_feature_cache.h.
| #define SMPCC_CMD_CTRL_SUP_EN_DISABLE 0U |
SMPCC_CMD CC_CTRL SUP_EN Disable.
Definition at line 76 of file core_feature_cache.h.
| #define SMPCC_CMD_CTRL_SUP_EN_ENABLE 1U |
SMPCC_CMD CC_CTRL SUP_EN Enable.
Definition at line 75 of file core_feature_cache.h.
| #define SMPCC_CMD_CTRL_SUP_EN_Msk (0x1UL << SMPCC_CMD_CTRL_SUP_EN_Pos) |
SMPCC_CMD CC_CTRL SUP_EN Mask.
Definition at line 74 of file core_feature_cache.h.
| #define SMPCC_CMD_CTRL_SUP_EN_Pos 9U |
SMPCC_CMD CC_CTRL SUP_EN Position.
Definition at line 73 of file core_feature_cache.h.
| #define SMPCC_CMD_CTRL_USE_EN_DISABLE 0U |
SMPCC_CMD CC_CTRL USE_EN Disable.
Definition at line 81 of file core_feature_cache.h.
| #define SMPCC_CMD_CTRL_USE_EN_ENABLE 1U |
SMPCC_CMD CC_CTRL USE_EN Enable.
Definition at line 80 of file core_feature_cache.h.
| #define SMPCC_CMD_CTRL_USE_EN_Msk (0x1UL << SMPCC_CMD_CTRL_USE_EN_Pos) |
SMPCC_CMD CC_CTRL USE_EN Mask.
Definition at line 79 of file core_feature_cache.h.
| #define SMPCC_CMD_CTRL_USE_EN_Pos 10U |
SMPCC_CMD CC_CTRL USE_EN Position.
Definition at line 78 of file core_feature_cache.h.
| #define SMPCC_CMD_INVALID_ALL_Msk (0x1UL << SMPCC_CMD_INVALID_ALL_Pos) |
SMPCC_CMD INVALID_ALL Mask.
Definition at line 100 of file core_feature_cache.h.
| #define SMPCC_CMD_INVALID_ALL_Pos 0U |
SMPCC_CMD INVALID_ALL Position.
Definition at line 99 of file core_feature_cache.h.
| #define SMPCC_CMD_xCMD_CMD_Msk (0x1FUL << SMPCC_CMD_xCMD_CMD_Pos) |
SMPCC_CMD register xCMD field CMD Mask.
Definition at line 84 of file core_feature_cache.h.
| #define SMPCC_CMD_xCMD_CMD_Pos 0U |
SMPCC_CMD register xCMD field CMD Position.
Definition at line 83 of file core_feature_cache.h.
| #define SMPCC_CMD_xCMD_CMD_WB_ALL 0x7U |
SMPCC_CMD xCMD CMD WB_ALL.
Definition at line 85 of file core_feature_cache.h.
| #define SMPCC_CMD_xCMD_CMD_WBINVAL_ALL 0x6U |
SMPCC_CMD xCMD CMD WBINVAL_ALL.
Definition at line 86 of file core_feature_cache.h.
| #define SMPCC_CMD_xCMD_COMPLETE_Msk (0x1UL << SMPCC_CMD_xCMD_COMPLETE_Pos) |
SMPCC_CMD xCMD COMPLETE Mask.
Definition at line 97 of file core_feature_cache.h.
| #define SMPCC_CMD_xCMD_COMPLETE_Pos 31U |
SMPCC_CMD xCMD COMPLETE Position.
Definition at line 96 of file core_feature_cache.h.
| #define SMPCC_CMD_xCMD_RESULT_CPBACK_BUS_ERROR 0x5U |
SMPCC_CMD xCMD RESULT Copy Back Bus Error.
Definition at line 94 of file core_feature_cache.h.
| #define SMPCC_CMD_xCMD_RESULT_ECC_ERROR 0x4U |
SMPCC_CMD xCMD RESULT ECC Error.
Definition at line 93 of file core_feature_cache.h.
| #define SMPCC_CMD_xCMD_RESULT_ENTRY_EXCEED_LIMIT 0x1U |
SMPCC_CMD xCMD RESULT Exceed the upper entry num of lockable way.
Definition at line 91 of file core_feature_cache.h.
| #define SMPCC_CMD_xCMD_RESULT_Msk (0x1FUL << SMPCC_CMD_xCMD_RESULT_Pos) |
SMPCC_CMD xCMD RESULT Mask.
Definition at line 89 of file core_feature_cache.h.
| #define SMPCC_CMD_xCMD_RESULT_Pos 26U |
SMPCC_CMD xCMD RESULT Position.
Definition at line 88 of file core_feature_cache.h.
| #define SMPCC_CMD_xCMD_RESULT_REFILL_BUS_ERROR 0x3U |
SMPCC_CMD xCMD RESULT Refill Bus Error.
Definition at line 92 of file core_feature_cache.h.
| #define SMPCC_CMD_xCMD_RESULT_SUCCESS 0x0U |
SMPCC_CMD xCMD RESULT Success.
Definition at line 90 of file core_feature_cache.h.
| __STATIC_INLINE unsigned long MLockCCacheLine | ( | unsigned long | addr | ) |
Lock one Cluster Cache line specified by address in M-Mode.
This function lock one Cluster Cache line specified by the address. Command CCM_CC_LOCK is written to CSR CSR_CCM_MCOMMAND.
| [in] | addr | start address to be locked |
Definition at line 256 of file core_feature_cache.h.
References __RV_CSR_READ, __RV_CSR_WRITE, __RWMB, CCM_CC_LOCK, CSR_CCM_MBEGINADDR, CSR_CCM_MCOMMAND, CSR_CCM_MDATA, and FlushPipeCCM().
Referenced by SMPCC_CCacheDramErrInject(), SMPCC_CCacheErrRestore(), and SMPCC_CCacheTramErrInject().
| __STATIC_INLINE unsigned long MLockCCacheLines | ( | unsigned long | addr, |
| unsigned long | cnt | ||
| ) |
Lock several Cluster Cache lines specified by address in M-Mode.
This function lock several Cluster Cache lines specified by the address and line count. Command CCM_CC_LOCK is written to CSR CSR_CCM_MCOMMAND.
| [in] | addr | start address to be locked |
| [in] | cnt | count of cache lines to be locked |
Definition at line 277 of file core_feature_cache.h.
References __RV_CSR_READ, __RV_CSR_WRITE, __RWMB, CCM_CC_LOCK, CCM_OP_SUCCESS, CSR_CCM_MBEGINADDR, CSR_CCM_MCOMMAND, CSR_CCM_MDATA, and FlushPipeCCM().
| __STATIC_INLINE void MUnlockCCacheLine | ( | unsigned long | addr | ) |
Unlock one Cluster Cache line specified by address in M-Mode.
This function unlock one Cluster Cache line specified by the address. Command CCM_CC_UNLOCK is written to CSR CSR_CCM_MCOMMAND.
| [in] | addr | start address to be unlocked |
Definition at line 405 of file core_feature_cache.h.
References __RV_CSR_WRITE, __RWMB, CCM_CC_UNLOCK, CSR_CCM_MBEGINADDR, CSR_CCM_MCOMMAND, and FlushPipeCCM().
| __STATIC_INLINE void MUnlockCCacheLines | ( | unsigned long | addr, |
| unsigned long | cnt | ||
| ) |
Unlock several Cluster Cache lines specified by address in M-Mode.
This function unlock several Cluster Cache lines specified by the address and line count. Command CCM_CC_UNLOCK is written to CSR CSR_CCM_MCOMMAND.
| [in] | addr | start address to be unlocked |
| [in] | cnt | count of cache lines to be unlocked |
Definition at line 424 of file core_feature_cache.h.
References __RV_CSR_WRITE, __RWMB, CCM_CC_UNLOCK, CSR_CCM_MBEGINADDR, CSR_CCM_MCOMMAND, and FlushPipeCCM().
| __STATIC_INLINE unsigned long SLockCCacheLine | ( | unsigned long | addr | ) |
Lock one Cluster Cache line specified by address in S-Mode.
This function lock one Cluster Cache line specified by the address. Command CCM_CC_LOCK is written to CSR CSR_CCM_SCOMMAND.
| [in] | addr | start address to be locked |
Definition at line 306 of file core_feature_cache.h.
References __RV_CSR_READ, __RV_CSR_WRITE, __RWMB, CCM_CC_LOCK, CSR_CCM_SBEGINADDR, CSR_CCM_SCOMMAND, CSR_CCM_SDATA, and FlushPipeCCM().
| __STATIC_INLINE unsigned long SLockCCacheLines | ( | unsigned long | addr, |
| unsigned long | cnt | ||
| ) |
Lock several Cluster Cache lines specified by address in S-Mode.
This function lock several Cluster Cache lines specified by the address and line count. Command CCM_CC_LOCK is written to CSR CSR_CCM_SCOMMAND.
| [in] | addr | start address to be locked |
| [in] | cnt | count of cache lines to be locked |
Definition at line 327 of file core_feature_cache.h.
References __RV_CSR_READ, __RV_CSR_WRITE, __RWMB, CCM_CC_LOCK, CCM_OP_SUCCESS, CSR_CCM_SBEGINADDR, CSR_CCM_SCOMMAND, CSR_CCM_SDATA, and FlushPipeCCM().
| __STATIC_INLINE void SUnlockCCacheLine | ( | unsigned long | addr | ) |
Unlock one Cluster Cache line specified by address in S-Mode.
This function unlock one Cluster Cache line specified by the address. Command CCM_CC_UNLOCK is written to CSR CSR_CCM_SCOMMAND.
| [in] | addr | start address to be unlocked |
Definition at line 446 of file core_feature_cache.h.
References __RV_CSR_WRITE, __RWMB, CCM_CC_UNLOCK, CSR_CCM_SBEGINADDR, CSR_CCM_SCOMMAND, and FlushPipeCCM().
| __STATIC_INLINE void SUnlockCCacheLines | ( | unsigned long | addr, |
| unsigned long | cnt | ||
| ) |
Unlock several Cluster Cache lines specified by address in S-Mode.
This function unlock several Cluster Cache lines specified by the address and line count. Command CCM_CC_UNLOCK is written to CSR CSR_CCM_SCOMMAND.
| [in] | addr | start address to be unlocked |
| [in] | cnt | count of cache lines to be unlocked |
Definition at line 465 of file core_feature_cache.h.
References __RV_CSR_WRITE, __RWMB, CCM_CC_UNLOCK, CSR_CCM_SBEGINADDR, CSR_CCM_SCOMMAND, and FlushPipeCCM().
| __STATIC_INLINE unsigned long ULockCCacheLine | ( | unsigned long | addr | ) |
Lock one Cluster Cache line specified by address in U-Mode.
This function lock one Cluster Cache line specified by the address. Command CCM_CC_LOCK is written to CSR CSR_CCM_UCOMMAND.
| [in] | addr | start address to be locked |
Definition at line 356 of file core_feature_cache.h.
References __RV_CSR_READ, __RV_CSR_WRITE, __RWMB, CCM_CC_LOCK, CSR_CCM_UBEGINADDR, CSR_CCM_UCOMMAND, CSR_CCM_UDATA, and FlushPipeCCM().
| __STATIC_INLINE unsigned long ULockCCacheLines | ( | unsigned long | addr, |
| unsigned long | cnt | ||
| ) |
Lock several Cluster Cache lines specified by address in U-Mode.
This function lock several Cluster Cache lines specified by the address and line count. Command CCM_CC_LOCK is written to CSR CSR_CCM_UCOMMAND.
| [in] | addr | start address to be locked |
| [in] | cnt | count of cache lines to be locked |
Definition at line 377 of file core_feature_cache.h.
References __RV_CSR_READ, __RV_CSR_WRITE, __RWMB, CCM_CC_LOCK, CCM_OP_SUCCESS, CSR_CCM_UBEGINADDR, CSR_CCM_UCOMMAND, CSR_CCM_UDATA, and FlushPipeCCM().
| __STATIC_INLINE void UUnlockCCacheLine | ( | unsigned long | addr | ) |
Unlock one Cluster Cache line specified by address in U-Mode.
This function unlock one Cluster Cache line specified by the address. Command CCM_CC_UNLOCK is written to CSR CSR_CCM_UCOMMAND.
| [in] | addr | start address to be unlocked |
Definition at line 487 of file core_feature_cache.h.
References __RV_CSR_WRITE, __RWMB, CCM_CC_UNLOCK, CSR_CCM_UBEGINADDR, CSR_CCM_UCOMMAND, and FlushPipeCCM().
| __STATIC_INLINE void UUnlockCCacheLines | ( | unsigned long | addr, |
| unsigned long | cnt | ||
| ) |
Unlock several Cluster Cache lines specified by address in U-Mode.
This function unlock several Cluster Cache lines specified by the address and line count. Command CCM_CC_UNLOCK is written to CSR CSR_CCM_UCOMMAND.
| [in] | addr | start address to be unlocked |
| [in] | cnt | count of cache lines to be unlocked |
Definition at line 506 of file core_feature_cache.h.
References __RV_CSR_WRITE, __RWMB, CCM_CC_UNLOCK, CSR_CCM_UBEGINADDR, CSR_CCM_UCOMMAND, and FlushPipeCCM().