0
|
1 #ifndef INCLUDED_SIPMLE_TASK
|
|
2 #define INCLUDED_SIPMLE_TASK
|
|
3
|
|
4 #include "base.h"
|
|
5 #include "types.h"
|
|
6
|
|
7 #define MAX_PARAMS 8
|
|
8
|
|
9 class SimpleTask {
|
|
10 public: // variables
|
|
11
|
|
12 BASE_NEW_DELETE(SimpleTask);
|
|
13 int command; // 4 byte
|
|
14 memaddr self; // 4 byte (or 8byte on 64bit mode)
|
|
15
|
|
16 memaddr rbuf;
|
|
17 memaddr wbuf;
|
|
18 int r_size;
|
|
19 int w_size;
|
|
20 memaddr from;
|
|
21 memaddr param; // sizeof(SimpleTask)==32
|
|
22
|
|
23
|
|
24 public: // functions
|
|
25 SimpleTask() {};
|
|
26
|
|
27 SimpleTask(int r, memaddr read, int w, memaddr write) {
|
|
28 r_size = r; rbuf = read;
|
|
29 w_size = w; wbuf = write;
|
|
30 };
|
|
31
|
|
32 void set_input(memaddr i,int size) { r_size = size; rbuf= i; }
|
|
33 void set_output(memaddr o,int size) { w_size = size; wbuf= o; }
|
|
34 void set_param(memaddr data) { param = data; }
|
|
35 memaddr get_param() { return param; }
|
|
36
|
|
37 } __attribute__ ((aligned (DEFAULT_ALIGNMENT)));
|
|
38
|
|
39 typedef SimpleTask *SimpleTaskPtr;
|
|
40
|
|
41 #endif
|
|
42
|