PDK API Guide for J721E
RINGACC Functions

Introduction

Functions

uint32_t CSL_ringaccGetRevision (const CSL_RingAccCfg *pCfg)
 Return revision of the RingAcc module. More...
 
void CSL_ringaccInitRingCfg (CSL_RingAccRingCfg *pRingCfg)
 Initialize a CSL_RingAccRingCfg structure. More...
 
void CSL_ringaccInitRingObj (uint32_t ringNum, CSL_RingAccRingCfg *pRing)
 Initialize the ring object. More...
 
int32_t CSL_ringaccInitRing (CSL_RingAccCfg *pCfg, uint32_t ringNum, CSL_RingAccRingCfg *pRing)
 Initialize a ring. More...
 
int32_t CSL_ringaccSetEvent (CSL_RingAccCfg *pCfg, uint32_t ringNum, uint32_t evtNum)
 Set the ring event. More...
 
uint32_t CSL_ringaccGetRingNum (const CSL_RingAccRingCfg *pRing)
 Get the ring number associated with a ring. More...
 
void CSL_ringaccSetRingOrderId (CSL_RingAccCfg *pCfg, const CSL_RingAccRingCfg *pRing, uint32_t orderId)
 Specify the orderid value for a ring. More...
 
void CSL_ringaccCfgRingCred (CSL_RingAccCfg *pCfg, const CSL_RingAccRingCfg *pRing, bool bEnable, bool bLock)
 Configure the security credentials for a ring. More...
 
void CSL_ringaccResetRing (CSL_RingAccCfg *pCfg, CSL_RingAccRingCfg *pRing)
 Reset a ring. More...
 
void * CSL_ringaccGetCmdRingPtr (CSL_RingAccCfg *pCfg, CSL_RingAccRingCfg *pRing)
 Get pointer to next free command ring element. More...
 
void * CSL_ringaccGetRspRingPtr (CSL_RingAccCfg *pCfg, CSL_RingAccRingCfg *pRing)
 Get pointer to next available response ring element. More...
 
static int32_t CSL_ringaccSetRingDoorbell (CSL_RingAccCfg *pCfg, uint32_t ringNum, int32_t cnt)
 Write to the ring doorbell. More...
 
static void CSL_ringaccCommitToCmdRing (CSL_RingAccCfg *pCfg, CSL_RingAccRingCfg *pRing, int32_t cnt)
 Commit elements written to a ring. More...
 
void CSL_ringaccAckRspRing (CSL_RingAccCfg *pCfg, CSL_RingAccRingCfg *pRing, int32_t cnt)
 Acknowledge elements read from a ring. More...
 
int32_t CSL_ringaccCfgTrace (CSL_RingAccCfg *pCfg, bool bTraceAll, bool bIncMsgData, uint32_t ringNum)
 Configure trace support. More...
 
int32_t CSL_ringaccSetTraceEnable (CSL_RingAccCfg *pCfg, bool bEnable)
 Enable or disable trace support. More...
 
int32_t CSL_ringaccEnableTrace (CSL_RingAccCfg *pCfg)
 Enable trace support. More...
 
int32_t CSL_ringaccDisableTrace (CSL_RingAccCfg *pCfg)
 Disable trace support. More...
 
uint32_t CSL_ringaccGetRingIdx (const CSL_RingAccCfg *pCfg, uint32_t ringNum)
 Get the current ring read/write index. More...
 
uint32_t CSL_ringaccGetRingHwIdx (const CSL_RingAccCfg *pCfg, uint32_t ringNum)
 Get the current ring hardware read/write index (for debug). More...
 
uint32_t CSL_ringaccGetRingOcc (const CSL_RingAccCfg *pCfg, uint32_t ringNum)
 Get the current ring occupancy. More...
 
uint32_t CSL_ringaccGetRingHwOcc (const CSL_RingAccCfg *pCfg, uint32_t ringNum)
 Get the current ring hardware occupancy (for debug). More...
 
int32_t CSL_ringaccCfgRingMonitor (CSL_RingAccCfg *pCfg, uint32_t monNum, CSL_RingAccMonitorType monType, uint32_t ringNum, uint32_t eventNum, CSL_RingAccMonitorDataSrc dataSrc, uint32_t data0Val, uint32_t data1Val)
 Configure a ring monitor. More...
 
