思澈科技软件开发工具包  2.20

Modules

 icache profiling mode
 ICACHE profiling mode, could be multiple selected.
 
 dcache profiling mode
 DCACHE profiling mode, could be multiple selected.
 

Macros

#define HAL_CACHE_RESET()   (hwp_cache->CCR |= CACHE_CCR_CNTCLR_Msk)
 Clear all counters, i.e. reset to 0. More...
 
#define HAL_CACHE_GET_ICACHE_SNAPSHOT()   (hwp_cache->ISR)
 Get ICACHE miss counter snapshot value when access counter overflows. More...
 
#define HAL_CACHE_GET_DCACHE_SNAPSHOT()   (hwp_cache->DSR)
 Get DCACHE miss counter snapshot value when access counter overflows. More...
 

Functions

__STATIC_INLINE void HAL_CACHE_Enable (uint32_t imode, uint32_t dmode)
 Enable cache profiling. More...
 
__STATIC_INLINE void HAL_CACHE_Disable (void)
 Disable cache profiling. More...
 
__STATIC_INLINE void HAL_CACHE_GetMissRate (float *irate, float *drate, bool reset)
 Get ICACHE and DCACHE miss rate. More...
 

Detailed Description

Macro Definition Documentation

◆ HAL_CACHE_GET_DCACHE_SNAPSHOT

#define HAL_CACHE_GET_DCACHE_SNAPSHOT ( )    (hwp_cache->DSR)

Get DCACHE miss counter snapshot value when access counter overflows.

Return values
dcachemiss counter snapshot value

◆ HAL_CACHE_GET_ICACHE_SNAPSHOT

#define HAL_CACHE_GET_ICACHE_SNAPSHOT ( )    (hwp_cache->ISR)

Get ICACHE miss counter snapshot value when access counter overflows.

Return values
icachemiss counter snapshot value

◆ HAL_CACHE_RESET

#define HAL_CACHE_RESET ( )    (hwp_cache->CCR |= CACHE_CCR_CNTCLR_Msk)

Clear all counters, i.e. reset to 0.

Return values
void

Function Documentation

◆ HAL_CACHE_Disable()

__STATIC_INLINE void HAL_CACHE_Disable ( void  )

Disable cache profiling.

Return values
void

◆ HAL_CACHE_Enable()

__STATIC_INLINE void HAL_CACHE_Enable ( uint32_t  imode,
uint32_t  dmode 
)

Enable cache profiling.

Parameters
[in]imodeICache profiling mode bitmap, see icache profiling mode, could select multiple modes, such as HAL_CACHE_ICACHE_QSPI1_4|HAL_CACHE_ICACHE_QSPI2 for SF32LB55X
[in]dmodeDCache profiling mode bitmap, see dcache profiling mode, could select multiple modes, such as HAL_CACHE_DCACHE_QSPI1_4|HAL_CACHE_DCACHE_QSPI2 for SF32LB55X
Return values
void

◆ HAL_CACHE_GetMissRate()

__STATIC_INLINE void HAL_CACHE_GetMissRate ( float *  irate,
float *  drate,
bool  reset 
)

Get ICACHE and DCACHE miss rate.

Parameters
[out]iratepointer of output icache miss rate, unit: percentage
[out]dratepointer of output dcache miss rate, unit: percentage
[in]resettrue: reset all counters, false: do not reset counters
Return values
void