PDK API Guide for AM64x
RINGACC Functions

Introduction

Functions

void CSL_lcdma_ringaccInitCfg (CSL_LcdmaRingaccCfg *pCfg)
 [lcdma_ringacc_only] Initialize a CSL_LcdmaRingaccCfg structure More...
 
uint32_t CSL_lcdma_ringaccGetRevision (const CSL_LcdmaRingaccCfg *pCfg)
 [ringacc_only] Return revision of the RingAcc module. More...
 
void CSL_lcdma_ringaccInitRingCfg (CSL_LcdmaRingaccRingCfg *pRingCfg)
 Initialize a CSL_LcdmaRingaccRingCfg structure. More...
 
void CSL_lcdma_ringaccInitRingObj (uint32_t ringNum, CSL_LcdmaRingaccRingCfg *pRing)
 Initialize the ring object. More...
 
int32_t CSL_lcdma_ringaccInitRing (CSL_LcdmaRingaccCfg *pCfg, uint32_t ringNum, CSL_LcdmaRingaccRingCfg *pRing)
 Initialize a ring. More...
 
int32_t CSL_lcdma_ringaccSetEvent (CSL_LcdmaRingaccCfg *pCfg, uint32_t ringNum, uint32_t evtNum)
 [ringacc_only] Set the ring event More...
 
uint32_t CSL_lcdma_ringaccGetRingNum (const CSL_LcdmaRingaccRingCfg *pRing)
 Get the ring number associated with a ring. More...
 
void CSL_lcdma_ringaccSetRingOrderId (CSL_LcdmaRingaccCfg *pCfg, const CSL_LcdmaRingaccRingCfg *pRing, uint32_t orderId)
 [ringacc_only] Specify the orderid value for a ring More...
 
void CSL_lcdma_ringaccCfgRingCred (CSL_LcdmaRingaccCfg *pCfg, const CSL_LcdmaRingaccRingCfg *pRing, bool bEnable, bool bLock)
 [ringacc_only] Configure the security credentials for a ring More...
 
void CSL_lcdma_ringaccResetRing (CSL_LcdmaRingaccCfg *pCfg, CSL_LcdmaRingaccRingCfg *pRing)
 Reset a ring. More...
 
void * CSL_lcdma_ringaccGetForwardRingPtr (CSL_LcdmaRingaccCfg *pCfg, CSL_LcdmaRingaccRingCfg *pRing)
 Get pointer to next free forward ring element. More...
 
void * CSL_lcdma_ringaccGetReverseRingPtr (CSL_LcdmaRingaccCfg *pCfg, CSL_LcdmaRingaccRingCfg *pRing)
 Get pointer to next available reverse ring element. More...
 
static int32_t CSL_lcdma_ringaccSetForwardDoorbell (CSL_LcdmaRingaccCfg *pCfg, uint32_t ringNum, CSL_LcdmaRingaccRingMode mode, int32_t cnt)
 Write to the ring foward doorbell. More...
 
static void CSL_lcdma_ringaccSetReverseDoorbell (CSL_LcdmaRingaccCfg *pCfg, uint32_t ringNum, CSL_LcdmaRingaccRingMode mode, int32_t cnt)
 Write to the ring reverse doorbell. More...
 
static void CSL_lcdma_ringaccCommitToForwardRing (CSL_LcdmaRingaccCfg *pCfg, CSL_LcdmaRingaccRingCfg *pRing, int32_t cnt)
 Commit elements written to a ring. More...
 
static void CSL_lcdma_ringaccAckReverseRing (CSL_LcdmaRingaccCfg *pCfg, CSL_LcdmaRingaccRingCfg *pRing, int32_t cnt)
 Acknowledge elements read from a ring. More...
 
uint32_t CSL_lcdma_ringaccGetForwardRingIdx (const CSL_LcdmaRingaccCfg *pCfg, uint32_t ringNum)
 [ringacc_only] Get the current forward ring index. More...
 
uint32_t CSL_lcdma_ringaccGetReverseRingIdx (const CSL_LcdmaRingaccCfg *pCfg, uint32_t ringNum)
 [ringacc_only] Get the current reverse ring index. More...
 
uint32_t CSL_lcdma_ringaccGetForwardRingOcc (const CSL_LcdmaRingaccCfg *pCfg, uint32_t ringNum, CSL_LcdmaRingaccRingMode mode)
 Get the forward occupancy of a ring. More...
 
uint32_t CSL_lcdma_ringaccGetReverseRingOcc (const CSL_LcdmaRingaccCfg *pCfg, uint32_t ringNum, CSL_LcdmaRingaccRingMode mode)
 Get the reverse occupancy of a ring. More...
 
int32_t CSL_lcdma_ringaccCfgTrace (CSL_LcdmaRingaccCfg *pCfg, bool bTraceAll, bool bIncMsgData, uint32_t ringNum)
 [ringacc_only] Configure trace support More...
 
int32_t CSL_lcdma_ringaccSetTraceEnable (CSL_LcdmaRingaccCfg *pCfg, bool bEnable)
 Enable or disable trace support. More...
 
int32_t CSL_lcdma_ringaccEnableTrace (CSL_LcdmaRingaccCfg *pCfg)
 [ringacc_only] Enable trace support More...
 
int32_t CSL_lcdma_ringaccDisableTrace (CSL_LcdmaRingaccCfg *pCfg)
 [ringacc_only] Disable trace support More...
 
int32_t CSL_lcdma_ringaccCfgRingMonitor (CSL_LcdmaRingaccCfg *pCfg, uint32_t monNum, CSL_LcdmaRingAccMonitorType monType, uint32_t ringNum, uint32_t eventNum, CSL_LcdmaRingAccMonitorDataSrc dataSrc, uint32_t data0Val, uint32_t data1Val)
 [ringacc_only] Configure a ring monitor. More...
 
int32_t CSL_lcdma_ringaccReadRingMonitor (const CSL_LcdmaRingaccCfg *pCfg, uint32_t monNum, uint32_t *pData0, uint32_t *pData1)
 [ringacc_only] Read a ring monitor. More...
 
