PDK API Guide for AM64x
BCDMA Functions

Introduction

Functions

uint32_t CSL_bcdmaGetRevision (const CSL_BcdmaCfg *pCfg)
 Return revision of the BCDMA module. More...
 
int32_t CSL_bcdmaGetRevisionInfo (const CSL_BcdmaCfg *pCfg, CSL_BcdmaRevision *pRev)
 Return revision information of the BCDMA module. More...
 
void CSL_bcdmaInitCfg (CSL_BcdmaCfg *pCfg)
 Initialize contents of a BCDMA configuration structure. More...
 
void CSL_bcdmaGetCfg (CSL_BcdmaCfg *pCfg)
 Return BCDMA configuration information. More...
 
void CSL_bcdmaInitTxChanCfg (CSL_BcdmaTxChanCfg *pTxChanCfg)
 Initialize a CSL_BcdmaTxChanCfg structure. More...
 
void CSL_bcdmaInitRxChanCfg (CSL_BcdmaRxChanCfg *pRxChanCfg)
 Initialize a CSL_BcdmaRxChanCfg structure. More...
 
void CSL_bcdmaInitRxFlowCfg (CSL_BcdmaRxFlowCfg *pFlow)
 Initialize a CSL_BcdmaRxFlowCfg structure. More...
 
int32_t CSL_bcdmaChanOp (CSL_BcdmaCfg *pCfg, CSL_BcdmaChanOp chanOp, CSL_BcdmaChanType chanType, uint32_t chanIdx, void *pOpData)
 Perform a channel operation. More...
 
void CSL_bcdmaSetPerfCtrl (CSL_BcdmaCfg *pCfg, uint32_t rxRetryTimeoutCnt)
 Set performance control parmeters. More...
 
void CSL_bcdmaSetUtcCtrl (CSL_BcdmaCfg *pCfg, uint32_t startingThreadNum)
 [udmap_only] Set UTC control parmeters More...
 
int32_t CSL_bcdmaRxFlowCfg (CSL_BcdmaCfg *pCfg, uint32_t flow, const CSL_BcdmaRxFlowCfg *pFlow)
 [udmap_only] Configure an RX flow More...
 
int32_t CSL_bcdmaRxChanCfg (CSL_BcdmaCfg *pCfg, uint32_t chanIdx, const CSL_BcdmaRxChanCfg *pRxChanCfg)
 Configure an RX channel. More...
 
int32_t CSL_bcdmaTxChanCfg (CSL_BcdmaCfg *pCfg, uint32_t chanIdx, const CSL_BcdmaTxChanCfg *pTxChanCfg)
 Configure a TX channel. More...
 
int32_t CSL_bcdmaRxChanSetTrEvent (CSL_BcdmaCfg *pCfg, uint32_t chanIdx, uint32_t trEventNum)
 [udmap_only] Configure an RX channel TR event More...
 
int32_t CSL_bcdmaTxChanSetTrEvent (CSL_BcdmaCfg *pCfg, uint32_t chanIdx, uint32_t trEventNum)
 [udmap_only] Configure an TX channel TR event More...
 
int32_t CSL_bcdmaRxChanSetBurstSize (CSL_BcdmaCfg *pCfg, uint32_t chanIdx, CSL_BcdmaChanBurstSize burstSize)
 Configure RX channel burst size. More...
 
int32_t CSL_bcdmaTxChanSetBurstSize (CSL_BcdmaCfg *pCfg, uint32_t chanIdx, CSL_BcdmaChanBurstSize burstSize)
 Configure TX channel burst size. More...
 
int32_t CSL_bcdmaGetRxRT (CSL_BcdmaCfg *pCfg, uint32_t chanIdx, CSL_BcdmaRT *pRT)
 Get an RX channel's real-time register values. More...
 
int32_t CSL_bcdmaGetTxRT (CSL_BcdmaCfg *pCfg, uint32_t chanIdx, CSL_BcdmaRT *pRT)
 Get a TX channel's real-time register values. More...
 
int32_t CSL_bcdmaSetRxRT (CSL_BcdmaCfg *pCfg, uint32_t chanIdx, const CSL_BcdmaRT *pRT)
 Set an RX channel's real-time register values. More...
 
int32_t CSL_bcdmaSetTxRT (CSL_BcdmaCfg *pCfg, uint32_t chanIdx, const CSL_BcdmaRT *pRT)
 Set a TX channel's real-time register values. More...
 
int32_t CSL_bcdmaEnableTxChan (CSL_BcdmaCfg *pCfg, uint32_t chanIdx)
 Enable a transmit channel. More...
 
int32_t CSL_bcdmaDisableTxChan (CSL_BcdmaCfg *pCfg, uint32_t chanIdx)
 Disable a transmit channel. More...
 
int32_t CSL_bcdmaTeardownTxChan (CSL_BcdmaCfg *pCfg, uint32_t chanIdx, bool bForce, bool bWait)
 Teardown a transmit channel. More...
 
int32_t CSL_bcdmaPauseTxChan (CSL_BcdmaCfg *pCfg, uint32_t chanIdx)
 Pause a transmit channel. More...
 
int32_t CSL_bcdmaUnpauseTxChan (CSL_BcdmaCfg *pCfg, uint32_t chanIdx)
 Un-pause a transmit channel. More...
 
int32_t CSL_bcdmaTriggerTxChan (CSL_BcdmaCfg *pCfg, uint32_t chanIdx)
 Send a trigger event to a TX channel. More...
 
void CSL_bcdmaClearTxChanError (CSL_BcdmaCfg *pCfg, uint32_t chanIdx)
 Clear error indication in a transmit channel. More...
 
int32_t CSL_bcdmaEnableRxChan (CSL_BcdmaCfg *pCfg, uint32_t chanIdx)
 Enable a receive channel. More...
 
