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/] [cl_wbpex.h] - Blame information for rev 19

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 dsmv
//---------------------------------------------------------------------------
2
 
3
#ifndef TF_CheckItem_CL_WBPEXH
4
#define TF_CheckItem_CL_WBPEXH
5
 
6
#include "utypes.h"
7 19 dsmv
#include "board.h"
8
#include "time.h"
9
#include "ctrlstrm.h"
10 2 dsmv
 
11
//#include <string.h>
12
 
13
class board;
14
 
15
class  CL_WBPEX
16
{
17
 
18
 
19
public:
20
 
21
    //!  Инициализация модуля
22
    virtual U32  init( void );
23
 
24
    //!  Завершение работы с модулем
25
    virtual void  cleanup( void );
26
 
27
 
28 19 dsmv
    int StreamInit( U32 strm, U32 cnt_buf, U32 size_one_buf_of_bytes, U32 loc_wb_adr, U32 dir, U32 cycle, U32 system, U32 agree_mode );
29 2 dsmv
 
30
    void StreamDestroy( U32 strm );
31
 
32
    U32* StreamGetBufByNum( U32 strm, U32 numBuf );
33
 
34
    void StreamStart( U32 strm );
35
 
36
    void StreamStop( U32 strm );
37
 
38
    int StreamGetBuf( U32 strm, U32** ptr );
39
 
40
    int StreamGetIndexDma( U32 strm );
41
 
42
    int StreamGetNextIndex( U32 strm, U32 index );
43
 
44
    void StreamGetBufDone( U32 strm );
45
 
46
    // Доступ к регистрам
47
 
48
    //! Запись в регистр блока на шине WB
49
    void wb_block_write( U32 nb, U32 reg, U32 val );
50
 
51
    //! Чтение из регистра блока на шине WB
52
    U32 wb_block_read( U32 nb, U32 reg );
53
 
54
 
55
    CL_WBPEX();
56
 
57
 
58
private:
59
 
60
 
61
    //! Указатель на модуль
62
    board  *m_pBoard;
63
 
64
 
65
    struct StreamParam
66
    {
67
        U32 status;
68
        U32 strm;
69
        U32 cnt_buf;
70
        U32 size_one_buf_of_bytes;
71 19 dsmv
        U32 loc_wb_adr;
72 2 dsmv
        U32 cycle;
73
        U32 system;
74
        U32 dir;
75
 
76
        U32 indexDma;
77
        U32 indexPc;
78
        U32 agree_mode;
79
 
80
        //BRD_Handle  hStream;
81 19 dsmv
        BRDstrm_Stub    *pStub;
82 2 dsmv
        U08 *pBlk[256];         //!< Массив указателей на блоки памяти
83
 
84
        StreamParam()
85
        {
86
            //memset( this, 0, sizeof( StreamParam ) );
87
        };
88
    };
89
 
90
    StreamParam  m_streamParam[2];
91
 
92
 
93
};
94
 
95
void Sleep( int ms );
96
//---------------------------------------------------------------------------
97
#endif

powered by: WebSVN 2.1.0

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