Hi,
My SIS3820 driver reads out a FIFO using BLT. Here is the code snippet:
if (useDma_ && (count >= MIN_DMA_TRANSFERS)) {
asynPrint(pasynUserSelf, ASYN_TRACE_FLOW,
"%s:%s: doing DMA transfer, fifoBuffer=%p, fifo_base=%p, count=%d\n",
driverName, functionName, fifoBuffer_, fifo_base_, count);
status = sysDmaFromVme(dmaId_, fifoBuffer_, (int)fifo_base_, VME_AM_EXT_SUP_D64BLT, (count)*sizeof(int), 8);
if (status) {
asynPrint(pasynUserSelf, ASYN_TRACE_ERROR,
"%s:%s: doing DMA transfer, error calling sysDmaFromVme, status=%d, buff=%p, fifo_base=%p, count=%d\n",
driverName, functionName, status, fifoBuffer_, fifo_base_, count);
}
You can get the complete file containing this snippet here:
https://subversion.xor.aps.anl.gov/synApps/mca/trunk/mcaApp/SISSrc/drvSIS3820.cpp
This code uses the DMA functions that Andrew Johnson provides in the vxWorks BSPs at the APS.
I would like to suggest (again) that these functions or something similar should be added to devLib in EPICS base, so that we can all write portable code that uses DMA!
Cheers,
Mark
________________________________________
From: [email protected] [[email protected]] on behalf of Bai Jiaoni [[email protected]]
Sent: Wednesday, February 15, 2012 7:17 AM
To: [email protected]
Subject: Epics driver using BLT or CBLT to read FIFO wanted
I want to wirte a driver for the hardware, which needs to use record to read the
data of FIFO(altera FPGA) by BLT or CBLT. Do you know some other dirvers finishing
the same function?
Version:Epics 3.13 or 3.14; vxWorks 5.4; VME bus
I am looking forward to your reply.
- Replies:
- Re: Epics driver using BLT or CBLT to read FIFO wanted Till Straumann
- References:
- Epics driver using BLT or CBLT to read FIFO wanted Bai Jiaoni
- Navigate by Date:
- Prev:
RE: Modbus/serial using Stream? Mark Rivers
- Next:
Re: epics-arduino Michael Davidsaver
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
<2012>
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Epics driver using BLT or CBLT to read FIFO wanted Bai Jiaoni
- Next:
Re: Epics driver using BLT or CBLT to read FIFO wanted Till Straumann
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
<2012>
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|