annotate TaskManager/include/types.h @ 604:7a41d2cb0a84

fix mail box size
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sat, 07 Nov 2009 14:23:40 +0900
parents 42c94f85c779
children 60aa3f241b10
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
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
4 #include <stdint.h>
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
5
387
5e2d30bfbf23 no compile error but not worked.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 367
diff changeset
6 typedef uint16_t uint16;
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
7 typedef uint32_t uint32;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
8 typedef uint64_t uint64;
395
8c5fa57128cb chain on SPE
game@localhost.localdomain
parents: 387
diff changeset
9
602
1733f3cbfa28 64bit mode try... not worked.
e075740@nw0740.st.ie.u-ryukyu.ac.jp
parents: 395
diff changeset
10 #if SPU // ifdef SPU
365
f8769040a5df modify types.h
aaa
parents: 364
diff changeset
11 typedef uint64_t memaddr;
364
87462f8d3761 uint32 to memaddr(uint64)
tkaito@localhost.localdomain
parents: 298
diff changeset
12 #else
367
c7a4818cdfcb change Makefile to copy include files
aaa
parents: 366
diff changeset
13 #ifdef MODE64
365
f8769040a5df modify types.h
aaa
parents: 364
diff changeset
14 typedef uint64_t memaddr;
364
87462f8d3761 uint32 to memaddr(uint64)
tkaito@localhost.localdomain
parents: 298
diff changeset
15 #else
604
7a41d2cb0a84 fix mail box size
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
16 // In LP64, sizeof(unsigned long)==8
7a41d2cb0a84 fix mail box size
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 603
diff changeset
17 typedef unsigned long memaddr;
364
87462f8d3761 uint32 to memaddr(uint64)
tkaito@localhost.localdomain
parents: 298
diff changeset
18 #endif
87462f8d3761 uint32 to memaddr(uint64)
tkaito@localhost.localdomain
parents: 298
diff changeset
19 #endif
46
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
20
395
8c5fa57128cb chain on SPE
game@localhost.localdomain
parents: 387
diff changeset
21
8c5fa57128cb chain on SPE
game@localhost.localdomain
parents: 387
diff changeset
22
8c5fa57128cb chain on SPE
game@localhost.localdomain
parents: 387
diff changeset
23
46
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
24 #define SPE_ALIGNMENT 16
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
25 #define SPE_ALIGNMENT_FULL 128
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
26 #define SPE_ALIGN __attribute__((aligned(SPE_ALIGNMENT)))
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
27 #define SPE_ALIGN_FULL __attribute__((aligned(SPE_ALIGNMENT_FULL))
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
28 #define ROUND_UP_ALIGN(value, alignment) \
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
29 (((value) + ((alignment) - 1))&(~((alignment)-1)))
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
30 #define DEFAULT_ALIGNMENT SPE_ALIGNMENT
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
31 //#define DEFAULT_ALIGNMENT SPE_ALIGNMENT_FULL
46
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
32
58
7492eb28b577 *** empty log message ***
gongo
parents: 46
diff changeset
33 #define DMA_MAX_SIZE 16384
7492eb28b577 *** empty log message ***
gongo
parents: 46
diff changeset
34
88
504899860e66 *** empty log message ***
gongo
parents: 65
diff changeset
35 #define round_up16(value) ROUND_UP_ALIGN(value, 16)
504899860e66 *** empty log message ***
gongo
parents: 65
diff changeset
36 #define round_up128(value) ROUND_UP_ALIGN(value, 128)
504899860e66 *** empty log message ***
gongo
parents: 65
diff changeset
37
298
58fd16298954 from EUC to UTF-8
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 109
diff changeset
38 // ここも typedef しとくか?
46
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
39 enum {
298
58fd16298954 from EUC to UTF-8
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 109
diff changeset
40 // どの方向かで enum 分けるだろjk...
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
41 // PPE -> SPE
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
42 MY_SPE_NOP = 0,
46
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
43 MY_SPE_COMMAND_EXIT,
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
44 MY_SPE_COMMAND_GO,
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
45
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
46 // SPE -> PPE
46
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
47 MY_SPE_STATUS_BUSY,
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
48 MY_SPE_STATUS_READY,
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
49 MY_SPE_COMMAND_MALLOC,
46
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
50 };
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
51
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
52 #define MAX_USE_SPE_NUM 6
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
53
65
519d24aa7ac8 *** empty log message ***
gongo
parents: 58
diff changeset
54 typedef enum {
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
55 CPU_PPE = 0, // default
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
56 CPU_SPE = 1,
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
57 SPE_ANY = CPU_SPE,
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
58 SPE_0 = 2,
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
59 SPE_1 = 3,
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
60 SPE_2 = 4,
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
61 SPE_3 = 5,
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
62 SPE_4 = 6,
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents: 88
diff changeset
63 SPE_5 = 7,
65
519d24aa7ac8 *** empty log message ***
gongo
parents: 58
diff changeset
64 } CPU_TYPE;
519d24aa7ac8 *** empty log message ***
gongo
parents: 58
diff changeset
65
46
f154d9d07a42 *** empty log message ***
gongo
parents:
diff changeset
66 #endif