Mercurial > hg > Game > Cerium
view TaskManager/Cell/CellDmaManager.h @ 2022:fac44ad2867d draft
make a sound
author | Masataka Kohagura <kohagura@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 16 Jul 2014 02:50:32 +0900 |
parents | e0d465efc57e |
children |
line wrap: on
line source
#ifndef INCLUDED_CELL_DMA_MANAGER #define INCLUDED_CELL_DMA_MANAGER #include "base.h" #include "types.h" #include "DmaManager.h" #include "MailManager.h" #include "TaskManagerImpl.h" #include <spu_mfcio.h> #include <spu_intrinsics.h> #define SPU_PROFILE 1 class Scheduler; class CellDmaManager : public DmaManager { public: BASE_NEW_DELETE(CellDmaManager); typedef struct dma_list { uint32 addr; // should be memaddr, but in Cell's specification... uint32 size; } __attribute__ ((aligned (DEFAULT_ALIGNMENT))) DmaList, *DmaListPtr; CellDmaManager() ; /* variables */ unsigned int wait_time, busy_time, alloc_busy_time; unsigned long long global_busy_time, global_wait_time, global_mail_time, mainMemalloc_time; unsigned long long task_list_mail_time; unsigned long long mail_read_time, mail_write_time; unsigned long long task_list_mail_read_time, finish_mail_write_time; int task_list_read_count; /* functions */ void *dma_load(Scheduler *s, memaddr addr, uint32 size, uint32 mask); void *dma_load1(void *buf, memaddr addr, uint32 size, uint32 mask); void *dma_store(Scheduler *s,void *buf, memaddr addr, uint32 size, uint32 mask); void *get_writebuf(Scheduler *s, memaddr addr, uint32 size); void dma_wait(uint32 mask) ; void dma_wait(uint32 mask, int cmd) ; void (CellDmaManager::*start_dmawait_profile)(); void (CellDmaManager::*end_dmawait_profile)(unsigned long long *counter); void start_profile(); void stop_profile(); void show_dma_wait(Scheduler *s, int cpu); void mail_write(memaddr data); void mail_write_finish_list(memaddr data); memaddr mail_read(); memaddr task_list_mail_read(); void *dma_loadList(Scheduler *s,ListDataPtr list, uint32 mask); void dma_storeList(ListDataPtr, void *buff, uint32 mask); uint32 get_tag(); void bound(ListData *); void *get_writebuf(Scheduler *s, ListDataPtr, uint32 size) ; private: void do_start_dmawait_profile(); void do_end_dmawait_profile(unsigned long long *counter); void null_start_dmawait_profile(); void null_end_dmawait_profile(unsigned long long *counter); MailManagerPtr mail_queue; /* end */ } ; #endif