PDK API Guide for J721E
DRU Functions

Introduction

Functions

int32_t CSL_druGetCapabilities (const CSL_DRU_t *pRegs, CSL_DruCapabilities *druCap)
 This API returns the DRU capabilities. More...
 
int32_t CSL_druQueueConfig (const CSL_DRU_t *pRegs, uint32_t queueId, const CSL_DruQueueConfig *queueCfg)
 This API configures the DRU queue non-real time configurations. More...
 
int32_t CSL_druChConfig (const CSL_DRU_t *pRegs, uint32_t chId, const CSL_DruChConfig *chCfg)
 This API configures the DRU channel non-real time configurations. More...
 
int32_t CSL_druChSetEvent (const CSL_DRU_t *pRegs, uint32_t chId, uint64_t evtNum)
 This API configures the DRU channel event. More...
 
int32_t CSL_druChEnable (const CSL_DRU_t *pRegs, uint32_t chId)
 This API enables the DRU channel using the real time registers. More...
 
int32_t CSL_druChDisable (const CSL_DRU_t *pRegs, uint32_t chId)
 This API disables the DRU channel using the real time registers. More...
 
int32_t CSL_druChTeardown (const CSL_DRU_t *pRegs, uint32_t chId)
 This API teardowns the specified channel. More...
 
uint32_t CSL_druChIsTeardownComplete (const CSL_DRU_t *pRegs, uint32_t chId)
 This API checks if a teardown is complete for specified channel. More...
 
int32_t CSL_druChPause (const CSL_DRU_t *pRegs, uint32_t chId)
 This API pauses the specified channel. More...
 
int32_t CSL_druChResume (const CSL_DRU_t *pRegs, uint32_t chId)
 This API resumes the specified channel. More...
 
static void CSL_druChSubmitTr (const CSL_DRU_t *pRegs, uint32_t chId, uint32_t coreId, const CSL_UdmapTR *tr)
 This API does a direct TR submission to the specified channel and core ID. More...
 
volatile uint64_t * CSL_druChGetTriggerRegAddr (CSL_DRU_t *pRegs, uint32_t chId)
 This API get the triggers register address for the channel. More...
 
static void CSL_druChSetLocalTrigger0Raw (volatile uint64_t *pSwTrigReg)
 This API triggers the local event 0 for the specified channel. More...
 
static void CSL_druChSetGlobalTrigger0Raw (volatile uint64_t *pSwTrigReg)
 This API triggers the global event 0 for the specified channel. More...
 
static void CSL_druChSetGlobalTrigger1Raw (volatile uint64_t *pSwTrigReg)
 This API triggers the global event 1 for the specified channel. More...
 
int32_t CSL_druChSetLocalTrigger0 (CSL_DRU_t *pRegs, uint32_t chId)
 This API triggers the local event 0 for the specified channel. More...
 
int32_t CSL_druChSetGlobalTrigger0 (CSL_DRU_t *pRegs, uint32_t chId)
 This API triggers the global event 0 for the specified channel. More...
 
int32_t CSL_druChSetGlobalTrigger1 (CSL_DRU_t *pRegs, uint32_t chId)
 This API triggers the global event 1 for the specified channel. More...
 
int32_t CSL_druGetQueueStatus (const CSL_DRU_t *pRegs, uint32_t queueId, CSL_DruQueueStatus *status)
 This API returns the status of the specified queue. More...
 

Function Documentation

◆ CSL_druGetCapabilities()

int32_t CSL_druGetCapabilities ( const CSL_DRU_t *  pRegs,
CSL_DruCapabilities druCap 
)

This API returns the DRU capabilities.

Parameters
pRegs[IN] DRU register base.
druCap[OUT] Pointer to DRU capability structure to be filled.
Returns
CSL_ErrType_t

◆ CSL_druQueueConfig()

int32_t CSL_druQueueConfig ( const CSL_DRU_t *  pRegs,
uint32_t  queueId,
const CSL_DruQueueConfig queueCfg 
)

