[60] | 1 | /* |
---|
| 2 | * $Id: Register_unit_allocation.cpp 131 2009-07-08 18:40:08Z rosiere $ |
---|
| 3 | * |
---|
[88] | 4 | * [ Description ] |
---|
[60] | 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/include/Register_unit.h" |
---|
[112] | 9 | #include "Behavioural/include/Allocation.h" |
---|
[60] | 10 | |
---|
[88] | 11 | namespace morpheo { |
---|
[60] | 12 | namespace behavioural { |
---|
| 13 | namespace core { |
---|
| 14 | namespace multi_execute_loop { |
---|
| 15 | namespace execute_loop { |
---|
| 16 | namespace register_unit { |
---|
| 17 | |
---|
| 18 | #undef FUNCTION |
---|
| 19 | #define FUNCTION "Register_unit::allocation" |
---|
[75] | 20 | void Register_unit::allocation ( |
---|
| 21 | #ifdef STATISTICS |
---|
| 22 | morpheo::behavioural::Parameters_Statistics * param_statistics |
---|
| 23 | #else |
---|
| 24 | void |
---|
| 25 | #endif |
---|
| 26 | ) |
---|
[60] | 27 | { |
---|
| 28 | log_printf(FUNC,Register_unit,FUNCTION,"Begin"); |
---|
| 29 | |
---|
[82] | 30 | _component = new Component (_usage); |
---|
[60] | 31 | |
---|
| 32 | Entity * entity = _component->set_entity (_name |
---|
| 33 | ,"Register_unit" |
---|
| 34 | #ifdef POSITION |
---|
| 35 | ,COMBINATORY |
---|
| 36 | #endif |
---|
| 37 | ); |
---|
| 38 | |
---|
| 39 | _interfaces = entity->set_interfaces(); |
---|
| 40 | |
---|
[88] | 41 | // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
[60] | 42 | |
---|
| 43 | Interface * interface = _interfaces->set_interface("" |
---|
| 44 | #ifdef POSITION |
---|
| 45 | ,IN |
---|
| 46 | ,SOUTH, |
---|
| 47 | "Generalist interface" |
---|
| 48 | #endif |
---|
| 49 | ); |
---|
| 50 | |
---|
| 51 | in_CLOCK = interface->set_signal_clk ("clock" ,1, CLOCK_VHDL_YES); |
---|
| 52 | in_NRESET = interface->set_signal_in <Tcontrol_t> ("nreset",1, RESET_VHDL_YES); |
---|
| 53 | |
---|
[88] | 54 | // ~~~~~[ Interface "gpr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
[112] | 55 | { |
---|
| 56 | ALLOC1_INTERFACE_BEGIN("gpr_read",IN,NORTH,_("Interface to read the register file"),_param->_nb_gpr_read); |
---|
| 57 | |
---|
| 58 | ALLOC1_VALACK_IN ( in_GPR_READ_VAL ,VAL); |
---|
| 59 | ALLOC1_VALACK_OUT(out_GPR_READ_ACK ,ACK); |
---|
| 60 | ALLOC1_SIGNAL_IN ( in_GPR_READ_OOO_ENGINE_ID,"ooo_engine_id",Tcontext_t ,_param->_size_ooo_engine_id); |
---|
| 61 | ALLOC1_SIGNAL_IN ( in_GPR_READ_NUM_REG ,"num_reg" ,Tgeneral_address_t,_param->_size_gpr_address); |
---|
| 62 | ALLOC1_SIGNAL_OUT(out_GPR_READ_DATA ,"data" ,Tgeneral_data_t ,_param->_size_general_data); |
---|
| 63 | ALLOC1_SIGNAL_OUT(out_GPR_READ_DATA_VAL ,"data_val" ,Tcontrol_t ,1); |
---|
[60] | 64 | |
---|
[112] | 65 | ALLOC1_INTERFACE_END(_param->_nb_gpr_read); |
---|
| 66 | } |
---|
| 67 | |
---|
[88] | 68 | // ~~~~~[ Interface "gpr_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
[112] | 69 | { |
---|
| 70 | ALLOC1_INTERFACE_BEGIN("gpr_write",IN,NORTH,_("Interface to write the register file"),_param->_nb_gpr_write); |
---|
[60] | 71 | |
---|
[112] | 72 | ALLOC1_VALACK_IN ( in_GPR_WRITE_VAL ,VAL); |
---|
| 73 | ALLOC1_VALACK_OUT(out_GPR_WRITE_ACK ,ACK); |
---|
| 74 | ALLOC1_SIGNAL_IN ( in_GPR_WRITE_OOO_ENGINE_ID,"ooo_engine_id",Tcontext_t ,_param->_size_ooo_engine_id); |
---|
| 75 | ALLOC1_SIGNAL_IN ( in_GPR_WRITE_NUM_REG ,"num_reg" ,Tgeneral_address_t,_param->_size_gpr_address); |
---|
| 76 | ALLOC1_SIGNAL_IN ( in_GPR_WRITE_DATA ,"data" ,Tgeneral_data_t ,_param->_size_general_data); |
---|
[60] | 77 | |
---|
[112] | 78 | ALLOC1_INTERFACE_END(_param->_nb_gpr_write); |
---|
| 79 | } |
---|
[60] | 80 | |
---|
[112] | 81 | // ~~~~~[ Interface "spr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 82 | { |
---|
| 83 | ALLOC1_INTERFACE_BEGIN("spr_read",IN,NORTH,_("Interface to read the register file"),_param->_nb_spr_read); |
---|
| 84 | |
---|
| 85 | ALLOC1_VALACK_IN ( in_SPR_READ_VAL ,VAL); |
---|
| 86 | ALLOC1_VALACK_OUT(out_SPR_READ_ACK ,ACK); |
---|
| 87 | ALLOC1_SIGNAL_IN ( in_SPR_READ_OOO_ENGINE_ID,"ooo_engine_id",Tcontext_t ,_param->_size_ooo_engine_id); |
---|
| 88 | ALLOC1_SIGNAL_IN ( in_SPR_READ_NUM_REG ,"num_reg" ,Tspecial_address_t,_param->_size_spr_address); |
---|
| 89 | ALLOC1_SIGNAL_OUT(out_SPR_READ_DATA ,"data" ,Tspecial_data_t ,_param->_size_special_data); |
---|
| 90 | ALLOC1_SIGNAL_OUT(out_SPR_READ_DATA_VAL ,"data_val" ,Tcontrol_t ,1); |
---|
[60] | 91 | |
---|
[112] | 92 | ALLOC1_INTERFACE_END(_param->_nb_spr_read); |
---|
| 93 | } |
---|
[60] | 94 | |
---|
[112] | 95 | // ~~~~~[ Interface "spr_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 96 | { |
---|
| 97 | ALLOC1_INTERFACE_BEGIN("spr_write",IN,NORTH,_("Interface to write the register file"),_param->_nb_spr_write); |
---|
[60] | 98 | |
---|
[112] | 99 | ALLOC1_VALACK_IN ( in_SPR_WRITE_VAL ,VAL); |
---|
| 100 | ALLOC1_VALACK_OUT(out_SPR_WRITE_ACK ,ACK); |
---|
| 101 | ALLOC1_SIGNAL_IN ( in_SPR_WRITE_OOO_ENGINE_ID,"ooo_engine_id",Tcontext_t ,_param->_size_ooo_engine_id); |
---|
| 102 | ALLOC1_SIGNAL_IN ( in_SPR_WRITE_NUM_REG ,"num_reg" ,Tspecial_address_t,_param->_size_spr_address); |
---|
| 103 | ALLOC1_SIGNAL_IN ( in_SPR_WRITE_DATA ,"data" ,Tspecial_data_t ,_param->_size_special_data); |
---|
[60] | 104 | |
---|
[112] | 105 | ALLOC1_INTERFACE_END(_param->_nb_spr_write); |
---|
| 106 | } |
---|
[60] | 107 | |
---|
[131] | 108 | // ~~~~~[ Interface "insert_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
[112] | 109 | { |
---|
| 110 | ALLOC2_INTERFACE_BEGIN("insert_rob",IN,WEST,_("Interface to update status (insert)"),_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]); |
---|
| 111 | |
---|
| 112 | _ALLOC2_VALACK_IN ( in_INSERT_ROB_VAL ,VAL ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]); |
---|
| 113 | _ALLOC2_VALACK_OUT(out_INSERT_ROB_ACK ,ACK ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]); |
---|
| 114 | _ALLOC2_SIGNAL_IN ( in_INSERT_ROB_RD_USE ,"rd_use" ,Tcontrol_t ,1 ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]); |
---|
| 115 | _ALLOC2_SIGNAL_IN ( in_INSERT_ROB_RD_NUM_REG,"rd_num_reg",Tgeneral_address_t,_param->_size_gpr_address,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]); |
---|
| 116 | _ALLOC2_SIGNAL_IN ( in_INSERT_ROB_RE_USE ,"re_use" ,Tcontrol_t ,1 ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]); |
---|
| 117 | _ALLOC2_SIGNAL_IN ( in_INSERT_ROB_RE_NUM_REG,"re_num_reg",Tspecial_address_t,_param->_size_spr_address,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]); |
---|
| 118 | |
---|
| 119 | ALLOC2_INTERFACE_END(_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]); |
---|
| 120 | } |
---|
[60] | 121 | |
---|
[88] | 122 | // // ~~~~~[ Interface "retire_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 123 | // in_RETIRE_ROB_VAL = new SC_IN (Tcontrol_t ) ** [_param->_nb_ooo_engine]; |
---|
| 124 | // out_RETIRE_ROB_ACK = new SC_OUT(Tcontrol_t ) ** [_param->_nb_ooo_engine]; |
---|
| 125 | // in_RETIRE_ROB_RD_OLD_USE = new SC_IN (Tcontrol_t ) ** [_param->_nb_ooo_engine]; |
---|
| 126 | // in_RETIRE_ROB_RD_OLD_NUM_REG = new SC_IN (Tgeneral_address_t) ** [_param->_nb_ooo_engine]; |
---|
| 127 | // in_RETIRE_ROB_RE_OLD_USE = new SC_IN (Tcontrol_t ) ** [_param->_nb_ooo_engine]; |
---|
| 128 | // in_RETIRE_ROB_RE_OLD_NUM_REG = new SC_IN (Tspecial_address_t) ** [_param->_nb_ooo_engine]; |
---|
| 129 | // in_RETIRE_ROB_RD_NEW_USE = new SC_IN (Tcontrol_t ) ** [_param->_nb_ooo_engine]; |
---|
| 130 | // in_RETIRE_ROB_RD_NEW_NUM_REG = new SC_IN (Tgeneral_address_t) ** [_param->_nb_ooo_engine]; |
---|
| 131 | // in_RETIRE_ROB_RE_NEW_USE = new SC_IN (Tcontrol_t ) ** [_param->_nb_ooo_engine]; |
---|
| 132 | // in_RETIRE_ROB_RE_NEW_NUM_REG = new SC_IN (Tspecial_address_t) ** [_param->_nb_ooo_engine]; |
---|
[60] | 133 | |
---|
[88] | 134 | // for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
| 135 | // { |
---|
| 136 | // uint32_t x=_param->_nb_inst_retire_rob [i]; |
---|
[60] | 137 | |
---|
[88] | 138 | // in_RETIRE_ROB_VAL [i] = new SC_IN (Tcontrol_t ) * [x]; |
---|
| 139 | // out_RETIRE_ROB_ACK [i] = new SC_OUT(Tcontrol_t ) * [x]; |
---|
| 140 | // in_RETIRE_ROB_RD_OLD_USE [i] = new SC_IN (Tcontrol_t ) * [x]; |
---|
| 141 | // in_RETIRE_ROB_RD_OLD_NUM_REG [i] = new SC_IN (Tgeneral_address_t) * [x]; |
---|
| 142 | // in_RETIRE_ROB_RE_OLD_USE [i] = new SC_IN (Tcontrol_t ) * [x]; |
---|
| 143 | // in_RETIRE_ROB_RE_OLD_NUM_REG [i] = new SC_IN (Tspecial_address_t) * [x]; |
---|
| 144 | // in_RETIRE_ROB_RD_NEW_USE [i] = new SC_IN (Tcontrol_t ) * [x]; |
---|
| 145 | // in_RETIRE_ROB_RD_NEW_NUM_REG [i] = new SC_IN (Tgeneral_address_t) * [x]; |
---|
| 146 | // in_RETIRE_ROB_RE_NEW_USE [i] = new SC_IN (Tcontrol_t ) * [x]; |
---|
| 147 | // in_RETIRE_ROB_RE_NEW_NUM_REG [i] = new SC_IN (Tspecial_address_t) * [x]; |
---|
[60] | 148 | |
---|
[88] | 149 | // for (uint32_t j=0; j<x; j++) |
---|
| 150 | // { |
---|
| 151 | // Interface_fifo * interface = _interfaces->set_interface("retire_rob_"+toString(i)+"_"+toString(j) |
---|
| 152 | // #ifdef POSITION |
---|
| 153 | // ,IN |
---|
| 154 | // ,WEST |
---|
| 155 | // ,"Interface to update status (retire)" |
---|
| 156 | // #endif |
---|
| 157 | // ); |
---|
[60] | 158 | |
---|
| 159 | |
---|
[88] | 160 | // in_RETIRE_ROB_VAL [i][j] = interface->set_signal_valack_in (VAL); |
---|
| 161 | // out_RETIRE_ROB_ACK [i][j] = interface->set_signal_valack_out (ACK); |
---|
| 162 | // in_RETIRE_ROB_RD_OLD_USE [i][j] = interface->set_signal_in <Tcontrol_t > ("rd_old_use" , 1); |
---|
| 163 | // in_RETIRE_ROB_RD_OLD_NUM_REG [i][j] = interface->set_signal_in <Tgeneral_address_t> ("rd_old_num_reg", _param->_size_gpr_address); |
---|
| 164 | // in_RETIRE_ROB_RE_OLD_USE [i][j] = interface->set_signal_in <Tcontrol_t > ("re_old_use" , 1); |
---|
| 165 | // in_RETIRE_ROB_RE_OLD_NUM_REG [i][j] = interface->set_signal_in <Tspecial_address_t> ("re_old_num_reg", _param->_size_spr_address); |
---|
| 166 | // in_RETIRE_ROB_RD_NEW_USE [i][j] = interface->set_signal_in <Tcontrol_t > ("rd_new_use" , 1); |
---|
| 167 | // in_RETIRE_ROB_RD_NEW_NUM_REG [i][j] = interface->set_signal_in <Tgeneral_address_t> ("rd_new_num_reg", _param->_size_gpr_address); |
---|
| 168 | // in_RETIRE_ROB_RE_NEW_USE [i][j] = interface->set_signal_in <Tcontrol_t > ("re_new_use" , 1); |
---|
| 169 | // in_RETIRE_ROB_RE_NEW_NUM_REG [i][j] = interface->set_signal_in <Tspecial_address_t> ("re_new_num_reg", _param->_size_spr_address); |
---|
| 170 | // } |
---|
| 171 | // } |
---|
[60] | 172 | |
---|
[88] | 173 | // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 174 | |
---|
[75] | 175 | std::string name; |
---|
[60] | 176 | |
---|
| 177 | component_gpr = new morpheo::behavioural::generic::registerfile::RegisterFile::RegisterFile * [_param->_nb_ooo_engine]; |
---|
| 178 | component_gpr_status = new morpheo::behavioural::generic::registerfile::RegisterFile::RegisterFile * [_param->_nb_ooo_engine]; |
---|
| 179 | component_spr = new morpheo::behavioural::generic::registerfile::RegisterFile::RegisterFile * [_param->_nb_ooo_engine]; |
---|
| 180 | component_spr_status = new morpheo::behavioural::generic::registerfile::RegisterFile::RegisterFile * [_param->_nb_ooo_engine]; |
---|
[131] | 181 | |
---|
| 182 | // component_gpr = new morpheo::behavioural::generic::registerfile::registerfile_multi_banked::RegisterFile_Multi_Banked::RegisterFile_Multi_Banked * [_param->_nb_ooo_engine]; |
---|
| 183 | // component_gpr_status = new morpheo::behavioural::generic::registerfile::registerfile_monolithic ::RegisterFile_Monolithic ::RegisterFile_Monolithic * [_param->_nb_ooo_engine]; |
---|
| 184 | // component_spr = new morpheo::behavioural::generic::registerfile::registerfile_multi_banked::RegisterFile_Multi_Banked::RegisterFile_Multi_Banked * [_param->_nb_ooo_engine]; |
---|
| 185 | // component_spr_status = new morpheo::behavioural::generic::registerfile::registerfile_monolithic ::RegisterFile_Monolithic ::RegisterFile_Monolithic * [_param->_nb_ooo_engine]; |
---|
[60] | 186 | |
---|
| 187 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
| 188 | { |
---|
| 189 | name = _name+"_gpr_"+toString(i); |
---|
[88] | 190 | log_printf(INFO,Register_unit,FUNCTION,_("Create : %s"),name.c_str()); |
---|
[60] | 191 | |
---|
[131] | 192 | component_gpr [i] = new morpheo::behavioural::generic::registerfile::RegisterFile::RegisterFile |
---|
| 193 | // component_gpr [i] = new morpheo::behavioural::generic::registerfile::registerfile_multi_banked::RegisterFile_Multi_Banked::RegisterFile_Multi_Banked |
---|
[60] | 194 | (name.c_str() |
---|
| 195 | #ifdef STATISTICS |
---|
[75] | 196 | ,param_statistics |
---|
[60] | 197 | #endif |
---|
[131] | 198 | ,_param->_param_gpr [i]//->_param_registerfile_multi_banked |
---|
[82] | 199 | ,_usage |
---|
[60] | 200 | ); |
---|
| 201 | |
---|
| 202 | _component->set_component (component_gpr[i]->_component |
---|
| 203 | #ifdef POSITION |
---|
| 204 | , 50 |
---|
| 205 | , 50 |
---|
| 206 | , 10 |
---|
| 207 | , 10 |
---|
| 208 | #endif |
---|
| 209 | ); |
---|
| 210 | |
---|
| 211 | |
---|
| 212 | name = _name+"_gpr_status_"+toString(i); |
---|
[88] | 213 | log_printf(INFO,Register_unit,FUNCTION,_("Create : %s"),name.c_str()); |
---|
[60] | 214 | |
---|
[131] | 215 | component_gpr_status [i] = new morpheo::behavioural::generic::registerfile::RegisterFile::RegisterFile |
---|
| 216 | // component_gpr_status [i] = new morpheo::behavioural::generic::registerfile::registerfile_monolithic ::RegisterFile_Monolithic ::RegisterFile_Monolithic |
---|
[60] | 217 | (name.c_str() |
---|
| 218 | #ifdef STATISTICS |
---|
[75] | 219 | ,param_statistics |
---|
[60] | 220 | #endif |
---|
[131] | 221 | ,_param->_param_gpr_status [i]//->_param_registerfile_monolithic |
---|
[82] | 222 | ,_usage |
---|
[60] | 223 | ); |
---|
| 224 | |
---|
| 225 | _component->set_component (component_gpr_status[i]->_component |
---|
| 226 | #ifdef POSITION |
---|
| 227 | , 50 |
---|
| 228 | , 50 |
---|
| 229 | , 10 |
---|
| 230 | , 10 |
---|
| 231 | #endif |
---|
| 232 | ); |
---|
| 233 | |
---|
| 234 | |
---|
| 235 | name = _name+"_spr_"+toString(i); |
---|
[88] | 236 | log_printf(INFO,Register_unit,FUNCTION,_("Create : %s"),name.c_str()); |
---|
[60] | 237 | |
---|
[131] | 238 | component_spr [i] = new morpheo::behavioural::generic::registerfile::RegisterFile::RegisterFile |
---|
| 239 | // component_spr [i] = new morpheo::behavioural::generic::registerfile::registerfile_multi_banked::RegisterFile_Multi_Banked::RegisterFile_Multi_Banked |
---|
[60] | 240 | (name.c_str() |
---|
| 241 | #ifdef STATISTICS |
---|
[75] | 242 | ,param_statistics |
---|
[60] | 243 | #endif |
---|
[131] | 244 | ,_param->_param_spr [i]//->_param_registerfile_multi_banked |
---|
[82] | 245 | ,_usage |
---|
[60] | 246 | ); |
---|
| 247 | |
---|
| 248 | _component->set_component (component_spr[i]->_component |
---|
| 249 | #ifdef POSITION |
---|
| 250 | , 50 |
---|
| 251 | , 50 |
---|
| 252 | , 10 |
---|
| 253 | , 10 |
---|
| 254 | #endif |
---|
| 255 | ); |
---|
| 256 | |
---|
| 257 | name = _name+"_spr_status_"+toString(i); |
---|
[88] | 258 | log_printf(INFO,Register_unit,FUNCTION,_("Create : %s"),name.c_str()); |
---|
[60] | 259 | |
---|
[131] | 260 | component_spr_status [i] = new morpheo::behavioural::generic::registerfile::RegisterFile::RegisterFile |
---|
| 261 | // component_spr_status [i] = new morpheo::behavioural::generic::registerfile::registerfile_monolithic::RegisterFile_Monolithic::RegisterFile_Monolithic |
---|
[60] | 262 | (name.c_str() |
---|
| 263 | #ifdef STATISTICS |
---|
[75] | 264 | ,param_statistics |
---|
[60] | 265 | #endif |
---|
[131] | 266 | ,_param->_param_spr_status [i]//->_param_registerfile_monolithic |
---|
[82] | 267 | ,_usage |
---|
[60] | 268 | ); |
---|
| 269 | |
---|
| 270 | _component->set_component (component_spr_status[i]->_component |
---|
| 271 | #ifdef POSITION |
---|
| 272 | , 50 |
---|
| 273 | , 50 |
---|
| 274 | , 10 |
---|
| 275 | , 10 |
---|
| 276 | #endif |
---|
| 277 | ); |
---|
| 278 | } |
---|
| 279 | |
---|
[131] | 280 | { |
---|
| 281 | name = _name+"_glue"; |
---|
| 282 | log_printf(INFO,Register_unit,FUNCTION,_("Create : %s"),name.c_str()); |
---|
| 283 | |
---|
| 284 | component_glue = new morpheo::behavioural::core::multi_execute_loop::execute_loop::register_unit::register_unit_glue::Register_unit_Glue::Register_unit_Glue |
---|
| 285 | (name.c_str() |
---|
[60] | 286 | #ifdef STATISTICS |
---|
[131] | 287 | ,param_statistics |
---|
[60] | 288 | #endif |
---|
[131] | 289 | ,_param->_param_glue |
---|
| 290 | ,_usage |
---|
| 291 | ); |
---|
| 292 | |
---|
| 293 | _component->set_component (component_glue->_component |
---|
[60] | 294 | #ifdef POSITION |
---|
[131] | 295 | , 50 |
---|
| 296 | , 50 |
---|
| 297 | , 10 |
---|
| 298 | , 10 |
---|
[60] | 299 | #endif |
---|
[131] | 300 | ); |
---|
| 301 | } |
---|
[60] | 302 | |
---|
| 303 | // ~~~~~[ Instanciation ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
[128] | 304 | std::string src,dest; |
---|
[131] | 305 | |
---|
| 306 | // ------------------------------------------------------------------- |
---|
| 307 | // -----[ gpr ]------------------------------------------------------- |
---|
| 308 | // ------------------------------------------------------------------- |
---|
[60] | 309 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
| 310 | { |
---|
[128] | 311 | src = _name+"_gpr_"+toString(i); |
---|
[60] | 312 | |
---|
[128] | 313 | log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),src.c_str()); |
---|
[60] | 314 | |
---|
[131] | 315 | // -----[ instance "" ]----------------------------------------------- |
---|
[128] | 316 | { |
---|
| 317 | dest = _name; |
---|
[60] | 318 | #ifdef POSITION |
---|
[128] | 319 | _component->interface_map (src ,"", |
---|
| 320 | dest,""); |
---|
[60] | 321 | #endif |
---|
[128] | 322 | PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
| 323 | PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); |
---|
| 324 | } |
---|
[60] | 325 | |
---|
[131] | 326 | // -----[ instance "read" ]------------------------------------------- |
---|
[60] | 327 | for (uint32_t j=0; j<_param->_nb_gpr_read; j++) |
---|
| 328 | { |
---|
[128] | 329 | dest = _name+"_glue"; |
---|
| 330 | |
---|
| 331 | #ifdef POSITION |
---|
| 332 | _component->interface_map (src , "read_"+toString(j), |
---|
| 333 | dest,"gpr_read_registerfile_"+toString(i)+"_"+toString(j)); |
---|
| 334 | #endif |
---|
| 335 | |
---|
| 336 | COMPONENT_MAP(_component,src , "in_READ_" +toString(j)+"_VAL", |
---|
| 337 | dest,"out_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
| 338 | COMPONENT_MAP(_component,src ,"out_READ_" +toString(j)+"_ACK", |
---|
| 339 | dest, "in_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK"); |
---|
| 340 | COMPONENT_MAP(_component,src ,"out_READ_" +toString(j)+"_DATA", |
---|
| 341 | dest, "in_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_DATA"); |
---|
| 342 | |
---|
| 343 | dest = _name; |
---|
| 344 | |
---|
| 345 | PORT_MAP (_component,src , "in_READ_" +toString(j)+"_ADDRESS", |
---|
| 346 | dest, "in_GPR_READ_"+toString(j)+"_NUM_REG"); |
---|
[60] | 347 | } |
---|
[128] | 348 | |
---|
[131] | 349 | // -----[ instance "write" ]------------------------------------------ |
---|
[60] | 350 | for (uint32_t j=0; j<_param->_nb_gpr_write; j++) |
---|
| 351 | { |
---|
[128] | 352 | dest = _name+"_glue"; |
---|
| 353 | |
---|
| 354 | #ifdef POSITION |
---|
| 355 | _component->interface_map (src , "write_"+toString(j), |
---|
| 356 | dest,"gpr_write_registerfile_"+toString(i)+"_"+toString(j)); |
---|
| 357 | #endif |
---|
| 358 | |
---|
| 359 | COMPONENT_MAP(_component,src , "in_WRITE_" +toString(j)+"_VAL", |
---|
| 360 | dest,"out_GPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
| 361 | COMPONENT_MAP(_component,src ,"out_WRITE_" +toString(j)+"_ACK", |
---|
| 362 | dest, "in_GPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK"); |
---|
| 363 | |
---|
| 364 | dest = _name; |
---|
| 365 | |
---|
| 366 | PORT_MAP (_component,src , "in_WRITE_" +toString(j)+"_ADDRESS", |
---|
| 367 | dest, "in_GPR_WRITE_"+toString(j)+"_NUM_REG"); |
---|
| 368 | PORT_MAP (_component,src , "in_WRITE_" +toString(j)+"_DATA", |
---|
| 369 | dest, "in_GPR_WRITE_"+toString(j)+"_DATA"); |
---|
[60] | 370 | } |
---|
| 371 | }// gpr |
---|
| 372 | |
---|
[131] | 373 | // ------------------------------------------------------------------- |
---|
| 374 | // -----[ gpr_status ]------------------------------------------------ |
---|
| 375 | // ------------------------------------------------------------------- |
---|
[60] | 376 | { |
---|
| 377 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
| 378 | { |
---|
[128] | 379 | src = _name+"_gpr_status_"+toString(i); |
---|
[60] | 380 | |
---|
[128] | 381 | log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),src.c_str()); |
---|
| 382 | |
---|
| 383 | { |
---|
| 384 | dest = _name; |
---|
[60] | 385 | #ifdef POSITION |
---|
[128] | 386 | _component->interface_map (src ,"", |
---|
| 387 | dest,""); |
---|
[60] | 388 | #endif |
---|
[128] | 389 | PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
| 390 | PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); |
---|
| 391 | } |
---|
| 392 | |
---|
[60] | 393 | for (uint32_t j=0; j<_param->_nb_gpr_read; j++) |
---|
| 394 | { |
---|
[128] | 395 | dest = _name+"_glue"; |
---|
| 396 | |
---|
| 397 | #ifdef POSITION |
---|
| 398 | _component->interface_map (src , "read_"+toString(j), |
---|
| 399 | dest,"gpr_read_status_"+toString(i)+"_"+toString(j)); |
---|
| 400 | #endif |
---|
| 401 | |
---|
| 402 | COMPONENT_MAP(_component,src , "in_READ_" +toString(j)+"_VAL", |
---|
| 403 | dest,"out_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
| 404 | COMPONENT_MAP(_component,src ,"out_READ_" +toString(j)+"_ACK", |
---|
| 405 | dest, "in_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_ACK"); |
---|
| 406 | COMPONENT_MAP(_component,src ,"out_READ_" +toString(j)+"_DATA", |
---|
| 407 | dest, "in_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_DATA_VAL"); |
---|
| 408 | |
---|
| 409 | dest = _name; |
---|
| 410 | |
---|
| 411 | PORT_MAP (_component,src , "in_READ_" +toString(j)+"_ADDRESS", |
---|
| 412 | dest, "in_GPR_READ_"+toString(j)+"_NUM_REG"); |
---|
[60] | 413 | } |
---|
| 414 | |
---|
| 415 | uint32_t x=0; |
---|
| 416 | for (uint32_t j=0; j<_param->_nb_gpr_write; j++) |
---|
| 417 | { |
---|
[128] | 418 | dest = _name+"_glue"; |
---|
| 419 | |
---|
| 420 | #ifdef POSITION |
---|
[131] | 421 | _component->interface_map (src , "write_"+toString(x), |
---|
[128] | 422 | dest,"gpr_write_status_"+toString(i)+"_"+toString(j)); |
---|
| 423 | #endif |
---|
[78] | 424 | |
---|
[128] | 425 | COMPONENT_MAP(_component,src , "in_WRITE_" +toString(x)+"_VAL", |
---|
| 426 | dest,"out_GPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
| 427 | COMPONENT_MAP(_component,src ,"out_WRITE_" +toString(x)+"_ACK", |
---|
| 428 | dest, "in_GPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_ACK"); |
---|
| 429 | COMPONENT_MAP(_component,src , "in_WRITE_" +toString(x)+"_DATA", |
---|
| 430 | dest,"out_GPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_DATA"); |
---|
| 431 | // dest,"out_CONST_1"); |
---|
| 432 | |
---|
| 433 | dest = _name; |
---|
| 434 | |
---|
| 435 | PORT_MAP (_component,src , "in_WRITE_" +toString(x)+"_ADDRESS", |
---|
| 436 | dest, "in_GPR_WRITE_"+toString(j)+"_NUM_REG"); |
---|
[78] | 437 | |
---|
[128] | 438 | x++; |
---|
[60] | 439 | } |
---|
| 440 | |
---|
| 441 | for (uint32_t j=0; j<_param->_nb_inst_insert_rob [i]; j++) |
---|
| 442 | { |
---|
[128] | 443 | dest = _name+"_glue"; |
---|
| 444 | |
---|
| 445 | #ifdef POSITION |
---|
| 446 | _component->interface_map (src , "write_"+toString(j), |
---|
| 447 | dest,"insert_rob_gpr_status_"+toString(i)+"_"+toString(j)); |
---|
| 448 | #endif |
---|
[60] | 449 | |
---|
[128] | 450 | COMPONENT_MAP(_component,src , "in_WRITE_" +toString(x)+"_VAL", |
---|
| 451 | dest,"out_INSERT_ROB_GPR_STATUS_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
| 452 | COMPONENT_MAP(_component,src ,"out_WRITE_" +toString(x)+"_ACK", |
---|
| 453 | dest, "in_INSERT_ROB_GPR_STATUS_"+toString(i)+"_"+toString(j)+"_ACK"); |
---|
| 454 | COMPONENT_MAP(_component,src , "in_WRITE_" +toString(x)+"_DATA", |
---|
| 455 | dest,"out_INSERT_ROB_GPR_STATUS_"+toString(i)+"_"+toString(j)+"_DATA"); |
---|
| 456 | // dest,"out_CONST_0"); |
---|
| 457 | |
---|
| 458 | dest = _name; |
---|
| 459 | |
---|
| 460 | PORT_MAP (_component,src , "in_WRITE_" +toString(x)+"_ADDRESS", |
---|
| 461 | dest, "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RD_NUM_REG"); |
---|
[60] | 462 | |
---|
[128] | 463 | x++; |
---|
[60] | 464 | } |
---|
| 465 | } |
---|
| 466 | }// gpr_status |
---|
| 467 | |
---|
[131] | 468 | // ------------------------------------------------------------------- |
---|
| 469 | // -----[ spr ]------------------------------------------------------- |
---|
| 470 | // ------------------------------------------------------------------- |
---|
[60] | 471 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
| 472 | { |
---|
[128] | 473 | src = _name+"_spr_"+toString(i); |
---|
[60] | 474 | |
---|
[128] | 475 | log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),src.c_str()); |
---|
[60] | 476 | |
---|
[128] | 477 | { |
---|
| 478 | dest = _name; |
---|
[60] | 479 | #ifdef POSITION |
---|
[128] | 480 | _component->interface_map (src ,"", |
---|
| 481 | dest,""); |
---|
[60] | 482 | #endif |
---|
[128] | 483 | PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
| 484 | PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); |
---|
| 485 | } |
---|
[60] | 486 | |
---|
| 487 | for (uint32_t j=0; j<_param->_nb_spr_read; j++) |
---|
| 488 | { |
---|
[128] | 489 | dest = _name+"_glue"; |
---|
| 490 | |
---|
| 491 | #ifdef POSITION |
---|
| 492 | _component->interface_map (src , "read_"+toString(j), |
---|
| 493 | dest,"spr_read_registerfile_"+toString(i)+"_"+toString(j)); |
---|
| 494 | #endif |
---|
| 495 | |
---|
| 496 | COMPONENT_MAP(_component,src , "in_READ_" +toString(j)+"_VAL", |
---|
| 497 | dest,"out_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
| 498 | COMPONENT_MAP(_component,src ,"out_READ_" +toString(j)+"_ACK", |
---|
| 499 | dest, "in_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK"); |
---|
| 500 | COMPONENT_MAP(_component,src ,"out_READ_" +toString(j)+"_DATA", |
---|
| 501 | dest, "in_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_DATA"); |
---|
| 502 | |
---|
| 503 | dest = _name; |
---|
| 504 | |
---|
| 505 | PORT_MAP (_component,src , "in_READ_" +toString(j)+"_ADDRESS", |
---|
| 506 | dest, "in_SPR_READ_"+toString(j)+"_NUM_REG"); |
---|
[60] | 507 | } |
---|
[128] | 508 | |
---|
[60] | 509 | for (uint32_t j=0; j<_param->_nb_spr_write; j++) |
---|
| 510 | { |
---|
[128] | 511 | dest = _name+"_glue"; |
---|
| 512 | |
---|
| 513 | #ifdef POSITION |
---|
| 514 | _component->interface_map (src , "write_"+toString(j), |
---|
| 515 | dest,"spr_write_registerfile_"+toString(i)+"_"+toString(j)); |
---|
| 516 | #endif |
---|
| 517 | |
---|
| 518 | COMPONENT_MAP(_component,src , "in_WRITE_" +toString(j)+"_VAL", |
---|
| 519 | dest,"out_SPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
| 520 | COMPONENT_MAP(_component,src ,"out_WRITE_" +toString(j)+"_ACK", |
---|
| 521 | dest, "in_SPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK"); |
---|
| 522 | |
---|
| 523 | dest = _name; |
---|
| 524 | |
---|
| 525 | PORT_MAP (_component,src , "in_WRITE_" +toString(j)+"_ADDRESS", |
---|
| 526 | dest, "in_SPR_WRITE_"+toString(j)+"_NUM_REG"); |
---|
| 527 | PORT_MAP (_component,src , "in_WRITE_" +toString(j)+"_DATA", |
---|
| 528 | dest, "in_SPR_WRITE_"+toString(j)+"_DATA"); |
---|
[60] | 529 | } |
---|
| 530 | }// spr |
---|
| 531 | |
---|
[131] | 532 | // ------------------------------------------------------------------- |
---|
| 533 | // -----[ spr_status ]------------------------------------------------ |
---|
| 534 | // ------------------------------------------------------------------- |
---|
[60] | 535 | { |
---|
| 536 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
| 537 | { |
---|
[128] | 538 | src = _name+"_spr_status_"+toString(i); |
---|
[60] | 539 | |
---|
[128] | 540 | log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),src.c_str()); |
---|
[88] | 541 | |
---|
[128] | 542 | { |
---|
| 543 | dest = _name; |
---|
[60] | 544 | #ifdef POSITION |
---|
[128] | 545 | _component->interface_map (src ,"", |
---|
| 546 | dest,""); |
---|
[60] | 547 | #endif |
---|
[128] | 548 | PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
| 549 | PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); |
---|
| 550 | } |
---|
| 551 | |
---|
[60] | 552 | for (uint32_t j=0; j<_param->_nb_spr_read; j++) |
---|
| 553 | { |
---|
[128] | 554 | dest = _name+"_glue"; |
---|
| 555 | |
---|
| 556 | #ifdef POSITION |
---|
| 557 | _component->interface_map (src , "read_"+toString(j), |
---|
| 558 | dest,"spr_read_status_"+toString(i)+"_"+toString(j)); |
---|
| 559 | #endif |
---|
| 560 | |
---|
| 561 | COMPONENT_MAP(_component,src , "in_READ_" +toString(j)+"_VAL", |
---|
| 562 | dest,"out_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
| 563 | COMPONENT_MAP(_component,src ,"out_READ_" +toString(j)+"_ACK", |
---|
| 564 | dest, "in_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_ACK"); |
---|
| 565 | COMPONENT_MAP(_component,src ,"out_READ_" +toString(j)+"_DATA", |
---|
| 566 | dest, "in_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_DATA_VAL"); |
---|
| 567 | |
---|
| 568 | dest = _name; |
---|
| 569 | |
---|
| 570 | PORT_MAP (_component,src , "in_READ_" +toString(j)+"_ADDRESS", |
---|
| 571 | dest, "in_SPR_READ_"+toString(j)+"_NUM_REG"); |
---|
[60] | 572 | } |
---|
| 573 | |
---|
| 574 | uint32_t x=0; |
---|
| 575 | for (uint32_t j=0; j<_param->_nb_spr_write; j++) |
---|
| 576 | { |
---|
[128] | 577 | dest = _name+"_glue"; |
---|
| 578 | |
---|
| 579 | #ifdef POSITION |
---|
[131] | 580 | _component->interface_map (src , "write_"+toString(x), |
---|
[128] | 581 | dest,"spr_write_status_"+toString(i)+"_"+toString(j)); |
---|
| 582 | #endif |
---|
[78] | 583 | |
---|
[128] | 584 | COMPONENT_MAP(_component,src , "in_WRITE_" +toString(x)+"_VAL", |
---|
| 585 | dest,"out_SPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
| 586 | COMPONENT_MAP(_component,src ,"out_WRITE_" +toString(x)+"_ACK", |
---|
| 587 | dest, "in_SPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_ACK"); |
---|
| 588 | COMPONENT_MAP(_component,src , "in_WRITE_" +toString(x)+"_DATA", |
---|
| 589 | dest,"out_SPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_DATA"); |
---|
| 590 | // dest,"out_CONST_1"); |
---|
| 591 | |
---|
| 592 | dest = _name; |
---|
| 593 | |
---|
| 594 | PORT_MAP (_component,src , "in_WRITE_" +toString(x)+"_ADDRESS", |
---|
| 595 | dest, "in_SPR_WRITE_"+toString(j)+"_NUM_REG"); |
---|
| 596 | |
---|
| 597 | x++; |
---|
[60] | 598 | } |
---|
| 599 | |
---|
| 600 | for (uint32_t j=0; j<_param->_nb_inst_insert_rob [i]; j++) |
---|
| 601 | { |
---|
[128] | 602 | dest = _name+"_glue"; |
---|
| 603 | |
---|
| 604 | #ifdef POSITION |
---|
[131] | 605 | _component->interface_map (src , "write_"+toString(x), |
---|
[128] | 606 | dest,"insert_rob_spr_status_"+toString(i)+"_"+toString(j)); |
---|
| 607 | #endif |
---|
[60] | 608 | |
---|
[128] | 609 | COMPONENT_MAP(_component,src , "in_WRITE_" +toString(x)+"_VAL", |
---|
| 610 | dest,"out_INSERT_ROB_SPR_STATUS_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
| 611 | COMPONENT_MAP(_component,src ,"out_WRITE_" +toString(x)+"_ACK", |
---|
| 612 | dest, "in_INSERT_ROB_SPR_STATUS_"+toString(i)+"_"+toString(j)+"_ACK"); |
---|
| 613 | COMPONENT_MAP(_component,src , "in_WRITE_" +toString(x)+"_DATA", |
---|
| 614 | dest,"out_INSERT_ROB_SPR_STATUS_"+toString(i)+"_"+toString(j)+"_DATA"); |
---|
| 615 | // dest,"out_CONST_0"); |
---|
[131] | 616 | |
---|
[128] | 617 | dest = _name; |
---|
| 618 | |
---|
| 619 | PORT_MAP (_component,src , "in_WRITE_" +toString(x)+"_ADDRESS", |
---|
| 620 | dest, "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RE_NUM_REG"); |
---|
[60] | 621 | |
---|
[128] | 622 | x++; |
---|
[60] | 623 | } |
---|
| 624 | } |
---|
| 625 | }// spr_status |
---|
| 626 | |
---|
[131] | 627 | // ------------------------------------------------------------------- |
---|
| 628 | // -----[ glue ]------------------------------------------------------ |
---|
| 629 | // ------------------------------------------------------------------- |
---|
[60] | 630 | { |
---|
[128] | 631 | src = _name+"_glue"; |
---|
[60] | 632 | |
---|
[128] | 633 | log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),src.c_str()); |
---|
[88] | 634 | |
---|
[128] | 635 | { |
---|
| 636 | dest = _name; |
---|
[60] | 637 | #ifdef POSITION |
---|
[128] | 638 | _component->interface_map (src ,"", |
---|
| 639 | dest,""); |
---|
[60] | 640 | #endif |
---|
[128] | 641 | PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
| 642 | PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); |
---|
| 643 | } |
---|
[62] | 644 | |
---|
[60] | 645 | for (uint32_t j=0; j<_param->_nb_gpr_read; j++) |
---|
| 646 | { |
---|
[128] | 647 | dest = _name; |
---|
| 648 | |
---|
| 649 | #ifdef POSITION |
---|
| 650 | _component->interface_map (src ,"gpr_read_"+toString(j), |
---|
| 651 | dest,"gpr_read_"+toString(j)); |
---|
| 652 | #endif |
---|
| 653 | |
---|
| 654 | PORT_MAP(_component,src , "in_GPR_READ_"+toString(j)+"_VAL", |
---|
| 655 | dest, "in_GPR_READ_"+toString(j)+"_VAL"); |
---|
| 656 | PORT_MAP(_component,src ,"out_GPR_READ_"+toString(j)+"_ACK", |
---|
| 657 | dest,"out_GPR_READ_"+toString(j)+"_ACK"); |
---|
[60] | 658 | if (_param->_have_port_ooo_engine_id == true) |
---|
[128] | 659 | PORT_MAP(_component,src , "in_GPR_READ_"+toString(j)+"_OOO_ENGINE_ID", |
---|
| 660 | dest, "in_GPR_READ_"+toString(j)+"_OOO_ENGINE_ID"); |
---|
| 661 | PORT_MAP(_component,src ,"out_GPR_READ_"+toString(j)+"_DATA", |
---|
| 662 | dest,"out_GPR_READ_"+toString(j)+"_DATA"); |
---|
| 663 | PORT_MAP(_component,src ,"out_GPR_READ_"+toString(j)+"_DATA_VAL", |
---|
| 664 | dest,"out_GPR_READ_"+toString(j)+"_DATA_VAL"); |
---|
[60] | 665 | |
---|
[128] | 666 | // out_GPR_READ_REGISTERFILE_VAL - gpr. in_READ_VAL |
---|
| 667 | // in_GPR_READ_REGISTERFILE_ACK - gpr.out_READ_ACK |
---|
| 668 | // in_GPR_READ_REGISTERFILE_DATA - gpr.out_READ_DATA |
---|
| 669 | |
---|
| 670 | // out_GPR_READ_STATUS_VAL - gpr. in_READ_VAL |
---|
| 671 | // in_GPR_READ_STATUS_ACK - gpr.out_READ_ACK |
---|
| 672 | // in_GPR_READ_STATUS_DATA_VAL - gpr.out_READ_DATA |
---|
[60] | 673 | } |
---|
| 674 | |
---|
| 675 | for (uint32_t j=0; j<_param->_nb_gpr_write; j++) |
---|
| 676 | { |
---|
[128] | 677 | dest = _name; |
---|
| 678 | |
---|
| 679 | #ifdef POSITION |
---|
| 680 | _component->interface_map (src ,"gpr_write_"+toString(j), |
---|
| 681 | dest,"gpr_write_"+toString(j)); |
---|
| 682 | #endif |
---|
| 683 | |
---|
| 684 | PORT_MAP(_component,src , "in_GPR_WRITE_"+toString(j)+"_VAL", |
---|
| 685 | dest, "in_GPR_WRITE_"+toString(j)+"_VAL"); |
---|
| 686 | PORT_MAP(_component,src ,"out_GPR_WRITE_"+toString(j)+"_ACK", |
---|
| 687 | dest,"out_GPR_WRITE_"+toString(j)+"_ACK"); |
---|
[60] | 688 | if (_param->_have_port_ooo_engine_id == true) |
---|
[128] | 689 | PORT_MAP(_component,src , "in_GPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID", |
---|
| 690 | dest, "in_GPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID"); |
---|
| 691 | |
---|
| 692 | // out_GPR_WRITE_REGISTERFILE_VAL - gpr. in_WRITE_VAL |
---|
| 693 | // in_GPR_WRITE_REGISTERFILE_ACK - gpr.out_WRITE_ACK |
---|
| 694 | // out_GPR_WRITE_STATUS_VAL - gpr. in_WRITE_VAL |
---|
| 695 | // in_GPR_WRITE_STATUS_ACK - gpr.out_WRITE_ACK |
---|
| 696 | // out_GPR_WRITE_STATUS_DATA - gpr. in_WRITE_DATA |
---|
[60] | 697 | } |
---|
[128] | 698 | |
---|
[60] | 699 | for (uint32_t j=0; j<_param->_nb_spr_read; j++) |
---|
| 700 | { |
---|
[128] | 701 | dest = _name; |
---|
| 702 | |
---|
| 703 | #ifdef POSITION |
---|
| 704 | _component->interface_map (src ,"spr_read_"+toString(j), |
---|
| 705 | dest,"spr_read_"+toString(j)); |
---|
| 706 | #endif |
---|
| 707 | |
---|
| 708 | PORT_MAP(_component,src , "in_SPR_READ_"+toString(j)+"_VAL", |
---|
| 709 | dest, "in_SPR_READ_"+toString(j)+"_VAL"); |
---|
| 710 | PORT_MAP(_component,src ,"out_SPR_READ_"+toString(j)+"_ACK", |
---|
| 711 | dest,"out_SPR_READ_"+toString(j)+"_ACK"); |
---|
[60] | 712 | if (_param->_have_port_ooo_engine_id == true) |
---|
[128] | 713 | PORT_MAP(_component,src , "in_SPR_READ_"+toString(j)+"_OOO_ENGINE_ID", |
---|
| 714 | dest, "in_SPR_READ_"+toString(j)+"_OOO_ENGINE_ID"); |
---|
| 715 | PORT_MAP(_component,src ,"out_SPR_READ_"+toString(j)+"_DATA", |
---|
| 716 | dest,"out_SPR_READ_"+toString(j)+"_DATA"); |
---|
| 717 | PORT_MAP(_component,src ,"out_SPR_READ_"+toString(j)+"_DATA_VAL", |
---|
| 718 | dest,"out_SPR_READ_"+toString(j)+"_DATA_VAL"); |
---|
[60] | 719 | |
---|
[128] | 720 | // out_SPR_READ_REGISTERFILE_VAL - spr. in_READ_VAL |
---|
| 721 | // in_SPR_READ_REGISTERFILE_ACK - spr.out_READ_ACK |
---|
| 722 | // in_SPR_READ_REGISTERFILE_DATA - spr.out_READ_DATA |
---|
| 723 | |
---|
| 724 | // out_SPR_READ_STATUS_VAL - spr. in_READ_VAL |
---|
| 725 | // in_SPR_READ_STATUS_ACK - spr.out_READ_ACK |
---|
| 726 | // in_SPR_READ_STATUS_DATA_VAL - spr.out_READ_DATA |
---|
[60] | 727 | } |
---|
| 728 | |
---|
| 729 | for (uint32_t j=0; j<_param->_nb_spr_write; j++) |
---|
| 730 | { |
---|
[128] | 731 | dest = _name; |
---|
| 732 | |
---|
| 733 | #ifdef POSITION |
---|
| 734 | _component->interface_map (src ,"spr_write_"+toString(j), |
---|
| 735 | dest,"spr_write_"+toString(j)); |
---|
| 736 | #endif |
---|
| 737 | |
---|
| 738 | PORT_MAP(_component,src , "in_SPR_WRITE_"+toString(j)+"_VAL", |
---|
| 739 | dest, "in_SPR_WRITE_"+toString(j)+"_VAL"); |
---|
| 740 | PORT_MAP(_component,src ,"out_SPR_WRITE_"+toString(j)+"_ACK", |
---|
| 741 | dest,"out_SPR_WRITE_"+toString(j)+"_ACK"); |
---|
[60] | 742 | if (_param->_have_port_ooo_engine_id == true) |
---|
[128] | 743 | PORT_MAP(_component,src , "in_SPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID", |
---|
| 744 | dest, "in_SPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID"); |
---|
| 745 | |
---|
| 746 | // out_SPR_WRITE_REGISTERFILE_VAL - spr. in_WRITE_VAL |
---|
| 747 | // in_SPR_WRITE_REGISTERFILE_ACK - spr.out_WRITE_ACK |
---|
| 748 | // out_SPR_WRITE_STATUS_VAL - spr. in_WRITE_VAL |
---|
| 749 | // in_SPR_WRITE_STATUS_ACK - spr.out_WRITE_ACK |
---|
| 750 | // out_SPR_WRITE_STATUS_DATA - spr. in_WRITE_DATA |
---|
[60] | 751 | } |
---|
| 752 | |
---|
| 753 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
| 754 | { |
---|
[131] | 755 | uint32_t x = _param->_nb_inst_insert_rob [i]; |
---|
[60] | 756 | |
---|
| 757 | for (uint32_t j=0; j<x; j++) |
---|
| 758 | { |
---|
[128] | 759 | dest = _name; |
---|
| 760 | |
---|
| 761 | #ifdef POSITION |
---|
| 762 | _component->interface_map (src ,"insert_rob_"+toString(i)+"_"+toString(j), |
---|
| 763 | dest,"insert_rob_"+toString(i)+"_"+toString(j)); |
---|
| 764 | #endif |
---|
| 765 | |
---|
| 766 | PORT_MAP(_component,src , "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_VAL", |
---|
| 767 | dest, "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
| 768 | PORT_MAP(_component,src ,"out_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_ACK", |
---|
| 769 | dest,"out_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_ACK"); |
---|
| 770 | PORT_MAP(_component,src , "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RD_USE", |
---|
| 771 | dest, "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RD_USE"); |
---|
| 772 | PORT_MAP(_component,src , "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RE_USE", |
---|
| 773 | dest, "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RE_USE"); |
---|
| 774 | |
---|
| 775 | // out_INSERT_ROB_GPR_STATUS_VAL - gpr_status. in_WRITE_VAL |
---|
| 776 | // in_INSERT_ROB_GPR_STATUS_ACK - gpr_status. out_WRITE_ACK |
---|
| 777 | // out_INSERT_ROB_GPR_STATUS_DATA- gpr_status. in_WRITE_DATA |
---|
| 778 | // out_INSERT_ROB_SPR_STATUS_VAL - spr_status. in_WRITE_VAL |
---|
| 779 | // in_INSERT_ROB_SPR_STATUS_ACK - spr_status. out_WRITE_ACK |
---|
| 780 | // in_INSERT_ROB_SPR_STATUS_DATA- spr_status. out_WRITE_DATA |
---|
[60] | 781 | } |
---|
| 782 | } |
---|
| 783 | }// glue |
---|
| 784 | |
---|
[88] | 785 | #if DEBUG_Register_unit == true |
---|
| 786 | _component->test_map (); |
---|
| 787 | #endif |
---|
[60] | 788 | |
---|
| 789 | #ifdef POSITION |
---|
[88] | 790 | if (usage_is_set(_usage,USE_POSITION)) |
---|
| 791 | _component->generate_file(); |
---|
[60] | 792 | #endif |
---|
| 793 | |
---|
[75] | 794 | // std::cout << *_component << std::endl; |
---|
[60] | 795 | |
---|
| 796 | log_printf(FUNC,Register_unit,FUNCTION,"End"); |
---|
| 797 | }; |
---|
| 798 | |
---|
| 799 | }; // end namespace register_unit |
---|
| 800 | }; // end namespace execute_loop |
---|
| 801 | }; // end namespace multi_execute_loop |
---|
| 802 | }; // end namespace core |
---|
| 803 | |
---|
| 804 | }; // end namespace behavioural |
---|
| 805 | }; // end namespace morpheo |
---|