int32_t CSL_lcdma_ringaccPush32 (CSL_LcdmaRingaccCfg *pCfg, CSL_LcdmaRingaccRingCfg *pRing, uint32_t val, CSL_lcdma_ringaccMemOpsFxnPtr pfMemOps)
 Push a 32-bit value to a ring. More...
 
int32_t CSL_lcdma_ringaccPop32 (CSL_LcdmaRingaccCfg *pCfg, CSL_LcdmaRingaccRingCfg *pRing, uint32_t *pVal, CSL_lcdma_ringaccMemOpsFxnPtr pfMemOps)
 Pop a 32-bit value from a ring. More...
 
int32_t CSL_lcdma_ringaccHwPop32 (CSL_LcdmaRingaccCfg *pCfg, CSL_LcdmaRingaccRingCfg *pRing, uint32_t *pVal, CSL_lcdma_ringaccMemOpsFxnPtr pfMemOps)
 [ringacc_only] Mimic a hardware pop of a 32-bit value from the head of a ring More...
 
int32_t CSL_lcdma_ringaccPeek32 (CSL_LcdmaRingaccCfg *pCfg, CSL_LcdmaRingaccRingCfg *pRing, uint32_t *pVal, CSL_lcdma_ringaccMemOpsFxnPtr pfMemOps)
 Peek at a 32-bit value from a ring. More...
 
int32_t CSL_lcdma_ringaccPush64 (CSL_LcdmaRingaccCfg *pCfg, CSL_LcdmaRingaccRingCfg *pRing, uint64_t val, CSL_lcdma_ringaccMemOpsFxnPtr pfMemOps)
 Push a 64-bit value to a ring. More...
 
int32_t CSL_lcdma_ringaccPush64Multi (CSL_LcdmaRingaccCfg *pCfg, CSL_LcdmaRingaccRingCfg *pRing, uint64_t *pVals, uint32_t numValues, CSL_lcdma_ringaccMemOpsFxnPtr pfMemOps)
 Push multiple 64-bit values to a ring. More...
 
int32_t CSL_lcdma_ringaccPop64 (CSL_LcdmaRingaccCfg *pCfg, CSL_LcdmaRingaccRingCfg *pRing, uint64_t *pVal, CSL_lcdma_ringaccMemOpsFxnPtr pfMemOps)
 Pop a 64-bit value from a ring. More...
 
int32_t CSL_lcdma_ringaccPop64Multi (CSL_LcdmaRingaccCfg *pCfg, CSL_LcdmaRingaccRingCfg *pRing, uint64_t *pVals, uint32_t numValues, CSL_lcdma_ringaccMemOpsFxnPtr pfMemOps)
 Pop multiple 64-bit values from a ring. More...
 
int32_t CSL_lcdma_ringaccHwPop64 (CSL_LcdmaRingaccCfg *pCfg, CSL_LcdmaRingaccRingCfg *pRing, uint64_t *pVal, CSL_lcdma_ringaccMemOpsFxnPtr pfMemOps)
 [ringacc_only] Mimic a hardware pop of a 64-bit value from the head of a ring More...
 
int32_t CSL_lcdma_ringaccPeek64 (CSL_LcdmaRingaccCfg *pCfg, CSL_LcdmaRingaccRingCfg *pRing, uint64_t *pVal, CSL_lcdma_ringaccMemOpsFxnPtr pfMemOps)
 Peek at a 64-bit value from a ring. More...
 
int32_t CSL_lcdma_ringaccWrData (CSL_LcdmaRingaccCfg *pCfg, CSL_LcdmaRingaccRingCfg *pRing, uint8_t *pData, uint32_t numBytes, CSL_lcdma_ringaccMemOpsFxnPtr pfMemOps)
 Write data into a ring. More...
 
int32_t CSL_lcdma_ringaccRdData (CSL_LcdmaRingaccCfg *pCfg, CSL_LcdmaRingaccRingCfg *pRing, uint8_t *pData, uint32_t numBytes, CSL_lcdma_ringaccMemOpsFxnPtr pfMemOps)
 Read data from a ring. More...
 
int32_t CSL_lcdma_ringaccPeekData (CSL_LcdmaRingaccCfg *pCfg, CSL_LcdmaRingaccRingCfg *pRing, uint8_t *pData, uint32_t numBytes, CSL_lcdma_ringaccMemOpsFxnPtr pfMemOps)
 Peek at data from a ring. More...
 
uint64_t CSL_lcdma_ringaccClrAselInAddr (uint64_t addr)
 Clear the asel field in an address. More...
 
uint64_t CSL_lcdma_ringaccSetAselInAddr (uint64_t addr, CSL_LcdmaRingAccAselEndpoint asel)
 Set the asel field in an address. More...
 
bool CSL_lcdma_ringaccIsTeardownComplete (const CSL_LcdmaRingaccCfg *pCfg, uint32_t ringNum)
 Return teardown completion status of a ring. More...
 
void CSL_lcdma_ringaccAckTeardown (const CSL_LcdmaRingaccCfg *pCfg, uint32_t ringNum)
 Acknowledge teardown completion of a ring. More...
 
int32_t CSL_lcdma_ringaccDequeue (CSL_LcdmaRingaccCfg *pCfg, CSL_LcdmaRingaccRingCfg *pRing, uint64_t *pVal)
 Dequeue a value pushed to a ring in FIFO order. More...
 

Function Documentation

◆ CSL_lcdma_ringaccInitCfg()

void CSL_lcdma_ringaccInitCfg ( CSL_LcdmaRingaccCfg pCfg)

[lcdma_ringacc_only] Initialize a CSL_LcdmaRingaccCfg structure

This function initializes the specified CSL_LcdmaRingaccCfg structure to all 0's, except for the maxRings element which is populated with the maximum number of rings supported.

Parameters
pCfg[IN] Pointer to a CSL_LcdmaRingaccCfg structure containing the ring accelerator configuration
Returns
None

