annotate include/TaskManager/types.h @ 132:9550e4ce2868 draft

add XML
author gongo@charles.cr.ie.u-ryukyu.ac.jp
date Tue, 25 Nov 2008 18:19:53 +0900
parents 028ffc9c0375
children 768452fab95e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
46
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
1 #ifndef INCLUDED_TYPES
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
2 #define INCLUDED_TYPES
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
3
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
4 #include <stdint.h>
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
5
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
6 typedef uint32_t uint32;
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
7 typedef uint64_t uint64;
46
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
8
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
9 #define SPE_ALIGNMENT 16
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
10 #define SPE_ALIGNMENT_FULL 128
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
11 #define SPE_ALIGN __attribute__((aligned(SPE_ALIGNMENT)))
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
12 #define SPE_ALIGN_FULL __attribute__((aligned(SPE_ALIGNMENT_FULL))
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
13 #define ROUND_UP_ALIGN(value, alignment) \
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
14 (((value) + ((alignment) - 1))&(~((alignment)-1)))
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
15 #define DEFAULT_ALIGNMENT SPE_ALIGNMENT
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
16 //#define DEFAULT_ALIGNMENT SPE_ALIGNMENT_FULL
46
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
17
58
7492eb28b577 *** empty log message ***
gongo
parents: 46
diff changeset
18 #define DMA_MAX_SIZE 16384
7492eb28b577 *** empty log message ***
gongo
parents: 46
diff changeset
19
88
504899860e66 *** empty log message ***
gongo
parents: 65
diff changeset
20 #define round_up16(value) ROUND_UP_ALIGN(value, 16)
504899860e66 *** empty log message ***
gongo
parents: 65
diff changeset
21 #define round_up128(value) ROUND_UP_ALIGN(value, 128)
504899860e66 *** empty log message ***
gongo
parents: 65
diff changeset
22
65
519d24aa7ac8 *** empty log message ***
gongo
parents: 58
diff changeset
23 // ここも typedef しとくか?
46
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
24 enum {
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
25 // どの方向かで enum 分けるだろjk...
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
26 // PPE -> SPE
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
27 MY_SPE_NOP = 0,
46
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
28 MY_SPE_COMMAND_EXIT,
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
29 MY_SPE_COMMAND_GO,
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
30
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
31 // SPE -> PPE
46
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
32 MY_SPE_STATUS_BUSY,
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
33 MY_SPE_STATUS_READY,
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
34 MY_SPE_COMMAND_MALLOC,
46
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
35 };
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
36
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
37 #define MAX_USE_SPE_NUM 6
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
38
65
519d24aa7ac8 *** empty log message ***
gongo
parents: 58
diff changeset
39 typedef enum {
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
40 CPU_PPE = 0, // default
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
41 CPU_SPE = 1,
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
42 SPE_ANY = CPU_SPE,
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
43 SPE_0 = 2,
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
44 SPE_1 = 3,
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
45 SPE_2 = 4,
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
46 SPE_3 = 5,
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
47 SPE_4 = 6,
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
48 SPE_5 = 7,
65
519d24aa7ac8 *** empty log message ***
gongo
parents: 58
diff changeset
49 } CPU_TYPE;
519d24aa7ac8 *** empty log message ***
gongo
parents: 58
diff changeset
50
46
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
51 #endif