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