1 / 14

CSL DAT Adapter

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.

chloe
Télécharger la présentation

CSL DAT Adapter

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CSL DAT Adapter CSL 2.x DAT Reference Implementation on EDMA3 hardware using EDMA3 Low level driver.

  2. 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 EDMA3 Driver Internally calls DMA/ QDMA Channels TCCs PaRAMs EDMA3 ISRs EDMA3 Package

  3. 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

  4. EDMA3 LLD Initialization • 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. • Creates EDMA3 Driver Object associated with the hardware • HW specific configuration information passed as argument. EDMA3_DRV_create() OS specific SEM_create() call EDMA3_DRV_Handle EDMA3_DRV_open() 0 EDMA3_RM_create() EDMA3_RM_open() Initializes the global and shadow regions and programs EDMA3 H/W registers. Internally calls

  5. EDMA3 LLD Sequence (driver APIs) OS specific EDMA3 ISR registration call • Specify the channel type, channel number, tcc, event queue and the callback function. EDMA3_DRV_Handle EDMA3_DRV_requestChannel() 0 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.

  6. EDMA3 LLD Sequence (cont’d..) EDMA3_DRV_Handle EDMA3_DRV_setSrcParams() EDMA3_DRV_setDestParams() EDMA3_DRV_setSrcIndex() EDMA3_DRV_setDestIndex() Programs PaRAM Set EDMA3_DRV_setTransferParams() EDMA3_DRV_setOptField() EDMA3_DRV_setQdmaTrigWord() 0

  7. EDMA3 LLD Sequence (cont’d..) EDMA3_DRV_Handle EDMA3_DRV_setParam() EDMA3_DRV_clearErrorBits() • Mode of data transfer (event, manual, QDMA) passed as an argument along with the channel id. EDMA3_DRV_enableTransfer() 0 After transfer completes, callback function is called (if registered)

  8. EDMA3 LLD Sequence (cont’d..) EDMA3_DRV_Handle EDMA3_DRV_freeChannel() EDMA3_DRV_close() OS specific SEM_delete() and EDMA3 ISR un-registration calls EDMA3_DRV_delete() 0 EDMA3_RM_freeResource()… EDMA3_RM_freeResource()… EDMA3_RM_delete() EDMA3_RM_close() Resets the state of the RM Instance configuration. Unregisters interrupts if no other RM instance exists. Programs H/W registers

  9. 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.

  10. 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

  11. CSL DAT adapter (cont’d) DAT_open DAT_open x x DAT_copy x DAT_copy DAT_copy x DAT_copy DAT_copy x DAT_copy DAT_copy DAT 2.x on EDMA2 (hardware queue depth 4 on DM642) DAT 3.x on EDMA3 (no hardware queue)

  12. CSL DAT adapter (cont’d) X DAT_open DAT_open x x DAT_copy x DAT_copy DAT_copy x DAT_copy DAT_copy x DAT_copy DAT_copy DAT 2.x on EDMA2 (hardware queue depth 4 on DM642) DAT 3.x on EDMA3 (no hardware queue)

  13. CSL DAT adapter (cont’d) DAT_open DAT_open x x DAT_copy x DAT_copy x numChannels = 6 DAT_copy x DAT_copy x DAT_copy x DAT_copy x DAT_copy DAT_copy DAT_copy DAT 2.x on EDMA2 (hardware queue depth 4 on DM642) DAT using CSL Adapter on EDMA3 (no hardware queue)

  14. See DAT adapter code with example

More Related