annotate include/TaskManager/SchedTask.h @ 247:0098b5ff0d11

change example
author aaa
date Mon, 01 Jun 2009 19:33:09 +0900
parents fe2cc32cd94d
children 58fd16298954 81b25e5d5379
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
42
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
1 #ifndef INCLUDED_SCHED_TASK
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
2 #define INCLUDED_SCHED_TASK
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
3
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
4 #ifndef INCLUDED_BASE_H_
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
5 # include "base.h"
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
6 #endif
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
7
42
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
8 #ifndef INCLUDED_SCHEDULER
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
9 # include "Scheduler.h"
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
10 #endif
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
11
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
12 #ifndef INCLUDED_SCHED_TASK_BASE
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
13 # include "SchedTaskBase.h"
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
14 #endif
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
15
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
16 #ifndef INCLUDED_LIST_DATA
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
17 # include "ListData.h"
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
18 #endif
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
19
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
20 #ifndef INCLUDED_TASK_GROUP
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
21 # include "TaskGroup.h"
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
22 #endif
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
23
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
24
42
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
25 class SchedTask : public SchedTaskBase {
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
26 public:
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
27 /* constructor */
184
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
28 SchedTask(void);
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
29 ~SchedTask(void);
88
504899860e66 *** empty log message ***
gongo
parents: 82
diff changeset
30
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
31 BASE_NEW_DELETE(SchedTask);
42
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
32
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
33 /* variables */
180
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 109
diff changeset
34
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 109
diff changeset
35 // Task ¹Ԥ륹塼鼫
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 109
diff changeset
36 Scheduler *__scheduler;
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 109
diff changeset
37
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 109
diff changeset
38 // ߥ塼餬¹ԤƤ TaskList ȡΥб Task
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
39 TaskListPtr __list;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
40 TaskPtr __task;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
41
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
42 // read/write Ѥ ListData
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
43 ListDataPtr __inListData;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
44 ListDataPtr __outListData;
42
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
45
180
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 109
diff changeset
46 /**
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 109
diff changeset
47 * read ǡwrite ѤΥХåե
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 109
diff changeset
48 * readbuf ˤ ϿꤷϥǡäƤ롣
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 109
diff changeset
49 * writebuf ˥ǡǤȡ
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 109
diff changeset
50 * Ͽꤷ˽񤭹
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 109
diff changeset
51 */
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
52 void *__readbuf;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
53 void *__writebuf;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
54
184
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
55 // Task ΡTasklist Ǥΰ֡(task = &list[cur_index-1])
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
56 int __cur_index;
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
57
180
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 109
diff changeset
58 // 줿Υ롼
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
59 TaskGroup *__taskGroup;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
60
180
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 109
diff changeset
61 // Υ줿ο
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 109
diff changeset
62 int __renew_flag;
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 109
diff changeset
63
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 109
diff changeset
64 // Υ SPE 줿ݤ 1: Yes, 0: No
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
65 int __flag_renewTask;
42
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
66
180
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 109
diff changeset
67 // ᥤ¦줿Τ
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 109
diff changeset
68 // SPE 줿ΤˤäơǡΰѤäƤ롣
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 109
diff changeset
69 // Τ if (__flag_renewTask) ϢȯΤϤ褯ʤΤ
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 109
diff changeset
70 // ؿݥ󥿤ǻäƤ
184
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
71 void (SchedTask::*ex_init)(void);
180
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 109
diff changeset
72 void (SchedTask::*ex_read)(void);
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 109
diff changeset
73 void (SchedTask::*ex_exec)(void);
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 109
diff changeset
74 void (SchedTask::*ex_write)(void);
184
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
75 SchedTaskBase* (SchedTask::*ex_next)(void);
180
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 109
diff changeset
76
42
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
77 /* functions */
184
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
78 void __setRenew(void);
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
79 void __init__(TaskListPtr _list, TaskPtr _task, int index,
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
80 ListDataPtr rbuf, ListDataPtr wbuf, Scheduler* sc);
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
81
42
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
82 // override
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
83 void read(void);
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
84 void exec(void);
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
85 void write(void);
180
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 109
diff changeset
86 SchedTaskBase* next(Scheduler *, SchedTaskBase *);
82
14a5ca0be17e *** empty log message ***
gongo
parents: 42
diff changeset
87
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
88 // 桼Ѿ
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
89 // 줾Υб򵭽Ҥ
82
14a5ca0be17e *** empty log message ***
gongo
parents: 42
diff changeset
90 virtual int run(void* r, void *w) { return 0; }
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
91
212
gongo@localhost.localdomain
parents: 194
diff changeset
92 int (SchedTask::*run_func)(void* r, void *w);
gongo@localhost.localdomain
parents: 194
diff changeset
93
184
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
94 //--- System API ---
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
95 SchedTask* get_nextTask(TaskListPtr list);
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
96
180
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 109
diff changeset
97 /**
184
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
98 * PPE 줿Ф
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
99 * __init__, read,exec,write,next °(?)
180
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 109
diff changeset
100 */
184
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
101 void ex_init_normal(void);
180
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 109
diff changeset
102 void ex_read_normal(void);
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 109
diff changeset
103 void ex_exec_normal(void);
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 109
diff changeset
104 void ex_write_normal(void);
184
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
105 SchedTaskBase* ex_next_normal(void);
180
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 109
diff changeset
106
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 109
diff changeset
107 /**
184
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
108 * SPE 줿Ф
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
109 * __inti__, ead,exec,write,next °(?)
180
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 109
diff changeset
110 */
184
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
111 void ex_init_renew(void);
180
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 109
diff changeset
112 void ex_read_renew(void);
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 109
diff changeset
113 void ex_exec_renew(void);
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 109
diff changeset
114 void ex_write_renew(void);
184
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
115 SchedTaskBase* ex_next_renew(void);
180
5cde66c926b4 いろいろ fix 。詳しくは TaskManager/Changelog、test_render/Changelog を
gongo@localhost.localdomain
parents: 109
diff changeset
116
184
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
117
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
118 //--- User API ---
194
gongo@localhost.localdomain
parents: 184
diff changeset
119 int get_cpuid(void);
gongo@localhost.localdomain
parents: 184
diff changeset
120
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
121 void* get_input(void *buff, int index);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
122 void* get_output(void *buff, int index);
182
df3cfc04e796 add get_inputAddr, get_outputAddr
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 180
diff changeset
123 uint32 get_inputAddr(int index);
df3cfc04e796 add get_inputAddr, get_outputAddr
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 180
diff changeset
124 uint32 get_outputAddr(int index);
184
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
125 int get_inputSize(int index);
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
126 int get_outputSize(int index);
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
127 int get_param(int index);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
128
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
129 TaskPtr create_task(int cmd);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
130 void wait_task(TaskPtr waitTask);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
131
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
132 void* global_alloc(int id, int size);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
133 void* global_get(int id);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
134 void global_free(int id);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
135
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
136 void mainMem_alloc(int id, int size);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
137 void mainMem_wait(void);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
138 void* mainMem_get(int id);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
139
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
140 void *allocate(int size);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
141
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
142 void dma_load(void *buf, uint32 addr, uint32 size, uint32 mask);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
143 void dma_store(void *buf,uint32 addr, uint32 size, uint32 mask);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
144 void dma_wait(uint32 mask);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
145
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
146 class STaskManager {
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
147 public:
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
148 STaskManager(SchedTask *_t) {
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
149 outer = _t;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
150 }
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
151
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
152 BASE_NEW_DELETE(STaskManager);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
153
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
154 SchedTask *outer;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
155
194
gongo@localhost.localdomain
parents: 184
diff changeset
156 int get_cpuid(void) {
gongo@localhost.localdomain
parents: 184
diff changeset
157 return outer->get_cpuid();
gongo@localhost.localdomain
parents: 184
diff changeset
158 }
gongo@localhost.localdomain
parents: 184
diff changeset
159
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
160 void* get_input(int index) {
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
161 return outer->get_input(outer->__readbuf, index);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
162 }
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
163
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
164 void* get_output(int index) {
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
165 return outer->get_output(outer->__writebuf, index);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
166 }
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
167
182
df3cfc04e796 add get_inputAddr, get_outputAddr
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 180
diff changeset
168 uint32 get_inputAddr(int index) {
df3cfc04e796 add get_inputAddr, get_outputAddr
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 180
diff changeset
169 return outer->get_inputAddr(index);
df3cfc04e796 add get_inputAddr, get_outputAddr
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 180
diff changeset
170 }
df3cfc04e796 add get_inputAddr, get_outputAddr
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 180
diff changeset
171
df3cfc04e796 add get_inputAddr, get_outputAddr
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 180
diff changeset
172 uint32 get_outputAddr(int index) {
df3cfc04e796 add get_inputAddr, get_outputAddr
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 180
diff changeset
173 return outer->get_outputAddr(index);
df3cfc04e796 add get_inputAddr, get_outputAddr
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 180
diff changeset
174 }
df3cfc04e796 add get_inputAddr, get_outputAddr
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 180
diff changeset
175
184
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
176 uint32 get_inputSize(int index) {
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
177 return outer->get_inputSize(index);
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
178 }
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
179
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
180 uint32 get_outputSize(int index) {
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
181 return outer->get_outputSize(index);
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
182 }
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
183
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
184 int get_param(int index) {
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
185 return outer->get_param(index);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
186 }
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
187
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
188 TaskPtr create_task(int cmd) {
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
189 return outer->create_task(cmd);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
190 }
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
191
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
192 void wait_task(TaskPtr waitTask) {
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
193 outer->wait_task(waitTask);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
194 }
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
195
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
196 void* global_alloc(int id, int size) {
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
197 return outer->global_alloc(id, size);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
198 }
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
199
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
200 void* global_get(int id) {
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
201 return outer->global_get(id);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
202 }
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
203
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
204 void global_free(int id) {
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
205 outer->global_free(id);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
206 }
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
207
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
208 void mainMem_alloc(int id, int size) {
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
209 outer->mainMem_alloc(id, size);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
210 }
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
211
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
212 void mainMem_wait(void) {
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
213 outer->mainMem_wait();
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
214 }
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
215
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
216 void* mainMem_get(int id) {
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
217 return outer->mainMem_get(id);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
218 }
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
219
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
220 void *allocate(int size) {
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
221 return outer->allocate(size);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
222 }
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
223
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
224 void dma_load(void *buf, uint32 addr, uint32 size, uint32 mask) {
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
225 outer->dma_load(buf, addr, size, mask);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
226 }
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
227
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
228 void dma_store(void *buf,uint32 addr, uint32 size, uint32 mask) {
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
229 outer->dma_store(buf, addr, size, mask);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
230 }
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
231
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
232 void dma_wait(uint32 mask) {
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
233 outer->dma_wait(mask);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
234 }
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
235 };
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
236
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
237 STaskManager *smanager;
42
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
238 };
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
239
184
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
240 const int SCHED_TASK_NORMAL = 0;
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
241 const int SCHED_TASK_RENEW = 1;
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
242
42
aa11038dbdc1 *** empty log message ***
gongo
parents:
diff changeset
243 #endif
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 105
diff changeset
244
184
gongo@gendarme.cr.ie.u-ryukyu.ac.jp
parents: 182
diff changeset
245 extern SchedTask* createSchedTask(TaskPtr);