NMSIS-Core
Version 1.3.1
NMSIS-Core support for Nuclei processor-based devices
|
Functions that configure Instruction and Data Cache. More...
Modules | |
I-Cache Functions | |
Functions that configure Instruction Cache. | |
D-Cache Functions | |
Functions that configure Data Cache. | |
Data Structures | |
struct | CacheInfo |
Cache Information Type. More... | |
Macros | |
#define | CCM_SUEN_SUEN_Msk (0xFFFFFFFFFFFFFFFFUL) |
CSR CCM_SUEN: SUEN Mask. More... | |
Enumerations | |
enum | CCM_OP_FINFO { CCM_OP_SUCCESS = 0x0, CCM_OP_EXCEED_ERR = 0x1, CCM_OP_PERM_CHECK_ERR = 0x2, CCM_OP_REFILL_BUS_ERR = 0x3, CCM_OP_ECC_ERR = 0x4 } |
Cache CCM Operation Fail Info. More... | |
enum | CCM_CMD { CCM_DC_INVAL = 0x0, CCM_DC_WB = 0x1, CCM_DC_WBINVAL = 0x2, CCM_DC_LOCK = 0x3, CCM_DC_UNLOCK = 0x4, CCM_DC_WBINVAL_ALL = 0x6, CCM_DC_WB_ALL = 0x7, CCM_DC_INVAL_ALL = 0x17, CCM_IC_INVAL = 0x8, CCM_IC_LOCK = 0xb, CCM_IC_UNLOCK = 0xc, CCM_IC_INVAL_ALL = 0xd } |
Cache CCM Command Types. More... | |
Functions | |
__STATIC_FORCEINLINE void | EnableSUCCM (void) |
Enable CCM operation in Supervisor/User Mode. More... | |
__STATIC_FORCEINLINE void | DisableSUCCM (void) |
Disable CCM operation in Supervisor/User Mode. More... | |
__STATIC_FORCEINLINE void | FlushPipeCCM (void) |
Flush pipeline after CCM operation. More... | |
Functions that configure Instruction and Data Cache.
Nuclei provide Cache Control and Maintainence(CCM) for software to control and maintain the internal L1 I/D Cache of the RISC-V Core, software can manage the cache flexibly to meet the actual application scenarios.
The CCM operations have 3 types: by single address, by all and flush pipeline. The CCM operations are done via CSR registers, M/S/U mode has its own CSR registers to do CCM operations. By default, CCM operations are not allowed in S/U mode, you can execute EnableSUCCM in M-Mode to enable it.
#define CCM_SUEN_SUEN_Msk (0xFFFFFFFFFFFFFFFFUL) |
CSR CCM_SUEN: SUEN Mask.
Definition at line 109 of file core_feature_cache.h.
enum CCM_CMD |
Cache CCM Command Types.
Definition at line 81 of file core_feature_cache.h.
enum CCM_OP_FINFO |
Cache CCM Operation Fail Info.
Definition at line 70 of file core_feature_cache.h.
__STATIC_FORCEINLINE void DisableSUCCM | ( | void | ) |
Disable CCM operation in Supervisor/User Mode.
This function disable CCM operation in Supervisor/User Mode. If not enabled, CCM operations in supervisor/user mode will trigger a illegal intruction exception.
Definition at line 139 of file core_feature_cache.h.
References __RV_CSR_CLEAR, CCM_SUEN_SUEN_Msk, and CSR_CCM_SUEN.
__STATIC_FORCEINLINE void EnableSUCCM | ( | void | ) |
Enable CCM operation in Supervisor/User Mode.
This function enable CCM operation in Supervisor/User Mode. If enabled, CCM operations in supervisor/user mode will be allowed.
Definition at line 123 of file core_feature_cache.h.
References __RV_CSR_SET, CCM_SUEN_SUEN_Msk, and CSR_CCM_SUEN.
__STATIC_FORCEINLINE void FlushPipeCCM | ( | void | ) |
Flush pipeline after CCM operation.
This function is used to flush pipeline after CCM operations on Cache, it will ensure latest instructions or data can be seen by pipeline.
Definition at line 153 of file core_feature_cache.h.
References __RV_CSR_WRITE, and CSR_CCM_FPIPE.