This API configures the DRU queue non-real time configurations.

Parameters
pRegs[IN] DRU register base.
queueId[IN] Queue ID - 0 to (CSL_DRU_NUM_QUEUE - 1). Refer CSL_DruQueueId.
queueCfg[IN] Pointer to queue configuration.
Returns
CSL_ErrType_t

◆ CSL_druChConfig()

int32_t CSL_druChConfig ( const CSL_DRU_t *  pRegs,
uint32_t  chId,
const CSL_DruChConfig chCfg 
)

This API configures the DRU channel non-real time configurations.

Parameters
pRegs[IN] DRU register base.
chId[IN] Channel ID - 0 to (CSL_DRU_NUM_CH - 1).
chCfg[IN] Pointer to channel configuration.
Returns
CSL_ErrType_t

◆ CSL_druChSetEvent()

int32_t CSL_druChSetEvent ( const CSL_DRU_t *  pRegs,
uint32_t  chId,
uint64_t  evtNum 
)

This API configures the DRU channel event.

Parameters
pRegs[IN] DRU register base.
chId[IN] Channel ID - 0 to (CSL_DRU_NUM_CH - 1).
evtNum[IN] Global event number to generate anytime the required event generation criteria specified in a TR are met. A single event with this event number will be generated.
Returns
CSL_ErrType_t

◆ CSL_druChEnable()

int32_t CSL_druChEnable ( const CSL_DRU_t *  pRegs,
uint32_t  chId 
)

This API enables the DRU channel using the real time registers.

Parameters
pRegs[IN] DRU register base.
chId[IN] Channel ID - 0 to (CSL_DRU_NUM_CH - 1).
Returns
CSL_ErrType_t

◆ CSL_druChDisable()

int32_t CSL_druChDisable ( const CSL_DRU_t *  pRegs,
uint32_t  chId 
)

This API disables the DRU channel using the real time registers.

Parameters
pRegs[IN] DRU register base.
chId[IN] Channel ID - 0 to (CSL_DRU_NUM_CH - 1).
Returns
CSL_ErrType_t

◆ CSL_druChTeardown()

int32_t CSL_druChTeardown ( const CSL_DRU_t *  pRegs,
uint32_t  chId 
)

This API teardowns the specified channel.

Parameters
pRegs[IN] DRU register base.
chId[IN] Channel ID - 0 to (CSL_DRU_NUM_CH - 1).
Returns
CSL_ErrType_t

◆ CSL_druChIsTeardownComplete()

uint32_t CSL_druChIsTeardownComplete ( const CSL_DRU_t *  pRegs,
uint32_t  chId 
)

This API checks if a teardown is complete for specified channel.

Parameters
pRegs[IN] DRU register base.
chId[IN] Channel ID - 0 to (CSL_DRU_NUM_CH - 1).
Returns
TRUE if complete else returns FALSE.

◆ CSL_druChPause()

int32_t CSL_druChPause ( const CSL_DRU_t *  pRegs,
uint32_t  chId 
)

This API pauses the specified channel.

Parameters
pRegs[IN] DRU register base.
chId[IN] Channel ID - 0 to (CSL_DRU_NUM_CH - 1).
Returns
CSL_ErrType_t

◆ CSL_druChResume()

int32_t CSL_druChResume ( const CSL_DRU_t *  pRegs,
uint32_t  chId 
)

This API resumes the specified channel.

Parameters
pRegs[IN] DRU register base.
chId[IN] Channel ID - 0 to (CSL_DRU_NUM_CH - 1).
Returns
CSL_ErrType_t

◆ CSL_druChSubmitTr()

static void CSL_druChSubmitTr ( const CSL_DRU_t *  pRegs,
uint32_t  chId,
uint32_t  coreId,
const CSL_UdmapTR *  tr 
)
inlinestatic

This API does a direct TR submission to the specified channel and core ID.

