1 / 10

A vxWorks driver for DMA on VMEbus

A vxWorks driver for DMA on VMEbus. Babak Kalantari Paul Scherrer Institute Switzerland. Direct Memory Access. Processor board. Slave board (e.g. ADC). CPU. Memory. Memory. Memory. PCI-VME bridge. - Universe II - Tsi148 - etc. Transfer by CPU. Transfer using DMA. VMEbus.

dswinehart
Download Presentation

A vxWorks driver for DMA on VMEbus

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. A vxWorks driver for DMA on VMEbus Babak Kalantari Paul Scherrer Institute Switzerland

  2. Direct Memory Access Processor board Slave board (e.g. ADC) CPU Memory Memory Memory PCI-VME bridge - Universe II - Tsi148 - etc. Transfer by CPU Transfer using DMA VMEbus

  3. DMA: software support • DMA drivers in out-of-the-box BSP’s : • have differentAPI • from BSP to BSP depending on PCI-VME bus bridge controller • some use polling • to check transfer completion (MVME -23xx and -51xx boards have no interrupt handling, callback, …) • have single-requester API • while a transfer is on execution the next transfer request fails (DMA engine busy) application program has to keep retrying • assume a fixed transfer protocol per VME access window

  4. DMA: software support • We’ve developed a driver that provides: • effective use of DMA engine • interrupt / Error handling, user callback, DMA engine control/monitor, etc. • multi-requester API • parallel request handling, reading status, cancelling, or stopping a transfer request • unique API • throughout several processor boards: (mvme-23xx, mvme-51xx, mvme-6100, mvme-4100, should also work for mvme-3100)

  5. DMA: software support User application (drivers) API (dmaLib.h) implementation (dmaLib.c) BSP BSP universe II implementation (dmaLib.c) BSP BSP Tsi148 mvme23xx mvme51xx mvme61xx mvme41xx

  6. DMA driver API • destination • source • size • addrMode • dataWidth • direction • timeout • *cb_routine • *cb_param • *dmaStat • dmaReqId = dmaTransferRequest(…) • dmaRequestStatRead(dmaReqId) • dmaRequestCancel(dmaReqId, forcedStop) • dmaStatReport()

  7. DMA driver operation principle dmaReq_0 dmaReq_1 If queue non-empty then Handle dmaReq_x msgQueue dmaReq_n • Check if this request is not cancelled • Program DMA engine + initiate transfer • Block until completion or error occurrence • Call the user callback and pass the status client server

  8. same dmaLib.h in standard vxWorks include path rebuild kernel with the right dmaLib.c added to the BSP Include the source code in configAll Make a call to “dmaHandlerInit()” in usrConfig API Documentaion: https://controls.web.psi.ch/cgi-bin/twiki/view/Main/VxWorksDmaDriver Usage:

  9. Thanks!

  10. DMA: Processor Boards

More Related