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/] [board/] [board.cpp] - Blame information for rev 2

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 dsmv
 
2
#ifndef __BOARD_H__
3
    #include "board.h"
4
#endif
5
 
6
//-----------------------------------------------------------------------------
7
 
8
#include <cassert>
9
#include <cstdlib>
10
#include <cstring>
11
#include <iostream>
12
#include <iomanip>
13
#include <climits>
14
 
15
//-----------------------------------------------------------------------------
16
 
17
using namespace std;
18
 
19
//-----------------------------------------------------------------------------
20
 
21
board::board()
22
{
23
}
24
 
25
//-----------------------------------------------------------------------------
26
 
27
board::~board()
28
{
29
}
30
 
31
//-----------------------------------------------------------------------------
32
 
33
int board::brd_open(const char *name)
34
{
35
    return core_open(name);
36
}
37
 
38
//-----------------------------------------------------------------------------
39
 
40
int board::brd_init()
41
{
42
    return core_init();
43
}
44
 
45
//-----------------------------------------------------------------------------
46
 
47
int board::brd_reset()
48
{
49
    return core_reset();
50
}
51
 
52
//-----------------------------------------------------------------------------
53
 
54
int board::brd_close()
55
{
56
    return core_close();
57
}
58
 
59
//-----------------------------------------------------------------------------
60
 
61
int board::brd_load_dsp()
62
{
63
    return core_load_dsp();
64
}
65
 
66
//-----------------------------------------------------------------------------
67
 
68
int board::brd_load_pld()
69
{
70
    return core_load_pld();
71
}
72
 
73
//-----------------------------------------------------------------------------
74
 
75
int board::brd_board_info()
76
{
77
    return core_board_info();
78
}
79
 
80
//-----------------------------------------------------------------------------
81
 
82
int board::brd_pld_info()
83
{
84
    return core_pld_info();
85
}
86
 
87
//-----------------------------------------------------------------------------
88
 
89
int board::brd_resource()
90
{
91
    return core_resource();
92
}
93
 
94
//-----------------------------------------------------------------------------
95
/*
96
std::vector<struct memory_block>* board::dma_alloc(u32 dmaChannel, u32 blockNumber, u32 blockSize)
97
{
98
    return core_dma_alloc(dmaChannel, blockNumber, blockSize);
99
}
100
 
101
//-----------------------------------------------------------------------------
102
 
103
int board::dma_free(u32 dmaChannel)
104
{
105
    return core_dma_free(dmaChannel);
106
}
107
 
108
//-----------------------------------------------------------------------------
109
 
110
int board::dma_start(u32 dmaChannel)
111
{
112
    return core_dma_start(dmaChannel);
113
}
114
 
115
//-----------------------------------------------------------------------------
116
 
117
int board::dma_state(u32 dmaChannel)
118
{
119
    return core_dma_state(dmaChannel);
120
}
121
 
122
//-----------------------------------------------------------------------------
123
 
124
int board::dma_stop(u32 dmaChannel)
125
{
126
    return core_dma_stop(dmaChannel);
127
}
128
 
129
//-----------------------------------------------------------------------------
130
 
131
int board::dma_total()
132
{
133
    return core_dma_total();
134
}
135
 
136
//-----------------------------------------------------------------------------
137
 
138
struct memory_block* board::dma_stub(u32 dmaChannel)
139
{
140
    return core_dma_stub(dmaChannel);
141
}
142
*/
143
//-----------------------------------------------------------------------------
144
 
145
u32 board::brd_reg_peek_dir( u32 trd, u32 reg )
146
{
147
    return core_reg_peek_dir( trd, reg );
148
}
149
 
150
//-----------------------------------------------------------------------------
151
 
152
u32 board::brd_reg_peek_ind( u32 trd, u32 reg )
153
{
154
    return core_reg_peek_ind( trd, reg );
155
}
156
 
157
//-----------------------------------------------------------------------------
158
 