int32_t CSL_ringaccReadRingMonitor (const CSL_RingAccCfg *pCfg, uint32_t monNum, uint32_t *pData0, uint32_t *pData1)
 Read a ring monitor. More...
 
int32_t CSL_ringaccPush32 (CSL_RingAccCfg *pCfg, CSL_RingAccRingCfg *pRing, uint32_t val, CSL_ringaccMemOpsFxnPtr pfMemOps)
 Push a 32-bit value to the tail of a ring. More...
 
int32_t CSL_ringaccPop32 (CSL_RingAccCfg *pCfg, CSL_RingAccRingCfg *pRing, uint32_t *pVal, CSL_ringaccMemOpsFxnPtr pfMemOps)
 Pop a 32-bit value from the head of a ring. More...
 
int32_t CSL_ringaccHwPop32 (CSL_RingAccCfg *pCfg, CSL_RingAccRingCfg *pRing, uint32_t *pVal, CSL_ringaccMemOpsFxnPtr pfMemOps)
 Mimic a hardware pop of a 32-bit value from the head of a ring. More...
 
int32_t CSL_ringaccPeek32 (CSL_RingAccCfg *pCfg, CSL_RingAccRingCfg *pRing, uint32_t *pVal, CSL_ringaccMemOpsFxnPtr pfMemOps)
 Peek at a 32-bit value from the head of a ring. More...
 
int32_t CSL_ringaccPush64 (CSL_RingAccCfg *pCfg, CSL_RingAccRingCfg *pRing, uint64_t val, CSL_ringaccMemOpsFxnPtr pfMemOps)
 Push a 64-bit value to the tail of a ring. More...
 
int32_t CSL_ringaccPop64 (CSL_RingAccCfg *pCfg, CSL_RingAccRingCfg *pRing, uint64_t *pVal, CSL_ringaccMemOpsFxnPtr pfMemOps)
 Pop a 64-bit value from the head of a ring. More...
 
int32_t CSL_ringaccHwPop64 (CSL_RingAccCfg *pCfg, CSL_RingAccRingCfg *pRing, uint64_t *pVal, CSL_ringaccMemOpsFxnPtr pfMemOps)
 Mimic a hardware pop of a 64-bit value from the head of a ring. More...
 
int32_t CSL_ringaccPeek64 (CSL_RingAccCfg *pCfg, CSL_RingAccRingCfg *pRing, uint64_t *pVal, CSL_ringaccMemOpsFxnPtr pfMemOps)
 Peek at a 64-bit value from the head of a ring. More...
 
int32_t CSL_ringaccWrData (CSL_RingAccCfg *pCfg, CSL_RingAccRingCfg *pRing, uint8_t *pData, uint32_t numBytes, CSL_ringaccMemOpsFxnPtr pfMemOps)
 Write data into a ring (ring mode only) More...
 
int32_t CSL_ringaccRdData (CSL_RingAccCfg *pCfg, CSL_RingAccRingCfg *pRing, uint8_t *pData, uint32_t numBytes, CSL_ringaccMemOpsFxnPtr pfMemOps)
 Read data from a ring (ring mode only) More...
 
int32_t CSL_ringaccPeekData (CSL_RingAccCfg *pCfg, CSL_RingAccRingCfg *pRing, uint8_t *pData, uint32_t numBytes, CSL_ringaccMemOpsFxnPtr pfMemOps)
 Peek at data from a ring (ring mode only) More...
 

Function Documentation

◆ CSL_ringaccGetRevision()

uint32_t CSL_ringaccGetRevision ( const CSL_RingAccCfg pCfg)

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_RingAccCfg structure containing the ring accelerator configuration
Returns
The 32-bit revision register is returned.

◆ CSL_ringaccInitRingCfg()

void CSL_ringaccInitRingCfg ( CSL_RingAccRingCfg pRingCfg)

Initialize a CSL_RingAccRingCfg structure.

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

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

evtNum = CSL_RINGACC_RING_EVENT_DISABLE;   // 0xFFFFU
Parameters
pRingCfg[OUT] Pointer to a CSL_RingAccRingCfg structure
Returns
None

◆ CSL_ringaccInitRingObj()