int32_t CSL_bcdmaDisableRxChan (CSL_BcdmaCfg *pCfg, uint32_t chanIdx)
 Disable a receive channel. More...
 
int32_t CSL_bcdmaTeardownRxChan (CSL_BcdmaCfg *pCfg, uint32_t chanIdx, bool bForce, bool bWait)
 Teardown a receive channel. More...
 
int32_t CSL_bcdmaPauseRxChan (CSL_BcdmaCfg *pCfg, uint32_t chanIdx)
 Pause a receive channel. More...
 
int32_t CSL_bcdmaUnpauseRxChan (CSL_BcdmaCfg *pCfg, uint32_t chanIdx)
 Un-pause a receive channel. More...
 
int32_t CSL_bcdmaTriggerRxChan (CSL_BcdmaCfg *pCfg, uint32_t chanIdx)
 Send a trigger event to an RX channel. More...
 
void CSL_bcdmaClearRxChanError (CSL_BcdmaCfg *pCfg, uint32_t chanIdx)
 Clear error indication in a receive channel. More...
 
void CSL_bcdmaCfgRxFlowIdFirewall (CSL_BcdmaCfg *pCfg, uint32_t outEvtNum)
 [udmap_only] Configure the receive flow ID range firewall More...
 
bool CSL_bcdmaGetRxFlowIdFirewallStatus (CSL_BcdmaCfg *pCfg, CSL_BcdmaRxFlowIdFirewallStatus *pRxFlowIdFwStatus)
 [udmap_only] Get receive flow ID range firewall status information More...
 
void CSL_bcdmaGetChanStats (CSL_BcdmaCfg *pCfg, uint32_t chanIdx, CSL_BcdmaChanDir chanDir, CSL_BcdmaChanStats *pChanStats)
 Get channel statistics. More...
 
void CSL_bcdmaDecChanStats (CSL_BcdmaCfg *pCfg, uint32_t chanIdx, CSL_BcdmaChanDir chanDir, const CSL_BcdmaChanStats *pChanStats)
 Decrement channel statistics. More...
 
int32_t CSL_bcdmaGetChanPeerReg (CSL_BcdmaCfg *pCfg, uint32_t chanIdx, CSL_BcdmaChanDir chanDir, uint32_t regIdx, uint32_t *pVal)
 Read a channel peer register. More...
 
int32_t CSL_bcdmaSetChanPeerReg (CSL_BcdmaCfg *pCfg, uint32_t chanIdx, CSL_BcdmaChanDir chanDir, uint32_t regIdx, uint32_t *pVal)
 Write a TX channel peer register. More...
 
int32_t CSL_bcdmaEnableLink (CSL_BcdmaCfg *pCfg, uint32_t chanIdx, CSL_BcdmaChanDir chanDir)
 Enable a directional data flow for a paired link. More...
 
static CSL_BcdmaTrResponseStatus CSL_bcdmaTrResponseGetStatusType (const CSL_BcdmaTrResponse *pTrResponse)
 Return the TR response status type. More...
 
static void CSL_bcdmaGetTdResponse (uint64_t tdResponseWord, CSL_BcdmaTdResponse *pTdResponse)
 Parses the TD response word. More...
 
static uint32_t CSL_bcdmaCppi5GetDescType (const void *pDesc)
 Get the descriptor type. More...
 
static void CSL_bcdmaCppi5TrGetReload (const CSL_BcdmaTRPD *pDesc, uint32_t *pReloadCount, uint32_t *pReloadIdx)
 Get TR descriptor reload information. More...
 
static void CSL_bcdmaCppi5TrSetReload (CSL_BcdmaTRPD *pDesc, uint32_t reloadCount, uint32_t reloadIdx)
 Set TR descriptor reload information. More...
 
static uint32_t CSL_bcdmaCppi5TrGetEntryStride (const CSL_BcdmaTRPD *pDesc)
 Get TR descriptor entry stride. More...
 
static void CSL_bcdmaCppi5TrSetEntryStride (CSL_BcdmaTRPD *pDesc, uint32_t entryStride)
 Set TR descriptor entry stride. More...
 
static void CSL_bcdmaCppi5TrSetPktLen (void *pDesc, uint32_t pktLen)
 Set the packet length of TR mode packet descriptors. More...
 
static uint32_t CSL_bcdmaCppi5GetPktLen (const void *pDesc)
 Get the packet length. More...
 
static void CSL_bcdmaCppi5SetPktLen (void *pDesc, uint32_t descType, uint32_t pktLen)
 Set the packet length. More...
 

Function Documentation

◆ CSL_bcdmaGetRevision()

uint32_t CSL_bcdmaGetRevision ( const CSL_BcdmaCfg pCfg)

Return revision of the BCDMA module.

This function returns the contents of the BCDMA revision register. Consult the BCDMA module documentation for a description of the contents of the revision register.

Parameters
pCfg[IN] Pointer to the BCDMA configuration structure
Returns
The 32-bit revision register is returned.

◆ CSL_bcdmaGetRevisionInfo()

int32_t CSL_bcdmaGetRevisionInfo ( const CSL_BcdmaCfg pCfg,
CSL_BcdmaRevision pRev 
)

Return revision information of the BCDMA module.

This function returns revision information for the BCDMA module.

Parameters
pCfg[IN] Pointer to the BCDMA configuration structure
pRev[OUT] Pointer to a CSL_BcdmaRevision structure where the revision information is returned
Returns
CSL_PASS = Function executed successfully CSL_EFAIL = Function execution failed

◆ CSL_bcdmaInitCfg()

void CSL_bcdmaInitCfg ( CSL_BcdmaCfg pCfg)