159
void board::brd_reg_poke_dir( u32 trd, u32 reg, u32 val )
160
{
161
    return core_reg_poke_dir( trd, reg, val );
162
}
163
 
164
//-----------------------------------------------------------------------------
165
 
166
void board::brd_reg_poke_ind( u32 trd, u32 reg, u32 val )
167
{
168
    return core_reg_poke_ind( trd, reg, val );
169
}
170
 
171
//-----------------------------------------------------------------------------
172
 
173
u32  board::brd_bar0_read( u32 offset )
174
{
175
    return core_bar0_read( offset );
176
}
177
 
178
//-----------------------------------------------------------------------------
179
 
180
void board::brd_bar0_write( u32 offset, u32 val )
181
{
182
    return core_bar0_write( offset, val );
183
}
184
 
185
//-----------------------------------------------------------------------------
186
 
187
u32  board::brd_bar1_read( u32 offset )
188
{
189
    return core_bar1_read( offset );
190
}
191
 
192
//-----------------------------------------------------------------------------
193
 
194
void board::brd_bar1_write( u32 offset, u32 val )
195
{
196
    return core_bar1_write(offset, val);
197
}
198
 
199
//----------BRDSHELL-----------------------------------------------------------
200
 
201
u32 board::dma_alloc(int DmaChan, BRDctrl_StreamCBufAlloc* sSCA)
202
{
203
    return core_alloc(DmaChan, sSCA);
204
}
205
 
206
//-----------------------------------------------------------------------------
207
 
208
u32 board::dma_allocate_memory(int DmaChan, void** pBuf, u32 blkSize, u32 blkNum, u32 isSysMem, u32 dir, u32 addr)
209
{
210
    return core_allocate_memory(DmaChan, pBuf, blkSize, blkNum, isSysMem, dir, addr);
211
}
212
 
213
//-----------------------------------------------------------------------------
214
 
215
u32 board::dma_free_memory(int DmaChan)
216
{
217
    return core_free_memory(DmaChan);
218
}
219
 
220
//-----------------------------------------------------------------------------
221
 
222
u32 board::dma_start(int DmaChan, int IsCycling)
223
{
224
    return core_start_dma(DmaChan, IsCycling);
225
}
226
 
227
//-----------------------------------------------------------------------------
228
 
229
u32 board::dma_stop(int DmaChan)
230
{
231
    return core_stop_dma(DmaChan);
232
}
233
 
234
//-----------------------------------------------------------------------------
235
 
236
u32 board::dma_state(int DmaChan, u32 msTimeout, int& state, u32& blkNum)
237
{
238
    return core_state_dma(DmaChan, msTimeout, state, blkNum);
239
}
240
 
241
//-----------------------------------------------------------------------------
242
 
243
u32 board::dma_wait_buffer(int DmaChan, u32 msTimeout)
244
{
245
    return core_wait_buffer(DmaChan, msTimeout);
246
}
247
 
248
//-----------------------------------------------------------------------------
249
 
250
u32 board::dma_wait_block(int DmaChan, u32 msTimeout)
251
{
252
    return core_wait_block(DmaChan, msTimeout);
253
}
254
 
255
//-----------------------------------------------------------------------------
256
 
257
u32 board::dma_reset_fifo(int DmaChan)
258
{
259
    return core_reset_fifo(DmaChan);
260
}
261
 
262
//-----------------------------------------------------------------------------
263
 
264
u32 board::dma_set_local_addr(int DmaChan, u32 addr)
265
{
266
    return core_set_local_addr(DmaChan, addr);
267
}
268
 
269
//-----------------------------------------------------------------------------
270
 
271
u32 board::dma_adjust(int DmaChan, u32 mode)
272
{
273
    return core_adjust(DmaChan, mode);
274
}
275
 
276
//-----------------------------------------------------------------------------
277
 
278
u32 board::dma_done(int DmaChan, u32 blockNumber)
279
{
280
    return core_done(DmaChan, blockNumber);
281
}
282
 
283
//-----------------------------------------------------------------------------

powered by: WebSVN 2.1.0

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