📄 csl_cache.h
字号:
...
*
* ===========================================================================
*/
extern void CACHE_wait(void);
/*
* =============================================================================
* @n@b CACHE_waitInternal
*
* @desc
* @n Waits for previously issued block operations to complete. This does a
* partial wait. i.e waits for the cache status register to read back as
* done. (if required)
*
* @arg None
*
* @ret None
*
* @eg
* ...
CACHE_waitInternal();
...
*
* ===========================================================================
*/
extern void CACHE_waitInternal(void);
/*
* =============================================================================
* @n@b CACHE_freezeL1
*
* @desc
* @n Freezes the L1P and L1D.
* @n As per the specification,
* @n a. The new freeze state is programmed in L1DCC, L1PCC.
* @n b. The old state is read from the L1DCC, L1PCC from the POPER field.
* @n This latter read accomplishes 2 things, viz. Ensuring the new state
* is programmed as well as reading the old programmed value.
*
* @arg None
*
* @ret CACHE_L1_Freeze
* Old Freeze State
* @eg
* ...
CACHE_L1_Freeze oldFreezeState ;
oldFreezeState = CACHE_freezeL1();
...
*
* ===========================================================================
*/
extern CACHE_L1_Freeze CACHE_freezeL1(void);
/*
* =============================================================================
* @n@b CACHE_unfreezeL1
*
* @desc
* @n Unfreezes the L1P and L1D.
* @n As per the specification,
* @n a. The new unfreeze state is programmed in L1DCC, L1PCC.
* @n b. The old state is read from the L1DCC, L1PCC from the POPER field.
* @n This latter read accomplishes 2 things, viz. Ensuring the new
* state is programmed as well as reading the old programmed value.
*
* @arg None
*
* @ret CACHE_L1_Freeze
* Old Freeze State
* @eg
* ...
CACHE_L1_Freeze oldFreezeState ;
oldFreezeState = CACHE_unfreezeL1();
...
*
* ===========================================================================
*/
extern CACHE_L1_Freeze CACHE_unfreezeL1(void);
/*
* =============================================================================
* @n@b CACHE_setL1pSize
*
* @desc
* @n Sets the L1P size.
* @n As per the specification,
* @n a. The new size is programmed in L1PCFG.
* @n b. L1PCFG is read back to ensure it is set.
*
* @arg newSize
* New size to be programmed
*
* @ret CACHE_L1Size
* Old Size set for L1P
* @eg
* ...
CACHE_L1Size oldSize ;
oldSize = CACHE_setL1pSize(CACHE_L1_32KCACHE);
...
*
* ===========================================================================
*/
extern CACHE_L1Size CACHE_setL1pSize (
CACHE_L1Size newSize
);
/*
* =============================================================================
* @n@b CACHE_freezeL1p
*
* @desc
* @n Freezes L1P.
* @n As per the specification,
* @n a. The new freeze state is programmed in L1PCC.
* @n b. The old state is read from the L1PCC from the POPER field.
* @n This latter read accomplishes 2 things, viz. Ensuring the new
* state is programmed as well as reading the old programmed value.
*
* @arg None
*
* @ret CACHE_L1_Freeze
* Old Freeze State
* @eg
* ...
CACHE_L1_Freeze oldFreezeState ;
oldFreezeState = CACHE_freezeL1p();
...
*
* ===========================================================================
*/
extern CACHE_L1_Freeze CACHE_freezeL1p(void);
/*
* =============================================================================
* @n@b CACHE_unfreezeL1p
*
* @desc
* @n Unfreezes L1P.
* @n As per the specification,
* @n a. The normal state is programmed in L1PCC
* @n b. The old state is read from the L1PCC from the POPER field.
* @n This latter read accomplishes 2 things, viz. Ensuring the new
* state is programmed as well as reading the old programmed value.
*
* @arg None
*
* @ret CACHE_L1_Freeze
* Old Freeze State
* @eg
* ...
CACHE_L1_Freeze oldFreezeState ;
oldFreezeState = CACHE_unfreezeL1p();
...
*
* ============================================================================
*/
extern CACHE_L1_Freeze CACHE_unfreezeL1p(void);
/*
* =============================================================================
* @n@b CACHE_invL1p
*
* @desc
* @n Invalidates range specified in L1P.
* @n As per the specification,
* @n a. The start of the range that needs to be invalidated is written
* into L1PIBAR
* @n b. The byte count is programmed in L1PIWC.
*
* @arg blockPtr
* Pointer to start address of range to be invalidated
*
* @arg byteCnt
* Number of bytes to be invalidated
*
* @arg wait
* Whether the call is blocking (and the extent of wait) till the
* issued operation is completed or not.
*
* @ret None
*
* @eg
* ...
CACHE_invL1p ((Uint32*)(0x1000), 200, CACHE_NOWAIT);
...
*
* ===========================================================================
*/
extern void CACHE_invL1p (
void *blockPtr,
Uint32 byteCnt,
CACHE_Wait wait
);
/*
* =============================================================================
* @n@b CACHE_invAllL1p
*
* @desc
* Sets the L1D size. As per the specification,
* - The new size is programmed in L1DCFG
* - L1DCFG is read back to ensure it is set
*
* @arg wait
* Whether the call is blocking(and the extent of wait) till the
* issued operation is completed or not
*
* @ret None
*
* @eg
* ...
oldSize = CACHE_invAllL1p(CACHE_L1_32KCACHE);
...
*
* ===========================================================================
*/
extern void CACHE_invAllL1p (
CACHE_Wait wait
);
/*
* =============================================================================
* @n@b CACHE_setL1dSize
*
* @desc
* Sets the L1D size. As per the specification,
* - The new size is programmed in L1DCFG
* - L1DCFG is read back to ensure it is set
*
* @arg newSize
* New size to be programmed
*
* @ret CACHE_L1Size
* Old Size set for L1D
* @eg
* CACHE_L1Size oldSize;
...
oldSize = CACHE_setL1dSize(CACHE_L1_32KCACHE);
...
*
* ===========================================================================
*/
extern CACHE_L1Size CACHE_setL1dSize (
CACHE_L1Size newSize
);
/*
* =============================================================================
* @n@b CACHE_freezeL1d
*
* @desc
* Freezes L1D. As per the specification,
* - The normal state is programmed in L1DCC
* - The old state is read from the L1DCC from the POPER field.This latter
* read accomplishes 2 things, viz. Ensuring the new state is programmed
* as well as reading the old programmed value
*
* @arg None
*
* @ret CACHE_L1_Freeze
* Old Freeze State
* @eg
* CACHE_L1_Freeze oldFreezeState ;
...
CACHE_freezeL1d ();
...
*
* ===========================================================================
*/
extern CACHE_L1_Freeze CACHE_freezeL1d(void);
/*
* =============================================================================
* @n@b CACHE_unfreezeL1d
*
* @desc
* Unfreezes L1D. As per the specification,
* - The normal state is programmed in L1DCC
* - The old state is read from the L1DCC from the POPER field.This latter
* read accomplishes 2 things, viz. Ensuring the new state is programmed
* as well as reading the old programmed value
*
* @arg None
*
* @ret CACHE_L1_Freeze
* Old Freeze State
* @eg
* CACHE_L1_Freeze oldFreezeState ;
...
CACHE_unfreezeL1d ();
...
*
* ===========================================================================
*/
extern CACHE_L1_Freeze CACHE_unfreezeL1d (void);
/*
* =============================================================================
* @n@b CACHE_wbL1d
*
* @desc
* Writes back range specified in L1D.As per the specification,
* - The start of the range that needs to be is written back
* into L1DWBAR
* - The byte count is programmed in L1DWWC
*
* @arg blockPtr
* Start address of range to be written back
*
* @arg byteCnt
* Number of bytes to be written back
*
* @arg wait
* Whether the call is blocking (and the extent of wait) till the
* issued operation is completed or not.
*
* @ret None
*
* @eg
* ...
CACHE_wbL1d ((Uint32*)(0x1000),200,CACHE_NOWAIT);
...
*
* ===========================================================================
*/
extern void CACHE_wbL1d (
void *blockPtr,
Uint32 byteCnt,
CACHE_Wait wait
);
/*
* =============================================================================
* @n@b CACHE_invL1d
*
* @desc
* Invalidates range specified in L1D.As per the specification,
* - The start of the range that needs to be invalidated is written
* into L1DIBAR
* - The byte count is programmed in L1DIWC
*
* @arg blockPtr
* Start address of range to be invalidated
*
* @arg byteCnt
* Number of bytes to be invalidated
*
* @arg wait
* Whether the call is blocking (and the extent of wait) till the
* issued operation is completed or not.
*
* @ret None
*
* @eg
* ...
CACHE_invL1d ((Uint32*)(0x1000),200,CACHE_NOWAIT);
...
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -