[78] | 1 | /* |
---|
| 2 | * $Id: Execute_loop_allocation.cpp 88 2008-12-10 18:31:39Z rosiere $ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/include/Execute_loop.h" |
---|
| 9 | #include "Behavioural/include/Allocation.h" |
---|
| 10 | |
---|
| 11 | namespace morpheo { |
---|
| 12 | namespace behavioural { |
---|
| 13 | namespace core { |
---|
| 14 | namespace multi_execute_loop { |
---|
| 15 | namespace execute_loop { |
---|
| 16 | |
---|
| 17 | |
---|
| 18 | |
---|
| 19 | #undef FUNCTION |
---|
| 20 | #define FUNCTION "Execute_loop::allocation" |
---|
| 21 | void Execute_loop::allocation ( |
---|
| 22 | #ifdef STATISTICS |
---|
| 23 | morpheo::behavioural::Parameters_Statistics * param_statistics |
---|
| 24 | #else |
---|
| 25 | void |
---|
| 26 | #endif |
---|
| 27 | ) |
---|
| 28 | { |
---|
| 29 | log_printf(FUNC,Execute_loop,FUNCTION,"Begin"); |
---|
| 30 | |
---|
| 31 | _component = new Component (_usage); |
---|
| 32 | |
---|
| 33 | Entity * entity = _component->set_entity (_name |
---|
| 34 | ,"Execute_loop" |
---|
| 35 | #ifdef POSITION |
---|
| 36 | ,COMBINATORY |
---|
| 37 | #endif |
---|
| 38 | ); |
---|
| 39 | |
---|
| 40 | _interfaces = entity->set_interfaces(); |
---|
| 41 | |
---|
| 42 | // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 43 | |
---|
| 44 | Interface * interface = _interfaces->set_interface("" |
---|
| 45 | #ifdef POSITION |
---|
| 46 | ,IN |
---|
| 47 | ,SOUTH, |
---|
| 48 | "Generalist interface" |
---|
| 49 | #endif |
---|
| 50 | ); |
---|
| 51 | |
---|
| 52 | in_CLOCK = interface->set_signal_clk ("clock" ,1, CLOCK_VHDL_YES); |
---|
| 53 | in_NRESET = interface->set_signal_in <Tcontrol_t> ("nreset",1, RESET_VHDL_YES); |
---|
| 54 | |
---|
| 55 | // ~~~~~[ Interface "execute_loop_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 56 | { |
---|
| 57 | ALLOC1_INTERFACE("execute_loop_in", IN, EAST, "Operation's Input", _param->_nb_read_unit); |
---|
| 58 | |
---|
| 59 | ALLOC1_VALACK_IN ( in_EXECUTE_LOOP_IN_VAL,VAL); |
---|
| 60 | ALLOC1_VALACK_OUT(out_EXECUTE_LOOP_IN_ACK,ACK); |
---|
| 61 | ALLOC1_SIGNAL_IN ( in_EXECUTE_LOOP_IN_CONTEXT_ID ,"context_id" ,Tcontext_t ,_param->_size_context_id); |
---|
| 62 | ALLOC1_SIGNAL_IN ( in_EXECUTE_LOOP_IN_FRONT_END_ID ,"front_end_id" ,Tcontext_t ,_param->_size_front_end_id); |
---|
| 63 | ALLOC1_SIGNAL_IN ( in_EXECUTE_LOOP_IN_OOO_ENGINE_ID ,"ooo_engine_id" ,Tcontext_t ,_param->_size_ooo_engine_id); |
---|
[88] | 64 | ALLOC1_SIGNAL_IN ( in_EXECUTE_LOOP_IN_PACKET_ID ,"packet_id" ,Tpacket_t ,_param->_size_rob_ptr ); |
---|
[78] | 65 | ALLOC1_SIGNAL_IN ( in_EXECUTE_LOOP_IN_OPERATION ,"operation" ,Toperation_t ,_param->_size_operation); |
---|
| 66 | ALLOC1_SIGNAL_IN ( in_EXECUTE_LOOP_IN_TYPE ,"type" ,Ttype_t ,_param->_size_type); |
---|
[88] | 67 | ALLOC1_SIGNAL_IN ( in_EXECUTE_LOOP_IN_STORE_QUEUE_PTR_WRITE,"store_queue_ptr_write",Tlsq_ptr_t ,_param->_size_store_queue_ptr); |
---|
[78] | 68 | if (_param->_have_port_load_queue_ptr) |
---|
[88] | 69 | ALLOC1_SIGNAL_IN ( in_EXECUTE_LOOP_IN_LOAD_QUEUE_PTR_WRITE ,"load_queue_ptr_write" ,Tlsq_ptr_t ,_param->_size_load_queue_ptr); |
---|
[78] | 70 | ALLOC1_SIGNAL_IN ( in_EXECUTE_LOOP_IN_HAS_IMMEDIAT ,"has_immediat" ,Tcontrol_t ,1); |
---|
| 71 | ALLOC1_SIGNAL_IN ( in_EXECUTE_LOOP_IN_IMMEDIAT ,"immediat" ,Tgeneral_data_t ,_param->_size_general_data); |
---|
| 72 | ALLOC1_SIGNAL_IN ( in_EXECUTE_LOOP_IN_READ_RA ,"read_ra" ,Tcontrol_t ,1); |
---|
| 73 | ALLOC1_SIGNAL_IN ( in_EXECUTE_LOOP_IN_NUM_REG_RA ,"num_reg_ra" ,Tgeneral_address_t,_param->_size_general_register); |
---|
| 74 | ALLOC1_SIGNAL_IN ( in_EXECUTE_LOOP_IN_READ_RB ,"read_rb" ,Tcontrol_t ,1); |
---|
| 75 | ALLOC1_SIGNAL_IN ( in_EXECUTE_LOOP_IN_NUM_REG_RB ,"num_reg_rb" ,Tgeneral_address_t,_param->_size_general_register); |
---|
| 76 | ALLOC1_SIGNAL_IN ( in_EXECUTE_LOOP_IN_READ_RC ,"read_rc" ,Tcontrol_t ,1); |
---|
| 77 | ALLOC1_SIGNAL_IN ( in_EXECUTE_LOOP_IN_NUM_REG_RC ,"num_reg_rc" ,Tspecial_address_t,_param->_size_special_register); |
---|
| 78 | ALLOC1_SIGNAL_IN ( in_EXECUTE_LOOP_IN_WRITE_RD ,"write_rd" ,Tcontrol_t ,1); |
---|
| 79 | ALLOC1_SIGNAL_IN ( in_EXECUTE_LOOP_IN_NUM_REG_RD ,"num_reg_rd" ,Tgeneral_address_t,_param->_size_general_register); |
---|
| 80 | ALLOC1_SIGNAL_IN ( in_EXECUTE_LOOP_IN_WRITE_RE ,"write_re" ,Tcontrol_t ,1); |
---|
| 81 | ALLOC1_SIGNAL_IN ( in_EXECUTE_LOOP_IN_NUM_REG_RE ,"num_reg_re" ,Tspecial_address_t,_param->_size_special_register); |
---|
| 82 | } |
---|
| 83 | // ~~~~~[ Interface "execute_loop_out" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 84 | { |
---|
| 85 | ALLOC1_INTERFACE("execute_loop_out",OUT, EAST, "Operation's Output", _param->_nb_write_unit); |
---|
| 86 | |
---|
| 87 | ALLOC1_VALACK_OUT(out_EXECUTE_LOOP_OUT_VAL,VAL); |
---|
| 88 | ALLOC1_VALACK_IN ( in_EXECUTE_LOOP_OUT_ACK,ACK); |
---|
| 89 | ALLOC1_SIGNAL_OUT(out_EXECUTE_LOOP_OUT_CONTEXT_ID ,"context_id" ,Tcontext_t ,_param->_size_context_id); |
---|
| 90 | ALLOC1_SIGNAL_OUT(out_EXECUTE_LOOP_OUT_FRONT_END_ID ,"front_end_id" ,Tcontext_t ,_param->_size_front_end_id); |
---|
| 91 | ALLOC1_SIGNAL_OUT(out_EXECUTE_LOOP_OUT_OOO_ENGINE_ID,"ooo_engine_id",Tcontext_t ,_param->_size_ooo_engine_id); |
---|
[88] | 92 | ALLOC1_SIGNAL_OUT(out_EXECUTE_LOOP_OUT_PACKET_ID ,"packet_id" ,Tpacket_t ,_param->_size_rob_ptr ); |
---|
[78] | 93 | // ALLOC1_SIGNAL_OUT(out_EXECUTE_LOOP_OUT_OPERATION ,"operation" ,Toperation_t ,_param->_size_operation); |
---|
| 94 | // ALLOC1_SIGNAL_OUT(out_EXECUTE_LOOP_OUT_TYPE ,"type" ,Ttype_t ,_param->_size_type); |
---|
| 95 | ALLOC1_SIGNAL_OUT(out_EXECUTE_LOOP_OUT_FLAGS ,"flags" ,Tspecial_data_t,_param->_size_special_data); |
---|
| 96 | ALLOC1_SIGNAL_OUT(out_EXECUTE_LOOP_OUT_EXCEPTION ,"exception" ,Texception_t ,_param->_size_exception); |
---|
| 97 | ALLOC1_SIGNAL_OUT(out_EXECUTE_LOOP_OUT_NO_SEQUENCE ,"no_sequence" ,Tcontrol_t ,1); |
---|
| 98 | ALLOC1_SIGNAL_OUT(out_EXECUTE_LOOP_OUT_ADDRESS ,"address" ,Tgeneral_data_t,_param->_size_general_data); |
---|
[88] | 99 | ALLOC1_SIGNAL_OUT(out_EXECUTE_LOOP_OUT_DATA ,"data" ,Tgeneral_data_t,_param->_size_general_data); |
---|
[78] | 100 | } |
---|
| 101 | // ~~~~~[ Interface "dcache_req" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 102 | { |
---|
[88] | 103 | ALLOC2_INTERFACE("dcache_req",OUT, NORTH, "Data cache port : request", _param->_nb_load_store_unit, _param->_nb_cache_port[it1]); |
---|
[78] | 104 | |
---|
[88] | 105 | _ALLOC2_VALACK_OUT(out_DCACHE_REQ_VAL,VAL, _param->_nb_load_store_unit, _param->_nb_cache_port[it1]); |
---|
| 106 | _ALLOC2_VALACK_IN ( in_DCACHE_REQ_ACK,ACK, _param->_nb_load_store_unit, _param->_nb_cache_port[it1]); |
---|
| 107 | _ALLOC2_SIGNAL_OUT(out_DCACHE_REQ_CONTEXT_ID,"context_id",Tcontext_t ,_param->_max_size_dcache_context_id, _param->_nb_load_store_unit, _param->_nb_cache_port[it1]); |
---|
| 108 | _ALLOC2_SIGNAL_OUT(out_DCACHE_REQ_PACKET_ID ,"packet_id" ,Tpacket_t ,_param->_max_size_dcache_packet_id , _param->_nb_load_store_unit, _param->_nb_cache_port[it1]); |
---|
| 109 | _ALLOC2_SIGNAL_OUT(out_DCACHE_REQ_ADDRESS ,"address" ,Tdcache_address_t,_param->_size_general_data , _param->_nb_load_store_unit, _param->_nb_cache_port[it1]); |
---|
| 110 | _ALLOC2_SIGNAL_OUT(out_DCACHE_REQ_TYPE ,"type" ,Tdcache_type_t ,_param->_size_dcache_type , _param->_nb_load_store_unit, _param->_nb_cache_port[it1]); |
---|
| 111 | _ALLOC2_SIGNAL_OUT(out_DCACHE_REQ_WDATA ,"wdata" ,Tdcache_data_t ,_param->_size_general_data , _param->_nb_load_store_unit, _param->_nb_cache_port[it1]); |
---|
[78] | 112 | } |
---|
| 113 | // ~~~~~[ Interface "dcache_rsp" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 114 | { |
---|
[88] | 115 | ALLOC2_INTERFACE("dcache_rsp",IN, NORTH, "Data cache port : respons", _param->_nb_load_store_unit, _param->_nb_cache_port[it1]); |
---|
[78] | 116 | |
---|
[88] | 117 | _ALLOC2_VALACK_IN ( in_DCACHE_RSP_VAL,VAL, _param->_nb_load_store_unit, _param->_nb_cache_port[it1]); |
---|
| 118 | _ALLOC2_VALACK_OUT(out_DCACHE_RSP_ACK,ACK, _param->_nb_load_store_unit, _param->_nb_cache_port[it1]); |
---|
| 119 | _ALLOC2_SIGNAL_IN ( in_DCACHE_RSP_CONTEXT_ID,"context_id",Tcontext_t ,_param->_max_size_dcache_context_id, _param->_nb_load_store_unit, _param->_nb_cache_port[it1]); |
---|
| 120 | _ALLOC2_SIGNAL_IN ( in_DCACHE_RSP_PACKET_ID ,"packet_id" ,Tpacket_t ,_param->_max_size_dcache_packet_id , _param->_nb_load_store_unit, _param->_nb_cache_port[it1]); |
---|
| 121 | _ALLOC2_SIGNAL_IN ( in_DCACHE_RSP_RDATA ,"rdata" ,Tdcache_data_t ,_param->_size_general_data , _param->_nb_load_store_unit, _param->_nb_cache_port[it1]); |
---|
| 122 | _ALLOC2_SIGNAL_IN ( in_DCACHE_RSP_ERROR ,"error" ,Tdcache_error_t,_param->_size_dcache_error , _param->_nb_load_store_unit, _param->_nb_cache_port[it1]); |
---|
[78] | 123 | } |
---|
| 124 | // ~~~~~[ Interface "insert_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 125 | { |
---|
[88] | 126 | ALLOC2_INTERFACE("insert_rob",IN, EAST, "Rename's stage : insert a new instruction in the Re Order Buffer",_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[it1]); |
---|
[78] | 127 | |
---|
[88] | 128 | _ALLOC2_VALACK_IN ( in_INSERT_ROB_VAL,VAL,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[it1]); |
---|
| 129 | _ALLOC2_VALACK_OUT(out_INSERT_ROB_ACK,ACK,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[it1]); |
---|
[78] | 130 | |
---|
[88] | 131 | _ALLOC2_SIGNAL_IN ( in_INSERT_ROB_RD_USE ,"rd_use" ,Tcontrol_t ,1 ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[it1]); |
---|
| 132 | _ALLOC2_SIGNAL_IN ( in_INSERT_ROB_RD_NUM_REG,"rd_num_reg",Tgeneral_address_t,_param->_size_general_register,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[it1]); |
---|
| 133 | _ALLOC2_SIGNAL_IN ( in_INSERT_ROB_RE_USE ,"re_use" ,Tcontrol_t ,1 ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[it1]); |
---|
| 134 | _ALLOC2_SIGNAL_IN ( in_INSERT_ROB_RE_NUM_REG,"re_num_reg",Tspecial_address_t,_param->_size_special_register,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob[it1]); |
---|
[78] | 135 | } |
---|
[88] | 136 | // // ~~~~~[ Interface "retire_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 137 | // { |
---|
| 138 | // ALLOC2_INTERFACE("retire_rob",IN, EAST, "Rename's stage : retire a new instruction in the Re Order Buffer",_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]); |
---|
[78] | 139 | |
---|
[88] | 140 | // _ALLOC2_VALACK_IN ( in_RETIRE_ROB_VAL,VAL,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]); |
---|
| 141 | // _ALLOC2_VALACK_OUT(out_RETIRE_ROB_ACK,ACK,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]); |
---|
[78] | 142 | |
---|
[88] | 143 | // _ALLOC2_SIGNAL_IN ( in_RETIRE_ROB_RD_OLD_USE ,"rd_old_use" ,Tcontrol_t ,1 ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]); |
---|
| 144 | // _ALLOC2_SIGNAL_IN ( in_RETIRE_ROB_RD_OLD_NUM_REG,"rd_old_num_reg",Tgeneral_address_t,_param->_size_general_register,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]); |
---|
| 145 | // _ALLOC2_SIGNAL_IN ( in_RETIRE_ROB_RD_NEW_USE ,"rd_new_use" ,Tcontrol_t ,1 ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]); |
---|
| 146 | // _ALLOC2_SIGNAL_IN ( in_RETIRE_ROB_RD_NEW_NUM_REG,"rd_new_num_reg",Tgeneral_address_t,_param->_size_general_register,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]); |
---|
| 147 | // _ALLOC2_SIGNAL_IN ( in_RETIRE_ROB_RE_OLD_USE ,"re_old_use" ,Tcontrol_t ,1 ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]); |
---|
| 148 | // _ALLOC2_SIGNAL_IN ( in_RETIRE_ROB_RE_OLD_NUM_REG,"re_old_num_reg",Tspecial_address_t,_param->_size_special_register,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]); |
---|
| 149 | // _ALLOC2_SIGNAL_IN ( in_RETIRE_ROB_RE_NEW_USE ,"re_new_use" ,Tcontrol_t ,1 ,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]); |
---|
| 150 | // _ALLOC2_SIGNAL_IN ( in_RETIRE_ROB_RE_NEW_NUM_REG,"re_new_num_reg",Tspecial_address_t,_param->_size_special_register,_param->_nb_ooo_engine,_param->_nb_inst_retire_rob[it1]); |
---|
| 151 | // } |
---|
[78] | 152 | |
---|
| 153 | // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 154 | std::string name; |
---|
[88] | 155 | |
---|
| 156 | { |
---|
| 157 | name = _name+"_glue"; |
---|
| 158 | log_printf(INFO,Core,FUNCTION,_("Create : %s"),name.c_str()); |
---|
| 159 | |
---|
| 160 | _component_glue = new morpheo::behavioural::core::multi_execute_loop::execute_loop::execute_loop_glue::Execute_loop_Glue |
---|
| 161 | (name.c_str() |
---|
| 162 | #ifdef STATISTICS |
---|
| 163 | ,param_statistics |
---|
| 164 | #endif |
---|
| 165 | ,_param->_param_glue |
---|
| 166 | ,_usage); |
---|
| 167 | |
---|
| 168 | _component->set_component (_component_glue->_component |
---|
| 169 | #ifdef POSITION |
---|
| 170 | , 50, 50, 10, 10 |
---|
| 171 | #endif |
---|
| 172 | ); |
---|
| 173 | } |
---|
[78] | 174 | |
---|
| 175 | _component_read_unit = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::Read_unit * [_param->_nb_read_unit]; |
---|
| 176 | for (uint32_t i=0; i<_param->_nb_read_unit; i++) |
---|
| 177 | { |
---|
| 178 | name = _name+"_read_unit_"+toString(i); |
---|
[88] | 179 | log_printf(INFO,Core,FUNCTION,_("Create : %s"),name.c_str()); |
---|
[78] | 180 | |
---|
| 181 | _component_read_unit [i] = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::Read_unit |
---|
| 182 | (name.c_str() |
---|
| 183 | #ifdef STATISTICS |
---|
| 184 | ,param_statistics |
---|
| 185 | #endif |
---|
[82] | 186 | ,_param->_param_read_unit[i] |
---|
| 187 | ,_usage); |
---|
[78] | 188 | |
---|
| 189 | _component->set_component (_component_read_unit [i]->_component |
---|
| 190 | #ifdef POSITION |
---|
| 191 | , 50, 50, 10, 10 |
---|
| 192 | #endif |
---|
| 193 | ); |
---|
| 194 | } |
---|
| 195 | |
---|
| 196 | _component_functionnal_unit = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::functionnal_unit::Functionnal_unit * [_param->_nb_functionnal_unit]; |
---|
| 197 | for (uint32_t i=0; i<_param->_nb_functionnal_unit; i++) |
---|
| 198 | { |
---|
| 199 | name = _name+"_functionnal_unit_"+toString(i); |
---|
[88] | 200 | log_printf(INFO,Core,FUNCTION,_("Create : %s"),name.c_str()); |
---|
[78] | 201 | |
---|
| 202 | _component_functionnal_unit [i] = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::functionnal_unit::Functionnal_unit |
---|
| 203 | (name.c_str() |
---|
| 204 | #ifdef STATISTICS |
---|
| 205 | ,param_statistics |
---|
| 206 | #endif |
---|
[82] | 207 | ,_param->_param_functionnal_unit[i] |
---|
| 208 | ,_usage); |
---|
[78] | 209 | |
---|
| 210 | _component->set_component (_component_functionnal_unit [i]->_component |
---|
| 211 | #ifdef POSITION |
---|
| 212 | , 50, 50, 10, 10 |
---|
| 213 | #endif |
---|
| 214 | ); |
---|
| 215 | } |
---|
| 216 | |
---|
| 217 | _component_load_store_unit = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Load_store_unit * [_param->_nb_load_store_unit]; |
---|
| 218 | for (uint32_t i=0; i<_param->_nb_load_store_unit; i++) |
---|
| 219 | { |
---|
| 220 | name = _name+"_load_store_unit_"+toString(i); |
---|
[88] | 221 | log_printf(INFO,Core,FUNCTION,_("Create : %s"),name.c_str()); |
---|
[78] | 222 | |
---|
| 223 | _component_load_store_unit [i] = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_execute_unit::execute_unit::load_store_unit::Load_store_unit |
---|
| 224 | (name.c_str() |
---|
| 225 | #ifdef STATISTICS |
---|
| 226 | ,param_statistics |
---|
| 227 | #endif |
---|
[82] | 228 | ,_param->_param_load_store_unit[i] |
---|
| 229 | ,_usage); |
---|
[78] | 230 | |
---|
| 231 | _component->set_component (_component_load_store_unit [i]->_component |
---|
| 232 | #ifdef POSITION |
---|
| 233 | , 50, 50, 10, 10 |
---|
| 234 | #endif |
---|
| 235 | ); |
---|
| 236 | } |
---|
| 237 | |
---|
| 238 | _component_write_unit = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::Write_unit * [_param->_nb_write_unit]; |
---|
| 239 | for (uint32_t i=0; i<_param->_nb_write_unit; i++) |
---|
| 240 | { |
---|
| 241 | name = _name+"_write_unit_"+toString(i); |
---|
[88] | 242 | log_printf(INFO,Core,FUNCTION,_("Create : %s"),name.c_str()); |
---|
[78] | 243 | |
---|
| 244 | _component_write_unit [i] = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::Write_unit |
---|
| 245 | (name.c_str() |
---|
| 246 | #ifdef STATISTICS |
---|
| 247 | ,param_statistics |
---|
| 248 | #endif |
---|
[82] | 249 | ,_param->_param_write_unit[i] |
---|
| 250 | ,_usage); |
---|
[78] | 251 | |
---|
| 252 | _component->set_component (_component_write_unit [i]->_component |
---|
| 253 | #ifdef POSITION |
---|
| 254 | , 50, 50, 10, 10 |
---|
| 255 | #endif |
---|
| 256 | ); |
---|
| 257 | } |
---|
| 258 | |
---|
| 259 | { |
---|
| 260 | name = _name+"_read_unit_to_execution_unit"; |
---|
[88] | 261 | log_printf(INFO,Core,FUNCTION,_("Create : %s"),name.c_str()); |
---|
[78] | 262 | |
---|
| 263 | _component_read_unit_to_execution_unit = new morpheo::behavioural::core::multi_execute_loop::execute_loop::network::read_unit_to_execution_unit::Read_unit_to_Execution_unit |
---|
| 264 | (name.c_str() |
---|
| 265 | #ifdef STATISTICS |
---|
| 266 | ,param_statistics |
---|
| 267 | #endif |
---|
[82] | 268 | ,_param->_param_read_unit_to_execution_unit |
---|
| 269 | ,_usage); |
---|
[78] | 270 | |
---|
| 271 | _component->set_component (_component_read_unit_to_execution_unit->_component |
---|
| 272 | #ifdef POSITION |
---|
| 273 | , 50, 50, 10, 10 |
---|
| 274 | #endif |
---|
| 275 | ); |
---|
| 276 | } |
---|
| 277 | |
---|
| 278 | { |
---|
| 279 | name = _name+"_execution_unit_to_write_unit"; |
---|
[88] | 280 | log_printf(INFO,Core,FUNCTION,_("Create : %s"),name.c_str()); |
---|
[78] | 281 | |
---|
| 282 | _component_execution_unit_to_write_unit = new morpheo::behavioural::core::multi_execute_loop::execute_loop::network::execution_unit_to_write_unit::Execution_unit_to_Write_unit |
---|
| 283 | (name.c_str() |
---|
| 284 | #ifdef STATISTICS |
---|
| 285 | ,param_statistics |
---|
| 286 | #endif |
---|
[82] | 287 | ,_param->_param_execution_unit_to_write_unit |
---|
| 288 | ,_usage); |
---|
[78] | 289 | |
---|
| 290 | _component->set_component (_component_execution_unit_to_write_unit->_component |
---|
| 291 | #ifdef POSITION |
---|
| 292 | , 50, 50, 10, 10 |
---|
| 293 | #endif |
---|
| 294 | ); |
---|
| 295 | } |
---|
| 296 | |
---|
| 297 | { |
---|
| 298 | name = _name+"_register_unit"; |
---|
[88] | 299 | log_printf(INFO,Core,FUNCTION,_("Create : %s"),name.c_str()); |
---|
[78] | 300 | |
---|
| 301 | _component_register_unit = new morpheo::behavioural::core::multi_execute_loop::execute_loop::register_unit::Register_unit |
---|
| 302 | (name.c_str() |
---|
| 303 | #ifdef STATISTICS |
---|
| 304 | ,param_statistics |
---|
| 305 | #endif |
---|
[82] | 306 | ,_param->_param_register_unit |
---|
| 307 | ,_usage); |
---|
[78] | 308 | |
---|
| 309 | _component->set_component (_component_register_unit->_component |
---|
| 310 | #ifdef POSITION |
---|
| 311 | , 50, 50, 10, 10 |
---|
| 312 | #endif |
---|
| 313 | ); |
---|
| 314 | } |
---|
| 315 | |
---|
| 316 | // ~~~~~[ Instanciation ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 317 | std::string src,dest; |
---|
| 318 | |
---|
| 319 | // =================================================================== |
---|
[88] | 320 | // =====[ GLUE ]====================================================== |
---|
| 321 | // =================================================================== |
---|
| 322 | { |
---|
| 323 | src = _name+"_glue"; |
---|
| 324 | log_printf(INFO,Core,FUNCTION,_("Instance : %s"),src.c_str()); |
---|
| 325 | |
---|
| 326 | { |
---|
| 327 | dest = _name; |
---|
| 328 | #ifdef POSITION |
---|
| 329 | _component->interface_map (src ,"", |
---|
| 330 | dest,""); |
---|
| 331 | #endif |
---|
| 332 | PORT_MAP(_component ,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
| 333 | PORT_MAP(_component ,src , "in_NRESET",dest, "in_NRESET"); |
---|
| 334 | } |
---|
| 335 | |
---|
| 336 | for (uint32_t i=0; i<_param->_nb_gpr_write; i++) |
---|
| 337 | { |
---|
| 338 | { |
---|
| 339 | dest = _name+"_write_unit_"+toString(i); |
---|
| 340 | |
---|
| 341 | #ifdef POSITION |
---|
| 342 | _component->interface_map (src ,"gpr_write_write_unit_"+toString(i), |
---|
| 343 | dest,"gpr_write"); |
---|
| 344 | #endif |
---|
| 345 | |
---|
| 346 | // in_GPR_WRITE_WRITE_UNIT_VAL |
---|
| 347 | // out_GPR_WRITE_WRITE_UNIT_ACK |
---|
| 348 | // in_GPR_WRITE_WRITE_UNIT_OOO_ENGINE_ID |
---|
| 349 | // in_GPR_WRITE_WRITE_UNIT_NUM_REG |
---|
| 350 | // in_GPR_WRITE_WRITE_UNIT_DATA |
---|
| 351 | } |
---|
| 352 | |
---|
| 353 | { |
---|
| 354 | dest = _name+"_register_unit"; |
---|
| 355 | |
---|
| 356 | #ifdef POSITION |
---|
| 357 | _component->interface_map (src ,"gpr_write_register_file_"+toString(i), |
---|
| 358 | dest,"gpr_write_"+toString(i)); |
---|
| 359 | #endif |
---|
| 360 | // out_GPR_WRITE_REGISTER_FILE_VAL |
---|
| 361 | // in_GPR_WRITE_REGISTER_FILE_ACK |
---|
| 362 | // out_GPR_WRITE_REGISTER_FILE_OOO_ENGINE_ID |
---|
| 363 | // out_GPR_WRITE_REGISTER_FILE_NUM_REG |
---|
| 364 | // out_GPR_WRITE_REGISTER_FILE_DATA |
---|
| 365 | } |
---|
| 366 | |
---|
| 367 | { |
---|
| 368 | dest = _name+"_read_unit_0"; |
---|
| 369 | |
---|
| 370 | #ifdef POSITION |
---|
| 371 | _component->interface_map (src ,"gpr_write_read_unit_"+toString(i), |
---|
| 372 | dest,"gpr_write"); |
---|
| 373 | #endif |
---|
| 374 | |
---|
| 375 | // out_GPR_WRITE_READ_UNIT_VAL |
---|
| 376 | // out_GPR_WRITE_READ_UNIT_OOO_ENGINE_ID |
---|
| 377 | // out_GPR_WRITE_READ_UNIT_NUM_REG |
---|
| 378 | // out_GPR_WRITE_READ_UNIT_DATA |
---|
| 379 | } |
---|
| 380 | } |
---|
| 381 | |
---|
| 382 | for (uint32_t i=0; i<_param->_nb_spr_write; i++) |
---|
| 383 | { |
---|
| 384 | { |
---|
| 385 | dest = _name+"_write_unit_"+toString(i); |
---|
| 386 | |
---|
| 387 | #ifdef POSITION |
---|
| 388 | _component->interface_map (src ,"spr_write_write_unit_"+toString(i), |
---|
| 389 | dest,"spr_write"); |
---|
| 390 | #endif |
---|
| 391 | |
---|
| 392 | // in_SPR_WRITE_WRITE_UNIT_VAL |
---|
| 393 | // out_SPR_WRITE_WRITE_UNIT_ACK |
---|
| 394 | // in_SPR_WRITE_WRITE_UNIT_OOO_ENGINE_ID |
---|
| 395 | // in_SPR_WRITE_WRITE_UNIT_NUM_REG |
---|
| 396 | // in_SPR_WRITE_WRITE_UNIT_DATA |
---|
| 397 | } |
---|
| 398 | |
---|
| 399 | { |
---|
| 400 | dest = _name+"_register_unit"; |
---|
| 401 | |
---|
| 402 | #ifdef POSITION |
---|
| 403 | _component->interface_map (src ,"spr_write_register_file_"+toString(i), |
---|
| 404 | dest,"spr_write_"+toString(i)); |
---|
| 405 | #endif |
---|
| 406 | // out_SPR_WRITE_REGISTER_FILE_VAL |
---|
| 407 | // in_SPR_WRITE_REGISTER_FILE_ACK |
---|
| 408 | // out_SPR_WRITE_REGISTER_FILE_OOO_ENGINE_ID |
---|
| 409 | // out_SPR_WRITE_REGISTER_FILE_NUM_REG |
---|
| 410 | // out_SPR_WRITE_REGISTER_FILE_DATA |
---|
| 411 | } |
---|
| 412 | |
---|
| 413 | { |
---|
| 414 | dest = _name+"_read_unit_0"; |
---|
| 415 | |
---|
| 416 | #ifdef POSITION |
---|
| 417 | _component->interface_map (src ,"spr_write_read_unit_"+toString(i), |
---|
| 418 | dest,"spr_write"); |
---|
| 419 | #endif |
---|
| 420 | |
---|
| 421 | // out_SPR_WRITE_READ_UNIT_VAL |
---|
| 422 | // out_SPR_WRITE_READ_UNIT_OOO_ENGINE_ID |
---|
| 423 | // out_SPR_WRITE_READ_UNIT_NUM_REG |
---|
| 424 | // out_SPR_WRITE_READ_UNIT_DATA |
---|
| 425 | } |
---|
| 426 | } |
---|
| 427 | |
---|
| 428 | |
---|
| 429 | } |
---|
| 430 | |
---|
| 431 | // =================================================================== |
---|
[78] | 432 | // =====[ READ_UNIT ]================================================= |
---|
| 433 | // =================================================================== |
---|
| 434 | { |
---|
| 435 | uint32_t it_read_unit_out = 0; |
---|
| 436 | |
---|
| 437 | for (uint32_t i=0; i<_param->_nb_read_unit; i++) |
---|
| 438 | { |
---|
| 439 | src = _name+"_read_unit_"+toString(i); |
---|
[88] | 440 | log_printf(INFO,Core,FUNCTION,_("Instance : %s"),src.c_str()); |
---|
[78] | 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 "read_unit_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 453 | { |
---|
| 454 | dest = _name; |
---|
| 455 | #ifdef POSITION |
---|
| 456 | _component->interface_map (src ,"read_unit_in", |
---|
| 457 | dest,"execute_loop_in_"+toString(i)); |
---|
| 458 | #endif |
---|
| 459 | |
---|
| 460 | PORT_MAP(_component ,src , "in_READ_UNIT_IN_VAL" ,dest , "in_EXECUTE_LOOP_IN_"+toString(i)+"_VAL" ); |
---|
| 461 | PORT_MAP(_component ,src ,"out_READ_UNIT_IN_ACK" ,dest ,"out_EXECUTE_LOOP_IN_"+toString(i)+"_ACK" ); |
---|
| 462 | if (_param->_have_port_context_id) |
---|
| 463 | PORT_MAP(_component ,src , "in_READ_UNIT_IN_CONTEXT_ID" ,dest , "in_EXECUTE_LOOP_IN_"+toString(i)+"_CONTEXT_ID" ); |
---|
| 464 | if (_param->_have_port_front_end_id) |
---|
| 465 | PORT_MAP(_component ,src , "in_READ_UNIT_IN_FRONT_END_ID" ,dest , "in_EXECUTE_LOOP_IN_"+toString(i)+"_FRONT_END_ID" ); |
---|
| 466 | if (_param->_have_port_ooo_engine_id) |
---|
| 467 | PORT_MAP(_component ,src , "in_READ_UNIT_IN_OOO_ENGINE_ID" ,dest , "in_EXECUTE_LOOP_IN_"+toString(i)+"_OOO_ENGINE_ID" ); |
---|
[88] | 468 | if (_param->_have_port_rob_ptr ) |
---|
[78] | 469 | PORT_MAP(_component ,src , "in_READ_UNIT_IN_PACKET_ID" ,dest , "in_EXECUTE_LOOP_IN_"+toString(i)+"_PACKET_ID" ); |
---|
| 470 | PORT_MAP(_component ,src , "in_READ_UNIT_IN_OPERATION" ,dest , "in_EXECUTE_LOOP_IN_"+toString(i)+"_OPERATION" ); |
---|
| 471 | PORT_MAP(_component ,src , "in_READ_UNIT_IN_TYPE" ,dest , "in_EXECUTE_LOOP_IN_"+toString(i)+"_TYPE" ); |
---|
| 472 | PORT_MAP(_component ,src , "in_READ_UNIT_IN_STORE_QUEUE_PTR_WRITE",dest , "in_EXECUTE_LOOP_IN_"+toString(i)+"_STORE_QUEUE_PTR_WRITE"); |
---|
| 473 | if (_param->_have_port_load_queue_ptr) |
---|
| 474 | PORT_MAP(_component ,src , "in_READ_UNIT_IN_LOAD_QUEUE_PTR_WRITE" ,dest , "in_EXECUTE_LOOP_IN_"+toString(i)+"_LOAD_QUEUE_PTR_WRITE" ); |
---|
| 475 | PORT_MAP(_component ,src , "in_READ_UNIT_IN_HAS_IMMEDIAT" ,dest , "in_EXECUTE_LOOP_IN_"+toString(i)+"_HAS_IMMEDIAT" ); |
---|
| 476 | PORT_MAP(_component ,src , "in_READ_UNIT_IN_IMMEDIAT" ,dest , "in_EXECUTE_LOOP_IN_"+toString(i)+"_IMMEDIAT" ); |
---|
| 477 | PORT_MAP(_component ,src , "in_READ_UNIT_IN_READ_RA" ,dest , "in_EXECUTE_LOOP_IN_"+toString(i)+"_READ_RA" ); |
---|
| 478 | PORT_MAP(_component ,src , "in_READ_UNIT_IN_NUM_REG_RA" ,dest , "in_EXECUTE_LOOP_IN_"+toString(i)+"_NUM_REG_RA" ); |
---|
| 479 | PORT_MAP(_component ,src , "in_READ_UNIT_IN_READ_RB" ,dest , "in_EXECUTE_LOOP_IN_"+toString(i)+"_READ_RB" ); |
---|
| 480 | PORT_MAP(_component ,src , "in_READ_UNIT_IN_NUM_REG_RB" ,dest , "in_EXECUTE_LOOP_IN_"+toString(i)+"_NUM_REG_RB" ); |
---|
| 481 | PORT_MAP(_component ,src , "in_READ_UNIT_IN_READ_RC" ,dest , "in_EXECUTE_LOOP_IN_"+toString(i)+"_READ_RC" ); |
---|
| 482 | PORT_MAP(_component ,src , "in_READ_UNIT_IN_NUM_REG_RC" ,dest , "in_EXECUTE_LOOP_IN_"+toString(i)+"_NUM_REG_RC" ); |
---|
| 483 | PORT_MAP(_component ,src , "in_READ_UNIT_IN_WRITE_RD" ,dest , "in_EXECUTE_LOOP_IN_"+toString(i)+"_WRITE_RD" ); |
---|
| 484 | PORT_MAP(_component ,src , "in_READ_UNIT_IN_NUM_REG_RD" ,dest , "in_EXECUTE_LOOP_IN_"+toString(i)+"_NUM_REG_RD" ); |
---|
| 485 | PORT_MAP(_component ,src , "in_READ_UNIT_IN_WRITE_RE" ,dest , "in_EXECUTE_LOOP_IN_"+toString(i)+"_WRITE_RE" ); |
---|
| 486 | PORT_MAP(_component ,src , "in_READ_UNIT_IN_NUM_REG_RE" ,dest , "in_EXECUTE_LOOP_IN_"+toString(i)+"_NUM_REG_RE" ); |
---|
| 487 | } |
---|
| 488 | |
---|
| 489 | // ~~~~~[ Interface "read_unit_out" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 490 | for (uint32_t j=0; j < _param->_nb_inst_retire[i]; j++) |
---|
| 491 | { |
---|
| 492 | dest = _name+"_read_unit_to_execution_unit"; |
---|
| 493 | |
---|
| 494 | #ifdef POSITION |
---|
[88] | 495 | _component->interface_map (src ,"read_unit_"+toString(j), |
---|
[78] | 496 | dest,"read_unit_"+toString(it_read_unit_out)); |
---|
| 497 | #endif |
---|
| 498 | |
---|
[88] | 499 | COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j )+"_VAL" , |
---|
| 500 | dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_VAL" ); |
---|
| 501 | COMPONENT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(j )+"_ACK" , |
---|
| 502 | dest,"out_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_ACK" ); |
---|
[78] | 503 | if (_param->_have_port_context_id) |
---|
[88] | 504 | COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j )+"_CONTEXT_ID" , |
---|
| 505 | dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_CONTEXT_ID" ); |
---|
[78] | 506 | if (_param->_have_port_front_end_id) |
---|
[88] | 507 | COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j )+"_FRONT_END_ID" , |
---|
| 508 | dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_FRONT_END_ID" ); |
---|
[78] | 509 | if (_param->_have_port_ooo_engine_id) |
---|
[88] | 510 | COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j )+"_OOO_ENGINE_ID" , |
---|
| 511 | dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_OOO_ENGINE_ID" ); |
---|
| 512 | if (_param->_have_port_rob_ptr ) |
---|
| 513 | COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j )+"_PACKET_ID" , |
---|
| 514 | dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_PACKET_ID" ); |
---|
| 515 | COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j )+"_OPERATION" , |
---|
| 516 | dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_OPERATION" ); |
---|
| 517 | COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j )+"_TYPE" , |
---|
| 518 | dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_TYPE" ); |
---|
| 519 | COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j )+"_STORE_QUEUE_PTR_WRITE", |
---|
| 520 | dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_STORE_QUEUE_PTR_WRITE"); |
---|
[78] | 521 | if (_param->_have_port_load_queue_ptr) |
---|
[88] | 522 | COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j )+"_LOAD_QUEUE_PTR_WRITE" , |
---|
| 523 | dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_LOAD_QUEUE_PTR_WRITE" ); |
---|
| 524 | COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j )+"_HAS_IMMEDIAT" , |
---|
| 525 | dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_HAS_IMMEDIAT" ); |
---|
| 526 | COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j )+"_IMMEDIAT" , |
---|
| 527 | dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_IMMEDIAT" ); |
---|
| 528 | COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j )+"_DATA_RA" , |
---|
| 529 | dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_DATA_RA" ); |
---|
| 530 | COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j )+"_DATA_RB" , |
---|
| 531 | dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_DATA_RB" ); |
---|
| 532 | COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j )+"_DATA_RC" , |
---|
| 533 | dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_DATA_RC" ); |
---|
| 534 | COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j )+"_WRITE_RD" , |
---|
| 535 | dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_WRITE_RD" ); |
---|
| 536 | COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j )+"_NUM_REG_RD" , |
---|
| 537 | dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_NUM_REG_RD" ); |
---|
| 538 | COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j )+"_WRITE_RE" , |
---|
| 539 | dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_WRITE_RE" ); |
---|
| 540 | COMPONENT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(j )+"_NUM_REG_RE" , |
---|
| 541 | dest, "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_"+toString(j)+"_NUM_REG_RE" ); |
---|
[78] | 542 | |
---|
| 543 | } |
---|
[88] | 544 | it_read_unit_out ++; |
---|
[78] | 545 | |
---|
| 546 | // ~~~~~[ Interface "gpr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 547 | { |
---|
| 548 | dest = _name+"_register_unit"; |
---|
| 549 | #ifdef POSITION |
---|
| 550 | _component->interface_map (src ,"gpr_read_0", |
---|
| 551 | dest,"gpr_read_"+toString(2*i )); |
---|
| 552 | _component->interface_map (src ,"gpr_read_1", |
---|
| 553 | dest,"gpr_read_"+toString(2*i+1)); |
---|
| 554 | #endif |
---|
[88] | 555 | COMPONENT_MAP(_component ,src ,"out_GPR_READ_0_VAL" , dest, "in_GPR_READ_"+toString(2*i )+"_VAL" ); |
---|
| 556 | COMPONENT_MAP(_component ,src , "in_GPR_READ_0_ACK" , dest,"out_GPR_READ_"+toString(2*i )+"_ACK" ); |
---|
[78] | 557 | if (_param->_have_port_ooo_engine_id) |
---|
[88] | 558 | COMPONENT_MAP(_component ,src ,"out_GPR_READ_0_OOO_ENGINE_ID", dest, "in_GPR_READ_"+toString(2*i )+"_OOO_ENGINE_ID"); |
---|
| 559 | COMPONENT_MAP(_component ,src ,"out_GPR_READ_0_NUM_REG" , dest, "in_GPR_READ_"+toString(2*i )+"_NUM_REG" ); |
---|
| 560 | COMPONENT_MAP(_component ,src , "in_GPR_READ_0_DATA" , dest,"out_GPR_READ_"+toString(2*i )+"_DATA" ); |
---|
| 561 | COMPONENT_MAP(_component ,src , "in_GPR_READ_0_DATA_VAL" , dest,"out_GPR_READ_"+toString(2*i )+"_DATA_VAL" ); |
---|
| 562 | COMPONENT_MAP(_component ,src ,"out_GPR_READ_1_VAL" , dest, "in_GPR_READ_"+toString(2*i+1)+"_VAL" ); |
---|
| 563 | COMPONENT_MAP(_component ,src , "in_GPR_READ_1_ACK" , dest,"out_GPR_READ_"+toString(2*i+1)+"_ACK" ); |
---|
[78] | 564 | if (_param->_have_port_ooo_engine_id) |
---|
[88] | 565 | COMPONENT_MAP(_component ,src ,"out_GPR_READ_1_OOO_ENGINE_ID", dest, "in_GPR_READ_"+toString(2*i+1)+"_OOO_ENGINE_ID"); |
---|
| 566 | COMPONENT_MAP(_component ,src ,"out_GPR_READ_1_NUM_REG" , dest, "in_GPR_READ_"+toString(2*i+1)+"_NUM_REG" ); |
---|
| 567 | COMPONENT_MAP(_component ,src , "in_GPR_READ_1_DATA" , dest,"out_GPR_READ_"+toString(2*i+1)+"_DATA" ); |
---|
| 568 | COMPONENT_MAP(_component ,src , "in_GPR_READ_1_DATA_VAL" , dest,"out_GPR_READ_"+toString(2*i+1)+"_DATA_VAL" ); |
---|
[78] | 569 | } |
---|
| 570 | |
---|
| 571 | // ~~~~~[ Interface "spr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 572 | { |
---|
| 573 | dest = _name+"_register_unit"; |
---|
| 574 | #ifdef POSITION |
---|
| 575 | _component->interface_map (src ,"spr_read_0", |
---|
[88] | 576 | dest,"spr_read_"+toString(i)); |
---|
[78] | 577 | #endif |
---|
[88] | 578 | COMPONENT_MAP(_component ,src ,"out_SPR_READ_0_VAL" , dest, "in_SPR_READ_"+toString(i)+"_VAL" ); |
---|
| 579 | COMPONENT_MAP(_component ,src , "in_SPR_READ_0_ACK" , dest,"out_SPR_READ_"+toString(i)+"_ACK" ); |
---|
[78] | 580 | if (_param->_have_port_ooo_engine_id) |
---|
[88] | 581 | COMPONENT_MAP(_component ,src ,"out_SPR_READ_0_OOO_ENGINE_ID", dest, "in_SPR_READ_"+toString(i)+"_OOO_ENGINE_ID"); |
---|
| 582 | COMPONENT_MAP(_component ,src ,"out_SPR_READ_0_NUM_REG" , dest, "in_SPR_READ_"+toString(i)+"_NUM_REG" ); |
---|
| 583 | COMPONENT_MAP(_component ,src , "in_SPR_READ_0_DATA" , dest,"out_SPR_READ_"+toString(i)+"_DATA" ); |
---|
| 584 | COMPONENT_MAP(_component ,src , "in_SPR_READ_0_DATA_VAL" , dest,"out_SPR_READ_"+toString(i)+"_DATA_VAL" ); |
---|
[78] | 585 | } |
---|
| 586 | |
---|
| 587 | // ~~~~~[ Interface "gpr_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 588 | uint32_t it_gpr_write = 0; |
---|
| 589 | for (std::set<uint32_t>::iterator it=_param->_set_read_unit_source_register_write[i].begin(); |
---|
| 590 | it!=_param->_set_read_unit_source_register_write[i].end(); |
---|
| 591 | it++) |
---|
| 592 | { |
---|
[88] | 593 | uint32_t num_port = (*it); |
---|
| 594 | |
---|
| 595 | dest = _name+"_glue"; |
---|
[78] | 596 | #ifdef POSITION |
---|
| 597 | _component->interface_map (src ,"gpr_write_"+toString(it_gpr_write), |
---|
[88] | 598 | dest,"gpr_write_read_unit_"+toString(num_port)); |
---|
[78] | 599 | #endif |
---|
| 600 | |
---|
[88] | 601 | COMPONENT_MAP(_component ,src , "in_GPR_WRITE_"+toString(it_gpr_write)+"_VAL" , |
---|
| 602 | dest,"out_GPR_WRITE_READ_UNIT_"+toString(num_port)+"_VAL" ); |
---|
[78] | 603 | if (_param->_have_port_ooo_engine_id) |
---|
[88] | 604 | COMPONENT_MAP(_component ,src , "in_GPR_WRITE_"+toString(it_gpr_write)+"_OOO_ENGINE_ID", |
---|
| 605 | dest,"out_GPR_WRITE_READ_UNIT_"+toString(num_port)+"_OOO_ENGINE_ID"); |
---|
| 606 | COMPONENT_MAP(_component ,src , "in_GPR_WRITE_"+toString(it_gpr_write)+"_NUM_REG" , |
---|
| 607 | dest,"out_GPR_WRITE_READ_UNIT_"+toString(num_port)+"_NUM_REG" ); |
---|
| 608 | COMPONENT_MAP(_component ,src , "in_GPR_WRITE_"+toString(it_gpr_write)+"_DATA" , |
---|
| 609 | dest,"out_GPR_WRITE_READ_UNIT_"+toString(num_port)+"_DATA" ); |
---|
[78] | 610 | |
---|
| 611 | it_gpr_write ++; |
---|
| 612 | } |
---|
| 613 | |
---|
| 614 | // ~~~~~[ Interface "spr_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 615 | uint32_t it_spr_write = 0; |
---|
| 616 | for (std::set<uint32_t>::iterator it=_param->_set_read_unit_source_register_write[i].begin(); |
---|
| 617 | it!=_param->_set_read_unit_source_register_write[i].end(); |
---|
| 618 | it++) |
---|
| 619 | { |
---|
[88] | 620 | uint32_t num_port = (*it); |
---|
| 621 | |
---|
| 622 | dest = _name+"_glue"; |
---|
[78] | 623 | #ifdef POSITION |
---|
| 624 | _component->interface_map (src ,"spr_write_"+toString(it_spr_write), |
---|
[88] | 625 | dest,"spr_write_read_unit_"+toString(num_port)); |
---|
[78] | 626 | #endif |
---|
| 627 | |
---|
[88] | 628 | COMPONENT_MAP(_component ,src , "in_SPR_WRITE_"+toString(it_spr_write)+"_VAL" , |
---|
| 629 | dest,"out_SPR_WRITE_READ_UNIT_"+toString(num_port)+"_VAL" ); |
---|
[78] | 630 | |
---|
| 631 | if (_param->_have_port_ooo_engine_id) |
---|
[88] | 632 | COMPONENT_MAP(_component ,src , "in_SPR_WRITE_"+toString(it_spr_write)+"_OOO_ENGINE_ID", |
---|
| 633 | dest,"out_SPR_WRITE_READ_UNIT_"+toString(num_port)+"_OOO_ENGINE_ID"); |
---|
| 634 | COMPONENT_MAP(_component ,src , "in_SPR_WRITE_"+toString(it_spr_write)+"_NUM_REG" , |
---|
| 635 | dest,"out_SPR_WRITE_READ_UNIT_"+toString(num_port)+"_NUM_REG" ); |
---|
| 636 | COMPONENT_MAP(_component ,src , "in_SPR_WRITE_"+toString(it_spr_write)+"_DATA" , |
---|
| 637 | dest,"out_SPR_WRITE_READ_UNIT_"+toString(num_port)+"_DATA" ); |
---|
| 638 | |
---|
[78] | 639 | it_spr_write ++; |
---|
| 640 | } |
---|
| 641 | |
---|
| 642 | // ~~~~~[ Interface "bypass_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 643 | uint32_t it_bypass_write = 0; |
---|
| 644 | for (std::set<uint32_t>::iterator it=_param->_set_read_unit_source_bypass_write[i].begin(); |
---|
| 645 | it!=_param->_set_read_unit_source_bypass_write[i].end(); |
---|
| 646 | it++) |
---|
| 647 | { |
---|
| 648 | dest = _name+"_write_unit_"+toString(*it); |
---|
| 649 | |
---|
| 650 | for (uint32_t j=0; j<_param->_nb_bypass_write[*it]; j++) |
---|
| 651 | { |
---|
| 652 | #ifdef POSITION |
---|
| 653 | _component->interface_map (src ,"bypass_write_"+toString(it_bypass_write), |
---|
| 654 | dest,"bypass_write_"+toString(j)); |
---|
| 655 | #endif |
---|
| 656 | |
---|
| 657 | if (_param->_have_port_ooo_engine_id) |
---|
[88] | 658 | COMPONENT_MAP(_component ,src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_OOO_ENGINE_ID", |
---|
| 659 | dest,"out_BYPASS_WRITE_"+toString(j )+"_OOO_ENGINE_ID"); |
---|
| 660 | COMPONENT_MAP(_component ,src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_GPR_VAL" , |
---|
| 661 | dest,"out_BYPASS_WRITE_"+toString(j )+"_GPR_VAL" ); |
---|
| 662 | COMPONENT_MAP(_component ,src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_GPR_NUM_REG" , |
---|
| 663 | dest,"out_BYPASS_WRITE_"+toString(j )+"_GPR_NUM_REG" ); |
---|
| 664 | COMPONENT_MAP(_component ,src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_GPR_DATA" , |
---|
| 665 | dest,"out_BYPASS_WRITE_"+toString(j )+"_GPR_DATA" ); |
---|
| 666 | COMPONENT_MAP(_component ,src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_SPR_VAL" , |
---|
| 667 | dest,"out_BYPASS_WRITE_"+toString(j )+"_SPR_VAL" ); |
---|
| 668 | COMPONENT_MAP(_component ,src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_SPR_NUM_REG" , |
---|
| 669 | dest,"out_BYPASS_WRITE_"+toString(j )+"_SPR_NUM_REG" ); |
---|
| 670 | COMPONENT_MAP(_component ,src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_SPR_DATA" , |
---|
| 671 | dest,"out_BYPASS_WRITE_"+toString(j )+"_SPR_DATA" ); |
---|
[78] | 672 | |
---|
| 673 | #ifdef POSITION |
---|
| 674 | _component->interface_map (dest,"bypass_write_"+toString(j), |
---|
| 675 | src ,"bypass_write_"+toString(it_bypass_write)); |
---|
| 676 | #endif |
---|
| 677 | |
---|
[88] | 678 | // if (_param->_have_port_ooo_engine_id) |
---|
| 679 | // PORT_MAP(_component ,dest,"out_BYPASS_WRITE_"+toString(j )+"_OOO_ENGINE_ID", |
---|
| 680 | // src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_OOO_ENGINE_ID"); |
---|
| 681 | // PORT_MAP(_component ,dest,"out_BYPASS_WRITE_"+toString(j )+"_GPR_VAL" , |
---|
| 682 | // src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_GPR_VAL" ); |
---|
| 683 | // PORT_MAP(_component ,dest,"out_BYPASS_WRITE_"+toString(j )+"_GPR_NUM_REG" , |
---|
| 684 | // src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_GPR_NUM_REG" ); |
---|
| 685 | // PORT_MAP(_component ,dest,"out_BYPASS_WRITE_"+toString(j )+"_GPR_DATA" , |
---|
| 686 | // src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_GPR_DATA" ); |
---|
| 687 | // PORT_MAP(_component ,dest,"out_BYPASS_WRITE_"+toString(j )+"_SPR_VAL" , |
---|
| 688 | // src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_SPR_VAL" ); |
---|
| 689 | // PORT_MAP(_component ,dest,"out_BYPASS_WRITE_"+toString(j )+"_SPR_NUM_REG" , |
---|
| 690 | // src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_SPR_NUM_REG" ); |
---|
| 691 | // PORT_MAP(_component ,dest,"out_BYPASS_WRITE_"+toString(j )+"_SPR_DATA" , |
---|
| 692 | // src , "in_BYPASS_WRITE_"+toString(it_bypass_write)+"_SPR_DATA" ); |
---|
[78] | 693 | |
---|
| 694 | it_bypass_write ++; |
---|
| 695 | } |
---|
| 696 | } |
---|
| 697 | |
---|
| 698 | // ~~~~~[ Interface "bypass_memory" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 699 | uint32_t it_bypass_memory = 0; |
---|
| 700 | for (std::set<uint32_t>::iterator it=_param->_set_read_unit_source_bypass_memory[i].begin(); |
---|
| 701 | it!=_param->_set_read_unit_source_bypass_memory[i].end(); |
---|
| 702 | it++) |
---|
| 703 | { |
---|
| 704 | dest = _name+"_load_store_unit_"+toString(_param->_translate_num_execute_unit[*it]); |
---|
| 705 | |
---|
| 706 | for (uint32_t j=0; j<_param->_nb_bypass_memory[_param->_translate_num_execute_unit[*it]]; j++) |
---|
| 707 | { |
---|
| 708 | #ifdef POSITION |
---|
| 709 | _component->interface_map (src ,"bypass_memory_"+toString(it_bypass_memory), |
---|
| 710 | dest,"bypass_memory_"+toString(j)); |
---|
| 711 | #endif |
---|
| 712 | |
---|
| 713 | if (_param->_have_port_ooo_engine_id) |
---|
[88] | 714 | COMPONENT_MAP(_component ,src , "in_BYPASS_MEMORY_"+toString(it_bypass_memory)+"_OOO_ENGINE_ID", |
---|
| 715 | dest,"out_BYPASS_MEMORY_"+toString(j )+"_OOO_ENGINE_ID"); |
---|
| 716 | COMPONENT_MAP(_component ,src , "in_BYPASS_MEMORY_"+toString(it_bypass_memory)+"_VAL" , |
---|
| 717 | dest,"out_BYPASS_MEMORY_"+toString(j )+"_VAL" ); |
---|
| 718 | COMPONENT_MAP(_component ,src , "in_BYPASS_MEMORY_"+toString(it_bypass_memory)+"_NUM_REG" , |
---|
| 719 | dest,"out_BYPASS_MEMORY_"+toString(j )+"_NUM_REG" ); |
---|
| 720 | COMPONENT_MAP(_component ,src , "in_BYPASS_MEMORY_"+toString(it_bypass_memory)+"_DATA" , |
---|
| 721 | dest,"out_BYPASS_MEMORY_"+toString(j )+"_DATA" ); |
---|
[78] | 722 | |
---|
| 723 | // port map to the "load_store_unit" component |
---|
| 724 | #ifdef POSITION |
---|
| 725 | _component->interface_map (dest,"bypass_memory_"+toString(j), |
---|
| 726 | src ,"bypass_memory_"+toString(it_bypass_memory)); |
---|
| 727 | #endif |
---|
| 728 | |
---|
[88] | 729 | // if (_param->_have_port_ooo_engine_id) |
---|
| 730 | // PORT_MAP(_component ,dest,"out_BYPASS_MEMORY_"+toString(j )+"_OOO_ENGINE_ID", |
---|
| 731 | // src , "in_BYPASS_MEMORY_"+toString(it_bypass_memory)+"_OOO_ENGINE_ID"); |
---|
| 732 | // PORT_MAP(_component ,dest,"out_BYPASS_MEMORY_"+toString(j )+"_VAL" , |
---|
| 733 | // src , "in_BYPASS_MEMORY_"+toString(it_bypass_memory)+"_VAL" ); |
---|
| 734 | // PORT_MAP(_component ,dest,"out_BYPASS_MEMORY_"+toString(j )+"_NUM_REG" , |
---|
| 735 | // src , "in_BYPASS_MEMORY_"+toString(it_bypass_memory)+"_NUM_REG" ); |
---|
| 736 | // PORT_MAP(_component ,dest,"out_BYPASS_MEMORY_"+toString(j )+"_DATA" , |
---|
| 737 | // src , "in_BYPASS_MEMORY_"+toString(it_bypass_memory)+"_DATA" ); |
---|
[78] | 738 | |
---|
| 739 | it_bypass_memory ++; |
---|
| 740 | } |
---|
| 741 | } |
---|
| 742 | } |
---|
| 743 | } |
---|
| 744 | |
---|
| 745 | // =================================================================== |
---|
| 746 | // =====[ EXECUTE_UNIT ]============================================== |
---|
| 747 | // =================================================================== |
---|
| 748 | for (uint32_t i=0; i<_param->_nb_execute_unit; i++) |
---|
| 749 | { |
---|
| 750 | uint32_t x=_param->_translate_num_execute_unit[i]; |
---|
| 751 | |
---|
| 752 | if (_param->_is_load_store_unit[i] == false) |
---|
| 753 | { |
---|
| 754 | // =================================================================== |
---|
| 755 | // =====[ FUNCTIONNAL_UNIT ]========================================== |
---|
| 756 | // =================================================================== |
---|
| 757 | |
---|
| 758 | src = _name+"_functionnal_unit_"+toString(x); |
---|
[88] | 759 | log_printf(INFO,Core,FUNCTION,_("Instance : %s"),src.c_str()); |
---|
[78] | 760 | |
---|
| 761 | { |
---|
| 762 | dest = _name; |
---|
| 763 | #ifdef POSITION |
---|
| 764 | _component->interface_map (src ,"", |
---|
| 765 | dest,""); |
---|
| 766 | #endif |
---|
| 767 | PORT_MAP(_component ,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
| 768 | PORT_MAP(_component ,src , "in_NRESET",dest, "in_NRESET"); |
---|
| 769 | } |
---|
| 770 | |
---|
| 771 | // ~~~~~[ Interface "execute_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 772 | { |
---|
| 773 | dest = _name+"_read_unit_to_execution_unit"; |
---|
| 774 | |
---|
| 775 | #ifdef POSITION |
---|
| 776 | _component->interface_map (src ,"execute_in", |
---|
[88] | 777 | dest,"execute_unit_in_"+toString(i)+"_0"); |
---|
[78] | 778 | #endif |
---|
| 779 | |
---|
[88] | 780 | COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_VAL" , |
---|
| 781 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_VAL" ); |
---|
| 782 | COMPONENT_MAP(_component ,src ,"out_EXECUTE_IN_ACK" , |
---|
| 783 | dest, "in_EXECUTE_UNIT_IN_"+toString(i)+"_0_ACK" ); |
---|
[78] | 784 | if (_param->_have_port_context_id) |
---|
[88] | 785 | COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_CONTEXT_ID" , |
---|
| 786 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_CONTEXT_ID" ); |
---|
[78] | 787 | if (_param->_have_port_front_end_id) |
---|
[88] | 788 | COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_FRONT_END_ID" , |
---|
| 789 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_FRONT_END_ID" ); |
---|
[78] | 790 | if (_param->_have_port_ooo_engine_id) |
---|
[88] | 791 | COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_OOO_ENGINE_ID" , |
---|
| 792 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_OOO_ENGINE_ID" ); |
---|
| 793 | if (_param->_have_port_rob_ptr ) |
---|
| 794 | COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_PACKET_ID" , |
---|
| 795 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_PACKET_ID" ); |
---|
| 796 | COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_OPERATION" , |
---|
| 797 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_OPERATION" ); |
---|
| 798 | COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_TYPE" , |
---|
| 799 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_TYPE" ); |
---|
| 800 | COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_STORE_QUEUE_PTR_WRITE", |
---|
| 801 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_STORE_QUEUE_PTR_WRITE"); |
---|
[78] | 802 | if (_param->_have_port_load_queue_ptr) |
---|
[88] | 803 | COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_LOAD_QUEUE_PTR_WRITE" , |
---|
| 804 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_LOAD_QUEUE_PTR_WRITE" ); |
---|
| 805 | COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_HAS_IMMEDIAT" , |
---|
| 806 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_HAS_IMMEDIAT" ); |
---|
| 807 | COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_IMMEDIAT" , |
---|
| 808 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_IMMEDIAT" ); |
---|
| 809 | COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_DATA_RA" , |
---|
| 810 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_DATA_RA" ); |
---|
| 811 | COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_DATA_RB" , |
---|
| 812 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_DATA_RB" ); |
---|
| 813 | COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_DATA_RC" , |
---|
| 814 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_DATA_RC" ); |
---|
| 815 | COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_WRITE_RD" , |
---|
| 816 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_WRITE_RD" ); |
---|
| 817 | COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_NUM_REG_RD" , |
---|
| 818 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_NUM_REG_RD" ); |
---|
| 819 | COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_WRITE_RE" , |
---|
| 820 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_WRITE_RE" ); |
---|
| 821 | COMPONENT_MAP(_component ,src , "in_EXECUTE_IN_NUM_REG_RE" , |
---|
| 822 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_0_NUM_REG_RE" ); |
---|
[78] | 823 | } |
---|
| 824 | |
---|
| 825 | // ~~~~~[ Interface "execute_out" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 826 | { |
---|
| 827 | dest = _name+"_execution_unit_to_write_unit"; |
---|
| 828 | |
---|
| 829 | #ifdef POSITION |
---|
| 830 | _component->interface_map (src ,"execute_out", |
---|
[88] | 831 | dest,"execute_unit_out_"+toString(i)+"_0"); |
---|
[78] | 832 | #endif |
---|
| 833 | |
---|
[88] | 834 | COMPONENT_MAP(_component ,src ,"out_EXECUTE_OUT_VAL" , |
---|
| 835 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_0_VAL" ); |
---|
| 836 | COMPONENT_MAP(_component ,src , "in_EXECUTE_OUT_ACK" , |
---|
| 837 | dest,"out_EXECUTE_UNIT_OUT_"+toString(i)+"_0_ACK" ); |
---|
[78] | 838 | if (_param->_have_port_context_id) |
---|
[88] | 839 | COMPONENT_MAP(_component ,src ,"out_EXECUTE_OUT_CONTEXT_ID" , |
---|
| 840 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_0_CONTEXT_ID" ); |
---|
[78] | 841 | if (_param->_have_port_front_end_id) |
---|
[88] | 842 | COMPONENT_MAP(_component ,src ,"out_EXECUTE_OUT_FRONT_END_ID" , |
---|
| 843 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_0_FRONT_END_ID" ); |
---|
[78] | 844 | if (_param->_have_port_ooo_engine_id) |
---|
[88] | 845 | COMPONENT_MAP(_component ,src ,"out_EXECUTE_OUT_OOO_ENGINE_ID", |
---|
| 846 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_0_OOO_ENGINE_ID"); |
---|
| 847 | if (_param->_have_port_rob_ptr ) |
---|
| 848 | COMPONENT_MAP(_component ,src ,"out_EXECUTE_OUT_PACKET_ID" , |
---|
| 849 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_0_PACKET_ID" ); |
---|
| 850 | // COMPONENT_MAP(_component ,src ,"out_EXECUTE_OUT_OPERATION" , |
---|
| 851 | // dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_0_OPERATION" ); |
---|
| 852 | COMPONENT_MAP(_component ,src ,"out_EXECUTE_OUT_TYPE" , |
---|
| 853 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_0_TYPE" ); |
---|
| 854 | COMPONENT_MAP(_component ,src ,"out_EXECUTE_OUT_WRITE_RD" , |
---|
| 855 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_0_WRITE_RD" ); |
---|
| 856 | COMPONENT_MAP(_component ,src ,"out_EXECUTE_OUT_NUM_REG_RD" , |
---|
| 857 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_0_NUM_REG_RD" ); |
---|
| 858 | COMPONENT_MAP(_component ,src ,"out_EXECUTE_OUT_DATA_RD" , |
---|
| 859 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_0_DATA_RD" ); |
---|
| 860 | COMPONENT_MAP(_component ,src ,"out_EXECUTE_OUT_WRITE_RE" , |
---|
| 861 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_0_WRITE_RE" ); |
---|
| 862 | COMPONENT_MAP(_component ,src ,"out_EXECUTE_OUT_NUM_REG_RE" , |
---|
| 863 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_0_NUM_REG_RE" ); |
---|
| 864 | COMPONENT_MAP(_component ,src ,"out_EXECUTE_OUT_DATA_RE" , |
---|
| 865 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_0_DATA_RE" ); |
---|
| 866 | COMPONENT_MAP(_component ,src ,"out_EXECUTE_OUT_EXCEPTION" , |
---|
| 867 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_0_EXCEPTION" ); |
---|
| 868 | COMPONENT_MAP(_component ,src ,"out_EXECUTE_OUT_NO_SEQUENCE" , |
---|
| 869 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_0_NO_SEQUENCE" ); |
---|
| 870 | COMPONENT_MAP(_component ,src ,"out_EXECUTE_OUT_ADDRESS" , |
---|
| 871 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_0_ADDRESS" ); |
---|
[78] | 872 | } |
---|
| 873 | } |
---|
| 874 | else |
---|
| 875 | { |
---|
| 876 | // =================================================================== |
---|
| 877 | // =====[ LOAD_STORE_UNIT ]=========================================== |
---|
| 878 | // =================================================================== |
---|
| 879 | |
---|
| 880 | src = _name+"_load_store_unit_"+toString(x); |
---|
[88] | 881 | log_printf(INFO,Core,FUNCTION,_("Instance : %s"),src.c_str()); |
---|
[78] | 882 | |
---|
| 883 | // ~~~~~[ Interface "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 884 | { |
---|
| 885 | dest = _name; |
---|
| 886 | #ifdef POSITION |
---|
| 887 | _component->interface_map (src ,"", |
---|
| 888 | dest,""); |
---|
| 889 | #endif |
---|
| 890 | PORT_MAP(_component ,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
| 891 | PORT_MAP(_component ,src , "in_NRESET",dest, "in_NRESET"); |
---|
| 892 | } |
---|
| 893 | |
---|
| 894 | // ~~~~~[ Interface "memory_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
[88] | 895 | for (uint32_t j=0; j<_param->_nb_inst_memory [x]; j++) |
---|
| 896 | { |
---|
| 897 | dest = _name+"_read_unit_to_execution_unit"; |
---|
| 898 | |
---|
[78] | 899 | #ifdef POSITION |
---|
[88] | 900 | _component->interface_map (src ,"memory_in_"+toString(j), |
---|
| 901 | dest,"execute_unit_in_"+toString(i)+"_"+toString(j)); |
---|
[78] | 902 | #endif |
---|
| 903 | |
---|
[88] | 904 | COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_VAL" , |
---|
| 905 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_VAL" ); |
---|
| 906 | COMPONENT_MAP(_component ,src ,"out_MEMORY_IN_"+toString(j)+"_ACK" , |
---|
| 907 | dest, "in_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_ACK" ); |
---|
| 908 | if (_param->_have_port_context_id) |
---|
| 909 | COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_CONTEXT_ID" , |
---|
| 910 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_CONTEXT_ID" ); |
---|
| 911 | if (_param->_have_port_front_end_id) |
---|
| 912 | COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_FRONT_END_ID" , |
---|
| 913 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_FRONT_END_ID" ); |
---|
| 914 | if (_param->_have_port_ooo_engine_id) |
---|
| 915 | COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_OOO_ENGINE_ID" , |
---|
| 916 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_OOO_ENGINE_ID" ); |
---|
| 917 | if (_param->_have_port_rob_ptr ) |
---|
| 918 | COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_PACKET_ID" , |
---|
| 919 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_PACKET_ID" ); |
---|
| 920 | COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_OPERATION" , |
---|
| 921 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_OPERATION" ); |
---|
| 922 | COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_TYPE" , |
---|
| 923 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_TYPE" ); |
---|
| 924 | COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_STORE_QUEUE_PTR_WRITE", |
---|
| 925 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_STORE_QUEUE_PTR_WRITE"); |
---|
| 926 | if (_param->_have_port_load_queue_ptr) |
---|
| 927 | COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_LOAD_QUEUE_PTR_WRITE" , |
---|
| 928 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_LOAD_QUEUE_PTR_WRITE" ); |
---|
| 929 | COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_HAS_IMMEDIAT" , |
---|
| 930 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_HAS_IMMEDIAT" ); |
---|
| 931 | COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_IMMEDIAT" , |
---|
| 932 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_IMMEDIAT" ); |
---|
| 933 | COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_DATA_RA" , |
---|
| 934 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_DATA_RA" ); |
---|
| 935 | COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_DATA_RB" , |
---|
| 936 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_DATA_RB" ); |
---|
| 937 | COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_DATA_RC" , |
---|
| 938 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_DATA_RC" ); |
---|
| 939 | COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_WRITE_RD" , |
---|
| 940 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_WRITE_RD" ); |
---|
| 941 | COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_NUM_REG_RD" , |
---|
| 942 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_NUM_REG_RD" ); |
---|
| 943 | COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_WRITE_RE" , |
---|
| 944 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_WRITE_RE" ); |
---|
| 945 | COMPONENT_MAP(_component ,src , "in_MEMORY_IN_"+toString(j)+"_NUM_REG_RE" , |
---|
| 946 | dest,"out_EXECUTE_UNIT_IN_"+toString(i)+"_"+toString(j)+"_NUM_REG_RE" ); |
---|
| 947 | } |
---|
[78] | 948 | |
---|
| 949 | // ~~~~~[ Interface "memory_out" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
[88] | 950 | for (uint32_t j=0; j<_param->_nb_inst_memory [x]; j++) |
---|
| 951 | { |
---|
[78] | 952 | dest = _name+"_execution_unit_to_write_unit"; |
---|
| 953 | |
---|
| 954 | #ifdef POSITION |
---|
[88] | 955 | _component->interface_map (src ,"memory_out_"+toString(j) |
---|
| 956 | dest,"execute_unit_out_"+toString(i)+"_"+toString(j)); |
---|
[78] | 957 | #endif |
---|
| 958 | |
---|
[88] | 959 | COMPONENT_MAP(_component ,src ,"out_MEMORY_OUT_"+toString(j)+"_VAL" , |
---|
| 960 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_"+toString(j)+"_VAL" ); |
---|
| 961 | COMPONENT_MAP(_component ,src , "in_MEMORY_OUT_"+toString(j)+"_ACK" , |
---|
| 962 | dest,"out_EXECUTE_UNIT_OUT_"+toString(i)+"_"+toString(j)+"_ACK" ); |
---|
[78] | 963 | if (_param->_have_port_context_id) |
---|
[88] | 964 | COMPONENT_MAP(_component ,src ,"out_MEMORY_OUT_"+toString(j)+"_CONTEXT_ID" , |
---|
| 965 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_"+toString(j)+"_CONTEXT_ID" ); |
---|
[78] | 966 | if (_param->_have_port_front_end_id) |
---|
[88] | 967 | COMPONENT_MAP(_component ,src ,"out_MEMORY_OUT_"+toString(j)+"_FRONT_END_ID" , |
---|
| 968 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_"+toString(j)+"_FRONT_END_ID" ); |
---|
[78] | 969 | if (_param->_have_port_ooo_engine_id) |
---|
[88] | 970 | COMPONENT_MAP(_component ,src ,"out_MEMORY_OUT_"+toString(j)+"_OOO_ENGINE_ID", |
---|
| 971 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_"+toString(j)+"_OOO_ENGINE_ID"); |
---|
| 972 | if (_param->_have_port_rob_ptr ) |
---|
| 973 | COMPONENT_MAP(_component ,src ,"out_MEMORY_OUT_"+toString(j)+"_PACKET_ID" , |
---|
| 974 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_"+toString(j)+"_PACKET_ID" ); |
---|
| 975 | // COMPONENT_MAP(_component ,src ,"out_MEMORY_OUT_"+toString(j)+"_OPERATION" , |
---|
| 976 | // dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_"+toString(j)+"_OPERATION" ); |
---|
| 977 | COMPONENT_MAP(_component ,src ,"out_MEMORY_OUT_"+toString(j)+"_TYPE" , |
---|
| 978 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_"+toString(j)+"_TYPE" ); |
---|
| 979 | COMPONENT_MAP(_component ,src ,"out_MEMORY_OUT_"+toString(j)+"_WRITE_RD" , |
---|
| 980 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_"+toString(j)+"_WRITE_RD" ); |
---|
| 981 | COMPONENT_MAP(_component ,src ,"out_MEMORY_OUT_"+toString(j)+"_NUM_REG_RD" , |
---|
| 982 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_"+toString(j)+"_NUM_REG_RD" ); |
---|
| 983 | COMPONENT_MAP(_component ,src ,"out_MEMORY_OUT_"+toString(j)+"_DATA_RD" , |
---|
| 984 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_"+toString(j)+"_DATA_RD" ); |
---|
| 985 | COMPONENT_MAP(_component ,src ,"out_MEMORY_OUT_"+toString(j)+"_WRITE_RE" , |
---|
| 986 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_"+toString(j)+"_WRITE_RE" ); |
---|
| 987 | COMPONENT_MAP(_component ,src ,"out_MEMORY_OUT_"+toString(j)+"_NUM_REG_RE" , |
---|
| 988 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_"+toString(j)+"_NUM_REG_RE" ); |
---|
| 989 | COMPONENT_MAP(_component ,src ,"out_MEMORY_OUT_"+toString(j)+"_DATA_RE" , |
---|
| 990 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_"+toString(j)+"_DATA_RE" ); |
---|
| 991 | COMPONENT_MAP(_component ,src ,"out_MEMORY_OUT_"+toString(j)+"_EXCEPTION" , |
---|
| 992 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_"+toString(j)+"_EXCEPTION" ); |
---|
| 993 | COMPONENT_MAP(_component ,src ,"out_MEMORY_OUT_"+toString(j)+"_NO_SEQUENCE" , |
---|
| 994 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_"+toString(j)+"_NO_SEQUENCE" ); |
---|
| 995 | COMPONENT_MAP(_component ,src ,"out_MEMORY_OUT_"+toString(j)+"_ADDRESS" , |
---|
| 996 | dest, "in_EXECUTE_UNIT_OUT_"+toString(i)+"_"+toString(j)+"_ADDRESS" ); |
---|
[78] | 997 | } |
---|
[88] | 998 | |
---|
[78] | 999 | // ~~~~~[ Interface "dcache_req" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
[88] | 1000 | for (uint32_t j=0; j<_param->_nb_cache_port [x]; j++) |
---|
[78] | 1001 | { |
---|
| 1002 | dest = _name; |
---|
| 1003 | |
---|
| 1004 | #ifdef POSITION |
---|
[88] | 1005 | _component->interface_map (src ,"dcache_req_"+toString(j), |
---|
| 1006 | dest,"dcache_req_"+toString(x)+"_"+toString(j)); |
---|
[78] | 1007 | #endif |
---|
[88] | 1008 | PORT_MAP(_component ,src ,"out_DCACHE_REQ_"+toString(j)+"_VAL" ,dest,"out_DCACHE_REQ_"+toString(x)+"_"+toString(j)+"_VAL" ); |
---|
| 1009 | PORT_MAP(_component ,src , "in_DCACHE_REQ_"+toString(j)+"_ACK" ,dest, "in_DCACHE_REQ_"+toString(x)+"_"+toString(j)+"_ACK" ); |
---|
[78] | 1010 | if (_param->_have_port_dcache_context_id) |
---|
[88] | 1011 | PORT_MAP(_component ,src ,"out_DCACHE_REQ_"+toString(j)+"_CONTEXT_ID",dest,"out_DCACHE_REQ_"+toString(x)+"_"+toString(j)+"_CONTEXT_ID"); |
---|
| 1012 | PORT_MAP(_component ,src ,"out_DCACHE_REQ_"+toString(j)+"_PACKET_ID" ,dest,"out_DCACHE_REQ_"+toString(x)+"_"+toString(j)+"_PACKET_ID" ); |
---|
| 1013 | PORT_MAP(_component ,src ,"out_DCACHE_REQ_"+toString(j)+"_ADDRESS" ,dest,"out_DCACHE_REQ_"+toString(x)+"_"+toString(j)+"_ADDRESS" ); |
---|
| 1014 | PORT_MAP(_component ,src ,"out_DCACHE_REQ_"+toString(j)+"_TYPE" ,dest,"out_DCACHE_REQ_"+toString(x)+"_"+toString(j)+"_TYPE" ); |
---|
| 1015 | PORT_MAP(_component ,src ,"out_DCACHE_REQ_"+toString(j)+"_WDATA" ,dest,"out_DCACHE_REQ_"+toString(x)+"_"+toString(j)+"_WDATA" ); |
---|
[78] | 1016 | } |
---|
| 1017 | |
---|
| 1018 | // ~~~~~[ Interface "dcache_rsp" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
[88] | 1019 | for (uint32_t j=0; j<_param->_nb_cache_port [x]; j++) |
---|
[78] | 1020 | { |
---|
| 1021 | dest = _name; |
---|
| 1022 | |
---|
| 1023 | #ifdef POSITION |
---|
[88] | 1024 | _component->interface_map (src ,"dcache_rsp_"+toString(j), |
---|
| 1025 | dest,"dcache_rsp_"+toString(x)+"_"+toString(j)); |
---|
[78] | 1026 | #endif |
---|
[88] | 1027 | PORT_MAP(_component ,src , "in_DCACHE_RSP_"+toString(j)+"_VAL" ,dest, "in_DCACHE_RSP_"+toString(x)+"_"+toString(j)+"_VAL" ); |
---|
| 1028 | PORT_MAP(_component ,src ,"out_DCACHE_RSP_"+toString(j)+"_ACK" ,dest,"out_DCACHE_RSP_"+toString(x)+"_"+toString(j)+"_ACK" ); |
---|
[78] | 1029 | if (_param->_have_port_dcache_context_id) |
---|
[88] | 1030 | PORT_MAP(_component ,src , "in_DCACHE_RSP_"+toString(j)+"_CONTEXT_ID",dest, "in_DCACHE_RSP_"+toString(x)+"_"+toString(j)+"_CONTEXT_ID"); |
---|
| 1031 | PORT_MAP(_component ,src , "in_DCACHE_RSP_"+toString(j)+"_PACKET_ID" ,dest, "in_DCACHE_RSP_"+toString(x)+"_"+toString(j)+"_PACKET_ID" ); |
---|
| 1032 | PORT_MAP(_component ,src , "in_DCACHE_RSP_"+toString(j)+"_RDATA" ,dest, "in_DCACHE_RSP_"+toString(x)+"_"+toString(j)+"_RDATA" ); |
---|
| 1033 | PORT_MAP(_component ,src , "in_DCACHE_RSP_"+toString(j)+"_ERROR" ,dest, "in_DCACHE_RSP_"+toString(x)+"_"+toString(j)+"_ERROR" ); |
---|
[78] | 1034 | } |
---|
| 1035 | |
---|
| 1036 | // ~~~~~[ Interface "bypass_memory" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 1037 | { |
---|
| 1038 | // Port map with "read_unit" is ok! |
---|
| 1039 | } |
---|
| 1040 | } |
---|
| 1041 | } |
---|
| 1042 | |
---|
| 1043 | // =================================================================== |
---|
| 1044 | // =====[ WRITE_UNIT ]================================================ |
---|
| 1045 | // =================================================================== |
---|
| 1046 | for (uint32_t i=0; i<_param->_nb_write_unit; i++) |
---|
| 1047 | { |
---|
| 1048 | src = _name+"_write_unit_"+toString(i); |
---|
[88] | 1049 | log_printf(INFO,Core,FUNCTION,_("Instance : %s"),src.c_str()); |
---|
[78] | 1050 | |
---|
| 1051 | { |
---|
| 1052 | dest = _name; |
---|
| 1053 | #ifdef POSITION |
---|
| 1054 | _component->interface_map (src ,"", |
---|
| 1055 | dest,""); |
---|
| 1056 | #endif |
---|
| 1057 | PORT_MAP(_component ,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
| 1058 | PORT_MAP(_component ,src , "in_NRESET",dest, "in_NRESET"); |
---|
| 1059 | } |
---|
| 1060 | |
---|
| 1061 | // -----[ Interface "write_unit_in" ]--------------------------------- |
---|
| 1062 | { |
---|
| 1063 | dest = _name+"_execution_unit_to_write_unit"; |
---|
| 1064 | #ifdef POSITION |
---|
| 1065 | _component->interface_map (src ,"write_unit_in", |
---|
| 1066 | dest,"execute_unit_in_"+toString(i)); |
---|
| 1067 | #endif |
---|
| 1068 | |
---|
[88] | 1069 | COMPONENT_MAP(_component ,src , "in_WRITE_UNIT_IN_VAL" , |
---|
| 1070 | dest,"out_WRITE_UNIT_IN_"+toString(i)+"_VAL" ); |
---|
| 1071 | COMPONENT_MAP(_component ,src ,"out_WRITE_UNIT_IN_ACK" , |
---|
| 1072 | dest, "in_WRITE_UNIT_IN_"+toString(i)+"_ACK" ); |
---|
[78] | 1073 | if (_param->_have_port_context_id) |
---|
[88] | 1074 | COMPONENT_MAP(_component ,src , "in_WRITE_UNIT_IN_CONTEXT_ID" , |
---|
| 1075 | dest,"out_WRITE_UNIT_IN_"+toString(i)+"_CONTEXT_ID" ); |
---|
[78] | 1076 | if (_param->_have_port_front_end_id) |
---|
[88] | 1077 | COMPONENT_MAP(_component ,src , "in_WRITE_UNIT_IN_FRONT_END_ID" , |
---|
| 1078 | dest,"out_WRITE_UNIT_IN_"+toString(i)+"_FRONT_END_ID" ); |
---|
[78] | 1079 | if (_param->_have_port_ooo_engine_id) |
---|
[88] | 1080 | COMPONENT_MAP(_component ,src , "in_WRITE_UNIT_IN_OOO_ENGINE_ID", |
---|
| 1081 | dest,"out_WRITE_UNIT_IN_"+toString(i)+"_OOO_ENGINE_ID"); |
---|
| 1082 | if (_param->_have_port_rob_ptr ) |
---|
| 1083 | COMPONENT_MAP(_component ,src , "in_WRITE_UNIT_IN_PACKET_ID" , |
---|
| 1084 | dest,"out_WRITE_UNIT_IN_"+toString(i)+"_PACKET_ID" ); |
---|
| 1085 | // COMPONENT_MAP(_component ,src , "in_WRITE_UNIT_IN_OPERATION" , |
---|
| 1086 | // dest,"out_WRITE_UNIT_IN_"+toString(i)+"_OPERATION" ); |
---|
| 1087 | COMPONENT_MAP(_component ,src , "in_WRITE_UNIT_IN_TYPE" , |
---|
| 1088 | dest,"out_WRITE_UNIT_IN_"+toString(i)+"_TYPE" ); |
---|
| 1089 | COMPONENT_MAP(_component ,src , "in_WRITE_UNIT_IN_WRITE_RD" , |
---|
| 1090 | dest,"out_WRITE_UNIT_IN_"+toString(i)+"_WRITE_RD" ); |
---|
| 1091 | COMPONENT_MAP(_component ,src , "in_WRITE_UNIT_IN_NUM_REG_RD" , |
---|
| 1092 | dest,"out_WRITE_UNIT_IN_"+toString(i)+"_NUM_REG_RD" ); |
---|
| 1093 | COMPONENT_MAP(_component ,src , "in_WRITE_UNIT_IN_DATA_RD" , |
---|
| 1094 | dest,"out_WRITE_UNIT_IN_"+toString(i)+"_DATA_RD" ); |
---|
| 1095 | COMPONENT_MAP(_component ,src , "in_WRITE_UNIT_IN_WRITE_RE" , |
---|
| 1096 | dest,"out_WRITE_UNIT_IN_"+toString(i)+"_WRITE_RE" ); |
---|
| 1097 | COMPONENT_MAP(_component ,src , "in_WRITE_UNIT_IN_NUM_REG_RE" , |
---|
| 1098 | dest,"out_WRITE_UNIT_IN_"+toString(i)+"_NUM_REG_RE" ); |
---|
| 1099 | COMPONENT_MAP(_component ,src , "in_WRITE_UNIT_IN_DATA_RE" , |
---|
| 1100 | dest,"out_WRITE_UNIT_IN_"+toString(i)+"_DATA_RE" ); |
---|
| 1101 | COMPONENT_MAP(_component ,src , "in_WRITE_UNIT_IN_EXCEPTION" , |
---|
| 1102 | dest,"out_WRITE_UNIT_IN_"+toString(i)+"_EXCEPTION" ); |
---|
| 1103 | COMPONENT_MAP(_component ,src , "in_WRITE_UNIT_IN_NO_SEQUENCE" , |
---|
| 1104 | dest,"out_WRITE_UNIT_IN_"+toString(i)+"_NO_SEQUENCE" ); |
---|
| 1105 | COMPONENT_MAP(_component ,src , "in_WRITE_UNIT_IN_ADDRESS" , |
---|
| 1106 | dest,"out_WRITE_UNIT_IN_"+toString(i)+"_ADDRESS" ); |
---|
[78] | 1107 | } |
---|
| 1108 | |
---|
| 1109 | // -----[ Interface "write_unit_out" ]-------------------------------- |
---|
| 1110 | { |
---|
| 1111 | dest = _name; |
---|
| 1112 | #ifdef POSITION |
---|
| 1113 | _component->interface_map (src ,"write_unit_out", |
---|
| 1114 | dest,"execute_loop_out_"+toString(i)); |
---|
| 1115 | #endif |
---|
| 1116 | |
---|
| 1117 | PORT_MAP(_component ,src ,"out_WRITE_UNIT_OUT_VAL" , |
---|
| 1118 | dest,"out_EXECUTE_LOOP_OUT_"+toString(i)+"_VAL" ); |
---|
| 1119 | PORT_MAP(_component ,src , "in_WRITE_UNIT_OUT_ACK" , |
---|
| 1120 | dest, "in_EXECUTE_LOOP_OUT_"+toString(i)+"_ACK" ); |
---|
| 1121 | if (_param->_have_port_context_id) |
---|
| 1122 | PORT_MAP(_component ,src ,"out_WRITE_UNIT_OUT_CONTEXT_ID" , |
---|
| 1123 | dest,"out_EXECUTE_LOOP_OUT_"+toString(i)+"_CONTEXT_ID" ); |
---|
| 1124 | if (_param->_have_port_front_end_id) |
---|
| 1125 | PORT_MAP(_component ,src ,"out_WRITE_UNIT_OUT_FRONT_END_ID" , |
---|
| 1126 | dest,"out_EXECUTE_LOOP_OUT_"+toString(i)+"_FRONT_END_ID" ); |
---|
| 1127 | if (_param->_have_port_ooo_engine_id) |
---|
| 1128 | PORT_MAP(_component ,src ,"out_WRITE_UNIT_OUT_OOO_ENGINE_ID", |
---|
| 1129 | dest,"out_EXECUTE_LOOP_OUT_"+toString(i)+"_OOO_ENGINE_ID"); |
---|
[88] | 1130 | if (_param->_have_port_rob_ptr ) |
---|
[78] | 1131 | PORT_MAP(_component ,src ,"out_WRITE_UNIT_OUT_PACKET_ID" , |
---|
| 1132 | dest,"out_EXECUTE_LOOP_OUT_"+toString(i)+"_PACKET_ID" ); |
---|
| 1133 | // PORT_MAP(_component ,src ,"out_WRITE_UNIT_OUT_OPERATION" , |
---|
| 1134 | // dest,"out_EXECUTE_LOOP_OUT_"+toString(i)+"_OPERATION" ); |
---|
| 1135 | // PORT_MAP(_component ,src ,"out_WRITE_UNIT_OUT_TYPE" , |
---|
| 1136 | // dest,"out_EXECUTE_LOOP_OUT_"+toString(i)+"_TYPE" ); |
---|
| 1137 | PORT_MAP(_component ,src ,"out_WRITE_UNIT_OUT_FLAGS" , |
---|
| 1138 | dest,"out_EXECUTE_LOOP_OUT_"+toString(i)+"_FLAGS" ); |
---|
| 1139 | PORT_MAP(_component ,src ,"out_WRITE_UNIT_OUT_EXCEPTION" , |
---|
| 1140 | dest,"out_EXECUTE_LOOP_OUT_"+toString(i)+"_EXCEPTION" ); |
---|
| 1141 | PORT_MAP(_component ,src ,"out_WRITE_UNIT_OUT_NO_SEQUENCE" , |
---|
| 1142 | dest,"out_EXECUTE_LOOP_OUT_"+toString(i)+"_NO_SEQUENCE" ); |
---|
| 1143 | PORT_MAP(_component ,src ,"out_WRITE_UNIT_OUT_ADDRESS" , |
---|
| 1144 | dest,"out_EXECUTE_LOOP_OUT_"+toString(i)+"_ADDRESS" ); |
---|
[88] | 1145 | PORT_MAP(_component ,src ,"out_WRITE_UNIT_OUT_DATA" , |
---|
| 1146 | dest,"out_EXECUTE_LOOP_OUT_"+toString(i)+"_DATA" ); |
---|
[78] | 1147 | } |
---|
[88] | 1148 | |
---|
[78] | 1149 | // -----[ Interface "gpr_write" ]------------------------------------- |
---|
| 1150 | { |
---|
[88] | 1151 | dest = _name+"_glue"; |
---|
[78] | 1152 | #ifdef POSITION |
---|
| 1153 | _component->interface_map (src ,"gpr_write", |
---|
[88] | 1154 | dest,"gpr_write_write_unit_"+toString(i)); |
---|
[78] | 1155 | #endif |
---|
| 1156 | |
---|
[88] | 1157 | COMPONENT_MAP(_component ,src ,"out_GPR_WRITE_0_VAL" , |
---|
| 1158 | dest, "in_GPR_WRITE_WRITE_UNIT_"+toString(i)+"_VAL" ); |
---|
| 1159 | COMPONENT_MAP(_component ,src , "in_GPR_WRITE_0_ACK" , |
---|
| 1160 | dest,"out_GPR_WRITE_WRITE_UNIT_"+toString(i)+"_ACK" ); |
---|
| 1161 | if (_param->_have_port_ooo_engine_id) |
---|
| 1162 | COMPONENT_MAP(_component ,src ,"out_GPR_WRITE_0_OOO_ENGINE_ID", |
---|
| 1163 | dest, "in_GPR_WRITE_WRITE_UNIT_"+toString(i)+"_OOO_ENGINE_ID"); |
---|
| 1164 | COMPONENT_MAP(_component ,src ,"out_GPR_WRITE_0_NUM_REG" , |
---|
| 1165 | dest, "in_GPR_WRITE_WRITE_UNIT_"+toString(i)+"_NUM_REG" ); |
---|
| 1166 | COMPONENT_MAP(_component ,src ,"out_GPR_WRITE_0_DATA" , |
---|
| 1167 | dest, "in_GPR_WRITE_WRITE_UNIT_"+toString(i)+"_DATA" ); |
---|
[78] | 1168 | } |
---|
| 1169 | |
---|
| 1170 | // -----[ Interface "spr_write" ]------------------------------------- |
---|
| 1171 | { |
---|
| 1172 | // Port map with "read_unit" is ok! |
---|
| 1173 | |
---|
[88] | 1174 | dest = _name+"_glue"; |
---|
[78] | 1175 | #ifdef POSITION |
---|
| 1176 | _component->interface_map (src ,"spr_write", |
---|
[88] | 1177 | dest,"spr_write_write_unit_"+toString(i)); |
---|
[78] | 1178 | #endif |
---|
| 1179 | |
---|
[88] | 1180 | COMPONENT_MAP(_component ,src ,"out_SPR_WRITE_0_VAL" , |
---|
| 1181 | dest, "in_SPR_WRITE_WRITE_UNIT_"+toString(i)+"_VAL" ); |
---|
| 1182 | COMPONENT_MAP(_component ,src , "in_SPR_WRITE_0_ACK" , |
---|
| 1183 | dest,"out_SPR_WRITE_WRITE_UNIT_"+toString(i)+"_ACK" ); |
---|
| 1184 | if (_param->_have_port_ooo_engine_id) |
---|
| 1185 | COMPONENT_MAP(_component ,src ,"out_SPR_WRITE_0_OOO_ENGINE_ID", |
---|
| 1186 | dest, "in_SPR_WRITE_WRITE_UNIT_"+toString(i)+"_OOO_ENGINE_ID"); |
---|
| 1187 | COMPONENT_MAP(_component ,src ,"out_SPR_WRITE_0_NUM_REG" , |
---|
| 1188 | dest, "in_SPR_WRITE_WRITE_UNIT_"+toString(i)+"_NUM_REG" ); |
---|
| 1189 | COMPONENT_MAP(_component ,src ,"out_SPR_WRITE_0_DATA" , |
---|
| 1190 | dest, "in_SPR_WRITE_WRITE_UNIT_"+toString(i)+"_DATA" ); |
---|
[78] | 1191 | } |
---|
| 1192 | |
---|
| 1193 | // -----[ Interface "bypass_write" ]---------------------------------- |
---|
| 1194 | { |
---|
| 1195 | // Port map with "read_unit" is ok! |
---|
| 1196 | } |
---|
| 1197 | } |
---|
| 1198 | |
---|
| 1199 | // =================================================================== |
---|
| 1200 | // =====[ REGISTER_UNIT ]============================================= |
---|
| 1201 | // =================================================================== |
---|
| 1202 | { |
---|
| 1203 | src = _name+"_register_unit"; |
---|
[88] | 1204 | log_printf(INFO,Core,FUNCTION,_("Instance : %s"),src.c_str()); |
---|
[78] | 1205 | |
---|
| 1206 | { |
---|
| 1207 | dest = _name; |
---|
| 1208 | #ifdef POSITION |
---|
| 1209 | _component->interface_map (src ,"", |
---|
| 1210 | dest,""); |
---|
| 1211 | #endif |
---|
| 1212 | PORT_MAP(_component ,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
| 1213 | PORT_MAP(_component ,src , "in_NRESET",dest, "in_NRESET"); |
---|
| 1214 | } |
---|
| 1215 | |
---|
| 1216 | // ~~~~~[ Interface "gpr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 1217 | for (uint32_t i=0; i<_param->_nb_read_unit; i++) |
---|
| 1218 | { |
---|
| 1219 | dest = _name+"_read_unit_"+toString(i); |
---|
| 1220 | #ifdef POSITION |
---|
| 1221 | _component->interface_map (src ,"gpr_read_"+toString(2*i ) |
---|
| 1222 | dest,"gpr_read_0"); |
---|
| 1223 | _component->interface_map (src ,"gpr_read_"+toString(2*i+1) |
---|
| 1224 | dest,"gpr_read_1"); |
---|
| 1225 | #endif |
---|
| 1226 | |
---|
[88] | 1227 | // PORT_MAP(_component ,src , "in_GPR_READ_"+toString(2*i )+"_VAL" ,dest,"out_GPR_READ_0_VAL" ); |
---|
| 1228 | // PORT_MAP(_component ,src ,"out_GPR_READ_"+toString(2*i )+"_ACK" ,dest, "in_GPR_READ_0_ACK" ); |
---|
| 1229 | // if (_param->_have_port_context_id) |
---|
| 1230 | // PORT_MAP(_component ,src , "in_GPR_READ_"+toString(2*i )+"_OOO_ENGINE_ID",dest,"out_GPR_READ_0_OOO_ENGINE_ID"); |
---|
| 1231 | // PORT_MAP(_component ,src , "in_GPR_READ_"+toString(2*i )+"_NUM_REG" ,dest,"out_GPR_READ_0_NUM_REG" ); |
---|
| 1232 | // PORT_MAP(_component ,src ,"out_GPR_READ_"+toString(2*i )+"_DATA" ,dest, "in_GPR_READ_0_DATA" ); |
---|
| 1233 | // PORT_MAP(_component ,src ,"out_GPR_READ_"+toString(2*i )+"_DATA_VAL" ,dest, "in_GPR_READ_0_DATA_VAL" ); |
---|
[78] | 1234 | |
---|
[88] | 1235 | // PORT_MAP(_component ,src , "in_GPR_READ_"+toString(2*i+1)+"_VAL" ,dest,"out_GPR_READ_1_VAL" ); |
---|
| 1236 | // PORT_MAP(_component ,src ,"out_GPR_READ_"+toString(2*i+1)+"_ACK" ,dest, "in_GPR_READ_1_ACK" ); |
---|
| 1237 | // if (_param->_have_port_context_id) |
---|
| 1238 | // PORT_MAP(_component ,src , "in_GPR_READ_"+toString(2*i+1)+"_OOO_ENGINE_ID",dest,"out_GPR_READ_1_OOO_ENGINE_ID"); |
---|
| 1239 | // PORT_MAP(_component ,src , "in_GPR_READ_"+toString(2*i+1)+"_NUM_REG" ,dest,"out_GPR_READ_1_NUM_REG" ); |
---|
| 1240 | // PORT_MAP(_component ,src ,"out_GPR_READ_"+toString(2*i+1)+"_DATA" ,dest, "in_GPR_READ_1_DATA" ); |
---|
| 1241 | // PORT_MAP(_component ,src ,"out_GPR_READ_"+toString(2*i+1)+"_DATA_VAL" ,dest, "in_GPR_READ_1_DATA_VAL" ); |
---|
[78] | 1242 | } |
---|
| 1243 | |
---|
| 1244 | // ~~~~~[ Interface "gpr_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 1245 | for (uint32_t i=0; i<_param->_nb_write_unit; i++) |
---|
| 1246 | { |
---|
[88] | 1247 | dest = _name+"_glue"; |
---|
[78] | 1248 | #ifdef POSITION |
---|
[88] | 1249 | _component->interface_map (src ,"gpr_write_"+toString(i), |
---|
| 1250 | dest,"gpr_write_register_file_"+toString(i)); |
---|
[78] | 1251 | #endif |
---|
| 1252 | |
---|
[88] | 1253 | COMPONENT_MAP(_component ,src , "in_GPR_WRITE_"+toString(i)+"_VAL" ,dest,"out_GPR_WRITE_REGISTER_FILE_"+toString(i)+"_VAL" ); |
---|
| 1254 | COMPONENT_MAP(_component ,src ,"out_GPR_WRITE_"+toString(i)+"_ACK" ,dest, "in_GPR_WRITE_REGISTER_FILE_"+toString(i)+"_ACK" ); |
---|
| 1255 | if (_param->_have_port_ooo_engine_id) |
---|
| 1256 | COMPONENT_MAP(_component ,src , "in_GPR_WRITE_"+toString(i)+"_OOO_ENGINE_ID",dest,"out_GPR_WRITE_REGISTER_FILE_"+toString(i)+"_OOO_ENGINE_ID"); |
---|
| 1257 | COMPONENT_MAP(_component ,src , "in_GPR_WRITE_"+toString(i)+"_NUM_REG" ,dest,"out_GPR_WRITE_REGISTER_FILE_"+toString(i)+"_NUM_REG" ); |
---|
| 1258 | COMPONENT_MAP(_component ,src , "in_GPR_WRITE_"+toString(i)+"_DATA" ,dest,"out_GPR_WRITE_REGISTER_FILE_"+toString(i)+"_DATA" ); |
---|
[78] | 1259 | } |
---|
| 1260 | |
---|
| 1261 | // ~~~~~[ Interface "spr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 1262 | for (uint32_t i=0; i<_param->_nb_read_unit; i++) |
---|
| 1263 | { |
---|
| 1264 | dest = _name+"_read_unit_"+toString(i); |
---|
| 1265 | #ifdef POSITION |
---|
| 1266 | _component->interface_map (src ,"spr_read_"+toString(i), |
---|
| 1267 | dest,"spr_read_0"); |
---|
| 1268 | #endif |
---|
| 1269 | |
---|
[88] | 1270 | // PORT_MAP(_component ,src , "in_SPR_READ_"+toString(i)+"_VAL" ,dest,"out_SPR_READ_0_VAL" ); |
---|
| 1271 | // PORT_MAP(_component ,src ,"out_SPR_READ_"+toString(i)+"_ACK" ,dest, "in_SPR_READ_0_ACK" ); |
---|
| 1272 | // if (_param->_have_port_context_id) |
---|
| 1273 | // PORT_MAP(_component ,src , "in_SPR_READ_"+toString(i)+"_OOO_ENGINE_ID",dest,"out_SPR_READ_0_OOO_ENGINE_ID"); |
---|
| 1274 | // PORT_MAP(_component ,src , "in_SPR_READ_"+toString(i)+"_NUM_REG" ,dest,"out_SPR_READ_0_NUM_REG" ); |
---|
| 1275 | // PORT_MAP(_component ,src ,"out_SPR_READ_"+toString(i)+"_DATA" ,dest, "in_SPR_READ_0_DATA" ); |
---|
| 1276 | // PORT_MAP(_component ,src ,"out_SPR_READ_"+toString(i)+"_DATA_VAL" ,dest, "in_SPR_READ_0_DATA_VAL" ); |
---|
[78] | 1277 | } |
---|
| 1278 | |
---|
| 1279 | // ~~~~~[ Interface "spr_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 1280 | for (uint32_t i=0; i<_param->_nb_write_unit; i++) |
---|
| 1281 | { |
---|
[88] | 1282 | dest = _name+"_glue"; |
---|
[78] | 1283 | #ifdef POSITION |
---|
[88] | 1284 | _component->interface_map (src ,"spr_write_"+toString(i), |
---|
| 1285 | dest,"spr_write_register_file_"+toString(i)); |
---|
[78] | 1286 | #endif |
---|
| 1287 | |
---|
[88] | 1288 | COMPONENT_MAP(_component ,src , "in_SPR_WRITE_"+toString(i)+"_VAL" ,dest,"out_SPR_WRITE_REGISTER_FILE_"+toString(i)+"_VAL" ); |
---|
| 1289 | COMPONENT_MAP(_component ,src ,"out_SPR_WRITE_"+toString(i)+"_ACK" ,dest, "in_SPR_WRITE_REGISTER_FILE_"+toString(i)+"_ACK" ); |
---|
| 1290 | if (_param->_have_port_ooo_engine_id) |
---|
| 1291 | COMPONENT_MAP(_component ,src , "in_SPR_WRITE_"+toString(i)+"_OOO_ENGINE_ID",dest,"out_SPR_WRITE_REGISTER_FILE_"+toString(i)+"_OOO_ENGINE_ID"); |
---|
| 1292 | COMPONENT_MAP(_component ,src , "in_SPR_WRITE_"+toString(i)+"_NUM_REG" ,dest,"out_SPR_WRITE_REGISTER_FILE_"+toString(i)+"_NUM_REG" ); |
---|
| 1293 | COMPONENT_MAP(_component ,src , "in_SPR_WRITE_"+toString(i)+"_DATA" ,dest,"out_SPR_WRITE_REGISTER_FILE_"+toString(i)+"_DATA" ); |
---|
[78] | 1294 | } |
---|
| 1295 | |
---|
| 1296 | // ~~~~~[ Interface "insert_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 1297 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
| 1298 | { |
---|
| 1299 | uint32_t x=_param->_nb_inst_insert_rob [i]; |
---|
| 1300 | |
---|
| 1301 | for (uint32_t j=0; j<x; j++) |
---|
| 1302 | { |
---|
| 1303 | dest = _name; |
---|
| 1304 | #ifdef POSITION |
---|
| 1305 | _component->interface_map (src ,"insert_rob_"+toString(i)+"_"+toString(j), |
---|
| 1306 | dest,"insert_rob_"+toString(i)+"_"+toString(j)); |
---|
| 1307 | #endif |
---|
| 1308 | |
---|
| 1309 | PORT_MAP(_component ,src , "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_VAL" , |
---|
| 1310 | dest, "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_VAL" ); |
---|
| 1311 | PORT_MAP(_component ,src ,"out_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_ACK" , |
---|
| 1312 | dest,"out_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_ACK" ); |
---|
| 1313 | PORT_MAP(_component ,src , "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RD_USE" , |
---|
| 1314 | dest, "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RD_USE" ); |
---|
| 1315 | PORT_MAP(_component ,src , "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RD_NUM_REG", |
---|
| 1316 | dest, "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RD_NUM_REG"); |
---|
| 1317 | PORT_MAP(_component ,src , "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RE_USE" , |
---|
| 1318 | dest, "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RE_USE" ); |
---|
| 1319 | PORT_MAP(_component ,src , "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RE_NUM_REG", |
---|
| 1320 | dest, "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RE_NUM_REG"); |
---|
| 1321 | } |
---|
| 1322 | } |
---|
| 1323 | |
---|
[88] | 1324 | // // ~~~~~[ Interface "retire_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 1325 | // for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
| 1326 | // { |
---|
| 1327 | // uint32_t x=_param->_nb_inst_retire_rob [i]; |
---|
[78] | 1328 | |
---|
[88] | 1329 | // for (uint32_t j=0; j<x; j++) |
---|
| 1330 | // { |
---|
| 1331 | // dest = _name; |
---|
| 1332 | // #ifdef POSITION |
---|
| 1333 | // _component->interface_map (src ,"retire_rob_"+toString(i)+"_"+toString(j), |
---|
| 1334 | // dest,"retire_rob_"+toString(i)+"_"+toString(j)); |
---|
| 1335 | // #endif |
---|
[78] | 1336 | |
---|
[88] | 1337 | // PORT_MAP(_component ,src , "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_VAL" , |
---|
| 1338 | // dest, "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_VAL" ); |
---|
| 1339 | // PORT_MAP(_component ,src ,"out_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_ACK" , |
---|
| 1340 | // dest,"out_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_ACK" ); |
---|
| 1341 | // PORT_MAP(_component ,src , "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_OLD_USE" , |
---|
| 1342 | // dest, "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_OLD_USE" ); |
---|
| 1343 | // PORT_MAP(_component ,src , "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_OLD_NUM_REG", |
---|
| 1344 | // dest, "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_OLD_NUM_REG"); |
---|
| 1345 | // PORT_MAP(_component ,src , "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_NEW_USE" , |
---|
| 1346 | // dest, "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_NEW_USE" ); |
---|
| 1347 | // PORT_MAP(_component ,src , "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_NEW_NUM_REG", |
---|
| 1348 | // dest, "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_NEW_NUM_REG"); |
---|
| 1349 | // PORT_MAP(_component ,src , "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_OLD_USE" , |
---|
| 1350 | // dest, "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_OLD_USE" ); |
---|
| 1351 | // PORT_MAP(_component ,src , "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_OLD_NUM_REG", |
---|
| 1352 | // dest, "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_OLD_NUM_REG"); |
---|
| 1353 | // PORT_MAP(_component ,src , "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_NEW_USE" , |
---|
| 1354 | // dest, "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_NEW_USE" ); |
---|
| 1355 | // PORT_MAP(_component ,src , "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_NEW_NUM_REG", |
---|
| 1356 | // dest, "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_NEW_NUM_REG"); |
---|
| 1357 | // } |
---|
| 1358 | // } |
---|
[78] | 1359 | } |
---|
| 1360 | |
---|
| 1361 | // =================================================================== |
---|
| 1362 | // =====[ READ_UNIT_TO_EXECUTION_UNIT ]=============================== |
---|
| 1363 | // =================================================================== |
---|
| 1364 | { |
---|
| 1365 | src = _name+"_read_unit_to_execution_unit"; |
---|
[88] | 1366 | log_printf(INFO,Core,FUNCTION,_("Instance : %s"),src.c_str()); |
---|
[78] | 1367 | |
---|
| 1368 | { |
---|
| 1369 | dest = _name; |
---|
| 1370 | #ifdef POSITION |
---|
| 1371 | _component->interface_map (src ,"", |
---|
| 1372 | dest,""); |
---|
| 1373 | #endif |
---|
| 1374 | PORT_MAP(_component ,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
| 1375 | PORT_MAP(_component ,src , "in_NRESET",dest, "in_NRESET"); |
---|
| 1376 | } |
---|
| 1377 | |
---|
| 1378 | // ~~~~~[ Interface "read_unit_out" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 1379 | uint32_t it_read_unit_out =0; |
---|
| 1380 | for (uint32_t i=0; i < _param->_nb_read_unit; i++) |
---|
| 1381 | for (uint32_t j=0; j < _param->_nb_inst_retire[i]; j++) |
---|
| 1382 | { |
---|
| 1383 | dest = _name+"_read_unit_"+toString(i); |
---|
| 1384 | |
---|
| 1385 | #ifdef POSITION |
---|
| 1386 | _component->interface_map (src ,"read_unit_"+toString(it_read_unit_out), |
---|
| 1387 | dest,"read_unit_"+toString(j)); |
---|
| 1388 | #endif |
---|
| 1389 | |
---|
[88] | 1390 | // PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_VAL" , |
---|
| 1391 | // dest,"out_READ_UNIT_OUT_"+toString(j )+"_VAL" ); |
---|
| 1392 | // PORT_MAP(_component ,src ,"out_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_ACK" , |
---|
| 1393 | // dest, "in_READ_UNIT_OUT_"+toString(j )+"_ACK" ); |
---|
| 1394 | // if (_param->_have_port_context_id) |
---|
| 1395 | // PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_CONTEXT_ID" , |
---|
| 1396 | // dest,"out_READ_UNIT_OUT_"+toString(j )+"_CONTEXT_ID" ); |
---|
| 1397 | // if (_param->_have_port_front_end_id) |
---|
| 1398 | // PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_FRONT_END_ID" , |
---|
| 1399 | // dest,"out_READ_UNIT_OUT_"+toString(j )+"_FRONT_END_ID" ); |
---|
| 1400 | // if (_param->_have_port_ooo_engine_id) |
---|
| 1401 | // PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_OOO_ENGINE_ID" , |
---|
| 1402 | // dest,"out_READ_UNIT_OUT_"+toString(j )+"_OOO_ENGINE_ID" ); |
---|
| 1403 | // if (_param->_have_port_rob_ptr ) |
---|
| 1404 | // PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_PACKET_ID" , |
---|
| 1405 | // dest,"out_READ_UNIT_OUT_"+toString(j )+"_PACKET_ID" ); |
---|
| 1406 | // PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_OPERATION" , |
---|
| 1407 | // dest,"out_READ_UNIT_OUT_"+toString(j )+"_OPERATION" ); |
---|
| 1408 | // PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_TYPE" , |
---|
| 1409 | // dest,"out_READ_UNIT_OUT_"+toString(j )+"_TYPE" ); |
---|
| 1410 | // PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_STORE_QUEUE_PTR_WRITE", |
---|
| 1411 | // dest,"out_READ_UNIT_OUT_"+toString(j )+"_STORE_QUEUE_PTR_WRITE"); |
---|
| 1412 | // if (_param->_have_port_load_queue_ptr) |
---|
| 1413 | // PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_LOAD_QUEUE_PTR_WRITE" , |
---|
| 1414 | // dest,"out_READ_UNIT_OUT_"+toString(j )+"_LOAD_QUEUE_PTR_WRITE" ); |
---|
| 1415 | // PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_HAS_IMMEDIAT" , |
---|
| 1416 | // dest,"out_READ_UNIT_OUT_"+toString(j )+"_HAS_IMMEDIAT" ); |
---|
| 1417 | // PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_IMMEDIAT" , |
---|
| 1418 | // dest,"out_READ_UNIT_OUT_"+toString(j )+"_IMMEDIAT" ); |
---|
| 1419 | // PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_DATA_RA" , |
---|
| 1420 | // dest,"out_READ_UNIT_OUT_"+toString(j )+"_DATA_RA" ); |
---|
| 1421 | // PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_DATA_RB" , |
---|
| 1422 | // dest,"out_READ_UNIT_OUT_"+toString(j )+"_DATA_RB" ); |
---|
| 1423 | // PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_DATA_RC" , |
---|
| 1424 | // dest,"out_READ_UNIT_OUT_"+toString(j )+"_DATA_RC" ); |
---|
| 1425 | // PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_WRITE_RD" , |
---|
| 1426 | // dest,"out_READ_UNIT_OUT_"+toString(j )+"_WRITE_RD" ); |
---|
| 1427 | // PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_NUM_REG_RD" , |
---|
| 1428 | // dest,"out_READ_UNIT_OUT_"+toString(j )+"_NUM_REG_RD" ); |
---|
| 1429 | // PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_WRITE_RE" , |
---|
| 1430 | // dest,"out_READ_UNIT_OUT_"+toString(j )+"_WRITE_RE" ); |
---|
| 1431 | // PORT_MAP(_component ,src , "in_READ_UNIT_OUT_"+toString(it_read_unit_out)+"_NUM_REG_RE" , |
---|
| 1432 | // dest,"out_READ_UNIT_OUT_"+toString(j )+"_NUM_REG_RE" ); |
---|
[78] | 1433 | |
---|
| 1434 | it_read_unit_out ++; |
---|
| 1435 | } |
---|
| 1436 | |
---|
| 1437 | // ~~~~~[ Interface "execute_unit_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 1438 | for (uint32_t i=0; i<_param->_nb_execute_unit; i++) |
---|
| 1439 | { |
---|
| 1440 | uint32_t x=_param->_translate_num_execute_unit[i]; |
---|
| 1441 | |
---|
| 1442 | if (_param->_is_load_store_unit[i] == false) |
---|
| 1443 | { |
---|
| 1444 | dest = _name+"_functionnal_unit_"+toString(x); |
---|
| 1445 | |
---|
| 1446 | #ifdef POSITION |
---|
| 1447 | _component->interface_map (src ,"execute_unit_in_"+toString(i), |
---|
| 1448 | dest,"execute_in"); |
---|
| 1449 | #endif |
---|
| 1450 | |
---|
[88] | 1451 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_VAL" , |
---|
| 1452 | // dest, "in_EXECUTE_IN_VAL" ); |
---|
| 1453 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_IN_"+toString(i)+"_ACK" , |
---|
| 1454 | // dest,"out_EXECUTE_IN_ACK" ); |
---|
| 1455 | // if (_param->_have_port_context_id) |
---|
| 1456 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_CONTEXT_ID" , |
---|
| 1457 | // dest, "in_EXECUTE_IN_CONTEXT_ID" ); |
---|
| 1458 | // if (_param->_have_port_front_end_id) |
---|
| 1459 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_FRONT_END_ID" , |
---|
| 1460 | // dest, "in_EXECUTE_IN_FRONT_END_ID" ); |
---|
| 1461 | // if (_param->_have_port_ooo_engine_id) |
---|
| 1462 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_OOO_ENGINE_ID" , |
---|
| 1463 | // dest, "in_EXECUTE_IN_OOO_ENGINE_ID" ); |
---|
| 1464 | // if (_param->_have_port_rob_ptr ) |
---|
| 1465 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_PACKET_ID" , |
---|
| 1466 | // dest, "in_EXECUTE_IN_PACKET_ID" ); |
---|
| 1467 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_OPERATION" , |
---|
| 1468 | // dest, "in_EXECUTE_IN_OPERATION" ); |
---|
| 1469 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_TYPE" , |
---|
| 1470 | // dest, "in_EXECUTE_IN_TYPE" ); |
---|
| 1471 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_STORE_QUEUE_PTR_WRITE", |
---|
| 1472 | // dest, "in_EXECUTE_IN_STORE_QUEUE_PTR_WRITE"); |
---|
| 1473 | // if (_param->_have_port_load_queue_ptr) |
---|
| 1474 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_LOAD_QUEUE_PTR_WRITE" , |
---|
| 1475 | // dest, "in_EXECUTE_IN_LOAD_QUEUE_PTR_WRITE" ); |
---|
| 1476 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_HAS_IMMEDIAT" , |
---|
| 1477 | // dest, "in_EXECUTE_IN_HAS_IMMEDIAT" ); |
---|
| 1478 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_IMMEDIAT" , |
---|
| 1479 | // dest, "in_EXECUTE_IN_IMMEDIAT" ); |
---|
| 1480 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_DATA_RA" , |
---|
| 1481 | // dest, "in_EXECUTE_IN_DATA_RA" ); |
---|
| 1482 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_DATA_RB" , |
---|
| 1483 | // dest, "in_EXECUTE_IN_DATA_RB" ); |
---|
| 1484 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_DATA_RC" , |
---|
| 1485 | // dest, "in_EXECUTE_IN_DATA_RC" ); |
---|
| 1486 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_WRITE_RD" , |
---|
| 1487 | // dest, "in_EXECUTE_IN_WRITE_RD" ); |
---|
| 1488 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_NUM_REG_RD" , |
---|
| 1489 | // dest, "in_EXECUTE_IN_NUM_REG_RD" ); |
---|
| 1490 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_WRITE_RE" , |
---|
| 1491 | // dest, "in_EXECUTE_IN_WRITE_RE" ); |
---|
| 1492 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_NUM_REG_RE" , |
---|
| 1493 | // dest, "in_EXECUTE_IN_NUM_REG_RE" ); |
---|
[78] | 1494 | } |
---|
| 1495 | else |
---|
| 1496 | { |
---|
| 1497 | dest = _name+"_load_store_unit_"+toString(x); |
---|
| 1498 | |
---|
| 1499 | #ifdef POSITION |
---|
| 1500 | _component->interface_map (src ,"execute_unit_in_"+toString(i), |
---|
| 1501 | dest,"memory_in"); |
---|
| 1502 | #endif |
---|
| 1503 | |
---|
[88] | 1504 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_VAL" , |
---|
| 1505 | // dest, "in_MEMORY_IN_VAL" ); |
---|
| 1506 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_IN_"+toString(i)+"_ACK" , |
---|
| 1507 | // dest,"out_MEMORY_IN_ACK" ); |
---|
| 1508 | // if (_param->_have_port_context_id) |
---|
| 1509 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_CONTEXT_ID" , |
---|
| 1510 | // dest, "in_MEMORY_IN_CONTEXT_ID" ); |
---|
| 1511 | // if (_param->_have_port_front_end_id) |
---|
| 1512 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_FRONT_END_ID" , |
---|
| 1513 | // dest, "in_MEMORY_IN_FRONT_END_ID" ); |
---|
| 1514 | // if (_param->_have_port_ooo_engine_id) |
---|
| 1515 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_OOO_ENGINE_ID" , |
---|
| 1516 | // dest, "in_MEMORY_IN_OOO_ENGINE_ID" ); |
---|
| 1517 | // if (_param->_have_port_rob_ptr ) |
---|
| 1518 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_PACKET_ID" , |
---|
| 1519 | // dest, "in_MEMORY_IN_PACKET_ID" ); |
---|
| 1520 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_OPERATION" , |
---|
| 1521 | // dest, "in_MEMORY_IN_OPERATION" ); |
---|
| 1522 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_TYPE" , |
---|
| 1523 | // dest, "in_MEMORY_IN_TYPE" ); |
---|
| 1524 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_STORE_QUEUE_PTR_WRITE", |
---|
| 1525 | // dest, "in_MEMORY_IN_STORE_QUEUE_PTR_WRITE"); |
---|
| 1526 | // if (_param->_have_port_load_queue_ptr) |
---|
| 1527 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_LOAD_QUEUE_PTR_WRITE" , |
---|
| 1528 | // dest, "in_MEMORY_IN_LOAD_QUEUE_PTR_WRITE" ); |
---|
| 1529 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_HAS_IMMEDIAT" , |
---|
| 1530 | // dest, "in_MEMORY_IN_HAS_IMMEDIAT" ); |
---|
| 1531 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_IMMEDIAT" , |
---|
| 1532 | // dest, "in_MEMORY_IN_IMMEDIAT" ); |
---|
| 1533 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_DATA_RA" , |
---|
| 1534 | // dest, "in_MEMORY_IN_DATA_RA" ); |
---|
| 1535 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_DATA_RB" , |
---|
| 1536 | // dest, "in_MEMORY_IN_DATA_RB" ); |
---|
| 1537 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_DATA_RC" , |
---|
| 1538 | // dest, "in_MEMORY_IN_DATA_RC" ); |
---|
| 1539 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_WRITE_RD" , |
---|
| 1540 | // dest, "in_MEMORY_IN_WRITE_RD" ); |
---|
| 1541 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_NUM_REG_RD" , |
---|
| 1542 | // dest, "in_MEMORY_IN_NUM_REG_RD" ); |
---|
| 1543 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_WRITE_RE" , |
---|
| 1544 | // dest, "in_MEMORY_IN_WRITE_RE" ); |
---|
| 1545 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_IN_"+toString(i)+"_NUM_REG_RE" , |
---|
| 1546 | // dest, "in_MEMORY_IN_NUM_REG_RE" ); |
---|
[78] | 1547 | } |
---|
| 1548 | } |
---|
| 1549 | } |
---|
| 1550 | |
---|
| 1551 | // =================================================================== |
---|
| 1552 | // =====[ EXECUTION_UNIT_TO_WRITE_UNIT ]============================== |
---|
| 1553 | // =================================================================== |
---|
| 1554 | { |
---|
| 1555 | src = _name+"_execution_unit_to_write_unit"; |
---|
[88] | 1556 | log_printf(INFO,Core,FUNCTION,_("Instance : %s"),src.c_str()); |
---|
[78] | 1557 | |
---|
| 1558 | { |
---|
| 1559 | dest = _name; |
---|
| 1560 | #ifdef POSITION |
---|
| 1561 | _component->interface_map (src ,"", |
---|
| 1562 | dest,""); |
---|
| 1563 | #endif |
---|
| 1564 | PORT_MAP(_component ,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
| 1565 | PORT_MAP(_component ,src , "in_NRESET",dest, "in_NRESET"); |
---|
| 1566 | } |
---|
| 1567 | |
---|
| 1568 | // ~~~~~[ Interface "execute_unit_out" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 1569 | for (uint32_t i=0; i<_param->_nb_execute_unit; i++) |
---|
| 1570 | { |
---|
| 1571 | uint32_t x=_param->_translate_num_execute_unit[i]; |
---|
| 1572 | |
---|
| 1573 | if (_param->_is_load_store_unit[i] == false) |
---|
| 1574 | { |
---|
| 1575 | dest = _name+"_functionnal_unit_"+toString(x); |
---|
| 1576 | |
---|
| 1577 | #ifdef POSITION |
---|
| 1578 | _component->interface_map (src ,"execute_unit_out_"+toString(i), |
---|
| 1579 | dest,"execute_out"); |
---|
| 1580 | #endif |
---|
[88] | 1581 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_VAL" , |
---|
| 1582 | // dest,"out_EXECUTE_OUT_VAL" ); |
---|
| 1583 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_OUT_"+toString(i)+"_ACK" , |
---|
| 1584 | // dest, "in_EXECUTE_OUT_ACK" ); |
---|
| 1585 | // if (_param->_have_port_context_id) |
---|
| 1586 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_CONTEXT_ID" , |
---|
| 1587 | // dest,"out_EXECUTE_OUT_CONTEXT_ID" ); |
---|
| 1588 | // if (_param->_have_port_front_end_id) |
---|
| 1589 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_FRONT_END_ID" , |
---|
| 1590 | // dest,"out_EXECUTE_OUT_FRONT_END_ID" ); |
---|
| 1591 | // if (_param->_have_port_ooo_engine_id) |
---|
| 1592 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_OOO_ENGINE_ID", |
---|
| 1593 | // dest,"out_EXECUTE_OUT_OOO_ENGINE_ID"); |
---|
| 1594 | // if (_param->_have_port_rob_ptr ) |
---|
| 1595 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_PACKET_ID" , |
---|
| 1596 | // dest,"out_EXECUTE_OUT_PACKET_ID" ); |
---|
| 1597 | // // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_OPERATION" , |
---|
| 1598 | // // dest,"out_EXECUTE_OUT_OPERATION" ); |
---|
| 1599 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_TYPE" , |
---|
| 1600 | // dest,"out_EXECUTE_OUT_TYPE" ); |
---|
| 1601 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_WRITE_RD" , |
---|
| 1602 | // dest,"out_EXECUTE_OUT_WRITE_RD" ); |
---|
| 1603 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_NUM_REG_RD" , |
---|
| 1604 | // dest,"out_EXECUTE_OUT_NUM_REG_RD" ); |
---|
| 1605 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_DATA_RD" , |
---|
| 1606 | // dest,"out_EXECUTE_OUT_DATA_RD" ); |
---|
| 1607 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_WRITE_RE" , |
---|
| 1608 | // dest,"out_EXECUTE_OUT_WRITE_RE" ); |
---|
| 1609 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_NUM_REG_RE" , |
---|
| 1610 | // dest,"out_EXECUTE_OUT_NUM_REG_RE" ); |
---|
| 1611 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_DATA_RE" , |
---|
| 1612 | // dest,"out_EXECUTE_OUT_DATA_RE" ); |
---|
| 1613 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_EXCEPTION" , |
---|
| 1614 | // dest,"out_EXECUTE_OUT_EXCEPTION" ); |
---|
| 1615 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_NO_SEQUENCE" , |
---|
| 1616 | // dest,"out_EXECUTE_OUT_NO_SEQUENCE" ); |
---|
| 1617 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_ADDRESS" , |
---|
| 1618 | // dest,"out_EXECUTE_OUT_ADDRESS" ); |
---|
[78] | 1619 | } |
---|
| 1620 | else |
---|
| 1621 | { |
---|
| 1622 | dest = _name+"_load_store_unit_"+toString(x); |
---|
| 1623 | |
---|
| 1624 | #ifdef POSITION |
---|
| 1625 | _component->interface_map (src ,"execute_unit_out_"+toString(i), |
---|
| 1626 | dest,"memory_out"); |
---|
| 1627 | #endif |
---|
[88] | 1628 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_VAL" , |
---|
| 1629 | // dest,"out_MEMORY_OUT_VAL" ); |
---|
| 1630 | // PORT_MAP(_component ,src ,"out_EXECUTE_UNIT_OUT_"+toString(i)+"_ACK" , |
---|
| 1631 | // dest, "in_MEMORY_OUT_ACK" ); |
---|
| 1632 | // if (_param->_have_port_context_id) |
---|
| 1633 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_CONTEXT_ID" , |
---|
| 1634 | // dest,"out_MEMORY_OUT_CONTEXT_ID" ); |
---|
| 1635 | // if (_param->_have_port_front_end_id) |
---|
| 1636 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_FRONT_END_ID" , |
---|
| 1637 | // dest,"out_MEMORY_OUT_FRONT_END_ID" ); |
---|
| 1638 | // if (_param->_have_port_ooo_engine_id) |
---|
| 1639 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_OOO_ENGINE_ID", |
---|
| 1640 | // dest,"out_MEMORY_OUT_OOO_ENGINE_ID"); |
---|
| 1641 | // if (_param->_have_port_rob_ptr ) |
---|
| 1642 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_PACKET_ID" , |
---|
| 1643 | // dest,"out_MEMORY_OUT_PACKET_ID" ); |
---|
| 1644 | // // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_OPERATION" , |
---|
| 1645 | // // dest,"out_MEMORY_OUT_OPERATION" ); |
---|
| 1646 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_TYPE" , |
---|
| 1647 | // dest,"out_MEMORY_OUT_TYPE" ); |
---|
| 1648 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_WRITE_RD" , |
---|
| 1649 | // dest,"out_MEMORY_OUT_WRITE_RD" ); |
---|
| 1650 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_NUM_REG_RD" , |
---|
| 1651 | // dest,"out_MEMORY_OUT_NUM_REG_RD" ); |
---|
| 1652 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_DATA_RD" , |
---|
| 1653 | // dest,"out_MEMORY_OUT_DATA_RD" ); |
---|
| 1654 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_WRITE_RE" , |
---|
| 1655 | // dest,"out_MEMORY_OUT_WRITE_RE" ); |
---|
| 1656 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_NUM_REG_RE" , |
---|
| 1657 | // dest,"out_MEMORY_OUT_NUM_REG_RE" ); |
---|
| 1658 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_DATA_RE" , |
---|
| 1659 | // dest,"out_MEMORY_OUT_DATA_RE" ); |
---|
| 1660 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_EXCEPTION" , |
---|
| 1661 | // dest,"out_MEMORY_OUT_EXCEPTION" ); |
---|
| 1662 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_NO_SEQUENCE" , |
---|
| 1663 | // dest,"out_MEMORY_OUT_NO_SEQUENCE" ); |
---|
| 1664 | // PORT_MAP(_component ,src , "in_EXECUTE_UNIT_OUT_"+toString(i)+"_ADDRESS" , |
---|
| 1665 | // dest,"out_MEMORY_OUT_ADDRESS" ); |
---|
[78] | 1666 | } |
---|
| 1667 | } |
---|
| 1668 | |
---|
| 1669 | // ~~~~~[ Interface "write_unit_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 1670 | for (uint32_t i=0; i<_param->_nb_write_unit; i++) |
---|
| 1671 | { |
---|
| 1672 | dest = _name+"_write_unit_"+toString(i); |
---|
| 1673 | |
---|
| 1674 | #ifdef POSITION |
---|
| 1675 | _component->interface_map (src ,"write_unit_out_"+toString(i), |
---|
| 1676 | dest,"write_out"); |
---|
| 1677 | #endif |
---|
| 1678 | |
---|
[88] | 1679 | // PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_VAL" , |
---|
| 1680 | // dest, "in_WRITE_UNIT_IN_VAL" ); |
---|
| 1681 | // PORT_MAP(_component ,src , "in_WRITE_UNIT_IN_"+toString(i)+"_ACK" , |
---|
| 1682 | // dest,"out_WRITE_UNIT_IN_ACK" ); |
---|
| 1683 | // if (_param->_have_port_context_id) |
---|
| 1684 | // PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_CONTEXT_ID" , |
---|
| 1685 | // dest, "in_WRITE_UNIT_IN_CONTEXT_ID" ); |
---|
| 1686 | // if (_param->_have_port_front_end_id) |
---|
| 1687 | // PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_FRONT_END_ID" , |
---|
| 1688 | // dest, "in_WRITE_UNIT_IN_FRONT_END_ID" ); |
---|
| 1689 | // if (_param->_have_port_ooo_engine_id) |
---|
| 1690 | // PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_OOO_ENGINE_ID", |
---|
| 1691 | // dest, "in_WRITE_UNIT_IN_OOO_ENGINE_ID"); |
---|
| 1692 | // if (_param->_have_port_rob_ptr ) |
---|
| 1693 | // PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_PACKET_ID" , |
---|
| 1694 | // dest, "in_WRITE_UNIT_IN_PACKET_ID" ); |
---|
| 1695 | // // PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_OPERATION" , |
---|
| 1696 | // // dest, "in_WRITE_UNIT_IN_OPERATION" ); |
---|
| 1697 | // PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_TYPE" , |
---|
| 1698 | // dest, "in_WRITE_UNIT_IN_TYPE" ); |
---|
| 1699 | // PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_WRITE_RD" , |
---|
| 1700 | // dest, "in_WRITE_UNIT_IN_WRITE_RD" ); |
---|
| 1701 | // PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_NUM_REG_RD" , |
---|
| 1702 | // dest, "in_WRITE_UNIT_IN_NUM_REG_RD" ); |
---|
| 1703 | // PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_DATA_RD" , |
---|
| 1704 | // dest, "in_WRITE_UNIT_IN_DATA_RD" ); |
---|
| 1705 | // PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_WRITE_RE" , |
---|
| 1706 | // dest, "in_WRITE_UNIT_IN_WRITE_RE" ); |
---|
| 1707 | // PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_NUM_REG_RE" , |
---|
| 1708 | // dest, "in_WRITE_UNIT_IN_NUM_REG_RE" ); |
---|
| 1709 | // PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_DATA_RE" , |
---|
| 1710 | // dest, "in_WRITE_UNIT_IN_DATA_RE" ); |
---|
| 1711 | // PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_EXCEPTION" , |
---|
| 1712 | // dest, "in_WRITE_UNIT_IN_EXCEPTION" ); |
---|
| 1713 | // PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_NO_SEQUENCE" , |
---|
| 1714 | // dest, "in_WRITE_UNIT_IN_NO_SEQUENCE" ); |
---|
| 1715 | // PORT_MAP(_component ,src ,"out_WRITE_UNIT_IN_"+toString(i)+"_ADDRESS" , |
---|
| 1716 | // dest, "in_WRITE_UNIT_IN_ADDRESS" ); |
---|
[78] | 1717 | } |
---|
| 1718 | } |
---|
| 1719 | |
---|
[88] | 1720 | #if DEBUG_Execute_loop == true |
---|
[78] | 1721 | _component->test_map(); |
---|
[88] | 1722 | #endif |
---|
[78] | 1723 | |
---|
| 1724 | #ifdef POSITION |
---|
[88] | 1725 | if (usage_is_set(_usage,USE_POSITION)) |
---|
| 1726 | _component->generate_file(); |
---|
[78] | 1727 | #endif |
---|
| 1728 | |
---|
| 1729 | log_printf(FUNC,Execute_loop,FUNCTION,"End"); |
---|
| 1730 | }; |
---|
| 1731 | |
---|
| 1732 | }; // end namespace execute_loop |
---|
| 1733 | }; // end namespace multi_execute_loop |
---|
| 1734 | }; // end namespace core |
---|
| 1735 | |
---|
| 1736 | }; // end namespace behavioural |
---|
| 1737 | }; // end namespace morpheo |
---|