OpenCores
URL https://opencores.org/ocsvn/pcie_ds_dma/pcie_ds_dma/trunk

Subversion Repositories pcie_ds_dma

[/] [pcie_ds_dma/] [trunk/] [soft/] [linux/] [common/] [utils/] [ctrlstrm.h] - Blame information for rev 6

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 dsmv
/*
2
 ****************** File ctrlstrm.h *************************
3
 *
4
 *  Definitions of user application interface
5
 *      structures and constants
6
 *      for BRD_ctrl : STREAM section
7
 *
8
 * (C) Instrumental Systems
9
 *
10
 * Created: by Ekkore Feb, 2003
11
 * Modified:
12
 * 19.09.2005 - added ATTACH/DETACH, waiting & special command (Ekkore & Dorokhin A.)
13
 *
14
 ************************************************************
15
*/
16
 
17
#ifndef _CTRL_STREAM_H
18
#define _CTRL_STREAM_H
19
 
20
//
21
// Stub Structure
22
//
23
typedef struct
24
{
25
    s32         lastBlock;                              // Number of Block which was filled last Time
26
    u32         totalCounter;                   // Total Counter of all filled Block
27
    u32         offset;                                 // First Unfilled Byte
28
    u32         state;                                  // CBUF local state
29
} BRDstrm_Stub, *PBRDstrm_Stub, BRDctrl_StreamStub, *PBRDctrl_StreamStub;
30
 
31
//
32
// For BRDctrl_STREAM_CBUF_ALLOC
33
// For BRDctrl_STREAM_CBUF_REALLOC
34
//
35
typedef struct
36
{
37
    u32                         dir;            // IN, Stream Direction (1-to Host, 2-from Host)
38
    u32                         isCont;         // IN, Allocation Method: 0-FileMapping, 1-System Pool (Ring 0)
39
    u32                         blkNum;         // IN, Number of Blocks
40
    u32                         blkSize;        // IN, Size of Blocks (bytes)
41
    void**                      ppBlk;          // OUT,Block Pointers
42
    BRDstrm_Stub*               pStub;          // OUT,Stub Pointer
43
} BRDctrl_StreamCBufAlloc,   *PBRDctrl_StreamCBufAlloc,
44
BRDctrl_StreamCBufRealloc, *PBRDctrl_StreamCBufRealloc;
45
 
46
//
47
// For BRDctrl_STREAM_CBUF_START
48
//
49
typedef struct
50
{
51
    u32         isCycle;                        // IN,  Cycle Mode (1-on, 0-off)
52
} BRDctrl_StreamCBufStart, *PBRDctrl_StreamCBufStart;
53
 
54
//
55
// For BRDctrl_STREAM_CBUF_STOP
56
//
57
typedef struct
58
{
59
    u32         dummy;                          // Not used
60
} BRDctrl_StreamCBufStop, *PBRDctrl_StreamCBufStop;
61
 
62
//
63
// For BRDctrl_STREAM_CBUF_STATE
64
//
65
typedef struct
66
{
67
    s32         blkNum;                 // OUT, Last Filled Block Number
68
    u32         blkNumTotal;    // OUT, Total Filled Block Counter
69
    u32         offset;                 // OUT, First Unfilled Byte
70
    u32         state;                  // OUT, State of CBuf (1-start, 2-stop, 3-destroied)
71
    u32         timeout;                // IN,  Timeout (msec) (0xFFFFFFFFL - INFINITE)
72
} BRDctrl_StreamCBufState, *PBRDctrl_StreamCBufState;
73
 
74
//
75
// For BRDctrl_STREAM_CBUF_ATTACH
76
//
77
typedef struct
78
{
79
    u32                         dir;            // OUT, Stream Direction (1-to Host, 2-from Host)
80
    u32                         isCont;         //      Reserved
81
    u32                         blkNum;         // I/O, Size of ppBlk[], Number of Blocks
82
    u32                         blkSize;        // OUT, Size of Blocks (bytes)
83
    void**                      ppBlk;          // OUT, Block Pointers
84
    BRDstrm_Stub*       pStub;          // OUT, Stub Pointer
85
} BRDctrl_StreamCBufAttach, *PBRDctrl_StreamCBufAttach;
86
 
