annotate TaskManager/Fifo/FifoDmaManager.h @ 1213:a49c02dffe6f draft

DMA connector reogranization
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Fri, 22 Jul 2011 13:25:30 +0900
parents 27e35b4098a4
children bb75ee244826
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
1 #ifndef INCLUDED_FIFO_DMA_MANAGER
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
2 #define INCLUDED_FIFO_DMA_MANAGER
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
3
307
3fc86ddf5d1c clean up include
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 109
diff changeset
4 #include "base.h"
3fc86ddf5d1c clean up include
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 109
diff changeset
5 #include "DmaManager.h"
1190
cfbf4f264829 fix FifoDmaManager.h
Daichi TOMA <amothic@cr.ie.u-ryukyu.ac.jp>
parents: 1189
diff changeset
6 #ifdef __CERIUM_PARALLEL__
1196
27e35b4098a4 Rename MailManager
Daichi TOMA <e085740@ie.u-ryukyu.ac.jp>
parents: 1190
diff changeset
7 #include "SynchronizedMailManager.h"
1190
cfbf4f264829 fix FifoDmaManager.h
Daichi TOMA <amothic@cr.ie.u-ryukyu.ac.jp>
parents: 1189
diff changeset
8 #else
307
3fc86ddf5d1c clean up include
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 109
diff changeset
9 #include "MailManager.h"
1190
cfbf4f264829 fix FifoDmaManager.h
Daichi TOMA <amothic@cr.ie.u-ryukyu.ac.jp>
parents: 1189
diff changeset
10 #endif
3
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
11
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
12 class FifoDmaManager : public DmaManager {
647
7ba4ad4538b1 MailManager rewrite. not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
13
7ba4ad4538b1 MailManager rewrite. not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
14 protected:
7ba4ad4538b1 MailManager rewrite. not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
15 /* variables */
7ba4ad4538b1 MailManager rewrite. not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
16 MailManagerPtr mail_queue1;
7ba4ad4538b1 MailManager rewrite. not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
17 MailManagerPtr mail_queue2;
7ba4ad4538b1 MailManager rewrite. not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
18
3
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
19 public:
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
20 BASE_NEW_DELETE(FifoDmaManager);
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
21
647
7ba4ad4538b1 MailManager rewrite. not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
22 FifoDmaManager() {
1189
898fdcf53c31 add SemMailManager
Daichi TOMA
parents: 1024
diff changeset
23 #ifdef __CERIUM_PARALLEL__
1196
27e35b4098a4 Rename MailManager
Daichi TOMA <e085740@ie.u-ryukyu.ac.jp>
parents: 1190
diff changeset
24 mail_queue1 = new SynchronizedMailManager();
27e35b4098a4 Rename MailManager
Daichi TOMA <e085740@ie.u-ryukyu.ac.jp>
parents: 1190
diff changeset
25 mail_queue2 = new SynchronizedMailManager();
1189
898fdcf53c31 add SemMailManager
Daichi TOMA
parents: 1024
diff changeset
26 #else
898fdcf53c31 add SemMailManager
Daichi TOMA
parents: 1024
diff changeset
27 mail_queue1 = new MailManager();
898fdcf53c31 add SemMailManager
Daichi TOMA
parents: 1024
diff changeset
28 mail_queue2 = new MailManager();
898fdcf53c31 add SemMailManager
Daichi TOMA
parents: 1024
diff changeset
29 #endif
647
7ba4ad4538b1 MailManager rewrite. not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
30 }
7ba4ad4538b1 MailManager rewrite. not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
31
7ba4ad4538b1 MailManager rewrite. not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
32 ~FifoDmaManager() {
7ba4ad4538b1 MailManager rewrite. not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
33 delete mail_queue1;
7ba4ad4538b1 MailManager rewrite. not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
34 delete mail_queue2;
7ba4ad4538b1 MailManager rewrite. not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
35 }
3
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
36
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
37 /* functions */
1213
a49c02dffe6f DMA connector reogranization
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1196
diff changeset
38 void *dma_load(Scheduler *s, void *buf, memaddr addr, uint32 size, uint32 mask);
a49c02dffe6f DMA connector reogranization
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1196
diff changeset
39 void *dma_store(void *buf, memaddr addr, uint32 size, uint32 mask);
88
504899860e66 *** empty log message ***
gongo
parents: 3
diff changeset
40 void dma_wait(uint32 mask) ;
1213
a49c02dffe6f DMA connector reogranization
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1196
diff changeset
41 void *get_writebuf(Scheduler *s, memaddr addr, uint32 size) ;
a49c02dffe6f DMA connector reogranization
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1196
diff changeset
42
3
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
43
647
7ba4ad4538b1 MailManager rewrite. not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
44 void mail_write(memaddr data) { mail_queue1->send(data); }
1007
00c01f416e3a add mail_queue
yutaka@localhost.localdomain
parents: 647
diff changeset
45 void mail_write_queue(memaddr data) { mail_queue1->send(data); }
00c01f416e3a add mail_queue
yutaka@localhost.localdomain
parents: 647
diff changeset
46 void mail_write_finish_list(memaddr data) { mail_queue1->send(data); }
647
7ba4ad4538b1 MailManager rewrite. not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
47 memaddr mail_read() { return mail_queue2->recv(); }
1024
cf0ad93028e9 add task list mail time profile.
yutaka@localhost.localdomain
parents: 1007
diff changeset
48 memaddr task_list_mail_read() { return mail_queue2->recv(); }
647
7ba4ad4538b1 MailManager rewrite. not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
49
7ba4ad4538b1 MailManager rewrite. not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
50 void mail_write_from_host(memaddr data) { mail_queue2->send(data); }
7ba4ad4538b1 MailManager rewrite. not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
51 memaddr mail_read_from_host() { return mail_queue1->recv(); }
7ba4ad4538b1 MailManager rewrite. not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
52 int has_mail_from_host() { return mail_queue1->count(); }
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
53
1213
a49c02dffe6f DMA connector reogranization
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1196
diff changeset
54 void *dma_loadList(Scheduler *s, ListDataPtr list, void *buff, uint32 mask);
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
55 void dma_storeList(ListDataPtr, void *buff, uint32 mask);
1213
a49c02dffe6f DMA connector reogranization
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1196
diff changeset
56 void *get_writebuf(Scheduler *s, ListDataPtr, uint32 size) ;
a49c02dffe6f DMA connector reogranization
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1196
diff changeset
57
a49c02dffe6f DMA connector reogranization
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1196
diff changeset
58 uint32 get_tag();
a49c02dffe6f DMA connector reogranization
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 1196
diff changeset
59 void bound(ListData *);
647
7ba4ad4538b1 MailManager rewrite. not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
60
3
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
61 };
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
62
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
63 #endif