[78] | 1 | /* |
---|
| 2 | * $Id$ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/include/Register_Address_Translation_unit.h" |
---|
| 9 | |
---|
| 10 | namespace morpheo { |
---|
| 11 | namespace behavioural { |
---|
| 12 | namespace core { |
---|
| 13 | namespace multi_ooo_engine { |
---|
| 14 | namespace ooo_engine { |
---|
| 15 | namespace rename_unit { |
---|
| 16 | namespace register_translation_unit { |
---|
| 17 | namespace register_address_translation_unit { |
---|
| 18 | |
---|
| 19 | |
---|
| 20 | #undef FUNCTION |
---|
| 21 | #define FUNCTION "Register_Address_Translation_unit::Register_Address_Translation_unit" |
---|
| 22 | Register_Address_Translation_unit::Register_Address_Translation_unit |
---|
| 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_ooo_engine::ooo_engine::rename_unit::register_translation_unit::register_address_translation_unit::Parameters * param, |
---|
| 33 | morpheo::behavioural::Tusage_t usage |
---|
| 34 | ): |
---|
| 35 | _name (name) |
---|
| 36 | ,_param (param) |
---|
| 37 | ,_usage (usage) |
---|
| 38 | { |
---|
| 39 | log_printf(FUNC,Register_Address_Translation_unit,FUNCTION,"Begin"); |
---|
| 40 | |
---|
| 41 | log_printf(INFO,Register_Address_Translation_unit,FUNCTION,"Allocation"); |
---|
| 42 | |
---|
| 43 | allocation ( |
---|
| 44 | #ifdef STATISTICS |
---|
| 45 | param_statistics |
---|
| 46 | #endif |
---|
| 47 | ); |
---|
| 48 | |
---|
| 49 | #ifdef STATISTICS |
---|
| 50 | if (_usage & USE_STATISTICS) |
---|
| 51 | { |
---|
| 52 | log_printf(INFO,Register_Address_Translation_unit,FUNCTION,"Allocation of statistics"); |
---|
| 53 | |
---|
| 54 | statistics_declaration(param_statistics); |
---|
| 55 | } |
---|
| 56 | #endif |
---|
| 57 | |
---|
| 58 | #ifdef VHDL |
---|
| 59 | if (_usage & USE_VHDL) |
---|
| 60 | { |
---|
| 61 | // generate the vhdl |
---|
| 62 | log_printf(INFO,Register_Address_Translation_unit,FUNCTION,"Generate the vhdl"); |
---|
| 63 | |
---|
| 64 | vhdl(); |
---|
| 65 | } |
---|
| 66 | #endif |
---|
| 67 | |
---|
| 68 | #ifdef SYSTEMC |
---|
| 69 | if (_usage & USE_SYSTEMC) |
---|
| 70 | { |
---|
| 71 | // Constant : accepted already transaction |
---|
| 72 | for (uint32_t i=0; i<_param->_nb_inst_insert; i++) |
---|
| 73 | { |
---|
| 74 | internal_RENAME_ACK [i] = 1; |
---|
| 75 | internal_INSERT_ACK [i] = 1; |
---|
| 76 | |
---|
| 77 | PORT_WRITE(out_RENAME_ACK[i],internal_RENAME_ACK [i]); |
---|
| 78 | PORT_WRITE(out_INSERT_ACK[i],internal_INSERT_ACK [i]); |
---|
| 79 | } |
---|
| 80 | for (uint32_t i=0; i<_param->_nb_inst_retire; i++) |
---|
| 81 | { |
---|
| 82 | internal_RETIRE_ACK [i] = 1; |
---|
| 83 | |
---|
| 84 | PORT_WRITE(out_RETIRE_ACK[i],internal_RETIRE_ACK [i]); |
---|
| 85 | } |
---|
| 86 | |
---|
| 87 | log_printf(INFO,Register_Address_Translation_unit,FUNCTION,"Method - transition"); |
---|
| 88 | |
---|
| 89 | SC_METHOD (transition); |
---|
| 90 | dont_initialize (); |
---|
| 91 | sensitive << (*(in_CLOCK)).pos(); |
---|
| 92 | |
---|
| 93 | # ifdef SYSTEMCASS_SPECIFIC |
---|
| 94 | // List dependency information |
---|
| 95 | # endif |
---|
| 96 | |
---|
| 97 | log_printf(INFO,Register_Address_Translation_unit,FUNCTION,"Method - genMoore"); |
---|
| 98 | |
---|
| 99 | SC_METHOD (genMoore); |
---|
| 100 | dont_initialize (); |
---|
| 101 | sensitive << (*(in_CLOCK)).neg(); |
---|
| 102 | |
---|
| 103 | # ifdef SYSTEMCASS_SPECIFIC |
---|
| 104 | // List dependency information |
---|
| 105 | # endif |
---|
| 106 | |
---|
| 107 | #endif |
---|
| 108 | } |
---|
| 109 | log_printf(FUNC,Register_Address_Translation_unit,FUNCTION,"End"); |
---|
| 110 | }; |
---|
| 111 | |
---|
| 112 | #undef FUNCTION |
---|
| 113 | #define FUNCTION "Register_Address_Translation_unit::~Register_Address_Translation_unit" |
---|
| 114 | Register_Address_Translation_unit::~Register_Address_Translation_unit (void) |
---|
| 115 | { |
---|
| 116 | log_printf(FUNC,Register_Address_Translation_unit,FUNCTION,"Begin"); |
---|
| 117 | |
---|
| 118 | #ifdef STATISTICS |
---|
| 119 | if (_usage & USE_STATISTICS) |
---|
| 120 | { |
---|
| 121 | log_printf(INFO,Register_Address_Translation_unit,FUNCTION,"Generate Statistics file"); |
---|
| 122 | |
---|
| 123 | delete _stat; |
---|
| 124 | } |
---|
| 125 | #endif |
---|
| 126 | |
---|
| 127 | log_printf(INFO,Register_Address_Translation_unit,FUNCTION,"Deallocation"); |
---|
| 128 | deallocation (); |
---|
| 129 | |
---|
| 130 | log_printf(FUNC,Register_Address_Translation_unit,FUNCTION,"End"); |
---|
| 131 | }; |
---|
| 132 | |
---|
| 133 | }; // end namespace register_address_translation_unit |
---|
| 134 | }; // end namespace register_translation_unit |
---|
| 135 | }; // end namespace rename_unit |
---|
| 136 | }; // end namespace ooo_engine |
---|
| 137 | }; // end namespace multi_ooo_engine |
---|
| 138 | }; // end namespace core |
---|
| 139 | |
---|
| 140 | }; // end namespace behavioural |
---|
| 141 | }; // end namespace morpheo |
---|