Initialize contents of a BCDMA configuration structure.

This function initializes the contents of the specified BCDMA configuration structure.

All elements of the CSL_BcdmaCfg structure are initialized to zero.

This function should not be called after calling CSL_bcdmaGetCfg as the BCDMA module configuration stored in the BCDMA configuration structure will be overwritten with zeros.

Parameters
pCfg[IN] Pointer to the BCDMA configuration structure
Returns
None

◆ CSL_bcdmaGetCfg()

void CSL_bcdmaGetCfg ( CSL_BcdmaCfg pCfg)

Return BCDMA configuration information.

This function populates the BCDMA configuration structure with configuration and capability information for the BCDMA module. This information is needed by other BCDMA API functions.

See the CSL_BcdmaCfg structure for details on the information that is returned.

This function must be called before calling any other BCDMA API function except for the CSL_bcdmaInitCfg function. Note that the register pointer elements in the BCDMA configuration structure must be initialized by the caller prior to calling this function.

Parameters
pCfg[IN/OUT] Pointer to the BCDMA configuration structure
Returns
None

◆ CSL_bcdmaInitTxChanCfg()

void CSL_bcdmaInitTxChanCfg ( CSL_BcdmaTxChanCfg pTxChanCfg)

Initialize a CSL_BcdmaTxChanCfg structure.

This function initializes the specified CSL_BcdmaTxChanCfg structure to known, safe values. Software then only needs to configure elements that are different than their initialized values prior to calling the CSL_bcdmaTxChanCfg function.

All elements of the CSL_BcdmaTxChanCfg structure are initialized to zero except for the following:

chanType        = CSL_BCDMA_CHAN_TYPE_REF_PKT_RING;
fetchWordSize   = CSL_BCDMA_FETCH_WORD_SIZE_16;
trEventNum      = CSL_BCDMA_NO_EVENT;
errEventNum     = CSL_BCDMA_NO_EVENT;
Parameters
pTxChanCfg[OUT] Pointer to a CSL_BcdmaTxChanCfg structure
Returns
None

◆ CSL_bcdmaInitRxChanCfg()

void CSL_bcdmaInitRxChanCfg ( CSL_BcdmaRxChanCfg pRxChanCfg)

Initialize a CSL_BcdmaRxChanCfg structure.

This function initializes the specified CSL_BcdmaRxChanCfg structure to known, safe values. Software then only needs to configure elements that are different than their initialized values prior to calling the CSL_bcdmaRxChanCfg function.

All elements of the CSL_BcdmaRxChanCfg structure are initialized to zero except for the following:

chanType            = CSL_BCDMA_CHAN_TYPE_REF_PKT_RING;
fetchWordSize       = CSL_BCDMA_FETCH_WORD_SIZE_16;
trEventNum          = CSL_BCDMA_NO_EVENT;
errEventNum         = CSL_BCDMA_NO_EVENT;
flowIdFwRangeCnt    = CSL_BCDMA_RXCCFG_CHAN_RFLOW_RNG_FLOWID_CNT_RESETVAL;
Parameters
pRxChanCfg[OUT] Pointer to a CSL_BcdmaRxChanCfg structure
Returns
None

◆ CSL_bcdmaInitRxFlowCfg()

void CSL_bcdmaInitRxFlowCfg ( CSL_BcdmaRxFlowCfg pFlow)

Initialize a CSL_BcdmaRxFlowCfg structure.

This function initializes the specified CSL_BcdmaRxFlowCfg structure to known, safe values. Software then only needs to configure elements that are different than their initialized values prior to calling the CSL_bcdmaRxFlowCfg function.

All elements of the CSL_BcdmaRxFlowCfg structure are initialized to zero.

Parameters
pFlow[OUT] Pointer to a CSL_BcdmaRxFlowCfg structure
Returns
None

◆ CSL_bcdmaChanOp()

int32_t CSL_bcdmaChanOp ( CSL_BcdmaCfg pCfg,
CSL_BcdmaChanOp  chanOp,
CSL_BcdmaChanType  chanType,
uint32_t  chanIdx,
void *  pOpData 
)

Perform a channel operation.

This function performs the operation specified by 'chanOp' on the channel specified by channel type 'chanType' and index 'chanIdx'. Any operation- specific input parameters or output values are provided in the structure pointed to by 'pOpData'.

The following table describes the valid channel operations and the structure type to be passed in 'pOpData':

'chanOp' Description 'pOpData'


CSL_BCDMA_CHAN_OP_CONFIG Configure channel CSL_BcdmaTxChanCfg ('chanType' == CSL_BCDMA_CHAN_TYPE_BLOCK_COPY) CSL_BcdmaTxChanCfg ('chanType' == CSL_BCDMA_CHAN_TYPE_SPLIT_TX) CSL_BcdmaRxChanCfg ('chanType' == CSL_BCDMA_CHAN_TYPE_SPLIT_RX) CSL_BCDMA_CHAN_OP_ENABLE Enable channel N/A CSL_BCDMA_CHAN_OP_DISABLE Disable channel N/A CSL_BCDMA_CHAN_OP_PAUSE Pause channel N/A CSL_BCDMA_CHAN_OP_RESUME Resume channel N/A CSL_BCDMA_CHAN_OP_TEARDOWN Teardown channel CSL_BcdmaTeardownOpts (optional) Notes:

  • Channel can be torn down only when it is enabled
  • pOpData (CSL_BcdmaTeardownOpts) is optional. If NULL, then force and wait CSL_BcdmaTeardownOpts fields are assumed 0. CSL_BCDMA_CHAN_OP_TRIGGER Trigger channel N/A Notes: This operation is valid only for 'chanType' == CSL_BCDMA_CHAN_TYPE_BLOCK_COPY CSL_BCDMA_CHAN_OP_GET_RT Get channel real-time values CSL_BcdmaRT CSL_BCDMA_CHAN_OP_SET_RT Set channel real-time values CSL_BcdmaRT CSL_BCDMA_CHAN_OP_GET_STATS Get channel statistics CSL_BcdmaChanStats CSL_BCDMA_CHAN_OP_DEC_STATS Decrement channel statistics CSL_BcdmaChanStats CSL_BCDMA_CHAN_OP_GET_REMOTE_PEER_REG Get remote peer reg value CSL_BcdmaRemotePeerOpts CSL_BCDMA_CHAN_OP_SET_REMOTE_PEER_REG Set remote peer reg value CSL_BcdmaRemotePeerOpts CSL_BCDMA_CHAN_OP_SET_BURST_SIZE Set channel burst size CSL_BcdmaChanBurstSize CSL_BCDMA_CHAN_OP_CLEAR_ERROR Clear channel error N/A
