diff include/TaskManager/types.h @ 109:028ffc9c0375 draft

Cerium cvs version
author gongo@gendarme.local
date Wed, 12 Nov 2008 17:39:33 +0900
parents 504899860e66
children 768452fab95e
line wrap: on
line diff
--- a/include/TaskManager/types.h	Wed Nov 12 17:29:35 2008 +0900
+++ b/include/TaskManager/types.h	Wed Nov 12 17:39:33 2008 +0900
@@ -1,8 +1,10 @@
 #ifndef INCLUDED_TYPES
 #define INCLUDED_TYPES
 
-typedef unsigned int       uint32;
-typedef unsigned long long uint64;
+#include <stdint.h>
+
+typedef uint32_t uint32;
+typedef uint64_t uint64;
 
 #define SPE_ALIGNMENT 16
 #define SPE_ALIGNMENT_FULL 128
@@ -11,6 +13,7 @@
 #define ROUND_UP_ALIGN(value, alignment) \
     (((value) + ((alignment) - 1))&(~((alignment)-1)))
 #define DEFAULT_ALIGNMENT SPE_ALIGNMENT
+//#define DEFAULT_ALIGNMENT SPE_ALIGNMENT_FULL
 
 #define DMA_MAX_SIZE 16384
 
@@ -19,16 +22,30 @@
 
 // ここも typedef しとくか?
 enum {
+// どの方向かで enum 分けるだろjk...
+// PPE -> SPE 
+    MY_SPE_NOP = 0,
     MY_SPE_COMMAND_EXIT,
     MY_SPE_COMMAND_GO,
 
+// SPE -> PPE
     MY_SPE_STATUS_BUSY,
-    MY_SPE_STATUS_READY
+    MY_SPE_STATUS_READY,
+    MY_SPE_COMMAND_MALLOC,
 };
 
+#define MAX_USE_SPE_NUM 6
+
 typedef enum {
-    CPU_PPE, // default
-    CPU_SPE
+    CPU_PPE = 0, // default
+    CPU_SPE = 1,
+    SPE_ANY = CPU_SPE,
+    SPE_0 = 2,
+    SPE_1 = 3,
+    SPE_2 = 4,
+    SPE_3 = 5,
+    SPE_4 = 6,
+    SPE_5 = 7,
 } CPU_TYPE;
 
 #endif