![]() |
![]() |
Functions | |
Tcp3d_Result | Tcp3d_getNumBuf (IN Tcp3d_SizeCfg *cfg, OUT int16_t *nbufs) |
Tcp3d_Result | Tcp3d_getBufDesc (IN Tcp3d_SizeCfg *cfg, OUT Tcp3d_MemBuffer bufs[]) |
Tcp3d_Result | Tcp3d_reset (IN Tcp3d_Instance *tcp3dInst, IN uint32_t codeBlocks) |
Tcp3d_Result | Tcp3d_init (IN Tcp3d_MemBuffer bufs[], IN Tcp3d_InitParams *drvInitParams) |
Tcp3d_Result | Tcp3d_deInit (IN Tcp3d_Instance *tcp3dInst) |
Tcp3d_Result | Tcp3d_enqueueCodeBlock (IN Tcp3d_Instance *tcp3dInst, IN uint32_t blockLength, IN uint32_t *inputConfigPtr, IN int8_t *llrPtr, IN uint32_t llrOffset, IN uint32_t *hdPtr, IN int8_t *sdPtr, IN uint32_t sdOffset, IN uint32_t *statusPtr, IN uint8_t ntfEventFlag) |
Tcp3d_Result | Tcp3d_start (IN Tcp3d_Instance *inst, IN uint8_t startMode) |
Tcp3d_Result | Tcp3d_status (IN Tcp3d_Instance *inst, INOUT Tcp3d_Sts *drvStatus) |
Tcp3d_Result | Tcp3d_control (IN Tcp3d_Instance *inst, IN Tcp3d_Ctrl *drvCtrl) |
Driver Function definitions
Tcp3d_Result Tcp3d_control | ( | IN Tcp3d_Instance * | inst, |
IN Tcp3d_Ctrl * | drvCtrl | ||
) |
Description
This API could be used to change or update the TCP3D driver instance values which are set during the init time. The Tcp3d_CtrlCmd enum structure gives the supported commads.
[in] | *inst | This is the driver instance. |
[in] | *drvCtrl | Structure used for keeping the control request command and also for passing any input values along with as required. |
Success - TCP3D_DRV_NO_ERR (valid command) Failure - TCP3D_DRV_FAIL (invalid command)
Tcp3d_Result Tcp3d_deInit | ( | IN Tcp3d_Instance * | tcp3dInst | ) |
Description
TCP3D Driver De-Initialization function which must be called to close the corresponding instance.
This funciton does the following:
[in] | *tcp3dInst | This is the driver instance. |
Success - TCP3D_DRV_NO_ERR Failure - TCP3D_DRV_FAIL
Tcp3d_Result Tcp3d_enqueueCodeBlock | ( | IN Tcp3d_Instance * | tcp3dInst, |
IN uint32_t | blockLength, | ||
IN uint32_t * | inputConfigPtr, | ||
IN int8_t * | llrPtr, | ||
IN uint32_t | llrOffset, | ||
IN uint32_t * | hdPtr, | ||
IN int8_t * | sdPtr, | ||
IN uint32_t | sdOffset, | ||
IN uint32_t * | statusPtr, | ||
IN uint8_t | ntfEventFlag | ||
) |
Description
This is a run-time API for appending the codeblocks to the pseudo PaRAM list as the blocks arrive. This function updates the pseudo PaRAM set entries and chains to the previous block in the corresponding list (PING or PONG).
Enqueuing is done alternately between the two lists until the current list is full. The no room case is indicated with return error TCP3D_DRV_INPUT_LIST_FULL.
On each succeesful enqueue, the corresponding load counter for the path is incremented. This funciton updates some run-time varaibles which keeps track of ping and pong list indexes and counters.
This function primarily does the following:
This function is executed at the application task thread for queueing the code blocks to the input pseudo PaRAM list. They will be copied to the actual PaRAM area using the L2P channel when the previous block is decoded and outputs are read as specified.
Application need to check the return value to take appropriate action.
Since the TCC for L2P channels always point to REVT, enabling L2P channel interrupts would showup as REVT channel call backs.
[in] | *tcp3dInst | This is the driver instance. |
[in] | blockLength | Code Block length value which is used for setting some of the PaRAM counts. |
[in] | *inputConfigPtr | Pointer to the input config registers prepared for the current code block. |
[in] | *llrPtr | Input data pointer where the systematic, parity 1 and parity 2 streams are available. |
[in] | llrOffset | Input data offset between the three streams. Used for setting the EDMA trasfer type (A-Sync or AB-Sync) and also to set the source jump index. |
[in] | *hdPtr | Pointer to the memory where the decoded hard decision values to be DMAed. |
[in] | *statusPtr | Pointer to the memory to DMA the three status register values. |
This is a selective parameter which application uses only if the corresponding bit is set in the inputConfigRegs for reading the TCP3D output memory.
If not used, set to NULL to avoid any undesired behaviour from the TCP3 decoder. This will also save the time for programming.
[in] | *sdPtr | Pointer to the memory where the decoded soft decision values to be DMAed. |
This is a selective parameter which application uses only if the corresponding bit is set in the inputConfigRegs for reading the TCP3D output memory.
If not used, set to NULL to avoid any undesired behaviour from the TCP3 decoder. This will also save the time for programming.
[in] | sdOffset | Output data offset between the three streams. Not valid for split more, since there will be only one stream. |
If not used, set to NULL to avoid any undesired behaviour from the TCP3 decoder.
[in] | ntfEventFlag | Flag for enabling the notification event to be generated at the end of output transfer completion of the code block. When set, the event number provided during the init. |
Useful for application to get notification after a specific code block is decoded to start the post-processing.
Success - TCP3D_DRV_NO_ERR Failure - TCP3D_DRV_INPUT_LIST_FULL
Tcp3d_Result Tcp3d_getBufDesc | ( | IN Tcp3d_SizeCfg * | cfg, |
OUT Tcp3d_MemBuffer | bufs[] | ||
) |
Description
TCP3D Driver function for providing the attributes of all the number of buffers requested through the structure of type Tcp3d_MemBuffer provided.
[in] | *cfg | Pointer to the structure of type Tcp3d_SizeCfg which has specific information used for determining the buffer requirements. |
TCP3D Driver uses the field maxCodeBlocks for determining the buffer sizes required.
[out] | **bufs | Pointer to the array of Tcp3d_MemBuffer structure of size provided through the Tcp3d_getNumBuf() API. |
TCP3D Driver fills all the fileds of the structure except the base which application fills after allocating the memory as per the attributes requested.
Tcp3d_Result Tcp3d_getNumBuf | ( | IN Tcp3d_SizeCfg * | cfg, |
OUT int16_t * | nbufs | ||
) |
Description
TCP3D Driver function for providing the number of buffers required.
[in] | *cfg | Pointer to the structure of type Tcp3d_SizeCfg which has specific information used for determining the buffer requirements. |
For Example, TCP3D could use one field maxCodeBlocks to determine number of buffers required.
[out] | *nbufs | Pointer of a variable to which TCP3D Driver proveds the number of buffers required. |
Tcp3d_Result Tcp3d_init | ( | IN Tcp3d_MemBuffer | bufs[], |
IN Tcp3d_InitParams * | drvInitParams | ||
) |
Description
TCP3D Driver Initialization function which must be called only once to initialize the driver instance and other required resources needed for the driver functionality.
This funciton does the following:
[in] | **bufs | Pointer to the array of Tcp3d_MemBuffer structure of size provided through the Tcp3d_getNumBuf() API. This strucure must have all the fields filled by now. The bufs[0]->base value will be used for initializing the driver instance. |
[in] | drvInitParams | Driver initialization parameters structure. This structure is used for getting all the required resources for the driver to initialize the instance. Look into the description of the Tcp3d_InitParams structure elements for details. |
Success - TCP3D_DRV_NO_ERR Failure - TCP3D_DRV_INVALID_BUFF Failure - TCP3D_DRV_INVALID_EDMA_CH Failure - TCP3D_DRV_FAIL_EDMA_GET_PARAM_ADDR Failure - TCP3D_DRV_FAIL_EDMA_PARAM_INIT Failure - TCP3D_DRV_FAIL_EDMA_ENABLE_CHANNEL
Tcp3d_Result Tcp3d_reset | ( | IN Tcp3d_Instance * | tcp3dInst, |
IN uint32_t | codeBlocks | ||
) |
Description
TCP3D Driver function called to reset the driver at any time after init and only if both PING & PONG decoders have nothing in the input list for decoding.
This API checks if it is called in a correct state and returns appropriate error message.
This function does the following: 1) Set the instance with the passed values - for example number of blocks for decoding in the current subframe which is needed for boundary checks and to setup the EDMA channels and a new status array pointer where the status register values for each code block are to be DMAed. 2) Initialize all the run-time instance variables to default. 3) Initialize the pseudo PaRAM memory with all the defaults based on mode. 4) Reset the EDMA channels with default values. 5) Change the state to TCP3D_DRV_STATE_INIT.
[in] | *tcp3dInst | This is the driver instance. |
[in] | codeBlocks | Number of code blocks to be decoded for the current sub-frame. This value should be equal to the maxCodeBlocks. |
For saving cycles, you can set to lower value that should be multiple of 2.
Success - TCP3D_DRV_NO_ERR Failure - TCP3D_DRV_INVALID_STATE Failure - TCP3D_DRV_INVALID_PARAMETER
Tcp3d_Result Tcp3d_start | ( | IN Tcp3d_Instance * | inst, |
IN uint8_t | startMode | ||
) |
Description
This API could be used for starting the driver to start doing EDMA transfers to TCP3 decoder for decoding from the pseudo PaRAM list.
This function updates the load and free counts for both ping and pong lists.
This function is executed at the application task thread for starting either the PING or PONG path execution.
[in] | *inst | This is the driver instance. |
[in] | startMode | Flag tells the mode of operation.
|
This function should be called only after the Tcp3d_init() function is called.
Success - TCP3D_DRV_NO_ERR Failure - TCP3D_DRV_FAIL_EDMA_ENABLE_CHANNEL
Tcp3d_Result Tcp3d_status | ( | IN Tcp3d_Instance * | inst, |
INOUT Tcp3d_Sts * | drvStatus | ||
) |
Description
This API could be used for querying the TCP3D driver to get updates or take appropriate actions. The Tcp3d_StsCmd enum structure gives the supported commads.
[in] | *inst | This is the driver instance for which status query is made. |
[in,out] | *drvStatus | Structure used for keeping the status request command and for keeping the status query output. |
Success - TCP3D_DRV_NO_ERR (valid command) Failure - TCP3D_DRV_FAIL (invalid command)