DSPLIB User Guide
DSPLIB_blk_eswap_priv.h File Reference

Introduction

Header file for kernel's internal use. For the kernel's interface, please see DSPLIB_blk_eswap.

Definition in file DSPLIB_blk_eswap_priv.h.

Go to the source code of this file.

Data Structures

struct  DSPLIB_blk_eswap_PrivArgs
 Structure that is reserved for internal use by the kernel. More...
 

Macros

#define SE_PARAM_BASE   (0x0000)
 
#define SE_SE0_PARAM_OFFSET   (SE_PARAM_BASE)
 
#define SE_SA0_PARAM_OFFSET   (SE_SE0_PARAM_OFFSET + SE_PARAM_SIZE)
 
#define DSPLIB_BLK_ESWAP_IXX_IXX_OXX_PBLOCK_SIZE   (2 * SE_PARAM_SIZE)
 Macro to define the size of bufPblock array of DSPLIB_blk_eswap_PrivArgs structure. More...
 

Typedefs

typedef DSPLIB_STATUS(* pFxnDSPLIB_blk_eswap_exec) (DSPLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut)
 This is a function pointer type that conforms to the declaration of DSPLIB_blk_eswap_exec_ci and DSPLIB_blk_eswap_exec_cn. More...
 

Functions

template<typename dataType >
DSPLIB_STATUS DSPLIB_blk_eswap_init_ci (DSPLIB_kernelHandle handle, const DSPLIB_bufParams1D_t *bufParamsIn, const DSPLIB_bufParams1D_t *bufParamsOut, const DSPLIB_blk_eswap_InitArgs *pKerInitArgs)
 This function is the initialization function for the C7x implementation of the kernel. The function declaration conforms to the declaration of DSPLIB_blk_eswap_init. More...
 
template<typename dataType , uint32_t maskType>
DSPLIB_STATUS DSPLIB_blk_eswap_exec_ci (DSPLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut)
 This function is the main execution function for the C7x implementation of the kernel. The function declaration conforms to the declaration of DSPLIB_blk_eswap_exec. More...
 
DSPLIB_STATUS DSPLIB_blk_eswap_init_cn (DSPLIB_kernelHandle handle, DSPLIB_bufParams1D_t *bufParamsIn, DSPLIB_bufParams1D_t *bufParamsOut, const DSPLIB_blk_eswap_InitArgs *pKerInitArgs)
 This function is the initialization function for the natural C implementation of the kernel. The function declaration conforms to the declaration of DSPLIB_blk_eswap_init. More...
 
template<typename dataType , uint32_t implementationType>
DSPLIB_STATUS DSPLIB_blk_eswap_exec_cn (DSPLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut)
 This function is the main execution function for the natural C implementation of the kernel. The function declaration conforms to the declaration of DSPLIB_blk_eswap_exec. More...
 

Macro Definition Documentation

◆ SE_PARAM_BASE

#define SE_PARAM_BASE   (0x0000)

Definition at line 38 of file DSPLIB_blk_eswap_priv.h.

◆ SE_SE0_PARAM_OFFSET

#define SE_SE0_PARAM_OFFSET   (SE_PARAM_BASE)

Definition at line 39 of file DSPLIB_blk_eswap_priv.h.

◆ SE_SA0_PARAM_OFFSET

#define SE_SA0_PARAM_OFFSET   (SE_SE0_PARAM_OFFSET + SE_PARAM_SIZE)

Definition at line 40 of file DSPLIB_blk_eswap_priv.h.

◆ DSPLIB_BLK_ESWAP_IXX_IXX_OXX_PBLOCK_SIZE

#define DSPLIB_BLK_ESWAP_IXX_IXX_OXX_PBLOCK_SIZE   (2 * SE_PARAM_SIZE)

Macro to define the size of bufPblock array of DSPLIB_blk_eswap_PrivArgs structure.

Definition at line 46 of file DSPLIB_blk_eswap_priv.h.

Typedef Documentation

◆ pFxnDSPLIB_blk_eswap_exec

typedef DSPLIB_STATUS(* pFxnDSPLIB_blk_eswap_exec) (DSPLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut)

This is a function pointer type that conforms to the declaration of DSPLIB_blk_eswap_exec_ci and DSPLIB_blk_eswap_exec_cn.

