csl dat adapter
DESCRIPTION
CSL DAT Adapter. CSL 2.x DAT Reference Implementation on EDMA3 hardware using EDMA3 Low level driver. EDMA3 Low Level Driver (LLD). EDMA3 Driver APIs EDMA3 Resource Manager. Framework Components. PSP Drivers. CSL/ DAT. CSL/DAT. DMAN3. ACPY3. EDMA3 Resource Manager. EDMA3 Driver. - PowerPoint PPT PresentationTRANSCRIPT
CSL DAT Adapter
CSL 2.x DAT Reference Implementation on EDMA3 hardware
using EDMA3 Low level driver.
EDMA3 Driver
EDMA3 Driver
EDMA3 Low Level Driver (LLD)
• EDMA3 Driver APIs
• EDMA3 Resource Manager
EDMA3 Resource Manager
PaRAMs
DMA/QDMA
ChannelsTCCs
EDMA3 ISRs
PSP Drivers CSL/DATFramework Components
DMAN3 ACPY3CSL/DAT
EDMA3 Package
Internally calls
EDMA3 LLD Package
• OS independent package• Registering and un-registering of EDMA3 Interrupt Service
Routines with the underlying OS is responsibility of user.• User expected to provide implementation for the following
functions to correctly link an application with the EDMA3 LLD Package.
– edma3OsProtectEntry, edma3OsProtectExit
» Used to protect entry and exit into critical sections of code.
– edma3OsSemGive, edma3OsSemTake
» Used for proper sharing and management of EDMA3 resources among multiple users.
• Demo application provides sample implementation of these functions on BIOS
EDMA3 LLD Initialization
EDMA3_DRV_create()
0
EDMA3_RM_create()
EDMA3_DRV_open()
EDMA3_RM_open()
Initializes the global and shadow regions and programs EDMA3
H/W registers.
Internally calls
•Creates EDMA3 Driver Object associated with the hardware•HW specific configuration information passed as argument.
•Creates the EDMA3 Driver Instance, associated with particular shadow region. •Takes region specific configuration information and a semaphore handle as argument•Returns handle to newly created instance. EDMA3_DRV_HandleOS specific
SEM_create() call
EDMA3 LLD Sequence (driver APIs)
0
EDMA3_DRV_requestChannel()
EDMA3_RM_allocResource() EDMA3_RM_allocResource()EDMA3_RM_registerTccCb()
EDMA3_RM_mapEdmaChannel()EDMA3_RM_mapQdmaChannel()
Allocates a channel, param set, and a tcc. Registers the callback function and enable interrupts.
Binds channel to the param set.
•Specify the channel type, channel number, tcc, event queue and the callback function.
EDMA3_DRV_Handle
OS specific EDMA3 ISR registration call
EDMA3_DRV_setQdmaTrigWord()
EDMA3 LLD Sequence (cont’d..)
EDMA3_DRV_setSrcParams()EDMA3_DRV_setDestParams()
0
EDMA3_DRV_setSrcIndex()EDMA3_DRV_setDestIndex()
EDMA3_DRV_setTransferParams()
EDMA3_DRV_setOptField()
Programs PaRAM Set
EDMA3_DRV_Handle
EDMA3 LLD Sequence (cont’d..)
EDMA3_DRV_clearErrorBits()
EDMA3_DRV_setParam()
EDMA3_DRV_enableTransfer()
After transfer completes, callback function is called
(if registered)
•Mode of data transfer (event, manual, QDMA) passed as an argument along with the channel id.
0
EDMA3_DRV_Handle
EDMA3 LLD Sequence (cont’d..)
0
EDMA3_DRV_close()
EDMA3_DRV_freeChannel()
EDMA3_DRV_delete()
EDMA3_RM_close()
Resets the state of the RM Instance configuration. Unregisters interrupts if no other RM instance exists.
Programs H/W registers
EDMA3_RM_delete()
EDMA3_RM_freeResource()…EDMA3_RM_freeResource()…
EDMA3_DRV_Handle
OS specific SEM_delete() and EDMA3 ISR un-registration calls
CSL DAT
• CSL DAT consists of a small set of convenience APIs to move data around using the EDMA hardware.
– DAT_open, DAT_copy, DAT_copy2d, DAT_fill, DAT_wait, DAT_busy, DAT_close.
• CSL 2.x DAT and 3.x DAT implementations had different behavior as the underlying EDMA hardware changed (EDMA2 to EDMA3)
– DAT_copy, DAT_copy2d are non-blocking calls on DAT 2.x, and blocking calls on DAT 3.x.
CSL DAT adapter
• CSL DAT wrapper OS independent.• CSL DAT adapter implements the CSL 2.x DAT on the
EDMA3 hardware– Uses the CSL 2.x header files
– Behavior of the new API implementation, similar to that on EDMA2 hardware
– Uses the EDMA3 Low Level Driver Package (only the Driver API was required)
» Adds two APIs DAT_EDMA3LLD_init () and DAT_EDMA3LLD_exit() to set up the EDMA3 LLD.
– Users of the package need to implement 2 functions
» _dat_critical_section_enter() and _dat_critical_section_exit()
– Demo application provides sample implementation of these functions on BIOS
CSL DAT adapter (cont’d)
DAT 2.x on EDMA2 (hardware queue depth 4 on DM642)
DAT_copyDAT_copy
xx
DAT_copyx
DAT_copyx
DAT_copy
DAT_open DAT_open
DAT_copyx
DAT_copy
DAT 3.x on EDMA3 (no hardware queue)
CSL DAT adapter (cont’d)
DAT 2.x on EDMA2 (hardware queue depth 4 on DM642)
DAT_copyDAT_copy
xx
DAT_copyx
DAT_copyx
DAT_copy
DAT_open DAT_open
DAT_copyx
DAT 3.x on EDMA3 (no hardware queue)
XDAT_copy
CSL DAT adapter (cont’d)
DAT 2.x on EDMA2 (hardware queue depth 4 on DM642)
DAT_copyDAT_copy
xx
DAT_copyx
DAT_copyx
DAT_copy
DAT_open DAT_open
DAT_copyx
DAT_copy
DAT using CSL Adapter on EDMA3 (no hardware queue)
DAT_copy
x
xnumChannels
= 6DAT_copy
x
• See DAT adapter code with example