void CSL_ringaccInitRingObj ( uint32_t  ringNum,
CSL_RingAccRingCfg 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_RingAccRingCfg structure containing the ring configuration

◆ CSL_ringaccInitRing()

int32_t CSL_ringaccInitRing ( CSL_RingAccCfg pCfg,
uint32_t  ringNum,
CSL_RingAccRingCfg 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_ringaccPairRing
#CSL_ringaccResetRing
#CSL_ringaccGetCmdRingPtr
#CSL_ringaccGetRspRingPtr
#CSL_ringaccCommitToCmdRing
#CSL_ringaccAckRspRing
#CSL_ringaccSetRingOrderId

To use this function, allocate a CSL_RingAccRingCfg 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)
evtNum      Event number for the ring
Parameters
pCfg[IN] Pointer to a CSL_RingAccCfg structure containing the ring accelerator configuration
ringNum[IN] The number of the ring (0-1023) to be initialized
pRing[IN] Pointer to a CSL_RingAccRingCfg structure containing the ring configuration
Returns
0 if successful, or -1 if an invalid argument is detected

◆ CSL_ringaccSetEvent()

int32_t CSL_ringaccSetEvent ( CSL_RingAccCfg pCfg,
uint32_t  ringNum,
uint32_t  evtNum 
)

Set the ring event.

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

Parameters
pCfg[IN] Pointer to a CSL_RingAccCfg 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_ringaccGetRingNum()

uint32_t CSL_ringaccGetRingNum ( const CSL_RingAccRingCfg 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_RingAccRingCfg structure containing the ring configuration
Returns
Ring number

◆ CSL_ringaccSetRingOrderId()

void CSL_ringaccSetRingOrderId ( CSL_RingAccCfg pCfg,
const CSL_RingAccRingCfg pRing,
uint32_t  orderId 
)

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_RINGACC_ORDERID_BYPASS, then the orderid from the source transaction is used.

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

◆ CSL_ringaccCfgRingCred()

void CSL_ringaccCfgRingCred ( CSL_RingAccCfg pCfg,
const CSL_RingAccRingCfg pRing,
bool  bEnable,
bool  bLock 
)

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_RingAccCfg structure containing the ring accelerator configuration
pRing[IN] Pointer to a CSL_RingAccRingCfg 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_ringaccResetRing()

void CSL_ringaccResetRing ( CSL_RingAccCfg pCfg,
CSL_RingAccRingCfg pRing 
)

Reset a ring.

This function is used to reset a ring. The ring is reset back to its original state where the ring occupancy is 0 (empty) and the ring read and write pointers are reset to 0.

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

◆ CSL_ringaccGetCmdRingPtr()

void* CSL_ringaccGetCmdRingPtr ( CSL_RingAccCfg pCfg,
CSL_RingAccRingCfg pRing 
)

Get pointer to next free command ring element.

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

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

◆ CSL_ringaccGetRspRingPtr()

void* CSL_ringaccGetRspRingPtr ( CSL_RingAccCfg pCfg,
CSL_RingAccRingCfg pRing 
)

Get pointer to next available response ring element.

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

If the ring is paired, a successful return will also credit the paired command ring with an additional free entry.

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

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

◆ CSL_ringaccSetRingDoorbell()

static int32_t CSL_ringaccSetRingDoorbell ( CSL_RingAccCfg pCfg,
uint32_t  ringNum,
int32_t  cnt 
)
inlinestatic

Write to the ring doorbell.

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

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

Parameters
pCfg[IN] Pointer to a CSL_RingAccCfg structure containing the ring accelerator configuration
ringNum[IN] The ring number (0-1023)
cnt[IN] The count to write
Returns
0 = success -1 = ringNum is out of range

◆ CSL_ringaccCommitToCmdRing()

static void CSL_ringaccCommitToCmdRing ( CSL_RingAccCfg pCfg,
CSL_RingAccRingCfg 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_RingAccCfg structure containing the ring accelerator configuration
pRing[IN] Pointer to a CSL_RingAccRingCfg structure containing the ring configuration
cnt[IN] The number of elements written since the last call to CSL_ringaccCommitToCmdRing, or NULL to commit all outstanding entries.
Returns
None

◆ CSL_ringaccAckRspRing()

void CSL_ringaccAckRspRing ( CSL_RingAccCfg pCfg,
CSL_RingAccRingCfg pRing,
int32_t  cnt 
)

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_RingAccCfg structure containing the ring accelerator configuration
pRing[IN] Pointer to a CSL_RingAccRingCfg structure containing the ring configuration
cnt[IN] The number of elements read since the last call to CSL_ringaccAckRspRing, or NULL to ACK all outstanding entries.
Returns
None

◆ CSL_ringaccCfgTrace()

int32_t CSL_ringaccCfgTrace ( CSL_RingAccCfg pCfg,
bool  bTraceAll,
bool  bIncMsgData,
uint32_t  ringNum 
)

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_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_RingAccCfg 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_ringaccSetTraceEnable()

int32_t CSL_ringaccSetTraceEnable ( CSL_RingAccCfg pCfg,
bool  bEnable 
)

Enable or disable trace support.

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

Parameters
pCfg[IN] Pointer to a CSL_RingAccCfg 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_ringaccEnableTrace()

int32_t CSL_ringaccEnableTrace ( CSL_RingAccCfg pCfg)

Enable trace support.

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

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

◆ CSL_ringaccDisableTrace()

int32_t CSL_ringaccDisableTrace ( CSL_RingAccCfg pCfg)

Disable trace support.

This function disables trace support.

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

◆ CSL_ringaccGetRingIdx()

uint32_t CSL_ringaccGetRingIdx ( const CSL_RingAccCfg pCfg,
uint32_t  ringNum 
)

Get the current ring read/write index.

This function returns the current command read/write index for the specified ring.

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

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

◆ CSL_ringaccGetRingHwIdx()

uint32_t CSL_ringaccGetRingHwIdx ( const CSL_RingAccCfg pCfg,
uint32_t  ringNum 
)

Get the current ring hardware read/write index (for debug).

This function returns the current ring read/write index (as seen by HW) for the specified ring.

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

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

◆ CSL_ringaccGetRingOcc()

uint32_t CSL_ringaccGetRingOcc ( const CSL_RingAccCfg pCfg,
uint32_t  ringNum 
)

Get the current ring occupancy.

This function returns the current ring occupancy for the specified ring.

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

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

◆ CSL_ringaccGetRingHwOcc()

uint32_t CSL_ringaccGetRingHwOcc ( const CSL_RingAccCfg pCfg,
uint32_t  ringNum 
)

Get the current ring hardware occupancy (for debug).

This function returns the current ring occupancy (as seen by HW) for the specified ring.

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

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

◆ CSL_ringaccCfgRingMonitor()

int32_t CSL_ringaccCfgRingMonitor ( CSL_RingAccCfg pCfg,
uint32_t  monNum,
CSL_RingAccMonitorType  monType,
uint32_t  ringNum,
uint32_t  eventNum,
CSL_RingAccMonitorDataSrc  dataSrc,
uint32_t  data0Val,
uint32_t  data1Val 
)

Configure a ring monitor.

This function is used to configure a ring monitor.

Parameters
pCfg[IN] Pointer to a CSL_RingAccCfg structure containing the ring accelerator configuration
monNum[IN] The number of the monitor to configure
monType[IN] The type of ring monitor. See CSL_RingAccMonitorType 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_RINGACC_MONITOR_TYPE_THRESHOLD or CSL_RINGACC_MONITOR_TYPE_STARVATION monitor types). A value of CSL_RINGACC_MONITOR_INTR_DISABLE disables interrupts for this monitor.
dataSrc[IN] The type of data this monitor is tracking. See CSL_RingAccMonitorDataSrc for available data sources. This is only used for CSL_RINGACC_MONITOR_TYPE_THRESHOLD and CSL_RINGACC_MONITOR_TYPE_WATERMARK monitor types.
data0Val[IN] This value contains the low threshold value for the CSL_RINGACC_MONITOR_TYPE_THRESHOLD or CSL_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_RINGACC_MONITOR_TYPE_THRESHOLD or CSL_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_ringaccReadRingMonitor()

int32_t CSL_ringaccReadRingMonitor ( const CSL_RingAccCfg pCfg,
uint32_t  monNum,
uint32_t *  pData0,
uint32_t *  pData1 
)

Read a ring monitor.

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

Parameters
pCfg[IN] Pointer to a CSL_RingAccCfg 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_RINGACC_MONITOR_TYPE_STATS: count of the number of writes to the queue o CSL_RINGACC_MONITOR_TYPE_THRESHOLD: low threshold value o CSL_RINGACC_MONITOR_TYPE_WATERMARK: low watermark value o CSL_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_RINGACC_MONITOR_TYPE_STATS: count of the number of reads from the queue o CSL_RINGACC_MONITOR_TYPE_THRESHOLD: high threshold value o CSL_RINGACC_MONITOR_TYPE_WATERMARK: high watermark value o CSL_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_ringaccPush32()

int32_t CSL_ringaccPush32 ( CSL_RingAccCfg pCfg,
CSL_RingAccRingCfg pRing,
uint32_t  val,
CSL_ringaccMemOpsFxnPtr  pfMemOps 
)

Push a 32-bit value to the tail of a ring.

This function is used to push a 32-bit value to the tail of a ring. This function supports all ring modes.

Parameters
pCfg[IN] Pointer to a CSL_RingAccCfg structure containing the ring accelerator configuration
pRing[IN] Pointer to a CSL_RingAccRingCfg 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). The memory fence call-back is used for rings configured in ring mode only.
Returns
0 = success -1 = ring is full (ring-mode rings only)

◆ CSL_ringaccPop32()

int32_t CSL_ringaccPop32 ( CSL_RingAccCfg pCfg,
CSL_RingAccRingCfg pRing,
uint32_t *  pVal,
CSL_ringaccMemOpsFxnPtr  pfMemOps 
)

Pop a 32-bit value from the head of a ring.

This function is used to pop a 32-bit value from the head of a ring. This function supports all ring modes.

Parameters
pCfg[IN] Pointer to a CSL_RingAccCfg structure containing the ring accelerator configuration
pRing[IN] Pointer to a CSL_RingAccRingCfg 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 (ring-mode rings only)

◆ CSL_ringaccHwPop32()

int32_t CSL_ringaccHwPop32 ( CSL_RingAccCfg pCfg,
CSL_RingAccRingCfg pRing,
uint32_t *  pVal,
CSL_ringaccMemOpsFxnPtr  pfMemOps 
)

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_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_RingAccCfg structure containing the ring accelerator configuration
pRing[IN] Pointer to a CSL_RingAccRingCfg 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_ringaccPeek32()

int32_t CSL_ringaccPeek32 ( CSL_RingAccCfg pCfg,
CSL_RingAccRingCfg pRing,
uint32_t *  pVal,
CSL_ringaccMemOpsFxnPtr  pfMemOps 
)

Peek at a 32-bit value from the head of a ring.

This function is used to peek at a 32-bit value from the head of a ring. This function supports all ring modes.

Parameters
pCfg[IN] Pointer to a CSL_RingAccCfg structure containing the ring accelerator configuration
pRing[IN] Pointer to a CSL_RingAccRingCfg 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 (ring-mode rings only)

◆ CSL_ringaccPush64()

int32_t CSL_ringaccPush64 ( CSL_RingAccCfg pCfg,
CSL_RingAccRingCfg pRing,
uint64_t  val,
CSL_ringaccMemOpsFxnPtr  pfMemOps 
)

Push a 64-bit value to the tail of a ring.

This function is used to push a 64-bit value to the tail of a ring. This function supports all ring modes.

This function can only be used when the calling processor is able to issue a 64-bit burst. If using a 32-bit processor, you should avoid using this function and instead use the proxy to read/write from/to rings.

Parameters
pCfg[IN] Pointer to a CSL_RingAccCfg structure containing the ring accelerator configuration
pRing[IN] Pointer to a CSL_RingAccRingCfg 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). The memory fence call-back is used for rings configured in ring mode only.
Returns
0 = success -1 = ring is full (ring-mode rings only) -2 = requested access size (8 bytes) is greater than ring element size