Parameters
pCfg[IN] Pointer to the BCDMA configuration structure
chanOp[IN] Channel operation. See CSL_BcdmaChanOp.
chanType[IN] Channel type. See CSL_BcdmaChanType.
chanIdx[IN] Zero-based channel index
pOpData[IN/OUT] Pointer to optional operation-specific structure
Returns
CSL_PASS = Function executed successfully CSL_EFAIL = Function execution failed CSL_EBADARGS = One or more arguments are invalid CSL_EINVALID_PARAMS = One or more parameters in 'pOpData' are invalid

◆ CSL_bcdmaSetPerfCtrl()

void CSL_bcdmaSetPerfCtrl ( CSL_BcdmaCfg pCfg,
uint32_t  rxRetryTimeoutCnt 
)

Set performance control parmeters.

This function is used to set performance control paramaters available in the BCDMA module.

Parameters
pCfg[IN] Pointer to the BCDMA configuration structure
rxRetryTimeoutCnt[IN] This parameter specifies the minimum amount of time (in clock cycles) that an Rx channel will be required to wait when it encounters a buffer starvation condition and the Rx error handling bit is set to 1
Returns
None

◆ CSL_bcdmaSetUtcCtrl()

void CSL_bcdmaSetUtcCtrl ( CSL_BcdmaCfg pCfg,
uint32_t  startingThreadNum 
)

[udmap_only] Set UTC control parmeters

This function is used to set UTC control paramaters available in the BCDMA module.

Parameters
pCfg[IN] Pointer to the BCDMA configuration structure
startingThreadNum[IN] This parameter specifies the starting PSI-L thread number for the external UTC
Returns
None

◆ CSL_bcdmaRxFlowCfg()

int32_t CSL_bcdmaRxFlowCfg ( CSL_BcdmaCfg pCfg,
uint32_t  flow,
const CSL_BcdmaRxFlowCfg pFlow 
)

[udmap_only] Configure an RX flow

This function initializes a receive flow with values specified in the CSL_BcdmaRxFlowCfg structure.

Parameters
pCfg[IN] Pointer to the BCDMA configuration structure
flow[IN] Index of the receive flow to initialize
pFlow[IN] Pointer to a CSL_BcdmaRxFlowCfg structure containing initialization values
Returns
CSL_PASS = Function executed successfully CSL_EFAIL = Function execution failed

◆ CSL_bcdmaRxChanCfg()

int32_t CSL_bcdmaRxChanCfg ( CSL_BcdmaCfg pCfg,
uint32_t  chanIdx,
const CSL_BcdmaRxChanCfg pRxChanCfg 
)

Configure an RX channel.

This function initializes a receive channel with values specified in the CSL_BcdmaRxChanCfg structure.

Parameters
pCfg[IN] Pointer to the BCDMA configuration structure
chanIdx[IN] Index of the receive channel to initialize
pRxChanCfg[IN] Pointer to a CSL_BcdmaRxChanCfg structure containing initialization values
Returns
CSL_PASS = Function executed successfully CSL_EFAIL = Function execution failed

◆ CSL_bcdmaTxChanCfg()

int32_t CSL_bcdmaTxChanCfg ( CSL_BcdmaCfg pCfg,
uint32_t  chanIdx,
const CSL_BcdmaTxChanCfg pTxChanCfg 
)

Configure a TX channel.

This function initializes a transmit channel with values specified in the CSL_BcdmaTxChanCfg structure.

Parameters
pCfg[IN] Pointer to the BCDMA configuration structure
chanIdx[IN] Index of the transmit channel to initialize
pTxChanCfg[IN] Pointer to a CSL_BcdmaTxChanCfg structure containing initialization values
Returns
CSL_PASS = Function executed successfully CSL_EFAIL = Function execution failed

◆ CSL_bcdmaRxChanSetTrEvent()

int32_t CSL_bcdmaRxChanSetTrEvent ( CSL_BcdmaCfg pCfg,
uint32_t  chanIdx,
uint32_t  trEventNum 
)

[udmap_only] Configure an RX channel TR event

Parameters
pCfg[IN] Pointer to the BCDMA configuration structure
chanIdx[IN] Index of the receive channel to initialize
trEventNum[IN] Specifies a global event number to generate anytime the required event generation criteria specified in a TR are met Set to CSL_BCDMA_NO_EVENT for no event generation.
Returns
CSL_PASS = Function executed successfully CSL_EFAIL = Function execution failed

◆ CSL_bcdmaTxChanSetTrEvent()

int32_t CSL_bcdmaTxChanSetTrEvent ( CSL_BcdmaCfg pCfg,
uint32_t  chanIdx,
uint32_t  trEventNum 
)

[udmap_only] Configure an TX channel TR event

