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.h] - Diff between revs 2 and 6

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 2 Rev 6
Line 21... Line 21...
 
 
#ifndef _CTRL_STRM_H_
#ifndef _CTRL_STRM_H_
#include "ctrlstrm.h"
#include "ctrlstrm.h"
#endif
#endif
 
 
 
#ifdef __VERBOSE__
 
#include <stdio.h>
 
#define DEBUG_PRINT(fmt, args...)    fprintf(stderr, fmt, ## args)
 
#else
 
#define DEBUG_PRINT(fmt, args...)
 
#endif
 
 
class board {
class board {
 
 
private:
private:
 
 
    virtual int core_open(const char *name) = 0;
    virtual int core_open(const char *name) = 0;
Line 34... Line 41...
    virtual int core_load_dsp() = 0;
    virtual int core_load_dsp() = 0;
    virtual int core_load_pld() = 0;
    virtual int core_load_pld() = 0;
    virtual int core_board_info() = 0;
    virtual int core_board_info() = 0;
    virtual int core_pld_info() = 0;
    virtual int core_pld_info() = 0;
    virtual int core_resource() = 0;
    virtual int core_resource() = 0;
 
    virtual void core_delay(int ms) = 0;
 
 
    virtual u32 core_alloc(int DmaChan, BRDctrl_StreamCBufAlloc* sSCA) = 0;
    virtual u32 core_alloc(int DmaChan, BRDctrl_StreamCBufAlloc* sSCA) = 0;
    virtual u32 core_allocate_memory(int DmaChan, void** pBuf, u32 blkSize, u32 blkNum, u32 isSysMem, u32 dir, u32 addr) = 0;
    virtual u32 core_allocate_memory(int DmaChan, void** pBuf, u32 blkSize,
 
                                     u32 blkNum, u32 isSysMem, u32 dir,
 
                                     u32 addr, BRDstrm_Stub **pStub ) = 0;
    virtual u32 core_free_memory(int DmaChan) = 0;
    virtual u32 core_free_memory(int DmaChan) = 0;
    virtual u32 core_start_dma(int DmaChan, int IsCycling) = 0;
    virtual u32 core_start_dma(int DmaChan, int IsCycling) = 0;
    virtual u32 core_stop_dma(int DmaChan) = 0;
    virtual u32 core_stop_dma(int DmaChan) = 0;
    virtual u32 core_state_dma(int DmaChan, u32 msTimeout, int& state, u32& blkNum) = 0;
    virtual u32 core_state_dma(int DmaChan, u32 msTimeout, int& state, u32& blkNum) = 0;
    virtual u32 core_wait_buffer(int DmaChan, u32 msTimeout) = 0;
    virtual u32 core_wait_buffer(int DmaChan, u32 msTimeout) = 0;
Line 67... Line 77...
    int brd_init();
    int brd_init();
    int brd_reset();
    int brd_reset();
    int brd_close();
    int brd_close();
    int brd_load_dsp();
    int brd_load_dsp();
    int brd_load_pld();
    int brd_load_pld();
 
    void brd_delay(int ms);
 
 
    int brd_board_info();
    int brd_board_info();
    int brd_pld_info();
    int brd_pld_info();
    int brd_resource();
    int brd_resource();
 
 
    //! Методы управления каналами DMA BRDSHELL
    //! Методы управления каналами DMA BRDSHELL
    u32 dma_alloc(int DmaChan, BRDctrl_StreamCBufAlloc* sSCA);
    u32 dma_alloc(int DmaChan, BRDctrl_StreamCBufAlloc* sSCA);
    u32 dma_allocate_memory(int DmaChan, void** pBuf, u32 blkSize, u32 blkNum, u32 isSysMem, u32 dir, u32 addr);
    u32 dma_allocate_memory(int DmaChan, void** pBuf, u32 blkSize,
 
                            u32 blkNum, u32 isSysMem,
 
                            u32 dir, u32 addr, BRDstrm_Stub **pStub);
    u32 dma_free_memory(int DmaChan);
    u32 dma_free_memory(int DmaChan);
    u32 dma_start(int DmaChan, int IsCycling);
    u32 dma_start(int DmaChan, int IsCycling);
    u32 dma_stop(int DmaChan);
    u32 dma_stop(int DmaChan);
    u32 dma_state(int DmaChan, u32 msTimeout, int& state, u32& blkNum);
    u32 dma_state(int DmaChan, u32 msTimeout, int& state, u32& blkNum);
    u32 dma_wait_buffer(int DmaChan, u32 msTimeout);
    u32 dma_wait_buffer(int DmaChan, u32 msTimeout);
Line 98... Line 111...
    void brd_bar0_write( u32 offset, u32 val );
    void brd_bar0_write( u32 offset, u32 val );
    u32  brd_bar1_read( u32 offset );
    u32  brd_bar1_read( u32 offset );
    void brd_bar1_write( u32 offset, u32 val );
    void brd_bar1_write( u32 offset, u32 val );
};
};
 
 
//#define RegPeekDir(trd, reg) brd_reg_peek_dir((trd), (reg))
//! Тип конструктора объектов
//#define RegPeekInd(trd, reg) brd_reg_peek_ind((trd), (reg));
typedef board* (*board_factory)(void);
//#define RegPokeDir(trd, reg, val) brd_reg_poke_dir((trd), (reg), (val));
 
//#define RegPokeOnd(trd, reg, val) brd_reg_poke_ind((trd), (reg), (val));
 
 
 
#endif //__BOARD_H__
#endif //__BOARD_H__
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

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