1 | /* |
---|
2 | * $Id: Issue_queue.cpp 110 2009-02-19 16:31:47Z rosiere $ |
---|
3 | * |
---|
4 | * [ Description ] |
---|
5 | * |
---|
6 | */ |
---|
7 | |
---|
8 | #include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/include/Issue_queue.h" |
---|
9 | |
---|
10 | namespace morpheo { |
---|
11 | namespace behavioural { |
---|
12 | namespace core { |
---|
13 | namespace multi_ooo_engine { |
---|
14 | namespace ooo_engine { |
---|
15 | namespace issue_queue { |
---|
16 | |
---|
17 | |
---|
18 | #undef FUNCTION |
---|
19 | #define FUNCTION "Issue_queue::Issue_queue" |
---|
20 | Issue_queue::Issue_queue |
---|
21 | ( |
---|
22 | #ifdef SYSTEMC |
---|
23 | sc_module_name name, |
---|
24 | #else |
---|
25 | string name, |
---|
26 | #endif |
---|
27 | #ifdef STATISTICS |
---|
28 | morpheo::behavioural::Parameters_Statistics * param_statistics, |
---|
29 | #endif |
---|
30 | morpheo::behavioural::core::multi_ooo_engine::ooo_engine::issue_queue::Parameters * param, |
---|
31 | morpheo::behavioural::Tusage_t usage |
---|
32 | ): |
---|
33 | _name (name) |
---|
34 | ,_param (param) |
---|
35 | ,_usage (usage) |
---|
36 | { |
---|
37 | log_begin(Issue_queue,FUNCTION); |
---|
38 | |
---|
39 | usage_environment(_usage); |
---|
40 | |
---|
41 | #if DEBUG_Issue_queue == true |
---|
42 | log_printf(INFO,Issue_queue,FUNCTION,_("<%s> Parameters"),_name.c_str()); |
---|
43 | |
---|
44 | std::cout << *param << std::endl; |
---|
45 | #endif |
---|
46 | |
---|
47 | log_printf(INFO,Issue_queue,FUNCTION,_("<%s> : Allocation"),_name.c_str()); |
---|
48 | |
---|
49 | allocation ( |
---|
50 | #ifdef STATISTICS |
---|
51 | param_statistics |
---|
52 | #endif |
---|
53 | ); |
---|
54 | |
---|
55 | #ifdef STATISTICS |
---|
56 | if (usage_is_set(_usage,USE_STATISTICS)) |
---|
57 | { |
---|
58 | log_printf(INFO,Issue_queue,FUNCTION,_("<%s> : Allocation of statistics"),_name.c_str()); |
---|
59 | |
---|
60 | statistics_allocation(param_statistics); |
---|
61 | } |
---|
62 | #endif |
---|
63 | |
---|
64 | #ifdef VHDL |
---|
65 | if (usage_is_set(_usage,USE_VHDL)) |
---|
66 | { |
---|
67 | // generate the vhdl |
---|
68 | log_printf(INFO,Issue_queue,FUNCTION,_("<%s> : Generate the vhdl"),_name.c_str()); |
---|
69 | |
---|
70 | vhdl(); |
---|
71 | } |
---|
72 | #endif |
---|
73 | |
---|
74 | #ifdef SYSTEMC |
---|
75 | if (usage_is_set(_usage,USE_SYSTEMC)) |
---|
76 | { |
---|
77 | log_printf(INFO,Issue_queue,FUNCTION,_("<%s> : Method - transition"),_name.c_str()); |
---|
78 | |
---|
79 | SC_METHOD (transition); |
---|
80 | dont_initialize (); |
---|
81 | sensitive << (*(in_CLOCK)).pos(); |
---|
82 | |
---|
83 | # ifdef SYSTEMCASS_SPECIFIC |
---|
84 | // List dependency information |
---|
85 | # endif |
---|
86 | |
---|
87 | log_printf(INFO,Issue_queue,FUNCTION,_("<%s> : Method - genMoore"),_name.c_str()); |
---|
88 | |
---|
89 | SC_METHOD (genMoore); |
---|
90 | dont_initialize (); |
---|
91 | sensitive << (*(in_CLOCK)).neg(); // need internal register |
---|
92 | |
---|
93 | # ifdef SYSTEMCASS_SPECIFIC |
---|
94 | // List dependency information |
---|
95 | # endif |
---|
96 | |
---|
97 | #endif |
---|
98 | } |
---|
99 | log_end(Issue_queue,FUNCTION); |
---|
100 | }; |
---|
101 | |
---|
102 | #undef FUNCTION |
---|
103 | #define FUNCTION "Issue_queue::~Issue_queue" |
---|
104 | Issue_queue::~Issue_queue (void) |
---|
105 | { |
---|
106 | log_begin(Issue_queue,FUNCTION); |
---|
107 | |
---|
108 | #ifdef STATISTICS |
---|
109 | if (usage_is_set(_usage,USE_STATISTICS)) |
---|
110 | { |
---|
111 | statistics_deallocation(); |
---|
112 | } |
---|
113 | #endif |
---|
114 | |
---|
115 | log_printf(INFO,Issue_queue,FUNCTION,_("<%s> : Deallocation"),_name.c_str()); |
---|
116 | |
---|
117 | deallocation (); |
---|
118 | |
---|
119 | log_end(Issue_queue,FUNCTION); |
---|
120 | }; |
---|
121 | |
---|
122 | }; // end namespace issue_queue |
---|
123 | }; // end namespace ooo_engine |
---|
124 | }; // end namespace multi_ooo_engine |
---|
125 | }; // end namespace core |
---|
126 | |
---|
127 | }; // end namespace behavioural |
---|
128 | }; // end namespace morpheo |
---|