Definition at line 52 of file DSPLIB_blk_eswap_priv.h.

Function Documentation

◆ DSPLIB_blk_eswap_init_ci()

template<typename dataType >
DSPLIB_STATUS DSPLIB_blk_eswap_init_ci ( DSPLIB_kernelHandle  handle,
const DSPLIB_bufParams1D_t bufParamsIn,
const DSPLIB_bufParams1D_t bufParamsOut,
const DSPLIB_blk_eswap_InitArgs pKerInitArgs 
)

This function is the initialization function for the C7x implementation of the kernel. The function declaration conforms to the declaration of DSPLIB_blk_eswap_init.

This function determines the configuration for the streaming engine resources based on the function call parameters, and the configuration is saved in bufPBlock array. In the kernel call sequence, DSPLIB_blk_eswap_exec_ci would be called later independently by the application. When DSPLIB_blk_eswap_exec_ci runs, it merely retrieves the configuration from the bufPBlock and uses it to set up the hardware resources. This arrangement is so that DSPLIB_blk_eswap_exec_ci does not lose cycles to determine the hardware configuration.

Parameters
[in]handle: Active handle to the kernel
[in]bufParamsIn: Pointer to the structure containing dimensional information of input buffer
[out]bufParamsOut: Pointer to the structure containing dimensional information of ouput buffer
[in]pKerInitArgs: Pointer to the structure holding init parameters
Returns
Status value indicating success or failure. Refer to DSPLIB_STATUS.

Definition at line 351 of file DSPLIB_blk_eswap_ci.cpp.

◆ DSPLIB_blk_eswap_exec_ci()

template<typename dataType , uint32_t maskType>
DSPLIB_STATUS DSPLIB_blk_eswap_exec_ci ( DSPLIB_kernelHandle  handle,
void *restrict  pIn,
void *restrict  pOut 
)

This function is the main execution function for the C7x implementation of the kernel. The function declaration conforms to the declaration of DSPLIB_blk_eswap_exec.

The function uses one streaming engine to load the input data then endian swap operation is performed. The result is then stored using streaming address generator.

Parameters
[in]handle: Active handle to the kernel
[in]pIn: Pointer to buffer holding the input data
[out]pOut: Pointer to buffer holding the output data
Returns
Status value indicating success or failure. Refer to DSPLIB_STATUS.
Performance Considerations:
For best performance,
  • the input and output data buffers are expected to be in L2 memory
  • the buffer pointers are assumed to be 64-byte aligned

Definition at line 427 of file DSPLIB_blk_eswap_ci.cpp.

◆ DSPLIB_blk_eswap_init_cn()

DSPLIB_STATUS DSPLIB_blk_eswap_init_cn ( DSPLIB_kernelHandle  handle,
DSPLIB_bufParams1D_t bufParamsIn,
DSPLIB_bufParams1D_t bufParamsOut,
const DSPLIB_blk_eswap_InitArgs pKerInitArgs 
)

This function is the initialization function for the natural C implementation of the kernel. The function declaration conforms to the declaration of DSPLIB_blk_eswap_init.

Parameters
[in]handle: Active handle to the kernel
[in]bufParamsIn: Pointer to the structure containing dimensional information of input buffer
[out]bufParamsOut: Pointer to the structure containing dimensional information of ouput buffer
[in]pKerInitArgs: Pointer to the structure holding init parameters
Returns
Status value indicating success or failure. Refer to DSPLIB_STATUS.

Definition at line 31 of file DSPLIB_blk_eswap_cn.cpp.

◆ DSPLIB_blk_eswap_exec_cn()

template<typename dataType , uint32_t implementationType>
DSPLIB_STATUS DSPLIB_blk_eswap_exec_cn ( DSPLIB_kernelHandle  handle,
void *restrict  pIn,
void *restrict  pOut 
)

This function is the main execution function for the natural C implementation of the kernel. The function declaration conforms to the declaration of DSPLIB_blk_eswap_exec.

Parameters
[in]handle: Active handle to the kernel
[in]pIn: Pointer to buffer holding the input data
[out]pOut: Pointer to buffer holding the output data
Returns
Status value indicating success or failure. Refer to DSPLIB_STATUS.

Definition at line 108 of file DSPLIB_blk_eswap_cn.cpp.