Parameters
pCfg[IN] Pointer to the BCDMA configuration structure
chanIdx[IN] Index of the transmit channel to initialize
trEventNum[IN] Specifies a global event number to generate anytime the required event generation criteria specified in a TR are met Set to CSL_BCDMA_NO_EVENT for no event generation.
Returns
CSL_PASS = Function executed successfully CSL_EFAIL = Function execution failed

◆ CSL_bcdmaRxChanSetBurstSize()

int32_t CSL_bcdmaRxChanSetBurstSize ( CSL_BcdmaCfg pCfg,
uint32_t  chanIdx,
CSL_BcdmaChanBurstSize  burstSize 
)

Configure RX channel burst size.

This function enables configuration of the nominal burst size and alignment for data transfers on the specified RX channel. The default burst size is 64 bytes (a value of CSL_BCDMA_CHAN_BURST_SIZE_64_BYTES).

Parameters
pCfg[IN] Pointer to the BCDMA configuration structure
chanIdx[IN] Index of the receive channel to initialize
burstSize[IN] Burst size value. See CSL_BcdmaChanBurstSize for a list of valid burst size values.
Returns
CSL_PASS = Function executed successfully CSL_EFAIL = Function execution failed (burstSize is invalid or this function is not available in the version of BCDMA being used)

◆ CSL_bcdmaTxChanSetBurstSize()

int32_t CSL_bcdmaTxChanSetBurstSize ( CSL_BcdmaCfg pCfg,
uint32_t  chanIdx,
CSL_BcdmaChanBurstSize  burstSize 
)

Configure TX channel burst size.

This function enables configuration of the nominal burst size and alignment for data transfers on the specified TX channel. The default burst size is 64 bytes (a value of CSL_BCDMA_CHAN_BURST_SIZE_64_BYTES).

Parameters
pCfg[IN] Pointer to the BCDMA configuration structure
chanIdx[IN] Index of the transmit channel to initialize
burstSize[IN] Burst size value. See CSL_BcdmaChanBurstSize for a list of valid burst size values.
Returns
CSL_PASS = Function executed successfully CSL_EFAIL = Function execution failed (burstSize is invalid or this function is not available in the version of BCDMA being used)

◆ CSL_bcdmaGetRxRT()

int32_t CSL_bcdmaGetRxRT ( CSL_BcdmaCfg pCfg,
uint32_t  chanIdx,
CSL_BcdmaRT pRT 
)

Get an RX channel's real-time register values.

This function returns the real-time register values for the specified receive channel.

Parameters
pCfg[IN] Pointer to the BCDMA configuration structure
chanIdx[IN] Index of the receive channel
pRT[OUT] Pointer to a CSL_BcdmaRT structure where values are returned
Returns
CSL_PASS = Function executed successfully CSL_EFAIL = Function execution failed

◆ CSL_bcdmaGetTxRT()

int32_t CSL_bcdmaGetTxRT ( CSL_BcdmaCfg pCfg,
uint32_t  chanIdx,
CSL_BcdmaRT pRT 
)

Get a TX channel's real-time register values.

This function returns the real-time register values for the specified transmit channel.

Parameters
pCfg[IN] Pointer to the BCDMA configuration structure
chanIdx[IN] Index of the transmit channel
pRT[OUT] Pointer to a CSL_BcdmaRT structure where values are returned
Returns
CSL_PASS = Function executed successfully CSL_EFAIL = Function execution failed

◆ CSL_bcdmaSetRxRT()

int32_t CSL_bcdmaSetRxRT ( CSL_BcdmaCfg pCfg,
uint32_t  chanIdx,
const CSL_BcdmaRT pRT 
)

Set an RX channel's real-time register values.

This function sets the real-time register values for the specified receive channel.

Parameters
pCfg[IN] Pointer to the BCDMA configuration structure
chanIdx[IN] Index of the receive channel
pRT[IN] Pointer to a CSL_BcdmaRT structure containing initialization values
Returns
CSL_PASS = Function executed successfully CSL_EFAIL = Function execution failed

◆ CSL_bcdmaSetTxRT()

int32_t CSL_bcdmaSetTxRT ( CSL_BcdmaCfg pCfg,
uint32_t  chanIdx,
const CSL_BcdmaRT pRT 
)

Set a TX channel's real-time register values.

This function sets the real-time register values for the specified transmit channel.

Parameters
pCfg[IN] Pointer to the BCDMA configuration structure
chanIdx[IN] Index of the transmit channel
pRT[IN] Pointer to a CSL_BcdmaRT structure containing initialization values
Returns
CSL_PASS = Function executed successfully CSL_EFAIL = Function execution failed

◆ CSL_bcdmaEnableTxChan()

int32_t CSL_bcdmaEnableTxChan ( CSL_BcdmaCfg pCfg,
uint32_t  chanIdx 
)

Enable a transmit channel.

This function enables the transmit channel specified by 'chanIdx'.

Parameters
pCfg[IN] Pointer to the BCDMA configuration structure
chanIdx[IN] The index of the transmit channel
Returns
CSL_PASS = Function executed successfully CSL_EFAIL = Function execution failed

◆ CSL_bcdmaDisableTxChan()

int32_t CSL_bcdmaDisableTxChan ( CSL_BcdmaCfg pCfg,
uint32_t  chanIdx 
)

Disable a transmit channel.

This function disables the transmit channel specified by 'chanIdx'.

Parameters
pCfg[IN] Pointer to the BCDMA configuration structure
chanIdx[IN] The index of the transmit channel
Returns
CSL_PASS = Function executed successfully CSL_EFAIL = Function execution failed

◆ CSL_bcdmaTeardownTxChan()

int32_t CSL_bcdmaTeardownTxChan ( CSL_BcdmaCfg pCfg,
uint32_t  chanIdx,
bool  bForce,
bool  bWait 
)

