annotate TaskManager/Fifo/FifoDmaManager.h @ 1024:cf0ad93028e9 draft

add task list mail time profile.
author yutaka@localhost.localdomain
date Mon, 08 Nov 2010 14:02:23 +0900
parents 00c01f416e3a
children 898fdcf53c31
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"
3fc86ddf5d1c clean up include
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 109
diff changeset
6 #include "MailManager.h"
3
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
7
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
8 class FifoDmaManager : public DmaManager {
647
7ba4ad4538b1 MailManager rewrite. not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
9
7ba4ad4538b1 MailManager rewrite. not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
10 protected:
7ba4ad4538b1 MailManager rewrite. not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
11 /* variables */
7ba4ad4538b1 MailManager rewrite. not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
12 MailManagerPtr mail_queue1;
7ba4ad4538b1 MailManager rewrite. not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
13 MailManagerPtr mail_queue2;
7ba4ad4538b1 MailManager rewrite. not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
14
3
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
15 public:
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
16 BASE_NEW_DELETE(FifoDmaManager);
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
17
647
7ba4ad4538b1 MailManager rewrite. not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
18 FifoDmaManager() {
7ba4ad4538b1 MailManager rewrite. not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
19 mail_queue1 = new MailManager();
7ba4ad4538b1 MailManager rewrite. not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
20 mail_queue2 = new MailManager();
7ba4ad4538b1 MailManager rewrite. not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
21 }
7ba4ad4538b1 MailManager rewrite. not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
22
7ba4ad4538b1 MailManager rewrite. not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
23 ~FifoDmaManager() {
7ba4ad4538b1 MailManager rewrite. not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
24 delete mail_queue1;
7ba4ad4538b1 MailManager rewrite. not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
25 delete mail_queue2;
7ba4ad4538b1 MailManager rewrite. not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
26 }
3
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
27
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
28 /* functions */
603
57ec231bc8ac long -> memaddr (64 or 32)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 602
diff changeset
29 void dma_load(void *buf, memaddr addr, uint32 size, uint32 mask);
57ec231bc8ac long -> memaddr (64 or 32)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 602
diff changeset
30 void dma_store(void *buf, memaddr addr, uint32 size, uint32 mask);
88
504899860e66 *** empty log message ***
gongo
parents: 3
diff changeset
31 void dma_wait(uint32 mask) ;
3
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
32
647
7ba4ad4538b1 MailManager rewrite. not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
33 void mail_write(memaddr data) { mail_queue1->send(data); }
1007
00c01f416e3a add mail_queue
yutaka@localhost.localdomain
parents: 647
diff changeset
34 void mail_write_queue(memaddr data) { mail_queue1->send(data); }
00c01f416e3a add mail_queue
yutaka@localhost.localdomain
parents: 647
diff changeset
35 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
36 memaddr mail_read() { return mail_queue2->recv(); }
1024
cf0ad93028e9 add task list mail time profile.
yutaka@localhost.localdomain
parents: 1007
diff changeset
37 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
38
7ba4ad4538b1 MailManager rewrite. not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
39 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
40 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
41 int has_mail_from_host() { return mail_queue1->count(); }
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
42
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
43 void dma_loadList(ListDataPtr list, void *buff, uint32 mask);
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
44 void dma_storeList(ListDataPtr, void *buff, uint32 mask);
647
7ba4ad4538b1 MailManager rewrite. not yet worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
45
3
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
46 };
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
47
2356238ebea7 *** empty log message ***
gongo
parents:
diff changeset
48 #endif