◆ CSL_lcdma_ringaccGetRevision()

uint32_t CSL_lcdma_ringaccGetRevision ( const CSL_LcdmaRingaccCfg pCfg)

[ringacc_only] Return revision of the RingAcc module.

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

Parameters
pCfg[IN] Pointer to a CSL_LcdmaRingaccCfg structure containing the ring accelerator configuration
Returns
The 32-bit revision register is returned.

◆ CSL_lcdma_ringaccInitRingCfg()

void CSL_lcdma_ringaccInitRingCfg ( CSL_LcdmaRingaccRingCfg pRingCfg)

Initialize a CSL_LcdmaRingaccRingCfg structure.

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

Parameters
pRingCfg[OUT] Pointer to a CSL_LcdmaRingaccRingCfg structure
Returns
None

◆ CSL_lcdma_ringaccInitRingObj()

void CSL_lcdma_ringaccInitRingObj ( uint32_t  ringNum,
CSL_LcdmaRingaccRingCfg pRing 
)

Initialize the ring object.

This function is used to initialize the ring object without configuring the ring.

Parameters
ringNum[IN] The number of the ring (0-1023) to be initialized
pRing[OUT] Pointer to a CSL_LcdmaRingaccRingCfg structure containing the ring configuration

◆ CSL_lcdma_ringaccInitRing()

int32_t CSL_lcdma_ringaccInitRing ( CSL_LcdmaRingaccCfg pCfg,
uint32_t  ringNum,
CSL_LcdmaRingaccRingCfg pRing 
)

Initialize a ring.

This function is used to initialize the ring specified by RingNum. A ring must be initialized prior to calling any of the following functions:

#CSL_lcdma_ringaccResetRing
#CSL_lcdma_ringaccGetForwardRingPtr
#CSL_lcdma_ringaccGetReverseRingPtr
#CSL_lcdma_ringaccCommitToForwardRing
#CSL_lcdma_ringaccAckReverseRing
#CSL_lcdma_ringaccSetRingOrderId

To use this function, allocate a CSL_LcdmaRingaccRingCfg structure and initialize the following structure elements. Then, pass a pointer to this structure along with the other required arguments.

virtBase    Virtual base address of the ring memory
physBase    Physical base address of the ring memory
mode        The mode of the ring
elCnt       Ring element count
elSz        Ring element size in bytes (4,8,16,32,64,128,256)
Parameters
pCfg[IN] Pointer to a CSL_LcdmaRingaccCfg structure containing the ring accelerator configuration
ringNum[IN] The number of the ring (0-1023) to be initialized
pRing[IN] Pointer to a CSL_LcdmaRingaccRingCfg structure containing the ring configuration
Returns
0 if successful, or -1 if an invalid argument is detected

◆ CSL_lcdma_ringaccSetEvent()

int32_t CSL_lcdma_ringaccSetEvent ( CSL_LcdmaRingaccCfg pCfg,
uint32_t  ringNum,
uint32_t  evtNum 
)

[ringacc_only] Set the ring event

This function is used to set the ring event based on RingNum.

Parameters
pCfg[IN] Pointer to a CSL_LcdmaRingaccCfg structure containing the ring accelerator configuration
ringNum[IN] The number of the ring (0-1023) to be initialized
evtNum[IN] Event number for the ring
Returns
0 if successful, or -1 if an invalid argument is detected

◆ CSL_lcdma_ringaccGetRingNum()

uint32_t CSL_lcdma_ringaccGetRingNum ( const CSL_LcdmaRingaccRingCfg pRing)

Get the ring number associated with a ring.

This function is used to get the ring number associated with the specified ring.

Parameters
pRing[IN] Pointer to a CSL_LcdmaRingaccRingCfg structure containing the ring configuration
Returns
Ring number

◆ CSL_lcdma_ringaccSetRingOrderId()

void CSL_lcdma_ringaccSetRingOrderId ( CSL_LcdmaRingaccCfg pCfg,
const CSL_LcdmaRingaccRingCfg pRing,
uint32_t  orderId 
)

[ringacc_only] Specify the orderid value for a ring

This function is used to specify the orderid value for a ring's destination transactions. If orderId == CSL_LCDMA_RINGACC_ORDERID_BYPASS, then the orderid from the source transaction is used.

Parameters
pCfg[IN] Pointer to a CSL_LcdmaRingaccCfg structure containing the ring accelerator configuration
pRing[IN] Pointer to a CSL_LcdmaRingaccRingCfg structure containing the ring configuration
orderId[IN] The orderId value, or CSL_LCDMA_RINGACC_ORDERID_BYPASS to use the orderid from the source transaction
Returns
None

◆ CSL_lcdma_ringaccCfgRingCred()

void CSL_lcdma_ringaccCfgRingCred ( CSL_LcdmaRingaccCfg pCfg,
const CSL_LcdmaRingaccRingCfg pRing,
bool  bEnable,
bool  bLock 
)

[ringacc_only] Configure the security credentials for a ring

This function is used to configure the security credentials for a ring.

Parameters
pCfg[IN] Pointer to a CSL_LcdmaRingaccCfg structure containing the ring accelerator configuration
pRing[IN] Pointer to a CSL_LcdmaRingaccRingCfg structure containing the ring configuration
bEnable[IN] true = Region is enabled, false = disabled
bLock[IN] true = Region is locked (region values cannot be changed), false = region is not locked
Returns
None

◆ CSL_lcdma_ringaccResetRing()

void CSL_lcdma_ringaccResetRing ( CSL_LcdmaRingaccCfg pCfg,
CSL_LcdmaRingaccRingCfg pRing 
)

Reset a ring.

This function is used to reset a ring to a known, initial state. The following operations are performed when a ring is reset: • - Reset the internal pointer to the ring base address • - Set the number of entries in both the forward and reverse rings (FOCC and ROCC) to zero • - Clear the teardown acknowledge bit

