[78] | 1 | #ifndef morpheo_behavioural_core_multi_ooo_engine_ooo_engine_rename_unit_register_translation_unit_Register_translation_unit_h |
---|
| 2 | #define morpheo_behavioural_core_multi_ooo_engine_ooo_engine_rename_unit_register_translation_unit_Register_translation_unit_h |
---|
| 3 | |
---|
| 4 | /* |
---|
| 5 | * $Id: Register_translation_unit.h 104 2009-01-21 21:53:13Z rosiere $ |
---|
| 6 | * |
---|
| 7 | * [ Description ] |
---|
| 8 | * |
---|
| 9 | */ |
---|
| 10 | |
---|
| 11 | #ifdef SYSTEMC |
---|
| 12 | #include "systemc.h" |
---|
| 13 | #endif |
---|
| 14 | |
---|
| 15 | #include <iostream> |
---|
| 16 | #include "Common/include/ToString.h" |
---|
| 17 | #include "Common/include/Debug.h" |
---|
| 18 | #include "Behavioural/include/Types.h" |
---|
| 19 | |
---|
| 20 | #include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/include/Parameters.h" |
---|
| 21 | #ifdef STATISTICS |
---|
| 22 | #include "Behavioural/include/Stat.h" |
---|
| 23 | #endif |
---|
| 24 | #include "Behavioural/include/Component.h" |
---|
| 25 | #ifdef VHDL |
---|
| 26 | #include "Behavioural/include/Vhdl.h" |
---|
| 27 | #endif |
---|
| 28 | #include "Behavioural/include/Usage.h" |
---|
| 29 | |
---|
| 30 | #include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Dependency_checking_unit/include/Dependency_checking_unit.h" |
---|
| 31 | #include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/include/Free_List_unit.h" |
---|
| 32 | #include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/include/Register_Address_Translation_unit.h" |
---|
| 33 | #include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/include/Stat_List_unit.h" |
---|
| 34 | #include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_translation_unit_Glue/include/Register_translation_unit_Glue.h" |
---|
| 35 | |
---|
| 36 | namespace morpheo { |
---|
| 37 | namespace behavioural { |
---|
| 38 | namespace core { |
---|
| 39 | namespace multi_ooo_engine { |
---|
| 40 | namespace ooo_engine { |
---|
| 41 | namespace rename_unit { |
---|
| 42 | namespace register_translation_unit { |
---|
| 43 | |
---|
| 44 | |
---|
| 45 | class Register_translation_unit |
---|
| 46 | #if SYSTEMC |
---|
| 47 | : public sc_module |
---|
| 48 | #endif |
---|
| 49 | { |
---|
| 50 | // -----[ fields ]---------------------------------------------------- |
---|
| 51 | // Parameters |
---|
| 52 | protected : const std::string _name; |
---|
| 53 | protected : const Parameters * _param; |
---|
| 54 | private : const Tusage_t _usage; |
---|
| 55 | |
---|
| 56 | #ifdef STATISTICS |
---|
| 57 | public : Stat * _stat; |
---|
| 58 | #endif |
---|
| 59 | |
---|
| 60 | public : Component * _component; |
---|
| 61 | private : Interfaces * _interfaces; |
---|
| 62 | |
---|
| 63 | #ifdef SYSTEMC |
---|
| 64 | // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 65 | // Interface |
---|
| 66 | public : SC_CLOCK * in_CLOCK ; |
---|
| 67 | public : SC_IN (Tcontrol_t) * in_NRESET ; |
---|
| 68 | |
---|
| 69 | // ~~~~~[ Interface "rename" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 70 | public : SC_IN (Tcontrol_t ) ** in_RENAME_VAL ;//[nb_inst_insert] |
---|
| 71 | public : SC_OUT(Tcontrol_t ) ** out_RENAME_ACK ;//[nb_inst_insert] |
---|
| 72 | public : SC_IN (Tcontext_t ) ** in_RENAME_FRONT_END_ID ;//[nb_inst_insert] |
---|
| 73 | public : SC_IN (Tcontext_t ) ** in_RENAME_CONTEXT_ID ;//[nb_inst_insert] |
---|
| 74 | public : SC_IN (Tcontrol_t ) ** in_RENAME_READ_RA ;//[nb_inst_insert] |
---|
| 75 | public : SC_IN (Tgeneral_address_t) ** in_RENAME_NUM_REG_RA_LOG ;//[nb_inst_insert] |
---|
| 76 | public : SC_IN (Tcontrol_t ) ** in_RENAME_READ_RB ;//[nb_inst_insert] |
---|
| 77 | public : SC_IN (Tgeneral_address_t) ** in_RENAME_NUM_REG_RB_LOG ;//[nb_inst_insert] |
---|
| 78 | public : SC_IN (Tcontrol_t ) ** in_RENAME_READ_RC ;//[nb_inst_insert] |
---|
| 79 | public : SC_IN (Tspecial_address_t) ** in_RENAME_NUM_REG_RC_LOG ;//[nb_inst_insert] |
---|
| 80 | public : SC_IN (Tcontrol_t ) ** in_RENAME_WRITE_RD ;//[nb_inst_insert] |
---|
| 81 | public : SC_IN (Tgeneral_address_t) ** in_RENAME_NUM_REG_RD_LOG ;//[nb_inst_insert] |
---|
| 82 | public : SC_IN (Tcontrol_t ) ** in_RENAME_WRITE_RE ;//[nb_inst_insert] |
---|
| 83 | public : SC_IN (Tspecial_address_t) ** in_RENAME_NUM_REG_RE_LOG ;//[nb_inst_insert] |
---|
| 84 | |
---|
| 85 | // ~~~~~[ Interface "insert" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 86 | public : SC_OUT(Tcontrol_t ) ** out_INSERT_VAL ;//[nb_inst_insert] |
---|
| 87 | public : SC_IN (Tcontrol_t ) ** in_INSERT_ACK ;//[nb_inst_insert] |
---|
| 88 | public : SC_OUT(Tcontext_t ) ** out_INSERT_FRONT_END_ID ;//[nb_inst_insert] |
---|
| 89 | public : SC_OUT(Tcontext_t ) ** out_INSERT_CONTEXT_ID ;//[nb_inst_insert] |
---|
| 90 | public : SC_OUT(Tcontrol_t ) ** out_INSERT_READ_RA ;//[nb_inst_insert] |
---|
| 91 | public : SC_OUT(Tgeneral_address_t) ** out_INSERT_NUM_REG_RA_LOG ;//[nb_inst_insert] |
---|
| 92 | public : SC_OUT(Tgeneral_address_t) ** out_INSERT_NUM_REG_RA_PHY ;//[nb_inst_insert] |
---|
| 93 | public : SC_OUT(Tcontrol_t ) ** out_INSERT_READ_RB ;//[nb_inst_insert] |
---|
| 94 | public : SC_OUT(Tgeneral_address_t) ** out_INSERT_NUM_REG_RB_LOG ;//[nb_inst_insert] |
---|
| 95 | public : SC_OUT(Tgeneral_address_t) ** out_INSERT_NUM_REG_RB_PHY ;//[nb_inst_insert] |
---|
| 96 | public : SC_OUT(Tcontrol_t ) ** out_INSERT_READ_RC ;//[nb_inst_insert] |
---|
| 97 | public : SC_OUT(Tspecial_address_t) ** out_INSERT_NUM_REG_RC_LOG ;//[nb_inst_insert] |
---|
| 98 | public : SC_OUT(Tspecial_address_t) ** out_INSERT_NUM_REG_RC_PHY ;//[nb_inst_insert] |
---|
| 99 | public : SC_OUT(Tcontrol_t ) ** out_INSERT_WRITE_RD ;//[nb_inst_insert] |
---|
| 100 | public : SC_OUT(Tgeneral_address_t) ** out_INSERT_NUM_REG_RD_LOG ;//[nb_inst_insert] |
---|
| 101 | public : SC_OUT(Tgeneral_address_t) ** out_INSERT_NUM_REG_RD_PHY_OLD;//[nb_inst_insert] |
---|
| 102 | public : SC_OUT(Tgeneral_address_t) ** out_INSERT_NUM_REG_RD_PHY_NEW;//[nb_inst_insert] |
---|
| 103 | public : SC_OUT(Tcontrol_t ) ** out_INSERT_WRITE_RE ;//[nb_inst_insert] |
---|
| 104 | public : SC_OUT(Tspecial_address_t) ** out_INSERT_NUM_REG_RE_LOG ;//[nb_inst_insert] |
---|
| 105 | public : SC_OUT(Tspecial_address_t) ** out_INSERT_NUM_REG_RE_PHY_OLD;//[nb_inst_insert] |
---|
| 106 | public : SC_OUT(Tspecial_address_t) ** out_INSERT_NUM_REG_RE_PHY_NEW;//[nb_inst_insert] |
---|
| 107 | |
---|
| 108 | // ~~~~~[ Interface "retire" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 109 | public : SC_IN (Tcontrol_t ) ** in_RETIRE_VAL ;//[nb_inst_retire] |
---|
| 110 | public : SC_OUT(Tcontrol_t ) ** out_RETIRE_ACK ;//[nb_inst_retire] |
---|
| 111 | public : SC_IN (Tcontext_t ) ** in_RETIRE_FRONT_END_ID ;//[nb_inst_retire] |
---|
| 112 | public : SC_IN (Tcontext_t ) ** in_RETIRE_CONTEXT_ID ;//[nb_inst_retire] |
---|
| 113 | public : SC_IN (Tcontrol_t ) ** in_RETIRE_READ_RA ;//[nb_inst_retire] |
---|
| 114 | public : SC_IN (Tgeneral_address_t) ** in_RETIRE_NUM_REG_RA_PHY ;//[nb_inst_retire] |
---|
| 115 | public : SC_IN (Tcontrol_t ) ** in_RETIRE_READ_RB ;//[nb_inst_retire] |
---|
| 116 | public : SC_IN (Tgeneral_address_t) ** in_RETIRE_NUM_REG_RB_PHY ;//[nb_inst_retire] |
---|
| 117 | public : SC_IN (Tcontrol_t ) ** in_RETIRE_READ_RC ;//[nb_inst_retire] |
---|
| 118 | public : SC_IN (Tspecial_address_t) ** in_RETIRE_NUM_REG_RC_PHY ;//[nb_inst_retire] |
---|
| 119 | public : SC_IN (Tcontrol_t ) ** in_RETIRE_WRITE_RD ;//[nb_inst_retire] |
---|
| 120 | public : SC_IN (Tgeneral_address_t) ** in_RETIRE_NUM_REG_RD_LOG ;//[nb_inst_retire] |
---|
| 121 | public : SC_IN (Tgeneral_address_t) ** in_RETIRE_NUM_REG_RD_PHY_OLD;//[nb_inst_retire] |
---|
| 122 | public : SC_IN (Tgeneral_address_t) ** in_RETIRE_NUM_REG_RD_PHY_NEW;//[nb_inst_retire] |
---|
| 123 | public : SC_IN (Tcontrol_t ) ** in_RETIRE_WRITE_RE ;//[nb_inst_retire] |
---|
| 124 | public : SC_IN (Tspecial_address_t) ** in_RETIRE_NUM_REG_RE_LOG ;//[nb_inst_retire] |
---|
| 125 | public : SC_IN (Tspecial_address_t) ** in_RETIRE_NUM_REG_RE_PHY_OLD;//[nb_inst_retire] |
---|
| 126 | public : SC_IN (Tspecial_address_t) ** in_RETIRE_NUM_REG_RE_PHY_NEW;//[nb_inst_retire] |
---|
| 127 | |
---|
[104] | 128 | // ~~~~~[ Interface "retire_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 129 | public : SC_IN (Tcontrol_t ) *** in_RETIRE_EVENT_VAL ;//[nb_front_end][nb_context] |
---|
| 130 | public : SC_OUT(Tcontrol_t ) *** out_RETIRE_EVENT_ACK ;//[nb_front_end][nb_context] |
---|
| 131 | public : SC_IN (Tevent_state_t ) *** in_RETIRE_EVENT_STATE ;//[nb_front_end][nb_context] |
---|
| 132 | |
---|
[78] | 133 | // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 134 | public : morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::dependency_checking_unit::Dependency_checking_unit * _component_dependency_checking_unit; |
---|
| 135 | public : morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::free_list_unit::Free_List_unit * _component_free_list_unit; |
---|
| 136 | public : morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::register_address_translation_unit::Register_Address_Translation_unit * _component_register_address_translation_unit; |
---|
| 137 | public : morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::stat_list_unit::Stat_List_unit * _component_stat_list_unit; |
---|
| 138 | public : morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::register_translation_unit_glue::Register_translation_unit_Glue * _component_register_translation_unit_glue; |
---|
| 139 | |
---|
| 140 | // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 141 | |
---|
| 142 | // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 143 | #endif |
---|
| 144 | |
---|
| 145 | // -----[ Methods ]--------------------------------------------------- |
---|
| 146 | |
---|
| 147 | #ifdef SYSTEMC |
---|
| 148 | SC_HAS_PROCESS (Register_translation_unit); |
---|
| 149 | #endif |
---|
| 150 | public : Register_translation_unit |
---|
| 151 | ( |
---|
| 152 | #ifdef SYSTEMC |
---|
| 153 | sc_module_name name, |
---|
| 154 | #else |
---|
| 155 | std::string name, |
---|
| 156 | #endif |
---|
| 157 | #ifdef STATISTICS |
---|
| 158 | morpheo::behavioural::Parameters_Statistics * param_statistics, |
---|
| 159 | #endif |
---|
| 160 | Parameters * param, |
---|
[82] | 161 | morpheo::behavioural::Tusage_t usage |
---|
[78] | 162 | ); |
---|
| 163 | public : ~Register_translation_unit (void); |
---|
| 164 | |
---|
| 165 | private : void allocation ( |
---|
| 166 | #ifdef STATISTICS |
---|
| 167 | morpheo::behavioural::Parameters_Statistics * param_statistics |
---|
| 168 | #else |
---|
| 169 | void |
---|
| 170 | #endif |
---|
| 171 | ); |
---|
| 172 | private : void deallocation (void); |
---|
| 173 | |
---|
| 174 | #ifdef SYSTEMC |
---|
| 175 | # if defined(STATISTICS) or defined(VHDL_TESTBENCH) |
---|
| 176 | public : void transition (void); |
---|
| 177 | # endif |
---|
| 178 | #endif |
---|
| 179 | |
---|
| 180 | #if VHDL |
---|
| 181 | public : void vhdl (void); |
---|
| 182 | #endif |
---|
| 183 | |
---|
| 184 | #ifdef STATISTICS |
---|
| 185 | public : void statistics_declaration (morpheo::behavioural::Parameters_Statistics * param_statistics); |
---|
| 186 | #endif |
---|
| 187 | #if defined(STATISTICS) or defined(VHDL_TESTBENCH) |
---|
| 188 | private : void end_cycle (void); |
---|
| 189 | #endif |
---|
| 190 | }; |
---|
| 191 | |
---|
| 192 | }; // end namespace register_translation_unit |
---|
| 193 | }; // end namespace rename_unit |
---|
| 194 | }; // end namespace ooo_engine |
---|
| 195 | }; // end namespace multi_ooo_engine |
---|
| 196 | }; // end namespace core |
---|
| 197 | |
---|
| 198 | }; // end namespace behavioural |
---|
| 199 | }; // end namespace morpheo |
---|
| 200 | |
---|
| 201 | #endif |
---|