dol: initial dol commit
[jump.git] / dol / src / dol / visitor / hds / lib / ProcessWrapper.h
1 #ifndef _PROCESSWRAPPER_H_\r
2 #define _PROCESSWRAPPER_H_\r
3 \r
4 #include "systemc.h"\r
5 #include "dol.h"\r
6 #include "dol_sched_if.h"\r
7 #include "Fifo.h"\r
8 #include "WindowedFifo.h"\r
9 #include "functional_trace.h"\r
10 #include "Performance_Extraction.h"\r
11 \r
12 \r
13 #ifdef INCLUDE_PROFILER\r
14 extern FILE *profiler_output_file;\r
15 extern unsigned int profiler_event_counter;\r
16 #endif\r
17 \r
18 class ProcessWrapper : virtual public dol_sched_if, public sc_module\r
19 {\r
20     public:\r
21         ProcessWrapper(sc_module_name name);\r
22         virtual ~ProcessWrapper();\r
23         virtual void initialize();\r
24         virtual int fire();\r
25         virtual bool isDetached() { return _isDetached; }\r
26         virtual void detach();\r
27         virtual int getIndex(unsigned indexNumber) const;\r
28         virtual char* getName() const;\r
29 \r
30 #ifdef INCLUDE_PROFILER\r
31         virtual void addToProfile(const char *event, void *port,\r
32                 int length);\r
33 #endif\r
34 \r
35 #ifdef INCLUDE_TRACE\r
36         int start_line;\r
37         int end_line;\r
38         char channel_name[NAME_LENGTH];\r
39 #endif\r
40 \r
41 #ifdef INCLUDE_PERFORMANCE\r
42         int start_line;\r
43         int end_line;\r
44         CURRENT_TIME start_time;\r
45         CURRENT_TIME end_time;\r
46 #endif\r
47 \r
48     protected:\r
49         char* _name;\r
50         DOLProcess _process;\r
51         bool _isDetached;\r
52         int _iteratorIndex[4];\r
53         virtual int getIndex(const char* string, char* tokens,\r
54                 int indexNumber) const;\r
55 };\r
56 \r
57 #endif\r
58 \r