Parameters
pCfg[IN] Pointer to a CSL_LcdmaRingaccCfg structure containing the ring accelerator configuration
pRing[IN] Pointer to a CSL_LcdmaRingaccRingCfg structure containing the ring configuration
Returns
None

◆ CSL_lcdma_ringaccGetForwardRingPtr()

void* CSL_lcdma_ringaccGetForwardRingPtr ( CSL_LcdmaRingaccCfg pCfg,
CSL_LcdmaRingaccRingCfg pRing 
)

Get pointer to next free forward ring element.

This function is used to get a pointer to the next free element of a forward ring. This pointer can then be used to write data into the ring.

Parameters
pCfg[IN] Pointer to a CSL_LcdmaRingaccCfg structure containing the ring accelerator configuration
pRing[IN] Pointer to a CSL_LcdmaRingaccRingCfg structure containing the ring configuration
Returns
NULL if the ring is full, otherwise a void pointer to the next free forward ring element

◆ CSL_lcdma_ringaccGetReverseRingPtr()

void* CSL_lcdma_ringaccGetReverseRingPtr ( CSL_LcdmaRingaccCfg pCfg,
CSL_LcdmaRingaccRingCfg pRing 
)

Get pointer to next available reverse ring element.

This function is used to get a pointer to the next available reverse element of a ring. This pointer can then be used to read data from the ring.

After the data has been read from the ring, call the CSL_lcdma_ringaccAckReverseRing to acknowledge and return the element(s) that have been read.

Parameters
pCfg[IN] Pointer to a CSL_LcdmaRingaccCfg structure containing the ring accelerator configuration
pRing[IN] Pointer to a CSL_LcdmaRingaccRingCfg structure containing the ring configuration
Returns
NULL if the ring is empty, otherwise a void pointer to the next available reverse ring element

◆ CSL_lcdma_ringaccSetForwardDoorbell()

static int32_t CSL_lcdma_ringaccSetForwardDoorbell ( CSL_LcdmaRingaccCfg pCfg,
uint32_t  ringNum,
CSL_LcdmaRingaccRingMode  mode,
int32_t  cnt 
)
inlinestatic

Write to the ring foward doorbell.

This function writes 'count' to the forward doorbell register of the specified ring.

Normally, an application does not need to call this function as the CSL_lcdma_ringaccCommitToForwardRing function calls it.

Parameters
pCfg[IN] Pointer to a CSL_LcdmaRingaccCfg structure containing the ring accelerator configuration
ringNum[IN] The ring number
mode[IN] Ring mode. See CSL_LcdmaRingaccRingMode. This parameter is not used but is required for API backwards compatibility.
cnt[IN] The count to write
Returns
0 = success

◆ CSL_lcdma_ringaccSetReverseDoorbell()

static void CSL_lcdma_ringaccSetReverseDoorbell ( CSL_LcdmaRingaccCfg pCfg,
uint32_t  ringNum,
CSL_LcdmaRingaccRingMode  mode,
int32_t  cnt 
)
inlinestatic

Write to the ring reverse doorbell.

This function writes 'count' to the reverse doorbell register of the specified ring.

Parameters
pCfg[IN] Pointer to a CSL_LcdmaRingaccCfg structure containing the ring accelerator configuration
ringNum[IN] The ring number
mode[IN] Ring mode. See CSL_LcdmaRingaccRingMode. This parameter is not used but is required for API backwards compatibility.
cnt[IN] The count to write
Returns
None

◆ CSL_lcdma_ringaccCommitToForwardRing()

static void CSL_lcdma_ringaccCommitToForwardRing ( CSL_LcdmaRingaccCfg pCfg,
CSL_LcdmaRingaccRingCfg pRing,
int32_t  cnt 
)
inlinestatic

Commit elements written to a ring.

This function is used to commit (execute) elements that have been written to a ring.

Parameters
pCfg[IN] Pointer to a CSL_LcdmaRingaccCfg structure containing the ring accelerator configuration
pRing[IN] Pointer to a CSL_LcdmaRingaccRingCfg structure containing the ring configuration
cnt[IN] The number of elements written since the last call to CSL_lcdma_ringaccCommitToForwardRing, or NULL to commit all outstanding entries.
Returns
None

◆ CSL_lcdma_ringaccAckReverseRing()

static void CSL_lcdma_ringaccAckReverseRing ( CSL_LcdmaRingaccCfg pCfg,
CSL_LcdmaRingaccRingCfg pRing,
int32_t  cnt 
)
inlinestatic

Acknowledge elements read from a ring.

This function is used to acknowledge and return elements that have been read from a ring.

Parameters
pCfg[IN] Pointer to a CSL_LcdmaRingaccCfg structure containing the ring accelerator configuration
pRing[IN] Pointer to a CSL_LcdmaRingaccRingCfg structure containing the ring configuration
cnt[IN] The number of elements read since the last call to CSL_lcdma_ringaccAckReverseRing, or NULL to ACK all outstanding entries.
Returns
None

◆ CSL_lcdma_ringaccGetForwardRingIdx()

uint32_t CSL_lcdma_ringaccGetForwardRingIdx ( const CSL_LcdmaRingaccCfg pCfg,
uint32_t  ringNum 
)

[ringacc_only] Get the current forward ring index.

This function returns the current forward index for the specified ring.

Normally, an application does not need to call this function.

Parameters
pCfg[IN] Pointer to a CSL_LcdmaRingaccCfg structure containing the ring accelerator configuration
ringNum[IN] The ring number (0-1023)
Returns
The current forward ring index is returned. 0 is returned if ringNum is out of range.

◆ CSL_lcdma_ringaccGetReverseRingIdx()

uint32_t CSL_lcdma_ringaccGetReverseRingIdx ( const CSL_LcdmaRingaccCfg pCfg,
uint32_t  ringNum 
)

[ringacc_only] Get the current reverse ring index.

This function returns the current reverse index for the specified ring.

Normally, an application does not need to call this function.

Parameters
pCfg[IN] Pointer to a CSL_LcdmaRingaccCfg structure containing the ring accelerator configuration
ringNum[IN] The ring number (0-1023)
Returns
The current reverse ring index is returned. 0 is returned if ringNum is out of range.