Teardown a transmit channel.

This function tears down the transmit channel specified by 'chanIdx' at the next packet boundary.

Parameters
pCfg[IN] Pointer to the BCDMA configuration structure
chanIdx[IN] The index of the transmit channel
bForce[IN] If true, the channel is torn down without attempting to preserve data or wait for events (flushes the channel). If false, any packets in flight are completed prior to the channel being torn down.
bWait[IN] If true, wait for the teardown operation to complete. Otherwise, return immediately.
Returns
CSL_PASS = Function executed successfully CSL_EFAIL = Function execution failed (channel is disabled)

◆ CSL_bcdmaPauseTxChan()

int32_t CSL_bcdmaPauseTxChan ( CSL_BcdmaCfg pCfg,
uint32_t  chanIdx 
)

Pause a transmit channel.

This function pauses the transmit channel specified by 'chanIdx' at the next packet boundary. This is a more graceful method of halting processing than disabling the channel as it will not allow any current packets to underflow.

Parameters
pCfg[IN] Pointer to the BCDMA configuration structure
chanIdx[IN] The index of the transmit channel
Returns
CSL_PASS = Function executed successfully CSL_EFAIL = Function execution failed (channel is disabled)

◆ CSL_bcdmaUnpauseTxChan()

int32_t CSL_bcdmaUnpauseTxChan ( CSL_BcdmaCfg pCfg,
uint32_t  chanIdx 
)

Un-pause a transmit channel.

This function un-pauses the transmit channel specified by 'chanIdx'.

Parameters
pCfg[IN] Pointer to the BCDMA configuration structure
chanIdx[IN] The index of the transmit channel
Returns
CSL_PASS = Function executed successfully CSL_EFAIL = Function execution failed (channel is disabled)

◆ CSL_bcdmaTriggerTxChan()

int32_t CSL_bcdmaTriggerTxChan ( CSL_BcdmaCfg pCfg,
uint32_t  chanIdx 
)

Send a trigger event to a TX channel.

This function causes a trigger event to be sent to the specified transmit channel.

Parameters
pCfg[IN] Pointer to the BCDMA configuration structure
chanIdx[IN] Index of the transmit channel
Returns
CSL_PASS = Function executed successfully CSL_EFAIL = Function execution failed

◆ CSL_bcdmaClearTxChanError()

void CSL_bcdmaClearTxChanError ( CSL_BcdmaCfg pCfg,
uint32_t  chanIdx 
)

Clear error indication in a transmit channel.

This function clears the error indication in the specified transmit channel.

Parameters
pCfg[IN] Pointer to the BCDMA configuration structure
chanIdx[IN] The index of the transmit channel
Returns
None

◆ CSL_bcdmaEnableRxChan()

int32_t CSL_bcdmaEnableRxChan ( CSL_BcdmaCfg pCfg,
uint32_t  chanIdx 
)

Enable a receive channel.

This function enables the receive channel specified by 'chanIdx'.

Parameters
pCfg[IN] Pointer to the BCDMA configuration structure
chanIdx[IN] The index of the receive channel
Returns
CSL_PASS = Function executed successfully CSL_EFAIL = Function execution failed

◆ CSL_bcdmaDisableRxChan()

int32_t CSL_bcdmaDisableRxChan ( CSL_BcdmaCfg pCfg,
uint32_t  chanIdx 
)

Disable a receive channel.

This function disables the receive channel specified by 'chanIdx'.

Parameters
pCfg[IN] Pointer to the BCDMA configuration structure
chanIdx[IN] The index of the receive channel
Returns
CSL_PASS = Function executed successfully CSL_EFAIL = Function execution failed

◆ CSL_bcdmaTeardownRxChan()

int32_t CSL_bcdmaTeardownRxChan ( CSL_BcdmaCfg pCfg,
uint32_t  chanIdx,
bool  bForce,
bool  bWait 
)

Teardown a receive channel.

This function tears down the receive channel specified by 'chanIdx' at the next packet boundary.

Parameters
pCfg[IN] Pointer to the BCDMA configuration structure
chanIdx[IN] The index of the receive channel
bForce[IN] If true, the channel is torn down without attempting to preserve data or wait for events (flushes the channel). If false, any packets in flight are completed prior to the channel being torn down.
bWait[IN] If true, wait for the teardown operation to complete. Otherwise, return immediately.
Returns
CSL_PASS = Function executed successfully CSL_EFAIL = Function execution failed (channel is disabled)

◆ CSL_bcdmaPauseRxChan()

int32_t CSL_bcdmaPauseRxChan ( CSL_BcdmaCfg pCfg,
uint32_t  chanIdx 
)

Pause a receive channel.

This function pauses the receive channel specified by 'chanIdx' at the next packet boundary. This is a more graceful method of halting processing than disabling the channel as it will not allow any current packets to underflow.

Parameters
pCfg[IN] Pointer to the BCDMA configuration structure
chanIdx[IN] The index of the receive channel
Returns
CSL_PASS = Function executed successfully CSL_EFAIL = Function execution failed (channel is disabled)

◆ CSL_bcdmaUnpauseRxChan()

int32_t CSL_bcdmaUnpauseRxChan ( CSL_BcdmaCfg pCfg,
uint32_t  chanIdx 
)

Un-pause a receive channel.

This function un-pauses the receive channel specified by 'chanIdx'.

Parameters
pCfg[IN] Pointer to the BCDMA configuration structure
chanIdx[IN] The index of the transmit channel
Returns
CSL_PASS = Function executed successfully CSL_EFAIL = Function execution failed (channel is disabled)

◆ CSL_bcdmaTriggerRxChan()

int32_t CSL_bcdmaTriggerRxChan ( CSL_BcdmaCfg pCfg,
uint32_t  chanIdx 
)

