Mercurial > hg > Members > kono > Cerium
annotate TaskManager/Cell/spe/CellDmaManager.h @ 1007:18a548c337cb
add mail_queue
author | yutaka@localhost.localdomain |
---|---|
date | Thu, 28 Oct 2010 08:39:19 +0900 |
parents | 61f33945f85d |
children | c67379f9d411 |
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" |
1007 | 7 #include "QueueInfo.h" |
8 #include "MailQueue.h" | |
32 | 9 |
88 | 10 #include <spu_mfcio.h> |
1007 | 11 #include <spu_intrinsics.h> |
88 | 12 |
242 | 13 #define SPU_PROFILE 1 |
14 | |
736 | 15 class Scheduler; |
16 | |
32 | 17 class CellDmaManager : public DmaManager { |
18 public: | |
109 | 19 BASE_NEW_DELETE(CellDmaManager); |
20 | |
88 | 21 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
|
22 uint32 addr; // should be memaddr, but in Cell's specification... |
88 | 23 uint32 size; |
895
bed529c55eda
add alignment of classes in SPU
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
736
diff
changeset
|
24 } __attribute__ ((aligned (DEFAULT_ALIGNMENT))) DmaList, *DmaListPtr; |
88 | 25 |
1007 | 26 QueueInfo<MailQueue> mail_queue; |
672 | 27 |
28 CellDmaManager() ; | |
29 | |
88 | 30 /* variables */ |
999
451ddde9a16d
Measurement of mainMem_alloc at waiting time. not done.
tkaito
parents:
970
diff
changeset
|
31 unsigned int wait_time, busy_time, alloc_busy_time; |
451ddde9a16d
Measurement of mainMem_alloc at waiting time. not done.
tkaito
parents:
970
diff
changeset
|
32 unsigned long long global_busy_time, global_wait_time, global_mail_time, mainMemalloc_time; |
1001 | 33 unsigned long long task_array_load_time; |
88 | 34 |
32 | 35 /* functions */ |
364 | 36 void dma_load(void *buf, memaddr addr, uint32 size, uint32 mask); |
365 | 37 void dma_store(void *buf, memaddr addr, uint32 size, uint32 mask); |
88 | 38 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
|
39 void dma_wait(uint32 mask, int cmd) ; |
672 | 40 void (CellDmaManager::*start_dmawait_profile)(); |
676 | 41 void (CellDmaManager::*end_dmawait_profile)(unsigned long long *counter); |
672 | 42 void start_profile(); |
43 void stop_profile(); | |
44 | |
45 | |
1001 | 46 void show_dma_wait(Scheduler *s, int cpu); |
88 | 47 |
611 | 48 void mail_write(memaddr data); |
1007 | 49 void mail_write_queue(memaddr data); |
50 void mail_write_finish_list(memaddr data); | |
611 | 51 memaddr mail_read(); |
109 | 52 void dma_loadList(ListDataPtr list, void *buff, uint32 mask); |
53 void dma_storeList(ListDataPtr, void *buff, uint32 mask); | |
672 | 54 |
55 private: | |
56 | |
57 void do_start_dmawait_profile(); | |
676 | 58 void do_end_dmawait_profile(unsigned long long *counter); |
672 | 59 void null_start_dmawait_profile(); |
676 | 60 void null_end_dmawait_profile(unsigned long long *counter); |
672 | 61 |
62 | |
63 /* end */ | |
899 | 64 } ; |
32 | 65 |
66 #endif |