◆ CSL_lcdma_ringaccGetForwardRingOcc()

uint32_t CSL_lcdma_ringaccGetForwardRingOcc ( const CSL_LcdmaRingaccCfg pCfg,
uint32_t  ringNum,
CSL_LcdmaRingaccRingMode  mode 
)

Get the forward occupancy of a ring.

This function returns the forward occupancy for the specified ring.

Normally, an application does not need to call this function.

Parameters
pCfg[IN] Pointer to a CSL_LcdmaRingaccCfg structure containing the ring accelerator configuration
ringNum[IN] The ring number (0-1023)
mode[IN] Ring mode. See CSL_LcdmaRingaccRingMode. This parameter is not used but is required for API backwards compatibility.
Returns
The current forward occupancy is returned. 0 is returned if ringNum is out of range.

◆ CSL_lcdma_ringaccGetReverseRingOcc()

uint32_t CSL_lcdma_ringaccGetReverseRingOcc ( const CSL_LcdmaRingaccCfg pCfg,
uint32_t  ringNum,
CSL_LcdmaRingaccRingMode  mode 
)

Get the reverse occupancy of a ring.

This function returns the reverse occupancy for the specified ring.

Normally, an application does not need to call this function.

Parameters
pCfg[IN] Pointer to a CSL_LcdmaRingaccCfg structure containing the ring accelerator configuration
ringNum[IN] The ring number (0-1023)
mode[IN] Ring mode. See CSL_LcdmaRingaccRingMode. This parameter is not used but is required for API backwards compatibility.
Returns
The current reverse occupancy is returned. 0 is returned if ringNum is out of range.

◆ CSL_lcdma_ringaccCfgTrace()

int32_t CSL_lcdma_ringaccCfgTrace ( CSL_LcdmaRingaccCfg pCfg,
bool  bTraceAll,
bool  bIncMsgData,
uint32_t  ringNum 
)

[ringacc_only] Configure trace support

This function configures trace support. Tracing is automatically disabled before the specified trace configuration is written.

When tracing is enabled (see the CSL_lcdma_ringaccSetTraceEnable function) a trace output of all push, pop, and peek operations are output so that the traffic can be viewed at a later time.

Parameters
pCfg[IN] Pointer to a CSL_LcdmaRingaccCfg structure containing the ring accelerator configuration
bTraceAll[IN] If true, operations to every ring are traced. If false, only the ring specified by ringNum is traced.
bIncMsgData[IN] If true, message data is included in the trace output.
ringNum[IN] Specifies the ring whose operations are to be traced. This parameter is ignored when bTraceAll is true.
Returns
0 = success -1 = trace support is not available or ringNum is out of range

◆ CSL_lcdma_ringaccSetTraceEnable()

int32_t CSL_lcdma_ringaccSetTraceEnable ( CSL_LcdmaRingaccCfg pCfg,
bool  bEnable 
)

Enable or disable trace support.

This function enables or disables trace support. Be sure and configure trace support using the CSL_lcdma_ringaccCfgTrace function before enabling it.

Parameters
pCfg[IN] Pointer to a CSL_LcdmaRingaccCfg structure containing the ring accelerator configuration
bEnable[IN] If true, trace support is enabled. If false, it is disabled.
Returns
0 = success -1 = trace support is not available

◆ CSL_lcdma_ringaccEnableTrace()

int32_t CSL_lcdma_ringaccEnableTrace ( CSL_LcdmaRingaccCfg pCfg)

[ringacc_only] Enable trace support

This function enables trace support. Be sure and configure tarce support using the CSL_lcdma_ringaccCfgTrace function before enabling it.

Parameters
pCfg[IN] Pointer to a CSL_LcdmaRingaccCfg structure containing the ring accelerator configuration
Returns
0 = success -1 = trace support is not available

◆ CSL_lcdma_ringaccDisableTrace()

int32_t CSL_lcdma_ringaccDisableTrace ( CSL_LcdmaRingaccCfg pCfg)

[ringacc_only] Disable trace support

This function disables trace support.

Parameters
pCfg[IN] Pointer to a CSL_LcdmaRingaccCfg structure containing the ring accelerator configuration
Returns
0 = success -1 = trace support is not available

◆ CSL_lcdma_ringaccCfgRingMonitor()

int32_t CSL_lcdma_ringaccCfgRingMonitor ( CSL_LcdmaRingaccCfg pCfg,
uint32_t  monNum,
CSL_LcdmaRingAccMonitorType  monType,
uint32_t  ringNum,
uint32_t  eventNum,
CSL_LcdmaRingAccMonitorDataSrc  dataSrc,
uint32_t  data0Val,
uint32_t  data1Val 
)

[ringacc_only] Configure a ring monitor.

This function is used to configure a ring monitor.

Parameters
pCfg[IN] Pointer to a CSL_LcdmaRingaccCfg structure containing the ring accelerator configuration
monNum[IN] The number of the monitor to configure
monType[IN] The type of ring monitor. See CSL_LcdmaRingAccMonitorType for the available monitor types.
ringNum[IN] The number of the ring to monitor
eventNum[IN] The number of the event to produce if the monitor thresholds are exceeded (used only for the CSL_LCDMA_RINGACC_MONITOR_TYPE_THRESHOLD or CSL_LCDMA_RINGACC_MONITOR_TYPE_STARVATION monitor types). A value of CSL_LCDMA_RINGACC_MONITOR_INTR_DISABLE disables interrupts for this monitor.
dataSrc[IN] The type of data this monitor is tracking. See CSL_LcdmaRingAccMonitorDataSrc for available data sources. This is only used for CSL_LCDMA_RINGACC_MONITOR_TYPE_THRESHOLD and CSL_LCDMA_RINGACC_MONITOR_TYPE_WATERMARK monitor types.
data0Val[IN] This value contains the low threshold value for the CSL_LCDMA_RINGACC_MONITOR_TYPE_THRESHOLD or CSL_LCDMA_RINGACC_MONITOR_TYPE_STARVATION monitor types. It is not used for the other monitor types.
data1Val[IN] This value contains the high threshold value for the CSL_LCDMA_RINGACC_MONITOR_TYPE_THRESHOLD or CSL_LCDMA_RINGACC_MONITOR_TYPE_STARVATION monitor types. It is not used for the other monitor types.
Returns
0 = success -1 = Monitor functionality is not supported or an argument is out of range

