[78] | 1 | /* |
---|
| 2 | * $Id: Register_translation_unit_allocation.cpp 82 2008-05-01 16:48:45Z rosiere $ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/include/Register_translation_unit.h" |
---|
| 9 | #include "Behavioural/include/Allocation.h" |
---|
| 10 | |
---|
| 11 | namespace morpheo { |
---|
| 12 | namespace behavioural { |
---|
| 13 | namespace core { |
---|
| 14 | namespace multi_ooo_engine { |
---|
| 15 | namespace ooo_engine { |
---|
| 16 | namespace rename_unit { |
---|
| 17 | namespace register_translation_unit { |
---|
| 18 | |
---|
| 19 | |
---|
| 20 | |
---|
| 21 | #undef FUNCTION |
---|
| 22 | #define FUNCTION "Register_translation_unit::allocation" |
---|
| 23 | void Register_translation_unit::allocation ( |
---|
| 24 | #ifdef STATISTICS |
---|
| 25 | morpheo::behavioural::Parameters_Statistics * param_statistics |
---|
| 26 | #else |
---|
| 27 | void |
---|
| 28 | #endif |
---|
| 29 | ) |
---|
| 30 | { |
---|
| 31 | log_printf(FUNC,Register_translation_unit,FUNCTION,"Begin"); |
---|
| 32 | |
---|
| 33 | _component = new Component (_usage); |
---|
| 34 | |
---|
| 35 | Entity * entity = _component->set_entity (_name |
---|
| 36 | ,"Register_translation_unit" |
---|
| 37 | #ifdef POSITION |
---|
| 38 | ,COMBINATORY |
---|
| 39 | #endif |
---|
| 40 | ); |
---|
| 41 | |
---|
| 42 | _interfaces = entity->set_interfaces(); |
---|
| 43 | |
---|
| 44 | // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 45 | { |
---|
| 46 | Interface * interface = _interfaces->set_interface("" |
---|
| 47 | #ifdef POSITION |
---|
| 48 | ,IN |
---|
| 49 | ,SOUTH, |
---|
| 50 | "Generalist interface" |
---|
| 51 | #endif |
---|
| 52 | ); |
---|
| 53 | |
---|
| 54 | in_CLOCK = interface->set_signal_clk ("clock" ,1, CLOCK_VHDL_YES); |
---|
| 55 | in_NRESET = interface->set_signal_in <Tcontrol_t> ("nreset",1, RESET_VHDL_YES); |
---|
| 56 | } |
---|
| 57 | |
---|
| 58 | // ~~~~~[ Interface "rename" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 59 | { |
---|
| 60 | ALLOC1_INTERFACE("rename", IN, EAST, "Instruction with logical register", _param->_nb_inst_insert); |
---|
| 61 | |
---|
| 62 | ALLOC1_VALACK_IN ( in_RENAME_VAL ,VAL); |
---|
| 63 | ALLOC1_VALACK_OUT(out_RENAME_ACK ,ACK); |
---|
| 64 | ALLOC1_SIGNAL_IN ( in_RENAME_FRONT_END_ID ,"front_end_id" ,Tcontext_t ,_param->_size_front_end_id ); |
---|
| 65 | ALLOC1_SIGNAL_IN ( in_RENAME_CONTEXT_ID ,"context_id" ,Tcontext_t ,_param->_size_context_id ); |
---|
| 66 | ALLOC1_SIGNAL_IN ( in_RENAME_READ_RA ,"read_ra" ,Tcontrol_t ,1 ); |
---|
| 67 | ALLOC1_SIGNAL_IN ( in_RENAME_NUM_REG_RA_LOG,"num_reg_ra_log",Tgeneral_address_t,_param->_size_general_register_logic); |
---|
| 68 | ALLOC1_SIGNAL_IN ( in_RENAME_READ_RB ,"read_rb" ,Tcontrol_t ,1 ); |
---|
| 69 | ALLOC1_SIGNAL_IN ( in_RENAME_NUM_REG_RB_LOG,"num_reg_rb_log",Tgeneral_address_t,_param->_size_general_register_logic); |
---|
| 70 | ALLOC1_SIGNAL_IN ( in_RENAME_READ_RC ,"read_rc" ,Tcontrol_t ,1 ); |
---|
| 71 | ALLOC1_SIGNAL_IN ( in_RENAME_NUM_REG_RC_LOG,"num_reg_rc_log",Tspecial_address_t,_param->_size_special_register_logic); |
---|
| 72 | ALLOC1_SIGNAL_IN ( in_RENAME_WRITE_RD ,"write_rd" ,Tcontrol_t ,1 ); |
---|
| 73 | ALLOC1_SIGNAL_IN ( in_RENAME_NUM_REG_RD_LOG,"num_reg_rd_log",Tgeneral_address_t,_param->_size_general_register_logic); |
---|
| 74 | ALLOC1_SIGNAL_IN ( in_RENAME_WRITE_RE ,"write_re" ,Tcontrol_t ,1 ); |
---|
| 75 | ALLOC1_SIGNAL_IN ( in_RENAME_NUM_REG_RE_LOG,"num_reg_re_log",Tspecial_address_t,_param->_size_special_register_logic); |
---|
| 76 | } |
---|
| 77 | |
---|
| 78 | // ~~~~~[ Interface "insert" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 79 | { |
---|
| 80 | ALLOC1_INTERFACE("insert",OUT,WEST , "Instruction with physical register", _param->_nb_inst_insert); |
---|
| 81 | |
---|
| 82 | ALLOC1_VALACK_OUT(out_INSERT_VAL ,VAL); |
---|
| 83 | ALLOC1_VALACK_IN ( in_INSERT_ACK ,ACK); |
---|
| 84 | ALLOC1_SIGNAL_OUT(out_INSERT_FRONT_END_ID ,"front_end_id" ,Tcontext_t ,_param->_size_front_end_id ); |
---|
| 85 | ALLOC1_SIGNAL_OUT(out_INSERT_CONTEXT_ID ,"context_id" ,Tcontext_t ,_param->_size_context_id ); |
---|
| 86 | ALLOC1_SIGNAL_OUT(out_INSERT_READ_RA ,"read_ra" ,Tcontrol_t ,1 ); |
---|
| 87 | ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RA_LOG ,"num_reg_ra_log" ,Tgeneral_address_t,_param->_size_general_register_logic); |
---|
| 88 | ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RA_PHY ,"num_reg_ra_phy" ,Tgeneral_address_t,_param->_size_general_register ); |
---|
| 89 | ALLOC1_SIGNAL_OUT(out_INSERT_READ_RB ,"read_rb" ,Tcontrol_t ,1 ); |
---|
| 90 | ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RB_LOG ,"num_reg_rb_log" ,Tgeneral_address_t,_param->_size_general_register_logic); |
---|
| 91 | ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RB_PHY ,"num_reg_rb_phy" ,Tgeneral_address_t,_param->_size_general_register ); |
---|
| 92 | ALLOC1_SIGNAL_OUT(out_INSERT_READ_RC ,"read_rc" ,Tcontrol_t ,1 ); |
---|
| 93 | ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RC_LOG ,"num_reg_rc_log" ,Tspecial_address_t,_param->_size_special_register_logic); |
---|
| 94 | ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RC_PHY ,"num_reg_rc_phy" ,Tspecial_address_t,_param->_size_special_register ); |
---|
| 95 | ALLOC1_SIGNAL_OUT(out_INSERT_WRITE_RD ,"write_rd" ,Tcontrol_t ,1 ); |
---|
| 96 | ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RD_LOG ,"num_reg_rd_log" ,Tgeneral_address_t,_param->_size_general_register_logic); |
---|
| 97 | ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RD_PHY_OLD,"num_reg_rd_phy_old",Tgeneral_address_t,_param->_size_general_register ); |
---|
| 98 | ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RD_PHY_NEW,"num_reg_rd_phy_new",Tgeneral_address_t,_param->_size_general_register ); |
---|
| 99 | ALLOC1_SIGNAL_OUT(out_INSERT_WRITE_RE ,"write_re" ,Tcontrol_t ,1 ); |
---|
| 100 | ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RE_LOG ,"num_reg_re_log" ,Tspecial_address_t,_param->_size_special_register_logic); |
---|
| 101 | ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RE_PHY_OLD,"num_reg_re_phy_old",Tspecial_address_t,_param->_size_special_register ); |
---|
| 102 | ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RE_PHY_NEW,"num_reg_re_phy_new",Tspecial_address_t,_param->_size_special_register ); |
---|
| 103 | } |
---|
| 104 | |
---|
| 105 | // ~~~~~[ Interface "retire" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 106 | { |
---|
| 107 | ALLOC1_INTERFACE("retire",IN ,NORTH, "Retire instruction, update renaming structure.", _param->_nb_inst_retire); |
---|
| 108 | ALLOC1_VALACK_IN ( in_RETIRE_VAL ,VAL); |
---|
| 109 | ALLOC1_VALACK_OUT(out_RETIRE_ACK ,ACK); |
---|
| 110 | ALLOC1_SIGNAL_IN ( in_RETIRE_FRONT_END_ID ,"front_end_id" ,Tcontext_t ,_param->_size_front_end_id ); |
---|
| 111 | ALLOC1_SIGNAL_IN ( in_RETIRE_CONTEXT_ID ,"context_id" ,Tcontext_t ,_param->_size_context_id ); |
---|
| 112 | ALLOC1_SIGNAL_IN ( in_RETIRE_EVENT_STATE ,"event_state" ,Tevent_state_t ,_param->_size_event_state ); |
---|
| 113 | ALLOC1_SIGNAL_IN ( in_RETIRE_READ_RA ,"read_ra" ,Tcontrol_t ,1 ); |
---|
| 114 | ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RA_PHY ,"num_reg_ra_phy" ,Tgeneral_address_t,_param->_size_general_register ); |
---|
| 115 | ALLOC1_SIGNAL_IN ( in_RETIRE_READ_RB ,"read_rb" ,Tcontrol_t ,1 ); |
---|
| 116 | ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RB_PHY ,"num_reg_rb_phy" ,Tgeneral_address_t,_param->_size_general_register ); |
---|
| 117 | ALLOC1_SIGNAL_IN ( in_RETIRE_READ_RC ,"read_rc" ,Tcontrol_t ,1 ); |
---|
| 118 | ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RC_PHY ,"num_reg_rc_phy" ,Tspecial_address_t,_param->_size_special_register ); |
---|
| 119 | ALLOC1_SIGNAL_IN ( in_RETIRE_WRITE_RD ,"write_rd" ,Tcontrol_t ,1 ); |
---|
| 120 | ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RD_LOG ,"num_reg_rd_log" ,Tgeneral_address_t,_param->_size_general_register_logic); |
---|
| 121 | ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RD_PHY_OLD,"num_reg_rd_phy_old",Tgeneral_address_t,_param->_size_general_register ); |
---|
| 122 | ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RD_PHY_NEW,"num_reg_rd_phy_new",Tgeneral_address_t,_param->_size_general_register ); |
---|
| 123 | ALLOC1_SIGNAL_IN ( in_RETIRE_WRITE_RE ,"write_re" ,Tcontrol_t ,1 ); |
---|
| 124 | ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RE_LOG ,"num_reg_re_log" ,Tspecial_address_t,_param->_size_special_register_logic); |
---|
| 125 | ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RE_PHY_OLD,"num_reg_re_phy_old",Tspecial_address_t,_param->_size_special_register ); |
---|
| 126 | ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RE_PHY_NEW,"num_reg_re_phy_new",Tspecial_address_t,_param->_size_special_register ); |
---|
| 127 | } |
---|
| 128 | // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 129 | std::string name; |
---|
| 130 | { |
---|
| 131 | name = _name+"_dependency_checking_unit"; |
---|
| 132 | std::cout << "Create : " << name << std::endl; |
---|
| 133 | |
---|
| 134 | _component_dependency_checking_unit = new morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::dependency_checking_unit::Dependency_checking_unit |
---|
| 135 | (name.c_str() |
---|
| 136 | #ifdef STATISTICS |
---|
| 137 | ,param_statistics |
---|
| 138 | #endif |
---|
[82] | 139 | ,_param->_param_dependency_checking_unit |
---|
| 140 | ,_usage); |
---|
[78] | 141 | |
---|
| 142 | _component->set_component (_component_dependency_checking_unit->_component |
---|
| 143 | #ifdef POSITION |
---|
| 144 | , 50, 50, 10, 10 |
---|
| 145 | #endif |
---|
| 146 | ); |
---|
| 147 | } |
---|
| 148 | |
---|
| 149 | { |
---|
| 150 | name = _name+"_free_list_unit"; |
---|
| 151 | std::cout << "Create : " << name << std::endl; |
---|
| 152 | |
---|
| 153 | _component_free_list_unit = new morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::free_list_unit::Free_List_unit |
---|
| 154 | (name.c_str() |
---|
| 155 | #ifdef STATISTICS |
---|
| 156 | ,param_statistics |
---|
| 157 | #endif |
---|
[82] | 158 | ,_param->_param_free_list_unit |
---|
| 159 | ,_usage); |
---|
[78] | 160 | |
---|
| 161 | _component->set_component (_component_free_list_unit->_component |
---|
| 162 | #ifdef POSITION |
---|
| 163 | , 50, 50, 10, 10 |
---|
| 164 | #endif |
---|
| 165 | ); |
---|
| 166 | } |
---|
| 167 | |
---|
| 168 | { |
---|
| 169 | name = _name+"_register_address_translation_unit"; |
---|
| 170 | std::cout << "Create : " << name << std::endl; |
---|
| 171 | |
---|
| 172 | _component_register_address_translation_unit = new morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::register_address_translation_unit::Register_Address_Translation_unit |
---|
| 173 | (name.c_str() |
---|
| 174 | #ifdef STATISTICS |
---|
| 175 | ,param_statistics |
---|
| 176 | #endif |
---|
[82] | 177 | ,_param->_param_register_address_translation_unit |
---|
| 178 | ,_usage); |
---|
[78] | 179 | |
---|
| 180 | _component->set_component (_component_register_address_translation_unit->_component |
---|
| 181 | #ifdef POSITION |
---|
| 182 | , 50, 50, 10, 10 |
---|
| 183 | #endif |
---|
| 184 | ); |
---|
| 185 | } |
---|
| 186 | |
---|
| 187 | { |
---|
| 188 | name = _name+"_stat_list_unit"; |
---|
| 189 | std::cout << "Create : " << name << std::endl; |
---|
| 190 | |
---|
| 191 | _component_stat_list_unit = new morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::stat_list_unit::Stat_List_unit |
---|
| 192 | (name.c_str() |
---|
| 193 | #ifdef STATISTICS |
---|
| 194 | ,param_statistics |
---|
| 195 | #endif |
---|
[82] | 196 | ,_param->_param_stat_list_unit |
---|
| 197 | ,_usage); |
---|
[78] | 198 | |
---|
| 199 | _component->set_component (_component_stat_list_unit->_component |
---|
| 200 | #ifdef POSITION |
---|
| 201 | , 50, 50, 10, 10 |
---|
| 202 | #endif |
---|
| 203 | ); |
---|
| 204 | } |
---|
| 205 | |
---|
| 206 | { |
---|
| 207 | name = _name+"_register_translation_unit_glue"; |
---|
| 208 | std::cout << "Create : " << name << std::endl; |
---|
| 209 | |
---|
| 210 | _component_register_translation_unit_glue = new morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::register_translation_unit_glue::Register_translation_unit_Glue |
---|
| 211 | (name.c_str() |
---|
| 212 | #ifdef STATISTICS |
---|
| 213 | ,param_statistics |
---|
| 214 | #endif |
---|
[82] | 215 | ,_param->_param_register_translation_unit_glue |
---|
| 216 | ,_usage); |
---|
[78] | 217 | |
---|
| 218 | _component->set_component (_component_register_translation_unit_glue->_component |
---|
| 219 | #ifdef POSITION |
---|
| 220 | , 50, 50, 10, 10 |
---|
| 221 | #endif |
---|
| 222 | ); |
---|
| 223 | } |
---|
| 224 | |
---|
| 225 | // ~~~~~[ Instanciation ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 226 | std::string src,dest; |
---|
| 227 | |
---|
| 228 | // =================================================================== |
---|
| 229 | // =====[ dependency_checking_unit ]================================== |
---|
| 230 | // =================================================================== |
---|
| 231 | { |
---|
| 232 | src = _name+"_dependency_checking_unit"; |
---|
| 233 | std::cout << "Instance : " << src << std::endl; |
---|
| 234 | |
---|
| 235 | { |
---|
| 236 | dest = _name; |
---|
| 237 | #ifdef POSITION |
---|
| 238 | _component->interface_map (src ,"", |
---|
| 239 | dest,""); |
---|
| 240 | #endif |
---|
| 241 | PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
| 242 | PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); |
---|
| 243 | } |
---|
| 244 | |
---|
| 245 | // ~~~~~[ Interface "rename_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 246 | for (uint32_t i=0; i<_param->_nb_inst_insert; i++) |
---|
| 247 | { |
---|
| 248 | dest = _name; |
---|
| 249 | #ifdef POSITION |
---|
| 250 | _component->interface_map (src ,"rename_in_"+toString(i) |
---|
| 251 | dest,"rename_"+toString(i)); |
---|
| 252 | #endif |
---|
| 253 | |
---|
| 254 | // PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_VAL" ,dest,); |
---|
| 255 | // PORT_MAP(_component,src ,"out_RENAME_IN_"+toString(i)+"_ACK" ,dest,); |
---|
| 256 | if (_param->_have_port_front_end_id) |
---|
| 257 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_FRONT_END_ID" , |
---|
| 258 | dest, "in_RENAME_"+toString(i)+"_FRONT_END_ID" ); |
---|
| 259 | if (_param->_have_port_context_id) |
---|
| 260 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_CONTEXT_ID" , |
---|
| 261 | dest, "in_RENAME_"+toString(i)+"_CONTEXT_ID" ); |
---|
| 262 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_READ_RA" , |
---|
| 263 | dest, "in_RENAME_"+toString(i)+"_READ_RA" ); |
---|
| 264 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_NUM_REG_RA_LOG" , |
---|
| 265 | dest, "in_RENAME_"+toString(i)+"_NUM_REG_RA_LOG" ); |
---|
| 266 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_READ_RB" , |
---|
| 267 | dest, "in_RENAME_"+toString(i)+"_READ_RB" ); |
---|
| 268 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_NUM_REG_RB_LOG" , |
---|
| 269 | dest, "in_RENAME_"+toString(i)+"_NUM_REG_RB_LOG" ); |
---|
| 270 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_READ_RC" , |
---|
| 271 | dest, "in_RENAME_"+toString(i)+"_READ_RC" ); |
---|
| 272 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_NUM_REG_RC_LOG" , |
---|
| 273 | dest, "in_RENAME_"+toString(i)+"_NUM_REG_RC_LOG" ); |
---|
| 274 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_WRITE_RD" , |
---|
| 275 | dest, "in_RENAME_"+toString(i)+"_WRITE_RD" ); |
---|
| 276 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_NUM_REG_RD_LOG" , |
---|
| 277 | dest, "in_RENAME_"+toString(i)+"_NUM_REG_RD_LOG" ); |
---|
| 278 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_WRITE_RE" , |
---|
| 279 | dest, "in_RENAME_"+toString(i)+"_WRITE_RE" ); |
---|
| 280 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_NUM_REG_RE_LOG" , |
---|
| 281 | dest, "in_RENAME_"+toString(i)+"_NUM_REG_RE_LOG" ); |
---|
| 282 | |
---|
| 283 | dest = _name+"_register_address_translation_unit"; |
---|
| 284 | |
---|
| 285 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_NUM_REG_RA_PHY" , |
---|
| 286 | dest,"out_RENAME_"+toString(i)+"_NUM_REG_RA_PHY" ); |
---|
| 287 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_NUM_REG_RB_PHY" , |
---|
| 288 | dest,"out_RENAME_"+toString(i)+"_NUM_REG_RB_PHY" ); |
---|
| 289 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_NUM_REG_RC_PHY" , |
---|
| 290 | dest,"out_RENAME_"+toString(i)+"_NUM_REG_RC_PHY" ); |
---|
| 291 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_NUM_REG_RD_PHY_OLD", |
---|
| 292 | dest,"out_RENAME_"+toString(i)+"_NUM_REG_RD_PHY_OLD"); |
---|
| 293 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_NUM_REG_RE_PHY_OLD", |
---|
| 294 | dest,"out_RENAME_"+toString(i)+"_NUM_REG_RE_PHY_OLD"); |
---|
| 295 | |
---|
| 296 | dest = _name+"_free_list_unit"; |
---|
| 297 | |
---|
| 298 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_NUM_REG_RD_PHY_NEW", |
---|
| 299 | dest,"out_POP_"+toString(i)+"_GPR_NUM_REG"); |
---|
| 300 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_NUM_REG_RE_PHY_NEW", |
---|
| 301 | dest,"out_POP_"+toString(i)+"_SPR_NUM_REG"); |
---|
| 302 | } |
---|
| 303 | |
---|
| 304 | // ~~~~~[ Interface "rename_out" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 305 | for (uint32_t i=0; i<_param->_nb_inst_insert; i++) |
---|
| 306 | { |
---|
| 307 | dest = _name; |
---|
| 308 | #ifdef POSITION |
---|
| 309 | _component->interface_map (src ,"rename_out_"+toString(i), |
---|
| 310 | dest,"insert_"+toString(i)); |
---|
| 311 | #endif |
---|
| 312 | |
---|
| 313 | // PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_VAL" , |
---|
| 314 | // dest,"out_INSERT_"+toString(i)+"_VAL" ); |
---|
| 315 | // PORT_MAP(_component,src , "in_RENAME_OUT_"+toString(i)+"_ACK" , |
---|
| 316 | // dest, "in_INSERT_"+toString(i)+"_ACK" ); |
---|
| 317 | if (_param->_have_port_front_end_id) |
---|
| 318 | PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_FRONT_END_ID" , |
---|
| 319 | dest,"out_INSERT_"+toString(i)+"_FRONT_END_ID" ); |
---|
| 320 | if (_param->_have_port_context_id) |
---|
| 321 | PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_CONTEXT_ID" , |
---|
| 322 | dest,"out_INSERT_"+toString(i)+"_CONTEXT_ID" ); |
---|
| 323 | PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_READ_RA" , |
---|
| 324 | dest,"out_INSERT_"+toString(i)+"_READ_RA" ); |
---|
| 325 | PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RA_LOG" , |
---|
| 326 | dest,"out_INSERT_"+toString(i)+"_NUM_REG_RA_LOG" ); |
---|
| 327 | PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RA_PHY" , |
---|
| 328 | dest,"out_INSERT_"+toString(i)+"_NUM_REG_RA_PHY" ); |
---|
| 329 | PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_READ_RB" , |
---|
| 330 | dest,"out_INSERT_"+toString(i)+"_READ_RB" ); |
---|
| 331 | PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RB_LOG" , |
---|
| 332 | dest,"out_INSERT_"+toString(i)+"_NUM_REG_RB_LOG" ); |
---|
| 333 | PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RB_PHY" , |
---|
| 334 | dest,"out_INSERT_"+toString(i)+"_NUM_REG_RB_PHY" ); |
---|
| 335 | PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_READ_RC" , |
---|
| 336 | dest,"out_INSERT_"+toString(i)+"_READ_RC" ); |
---|
| 337 | PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RC_LOG" , |
---|
| 338 | dest,"out_INSERT_"+toString(i)+"_NUM_REG_RC_LOG" ); |
---|
| 339 | PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RC_PHY" , |
---|
| 340 | dest,"out_INSERT_"+toString(i)+"_NUM_REG_RC_PHY" ); |
---|
| 341 | PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_WRITE_RD" , |
---|
| 342 | dest,"out_INSERT_"+toString(i)+"_WRITE_RD" ); |
---|
| 343 | PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RD_LOG" , |
---|
| 344 | dest,"out_INSERT_"+toString(i)+"_NUM_REG_RD_LOG" ); |
---|
| 345 | PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RD_PHY_OLD", |
---|
| 346 | dest,"out_INSERT_"+toString(i)+"_NUM_REG_RD_PHY_OLD"); |
---|
| 347 | PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RD_PHY_NEW", |
---|
| 348 | dest,"out_INSERT_"+toString(i)+"_NUM_REG_RD_PHY_NEW"); |
---|
| 349 | PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_WRITE_RE" , |
---|
| 350 | dest,"out_INSERT_"+toString(i)+"_WRITE_RE" ); |
---|
| 351 | PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RE_LOG" , |
---|
| 352 | dest,"out_INSERT_"+toString(i)+"_NUM_REG_RE_LOG" ); |
---|
| 353 | PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RE_PHY_OLD", |
---|
| 354 | dest,"out_INSERT_"+toString(i)+"_NUM_REG_RE_PHY_OLD"); |
---|
| 355 | PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RE_PHY_NEW", |
---|
| 356 | dest,"out_INSERT_"+toString(i)+"_NUM_REG_RE_PHY_NEW"); |
---|
| 357 | } |
---|
| 358 | } |
---|
| 359 | |
---|
| 360 | // =================================================================== |
---|
| 361 | // =====[ free_list_unit ]============================================ |
---|
| 362 | // =================================================================== |
---|
| 363 | { |
---|
| 364 | src = _name+"_free_list_unit"; |
---|
| 365 | std::cout << "Instance : " << src << std::endl; |
---|
| 366 | |
---|
| 367 | { |
---|
| 368 | dest = _name; |
---|
| 369 | #ifdef POSITION |
---|
| 370 | _component->interface_map (src ,"", |
---|
| 371 | dest,""); |
---|
| 372 | #endif |
---|
| 373 | PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
| 374 | PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); |
---|
| 375 | } |
---|
| 376 | |
---|
| 377 | // ~~~~~[ interface : "pop" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 378 | for (uint32_t i=0; i<_param->_nb_inst_insert; i++) |
---|
| 379 | { |
---|
| 380 | dest = _name; |
---|
| 381 | #ifdef POSITION |
---|
| 382 | _component->interface_map (src ,"pop_"+toString(i) |
---|
| 383 | dest,"rename_"+toString(i)); |
---|
| 384 | #endif |
---|
| 385 | |
---|
| 386 | PORT_MAP(_component,src , "in_POP_"+toString(i)+"_GPR_VAL" , |
---|
| 387 | dest,"in_RENAME_"+toString(i)+"_WRITE_RD"); |
---|
| 388 | PORT_MAP(_component,src , "in_POP_"+toString(i)+"_SPR_VAL" , |
---|
| 389 | dest,"in_RENAME_"+toString(i)+"_WRITE_RE"); |
---|
| 390 | |
---|
| 391 | dest = _name+"_register_translation_unit_glue"; |
---|
| 392 | PORT_MAP(_component,src , "in_POP_"+toString(i)+"_VAL" , |
---|
| 393 | dest,"out_INSERT_"+toString(i)+"_FREE_LIST_VAL" ); |
---|
| 394 | PORT_MAP(_component,src ,"out_POP_"+toString(i)+"_ACK" , |
---|
| 395 | dest, "in_INSERT_"+toString(i)+"_FREE_LIST_ACK" ); |
---|
| 396 | |
---|
| 397 | dest = _name+"_dependency_checking_unit"; |
---|
| 398 | |
---|
| 399 | PORT_MAP(_component,src ,"out_POP_"+toString(i)+"_GPR_NUM_REG", |
---|
| 400 | dest, "in_RENAME_IN_"+toString(i)+"_NUM_REG_RD_PHY_NEW"); |
---|
| 401 | PORT_MAP(_component,src ,"out_POP_"+toString(i)+"_SPR_NUM_REG", |
---|
| 402 | dest, "in_RENAME_IN_"+toString(i)+"_NUM_REG_RE_PHY_NEW"); |
---|
| 403 | } |
---|
| 404 | // ~~~~~[ interface : "push_gpr" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 405 | // ~~~~~[ interface : "push_spr" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 406 | for (uint32_t i=0; i<_param->_nb_reg_free; i++) |
---|
| 407 | { |
---|
| 408 | dest = _name+"_stat_list_unit"; |
---|
| 409 | #ifdef POSITION |
---|
| 410 | _component->interface_map (src ,"push_gpr_"+toString(i) |
---|
| 411 | dest,"push_gpr_"+toString(i)); |
---|
| 412 | #endif |
---|
| 413 | |
---|
| 414 | PORT_MAP(_component,src , "in_PUSH_GPR_"+toString(i)+"_VAL" , |
---|
| 415 | dest,"out_PUSH_GPR_"+toString(i)+"_VAL" ); |
---|
| 416 | PORT_MAP(_component,src ,"out_PUSH_GPR_"+toString(i)+"_ACK" , |
---|
| 417 | dest, "in_PUSH_GPR_"+toString(i)+"_ACK" ); |
---|
| 418 | PORT_MAP(_component,src , "in_PUSH_GPR_"+toString(i)+"_NUM_REG", |
---|
| 419 | dest,"out_PUSH_GPR_"+toString(i)+"_NUM_REG"); |
---|
| 420 | |
---|
| 421 | #ifdef POSITION |
---|
| 422 | _component->interface_map (src ,"push_spr_"+toString(i) |
---|
| 423 | dest,"push_spr_"+toString(i)); |
---|
| 424 | #endif |
---|
| 425 | |
---|
| 426 | PORT_MAP(_component,src , "in_PUSH_SPR_"+toString(i)+"_VAL" , |
---|
| 427 | dest,"out_PUSH_SPR_"+toString(i)+"_VAL" ); |
---|
| 428 | PORT_MAP(_component,src ,"out_PUSH_SPR_"+toString(i)+"_ACK" , |
---|
| 429 | dest, "in_PUSH_SPR_"+toString(i)+"_ACK" ); |
---|
| 430 | PORT_MAP(_component,src , "in_PUSH_SPR_"+toString(i)+"_NUM_REG", |
---|
| 431 | dest,"out_PUSH_SPR_"+toString(i)+"_NUM_REG"); |
---|
| 432 | } |
---|
| 433 | } |
---|
| 434 | |
---|
| 435 | // =================================================================== |
---|
| 436 | // =====[ register_address_translation_unit ]========================= |
---|
| 437 | // =================================================================== |
---|
| 438 | { |
---|
| 439 | src = _name+"_register_address_translation_unit"; |
---|
| 440 | std::cout << "Instance : " << src << std::endl; |
---|
| 441 | |
---|
| 442 | { |
---|
| 443 | dest = _name; |
---|
| 444 | #ifdef POSITION |
---|
| 445 | _component->interface_map (src ,"", |
---|
| 446 | dest,""); |
---|
| 447 | #endif |
---|
| 448 | PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
| 449 | PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); |
---|
| 450 | } |
---|
| 451 | |
---|
| 452 | // ~~~~~[ Interface "rename" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 453 | for (uint32_t i=0; i<_param->_nb_inst_insert; i++) |
---|
| 454 | { |
---|
| 455 | dest = _name; |
---|
| 456 | #ifdef POSITION |
---|
| 457 | _component->interface_map (src ,"rename_"+toString(i) |
---|
| 458 | dest,"rename_"+toString(i)); |
---|
| 459 | #endif |
---|
| 460 | |
---|
| 461 | PORT_MAP(_component,src , "in_RENAME_"+toString(i)+"_VAL" , |
---|
| 462 | dest, "in_RENAME_"+toString(i)+"_VAL" ); |
---|
| 463 | if (_param->_have_port_front_end_id) |
---|
| 464 | PORT_MAP(_component,src , "in_RENAME_"+toString(i)+"_FRONT_END_ID" , |
---|
| 465 | dest, "in_RENAME_"+toString(i)+"_FRONT_END_ID" ); |
---|
| 466 | if (_param->_have_port_context_id) |
---|
| 467 | PORT_MAP(_component,src , "in_RENAME_"+toString(i)+"_CONTEXT_ID" , |
---|
| 468 | dest, "in_RENAME_"+toString(i)+"_CONTEXT_ID" ); |
---|
| 469 | PORT_MAP(_component,src , "in_RENAME_"+toString(i)+"_NUM_REG_RA_LOG" , |
---|
| 470 | dest, "in_RENAME_"+toString(i)+"_NUM_REG_RA_LOG" ); |
---|
| 471 | PORT_MAP(_component,src , "in_RENAME_"+toString(i)+"_NUM_REG_RB_LOG" , |
---|
| 472 | dest, "in_RENAME_"+toString(i)+"_NUM_REG_RB_LOG" ); |
---|
| 473 | PORT_MAP(_component,src , "in_RENAME_"+toString(i)+"_NUM_REG_RC_LOG" , |
---|
| 474 | dest, "in_RENAME_"+toString(i)+"_NUM_REG_RC_LOG" ); |
---|
| 475 | PORT_MAP(_component,src , "in_RENAME_"+toString(i)+"_NUM_REG_RD_LOG" , |
---|
| 476 | dest, "in_RENAME_"+toString(i)+"_NUM_REG_RD_LOG" ); |
---|
| 477 | PORT_MAP(_component,src , "in_RENAME_"+toString(i)+"_NUM_REG_RE_LOG" , |
---|
| 478 | dest, "in_RENAME_"+toString(i)+"_NUM_REG_RE_LOG" ); |
---|
| 479 | |
---|
| 480 | dest = _name+"_register_translation_unit_glue"; |
---|
| 481 | PORT_MAP(_component,src ,"out_RENAME_"+toString(i)+"_ACK", |
---|
| 482 | dest, "in_INSERT_"+toString(i)+"_RAT_RENAME_ACK"); |
---|
| 483 | |
---|
| 484 | dest = _name+"_dependency_checking_unit"; |
---|
| 485 | PORT_MAP(_component,src ,"out_RENAME_"+toString(i)+"_NUM_REG_RA_PHY" , |
---|
| 486 | dest, "in_RENAME_IN_"+toString(i)+"_NUM_REG_RA_PHY" ); |
---|
| 487 | PORT_MAP(_component,src ,"out_RENAME_"+toString(i)+"_NUM_REG_RB_PHY" , |
---|
| 488 | dest, "in_RENAME_IN_"+toString(i)+"_NUM_REG_RB_PHY" ); |
---|
| 489 | PORT_MAP(_component,src ,"out_RENAME_"+toString(i)+"_NUM_REG_RC_PHY" , |
---|
| 490 | dest, "in_RENAME_IN_"+toString(i)+"_NUM_REG_RC_PHY" ); |
---|
| 491 | PORT_MAP(_component,src ,"out_RENAME_"+toString(i)+"_NUM_REG_RD_PHY_OLD", |
---|
| 492 | dest, "in_RENAME_IN_"+toString(i)+"_NUM_REG_RD_PHY_OLD"); |
---|
| 493 | PORT_MAP(_component,src ,"out_RENAME_"+toString(i)+"_NUM_REG_RE_PHY_OLD", |
---|
| 494 | dest, "in_RENAME_IN_"+toString(i)+"_NUM_REG_RE_PHY_OLD"); |
---|
| 495 | } |
---|
| 496 | |
---|
| 497 | // ~~~~~[ Interface "insert" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 498 | for (uint32_t i=0; i<_param->_nb_inst_insert; i++) |
---|
| 499 | { |
---|
| 500 | dest = _name+"_dependency_checking_unit"; |
---|
| 501 | #ifdef POSITION |
---|
| 502 | _component->interface_map (src ,"rename_"+toString(i) |
---|
| 503 | dest,"rename_in_"+toString(i)); |
---|
| 504 | #endif |
---|
| 505 | |
---|
| 506 | PORT_MAP(_component,src , "in_INSERT_"+toString(i)+"_WRITE_RD" , |
---|
| 507 | dest,"out_RENAME_OUT_"+toString(i)+"_WRITE_RD" ); |
---|
| 508 | PORT_MAP(_component,src , "in_INSERT_"+toString(i)+"_WRITE_RE" , |
---|
| 509 | dest,"out_RENAME_OUT_"+toString(i)+"_WRITE_RE" ); |
---|
| 510 | PORT_MAP(_component,src , "in_INSERT_"+toString(i)+"_NUM_REG_RD_LOG", |
---|
| 511 | dest,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RD_LOG"); |
---|
| 512 | PORT_MAP(_component,src , "in_INSERT_"+toString(i)+"_NUM_REG_RE_LOG", |
---|
| 513 | dest,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RE_LOG"); |
---|
| 514 | PORT_MAP(_component,src , "in_INSERT_"+toString(i)+"_NUM_REG_RD_PHY", |
---|
| 515 | dest,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RD_PHY_OLD"); |
---|
| 516 | PORT_MAP(_component,src , "in_INSERT_"+toString(i)+"_NUM_REG_RE_PHY", |
---|
| 517 | dest,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RE_PHY_OLD"); |
---|
| 518 | |
---|
| 519 | dest = _name+"_register_translation_unit_glue"; |
---|
| 520 | PORT_MAP(_component,src , "in_INSERT_"+toString(i)+"_VAL", |
---|
| 521 | dest,"out_INSERT_"+toString(i)+"_RAT_INSERT_VAL"); |
---|
| 522 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_ACK", |
---|
| 523 | dest, "in_INSERT_"+toString(i)+"_RAT_INSERT_ACK"); |
---|
| 524 | } |
---|
| 525 | |
---|
| 526 | // ~~~~~[ Interface "retire" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 527 | for (uint32_t i=0; i<_param->_nb_inst_retire; i++) |
---|
| 528 | { |
---|
| 529 | dest = _name; |
---|
| 530 | #ifdef POSITION |
---|
| 531 | _component->interface_map (src ,"retire_"+toString(i) |
---|
| 532 | dest,"retire_"+toString(i)); |
---|
| 533 | #endif |
---|
| 534 | |
---|
| 535 | if (_param->_have_port_front_end_id) |
---|
| 536 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_FRONT_END_ID" , |
---|
| 537 | dest, "in_RETIRE_"+toString(i)+"_FRONT_END_ID" ); |
---|
| 538 | if (_param->_have_port_context_id) |
---|
| 539 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_CONTEXT_ID" , |
---|
| 540 | dest, "in_RETIRE_"+toString(i)+"_CONTEXT_ID" ); |
---|
| 541 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_EVENT_STATE" , |
---|
| 542 | dest, "in_RETIRE_"+toString(i)+"_EVENT_STATE" ); |
---|
| 543 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_WRITE_RD" , |
---|
| 544 | dest, "in_RETIRE_"+toString(i)+"_WRITE_RD" ); |
---|
| 545 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_WRITE_RE" , |
---|
| 546 | dest, "in_RETIRE_"+toString(i)+"_WRITE_RE" ); |
---|
| 547 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_NUM_REG_RD_LOG" , |
---|
| 548 | dest, "in_RETIRE_"+toString(i)+"_NUM_REG_RD_LOG" ); |
---|
| 549 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_NUM_REG_RE_LOG" , |
---|
| 550 | dest, "in_RETIRE_"+toString(i)+"_NUM_REG_RE_LOG" ); |
---|
| 551 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_NUM_REG_RD_PHY_OLD", |
---|
| 552 | dest, "in_RETIRE_"+toString(i)+"_NUM_REG_RD_PHY_OLD"); |
---|
| 553 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_NUM_REG_RE_PHY_OLD", |
---|
| 554 | dest, "in_RETIRE_"+toString(i)+"_NUM_REG_RE_PHY_OLD"); |
---|
| 555 | |
---|
| 556 | dest = _name+"_register_translation_unit_glue"; |
---|
| 557 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_VAL" , |
---|
| 558 | dest,"out_RETIRE_"+toString(i)+"_RAT_VAL" ); |
---|
| 559 | PORT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_ACK" , |
---|
| 560 | dest, "in_RETIRE_"+toString(i)+"_RAT_ACK" ); |
---|
| 561 | } |
---|
| 562 | } |
---|
| 563 | |
---|
| 564 | // =================================================================== |
---|
| 565 | // =====[ stat_list_unit ]============================================ |
---|
| 566 | // =================================================================== |
---|
| 567 | { |
---|
| 568 | src = _name+"_stat_list_unit"; |
---|
| 569 | std::cout << "Instance : " << src << std::endl; |
---|
| 570 | |
---|
| 571 | { |
---|
| 572 | dest = _name; |
---|
| 573 | #ifdef POSITION |
---|
| 574 | _component->interface_map (src ,"", |
---|
| 575 | dest,""); |
---|
| 576 | #endif |
---|
| 577 | PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
| 578 | PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); |
---|
| 579 | } |
---|
| 580 | |
---|
| 581 | // ~~~~~[ Interface "insert" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 582 | for (uint32_t i=0; i<_param->_nb_inst_insert; i++) |
---|
| 583 | { |
---|
| 584 | dest = _name+"_dependency_checking_unit"; |
---|
| 585 | #ifdef POSITION |
---|
| 586 | _component->interface_map (src ,"insert_"+toString(i) |
---|
| 587 | dest,"rename_out_"+toString(i)); |
---|
| 588 | #endif |
---|
| 589 | |
---|
| 590 | PORT_MAP(_component,src , "in_INSERT_"+toString(i)+"_READ_RA" , |
---|
| 591 | dest,"out_RENAME_OUT_"+toString(i)+"_READ_RA" ); |
---|
| 592 | PORT_MAP(_component,src , "in_INSERT_"+toString(i)+"_NUM_REG_RA_PHY" , |
---|
| 593 | dest,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RA_PHY" ); |
---|
| 594 | PORT_MAP(_component,src , "in_INSERT_"+toString(i)+"_READ_RB" , |
---|
| 595 | dest,"out_RENAME_OUT_"+toString(i)+"_READ_RB" ); |
---|
| 596 | PORT_MAP(_component,src , "in_INSERT_"+toString(i)+"_NUM_REG_RB_PHY" , |
---|
| 597 | dest,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RB_PHY" ); |
---|
| 598 | PORT_MAP(_component,src , "in_INSERT_"+toString(i)+"_READ_RC" , |
---|
| 599 | dest,"out_RENAME_OUT_"+toString(i)+"_READ_RC" ); |
---|
| 600 | PORT_MAP(_component,src , "in_INSERT_"+toString(i)+"_NUM_REG_RC_PHY" , |
---|
| 601 | dest,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RC_PHY" ); |
---|
| 602 | PORT_MAP(_component,src , "in_INSERT_"+toString(i)+"_WRITE_RD" , |
---|
| 603 | dest,"out_RENAME_OUT_"+toString(i)+"_WRITE_RD" ); |
---|
| 604 | PORT_MAP(_component,src , "in_INSERT_"+toString(i)+"_NUM_REG_RD_PHY_NEW", |
---|
| 605 | dest,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RD_PHY_NEW"); |
---|
| 606 | PORT_MAP(_component,src , "in_INSERT_"+toString(i)+"_WRITE_RE" , |
---|
| 607 | dest,"out_RENAME_OUT_"+toString(i)+"_WRITE_RE" ); |
---|
| 608 | PORT_MAP(_component,src , "in_INSERT_"+toString(i)+"_NUM_REG_RE_PHY_NEW", |
---|
| 609 | dest,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RE_PHY_NEW"); |
---|
| 610 | |
---|
| 611 | dest = _name+"_register_translation_unit_glue"; |
---|
| 612 | PORT_MAP(_component,src , "in_INSERT_"+toString(i)+"_VAL" , |
---|
| 613 | dest,"out_INSERT_"+toString(i)+"_STAT_LIST_VAL"); |
---|
| 614 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_ACK" , |
---|
| 615 | dest, "in_INSERT_"+toString(i)+"_STAT_LIST_ACK" ); |
---|
| 616 | } |
---|
| 617 | |
---|
| 618 | // ~~~~~[ Interface "retire" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 619 | for (uint32_t i=0; i<_param->_nb_inst_retire; i++) |
---|
| 620 | { |
---|
| 621 | dest = _name; |
---|
| 622 | #ifdef POSITION |
---|
| 623 | _component->interface_map (src ,"retire_"+toString(i) |
---|
| 624 | dest,"retire_"+toString(i)); |
---|
| 625 | #endif |
---|
| 626 | |
---|
| 627 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_READ_RA" , |
---|
| 628 | dest, "in_RETIRE_"+toString(i)+"_READ_RA" ); |
---|
| 629 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_NUM_REG_RA_PHY" , |
---|
| 630 | dest, "in_RETIRE_"+toString(i)+"_NUM_REG_RA_PHY" ); |
---|
| 631 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_READ_RB" , |
---|
| 632 | dest, "in_RETIRE_"+toString(i)+"_READ_RB" ); |
---|
| 633 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_NUM_REG_RB_PHY" , |
---|
| 634 | dest, "in_RETIRE_"+toString(i)+"_NUM_REG_RB_PHY" ); |
---|
| 635 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_READ_RC" , |
---|
| 636 | dest, "in_RETIRE_"+toString(i)+"_READ_RC" ); |
---|
| 637 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_NUM_REG_RC_PHY" , |
---|
| 638 | dest, "in_RETIRE_"+toString(i)+"_NUM_REG_RC_PHY" ); |
---|
| 639 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_WRITE_RD" , |
---|
| 640 | dest, "in_RETIRE_"+toString(i)+"_WRITE_RD" ); |
---|
| 641 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_NUM_REG_RD_PHY_OLD", |
---|
| 642 | dest, "in_RETIRE_"+toString(i)+"_NUM_REG_RD_PHY_OLD"); |
---|
| 643 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_NUM_REG_RD_PHY_NEW", |
---|
| 644 | dest, "in_RETIRE_"+toString(i)+"_NUM_REG_RD_PHY_NEW"); |
---|
| 645 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_WRITE_RE" , |
---|
| 646 | dest, "in_RETIRE_"+toString(i)+"_WRITE_RE" ); |
---|
| 647 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_NUM_REG_RE_PHY_OLD", |
---|
| 648 | dest, "in_RETIRE_"+toString(i)+"_NUM_REG_RE_PHY_OLD"); |
---|
| 649 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_NUM_REG_RE_PHY_NEW", |
---|
| 650 | dest, "in_RETIRE_"+toString(i)+"_NUM_REG_RE_PHY_NEW"); |
---|
| 651 | |
---|
| 652 | dest = _name+"_register_translation_unit_glue"; |
---|
| 653 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_VAL", |
---|
| 654 | dest,"out_RETIRE_"+toString(i)+"_STAT_LIST_VAL"); |
---|
| 655 | PORT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_ACK", |
---|
| 656 | dest, "in_RETIRE_"+toString(i)+"_STAT_LIST_ACK"); |
---|
| 657 | } |
---|
| 658 | |
---|
| 659 | // ~~~~~[ interface : "push_gpr" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 660 | // ~~~~~[ interface : "push_spr" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 661 | for (uint32_t i=0; i<_param->_nb_reg_free; i++) |
---|
| 662 | { |
---|
| 663 | dest = _name+"_free_list_unit"; |
---|
| 664 | #ifdef POSITION |
---|
| 665 | _component->interface_map (src ,"push_gpr_"+toString(i) |
---|
| 666 | dest,"push_gpr_"+toString(i)); |
---|
| 667 | #endif |
---|
| 668 | |
---|
| 669 | PORT_MAP(_component,src ,"out_PUSH_GPR_"+toString(i)+"_VAL" , |
---|
| 670 | dest, "in_PUSH_GPR_"+toString(i)+"_VAL" ); |
---|
| 671 | PORT_MAP(_component,src , "in_PUSH_GPR_"+toString(i)+"_ACK" , |
---|
| 672 | dest,"out_PUSH_GPR_"+toString(i)+"_ACK" ); |
---|
| 673 | PORT_MAP(_component,src ,"out_PUSH_GPR_"+toString(i)+"_NUM_REG", |
---|
| 674 | dest, "in_PUSH_GPR_"+toString(i)+"_NUM_REG"); |
---|
| 675 | |
---|
| 676 | #ifdef POSITION |
---|
| 677 | _component->interface_map (src ,"push_spr_"+toString(i) |
---|
| 678 | dest,"push_spr_"+toString(i)); |
---|
| 679 | #endif |
---|
| 680 | |
---|
| 681 | PORT_MAP(_component,src ,"out_PUSH_SPR_"+toString(i)+"_VAL" , |
---|
| 682 | dest, "in_PUSH_SPR_"+toString(i)+"_VAL" ); |
---|
| 683 | PORT_MAP(_component,src , "in_PUSH_SPR_"+toString(i)+"_ACK" , |
---|
| 684 | dest,"out_PUSH_SPR_"+toString(i)+"_ACK" ); |
---|
| 685 | PORT_MAP(_component,src ,"out_PUSH_SPR_"+toString(i)+"_NUM_REG", |
---|
| 686 | dest, "in_PUSH_SPR_"+toString(i)+"_NUM_REG"); |
---|
| 687 | } |
---|
| 688 | } |
---|
| 689 | |
---|
| 690 | // =================================================================== |
---|
| 691 | // =====[ register_translation_unit_glue ]============================ |
---|
| 692 | // =================================================================== |
---|
| 693 | { |
---|
| 694 | src = _name+"_register_translation_unit_glue"; |
---|
| 695 | std::cout << "Instance : " << src << std::endl; |
---|
| 696 | |
---|
| 697 | { |
---|
| 698 | dest = _name; |
---|
| 699 | #ifdef POSITION |
---|
| 700 | _component->interface_map (src ,"", |
---|
| 701 | dest,""); |
---|
| 702 | #endif |
---|
| 703 | PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
| 704 | PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); |
---|
| 705 | } |
---|
| 706 | |
---|
| 707 | // ~~~~~[ Interface : "insert" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 708 | for (uint32_t i=0; i<_param->_nb_inst_insert; i++) |
---|
| 709 | { |
---|
| 710 | dest = _name; |
---|
| 711 | #ifdef POSITION |
---|
| 712 | _component->interface_map (src ,"insert_"+toString(i), |
---|
| 713 | dest,"insert_"+toString(i)); |
---|
| 714 | #endif |
---|
| 715 | |
---|
| 716 | PORT_MAP(_component,src , "in_INSERT_"+toString(i)+"_RENAME_VAL" , |
---|
| 717 | dest, "in_RENAME_"+toString(i)+"_VAL" ); |
---|
| 718 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_RENAME_ACK" , |
---|
| 719 | dest,"out_RENAME_"+toString(i)+"_ACK" ); |
---|
| 720 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_INSERT_VAL" , |
---|
| 721 | dest,"out_INSERT_"+toString(i)+"_VAL" ); |
---|
| 722 | PORT_MAP(_component,src , "in_INSERT_"+toString(i)+"_INSERT_ACK" , |
---|
| 723 | dest, "in_INSERT_"+toString(i)+"_ACK" ); |
---|
| 724 | |
---|
| 725 | dest = _name+"_register_address_translation_unit"; |
---|
| 726 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_RAT_INSERT_VAL", |
---|
| 727 | dest, "in_INSERT_"+toString(i)+"_VAL"); |
---|
| 728 | PORT_MAP(_component,src , "in_INSERT_"+toString(i)+"_RAT_RENAME_ACK", |
---|
| 729 | dest,"out_RENAME_"+toString(i)+"_ACK"); |
---|
| 730 | PORT_MAP(_component,src , "in_INSERT_"+toString(i)+"_RAT_INSERT_ACK", |
---|
| 731 | dest,"out_INSERT_"+toString(i)+"_ACK"); |
---|
| 732 | |
---|
| 733 | dest = _name+"_free_list_unit"; |
---|
| 734 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_FREE_LIST_VAL" , |
---|
| 735 | dest, "in_POP_"+toString(i)+"_VAL" ); |
---|
| 736 | PORT_MAP(_component,src , "in_INSERT_"+toString(i)+"_FREE_LIST_ACK" , |
---|
| 737 | dest,"out_POP_"+toString(i)+"_ACK" ); |
---|
| 738 | |
---|
| 739 | dest = _name+"_stat_list_unit"; |
---|
| 740 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_STAT_LIST_VAL" , |
---|
| 741 | dest, "in_INSERT_"+toString(i)+"_VAL" ); |
---|
| 742 | PORT_MAP(_component,src , "in_INSERT_"+toString(i)+"_STAT_LIST_ACK" , |
---|
| 743 | dest,"out_INSERT_"+toString(i)+"_ACK" ); |
---|
| 744 | } |
---|
| 745 | |
---|
| 746 | // ~~~~~[ Interface : "retire" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 747 | for (uint32_t i=0; i<_param->_nb_inst_retire; i++) |
---|
| 748 | { |
---|
| 749 | dest = _name; |
---|
| 750 | #ifdef POSITION |
---|
| 751 | _component->interface_map (src ,"retire", |
---|
| 752 | dest,"retire"); |
---|
| 753 | #endif |
---|
| 754 | |
---|
| 755 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_VAL" , |
---|
| 756 | dest, "in_RETIRE_"+toString(i)+"_VAL" ); |
---|
| 757 | PORT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_ACK" , |
---|
| 758 | dest,"out_RETIRE_"+toString(i)+"_ACK" ); |
---|
| 759 | |
---|
| 760 | dest = _name+"_register_address_translation_unit"; |
---|
| 761 | PORT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_RAT_VAL" , |
---|
| 762 | dest, "in_RETIRE_"+toString(i)+"_VAL" ); |
---|
| 763 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_RAT_ACK" , |
---|
| 764 | dest,"out_RETIRE_"+toString(i)+"_ACK" ); |
---|
| 765 | |
---|
| 766 | dest = _name+"_stat_list_unit"; |
---|
| 767 | PORT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_STAT_LIST_VAL", |
---|
| 768 | dest, "in_RETIRE_"+toString(i)+"_VAL"); |
---|
| 769 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_STAT_LIST_ACK", |
---|
| 770 | dest,"out_RETIRE_"+toString(i)+"_ACK"); |
---|
| 771 | } |
---|
| 772 | } |
---|
| 773 | |
---|
| 774 | |
---|
| 775 | // ~~~~~[ Others ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 776 | _component->test_map(); |
---|
| 777 | |
---|
| 778 | #ifdef POSITION |
---|
| 779 | _component->generate_file(); |
---|
| 780 | #endif |
---|
| 781 | |
---|
| 782 | log_printf(FUNC,Register_translation_unit,FUNCTION,"End"); |
---|
| 783 | }; |
---|
| 784 | |
---|
| 785 | }; // end namespace register_translation_unit |
---|
| 786 | }; // end namespace rename_unit |
---|
| 787 | }; // end namespace ooo_engine |
---|
| 788 | }; // end namespace multi_ooo_engine |
---|
| 789 | }; // end namespace core |
---|
| 790 | |
---|
| 791 | }; // end namespace behavioural |
---|
| 792 | }; // end namespace morpheo |
---|