Note: No error checks are performed by this API to get maximum performance

Parameters
pRegs[IN] DRU register base.
chId[IN] Channel ID - 0 to (CSL_DRU_NUM_CH - 1).
coreId[IN] Core ID - 0 to (CSL_DRU_NUM_CORE - 1). Refer CSL_DruCoreId
tr[IN] Pointer to TR to be submitted.

◆ CSL_druChGetTriggerRegAddr()

volatile uint64_t* CSL_druChGetTriggerRegAddr ( CSL_DRU_t *  pRegs,
uint32_t  chId 
)

This API get the triggers register address for the channel.

Parameters
pRegs[IN] DRU register base.
chId[IN] Channel ID - 0 to (CSL_DRU_NUM_CH - 1).
Returns
Register address on success else return NULL on error.

◆ CSL_druChSetLocalTrigger0Raw()

static void CSL_druChSetLocalTrigger0Raw ( volatile uint64_t *  pSwTrigReg)
inlinestatic

This API triggers the local event 0 for the specified channel.

Note: No error checks are performed by this API to get maximum performance

Parameters
pSwTrigReg[IN] DRU SW trigger register address. Use CSL_druChGetTriggerRegAddr API to get the trigger register address.

◆ CSL_druChSetGlobalTrigger0Raw()

static void CSL_druChSetGlobalTrigger0Raw ( volatile uint64_t *  pSwTrigReg)
inlinestatic

This API triggers the global event 0 for the specified channel.

Note: No error checks are performed by this API to get maximum performance

Parameters
pSwTrigReg[IN] DRU SW trigger register address. Use CSL_druChGetTriggerRegAddr API to get the trigger register address.

◆ CSL_druChSetGlobalTrigger1Raw()

static void CSL_druChSetGlobalTrigger1Raw ( volatile uint64_t *  pSwTrigReg)
inlinestatic

This API triggers the global event 1 for the specified channel.

Note: No error checks are performed by this API to get maximum performance

Parameters
pSwTrigReg[IN] DRU SW trigger register address. Use CSL_druChGetTriggerRegAddr API to get the trigger register address.

◆ CSL_druChSetLocalTrigger0()

int32_t CSL_druChSetLocalTrigger0 ( CSL_DRU_t *  pRegs,
uint32_t  chId 
)

This API triggers the local event 0 for the specified channel.

Parameters
pRegs[IN] DRU register base.
chId[IN] Channel ID - 0 to (CSL_DRU_NUM_CH - 1).
Returns
CSL_ErrType_t

◆ CSL_druChSetGlobalTrigger0()

int32_t CSL_druChSetGlobalTrigger0 ( CSL_DRU_t *  pRegs,
uint32_t  chId 
)

This API triggers the global event 0 for the specified channel.

Parameters
pRegs[IN] DRU register base.
chId[IN] Channel ID - 0 to (CSL_DRU_NUM_CH - 1).
Returns
CSL_ErrType_t

◆ CSL_druChSetGlobalTrigger1()

int32_t CSL_druChSetGlobalTrigger1 ( CSL_DRU_t *  pRegs,
uint32_t  chId 
)

This API triggers the global event 1 for the specified channel.

Parameters
pRegs[IN] DRU register base.
chId[IN] Channel ID - 0 to (CSL_DRU_NUM_CH - 1).
Returns
CSL_ErrType_t

◆ CSL_druGetQueueStatus()

int32_t CSL_druGetQueueStatus ( const CSL_DRU_t *  pRegs,
uint32_t  queueId,
CSL_DruQueueStatus status 
)

This API returns the status of the specified queue.

Parameters
pRegs[IN] DRU register base.
queueId[IN] Queue ID - 0 to (CSL_DRU_NUM_QUEUE - 1). Refer CSL_DruQueueId.
status[OUT] Pointer to DRU queue status structure where status is returned.
Returns
CSL_ErrType_t