Send a trigger event to an RX channel.

This function causes a trigger event to be sent to the specified receive channel.

Parameters
pCfg[IN] Pointer to the BCDMA configuration structure
chanIdx[IN] Index of the receive channel
Returns
CSL_PASS = Function executed successfully CSL_EFAIL = Function execution failed

◆ CSL_bcdmaClearRxChanError()

void CSL_bcdmaClearRxChanError ( CSL_BcdmaCfg pCfg,
uint32_t  chanIdx 
)

Clear error indication in a receive channel.

This function clears the error indication in the specified receive channel.

Parameters
pCfg[IN] Pointer to the BCDMA configuration structure
chanIdx[IN] The index of the receive channel
Returns
None

◆ CSL_bcdmaCfgRxFlowIdFirewall()

void CSL_bcdmaCfgRxFlowIdFirewall ( CSL_BcdmaCfg pCfg,
uint32_t  outEvtNum 
)

[udmap_only] Configure the receive flow ID range firewall

This function is used to configure the receive flow ID range firewall.

Parameters
pCfg[IN] Pointer to the BCDMA configuration structure
outEvtNum[IN] Output event number to use when the receive flow ID range firewall detects an error
Returns
None

◆ CSL_bcdmaGetRxFlowIdFirewallStatus()

bool CSL_bcdmaGetRxFlowIdFirewallStatus ( CSL_BcdmaCfg pCfg,
CSL_BcdmaRxFlowIdFirewallStatus pRxFlowIdFwStatus 
)

[udmap_only] Get receive flow ID range firewall status information

This function returns information from the receive flow ID range firewall.

If the receive flow ID firewall has detected an out of range flow ID, the function returns true and the fields within the CSL_BcdmaRxFlowIdFirewallStatus structure contain error details. The function will automatically reset the receive flow ID firewall to capture the next error.

If the receive flow ID firewall has not detected an out of range flow ID, the function returns false and the fields within the CSL_BcdmaRxFlowIdFirewallStatus structure are not updated.

Parameters
pCfg[IN] Pointer to the BCDMA configuration structure
pRxFlowIdFwStatus[IN] Pointer to a CSL_BcdmaRxFlowIdFirewallStatus structure containing error details (valid only when true is returned)
Returns
true if the receive flow ID range firewall has detected an out of range flow ID, false if no error was detected

◆ CSL_bcdmaGetChanStats()

void CSL_bcdmaGetChanStats ( CSL_BcdmaCfg pCfg,
uint32_t  chanIdx,
CSL_BcdmaChanDir  chanDir,
CSL_BcdmaChanStats pChanStats 
)

Get channel statistics.

This function is used to read statistics for a transmit or receive channel.

Parameters
pCfg[IN] Pointer to the BCDMA configuration structure
chanIdx[IN] Index of the channel
chanDir[IN] Channel direction (see CSL_BcdmaChanDir)
pChanStats[OUT] Pointer to a CSL_BcdmaChanStats structure where the statistics are returned
Returns
None

◆ CSL_bcdmaDecChanStats()

void CSL_bcdmaDecChanStats ( CSL_BcdmaCfg pCfg,
uint32_t  chanIdx,
CSL_BcdmaChanDir  chanDir,
const CSL_BcdmaChanStats pChanStats 
)

Decrement channel statistics.

This function is used to decrement statistics for a transmit or receive channel by the counts contained in the specified CSL_BcdmaChanStats structure.

Parameters
pCfg[IN] Pointer to the BCDMA configuration structure
chanIdx[IN] Index of the channel
chanDir[IN] Channel direction (see CSL_BcdmaChanDir)
pChanStats[IN] Pointer to a CSL_BcdmaChanStats structure containing the counts to decrement each statistic by
Returns
None

◆ CSL_bcdmaGetChanPeerReg()

int32_t CSL_bcdmaGetChanPeerReg ( CSL_BcdmaCfg pCfg,
uint32_t  chanIdx,
CSL_BcdmaChanDir  chanDir,
uint32_t  regIdx,
uint32_t *  pVal 
)

Read a channel peer register.

This function is used to read the value from a peer register for the specified channel.

Parameters
pCfg[IN] Pointer to the BCDMA configuration structure
chanIdx[IN] Index of the channel
chanDir[IN] Channel direction (see CSL_BcdmaChanDir)
regIdx[IN] Peer register index (0..15)
pVal[OUT] Pointer where the register value is returned
Returns
CSL_PASS = Function executed successfully CSL_EFAIL = Function execution failed (regIdx is out of range)

◆ CSL_bcdmaSetChanPeerReg()

int32_t CSL_bcdmaSetChanPeerReg ( CSL_BcdmaCfg pCfg,
uint32_t  chanIdx,
CSL_BcdmaChanDir  chanDir,
uint32_t  regIdx,
uint32_t *  pVal 
)

Write a TX channel peer register.

This function is used to write a value to a peer register for the specified transmit channel.

Parameters
pCfg[IN] Pointer to the BCDMA configuration structure
chanIdx[IN] Index of the transmit channel
chanDir[IN] Channel direction (see CSL_BcdmaChanDir)
regIdx[IN] Peer register index (0..15)
pVal[IN] Pointer to the register value to be written
Returns
CSL_PASS = Function executed successfully CSL_EFAIL = Function execution failed (regIdx is out of range)

◆ CSL_bcdmaEnableLink()

int32_t CSL_bcdmaEnableLink ( CSL_BcdmaCfg pCfg,
uint32_t  chanIdx,
CSL_BcdmaChanDir  chanDir 
)

Enable a directional data flow for a paired link.

This function is used to enable a directional data flow for a given BCDMA channel between BCDMA and a paired PSIL peer.