87
//
88
// For BRDctrl_STREAM_CBUF_WAITBLOCK
89
//
90
typedef struct
91
{
92
    u32         timeout;                // IN,  Timeout (msec) (0xFFFFFFFFL - INFINITE)
93
} BRDctrl_StreamCBufWaitBlock, *PBRDctrl_StreamCBufWaitBlock;
94
 
95
 
96
//
97
// For BRDctrl_STREAM_CBUF_WAITBUF
98
//
99
typedef struct
100
{
101
    u32         timeout;                // IN,  Timeout (msec) (0xFFFFFFFFL - INFINITE)
102
} BRDctrl_StreamCBufWaitBuf, *PBRDctrl_StreamCBufWaitBuf;
103
 
104
//
105
// For BRDctrl_STREAM_SETDIR, BRDctrl_STREAM_GETDIR
106
//
107
typedef struct
108
{
109
    u32         dir;                    // IN, Stream Direction (1-to Host, 2-from Host)
110
} BRDctrl_StreamSetDir, *PBRDctrl_StreamSetDir,
111
BRDctrl_StreamGetDir, *PBRDctrl_StreamGetDir;
112
 
113
//
114
// For BRDctrl_STREAM_SETSRC
115
//
116
typedef struct
117
{
118
    u32         src;                    // IN
119
} BRDctrl_StreamSetSrc, *PBRDctrl_StreamSetSrc;
120
 
121
//
122
// For BRDctrl_STREAM_SETDRQ
123
//
124
typedef struct
125
{
126
    u32         drq;                    // IN, Flag for DMA request
127
} BRDctrl_StreamSetDrq, *PBRDctrl_StreamSetDrq;
128
 
129
//
130
// For BRDctrl_STREAM_RESETFIFO
131
//
132
typedef struct
133
{
134
    u32         dummy;                  // Not used
135
} BRDctrl_StreamResetFifo, *PBRDctrl_StreamResetFifo;
136
 
137
//
138
// For BRDctrl_STREAM_CBUF_ADJUST
139
//
140
typedef struct
141
{
142
    s32         isAdjust;                       // IN, Select mode: 1-adjusted, 0-unadjusted
143
} BRDctrl_StreamCBufAdjust, *PBRDctrl_StreamCBufAdjust;
144
 
145
//
146
// For BRDctrl_STREAM_CBUF_DONE
147
//
148
typedef struct
149
{
150
    s32         blkNo;                  // IN,  Number of processed Block
151
} BRDctrl_StreamCBufDone, *PBRDctrl_StreamCBufDone;
152
 
153
//
154
// For BRDctrl_STREAM_VERSION
155
//
156
typedef struct
157
{
158
    s32         major;                  // OUT,  Major Number of Version
159
    s32         minor;                  // OUT,  Minor Number of Version
160
} BRDctrl_StreamVersion, *PBRDctrl_StreamVersion;
161
 
162
//=********************************************************
163
//
164
// Constants
165
//
166
//=********************************************************
167
 
168
enum
169
{
170
    BRDstrm_STAT_RUN = 1,
171
    BRDstrm_STAT_STOP = 2,
172
    BRDstrm_STAT_DESTROY = 3,
173
    BRDstrm_STAT_BREAK = 4
174 6 v.karak
                     };
175 2 dsmv
 
176
//
177
// Constants: Direction of CBUF
178
//
179
/*
180
enum
181
{
182
 BRDstrm_DIR_IN = 0x1,                          // To HOST
183
 BRDstrm_DIR_OUT = 0x2,                         // From HOST
184
 BRDstrm_DIR_INOUT = 0x3                                // Both Directions
185
};
186
*/
187
//
188
// Constants: flag for BRDctrl_STREAM_SETDRQ
189
//
190
 
191
enum
192
{
193
    BRDstrm_DRQ_ALMOST  = 0x0,                  // Almost empty = 1 for input FIFO, Almost full = 1 for output FIFO
194
    BRDstrm_DRQ_READY   = 0x1,                  // Ready = 1
195
    BRDstrm_DRQ_HALF    = 0x2                   // Half full = 0 for input FIFO, Half full = 1 for output FIFO
196 6 v.karak
                      };
197 2 dsmv
 
198
#endif // _CTRL_STREAM_H

powered by: WebSVN 2.1.0

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