◆ CSL_lcdma_ringaccReadRingMonitor()

int32_t CSL_lcdma_ringaccReadRingMonitor ( const CSL_LcdmaRingaccCfg pCfg,
uint32_t  monNum,
uint32_t *  pData0,
uint32_t *  pData1 
)

[ringacc_only] Read a ring monitor.

This function is used to read data from an active ring monitor.

Parameters
pCfg[IN] Pointer to a CSL_LcdmaRingaccCfg structure containing the ring accelerator configuration
monNum[IN] The number of the monitor to read
pData0[OUT] A pointer to where the following value (dependingon the type of monitor) is written: o CSL_LCDMA_RINGACC_MONITOR_TYPE_STATS: count of the number of writes to the queue o CSL_LCDMA_RINGACC_MONITOR_TYPE_THRESHOLD: low threshold value o CSL_LCDMA_RINGACC_MONITOR_TYPE_WATERMARK: low watermark value o CSL_LCDMA_RINGACC_MONITOR_TYPE_STARVATION: number of starvation events (a read to an empty queue)
pData1[OUT] A pointer to where the following value (depending on the type of monitor) is written: o CSL_LCDMA_RINGACC_MONITOR_TYPE_STATS: count of the number of reads from the queue o CSL_LCDMA_RINGACC_MONITOR_TYPE_THRESHOLD: high threshold value o CSL_LCDMA_RINGACC_MONITOR_TYPE_WATERMARK: high watermark value o CSL_LCDMA_RINGACC_MONITOR_TYPE_STARVATION: not used
Returns
0 = success -1 = Monitor functionality is not supported, monNum is out of range, or specified monitor is disabled

◆ CSL_lcdma_ringaccPush32()

int32_t CSL_lcdma_ringaccPush32 ( CSL_LcdmaRingaccCfg pCfg,
CSL_LcdmaRingaccRingCfg pRing,
uint32_t  val,
CSL_lcdma_ringaccMemOpsFxnPtr  pfMemOps 
)

Push a 32-bit value to a ring.

This function is used to push a 32-bit value to a ring.

Parameters
pCfg[IN] Pointer to a CSL_LcdmaRingaccCfg structure containing the ring accelerator configuration
pRing[IN] Pointer to a CSL_LcdmaRingaccRingCfg structure containing the ring configuration
val[IN] 32-bit value to write to the ring
pfMemOps[IN] Pointer to a memory ops call-back function (or NULL if not needed)
Returns
0 = success -1 = ring is full

◆ CSL_lcdma_ringaccPop32()

int32_t CSL_lcdma_ringaccPop32 ( CSL_LcdmaRingaccCfg pCfg,
CSL_LcdmaRingaccRingCfg pRing,
uint32_t *  pVal,
CSL_lcdma_ringaccMemOpsFxnPtr  pfMemOps 
)

Pop a 32-bit value from a ring.

This function is used to pop a 32-bit value from a ring.

Parameters
pCfg[IN] Pointer to a CSL_LcdmaRingaccCfg structure containing the ring accelerator configuration
pRing[IN] Pointer to a CSL_LcdmaRingaccRingCfg structure containing the ring configuration
pVal[OUT] Pointer where the popped value is returned
pfMemOps[IN] Pointer to a memory ops call-back function (or NULL if not needed)
Returns
0 = success -1 = ring is empty

◆ CSL_lcdma_ringaccHwPop32()

int32_t CSL_lcdma_ringaccHwPop32 ( CSL_LcdmaRingaccCfg pCfg,
CSL_LcdmaRingaccRingCfg pRing,
uint32_t *  pVal,
CSL_lcdma_ringaccMemOpsFxnPtr  pfMemOps 
)

[ringacc_only] Mimic a hardware pop of a 32-bit value from the head of a ring

This function is used to mimic a hardware pop operation from a ring. It can be called by software to pop values from a ring that is configured in Ring Mode, where software is the normal producer (pushing to the ring via the CSL_lcdma_ringaccPush32 function) and hardware is the normal consumer (popping from the ring), such as a TX free queue ring.

The ring must be configured with a 4-byte element size. A 4-byte value is popped from the ring head and returned.

Parameters
pCfg[IN] Pointer to a CSL_LcdmaRingaccCfg structure containing the ring accelerator configuration
pRing[IN] Pointer to a CSL_LcdmaRingaccRingCfg structure containing the ring configuration
pVal[OUT] Pointer where the popped value is returned
pfMemOps[IN] Pointer to a memory ops call-back function (or NULL if not needed)
Returns
0 = success -1 = ring is empty

◆ CSL_lcdma_ringaccPeek32()

int32_t CSL_lcdma_ringaccPeek32 ( CSL_LcdmaRingaccCfg pCfg,
CSL_LcdmaRingaccRingCfg pRing,
uint32_t *  pVal,
CSL_lcdma_ringaccMemOpsFxnPtr  pfMemOps 
)

Peek at a 32-bit value from a ring.

This function is used to peek at a 32-bit value from a ring.

Parameters
pCfg[IN] Pointer to a CSL_LcdmaRingaccCfg structure containing the ring accelerator configuration
pRing[IN] Pointer to a CSL_LcdmaRingaccRingCfg structure containing the ring configuration
pVal[OUT] Pointer where the peeked value is returned
pfMemOps[IN] Pointer to a memory ops call-back function (or NULL if not needed)
Returns
0 = success -1 = ring is empty

◆ CSL_lcdma_ringaccPush64()

