![]() |
PDK API Guide for AM64x
|
This CSL-FL header file contains various enumerations, structure definitions and function declarations for the Low Cost DMA ring accelerator (lcdma_ringacc) IP.
This CSL-FL was designed to be orthogonal with the implementation of the ringacc CSL-FL. Enumerations, structure definitions, and API functions are similarly named. The include file "csl_lcdma_ringacc_alias_ringacc_api.h" is available which maps lcdma_ringacc CSL-FL content to their ringacc equivalents for ease in porting existing ringacc code to the lcdma_ringacc.
There is CSL-FL content that is applicable for ringacc but not for lcdma_ringacc. Those items are denoted with the tag [ringacc_only] in the comments below and are handled as follows:
There is CSL-FL content that is applicable for lcdma_ringacc but not for ringacc. Those items are denoted with the tag [lcdma_ringacc_only] in the comments below.
Go to the source code of this file.
Ringacc ring mode | |
This enumerator defines the possible modes for a ring or queue | |
#define | CSL_LCDMA_RINGACC_RING_MODE_TX_RING ((uint32_t) 1U) |
#define | CSL_LCDMA_RINGACC_RING_MODE_RX_RING ((uint32_t) 9U) |
#define | CSL_LCDMA_RINGACC_RING_MODE_INVALID ((uint32_t) 10U) |
typedef uint32_t | CSL_LcdmaRingaccRingMode |
Ringacc monitor data source | |
[ringacc_only] This enumerator defines the possible data sources that can be monitored | |
#define | CSL_LCDMA_RINGACC_MONITOR_DATA_SRC_ELEMENT_CNT ((uint32_t) 0U) |
#define | CSL_LCDMA_RINGACC_MONITOR_DATA_SRC_HEAD_PKT_SIZE ((uint32_t) 1U) |
#define | CSL_LCDMA_RINGACC_MONITOR_DATA_SRC_ACCUM_QUEUE_SIZE ((uint32_t) 2U) |
#define | CSL_LCDMA_RINGACC_MONITOR_DATA_SRC_INVALID ((uint32_t) 3U) |
typedef uint32_t | CSL_LcdmaRingAccMonitorDataSrc |
Ringacc monitor type | |
[ringacc_only] This enumerator defines the possible monitor types | |
#define | CSL_LCDMA_RINGACC_MONITOR_TYPE_DISABLED ((uint32_t) 0U) |
#define | CSL_LCDMA_RINGACC_MONITOR_TYPE_STATS ((uint32_t) 1U) |
#define | CSL_LCDMA_RINGACC_MONITOR_TYPE_THRESHOLD ((uint32_t) 2U) |
#define | CSL_LCDMA_RINGACC_MONITOR_TYPE_WATERMARK ((uint32_t) 3U) |
#define | CSL_LCDMA_RINGACC_MONITOR_TYPE_STARVATION ((uint32_t) 4U) |
#define | CSL_LCDMA_RINGACC_MONITOR_TYPE_INVALID ((uint32_t) 5U) |
typedef uint32_t | CSL_LcdmaRingAccMonitorType |
Ringacc Ops type | |
This enumerator defines the possible memory operation types | |
#define | CSL_LCDMA_RINGACC_MEM_OPS_TYPE_WR ((uint32_t) 0U) |
#define | CSL_LCDMA_RINGACC_MEM_OPS_TYPE_RD ((uint32_t) 1U) |
typedef uint32_t | CSL_LcdmaRingAccMemoryOpsType |
Ringacc address select (asel) endpoint | |
This enumerator defines the valid address select (asel) endpoints | |
#define | CSL_LCDMA_RINGACC_ASEL_ENDPOINT_PHYSADDR ((uint32_t) 0U) |
typedef uint32_t | CSL_LcdmaRingAccAselEndpoint |
Data Structures | |
struct | CSL_LcdmaRingaccCfg |
CSL_LcdmaRingaccCfg contains information to configure the ring accelerator. More... | |
struct | CSL_LcdmaRingaccRingCfg |
CSL_LcdmaRingaccRingCfg contains information to configure a ring. More... | |
Macros | |
#define | CSL_LCDMA_RINGACC_RING_EL_SIZE_BYTES ((uint32_t) 8U) |
#define | CSL_LCDMA_RINGACC_MAX_RINGS (1024U) |
#define | CSL_LCDMA_RINGACC_MAX_MONITOR_INTRS (0U) |
#define | CSL_LCDMA_RINGACC_CRED_PASSTHRU (0xFFFFFFFFU) |
#define | CSL_LCDMA_RINGACC_ORDERID_BYPASS (0xFFFFFFFFU) |
#define | CSL_LCDMA_RINGACC_RING_EVENT_DISABLE (0xFFFFU) |
#define | CSL_lcdma_ringaccMakeDescAddr CSL_lcdma_ringaccSetAselInAddr |
Typedefs | |
typedef void(* | CSL_lcdma_ringaccMemOpsFxnPtr) (void *pVirtAddr, uint32_t size, uint32_t opsType) |
User-provided memory fence call-back function to perform memory sync operations. The operation to perform depends on the opsType flag and also on the CPU/cache architecture. More... | |
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... | |