◆ CSL_ringaccPop64()

int32_t CSL_ringaccPop64 ( CSL_RingAccCfg pCfg,
CSL_RingAccRingCfg pRing,
uint64_t *  pVal,
CSL_ringaccMemOpsFxnPtr  pfMemOps 
)

Pop a 64-bit value from the head of a ring.

This function is used to pop a 64-bit value from the head of a ring. This function supports all ring modes.

This function can only be used when the calling processor is able to issue a 64-bit burst. If using a 32-bit processor, you should avoid using this function and instead use the proxy to read/write from/to rings.

Parameters
pCfg[IN] Pointer to a CSL_RingAccCfg structure containing the ring accelerator configuration
pRing[IN] Pointer to a CSL_RingAccRingCfg 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 (ring-mode rings only) -2 = requested access size (8 bytes) is greater than ring element size

◆ CSL_ringaccHwPop64()

int32_t CSL_ringaccHwPop64 ( CSL_RingAccCfg pCfg,
CSL_RingAccRingCfg pRing,
uint64_t *  pVal,
CSL_ringaccMemOpsFxnPtr  pfMemOps 
)

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_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_RingAccCfg structure containing the ring accelerator configuration
pRing[IN] Pointer to a CSL_RingAccRingCfg 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_ringaccPeek64()

