OpenCores
URL https://opencores.org/ocsvn/1g_ethernet_dpi/1g_ethernet_dpi/trunk

Subversion Repositories 1g_ethernet_dpi

[/] [1g_ethernet_dpi/] [trunk/] [sw/] [dev/] [test_main/] [src/] [_hdl/] [bsp/] [libsrc/] [axidma_v9_0/] [src/] [xaxidma_porting_guide.h] - Blame information for rev 4

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 kuzmi4
/******************************************************************************
2
*
3
* Copyright (C) 2010 - 2015 Xilinx, Inc.  All rights reserved.
4
*
5
* Permission is hereby granted, free of charge, to any person obtaining a copy
6
* of this software and associated documentation files (the "Software"), to deal
7
* in the Software without restriction, including without limitation the rights
8
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
* copies of the Software, and to permit persons to whom the Software is
10
* furnished to do so, subject to the following conditions:
11
*
12
* The above copyright notice and this permission notice shall be included in
13
* all copies or substantial portions of the Software.
14
*
15
* Use of the Software is limited solely to applications:
16
* (a) running on a Xilinx device, or
17
* (b) that interact with a Xilinx device through a bus or interconnect.
18
*
19
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22
* XILINX  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
23
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
24
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
* SOFTWARE.
26
*
27
* Except as contained in this notice, the name of the Xilinx shall not be used
28
* in advertising or otherwise to promote the sale, use or other dealings in
29
* this Software without prior written authorization from Xilinx.
30
*
31
******************************************************************************/
32
/*****************************************************************************/
33
/**
34
*
35
* @file xaxidma_porting_guide.h
36
* @addtogroup axidma_v9_0
37
* @{
38
*
39
* This is a guide on how to move from using the xlldma driver to use xaxidma
40
* driver.
41
*
42
* <pre>
43
* MODIFICATION HISTORY:
44
*
45
* Ver   Who  Date     Changes
46
* ----- ---- -------- -------------------------------------------------------
47
* 1.00a jz   05/18/10 First release
48
* 2.00a jz   08/10/10 Second release, added in xaxidma_g.c, xaxidma_sinit.c,
49
*                     updated tcl file, added xaxidma_porting_guide.h
50
* 4.00a rkv  02/22/11 Added support for simple DMA mode
51
* 6.00a srt  03/27/12 Added support for MCDMA mode
52
* 7.00a srt  06/18/12 API calls are reverted back for backward compatibility.
53
*
54
* </pre>
55
*
56
* <b>Overview</b>
57
*
58
* The API for xaxidma driver is similar to xlldma driver. The prefix for the
59
* API functions and structures is XAxiDma_ for the xaxidma driver.
60
*
61
* Due to hardware feature changes, signatures of some API functions are a
62
* little bit different from the xlldma API functions.
63
*
64
* We present API functions:
65
* - That only have prefix changes
66
* - That have different return type
67
* - That are new API functions
68
* - That have been removed
69
*
70
* Note that data structures have different prefix of XAxiDma_. Those API
71
* functions, that have data structures with prefix change, are considered as
72
* prefix change.
73
*
74
* <b>API Functions That Only Have Prefix Changes</b>
75
*
76
* <pre>
77
*         xlldma driver              |         xaxidma driver (upto v5_00_a)
78
* -----------------------------------------------------------------------
79
*    XLlDma_Reset(...)               |  XAxiDma_Reset(...)
80
*    XLlDma_BdRingSnapShotCurrBd(...)|  XAxiDma_BdRingSnapShotCurrBd(...)
81
*    XLlDma_BdRingNext(...)          |  XAxiDma_BdRingNext(...)
82
*    XLlDma_BdRingPrev(...)          |  XAxiDma_BdRingPrev(...)
83
*    XLlDma_BdRingGetSr(...)         |  XAxiDma_BdRingGetSr(...)
84
*    XLlDma_BdRingBusy(...)          |  XAxiDma_BdRingBusy(...)
85
*    XLlDma_BdRingIntEnable(...)     |  XAxiDma_BdRingIntEnable(...)
86
*    XLlDma_BdRingIntDisable(...)    |  XAxiDma_BdRingIntDisable(...)
87
*    XLlDma_BdRingIntGetEnabled(...) |  XAxiDma_BdRingIntGetEnabled(...)
88
*    XLlDma_BdRingGetIrq(...)        |  XAxiDma_BdRingGetIrq(...)
89
*    XLlDma_BdRingAckIrq(...)        |  XAxiDma_BdRingAckIrq(...)
90
*    XLlDma_BdRingCreate(...)        |  XAxiDma_BdRingCreate(...)
91
*    XLlDma_BdRingClone(...)         |  XAxiDma_BdRingClone(...)
92
*    XLlDma_BdRingAlloc(...)         |  XAxiDma_BdRingAlloc(...)
93
*    XLlDma_BdRingUnAlloc(...)       |  XAxiDma_BdRingUnAlloc(...)
94
*    XLlDma_BdRingToHw(...)          |  XAxiDma_BdRingToHw(...)
95
*    XLlDma_BdRingFromHw(...)        |  XAxiDma_BdRingFromHw(...)
96
*    XLlDma_BdRingFree(...)          |  XAxiDma_BdRingFree(...)
97
*    XLlDma_BdRingStart(...)         |  XAxiDma_BdRingStart(...)
98
*    XLlDma_BdRingCheck(...)         |  XAxiDma_BdRingCheck(...)
99
*    XLlDma_BdRingSetCoalesce(...)   |  XAxiDma_BdRingSetCoalesce(...)
100
*    XLlDma_BdRingGetCoalesce(...)   |  XAxiDma_BdRingGetCoalesce(...)
101
*    XLlDma_BdRead(...)              |  XAxiDma_BdRead(...)
102
*    XLlDma_BdWrite(...)             |  XAxiDma_BdWrite(...)
103
*    XLlDma_BdClear(...)             |  XAxiDma_BdClear(...)
104
*    XLlDma_BdSetId(...)             |  XAxiDma_BdSetId(...)
105
*    XLlDma_BdGetId(...)             |  XAxiDma_BdGetId(...)
106
*    XLlDma_BdGetLength(...)         |  XAxiDma_BdGetLength(...)
107
*    XLlDma_BdGetBufAddr(...)        |  XAxiDma_BdGetBufAddr(...)
108
*
109
*</pre>
110
*
111
* <b>API Functions That Have Different Return Type</b>
112
*
113
* Due to possible hardware failures, The caller should check the return value
114
* of the following functions.
115
*
116
* <pre>
117
*         xlldma driver              |         xaxidma driver
118
* -----------------------------------------------------------------------
119
* void XLlDma_Pause(...)             | int XAxiDma_Pause(...)
120
* void XLlDma_Resume(...)            | int XAxiDma_Resume(...)
121
* </pre>
122
*
123
* The following functions have return type changed:
124
*
125
* <pre>
126
*         xlldma driver              |         xaxidma driver
127
* -----------------------------------------------------------------------
128
* XLlDma_BdRing XLlDma_GetRxRing(...)| XAxiDma_BdRing * XAxiDma_GetRxRing(...)
129
* XLlDma_BdRing XLlDma_GetTxRing(...)| XAxiDma_BdRing * XAxiDma_GetTxRing(...)
130
* u32 XLlDma_BdRingMemCalc(...)      | int XAxiDma_BdRingMemCalc(...)
131
* u32 XLlDma_BdRingCntCalc(...)      | int XAxiDma_BdRingCntCalc(...)
132
* u32 XLlDma_BdRingGetCnt(...)       | int XAxiDma_BdRingGetCnt(...)
133
* u32 XLlDma_BdRingGetFreeCnt(...)   | int XAxiDma_BdRingGetFreeCnt(...)
134
* void XLlDma_BdSetLength(...)       | int XAxiDma_BdSetLength(...)
135
* void XLlDma_BdSetBufAddr(...)      | int XAxiDma_BdSetBufAddr(...)
136
*</pre>
137
*
138
* <b>API Functions That Are New API Functions</b>
139
*
140
* Now that the AXI DMA core is a standalone core, some new API are intrduced.
141
* Some other functions are added due to hardware interface change, so to
142
* replace old API functions.
143
*
144
* - XAxiDma_Config *XAxiDma_LookupConfig(u32 DeviceId);
145
* - int XAxiDma_CfgInitialize(XAxiDma * InstancePtr, XAxiDma_Config *Config);
146
* - int XAxiDma_ResetIsDone(XAxiDma * InstancePtr);
147
* - XAxiDma_Bd * XAxiDma_BdRingGetCurrBd(XAxiDma_BdRing* RingPtr);
148
* - int XAxiDma_BdRingHwIsStarted(XAxiDma_BdRing* RingPtr);
149
* - void XAxiDma_BdRingDumpRegs(XAxiDma_BdRing *RingPtr);
150
* - int XAxiDma_StartBdRingHw(XAxiDma_BdRing* RingPtr);
151
* - void XAxiDma_BdSetCtrl(XAxiDma_Bd *BdPtr, u32 Data);
152
* - u32 XAxiDma_BdGetCtrl(XAxiDma_Bd* BdPtr);
153
* - u32 XAxiDma_BdGetSts(XAxiDma_Bd* BdPtr);
154
* - int XAxiDma_BdHwCompleted(XAxiDma_Bd* BdPtr);
155
* - int XAxiDma_BdGetActualLength(XAxiDma_Bd* BdPtr);
156
* - int XAxiDma_BdSetAppWord(XAxiDma_Bd * BdPtr, int Offset, u32 Word);
157
* - u32 XAxiDma_BdGetAppWord(XAxiDma_Bd * BdPtr, int Offset, int *Valid);
158
*
159
* <b>API Functions That Have Been Removed</b>
160
*
161
* Please see individual function comments for how to replace the removed API
162
* function with new API functions.
163
*
164
* - void XLlDma_Initialize(XLlDma * InstancePtr, u32 BaseAddress).
165
*   This function is replaced by XAxiDma_LookupConfig()/XAxiDma_CfgInitialize()
166
*
167
* - u32 XLlDma_BdRingGetCr(XLlDma_BdRing* RingPtr).
168
*   This is replaced by XAxiDma_BdRingGetError(XAxiDma_BdRing* RingPtr)
169
*
170
* - u32 XLlDma_BdRingSetCr(XLlDma_BdRing* RingPtr, u32 Data).
171
*   This function is covered by other API functions:
172
*      - void XAxiDma_BdRingIntEnable(XAxiDma_BdRing* RingPtr, u32 Mask)
173
*      - void XAxiDma_BdRingIntDisable(XAxiDma_BdRing* RingPtr, u32 Mask)
174
*      - int XAxiDma_BdRingSetCoalesce(XAxiDma_BdRing * RingPtr, u32 Counter,
175
*            u32 Timer)
176
*
177
* - u32 XLlDma_BdSetStsCtrl(XLlDma_Bd* BdPtr, u32 Data).
178
*   Replaced by XAxiDma_BdSetCtrl(XAxiDma_Bd *BdPtr, u32 Data);
179
*
180
* - u32 XLlDma_BdGetStsCtrl(XLlDma_Bd* BdPtr).
181
*   Replaced by XAxiDma_BdGetCtrl(XAxiDma_Bd* BdPtr) and
182
*   XAxiDma_BdGetSts(XAxiDma_Bd* BdPtr).
183
*
184
* <b>API Functions That Have Been Added to support simple DMA mode</b>
185
*
186
* - u32 XAxiDma_Busy(XAxiDma *InstancePtr,int Direction);
187
* - int XAxiDma_SimpleTransfer(XAxiDma *InstancePtr, u32 BuffAddr, int Length,
188
*       int Direction);
189
* - XAxiDma_HasSg(InstancePtr);
190
* - XAxiDma_IntrEnable(InstancePtr,Mask,Direction);
191
* - XAxiDma_IntrGetEnabled(InstancePtr, Direction);
192
* - XAxiDma_IntrDisable(InstancePtr, Mask, Direction);
193
* - XAxiDma_IntrGetIrq(InstancePtr, Direction);
194
* - XAxiDma_IntrAckIrq(InstancePtr, Mask, Direction);
195
*
196
* <b> For xaxidma driver v6_00_a Multiple Channel Support
197
*     ---------------------------------------------------
198
* This driver supports Multi-channel mode and accordingly some APIs are
199
* changed to index multiple channels. Few new APIs are added.
200
*  - Changed APIs
201
*       * XAxiDma_GetRxRing(InstancePtr, RingIndex)
202
*       * XAxiDma_Start(XAxiDma * InstancePtr, int RingIndex)
203
*       * XAxiDma_Started(XAxiDma * InstancePtr, int RingIndex)
204
*       * XAxiDma_Pause(XAxiDma * InstancePtr, int RingIndex)
205
*       * XAxiDma_Resume(XAxiDma * InstancePtr, int RingIndex)
206
*       * XAxiDma_SimpleTransfer(XAxiDma *InstancePtr,
207
*                       u32 BuffAddr, u32 Length,
208
*                       int Direction, int RingIndex)
209
*       * XAxiDma_StartBdRingHw(XAxiDma_BdRing * RingPtr,
210
*                       int RingIndex)
211
*       * XAxiDma_BdRingStart(XAxiDma_BdRing * RingPtr,
212
*                        int RingIndex)
213
*       * XAxiDma_BdRingToHw(XAxiDma_BdRing * RingPtr,
214
*                       int NumBd, XAxiDma_Bd * BdSetPtr, int RingIndex)
215
*       * XAxiDma_BdRingDumpRegs(XAxiDma_BdRing * RingPtr,
216
*                        int RingIndex)
217
*       * XAxiDma_BdRingSnapShotCurrBd(XAxiDma_BdRing * RingPtr,
218
*                        int RingIndex)
219
*       * XAxiDma_BdSetLength(XAxiDma_Bd *BdPtr,
220
*                       u32 LenBytes, u32 LengthMask)
221
*       * XAxiDma_BdGetActualLength(BdPtr, LengthMask)
222
*       * XAxiDma_BdGetLength(BdPtr, LengthMask)
223
*
224
*  - New APIs
225
*       * XAxiDma_SelectKeyHole(XAxiDma *InstancePtr,
226
*                       int Direction, int Select)
227
*       * XAxiDma_UpdateBdRingCDesc(XAxiDma_BdRing * RingPtr,
228
*                       int RingIndex)
229
*       * XAxiDma_BdSetTId()
230
*       * XAxiDma_BdGetTId()
231
*       * XAxiDma_BdSetTDest()
232
*       * XAxiDma_BdGetTDest()
233
*       * XAxiDma_BdSetTUser()
234
*       * XAxiDma_BdGetTUser()
235
*       * XAxiDma_BdSetARCache()
236
*       * XAxiDma_BdGetARCache()
237
*       * XAxiDma_BdSetARUser()
238
*       * XAxiDma_BdGetARUser()
239
*       * XAxiDma_BdSetStride()
240
*       * XAxiDma_BdGetStride()
241
*       * XAxiDma_BdSetVSize()
242
*       * XAxiDma_BdGetVSize()
243
* <b> For xaxidma driver v7_00_a
244
*     ---------------------------------------------------
245
*  - New API
246
*       * XAxiDma_GetRxIndexRing(InstancePtr, RingIndex)
247
*
248
*  - Changed APIs
249
*       All the APIs changed in v6_00_a are reverted back for backward
250
*       compatibility.
251
*</pre>
252
*
253
******************************************************************************/
254
/** @} */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.