Download presentation
Presentation is loading. Please wait.
Published byMichael Barton Modified over 8 years ago
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 EDMA3 Resource Manager PaRAMs DMA/ QDMA Channels TCCs EDMA3 ISRs PSP Drivers CSL/DAT Framework Components DMAN3ACPY3 EDMA3 Package Internally calls EDMA3 Driver APIs EDMA3 Resource Manager
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 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. Creates EDMA3 Driver Object associated with the hardware HW specific configuration information passed as argument. EDMA3_DRV_Handle OS specific SEM_create() call 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.
5
EDMA3 LLD Sequence (Driver APIs) 0 EDMA3_DRV_requestChannel() 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
6
EDMA3 LLD Sequence (cont’d..) EDMA3_DRV_setQdmaTrigWord() 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
7
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
8
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_DRV_Handle OS specific SEM_delete() and EDMA3 ISR un-registration calls
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 2.x on EDMA2 (hardware queue depth 4 on DM642) DAT_copy x x x x DAT_open DAT_copy x DAT 3.x on EDMA3 (no hardware queue)
12
CSL DAT adapter (cont’d) DAT 2.x on EDMA2 (hardware queue depth 4 on DM642) DAT_copy x x x x DAT_open DAT_copy x DAT 3.x on EDMA3 (no hardware queue) X DAT_copy
13
CSL DAT adapter (cont’d) DAT 2.x on EDMA2 (hardware queue depth 4 on DM642) DAT_copy x x x x DAT_open DAT_copy x DAT using CSL Adapter on EDMA3 (no hardware queue) DAT_copy x x numChannels = 6 DAT_copy x
14
See DAT adapter code with example
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.