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