📄 csl_icache.h
字号:
@endverbatim
* =============================================================================
*/
extern CSL_IcacheHandle CSL_icacheOpen(
CSL_IcacheObj *icacheObj,
CSL_InstNum icacheNum,
CSL_IcacheParam *param,
CSL_Status *status
);
/** ============================================================================
* @n@b CSL_icacheHwSetupRaw
*
* @b Description
* @n This function configures the icache using the register-values passed
* through the config-structure.
*
* @b Arguments
* @verbatim
hIcache Pointer to the data object for icache instance
icacheConfig Pointer to setup structure which contains the
information to program the icache to a useful state
@endverbatim
*
* <b> Return Value </b> CSL_Status
* @li CSL_SOK - Configuration successful
* @li CSL_ESYS_BADHANDLE - Invalid handle
* @li CSL_ESYS_INVPARAMS - Invalid configuration
* parameters
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n The registers of the specified icache instance will be setup
* according to value passed
*
* @b Modifies
* @n Hardware registers of the specified icache instance
*
* @b Example
* @verbatim
status = CSL_icacheHwSetupRaw (hIcache, &icacheConfig);
@endverbatim
* =============================================================================
*/
extern CSL_Status CSL_icacheHwSetupRaw (
CSL_IcacheHandle hIcache,
CSL_IcacheConfig *icacheConfig
);
/** ============================================================================
* @n@b CSL_icacheHwSetup
*
* @b Description
* @n This function initializes the L1P I-cache hardware to a known state.
*
* @b Arguments
* @verbatim
hIcache Handle to the L1P I-cache instance
hwSetup Pointer to hardware setup structure
@endverbatim
*
* <b> Return Value </b> CSL_Status
* @li CSL_SOK - Hardware setup successful
* @li CSL_ESYS_BADHANDLE - Invalid handle
* @li CSL_ESYS_INVPARAMS - Invalid parameter
*
* <b> Pre Condition </b>
* @n CSL_icacheInit () and CSL_icacheOpen () must be called
*
* <b> Post Condition </b>
* @n The hardware set up structure will be populated with values for the
* setup parameters
* @b Modifies
* @n Hardware registers
*
* @b Example
* @verbatim
CSL_IcacheHandle hIcache;
CSL_IcacheHwSetup icacheHwsetup;
icacheHwsetup = CSL_ICACHE_HWSETUP_DEFAULTS;
CSL_icacheHwSetup (hIcache, &icacheHwsetup);
@endverbatim
* ===========================================================================
*/
extern CSL_Status CSL_icacheHwSetup(
CSL_IcacheHandle hIcache,
CSL_IcacheHwSetup *hwSetup
);
/** ============================================================================
* @n@b CSL_icacheHwControl
*
* @b Description
* @n This function is used for controlling the L1P I-cache instance. It
* accepts the commands and data to configure/control the hardware.
* Some commands does not need any data.
*
* @b Arguments
* @verbatim
hIcache Handle to the L1P I-cache instance
cmd Command to be executed
cmdArg Data pointer corresponding to command
@endverbatim
*
* <b> Return Value </b> CSL_Status
* @li CSL_SOK - Command execution successful.
* @li CSL_ESYS_BADHANDLE - Invalid handle
* @li CSL_ESYS_INVCMD - Invalid command
*
* <b> Pre Condition </b>
* @n icache would have opened properly
*
* <b> Post Condition </b>
* @n 1. The status is returned. If status
* returned is
* @li CSL_OK Command successful
* @li CSL_ESYS_BADHANDLE Invalid handle
* @li CSL_ESYS_INVCMD Invalid command
* 2. Appropriate hardware parameters are configured based on
* the command
*
*
* @b Modifies
* @n Hardware registers
*
* @b Example
* @verbatim
CSL_Status status;
CSL_IcacheHandle hIcache;
...
status = CSL_icacheHwControl (hIcache,
CSL_ICACHE_CMD_CACHE_ENABLE,
NULL);
...
@endverbatim
* ===========================================================================
*/
extern CSL_Status CSL_icacheHwControl(
CSL_IcacheHandle hIcache,
CSL_IcacheHwControlCmd cmd,
void *cmdArg
);
/** ============================================================================
* @n@b CSL_icacheGetHwStatus
*
* @b Description
* @n This function is for querying the hardware status. It accepts the query
* and populates the data structure passed with the corresponding hardware
* status.
*
* @b Arguments
* @verbatim
hIcache Handle to the DSP I-cache instance
myQuery Query to be performed.
response Pointer to data structure to hold the
status information
@endverbatim
*
* <b> Return Value </b> CSL_Status
* @li CSL_SOK - Query successful
* @li CSL_ESYS_BADHANDLE - Invalid handle
* @li CSL_ESYS_INVQUERY - Invalid query
* @li CSL_ESYS_INVPARAMS - Invalid parameters
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n 1. The status is returned. If status
* returned is
* @li CSL_OK Query is successful
* @li CSL_ESYS_BADHANDLE Invalid handle
* @li CSL_ESYS_INVQUERY Invalid query
*
* 2. The status information is copied to the corresponding
* data structure
*
* @b Modifies
* @n Data structure pointed by response
*
* @b Example
* @verbatim
CSL_Status status;
CSL_IcacheMode modarg;
CSL_IcacheHandle hIcache;
...
status = CSL_icacheGetHwStatus (hIcache,
CSL_ICACHE_QUERY_MODE,
(void*) &modarg);
...
@endverbatim
* ===========================================================================
*/
extern CSL_Status CSL_icacheGetHwStatus(
CSL_IcacheHandle hIcache,
CSL_IcacheHwStatusQuery myQuery,
void *response
);
/** ============================================================================
* @n@b CSL_icacheClose
*
* @b Description
* @n This function releases the instance of the icache.
*
* @b Arguments
* @verbatim
hIcache Handle to the icache instance
@endverbatim
*
* <b> Return Value </b> CSL_Status
* @li CSL_SOK - Close successful
* @li CSL_ESYS_BADHANDLE - Invalid handle
*
* <b> Pre Condition </b>
* @n icache would have opened properly
*
* <b> Post Condition </b>
* @n Icache instance is closed and its usage is illegal until next open
*
* @b Modifies
* @n peripheral data object
*
* @b Example
* @verbatim
status = CSL_icacheClose(hIcache);
@endverbatim
* =============================================================================
*/
extern CSL_Status CSL_icacheClose (
CSL_IcacheHandle hIcache
);
/** ============================================================================
* @n@b CSL_icacheGetBaseAddress
*
* @b Description
* @n Function to get the base address of the peripheral instance.
* This function is used for getting the base address of the peripheral
* instance. This function will be called inside the CSL_icacheOpen()
* function call.This function is open for re-implementing if the user
* wants to modify the base address of the peripheral object to point to
* a different location and there by allow CSL initiated write/reads into
* peripheral MMR's go to an alternate location.
*
* @b Arguments
* @verbatim
icacheNum Specifies the instance of the Icache to be opened
picacheParam Module specific parameters
pBaseAddress Pointer to baseaddress structure containing base
address details
@endverbatim
*
* <b> Return Value </b> CSL_Status
* @li CSL_OK Open call is successful
* @li CSL_ESYS_FAIL The instance number is invalid
*
* <b> Pre Condition </b>
* @n None
*
* <b> Post Condition </b>
* @n Base Address structure is populated
*
* @b Modifies
* @n Base address structure is modified
*
* @b Example
* @verbatim
CSL_Status status;
CSL_IcacheBaseAddress baseAddress;
...
status = CSL_icacheGetBaseAddress(CSL_ICACHE, NULL, &baseAddress);
@endverbatim
* =============================================================================
*/
extern CSL_Status CSL_icacheGetBaseAddress (
CSL_InstNum icacheNum,
CSL_IcacheParam *pIcacheParam,
CSL_IcacheBaseAddress *pBaseAddress
);
/** ============================================================================
* @n@b CSL_icacheGetHwSetup
*
* @b Description
* @n It retrives the hardware setup parameters of the I-cache module
* specified by the given handle.
*
* @b Arguments
* @verbatim
hIcache Handle to the instance of I-cache
hwSetup Pointer to the harware setup structure
@endverbatim
*
* <b> Return Value </b> CSL_Status
* @li CSL_SOK - Retrieving the hardware setup
* parameters is successful
* @li CSL_ESYS_BADHANDLE - The handle is passed is
* invalid
* @li CSL_ESYS_INVPARAMS - Invalid parameters
*
* <b> Pre Condition </b>
* @n icache would have opened properly
*
* <b> Post Condition </b>
* @n The hardware setup structure is populated with the hardware setup
* parameters
*
* @b Modifies
* @n hwSetup variable
*
* @b Example
* @verbatim
CSL_IcacheHandle hIcache;
CSL_IcacheHwSetup hwSetup;
...
status = CSL_icacheGetHwSetup(hIcache, &hwSetup);
...
@endverbatim
* ===========================================================================
*/
extern CSL_Status CSL_icacheGetHwSetup(
CSL_IcacheHandle hIcache,
CSL_IcacheHwSetup *hwSetup
);
/* ============================================================================
* @n@b _CSL_icacheConfg
*
* @b Description
* @n This function is internal to the L1P I-cache CSL. The function
* configures the I-cache operating mode and is called from the
* function CSL_icacheHwSetup().
*
* @b Arguments
* @verbatim
icacheMode Required I-cache mode
icachePrio RAM access priority
@endverbatim
*
* <b> Return Value </b> CSL_Status
* @li CSL_SOK - Hardware setup successful
* @li CSL_ESYS_INVPARAMS - Invalid parameter
*
* <b> Pre Condition </b>
* @n I-cache has to be opened properly
*
* <b> Post Condition </b>
* @n 1. The status is returned. If status
* returned is
* @li CSL_OK Hardware setup successful
* @li CSL_ESYS_INVPARAMS Invalid parameter
*
* 2. Hardware registers are initialized
*
*
* @b Modifies
* @n 1. Hardware registers
*
*
* @b Example
* @verbatim
CSL_IcacheMode icacheMode;
CSL_IcachePrio icachePrio;
...
_CSL_icacheConfg (icacheMode,icachePrio);
...
@endverbatim
* ===========================================================================
*/
extern CSL_Status _CSL_icacheConfg (
CSL_IcacheMode icacheMode,
CSL_IcachePrio icachePrio
);
#ifdef __cplusplus
}
#endif
#endif /* _CSL_ICACHE_H_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -