annotate TaskManager/Cell/spe/CellDmaManager.h @ 1021:47ca99c5cf84 draft

use MailManager
author yutaka@localhost.localdomain
date Sun, 07 Nov 2010 22:10:29 +0900
parents 16afbf03e5d2
children cf0ad93028e9
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
3fc86ddf5d1c clean up include
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 275
diff changeset
4 #include "base.h"
611
e4c355211bd7 cell fix memaddr
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 366
diff changeset
5 #include "types.h"
307
3fc86ddf5d1c clean up include
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 275
diff changeset
6 #include "DmaManager.h"
1021
47ca99c5cf84 use MailManager
yutaka@localhost.localdomain
parents: 1009
diff changeset
7 #include "MailManager.h"
32
f7fd92a1d7bb *** empty log message ***
gongo
parents:
diff changeset
8
88
504899860e66 *** empty log message ***
gongo
parents: 58
diff changeset
9 #include <spu_mfcio.h>
1007
00c01f416e3a add mail_queue
yutaka@localhost.localdomain
parents: 1001
diff changeset
10 #include <spu_intrinsics.h>
88
504899860e66 *** empty log message ***
gongo
parents: 58
diff changeset
11
242
23e76c5369b7 dma_wait
e065746@localhost.localdomain
parents: 240
diff changeset
12 #define SPU_PROFILE 1
23e76c5369b7 dma_wait
e065746@localhost.localdomain
parents: 240
diff changeset
13
736
1b225972ae88 cut printf
hiroki@localhost.localdomain
parents: 676
diff changeset
14 class Scheduler;
1b225972ae88 cut printf
hiroki@localhost.localdomain
parents: 676
diff changeset
15
32
f7fd92a1d7bb *** empty log message ***
gongo
parents:
diff changeset
16 class CellDmaManager : public DmaManager {
f7fd92a1d7bb *** empty log message ***
gongo
parents:
diff changeset
17 public:
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
18 BASE_NEW_DELETE(CellDmaManager);
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
19
88
504899860e66 *** empty log message ***
gongo
parents: 58
diff changeset
20 typedef struct dma_list {
631
30dd8a3deb4a Cell 64 bit tried, but not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 611
diff changeset
21 uint32 addr; // should be memaddr, but in Cell's specification...
88
504899860e66 *** empty log message ***
gongo
parents: 58
diff changeset
22 uint32 size;
895
b662e9dd26b0 add alignment of classes in SPU
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 736
diff changeset
23 } __attribute__ ((aligned (DEFAULT_ALIGNMENT))) DmaList, *DmaListPtr;
88
504899860e66 *** empty log message ***
gongo
parents: 58
diff changeset
24
672
27fec8c70c9c add profiling code
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 631
diff changeset
25
27fec8c70c9c add profiling code
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 631
diff changeset
26 CellDmaManager() ;
27fec8c70c9c add profiling code
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 631
diff changeset
27
88
504899860e66 *** empty log message ***
gongo
parents: 58
diff changeset
28 /* variables */
999
aed8b3ca5537 Measurement of mainMem_alloc at waiting time. not done.
tkaito
parents: 970
diff changeset
29 unsigned int wait_time, busy_time, alloc_busy_time;
aed8b3ca5537 Measurement of mainMem_alloc at waiting time. not done.
tkaito
parents: 970
diff changeset
30 unsigned long long global_busy_time, global_wait_time, global_mail_time, mainMemalloc_time;
1001
ca59327dccab error fix.
root@henri.cr.ie.u-ryukyu.ac.jp
parents: 999
diff changeset
31 unsigned long long task_array_load_time;
88
504899860e66 *** empty log message ***
gongo
parents: 58
diff changeset
32
32
f7fd92a1d7bb *** empty log message ***
gongo
parents:
diff changeset
33 /* functions */
364
fd0c819bab53 uint32 to memaddr(uint64)
tkaito@localhost.localdomain
parents: 307
diff changeset
34 void dma_load(void *buf, memaddr addr, uint32 size, uint32 mask);
365
fafed60e2fca modify types.h
aaa
parents: 364
diff changeset
35 void dma_store(void *buf, memaddr addr, uint32 size, uint32 mask);
88
504899860e66 *** empty log message ***
gongo
parents: 58
diff changeset
36 void dma_wait(uint32 mask) ;
970
1a4849b2acad change pipeline and TaskArray fast
Yutaka Kinjyo <yutaka@cr.ie.u-ryukyu.ac.jp>
parents: 899
diff changeset
37 void dma_wait(uint32 mask, int cmd) ;
672
27fec8c70c9c add profiling code
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 631
diff changeset
38 void (CellDmaManager::*start_dmawait_profile)();
676
fbccad536db1 mail time
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 675
diff changeset
39 void (CellDmaManager::*end_dmawait_profile)(unsigned long long *counter);
672
27fec8c70c9c add profiling code
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 631
diff changeset
40 void start_profile();
27fec8c70c9c add profiling code
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 631
diff changeset
41 void stop_profile();
27fec8c70c9c add profiling code
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 631
diff changeset
42
27fec8c70c9c add profiling code
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 631
diff changeset
43
1001
ca59327dccab error fix.
root@henri.cr.ie.u-ryukyu.ac.jp
parents: 999
diff changeset
44 void show_dma_wait(Scheduler *s, int cpu);
88
504899860e66 *** empty log message ***
gongo
parents: 58
diff changeset
45
611
e4c355211bd7 cell fix memaddr
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 366
diff changeset
46 void mail_write(memaddr data);
1007
00c01f416e3a add mail_queue
yutaka@localhost.localdomain
parents: 1001
diff changeset
47 void mail_write_queue(memaddr data);
00c01f416e3a add mail_queue
yutaka@localhost.localdomain
parents: 1001
diff changeset
48 void mail_write_finish_list(memaddr data);
611
e4c355211bd7 cell fix memaddr
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 366
diff changeset
49 memaddr mail_read();
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
50 void dma_loadList(ListDataPtr list, void *buff, uint32 mask);
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
51 void dma_storeList(ListDataPtr, void *buff, uint32 mask);
672
27fec8c70c9c add profiling code
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 631
diff changeset
52
27fec8c70c9c add profiling code
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 631
diff changeset
53 private:
27fec8c70c9c add profiling code
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 631
diff changeset
54
27fec8c70c9c add profiling code
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 631
diff changeset
55 void do_start_dmawait_profile();
676
fbccad536db1 mail time
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 675
diff changeset
56 void do_end_dmawait_profile(unsigned long long *counter);
672
27fec8c70c9c add profiling code
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 631
diff changeset
57 void null_start_dmawait_profile();
676
fbccad536db1 mail time
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 675
diff changeset
58 void null_end_dmawait_profile(unsigned long long *counter);
672
27fec8c70c9c add profiling code
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 631
diff changeset
59
1021
47ca99c5cf84 use MailManager
yutaka@localhost.localdomain
parents: 1009
diff changeset
60 MailManagerPtr mail_queue;
47ca99c5cf84 use MailManager
yutaka@localhost.localdomain
parents: 1009
diff changeset
61
672
27fec8c70c9c add profiling code
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 631
diff changeset
62
27fec8c70c9c add profiling code
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 631
diff changeset
63 /* end */
899
1b9418af3127 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