1 | /* |
---|
2 | * $Id: Execute_loop.cpp 81 2008-04-15 18:40:01Z rosiere $ |
---|
3 | * |
---|
4 | * [ Description ] |
---|
5 | * |
---|
6 | */ |
---|
7 | |
---|
8 | #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/include/Execute_loop.h" |
---|
9 | |
---|
10 | namespace morpheo { |
---|
11 | namespace behavioural { |
---|
12 | namespace core { |
---|
13 | namespace multi_execute_loop { |
---|
14 | namespace execute_loop { |
---|
15 | |
---|
16 | |
---|
17 | #undef FUNCTION |
---|
18 | #define FUNCTION "Execute_loop::Execute_loop" |
---|
19 | Execute_loop::Execute_loop |
---|
20 | ( |
---|
21 | #ifdef SYSTEMC |
---|
22 | sc_module_name name, |
---|
23 | #else |
---|
24 | string name, |
---|
25 | #endif |
---|
26 | #ifdef STATISTICS |
---|
27 | morpheo::behavioural::Parameters_Statistics * param_statistics, |
---|
28 | #endif |
---|
29 | morpheo::behavioural::core::multi_execute_loop::execute_loop::Parameters * param, |
---|
30 | morpheo::behavioural::Tusage_t usage |
---|
31 | ): |
---|
32 | _name (name) |
---|
33 | ,_param (param) |
---|
34 | ,_usage (usage) |
---|
35 | { |
---|
36 | log_printf(FUNC,Execute_loop,FUNCTION,"Begin"); |
---|
37 | |
---|
38 | log_printf(INFO,Execute_loop,FUNCTION,"Allocation"); |
---|
39 | |
---|
40 | allocation ( |
---|
41 | #ifdef STATISTICS |
---|
42 | param_statistics |
---|
43 | #endif |
---|
44 | ); |
---|
45 | |
---|
46 | #ifdef STATISTICS |
---|
47 | if (_usage & USE_STATISTICS) |
---|
48 | { |
---|
49 | log_printf(INFO,Execute_loop,FUNCTION,"Allocation of statistics"); |
---|
50 | |
---|
51 | statistics_declaration(param_statistics); |
---|
52 | } |
---|
53 | #endif |
---|
54 | |
---|
55 | #ifdef VHDL |
---|
56 | if (_usage & USE_VHDL) |
---|
57 | { |
---|
58 | // generate the vhdl |
---|
59 | log_printf(INFO,Execute_loop,FUNCTION,"Generate the vhdl"); |
---|
60 | |
---|
61 | vhdl(); |
---|
62 | } |
---|
63 | #endif |
---|
64 | |
---|
65 | #ifdef SYSTEMC |
---|
66 | if (_usage & USE_SYSTEMC) |
---|
67 | { |
---|
68 | log_printf(INFO,Execute_loop,FUNCTION,"Method - transition"); |
---|
69 | |
---|
70 | SC_METHOD (transition); |
---|
71 | dont_initialize (); |
---|
72 | sensitive << (*(in_CLOCK)).pos(); |
---|
73 | |
---|
74 | # ifdef SYSTEMCASS_SPECIFIC |
---|
75 | // List dependency information |
---|
76 | # endif |
---|
77 | |
---|
78 | #endif |
---|
79 | } |
---|
80 | log_printf(FUNC,Execute_loop,FUNCTION,"End"); |
---|
81 | }; |
---|
82 | |
---|
83 | #undef FUNCTION |
---|
84 | #define FUNCTION "Execute_loop::~Execute_loop" |
---|
85 | Execute_loop::~Execute_loop (void) |
---|
86 | { |
---|
87 | log_printf(FUNC,Execute_loop,FUNCTION,"Begin"); |
---|
88 | |
---|
89 | #ifdef STATISTICS |
---|
90 | if (_usage & USE_STATISTICS) |
---|
91 | { |
---|
92 | log_printf(INFO,Execute_loop,FUNCTION,"Generate Statistics file"); |
---|
93 | |
---|
94 | delete _stat; |
---|
95 | } |
---|
96 | #endif |
---|
97 | |
---|
98 | log_printf(INFO,Execute_loop,FUNCTION,"Deallocation"); |
---|
99 | deallocation (); |
---|
100 | |
---|
101 | log_printf(FUNC,Execute_loop,FUNCTION,"End"); |
---|
102 | }; |
---|
103 | |
---|
104 | }; // end namespace execute_loop |
---|
105 | }; // end namespace multi_execute_loop |
---|
106 | }; // end namespace core |
---|
107 | |
---|
108 | }; // end namespace behavioural |
---|
109 | }; // end namespace morpheo |
---|