int32_t CSL_lcdma_ringaccPush64 ( CSL_LcdmaRingaccCfg pCfg,
CSL_LcdmaRingaccRingCfg pRing,
uint64_t  val,
CSL_lcdma_ringaccMemOpsFxnPtr  pfMemOps 
)

Push a 64-bit value to a ring.

This function is used to push a 64-bit value to a ring.

Parameters
pCfg[IN] Pointer to a CSL_LcdmaRingaccCfg structure containing the ring accelerator configuration
pRing[IN] Pointer to a CSL_LcdmaRingaccRingCfg structure containing the ring configuration
val[IN] 64-bit value to write to the ring
pfMemOps[IN] Pointer to a memory ops call-back function (or NULL if not needed)
Returns
0 = success -1 = ring is full -2 = requested access size (8 bytes) is greater than ring element size

◆ CSL_lcdma_ringaccPush64Multi()

int32_t CSL_lcdma_ringaccPush64Multi ( CSL_LcdmaRingaccCfg pCfg,
CSL_LcdmaRingaccRingCfg pRing,
uint64_t *  pVals,
uint32_t  numValues,
CSL_lcdma_ringaccMemOpsFxnPtr  pfMemOps 
)

Push multiple 64-bit values to a ring.

This function is used to push multiple 64-bit values to a ring.

Parameters
pCfg[IN] Pointer to a CSL_LcdmaRingaccCfg structure containing the ring accelerator configuration
pRing[IN] Pointer to a CSL_LcdmaRingaccRingCfg structure containing the ring configuration
pVals[IN] Pointer to an array of 64-bit values to write to the ring. This array should be at least numValues in size.
numValues[IN] Number of 64-bit values to write to the ring
pfMemOps[IN] Pointer to a memory ops call-back function (or NULL if not needed)
Returns
>0 = actual number of values written (ring was full before all values could be written) 0 = success (all values written successfully) -1 = ring is full (no values written) -2 = requested access size (8 bytes) is greater than ring element size

◆ CSL_lcdma_ringaccPop64()

int32_t CSL_lcdma_ringaccPop64 ( CSL_LcdmaRingaccCfg pCfg,
CSL_LcdmaRingaccRingCfg pRing,
uint64_t *  pVal,
CSL_lcdma_ringaccMemOpsFxnPtr  pfMemOps 
)

Pop a 64-bit value from a ring.

This function is used to pop a 64-bit value from a ring.

Parameters
pCfg[IN] Pointer to a CSL_LcdmaRingaccCfg structure containing the ring accelerator configuration
pRing[IN] Pointer to a CSL_LcdmaRingaccRingCfg structure containing the ring configuration
pVal[OUT] Pointer where the popped value is returned
pfMemOps[IN] Pointer to a memory ops call-back function (or NULL if not needed)
Returns
0 = success -1 = ring is empty -2 = requested access size (8 bytes) is greater than ring element size

◆ CSL_lcdma_ringaccPop64Multi()

int32_t CSL_lcdma_ringaccPop64Multi ( CSL_LcdmaRingaccCfg pCfg,
CSL_LcdmaRingaccRingCfg pRing,
uint64_t *  pVals,
uint32_t  numValues,
CSL_lcdma_ringaccMemOpsFxnPtr  pfMemOps 
)

Pop multiple 64-bit values from a ring.

This function is used to pop multiple 64-bit values from a ring.

Parameters
pCfg[IN] Pointer to a CSL_LcdmaRingaccCfg structure containing the ring accelerator configuration
pRing[IN] Pointer to a CSL_LcdmaRingaccRingCfg structure containing the ring configuration
pVals[OUT] Pointer to an array of 64-bit values to write to the ring. This array should be at least numValues in size (or the size of the ring if numValues==0).
numValues[IN] Number of 64-bit values to read from the ring. If 0, then all elements available in the ring are read.
pfMemOps[IN] Pointer to a memory ops call-back function (or NULL if not needed)
Returns
>0 = actual number of values read (numValues==0 or ring was empty before all values could be read) 0 = success (all requested values (numValues) read successfully) -1 = ring is empty (no values read) -2 = requested access size (8 bytes) is greater than ring element size

◆ CSL_lcdma_ringaccHwPop64()

int32_t CSL_lcdma_ringaccHwPop64 ( CSL_LcdmaRingaccCfg pCfg,
CSL_LcdmaRingaccRingCfg pRing,
uint64_t *  pVal,
CSL_lcdma_ringaccMemOpsFxnPtr  pfMemOps 
)

[ringacc_only] Mimic a hardware pop of a 64-bit value from the head of a ring

This function is used to mimic a hardware pop operation from a ring. It can be called by software to pop values from a ring that is configured in Ring Mode, where software is the normal producer (pushing to the ring via the CSL_lcdma_ringaccPush64 function) and hardware is the normal consumer (popping from the ring), such as a TX free queue ring.

The ring must be configured with an 8-byte element size. An 8-byte value is popped from the ring head and returned.

Parameters
pCfg[IN] Pointer to a CSL_LcdmaRingaccCfg structure containing the ring accelerator configuration
pRing[IN] Pointer to a CSL_LcdmaRingaccRingCfg structure containing the ring configuration
pVal[OUT] Pointer where the popped value is returned
pfMemOps[IN] Pointer to a memory ops call-back function (or NULL if not needed)
Returns
0 = success -1 = ring is empty -2 = requested access size (8 bytes) is greater than ring element size

◆ CSL_lcdma_ringaccPeek64()

int32_t CSL_lcdma_ringaccPeek64 ( CSL_LcdmaRingaccCfg pCfg,
CSL_LcdmaRingaccRingCfg pRing,
uint64_t *  pVal,
CSL_lcdma_ringaccMemOpsFxnPtr  pfMemOps 
)

Peek at a 64-bit value from a ring.

This function is used to peek at a 64-bit value from a ring.