int32_t CSL_ringaccPeek64 ( CSL_RingAccCfg pCfg,
CSL_RingAccRingCfg pRing,
uint64_t *  pVal,
CSL_ringaccMemOpsFxnPtr  pfMemOps 
)

Peek at a 64-bit value from the head of a ring.

This function is used to peek at a 64-bit value from the head of a ring. This function supports all ring modes.

This function can only be used when the calling processor is able to issue a 64-bit burst. If using a 32-bit processor, you should avoid using this function and instead use the proxy to read/write from/to rings.

Parameters
pCfg[IN] Pointer to a CSL_RingAccCfg structure containing the ring accelerator configuration
pRing[IN] Pointer to a CSL_RingAccRingCfg 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 (ring-mode rings only) -2 = requested access size (8 bytes) is greater than ring element size

◆ CSL_ringaccWrData()

int32_t CSL_ringaccWrData ( CSL_RingAccCfg pCfg,
CSL_RingAccRingCfg pRing,
uint8_t *  pData,
uint32_t  numBytes,
CSL_ringaccMemOpsFxnPtr  pfMemOps 
)

Write data into a ring (ring mode only)

This function is used to write data into a ring. It can only be used with a ring configured in ring mode. This function does nothing if the ring is any other mode.

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.

To write data to rings configured in modes other than ring mode, use the proxy.