Parameters
pCfg[IN] Pointer to the BCDMA configuration structure
chanIdx[IN] Index of the BCDMA channel (TX or RX)
chanDir[IN] Channel direction (TX or RX, see CSL_BcdmaChanDir)
Returns
CSL_PASS = Function executed successfully CSL_EFAIL = Function execution failed (chanIdx is invalid)

◆ CSL_bcdmaTrResponseGetStatusType()

static CSL_BcdmaTrResponseStatus CSL_bcdmaTrResponseGetStatusType ( const CSL_BcdmaTrResponse *  pTrResponse)
inlinestatic

Return the TR response status type.

This function returns the status type of the specified TR response. See CSL_BcdmaTrResponseStatus for available status types.

Parameters
pTrResponse[IN] Pointer to the TR Response structure
Returns
The status type of the specified TR response

◆ CSL_bcdmaGetTdResponse()

static void CSL_bcdmaGetTdResponse ( uint64_t  tdResponseWord,
CSL_BcdmaTdResponse *  pTdResponse 
)
inlinestatic

Parses the TD response word.

This function parses the teardown response word received from the completion queue.

Parameters
tdResponseWord[IN] TD Response word to parse
pTdResponse[OUT] Pointer to the TD Response structure to be filled

◆ CSL_bcdmaCppi5GetDescType()

static uint32_t CSL_bcdmaCppi5GetDescType ( const void *  pDesc)
inlinestatic

Get the descriptor type.

This function returns the type of descriptor. Valid descriptor types are: 3 = Transfer Request mode (TR) packet descriptor

Parameters
pDesc[IN] Pointer to the descriptor
Returns
Descriptor type

◆ CSL_bcdmaCppi5TrGetReload()

static void CSL_bcdmaCppi5TrGetReload ( const CSL_BcdmaTRPD pDesc,
uint32_t *  pReloadCount,
uint32_t *  pReloadIdx 
)
inlinestatic

Get TR descriptor reload information.

This function returns reload information for a transfer-request (TR) type of descriptor. See CSL_bcdmaCppi5TrSetReload for a description of this reload information.

Parameters
pDesc[IN] Pointer to the TR descriptor
pReloadCount[IN] Pointer where to store reload count
pReloadIdx[OUT] Pointer where to store reload index
Returns
None

◆ CSL_bcdmaCppi5TrSetReload()

static void CSL_bcdmaCppi5TrSetReload ( CSL_BcdmaTRPD pDesc,
uint32_t  reloadCount,
uint32_t  reloadIdx 
)
inlinestatic

Set TR descriptor reload information.

This function sets reload information for a transfer-request (TR) type of descriptor. Reload information includes:

reload count Specifies how many times to return to the reload index upon reaching the last entry

reload index Specifies the value to set the current processing index to when the last entry is processed and reload enable is set to 1. This is basically an absolute index to jump to on the 2nd and following passes through the TR packet.

Parameters
pDesc[IN] Pointer to the TR descriptor
reloadCount[IN] reload count
reloadIdx[IN] reload index
Returns
None

◆ CSL_bcdmaCppi5TrGetEntryStride()

static uint32_t CSL_bcdmaCppi5TrGetEntryStride ( const CSL_BcdmaTRPD pDesc)
inlinestatic

Get TR descriptor entry stride.

This function returns the stride between TR entries. See CSL_bcdmaCppi5TrSetEntryStride for valid stride values.

Parameters
pDesc[IN] Pointer to the TR descriptor
Returns
Encoded TR entry stride

◆ CSL_bcdmaCppi5TrSetEntryStride()

static void CSL_bcdmaCppi5TrSetEntryStride ( CSL_BcdmaTRPD pDesc,
uint32_t  entryStride 
)
inlinestatic

Set TR descriptor entry stride.

This function sets the stride between TR entries. This value must be set large enough that any TR in the buffer will fit within the given dimension. TRs are expected to be placed on boundaries as given in this dimension.

The stride value is encoded as follows: 0 = 16 byte TR entry 1 = 32-byte TR entry 2 = 64-byte TR entry 3 = 128-byte TR entry

Parameters
pDesc[IN] Pointer to the TR descriptor
entryStride[IN] Encoded TR entry stride
Returns
None

◆ CSL_bcdmaCppi5TrSetPktLen()

static void CSL_bcdmaCppi5TrSetPktLen ( void *  pDesc,
uint32_t  pktLen 
)
inlinestatic

Set the packet length of TR mode packet descriptors.

This function sets the packet length of TR mode packet descriptors.

Parameters
pDesc[IN] Pointer to the descriptor
pktLen[IN] Number of TRs in the packet
Returns
None

◆ CSL_bcdmaCppi5GetPktLen()

static uint32_t CSL_bcdmaCppi5GetPktLen ( const void *  pDesc)
inlinestatic

Get the packet length.

This function returns the packet length. The value returned depends on the type of descriptor as follows:

Host and mono mode packet descriptors: The length of the packet in bytes is returned

TR mode packet descriptors: The number of TRs in the packet is returned

Parameters
pDesc[IN] Pointer to the descriptor
Returns
Packet length

◆ CSL_bcdmaCppi5SetPktLen()

static void CSL_bcdmaCppi5SetPktLen ( void *  pDesc,
uint32_t  descType,
uint32_t  pktLen 
)
inlinestatic

Set the packet length.

This function sets the packet length. The meaning of the pktLen argument depends on the type of descriptor as follows:

Host and mono mode packet descriptors: pktLen = the length of the packet in bytes

TR mode packet descriptors: pktlen = the number of TRs in the packet

Parameters
pDesc[IN] Pointer to the descriptor
descType[IN] Descriptor type
pktLen[IN] Packet length
Returns
None