Parameters
pCfg[IN] Pointer to a CSL_LcdmaRingaccCfg structure containing the ring accelerator configuration
pRing[IN] Pointer to a CSL_LcdmaRingaccRingCfg structure containing the ring configuration
pVal[OUT] Pointer where the peeked value is returned
pfMemOps[IN] Pointer to a memory ops call-back function (or NULL if not needed)
Returns
0 = success -1 = ring is empty -2 = requested access size (8 bytes) is greater than ring element size

◆ CSL_lcdma_ringaccWrData()

int32_t CSL_lcdma_ringaccWrData ( CSL_LcdmaRingaccCfg pCfg,
CSL_LcdmaRingaccRingCfg pRing,
uint8_t *  pData,
uint32_t  numBytes,
CSL_lcdma_ringaccMemOpsFxnPtr  pfMemOps 
)

Write data into a ring.

This function is used to write data into a ring.

Note that software can only write to a given ring, or read from a given ring - it cannot write and read to/from a given ring.

Parameters
pCfg[IN] Pointer to a CSL_LcdmaRingaccCfg structure containing the ring accelerator configuration
pRing[IN] Pointer to a CSL_LcdmaRingaccRingCfg structure containing the ring configuration
pData[IN] Pointer to the data to write
numBytes[IN] The number of bytes to write
pfMemOps[IN] Pointer to a memory fence call-back function (or NULL if not needed).
Returns
0 = success -1 = ring is full -2 = requested access size is greater than ring element size

◆ CSL_lcdma_ringaccRdData()

int32_t CSL_lcdma_ringaccRdData ( CSL_LcdmaRingaccCfg pCfg,
CSL_LcdmaRingaccRingCfg pRing,
uint8_t *  pData,
uint32_t  numBytes,
CSL_lcdma_ringaccMemOpsFxnPtr  pfMemOps 
)

Read data from a ring.

This function is used to read data from a ring.

Parameters
pCfg[IN] Pointer to a CSL_LcdmaRingaccCfg structure containing the ring accelerator configuration
pRing[IN] Pointer to a CSL_LcdmaRingaccRingCfg structure containing the ring configuration
pData[IN] Pointer to where read data is returned
numBytes[IN] The number of bytes to read
pfMemOps[IN] Pointer to a memory ops call-back function (or NULL if not needed)
Returns
0 = success -1 = ring is empty -2 = requested access size is greater than ring element size

◆ CSL_lcdma_ringaccPeekData()

int32_t CSL_lcdma_ringaccPeekData ( CSL_LcdmaRingaccCfg pCfg,
CSL_LcdmaRingaccRingCfg pRing,
uint8_t *  pData,
uint32_t  numBytes,
CSL_lcdma_ringaccMemOpsFxnPtr  pfMemOps 
)

Peek at data from a ring.

This function is used to peek at data from a ring.

Parameters
pCfg[IN] Pointer to a CSL_LcdmaRingaccCfg structure containing the ring accelerator configuration
pRing[IN] Pointer to a CSL_LcdmaRingaccRingCfg structure containing the ring configuration
pData[IN] Pointer to where read data is returned
numBytes[IN] The number of bytes to peek
pfMemOps[IN] Pointer to a memory ops call-back function (or NULL if not needed)
Returns
0 = success -2 = requested access size is greater than ring element size

◆ CSL_lcdma_ringaccClrAselInAddr()

uint64_t CSL_lcdma_ringaccClrAselInAddr ( uint64_t  addr)

Clear the asel field in an address.

This function is used to clear the asel value in the specified address.

Parameters
addr[IN] The 64-bit address
Returns
The address with the asel field cleared is returned

◆ CSL_lcdma_ringaccSetAselInAddr()

uint64_t CSL_lcdma_ringaccSetAselInAddr ( uint64_t  addr,
CSL_LcdmaRingAccAselEndpoint  asel 
)

Set the asel field in an address.

This function is used to set the specified asel value in the specified address.

Parameters
addr[IN] The address
asel[IN] Address select (asel) endpoint value. See CSL_LcdmaRingAccAselEndpoint.
Returns
The address including the asel value is returned

◆ CSL_lcdma_ringaccIsTeardownComplete()

bool CSL_lcdma_ringaccIsTeardownComplete ( const CSL_LcdmaRingaccCfg pCfg,
uint32_t  ringNum 
)

Return teardown completion status of a ring.

This function returns the teardown completion status of the specified ring. It does this by reading and returning the value of the ring's tdown_complete bit.

Parameters
pCfg[IN] Pointer to a CSL_LcdmaRingaccCfg structure containing the ring accelerator configuration
ringNum[IN] The ring number
Returns
0 = false (no teardown completion) 1 = true (teardown is complete)

◆ CSL_lcdma_ringaccAckTeardown()

void CSL_lcdma_ringaccAckTeardown ( const CSL_LcdmaRingaccCfg pCfg,
uint32_t  ringNum 
)

Acknowledge teardown completion of a ring.

This function acknowledges the teardown completion of the specified ring. It does this by writing a '1' to the ring's tdown_ack field to acknowledge (and clear) the ring's corresponding tdown_complete bit.

Parameters
pCfg[IN] Pointer to a CSL_LcdmaRingaccCfg structure containing the ring accelerator configuration
ringNum[IN] The ring number
Returns
None

◆ CSL_lcdma_ringaccDequeue()

int32_t CSL_lcdma_ringaccDequeue ( CSL_LcdmaRingaccCfg pCfg,
CSL_LcdmaRingaccRingCfg pRing,
uint64_t *  pVal 
)

Dequeue a value pushed to a ring in FIFO order.

This function is used to dequeue (remove and return) a value pushed to the specified ring by software. Values are removed in FIFO order.

This function is intended to be called by software to retrieve unprocessed descriptors prior to resetting the ring via the CSL_lcdma_ringaccResetRing function.

Parameters
pCfg[IN] Pointer to a CSL_LcdmaRingaccCfg structure containing the ring accelerator configuration
pRing[IN] Pointer to a CSL_LcdmaRingaccRingCfg structure containing the ring configuration
pVal[OUT] Pointer where the dequeued value is returned
Returns
0 = success -1 = ring is empty (there are no more values in the ring to dequeue)