NMSIS-Core
Version 1.3.1
NMSIS-Core support for Nuclei processor-based devices
|
Functions that configure Instruction Cache. More...
Functions | |
__STATIC_FORCEINLINE int32_t | ICachePresent (void) |
Check ICache Unit Present or Not. More... | |
__STATIC_FORCEINLINE void | EnableICache (void) |
Enable ICache. More... | |
__STATIC_FORCEINLINE void | DisableICache (void) |
Disable ICache. More... | |
__STATIC_FORCEINLINE void | EnableICacheECC (void) |
Enable ICache ECC. More... | |
__STATIC_FORCEINLINE void | DisableICacheECC (void) |
Disable ICache ECC. More... | |
__STATIC_FORCEINLINE int32_t | GetICacheInfo (CacheInfo_Type *info) |
Get I-Cache Information. More... | |
__STATIC_FORCEINLINE void | MInvalICacheLine (unsigned long addr) |
Invalidate one I-Cache line specified by address in M-Mode. More... | |
__STATIC_FORCEINLINE void | MInvalICacheLines (unsigned long addr, unsigned long cnt) |
Invalidate several I-Cache lines specified by address in M-Mode. More... | |
__STATIC_FORCEINLINE void | SInvalICacheLine (unsigned long addr) |
Invalidate one I-Cache line specified by address in S-Mode. More... | |
__STATIC_FORCEINLINE void | SInvalICacheLines (unsigned long addr, unsigned long cnt) |
Invalidate several I-Cache lines specified by address in S-Mode. More... | |
__STATIC_FORCEINLINE void | UInvalICacheLine (unsigned long addr) |
Invalidate one I-Cache line specified by address in U-Mode. More... | |
__STATIC_FORCEINLINE void | UInvalICacheLines (unsigned long addr, unsigned long cnt) |
Invalidate several I-Cache lines specified by address in U-Mode. More... | |
__STATIC_FORCEINLINE unsigned long | MLockICacheLine (unsigned long addr) |
Lock one I-Cache line specified by address in M-Mode. More... | |
__STATIC_FORCEINLINE unsigned long | MLockICacheLines (unsigned long addr, unsigned long cnt) |
Lock several I-Cache lines specified by address in M-Mode. More... | |
__STATIC_FORCEINLINE unsigned long | SLockICacheLine (unsigned long addr) |
Lock one I-Cache line specified by address in S-Mode. More... | |
__STATIC_FORCEINLINE unsigned long | SLockICacheLines (unsigned long addr, unsigned long cnt) |
Lock several I-Cache lines specified by address in S-Mode. More... | |
__STATIC_FORCEINLINE unsigned long | ULockICacheLine (unsigned long addr) |
Lock one I-Cache line specified by address in U-Mode. More... | |
__STATIC_FORCEINLINE unsigned long | ULockICacheLines (unsigned long addr, unsigned long cnt) |
Lock several I-Cache lines specified by address in U-Mode. More... | |
__STATIC_FORCEINLINE void | MUnlockICacheLine (unsigned long addr) |
Unlock one I-Cache line specified by address in M-Mode. More... | |
__STATIC_FORCEINLINE void | MUnlockICacheLines (unsigned long addr, unsigned long cnt) |
Unlock several I-Cache lines specified by address in M-Mode. More... | |
__STATIC_FORCEINLINE void | SUnlockICacheLine (unsigned long addr) |
Unlock one I-Cache line specified by address in S-Mode. More... | |
__STATIC_FORCEINLINE void | SUnlockICacheLines (unsigned long addr, unsigned long cnt) |
Unlock several I-Cache lines specified by address in S-Mode. More... | |
__STATIC_FORCEINLINE void | UUnlockICacheLine (unsigned long addr) |
Unlock one I-Cache line specified by address in U-Mode. More... | |
__STATIC_FORCEINLINE void | UUnlockICacheLines (unsigned long addr, unsigned long cnt) |
Unlock several I-Cache lines specified by address in U-Mode. More... | |
__STATIC_FORCEINLINE void | MInvalICache (void) |
Invalidate all I-Cache lines in M-Mode. More... | |
__STATIC_FORCEINLINE void | SInvalICache (void) |
Invalidate all I-Cache lines in S-Mode. More... | |
__STATIC_FORCEINLINE void | UInvalICache (void) |
Invalidate all I-Cache lines in U-Mode. More... | |
Functions that configure Instruction Cache.
__STATIC_FORCEINLINE void DisableICache | ( | void | ) |
Disable ICache.
This function Disable I-Cache
Definition at line 211 of file core_feature_cache.h.
References __RV_CSR_CLEAR, CSR_MCACHE_CTL, and MCACHE_CTL_IC_EN.
__STATIC_FORCEINLINE void DisableICacheECC | ( | void | ) |
Disable ICache ECC.
This function disable I-Cache ECC
Definition at line 241 of file core_feature_cache.h.
References __RV_CSR_CLEAR, CSR_MCACHE_CTL, and MCACHE_CTL_IC_ECC_EN.
__STATIC_FORCEINLINE void EnableICache | ( | void | ) |
Enable ICache.
This function enable I-Cache
Definition at line 196 of file core_feature_cache.h.
References __RV_CSR_SET, CSR_MCACHE_CTL, and MCACHE_CTL_IC_EN.
__STATIC_FORCEINLINE void EnableICacheECC | ( | void | ) |
Enable ICache ECC.
This function enable I-Cache ECC
Definition at line 226 of file core_feature_cache.h.
References __RV_CSR_SET, CSR_MCACHE_CTL, and MCACHE_CTL_IC_ECC_EN.
__STATIC_FORCEINLINE int32_t GetICacheInfo | ( | CacheInfo_Type * | info | ) |
Get I-Cache Information.
This function get I-Cache Information
Definition at line 257 of file core_feature_cache.h.
References __RV_CSR_READ, CSR_MICFGINFO_Type::b, CSR_MICFG_INFO, CSR_MICFGINFO_Type::d, CSR_MICFGINFO_Type::lsize, CSR_MICFGINFO_Type::set, and CSR_MICFGINFO_Type::way.
__STATIC_FORCEINLINE int32_t ICachePresent | ( | void | ) |
Check ICache Unit Present or Not.
This function check icache unit present or not via mcfg_info csr
Definition at line 178 of file core_feature_cache.h.
References __RV_CSR_READ, CSR_MCFG_INFO, and MCFG_INFO_ICACHE.
__STATIC_FORCEINLINE void MInvalICache | ( | void | ) |
Invalidate all I-Cache lines in M-Mode.
This function invalidate all I-Cache lines. Command CCM_IC_INVAL_ALL is written to CSR CSR_CCM_MCOMMAND.
[in] | addr | start address to be invalidated |
Definition at line 647 of file core_feature_cache.h.
References __RV_CSR_WRITE, CCM_IC_INVAL_ALL, and CSR_CCM_MCOMMAND.
__STATIC_FORCEINLINE void MInvalICacheLine | ( | unsigned long | addr | ) |
Invalidate one I-Cache line specified by address in M-Mode.
This function unlock and invalidate one I-Cache line specified by the address. Command CCM_IC_INVAL is written to CSR CSR_CCM_MCOMMAND.
[in] | addr | start address to be invalidated |
Definition at line 285 of file core_feature_cache.h.
References __RV_CSR_WRITE, CCM_IC_INVAL, CSR_CCM_MBEGINADDR, and CSR_CCM_MCOMMAND.
Referenced by __ECLIC_SetVector().
__STATIC_FORCEINLINE void MInvalICacheLines | ( | unsigned long | addr, |
unsigned long | cnt | ||
) |
Invalidate several I-Cache lines specified by address in M-Mode.
This function unlock and invalidate several I-Cache lines specified by the address and line count. Command CCM_IC_INVAL is written to CSR CSR_CCM_MCOMMAND.
[in] | addr | start address to be invalidated |
[in] | cnt | count of cache lines to be invalidated |
Definition at line 302 of file core_feature_cache.h.
References __RV_CSR_WRITE, CCM_IC_INVAL, CSR_CCM_MBEGINADDR, and CSR_CCM_MCOMMAND.
__STATIC_FORCEINLINE unsigned long MLockICacheLine | ( | unsigned long | addr | ) |
Lock one I-Cache line specified by address in M-Mode.
This function lock one I-Cache line specified by the address. Command CCM_IC_LOCK is written to CSR CSR_CCM_MCOMMAND.
[in] | addr | start address to be locked |
Definition at line 399 of file core_feature_cache.h.
References __RV_CSR_READ, __RV_CSR_WRITE, CCM_IC_LOCK, CSR_CCM_MBEGINADDR, CSR_CCM_MCOMMAND, and CSR_CCM_MDATA.
__STATIC_FORCEINLINE unsigned long MLockICacheLines | ( | unsigned long | addr, |
unsigned long | cnt | ||
) |
Lock several I-Cache lines specified by address in M-Mode.
This function lock several I-Cache lines specified by the address and line count. Command CCM_IC_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 418 of file core_feature_cache.h.
References __RV_CSR_READ, __RV_CSR_WRITE, CCM_IC_LOCK, CCM_OP_SUCCESS, CSR_CCM_MBEGINADDR, CSR_CCM_MCOMMAND, and CSR_CCM_MDATA.
__STATIC_FORCEINLINE void MUnlockICacheLine | ( | unsigned long | addr | ) |
Unlock one I-Cache line specified by address in M-Mode.
This function unlock one I-Cache line specified by the address. Command CCM_IC_UNLOCK is written to CSR CSR_CCM_MCOMMAND.
[in] | addr | start address to be unlocked |
Definition at line 536 of file core_feature_cache.h.
References __RV_CSR_WRITE, CCM_IC_UNLOCK, CSR_CCM_MBEGINADDR, and CSR_CCM_MCOMMAND.
__STATIC_FORCEINLINE void MUnlockICacheLines | ( | unsigned long | addr, |
unsigned long | cnt | ||
) |
Unlock several I-Cache lines specified by address in M-Mode.
This function unlock several I-Cache lines specified by the address and line count. Command CCM_IC_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 553 of file core_feature_cache.h.
References __RV_CSR_WRITE, CCM_IC_UNLOCK, CSR_CCM_MBEGINADDR, and CSR_CCM_MCOMMAND.
__STATIC_FORCEINLINE void SInvalICache | ( | void | ) |
Invalidate all I-Cache lines in S-Mode.
This function invalidate all I-Cache lines. Command CCM_IC_INVAL_ALL is written to CSR CSR_CCM_SCOMMAND.
[in] | addr | start address to be invalidated |
Definition at line 661 of file core_feature_cache.h.
References __RV_CSR_WRITE, CCM_IC_INVAL_ALL, and CSR_CCM_SCOMMAND.
__STATIC_FORCEINLINE void SInvalICacheLine | ( | unsigned long | addr | ) |
Invalidate one I-Cache line specified by address in S-Mode.
This function unlock and invalidate one I-Cache line specified by the address. Command CCM_IC_INVAL is written to CSR CSR_CCM_SCOMMAND.
[in] | addr | start address to be invalidated |
Definition at line 323 of file core_feature_cache.h.
References __RV_CSR_WRITE, CCM_IC_INVAL, CSR_CCM_SBEGINADDR, and CSR_CCM_SCOMMAND.
Referenced by __ECLIC_SetVector_S().
__STATIC_FORCEINLINE void SInvalICacheLines | ( | unsigned long | addr, |
unsigned long | cnt | ||
) |
Invalidate several I-Cache lines specified by address in S-Mode.
This function unlock and invalidate several I-Cache lines specified by the address and line count. Command CCM_IC_INVAL is written to CSR CSR_CCM_SCOMMAND.
[in] | addr | start address to be invalidated |
[in] | cnt | count of cache lines to be invalidated |
Definition at line 340 of file core_feature_cache.h.
References __RV_CSR_WRITE, CCM_IC_INVAL, CSR_CCM_SBEGINADDR, and CSR_CCM_SCOMMAND.
__STATIC_FORCEINLINE unsigned long SLockICacheLine | ( | unsigned long | addr | ) |
Lock one I-Cache line specified by address in S-Mode.
This function lock one I-Cache line specified by the address. Command CCM_IC_LOCK is written to CSR CSR_CCM_SCOMMAND.
[in] | addr | start address to be locked |
Definition at line 445 of file core_feature_cache.h.
References __RV_CSR_READ, __RV_CSR_WRITE, CCM_IC_LOCK, CSR_CCM_SBEGINADDR, CSR_CCM_SCOMMAND, and CSR_CCM_SDATA.
__STATIC_FORCEINLINE unsigned long SLockICacheLines | ( | unsigned long | addr, |
unsigned long | cnt | ||
) |
Lock several I-Cache lines specified by address in S-Mode.
This function lock several I-Cache lines specified by the address and line count. Command CCM_IC_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 464 of file core_feature_cache.h.
References __RV_CSR_READ, __RV_CSR_WRITE, CCM_IC_LOCK, CCM_OP_SUCCESS, CSR_CCM_SBEGINADDR, CSR_CCM_SCOMMAND, and CSR_CCM_SDATA.
__STATIC_FORCEINLINE void SUnlockICacheLine | ( | unsigned long | addr | ) |
Unlock one I-Cache line specified by address in S-Mode.
This function unlock one I-Cache line specified by the address. Command CCM_IC_UNLOCK is written to CSR CSR_CCM_SCOMMAND.
[in] | addr | start address to be unlocked |
Definition at line 573 of file core_feature_cache.h.
References __RV_CSR_WRITE, CCM_IC_UNLOCK, CSR_CCM_SBEGINADDR, and CSR_CCM_SCOMMAND.
__STATIC_FORCEINLINE void SUnlockICacheLines | ( | unsigned long | addr, |
unsigned long | cnt | ||
) |
Unlock several I-Cache lines specified by address in S-Mode.
This function unlock several I-Cache lines specified by the address and line count. Command CCM_IC_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 590 of file core_feature_cache.h.
References __RV_CSR_WRITE, CCM_IC_UNLOCK, CSR_CCM_SBEGINADDR, and CSR_CCM_SCOMMAND.
__STATIC_FORCEINLINE void UInvalICache | ( | void | ) |
Invalidate all I-Cache lines in U-Mode.
This function invalidate all I-Cache lines. Command CCM_IC_INVAL_ALL is written to CSR CSR_CCM_UCOMMAND.
[in] | addr | start address to be invalidated |
Definition at line 675 of file core_feature_cache.h.
References __RV_CSR_WRITE, CCM_IC_INVAL_ALL, and CSR_CCM_UCOMMAND.
__STATIC_FORCEINLINE void UInvalICacheLine | ( | unsigned long | addr | ) |
Invalidate one I-Cache line specified by address in U-Mode.
This function unlock and invalidate one I-Cache line specified by the address. Command CCM_IC_INVAL is written to CSR CSR_CCM_UCOMMAND.
[in] | addr | start address to be invalidated |
Definition at line 361 of file core_feature_cache.h.
References __RV_CSR_WRITE, CCM_IC_INVAL, CSR_CCM_UBEGINADDR, and CSR_CCM_UCOMMAND.
__STATIC_FORCEINLINE void UInvalICacheLines | ( | unsigned long | addr, |
unsigned long | cnt | ||
) |
Invalidate several I-Cache lines specified by address in U-Mode.
This function unlock and invalidate several I-Cache lines specified by the address and line count. Command CCM_IC_INVAL is written to CSR CSR_CCM_UCOMMAND.
[in] | addr | start address to be invalidated |
[in] | cnt | count of cache lines to be invalidated |
Definition at line 378 of file core_feature_cache.h.
References __RV_CSR_WRITE, CCM_IC_INVAL, CSR_CCM_UBEGINADDR, and CSR_CCM_UCOMMAND.
__STATIC_FORCEINLINE unsigned long ULockICacheLine | ( | unsigned long | addr | ) |
Lock one I-Cache line specified by address in U-Mode.
This function lock one I-Cache line specified by the address. Command CCM_IC_LOCK is written to CSR CSR_CCM_UCOMMAND.
[in] | addr | start address to be locked |
Definition at line 491 of file core_feature_cache.h.
References __RV_CSR_READ, __RV_CSR_WRITE, CCM_IC_LOCK, CSR_CCM_UBEGINADDR, CSR_CCM_UCOMMAND, and CSR_CCM_UDATA.
__STATIC_FORCEINLINE unsigned long ULockICacheLines | ( | unsigned long | addr, |
unsigned long | cnt | ||
) |
Lock several I-Cache lines specified by address in U-Mode.
This function lock several I-Cache lines specified by the address and line count. Command CCM_IC_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 510 of file core_feature_cache.h.
References __RV_CSR_READ, __RV_CSR_WRITE, CCM_IC_LOCK, CCM_OP_SUCCESS, CSR_CCM_UBEGINADDR, CSR_CCM_UCOMMAND, and CSR_CCM_UDATA.
__STATIC_FORCEINLINE void UUnlockICacheLine | ( | unsigned long | addr | ) |
Unlock one I-Cache line specified by address in U-Mode.
This function unlock one I-Cache line specified by the address. Command CCM_IC_UNLOCK is written to CSR CSR_CCM_UCOMMAND.
[in] | addr | start address to be unlocked |
Definition at line 610 of file core_feature_cache.h.
References __RV_CSR_WRITE, CCM_IC_UNLOCK, CSR_CCM_UBEGINADDR, and CSR_CCM_UCOMMAND.
__STATIC_FORCEINLINE void UUnlockICacheLines | ( | unsigned long | addr, |
unsigned long | cnt | ||
) |
Unlock several I-Cache lines specified by address in U-Mode.
This function unlock several I-Cache lines specified by the address and line count. Command CCM_IC_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 627 of file core_feature_cache.h.
References __RV_CSR_WRITE, CCM_IC_UNLOCK, CSR_CCM_UBEGINADDR, and CSR_CCM_UCOMMAND.