Mercurial > hg > Members > kono > Cerium
annotate TaskManager/Cell/spe/CellDmaManager.h @ 1001:61f33945f85d
error fix.
author | root@henri.cr.ie.u-ryukyu.ac.jp |
---|---|
date | Thu, 21 Oct 2010 21:39:47 +0900 |
parents | 451ddde9a16d |
children | 18a548c337cb |
rev | line source |
---|---|
32 | 1 #ifndef INCLUDED_CELL_DMA_MANAGER |
2 #define INCLUDED_CELL_DMA_MANAGER | |
3 | |
307 | 4 #include "base.h" |
611 | 5 #include "types.h" |
307 | 6 #include "DmaManager.h" |
32 | 7 |
88 | 8 #include <spu_mfcio.h> |
9 | |
242 | 10 #define SPU_PROFILE 1 |
11 | |
736 | 12 class Scheduler; |
13 | |
32 | 14 class CellDmaManager : public DmaManager { |
15 public: | |
109 | 16 BASE_NEW_DELETE(CellDmaManager); |
17 | |
88 | 18 typedef struct dma_list { |
629
8843edf37c0e
Cell 64 bit tried, but not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
611
diff
changeset
|
19 uint32 addr; // should be memaddr, but in Cell's specification... |
88 | 20 uint32 size; |
895
bed529c55eda
add alignment of classes in SPU
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
736
diff
changeset
|
21 } __attribute__ ((aligned (DEFAULT_ALIGNMENT))) DmaList, *DmaListPtr; |
88 | 22 |
672 | 23 |
24 CellDmaManager() ; | |
25 | |
88 | 26 /* variables */ |
999
451ddde9a16d
Measurement of mainMem_alloc at waiting time. not done.
tkaito
parents:
970
diff
changeset
|
27 unsigned int wait_time, busy_time, alloc_busy_time; |
451ddde9a16d
Measurement of mainMem_alloc at waiting time. not done.
tkaito
parents:
970
diff
changeset
|
28 unsigned long long global_busy_time, global_wait_time, global_mail_time, mainMemalloc_time; |
1001 | 29 unsigned long long task_array_load_time; |
88 | 30 |
32 | 31 /* functions */ |
364 | 32 void dma_load(void *buf, memaddr addr, uint32 size, uint32 mask); |
365 | 33 void dma_store(void *buf, memaddr addr, uint32 size, uint32 mask); |
88 | 34 void dma_wait(uint32 mask) ; |
970
33630c6ff445
change pipeline and TaskArray fast
Yutaka Kinjyo <yutaka@cr.ie.u-ryukyu.ac.jp>
parents:
899
diff
changeset
|
35 void dma_wait(uint32 mask, int cmd) ; |
672 | 36 void (CellDmaManager::*start_dmawait_profile)(); |
676 | 37 void (CellDmaManager::*end_dmawait_profile)(unsigned long long *counter); |
672 | 38 void start_profile(); |
39 void stop_profile(); | |
40 | |
41 | |
1001 | 42 void show_dma_wait(Scheduler *s, int cpu); |
88 | 43 |
611 | 44 void mail_write(memaddr data); |
45 memaddr mail_read(); | |
109 | 46 void dma_loadList(ListDataPtr list, void *buff, uint32 mask); |
47 void dma_storeList(ListDataPtr, void *buff, uint32 mask); | |
672 | 48 |
49 private: | |
50 | |
51 void do_start_dmawait_profile(); | |
676 | 52 void do_end_dmawait_profile(unsigned long long *counter); |
672 | 53 void null_start_dmawait_profile(); |
676 | 54 void null_end_dmawait_profile(unsigned long long *counter); |
672 | 55 |
56 | |
57 /* end */ | |
899 | 58 } ; |
32 | 59 |
60 #endif |