annotate TaskManager/Cell/spe/CellDmaManager.h @ 1009:c67379f9d411

not yet....
author yutaka@localhost.localdomain
date Thu, 28 Oct 2010 13:00:51 +0900
parents 18a548c337cb
children f8e9c985e2a8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
32
f7fd92a1d7bb *** empty log message ***
gongo
parents:
diff changeset
1 #ifndef INCLUDED_CELL_DMA_MANAGER
f7fd92a1d7bb *** empty log message ***
gongo
parents:
diff changeset
2 #define INCLUDED_CELL_DMA_MANAGER
f7fd92a1d7bb *** empty log message ***
gongo
parents:
diff changeset
3
307
7075842aa155 clean up include
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 273
diff changeset
4 #include "base.h"
611
2cfbb36e221a cell fix memaddr
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 366
diff changeset
5 #include "types.h"
307
7075842aa155 clean up include
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 273
diff changeset
6 #include "DmaManager.h"
1007
18a548c337cb add mail_queue
yutaka@localhost.localdomain
parents: 1001
diff changeset
7 #include "QueueInfo.h"
18a548c337cb add mail_queue
yutaka@localhost.localdomain
parents: 1001
diff changeset
8 #include "MailQueue.h"
32
f7fd92a1d7bb *** empty log message ***
gongo
parents:
diff changeset
9
88
504899860e66 *** empty log message ***
gongo
parents: 58
diff changeset
10 #include <spu_mfcio.h>
1007
18a548c337cb add mail_queue
yutaka@localhost.localdomain
parents: 1001
diff changeset
11 #include <spu_intrinsics.h>
88
504899860e66 *** empty log message ***
gongo
parents: 58
diff changeset
12
242
8382f0f8c0b4 dma_wait
e065746@localhost.localdomain
parents: 240
diff changeset
13 #define SPU_PROFILE 1
8382f0f8c0b4 dma_wait
e065746@localhost.localdomain
parents: 240
diff changeset
14
736
31d0a5baafdf cut printf
hiroki@localhost.localdomain
parents: 676
diff changeset
15 class Scheduler;
31d0a5baafdf cut printf
hiroki@localhost.localdomain
parents: 676
diff changeset
16
32
f7fd92a1d7bb *** empty log message ***
gongo
parents:
diff changeset
17 class CellDmaManager : public DmaManager {
f7fd92a1d7bb *** empty log message ***
gongo
parents:
diff changeset
18 public:
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
19 BASE_NEW_DELETE(CellDmaManager);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
20
88
504899860e66 *** empty log message ***
gongo
parents: 58
diff changeset
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
504899860e66 *** empty log message ***
gongo
parents: 58
diff changeset
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
504899860e66 *** empty log message ***
gongo
parents: 58
diff changeset
25
1009
c67379f9d411 not yet....
yutaka@localhost.localdomain
parents: 1007
diff changeset
26 QueueInfo<MailQueue> *mail_queue;
672
3b6290c05f9f add profiling code
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 629
diff changeset
27
3b6290c05f9f add profiling code
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 629
diff changeset
28 CellDmaManager() ;
3b6290c05f9f add profiling code
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 629
diff changeset
29
88
504899860e66 *** empty log message ***
gongo
parents: 58
diff changeset
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
61f33945f85d error fix.
root@henri.cr.ie.u-ryukyu.ac.jp
parents: 999
diff changeset
33 unsigned long long task_array_load_time;
88
504899860e66 *** empty log message ***
gongo
parents: 58
diff changeset
34
32
f7fd92a1d7bb *** empty log message ***
gongo
parents:
diff changeset
35 /* functions */
364
87462f8d3761 uint32 to memaddr(uint64)
tkaito@localhost.localdomain
parents: 307
diff changeset
36 void dma_load(void *buf, memaddr addr, uint32 size, uint32 mask);
365
f8769040a5df modify types.h
aaa
parents: 364
diff changeset
37 void dma_store(void *buf, memaddr addr, uint32 size, uint32 mask);
88
504899860e66 *** empty log message ***
gongo
parents: 58
diff changeset
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
3b6290c05f9f add profiling code
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 629
diff changeset
40 void (CellDmaManager::*start_dmawait_profile)();
676
a06eef665c45 mail time
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 675
diff changeset
41 void (CellDmaManager::*end_dmawait_profile)(unsigned long long *counter);
672
3b6290c05f9f add profiling code
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 629
diff changeset
42 void start_profile();
3b6290c05f9f add profiling code
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 629
diff changeset
43 void stop_profile();
3b6290c05f9f add profiling code
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 629
diff changeset
44
3b6290c05f9f add profiling code
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 629
diff changeset
45
1001
61f33945f85d error fix.
root@henri.cr.ie.u-ryukyu.ac.jp
parents: 999
diff changeset
46 void show_dma_wait(Scheduler *s, int cpu);
88
504899860e66 *** empty log message ***
gongo
parents: 58
diff changeset
47
611
2cfbb36e221a cell fix memaddr
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 366
diff changeset
48 void mail_write(memaddr data);
1007
18a548c337cb add mail_queue
yutaka@localhost.localdomain
parents: 1001
diff changeset
49 void mail_write_queue(memaddr data);
18a548c337cb add mail_queue
yutaka@localhost.localdomain
parents: 1001
diff changeset
50 void mail_write_finish_list(memaddr data);
611
2cfbb36e221a cell fix memaddr
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 366
diff changeset
51 memaddr mail_read();
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
52 void dma_loadList(ListDataPtr list, void *buff, uint32 mask);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
53 void dma_storeList(ListDataPtr, void *buff, uint32 mask);
672
3b6290c05f9f add profiling code
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 629
diff changeset
54
3b6290c05f9f add profiling code
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 629
diff changeset
55 private:
3b6290c05f9f add profiling code
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 629
diff changeset
56
3b6290c05f9f add profiling code
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 629
diff changeset
57 void do_start_dmawait_profile();
676
a06eef665c45 mail time
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 675
diff changeset
58 void do_end_dmawait_profile(unsigned long long *counter);
672
3b6290c05f9f add profiling code
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 629
diff changeset
59 void null_start_dmawait_profile();
676
a06eef665c45 mail time
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 675
diff changeset
60 void null_end_dmawait_profile(unsigned long long *counter);
672
3b6290c05f9f add profiling code
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 629
diff changeset
61
3b6290c05f9f add profiling code
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 629
diff changeset
62
3b6290c05f9f add profiling code
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 629
diff changeset
63 /* end */
899
586b4f825f24 minor fix..
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 895
diff changeset
64 } ;
32
f7fd92a1d7bb *** empty log message ***
gongo
parents:
diff changeset
65
f7fd92a1d7bb *** empty log message ***
gongo
parents:
diff changeset
66 #endif