view include/TaskManager/CellDmaManager.h @ 292:2369f477ffbe draft

Document/Cerium_2009.mm
author aaa
date Fri, 05 Jun 2009 18:53:42 +0900
parents 237a75ab7a9b
children 3fc86ddf5d1c
line wrap: on
line source

#ifndef INCLUDED_CELL_DMA_MANAGER
#define INCLUDED_CELL_DMA_MANAGER

#ifndef INCLUDED_BASE_H_
#  include "base.h"
#endif

#ifndef INCLUDED_DMA_MANAGER
#  include "DmaManager.h"
#endif

#include <spu_mfcio.h>

#define SPU_PROFILE 1

class CellDmaManager : public DmaManager {
public:
    BASE_NEW_DELETE(CellDmaManager);

    typedef struct dma_list {
	uint32 addr;
	uint32 size;
    } DmaList, *DmaListPtr;

    /* variables */
    unsigned int wait_time, busy_time;
    unsigned long long global_busy_time, global_wait_time;

    /* functions */
    void dma_load(void *buf, uint32 addr, uint32 size, uint32 mask);
    void dma_store(void *buf, uint32 addr, uint32 size, uint32 mask);
    void dma_wait(uint32 mask) ;
    void start_dmawait_profile();
    void end_dmawait_profile();
    void show_dma_wait(int cpu);

    void mail_write(uint32 data);
    uint32 mail_read(void);
    void dma_loadList(ListDataPtr list, void *buff, uint32 mask);
    void dma_storeList(ListDataPtr, void *buff, uint32 mask);
};

#endif