Parameters
pCfg[IN] Pointer to a CSL_RingAccCfg structure containing the ring accelerator configuration
pRing[IN] Pointer to a CSL_RingAccRingCfg 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 ops 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 -3 = ring is configured in wrong mode (must be a ring mode ring)

◆ CSL_ringaccRdData()

int32_t CSL_ringaccRdData ( CSL_RingAccCfg pCfg,
CSL_RingAccRingCfg pRing,
uint8_t *  pData,
uint32_t  numBytes,
CSL_ringaccMemOpsFxnPtr  pfMemOps 
)

Read data from a ring (ring mode only)

This function is used to read data from a ring. It can only be used with a ring configured in ring mode. This function does nothing if the ring is any other mode.

To read data from rings configured in modes other than ring mode, use the proxy.

Parameters
pCfg[IN] Pointer to a CSL_RingAccCfg structure containing the ring accelerator configuration
pRing[IN] Pointer to a CSL_RingAccRingCfg 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 -3 = ring is configured in wrong mode (must be a ring mode ring)

◆ CSL_ringaccPeekData()

int32_t CSL_ringaccPeekData ( CSL_RingAccCfg pCfg,
CSL_RingAccRingCfg pRing,
uint8_t *  pData,
uint32_t  numBytes,
CSL_ringaccMemOpsFxnPtr  pfMemOps 
)

Peek at data from a ring (ring mode only)

This function is used to peek at data from a ring. It can only be used with a ring configured in ring mode. This function does nothing if the ring is any other mode.

To peek at data from rings configured in modes other than ring mode, use the proxy.

Parameters
pCfg[IN] Pointer to a CSL_RingAccCfg structure containing the ring accelerator configuration
pRing[IN] Pointer to a CSL_RingAccRingCfg 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 -3 = ring is configured in wrong mode (must be a ring mode ring)