[88] | 1 | /* |
---|
| 2 | * $Id: Front_end_allocation.cpp 123 2009-06-08 20:43:30Z rosiere $ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include "Behavioural/Core/Multi_Front_end/Front_end/include/Front_end.h" |
---|
| 9 | #include "Behavioural/include/Allocation.h" |
---|
| 10 | #include "Common/include/Max.h" |
---|
| 11 | |
---|
| 12 | namespace morpheo { |
---|
| 13 | namespace behavioural { |
---|
| 14 | namespace core { |
---|
| 15 | namespace multi_front_end { |
---|
| 16 | namespace front_end { |
---|
| 17 | |
---|
| 18 | |
---|
| 19 | |
---|
| 20 | #undef FUNCTION |
---|
| 21 | #define FUNCTION "Front_end::allocation" |
---|
| 22 | void Front_end::allocation |
---|
| 23 | ( |
---|
| 24 | #ifdef STATISTICS |
---|
| 25 | morpheo::behavioural::Parameters_Statistics * param_statistics |
---|
| 26 | #else |
---|
| 27 | void |
---|
| 28 | #endif |
---|
| 29 | ) |
---|
| 30 | { |
---|
| 31 | log_begin(Front_end,FUNCTION); |
---|
| 32 | |
---|
| 33 | _component = new Component (_usage); |
---|
| 34 | |
---|
| 35 | Entity * entity = _component->set_entity (_name |
---|
| 36 | ,"Front_end" |
---|
| 37 | #ifdef POSITION |
---|
| 38 | ,COMBINATORY |
---|
| 39 | #endif |
---|
| 40 | ); |
---|
| 41 | |
---|
| 42 | _interfaces = entity->set_interfaces(); |
---|
| 43 | |
---|
| 44 | // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 45 | { |
---|
| 46 | Interface * interface = _interfaces->set_interface("" |
---|
| 47 | #ifdef POSITION |
---|
| 48 | ,IN |
---|
| 49 | ,SOUTH, |
---|
| 50 | "Generalist interface" |
---|
| 51 | #endif |
---|
| 52 | ); |
---|
| 53 | |
---|
| 54 | in_CLOCK = interface->set_signal_clk ("clock" ,1, CLOCK_VHDL_YES); |
---|
| 55 | in_NRESET = interface->set_signal_in <Tcontrol_t> ("nreset",1, RESET_VHDL_YES); |
---|
| 56 | } |
---|
| 57 | |
---|
| 58 | // ~~~~~[ Interface "icache_req" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 59 | { |
---|
[112] | 60 | ALLOC1_INTERFACE_BEGIN("icache_req",OUT, WEST, _("Instruction cache request."),_param->_nb_context); |
---|
[88] | 61 | |
---|
| 62 | ALLOC1_VALACK_OUT (out_ICACHE_REQ_VAL ,VAL); |
---|
| 63 | ALLOC1_VALACK_IN ( in_ICACHE_REQ_ACK ,ACK); |
---|
| 64 | // ALLOC1_SIGNAL_OUT (out_ICACHE_REQ_THREAD_ID ,"thread_id" ,Tcontext_t ,_param->_size_context_id ); |
---|
| 65 | ALLOC1_SIGNAL_OUT (out_ICACHE_REQ_PACKET_ID ,"packet_id" ,Tpacket_t ,_param->_size_ifetch_queue_ptr ); |
---|
| 66 | ALLOC1_SIGNAL_OUT (out_ICACHE_REQ_ADDRESS ,"address" ,Ticache_instruction_t,_param->_size_instruction_address ); |
---|
| 67 | ALLOC1_SIGNAL_OUT (out_ICACHE_REQ_TYPE ,"type" ,Ticache_type_t ,_param->_size_icache_type ); |
---|
[112] | 68 | |
---|
| 69 | ALLOC1_INTERFACE_END(_param->_nb_context); |
---|
[88] | 70 | } |
---|
| 71 | |
---|
| 72 | // ~~~~~[ Interface "icache_rsp" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 73 | { |
---|
[112] | 74 | ALLOC1_INTERFACE_BEGIN("icache_rsp",IN , WEST, _("Instruction cache respons."),_param->_nb_context); |
---|
[88] | 75 | |
---|
| 76 | ALLOC1_VALACK_IN ( in_ICACHE_RSP_VAL ,VAL); |
---|
| 77 | ALLOC1_VALACK_OUT (out_ICACHE_RSP_ACK ,ACK); |
---|
| 78 | // ALLOC1_SIGNAL_IN ( in_ICACHE_RSP_THREAD_ID ,"thread_id" ,Tcontext_t ,_param->_size_context_id ); |
---|
| 79 | ALLOC1_SIGNAL_IN ( in_ICACHE_RSP_PACKET_ID ,"packet_id" ,Tpacket_t ,_param->_size_ifetch_queue_ptr ); |
---|
| 80 | ALLOC1_SIGNAL_IN ( in_ICACHE_RSP_ERROR ,"error" ,Ticache_error_t ,_param->_size_icache_error ); |
---|
[112] | 81 | |
---|
| 82 | ALLOC1_INTERFACE_END(_param->_nb_context); |
---|
[88] | 83 | } |
---|
| 84 | { |
---|
[112] | 85 | ALLOC2_INTERFACE_BEGIN("icache_rsp",IN , WEST, _("Instruction cache respons."),_param->_nb_context,_param->_nb_inst_fetch[it1]); |
---|
[88] | 86 | |
---|
| 87 | _ALLOC2_SIGNAL_IN ( in_ICACHE_RSP_INSTRUCTION ,"instruction" ,Ticache_instruction_t,_param->_size_instruction ,_param->_nb_context,_param->_nb_inst_fetch[it1]); |
---|
[112] | 88 | |
---|
| 89 | ALLOC2_INTERFACE_END(_param->_nb_context,_param->_nb_inst_fetch[it1]); |
---|
[88] | 90 | } |
---|
| 91 | |
---|
| 92 | // ~~~~~[ Interface : "decod" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 93 | { |
---|
[112] | 94 | ALLOC1_INTERFACE_BEGIN("decod",OUT,EAST,_("Decoded instruction, send to ooo_engine"),_param->_sum_inst_decod); |
---|
[88] | 95 | |
---|
| 96 | ALLOC1_VALACK_OUT (out_DECOD_VAL , VAL); |
---|
| 97 | ALLOC1_VALACK_IN ( in_DECOD_ACK , ACK); |
---|
| 98 | ALLOC1_SIGNAL_OUT (out_DECOD_CONTEXT_ID ,"CONTEXT_ID" ,Tcontext_t ,_param->_size_context_id ); |
---|
| 99 | ALLOC1_SIGNAL_OUT (out_DECOD_DEPTH ,"DEPTH" ,Tdepth_t ,_param->_size_depth ); |
---|
| 100 | ALLOC1_SIGNAL_OUT (out_DECOD_TYPE ,"TYPE" ,Ttype_t ,_param->_size_type ); |
---|
| 101 | ALLOC1_SIGNAL_OUT (out_DECOD_OPERATION ,"OPERATION" ,Toperation_t ,_param->_size_operation ); |
---|
| 102 | ALLOC1_SIGNAL_OUT (out_DECOD_NO_EXECUTE ,"NO_EXECUTE" ,Tcontrol_t ,1 ); |
---|
[123] | 103 | // ALLOC1_SIGNAL_OUT (out_DECOD_HAVE_EVENT ,"HAVE_EVENT" ,Tcontrol_t ,1 ); |
---|
| 104 | ALLOC1_SIGNAL_OUT (out_DECOD_LAST_EVENT ,"LAST_EVENT" ,Tcontrol_t ,1 ); |
---|
[88] | 105 | ALLOC1_SIGNAL_OUT (out_DECOD_IS_DELAY_SLOT ,"IS_DELAY_SLOT" ,Tcontrol_t ,1 ); |
---|
[108] | 106 | #ifdef DEBUG |
---|
| 107 | ALLOC1_SIGNAL_OUT (out_DECOD_ADDRESS ,"ADDRESS" ,Tgeneral_data_t ,_param->_size_instruction_address ); |
---|
| 108 | #endif |
---|
[105] | 109 | ALLOC1_SIGNAL_OUT (out_DECOD_ADDRESS_NEXT ,"ADDRESS_NEXT" ,Tgeneral_data_t ,_param->_size_instruction_address ); |
---|
[88] | 110 | ALLOC1_SIGNAL_OUT (out_DECOD_HAS_IMMEDIAT ,"HAS_IMMEDIAT" ,Tcontrol_t ,1 ); |
---|
| 111 | ALLOC1_SIGNAL_OUT (out_DECOD_IMMEDIAT ,"IMMEDIAT" ,Tgeneral_data_t ,_param->_size_general_data ); |
---|
| 112 | ALLOC1_SIGNAL_OUT (out_DECOD_READ_RA ,"READ_RA" ,Tcontrol_t ,1 ); |
---|
| 113 | ALLOC1_SIGNAL_OUT (out_DECOD_NUM_REG_RA ,"NUM_REG_RA" ,Tgeneral_address_t ,_param->_size_general_register_logic); |
---|
| 114 | ALLOC1_SIGNAL_OUT (out_DECOD_READ_RB ,"READ_RB" ,Tcontrol_t ,1 ); |
---|
| 115 | ALLOC1_SIGNAL_OUT (out_DECOD_NUM_REG_RB ,"NUM_REG_RB" ,Tgeneral_address_t ,_param->_size_general_register_logic); |
---|
| 116 | ALLOC1_SIGNAL_OUT (out_DECOD_READ_RC ,"READ_RC" ,Tcontrol_t ,1 ); |
---|
| 117 | ALLOC1_SIGNAL_OUT (out_DECOD_NUM_REG_RC ,"NUM_REG_RC" ,Tspecial_address_t ,_param->_size_special_register_logic); |
---|
| 118 | ALLOC1_SIGNAL_OUT (out_DECOD_WRITE_RD ,"WRITE_RD" ,Tcontrol_t ,1 ); |
---|
| 119 | ALLOC1_SIGNAL_OUT (out_DECOD_NUM_REG_RD ,"NUM_REG_RD" ,Tgeneral_address_t ,_param->_size_general_register_logic); |
---|
| 120 | ALLOC1_SIGNAL_OUT (out_DECOD_WRITE_RE ,"WRITE_RE" ,Tcontrol_t ,1 ); |
---|
| 121 | ALLOC1_SIGNAL_OUT (out_DECOD_NUM_REG_RE ,"NUM_REG_RE" ,Tspecial_address_t ,_param->_size_special_register_logic); |
---|
| 122 | ALLOC1_SIGNAL_OUT (out_DECOD_EXCEPTION_USE ,"EXCEPTION_USE" ,Texception_t ,_param->_size_exception_use ); |
---|
| 123 | ALLOC1_SIGNAL_OUT (out_DECOD_EXCEPTION ,"EXCEPTION" ,Texception_t ,_param->_size_exception ); |
---|
[112] | 124 | |
---|
| 125 | ALLOC1_INTERFACE_END(_param->_sum_inst_decod); |
---|
[88] | 126 | } |
---|
| 127 | |
---|
| 128 | // ~~~~~[ Interface : "branch_complete" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 129 | { |
---|
[112] | 130 | ALLOC1_INTERFACE_BEGIN("branch_complete",IN,EAST,_("Branch commit"),_param->_nb_inst_branch_complete); |
---|
[88] | 131 | |
---|
| 132 | ALLOC1_VALACK_IN ( in_BRANCH_COMPLETE_VAL , VAL); |
---|
| 133 | ALLOC1_VALACK_OUT (out_BRANCH_COMPLETE_ACK , ACK); |
---|
| 134 | ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_CONTEXT_ID ,"CONTEXT_ID" ,Tcontext_t ,_param->_size_context_id); |
---|
| 135 | ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_DEPTH ,"DEPTH" ,Tdepth_t ,_param->_size_depth ); |
---|
| 136 | ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_ADDRESS ,"ADDRESS" ,Taddress_t ,_param->_size_instruction_address); |
---|
[98] | 137 | ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_NO_SEQUENCE ,"NO_SEQUENCE" ,Tcontrol_t ,1 ); |
---|
[88] | 138 | ALLOC1_SIGNAL_OUT (out_BRANCH_COMPLETE_MISS_PREDICTION ,"MISS_PREDICTION" ,Tcontrol_t ,1 ); |
---|
[112] | 139 | |
---|
| 140 | ALLOC1_INTERFACE_END(_param->_nb_inst_branch_complete); |
---|
[88] | 141 | } |
---|
| 142 | |
---|
| 143 | // ~~~~~[ Interface : "commit_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 144 | { |
---|
[112] | 145 | ALLOC0_INTERFACE_BEGIN("commit_event",IN,EAST,_("Out Of Order engine have an event")); |
---|
[88] | 146 | |
---|
[112] | 147 | ALLOC0_VALACK_IN ( in_COMMIT_EVENT_VAL , VAL); |
---|
| 148 | ALLOC0_VALACK_OUT (out_COMMIT_EVENT_ACK , ACK); |
---|
| 149 | ALLOC0_SIGNAL_IN ( in_COMMIT_EVENT_CONTEXT_ID ,"CONTEXT_ID" ,Tcontext_t ,_param->_size_context_id); |
---|
| 150 | ALLOC0_SIGNAL_IN ( in_COMMIT_EVENT_DEPTH ,"DEPTH" ,Tdepth_t ,_param->_size_depth ); |
---|
| 151 | ALLOC0_SIGNAL_IN ( in_COMMIT_EVENT_TYPE ,"TYPE" ,Tevent_type_t ,_param->_size_event_type); |
---|
| 152 | ALLOC0_SIGNAL_IN ( in_COMMIT_EVENT_IS_DELAY_SLOT ,"IS_DELAY_SLOT" ,Tcontrol_t ,1 ); |
---|
| 153 | ALLOC0_SIGNAL_IN ( in_COMMIT_EVENT_ADDRESS ,"ADDRESS" ,Taddress_t ,_param->_size_instruction_address ); |
---|
| 154 | ALLOC0_SIGNAL_IN ( in_COMMIT_EVENT_ADDRESS_EPCR_VAL ,"ADDRESS_EPCR_VAL" ,Tcontrol_t ,1 ); |
---|
| 155 | ALLOC0_SIGNAL_IN ( in_COMMIT_EVENT_ADDRESS_EPCR ,"ADDRESS_EPCR" ,Taddress_t ,_param->_size_instruction_address ); |
---|
| 156 | ALLOC0_SIGNAL_IN ( in_COMMIT_EVENT_ADDRESS_EEAR_VAL ,"ADDRESS_EEAR_VAL" ,Tcontrol_t ,1 ); |
---|
| 157 | ALLOC0_SIGNAL_IN ( in_COMMIT_EVENT_ADDRESS_EEAR ,"ADDRESS_EEAR" ,Tgeneral_data_t ,_param->_size_general_data ); |
---|
| 158 | |
---|
| 159 | ALLOC0_INTERFACE_END(); |
---|
[88] | 160 | } |
---|
| 161 | |
---|
| 162 | // ~~~~~[ Interface "event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 163 | { |
---|
[112] | 164 | ALLOC1_INTERFACE_BEGIN("event",OUT,EAST,_("Event interface"),_param->_nb_context); |
---|
[88] | 165 | |
---|
| 166 | ALLOC1_VALACK_OUT (out_EVENT_VAL , VAL); |
---|
| 167 | ALLOC1_VALACK_IN ( in_EVENT_ACK , ACK); |
---|
| 168 | ALLOC1_SIGNAL_OUT (out_EVENT_ADDRESS ,"ADDRESS" ,Taddress_t ,_param->_size_instruction_address); |
---|
| 169 | ALLOC1_SIGNAL_OUT (out_EVENT_ADDRESS_NEXT ,"ADDRESS_NEXT" ,Taddress_t ,_param->_size_instruction_address); |
---|
| 170 | ALLOC1_SIGNAL_OUT (out_EVENT_ADDRESS_NEXT_VAL ,"ADDRESS_NEXT_VAL" ,Tcontrol_t ,1 ); |
---|
| 171 | ALLOC1_SIGNAL_OUT (out_EVENT_IS_DS_TAKE ,"IS_DS_TAKE" ,Tcontrol_t ,1 ); |
---|
[112] | 172 | |
---|
| 173 | ALLOC1_INTERFACE_END(_param->_nb_context); |
---|
[88] | 174 | } |
---|
| 175 | |
---|
| 176 | // ~~~~~[ Interface "spr_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 177 | { |
---|
[112] | 178 | ALLOC1_INTERFACE_BEGIN("spr_event",OUT,EAST,_("Event interface with the special registerFile"),_param->_nb_context); |
---|
[88] | 179 | |
---|
| 180 | ALLOC1_VALACK_OUT (out_SPR_EVENT_VAL , VAL); |
---|
| 181 | ALLOC1_VALACK_IN ( in_SPR_EVENT_ACK , ACK); |
---|
| 182 | ALLOC1_SIGNAL_OUT (out_SPR_EVENT_EPCR ,"EPCR" ,Tspr_t ,_param->_size_spr); |
---|
| 183 | ALLOC1_SIGNAL_OUT (out_SPR_EVENT_EEAR_WEN ,"EEAR_WEN" ,Tcontrol_t ,1 ); |
---|
| 184 | ALLOC1_SIGNAL_OUT (out_SPR_EVENT_EEAR ,"EEAR" ,Tspr_t ,_param->_size_spr); |
---|
| 185 | ALLOC1_SIGNAL_OUT (out_SPR_EVENT_SR_DSX ,"SR_DSX" ,Tcontrol_t ,1 ); |
---|
| 186 | ALLOC1_SIGNAL_OUT (out_SPR_EVENT_SR_TO_ESR ,"SR_TO_ESR" ,Tcontrol_t ,1 ); |
---|
[112] | 187 | |
---|
| 188 | ALLOC1_INTERFACE_END(_param->_nb_context); |
---|
[88] | 189 | } |
---|
| 190 | |
---|
| 191 | // ~~~~~[ Interface : "nb_inst" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 192 | { |
---|
[112] | 193 | ALLOC1_INTERFACE_BEGIN("nb_inst",IN,EAST,_("Instruction number"),_param->_nb_context); |
---|
[88] | 194 | |
---|
| 195 | ALLOC1_SIGNAL_IN ( in_NB_INST_COMMIT_ALL ,"COMMIT_ALL" ,Tcounter_t ,_param->_size_nb_inst_commit); |
---|
| 196 | ALLOC1_SIGNAL_IN ( in_NB_INST_COMMIT_MEM ,"COMMIT_MEM" ,Tcounter_t ,_param->_size_nb_inst_commit); |
---|
[108] | 197 | ALLOC1_SIGNAL_OUT (out_NB_INST_DECOD_ALL ,"DECOD_ALL" ,Tcounter_t ,_param->_size_nb_inst_decod ); |
---|
[112] | 198 | |
---|
| 199 | ALLOC1_INTERFACE_END(_param->_nb_context); |
---|
[88] | 200 | } |
---|
| 201 | |
---|
| 202 | // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 203 | { |
---|
[112] | 204 | ALLOC1_INTERFACE_BEGIN("depth",OUT,EAST,_("Interface depth"),_param->_nb_context); |
---|
[88] | 205 | |
---|
[101] | 206 | ALLOC1_SIGNAL_OUT (out_DEPTH_MIN ,"MIN" ,Tdepth_t ,_param->_size_depth); |
---|
| 207 | ALLOC1_SIGNAL_OUT (out_DEPTH_MAX ,"MAX" ,Tdepth_t ,_param->_size_depth); |
---|
| 208 | ALLOC1_SIGNAL_OUT (out_DEPTH_FULL ,"FULL" ,Tcontrol_t ,1); |
---|
[112] | 209 | |
---|
| 210 | ALLOC1_INTERFACE_END(_param->_nb_context); |
---|
[88] | 211 | } |
---|
| 212 | |
---|
| 213 | // ~~~~~[ Interface : "spr" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 214 | { |
---|
[112] | 215 | ALLOC1_INTERFACE_BEGIN("spr",IN,EAST,_("Interface with the special registerFile"),_param->_nb_context); |
---|
[88] | 216 | |
---|
| 217 | ALLOC1_SIGNAL_IN ( in_SPR_SR_IEE ,"SR_IEE" ,Tcontrol_t ,1); |
---|
| 218 | ALLOC1_SIGNAL_IN ( in_SPR_SR_EPH ,"SR_EPH" ,Tcontrol_t ,1); |
---|
[112] | 219 | |
---|
| 220 | ALLOC1_INTERFACE_END(_param->_nb_context); |
---|
[88] | 221 | } |
---|
| 222 | |
---|
| 223 | // ~~~~~[ Interface : "interrupt" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 224 | { |
---|
[112] | 225 | ALLOC1_INTERFACE_BEGIN("interrupt",IN,NORTH,_("Interrupt Exception"),_param->_nb_context); |
---|
[88] | 226 | |
---|
| 227 | ALLOC1_SIGNAL_IN ( in_INTERRUPT_ENABLE ,"ENABLE" ,Tcontrol_t ,1); |
---|
[112] | 228 | |
---|
| 229 | ALLOC1_INTERFACE_END(_param->_nb_context); |
---|
[88] | 230 | } |
---|
| 231 | |
---|
| 232 | // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 233 | std::string name; |
---|
| 234 | |
---|
| 235 | _component_ifetch_unit = new morpheo::behavioural::core::multi_front_end::front_end::ifetch_unit::Ifetch_unit * [_param->_nb_context]; |
---|
| 236 | |
---|
| 237 | for (uint32_t i=0; i<_param->_nb_context; ++i) |
---|
| 238 | { |
---|
| 239 | name = _name+"_ifetch_unit_"+toString(i); |
---|
| 240 | log_printf(TRACE,Front_end,FUNCTION,_("Create : %s"),name.c_str()); |
---|
| 241 | |
---|
| 242 | _component_ifetch_unit [i] = new morpheo::behavioural::core::multi_front_end::front_end::ifetch_unit::Ifetch_unit |
---|
| 243 | (name.c_str() |
---|
| 244 | #ifdef STATISTICS |
---|
| 245 | ,param_statistics |
---|
| 246 | #endif |
---|
| 247 | ,_param->_param_ifetch_unit [i] |
---|
| 248 | ,_usage); |
---|
| 249 | |
---|
| 250 | _component->set_component (_component_ifetch_unit [i]->_component |
---|
| 251 | #ifdef POSITION |
---|
| 252 | , 50, 50, 10, 10 |
---|
| 253 | #endif |
---|
| 254 | ); |
---|
| 255 | } |
---|
| 256 | |
---|
| 257 | { |
---|
| 258 | name = _name+"_prediction_unit"; |
---|
| 259 | log_printf(TRACE,Front_end,FUNCTION,_("Create : %s"),name.c_str()); |
---|
| 260 | |
---|
| 261 | _component_prediction_unit = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::Prediction_unit |
---|
| 262 | (name.c_str() |
---|
| 263 | #ifdef STATISTICS |
---|
| 264 | ,param_statistics |
---|
| 265 | #endif |
---|
| 266 | ,_param->_param_prediction_unit |
---|
| 267 | ,_usage); |
---|
| 268 | |
---|
| 269 | _component->set_component (_component_prediction_unit->_component |
---|
| 270 | #ifdef POSITION |
---|
| 271 | , 50, 50, 10, 10 |
---|
| 272 | #endif |
---|
| 273 | ); |
---|
| 274 | } |
---|
| 275 | |
---|
| 276 | _component_decod_unit = new morpheo::behavioural::core::multi_front_end::front_end::decod_unit::Decod_unit * [_param->_nb_decod_unit]; |
---|
| 277 | |
---|
| 278 | for (uint32_t i=0; i<_param->_nb_decod_unit; ++i) |
---|
| 279 | { |
---|
| 280 | name = _name+"_decod_unit_"+toString(i); |
---|
| 281 | log_printf(TRACE,Front_end,FUNCTION,_("Create : %s"),name.c_str()); |
---|
| 282 | |
---|
| 283 | _component_decod_unit [i] = new morpheo::behavioural::core::multi_front_end::front_end::decod_unit::Decod_unit |
---|
| 284 | (name.c_str() |
---|
| 285 | #ifdef STATISTICS |
---|
| 286 | ,param_statistics |
---|
| 287 | #endif |
---|
| 288 | ,_param->_param_decod_unit [i] |
---|
| 289 | ,_usage); |
---|
| 290 | |
---|
| 291 | _component->set_component (_component_decod_unit [i]->_component |
---|
| 292 | #ifdef POSITION |
---|
| 293 | , 50, 50, 10, 10 |
---|
| 294 | #endif |
---|
| 295 | ); |
---|
| 296 | } |
---|
| 297 | |
---|
| 298 | { |
---|
| 299 | name = _name+"_context_state"; |
---|
| 300 | log_printf(TRACE,Front_end,FUNCTION,_("Create : %s"),name.c_str()); |
---|
| 301 | |
---|
| 302 | _component_context_state = new morpheo::behavioural::core::multi_front_end::front_end::context_state::Context_State |
---|
| 303 | (name.c_str() |
---|
| 304 | #ifdef STATISTICS |
---|
| 305 | ,param_statistics |
---|
| 306 | #endif |
---|
| 307 | ,_param->_param_context_state |
---|
| 308 | ,_usage); |
---|
| 309 | |
---|
| 310 | _component->set_component (_component_context_state->_component |
---|
| 311 | #ifdef POSITION |
---|
| 312 | , 50, 50, 10, 10 |
---|
| 313 | #endif |
---|
| 314 | ); |
---|
| 315 | } |
---|
| 316 | |
---|
| 317 | { |
---|
| 318 | name = _name+"_glue"; |
---|
| 319 | log_printf(TRACE,Front_end,FUNCTION,_("Create : %s"),name.c_str()); |
---|
| 320 | |
---|
| 321 | _component_glue = new morpheo::behavioural::core::multi_front_end::front_end::front_end_glue::Front_end_Glue |
---|
| 322 | (name.c_str() |
---|
| 323 | #ifdef STATISTICS |
---|
| 324 | ,param_statistics |
---|
| 325 | #endif |
---|
| 326 | ,_param->_param_glue |
---|
| 327 | ,_usage); |
---|
| 328 | |
---|
| 329 | _component->set_component (_component_glue->_component |
---|
| 330 | #ifdef POSITION |
---|
| 331 | , 50, 50, 10, 10 |
---|
| 332 | #endif |
---|
| 333 | ); |
---|
| 334 | } |
---|
| 335 | |
---|
| 336 | |
---|
| 337 | // ~~~~~[ Instanciation ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 338 | std::string src,dest; |
---|
| 339 | |
---|
| 340 | // =================================================================== |
---|
| 341 | // =====[ ifetch_unit ]=============================================== |
---|
| 342 | // =================================================================== |
---|
| 343 | for (uint32_t i=0; i<_param->_nb_context; ++i) |
---|
| 344 | { |
---|
| 345 | src = _name+"_ifetch_unit_"+toString(i); |
---|
| 346 | log_printf(TRACE,Front_end,FUNCTION,_("Instance : %s"),src.c_str()); |
---|
| 347 | |
---|
| 348 | { |
---|
| 349 | dest = _name; |
---|
| 350 | #ifdef POSITION |
---|
| 351 | _component->interface_map (src ,"", |
---|
| 352 | dest,""); |
---|
| 353 | #endif |
---|
| 354 | PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
| 355 | PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); |
---|
| 356 | } |
---|
| 357 | |
---|
| 358 | // ~~~~~[ Interface "icache_req" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 359 | { |
---|
| 360 | dest = _name; |
---|
| 361 | #ifdef POSITION |
---|
| 362 | _component->interface_map (src ,"icache_req", |
---|
| 363 | dest,"icache_req_"+toString(i)); |
---|
| 364 | #endif |
---|
| 365 | |
---|
| 366 | PORT_MAP(_component,src ,"out_ICACHE_REQ_VAL" ,dest,"out_ICACHE_REQ_"+toString(i)+"_VAL" ); |
---|
| 367 | PORT_MAP(_component,src , "in_ICACHE_REQ_ACK" ,dest, "in_ICACHE_REQ_"+toString(i)+"_ACK" ); |
---|
| 368 | //PORT_MAP(_component,src ,"out_ICACHE_REQ_THREAD_ID",dest,"out_ICACHE_REQ_"+toString(i)+"_THREAD_ID"); |
---|
| 369 | if (_param->_have_port_ifetch_queue_ptr) |
---|
| 370 | PORT_MAP(_component,src ,"out_ICACHE_REQ_PACKET_ID",dest,"out_ICACHE_REQ_"+toString(i)+"_PACKET_ID"); |
---|
| 371 | PORT_MAP(_component,src ,"out_ICACHE_REQ_ADDRESS" ,dest,"out_ICACHE_REQ_"+toString(i)+"_ADDRESS" ); |
---|
| 372 | PORT_MAP(_component,src ,"out_ICACHE_REQ_TYPE" ,dest,"out_ICACHE_REQ_"+toString(i)+"_TYPE" ); |
---|
| 373 | } |
---|
| 374 | |
---|
| 375 | // ~~~~~[ Interface "icache_rsp" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 376 | { |
---|
| 377 | dest = _name; |
---|
| 378 | #ifdef POSITION |
---|
| 379 | _component->interface_map (src ,"icache_rsp", |
---|
| 380 | dest,"icache_rsp_"+toString(i)); |
---|
| 381 | #endif |
---|
| 382 | |
---|
| 383 | PORT_MAP(_component,src , "in_ICACHE_RSP_VAL" ,dest, "in_ICACHE_RSP_"+toString(i)+"_VAL" ); |
---|
| 384 | PORT_MAP(_component,src ,"out_ICACHE_RSP_ACK" ,dest,"out_ICACHE_RSP_"+toString(i)+"_ACK" ); |
---|
| 385 | // PORT_MAP(_component,src , "in_ICACHE_RSP_THREAD_ID" ,dest, "in_ICACHE_RSP_"+toString(i)+"_THREAD_ID" ); |
---|
| 386 | if (_param->_have_port_ifetch_queue_ptr) |
---|
| 387 | PORT_MAP(_component,src , "in_ICACHE_RSP_PACKET_ID" ,dest, "in_ICACHE_RSP_"+toString(i)+"_PACKET_ID" ); |
---|
| 388 | PORT_MAP(_component,src , "in_ICACHE_RSP_ERROR" ,dest, "in_ICACHE_RSP_"+toString(i)+"_ERROR" ); |
---|
| 389 | |
---|
| 390 | for (uint32_t j=0; j<_param->_nb_inst_fetch [i]; ++j) |
---|
| 391 | { |
---|
| 392 | #ifdef POSITION |
---|
| 393 | _component->interface_map (src ,"icache_rsp_"+toString(j), |
---|
| 394 | dest,"icache_rsp_"+toString(i)+"_"+toString(j)); |
---|
| 395 | #endif |
---|
| 396 | |
---|
| 397 | PORT_MAP(_component,src , "in_ICACHE_RSP_"+toString(j)+"_INSTRUCTION",dest, "in_ICACHE_RSP_"+toString(i)+"_"+toString(j)+"_INSTRUCTION"); |
---|
| 398 | } |
---|
| 399 | } |
---|
| 400 | |
---|
| 401 | // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 402 | { |
---|
| 403 | dest = _name+"_prediction_unit"; |
---|
| 404 | #ifdef POSITION |
---|
| 405 | _component->interface_map (src ,"predict" |
---|
| 406 | dest,"predict_"+toString(i)); |
---|
| 407 | #endif |
---|
| 408 | |
---|
| 409 | COMPONENT_MAP(_component,src ,"out_PREDICT_VAL" ,dest, "in_PREDICT_"+toString(i)+"_VAL" ); |
---|
| 410 | COMPONENT_MAP(_component,src , "in_PREDICT_ACK" ,dest,"out_PREDICT_"+toString(i)+"_ACK" ); |
---|
| 411 | COMPONENT_MAP(_component,src ,"out_PREDICT_PC_PREVIOUS" ,dest, "in_PREDICT_"+toString(i)+"_PC_PREVIOUS" ); |
---|
| 412 | COMPONENT_MAP(_component,src ,"out_PREDICT_PC_CURRENT" ,dest, "in_PREDICT_"+toString(i)+"_PC_CURRENT" ); |
---|
| 413 | COMPONENT_MAP(_component,src ,"out_PREDICT_PC_CURRENT_IS_DS_TAKE" ,dest, "in_PREDICT_"+toString(i)+"_PC_CURRENT_IS_DS_TAKE" ); |
---|
| 414 | COMPONENT_MAP(_component,src , "in_PREDICT_PC_NEXT" ,dest,"out_PREDICT_"+toString(i)+"_PC_NEXT" ); |
---|
| 415 | COMPONENT_MAP(_component,src , "in_PREDICT_PC_NEXT_IS_DS_TAKE" ,dest,"out_PREDICT_"+toString(i)+"_PC_NEXT_IS_DS_TAKE" ); |
---|
| 416 | if (_param->_have_port_inst_ifetch_ptr) |
---|
| 417 | COMPONENT_MAP(_component,src , "in_PREDICT_INST_IFETCH_PTR" ,dest,"out_PREDICT_"+toString(i)+"_INST_IFETCH_PTR" ); |
---|
| 418 | COMPONENT_MAP(_component,src , "in_PREDICT_BRANCH_STATE" ,dest,"out_PREDICT_"+toString(i)+"_BRANCH_STATE" ); |
---|
| 419 | if (_param->_have_port_depth) |
---|
| 420 | COMPONENT_MAP(_component,src , "in_PREDICT_BRANCH_UPDATE_PREDICTION_ID",dest,"out_PREDICT_"+toString(i)+"_BRANCH_UPDATE_PREDICTION_ID"); |
---|
| 421 | |
---|
| 422 | for (uint32_t j=0; j<_param->_nb_inst_fetch[i]; ++j) |
---|
| 423 | { |
---|
| 424 | #ifdef POSITION |
---|
| 425 | _component->interface_map (src ,"predict_"+toString(j) |
---|
| 426 | dest,"predict_"+toString(i)+"_"+toString(j)); |
---|
| 427 | #endif |
---|
| 428 | |
---|
| 429 | COMPONENT_MAP(_component,src , "in_PREDICT_"+toString(j)+ "_INSTRUCTION_ENABLE", |
---|
| 430 | dest,"out_PREDICT_"+toString(i)+"_"+toString(j)+"_INSTRUCTION_ENABLE"); |
---|
| 431 | } |
---|
| 432 | } |
---|
| 433 | |
---|
| 434 | // ~~~~~[ Interface : "decod" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 435 | { |
---|
| 436 | uint32_t num_decod_unit = _param->_link_context_to_decod_unit[i]; |
---|
| 437 | uint32_t num_context; |
---|
| 438 | |
---|
| 439 | for (num_context=0; num_context<_param->_decod_unit_nb_context[num_decod_unit]; num_context ++) |
---|
| 440 | if (_param->_translate_context_id_from_decod_unit [num_decod_unit][num_context] == i) |
---|
| 441 | break; |
---|
| 442 | |
---|
| 443 | dest = _name+"_decod_unit_"+toString(num_decod_unit); |
---|
| 444 | #ifdef POSITION |
---|
| 445 | _component->interface_map (src ,"decod" |
---|
| 446 | dest,"ifetch_"+toString(num_context)); |
---|
| 447 | #endif |
---|
| 448 | |
---|
| 449 | ////out_DECOD_CONTEXT_ID |
---|
| 450 | |
---|
| 451 | COMPONENT_MAP(_component,src ,"out_DECOD_ADDRESS" ,dest, "in_IFETCH_"+toString(num_context)+"_ADDRESS" ); |
---|
| 452 | if (_param->_have_port_inst_ifetch_ptr) |
---|
| 453 | COMPONENT_MAP(_component,src ,"out_DECOD_INST_IFETCH_PTR" ,dest, "in_IFETCH_"+toString(num_context)+"_INST_IFETCH_PTR" ); |
---|
| 454 | COMPONENT_MAP(_component,src ,"out_DECOD_BRANCH_STATE" ,dest, "in_IFETCH_"+toString(num_context)+"_BRANCH_STATE" ); |
---|
| 455 | if (_param->_have_port_depth) |
---|
| 456 | COMPONENT_MAP(_component,src ,"out_DECOD_BRANCH_UPDATE_PREDICTION_ID",dest, "in_IFETCH_"+toString(num_context)+"_BRANCH_UPDATE_PREDICTION_ID"); |
---|
| 457 | COMPONENT_MAP(_component,src ,"out_DECOD_EXCEPTION" ,dest, "in_IFETCH_"+toString(num_context)+"_EXCEPTION" ); |
---|
| 458 | |
---|
| 459 | for (uint32_t j=0; j<_param->_nb_inst_fetch [i];++j) |
---|
| 460 | { |
---|
| 461 | dest = _name+"_decod_unit_"+toString(num_decod_unit); |
---|
| 462 | #ifdef POSITION |
---|
| 463 | _component->interface_map (src ,"decod_"+toString(j) |
---|
| 464 | dest,"ifetch_"+toString(num_context)+"_"+toString(j)); |
---|
| 465 | #endif |
---|
| 466 | |
---|
| 467 | COMPONENT_MAP(_component,src ,"out_DECOD_" +toString(j)+ "_VAL" , |
---|
| 468 | dest, "in_IFETCH_"+toString(num_context)+"_"+toString(j)+"_VAL" ); |
---|
| 469 | COMPONENT_MAP(_component,src , "in_DECOD_" +toString(j)+ "_ACK" , |
---|
| 470 | dest,"out_IFETCH_"+toString(num_context)+"_"+toString(j)+"_ACK" ); |
---|
| 471 | COMPONENT_MAP(_component,src ,"out_DECOD_" +toString(j)+ "_INSTRUCTION", |
---|
| 472 | dest, "in_IFETCH_"+toString(num_context)+"_"+toString(j)+"_INSTRUCTION"); |
---|
| 473 | } |
---|
| 474 | } |
---|
| 475 | |
---|
| 476 | // ~~~~~[ Interface "event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 477 | { |
---|
| 478 | dest = _name+"_glue"; |
---|
| 479 | #ifdef POSITION |
---|
| 480 | _component->interface_map (src ,"event", |
---|
| 481 | dest,"event_"+toString(i)); |
---|
| 482 | #endif |
---|
| 483 | |
---|
| 484 | COMPONENT_MAP(_component,src , "in_EVENT_VAL" , |
---|
| 485 | dest,"out_EVENT_"+toString(i)+"_IFETCH_UNIT_VAL" ); |
---|
| 486 | COMPONENT_MAP(_component,src ,"out_EVENT_ACK" , |
---|
| 487 | dest, "in_EVENT_"+toString(i)+"_IFETCH_UNIT_ACK" ); |
---|
| 488 | COMPONENT_MAP(_component,src , "in_EVENT_ADDRESS" , |
---|
| 489 | dest,"out_EVENT_"+toString(i)+"_IFETCH_UNIT_ADDRESS" ); |
---|
| 490 | COMPONENT_MAP(_component,src , "in_EVENT_ADDRESS_NEXT" , |
---|
| 491 | dest,"out_EVENT_"+toString(i)+"_IFETCH_UNIT_ADDRESS_NEXT" ); |
---|
| 492 | COMPONENT_MAP(_component,src , "in_EVENT_ADDRESS_NEXT_VAL", |
---|
| 493 | dest,"out_EVENT_"+toString(i)+"_IFETCH_UNIT_ADDRESS_NEXT_VAL"); |
---|
| 494 | COMPONENT_MAP(_component,src , "in_EVENT_IS_DS_TAKE" , |
---|
| 495 | dest,"out_EVENT_"+toString(i)+"_IFETCH_UNIT_IS_DS_TAKE" ); |
---|
| 496 | } |
---|
| 497 | } |
---|
| 498 | |
---|
| 499 | // =================================================================== |
---|
| 500 | // =====[ prediction_unit ]=========================================== |
---|
| 501 | // =================================================================== |
---|
| 502 | { |
---|
| 503 | src = _name+"_prediction_unit"; |
---|
| 504 | log_printf(TRACE,Front_end,FUNCTION,_("Instance : %s"),src.c_str()); |
---|
| 505 | |
---|
| 506 | { |
---|
| 507 | dest = _name; |
---|
| 508 | #ifdef POSITION |
---|
| 509 | _component->interface_map (src ,"", |
---|
| 510 | dest,""); |
---|
| 511 | #endif |
---|
| 512 | PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
| 513 | PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); |
---|
| 514 | } |
---|
| 515 | |
---|
| 516 | // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 517 | // in_PREDICT_VAL - component_ifetch_unit |
---|
| 518 | // out_PREDICT_ACK - component_ifetch_unit |
---|
| 519 | // in_PREDICT_PC_PREVIOUS - component_ifetch_unit |
---|
| 520 | // in_PREDICT_PC_CURRENT - component_ifetch_unit |
---|
| 521 | // in_PREDICT_PC_CURRENT_IS_DS_TAKE - component_ifetch_unit |
---|
| 522 | // out_PREDICT_PC_NEXT - component_ifetch_unit |
---|
| 523 | // out_PREDICT_PC_NEXT_IS_DS_TAKE - component_ifetch_unit |
---|
| 524 | // out_PREDICT_INSTRUCTION_ENABLE - component_ifetch_unit |
---|
| 525 | // out_PREDICT_INST_IFETCH_PTR - component_ifetch_unit |
---|
| 526 | // out_PREDICT_BRANCH_STATE - component_ifetch_unit |
---|
| 527 | // out_PREDICT_BRANCH_UPDATE_PREDICTION_ID - component_ifetch_unit |
---|
| 528 | |
---|
| 529 | // ~~~~~[ Interface : "decod" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 530 | // in_DECOD_VAL - component_decod_unit |
---|
| 531 | // out_DECOD_ACK - component_decod_unit |
---|
| 532 | // in_DECOD_CONTEXT_ID - component_decod_unit |
---|
| 533 | // in_DECOD_MATCH_INST_IFETCH_PTR - component_decod_unit |
---|
| 534 | // in_DECOD_BRANCH_STATE - component_decod_unit |
---|
| 535 | // in_DECOD_BRANCH_UPDATE_PREDICTION_ID - component_decod_unit |
---|
| 536 | // in_DECOD_BRANCH_CONDITION - component_decod_unit |
---|
| 537 | // in_DECOD_BRANCH_DIRECTION - component_decod_unit |
---|
| 538 | // in_DECOD_ADDRESS_SRC - component_decod_unit |
---|
| 539 | // in_DECOD_ADDRESS_DEST - component_decod_unit |
---|
| 540 | |
---|
| 541 | // ~~~~~[ Interface : "branch_complete" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 542 | for (uint32_t i=0; i<_param->_nb_inst_branch_complete; ++i) |
---|
| 543 | { |
---|
| 544 | dest = _name+"_glue"; |
---|
| 545 | #ifdef POSITION |
---|
| 546 | _component->interface_map (src ,"branch_complete_"+toString(i), |
---|
| 547 | dest,"branch_complete_"+toString(i)); |
---|
| 548 | #endif |
---|
| 549 | |
---|
| 550 | COMPONENT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+ "_VAL" , |
---|
| 551 | dest,"out_BRANCH_COMPLETE_"+toString(i)+"_PREDICTION_UNIT_VAL" ); |
---|
| 552 | COMPONENT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+ "_ACK" , |
---|
| 553 | dest, "in_BRANCH_COMPLETE_"+toString(i)+"_PREDICTION_UNIT_ACK" ); |
---|
| 554 | COMPONENT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+ "_MISS_PREDICTION", |
---|
| 555 | dest, "in_BRANCH_COMPLETE_"+toString(i)+"_PREDICTION_UNIT_MISS_PREDICTION"); |
---|
| 556 | |
---|
| 557 | dest = _name; |
---|
| 558 | #ifdef POSITION |
---|
| 559 | _component->interface_map (src ,"branch_complete_"+toString(i), |
---|
| 560 | dest,"branch_complete_"+toString(i)); |
---|
| 561 | #endif |
---|
| 562 | |
---|
| 563 | if (_param->_have_port_context_id) |
---|
| 564 | PORT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+"_CONTEXT_ID", |
---|
| 565 | dest, "in_BRANCH_COMPLETE_"+toString(i)+"_CONTEXT_ID"); |
---|
| 566 | if (_param->_have_port_depth) |
---|
| 567 | PORT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+"_DEPTH" , |
---|
| 568 | dest, "in_BRANCH_COMPLETE_"+toString(i)+"_DEPTH" ); |
---|
| 569 | PORT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS" , |
---|
| 570 | dest, "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS" ); |
---|
[98] | 571 | PORT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+"_NO_SEQUENCE", |
---|
| 572 | dest, "in_BRANCH_COMPLETE_"+toString(i)+"_NO_SEQUENCE"); |
---|
[88] | 573 | |
---|
[111] | 574 | // dest = _name+"_context_state"; |
---|
| 575 | // #ifdef POSITION |
---|
| 576 | // _component->interface_map (src ,"branch_complete_"+toString(i), |
---|
| 577 | // dest,"branch_complete_"+toString(i)); |
---|
| 578 | // #endif |
---|
[88] | 579 | |
---|
[111] | 580 | // COMPONENT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_TAKE" , |
---|
| 581 | // dest, "in_BRANCH_COMPLETE_"+toString(i)+"_TAKE" ); |
---|
| 582 | // COMPONENT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS_SRC" , |
---|
| 583 | // dest, "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS_SRC" ); |
---|
| 584 | // COMPONENT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS_DEST", |
---|
| 585 | // dest, "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS_DEST"); |
---|
[88] | 586 | } |
---|
| 587 | |
---|
| 588 | // ~~~~~[ Interface : "branch_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 589 | for (uint32_t i=0; i<_param->_nb_context; ++i) |
---|
| 590 | { |
---|
| 591 | dest = _name+"_context_state"; |
---|
| 592 | #ifdef POSITION |
---|
| 593 | _component->interface_map (src ,"branch_event_"+toString(i), |
---|
| 594 | dest,"branch_event_"+toString(i)); |
---|
| 595 | #endif |
---|
| 596 | |
---|
[95] | 597 | COMPONENT_MAP(_component,src ,"out_BRANCH_EVENT_"+toString(i)+"_VAL" , |
---|
| 598 | dest, "in_BRANCH_EVENT_"+toString(i)+"_VAL" ); |
---|
| 599 | COMPONENT_MAP(_component,src , "in_BRANCH_EVENT_"+toString(i)+"_ACK" , |
---|
| 600 | dest,"out_BRANCH_EVENT_"+toString(i)+"_ACK" ); |
---|
| 601 | // COMPONENT_MAP(_component,src ,"out_BRANCH_EVENT_"+toString(i)+"_CONTEXT_ID" , |
---|
| 602 | // dest, "in_BRANCH_EVENT_"+toString(i)+"_CONTEXT_ID" ); |
---|
[98] | 603 | if (_param->_have_port_depth) |
---|
| 604 | COMPONENT_MAP(_component,src ,"out_BRANCH_EVENT_"+toString(i)+"_DEPTH" , |
---|
| 605 | dest, "in_BRANCH_EVENT_"+toString(i)+"_DEPTH" ); |
---|
[95] | 606 | // COMPONENT_MAP(_component,src ,"out_BRANCH_EVENT_"+toString(i)+"_MISS_PREDICTION" , |
---|
| 607 | // dest, "in_BRANCH_EVENT_"+toString(i)+"_MISS_PREDICTION" ); |
---|
| 608 | COMPONENT_MAP(_component,src ,"out_BRANCH_EVENT_"+toString(i)+"_ADDRESS_SRC" , |
---|
| 609 | dest, "in_BRANCH_EVENT_"+toString(i)+"_ADDRESS_SRC" ); |
---|
| 610 | COMPONENT_MAP(_component,src ,"out_BRANCH_EVENT_"+toString(i)+"_ADDRESS_DEST_VAL", |
---|
| 611 | dest, "in_BRANCH_EVENT_"+toString(i)+"_ADDRESS_DEST_VAL"); |
---|
| 612 | COMPONENT_MAP(_component,src ,"out_BRANCH_EVENT_"+toString(i)+"_ADDRESS_DEST" , |
---|
| 613 | dest, "in_BRANCH_EVENT_"+toString(i)+"_ADDRESS_DEST" ); |
---|
[119] | 614 | COMPONENT_MAP(_component,src ,"out_BRANCH_EVENT_"+toString(i)+"_CAN_CONTINUE" , |
---|
| 615 | dest, "in_BRANCH_EVENT_"+toString(i)+"_CAN_CONTINUE" ); |
---|
[88] | 616 | } |
---|
| 617 | |
---|
[97] | 618 | // ~~~~~[ Interface : "event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 619 | for (uint32_t i=0; i<_param->_nb_context; ++i) |
---|
| 620 | { |
---|
| 621 | dest = _name+"_glue"; |
---|
| 622 | #ifdef POSITION |
---|
| 623 | _component->interface_map (src ,"event_"+toString(i), |
---|
| 624 | dest,"event_"+toString(i)); |
---|
| 625 | #endif |
---|
| 626 | COMPONENT_MAP(_component,src , "in_EVENT_"+toString(i)+ "_VAL" , |
---|
| 627 | dest,"out_EVENT_"+toString(i)+"_PREDICTION_UNIT_VAL" ); |
---|
| 628 | COMPONENT_MAP(_component,src ,"out_EVENT_"+toString(i)+ "_ACK" , |
---|
| 629 | dest, "in_EVENT_"+toString(i)+"_PREDICTION_UNIT_ACK" ); |
---|
| 630 | COMPONENT_MAP(_component,src , "in_EVENT_"+toString(i)+ "_TYPE" , |
---|
| 631 | dest,"out_EVENT_"+toString(i)+"_PREDICTION_UNIT_TYPE" ); |
---|
| 632 | if (_param->_have_port_depth) |
---|
| 633 | COMPONENT_MAP(_component,src , "in_EVENT_"+toString(i)+ "_DEPTH", |
---|
| 634 | dest,"out_EVENT_"+toString(i)+"_PREDICTION_UNIT_DEPTH"); |
---|
| 635 | } |
---|
| 636 | |
---|
[88] | 637 | // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 638 | for (uint32_t i=0; i<_param->_nb_context; ++i) |
---|
| 639 | { |
---|
| 640 | dest = _name+"_glue"; |
---|
| 641 | #ifdef POSITION |
---|
| 642 | _component->interface_map (src ,"depth_"+toString(i), |
---|
| 643 | dest,"depth_"+toString(i)); |
---|
| 644 | #endif |
---|
| 645 | |
---|
[101] | 646 | COMPONENT_MAP(_component,src ,"out_DEPTH_"+toString(i)+ "_VAL", |
---|
| 647 | dest, "in_DEPTH_"+toString(i)+"_PREDICTION_UNIT_VAL"); |
---|
[88] | 648 | if (_param->_have_port_depth) |
---|
| 649 | { |
---|
| 650 | COMPONENT_MAP(_component,src ,"out_DEPTH_"+toString(i)+ "_CURRENT", |
---|
| 651 | dest, "in_DEPTH_"+toString(i)+"_PREDICTION_UNIT_CURRENT"); |
---|
| 652 | COMPONENT_MAP(_component,src ,"out_DEPTH_"+toString(i)+ "_MIN" , |
---|
| 653 | dest, "in_DEPTH_"+toString(i)+"_PREDICTION_UNIT_MIN" ); |
---|
| 654 | COMPONENT_MAP(_component,src ,"out_DEPTH_"+toString(i)+ "_MAX" , |
---|
| 655 | dest, "in_DEPTH_"+toString(i)+"_PREDICTION_UNIT_MAX" ); |
---|
[101] | 656 | } |
---|
| 657 | COMPONENT_MAP(_component,src ,"out_DEPTH_"+toString(i)+ "_FULL" , |
---|
| 658 | dest, "in_DEPTH_"+toString(i)+"_PREDICTION_UNIT_FULL" ); |
---|
[88] | 659 | } |
---|
| 660 | } |
---|
| 661 | |
---|
| 662 | // =================================================================== |
---|
| 663 | // =====[ decod_unit ]================================================ |
---|
| 664 | // =================================================================== |
---|
| 665 | { |
---|
| 666 | uint32_t x=0; |
---|
| 667 | for (uint32_t i=0; i<_param->_nb_decod_unit; ++i) |
---|
| 668 | { |
---|
| 669 | src = _name+"_decod_unit_"+toString(i); |
---|
| 670 | log_printf(TRACE,Front_end,FUNCTION,_("Instance : %s"),src.c_str()); |
---|
| 671 | |
---|
| 672 | { |
---|
| 673 | dest = _name; |
---|
| 674 | #ifdef POSITION |
---|
| 675 | _component->interface_map (src ,"", |
---|
| 676 | dest,""); |
---|
| 677 | #endif |
---|
| 678 | PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
| 679 | PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); |
---|
| 680 | } |
---|
| 681 | |
---|
| 682 | // ~~~~~[ Interface : "ifetch" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 683 | // in_IFETCH_VAL - component_ifetch_unit |
---|
| 684 | // out_IFETCH_ACK - component_ifetch_unit |
---|
| 685 | // in_IFETCH_INSTRUCTION - component_ifetch_unit |
---|
| 686 | // in_IFETCH_CONTEXT_ID - component_ifetch_unit |
---|
| 687 | // in_IFETCH_ADDRESS - component_ifetch_unit |
---|
| 688 | //// in_IFETCH_ADDRESS_NEXT - component_ifetch_unit |
---|
| 689 | // in_IFETCH_INST_IFETCH_PTR - component_ifetch_unit |
---|
| 690 | // in_IFETCH_BRANCH_STATE - component_ifetch_unit |
---|
| 691 | // in_IFETCH_BRANCH_UPDATE_PREDICTION_ID - component_ifetch_unit |
---|
| 692 | // in_IFETCH_EXCEPTION - component_ifetch_unit |
---|
| 693 | |
---|
| 694 | for (uint32_t j=0; j<_param->_decod_unit_nb_context[i]; ++j) |
---|
| 695 | { |
---|
| 696 | dest = _name+"_glue"; |
---|
| 697 | #ifdef POSITION |
---|
| 698 | _component->interface_map (src ,"ifetch_"+toString(j), |
---|
| 699 | dest,"ifetch_"+toString(i)+"_"+toString(j)); |
---|
| 700 | #endif |
---|
| 701 | |
---|
| 702 | if (_param->_have_port_context_id) |
---|
| 703 | COMPONENT_MAP(_component,src , "in_IFETCH_"+toString(j) +"_CONTEXT_ID", |
---|
| 704 | dest,"out_IFETCH_"+toString(i)+"_"+toString(j)+"_DECOD_UNIT_CONTEXT_ID"); |
---|
| 705 | } |
---|
| 706 | |
---|
| 707 | // ~~~~~[ Interface : "decod" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 708 | for (uint32_t j=0; j<_param->_nb_inst_decod [i]; ++j) |
---|
| 709 | { |
---|
| 710 | dest = _name; |
---|
| 711 | #ifdef POSITION |
---|
| 712 | _component->interface_map (src ,"decod_"+toString(j), |
---|
| 713 | dest,"decod_"+toString(x)); |
---|
| 714 | #endif |
---|
| 715 | |
---|
| 716 | |
---|
| 717 | PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_VAL" , |
---|
| 718 | dest,"out_DECOD_"+toString(x)+"_VAL" ); |
---|
| 719 | PORT_MAP(_component,src , "in_DECOD_"+toString(j)+"_ACK" , |
---|
| 720 | dest, "in_DECOD_"+toString(x)+"_ACK" ); |
---|
| 721 | if (_param->_have_port_depth) |
---|
| 722 | PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_DEPTH" , |
---|
| 723 | dest,"out_DECOD_"+toString(x)+"_DEPTH" ); |
---|
| 724 | PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_TYPE" , |
---|
| 725 | dest,"out_DECOD_"+toString(x)+"_TYPE" ); |
---|
| 726 | PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_OPERATION" , |
---|
| 727 | dest,"out_DECOD_"+toString(x)+"_OPERATION" ); |
---|
| 728 | PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_NO_EXECUTE" , |
---|
| 729 | dest,"out_DECOD_"+toString(x)+"_NO_EXECUTE" ); |
---|
[123] | 730 | // PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_HAVE_EVENT" , |
---|
| 731 | // dest,"out_DECOD_"+toString(x)+"_HAVE_EVENT" ); |
---|
| 732 | PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_LAST_EVENT" , |
---|
| 733 | dest,"out_DECOD_"+toString(x)+"_LAST_EVENT" ); |
---|
[88] | 734 | PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_IS_DELAY_SLOT", |
---|
| 735 | dest,"out_DECOD_"+toString(x)+"_IS_DELAY_SLOT"); |
---|
[108] | 736 | #ifdef DEBUG |
---|
| 737 | PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_ADDRESS" , |
---|
| 738 | dest,"out_DECOD_"+toString(x)+"_ADDRESS" ); |
---|
| 739 | #endif |
---|
[105] | 740 | PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_ADDRESS_NEXT" , |
---|
| 741 | dest,"out_DECOD_"+toString(x)+"_ADDRESS_NEXT" ); |
---|
[88] | 742 | PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_HAS_IMMEDIAT" , |
---|
| 743 | dest,"out_DECOD_"+toString(x)+"_HAS_IMMEDIAT" ); |
---|
| 744 | PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_IMMEDIAT" , |
---|
| 745 | dest,"out_DECOD_"+toString(x)+"_IMMEDIAT" ); |
---|
| 746 | PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_READ_RA" , |
---|
| 747 | dest,"out_DECOD_"+toString(x)+"_READ_RA" ); |
---|
| 748 | PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_NUM_REG_RA" , |
---|
| 749 | dest,"out_DECOD_"+toString(x)+"_NUM_REG_RA" ); |
---|
| 750 | PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_READ_RB" , |
---|
| 751 | dest,"out_DECOD_"+toString(x)+"_READ_RB" ); |
---|
| 752 | PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_NUM_REG_RB" , |
---|
| 753 | dest,"out_DECOD_"+toString(x)+"_NUM_REG_RB" ); |
---|
| 754 | PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_READ_RC" , |
---|
| 755 | dest,"out_DECOD_"+toString(x)+"_READ_RC" ); |
---|
| 756 | PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_NUM_REG_RC" , |
---|
| 757 | dest,"out_DECOD_"+toString(x)+"_NUM_REG_RC" ); |
---|
| 758 | PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_WRITE_RD" , |
---|
| 759 | dest,"out_DECOD_"+toString(x)+"_WRITE_RD" ); |
---|
| 760 | PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_NUM_REG_RD" , |
---|
| 761 | dest,"out_DECOD_"+toString(x)+"_NUM_REG_RD" ); |
---|
| 762 | PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_WRITE_RE" , |
---|
| 763 | dest,"out_DECOD_"+toString(x)+"_WRITE_RE" ); |
---|
| 764 | PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_NUM_REG_RE" , |
---|
| 765 | dest,"out_DECOD_"+toString(x)+"_NUM_REG_RE" ); |
---|
| 766 | PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_EXCEPTION_USE", |
---|
| 767 | dest,"out_DECOD_"+toString(x)+"_EXCEPTION_USE"); |
---|
| 768 | PORT_MAP(_component,src ,"out_DECOD_"+toString(j)+"_EXCEPTION" , |
---|
| 769 | dest,"out_DECOD_"+toString(x)+"_EXCEPTION" ); |
---|
| 770 | |
---|
| 771 | dest = _name+"_glue"; |
---|
| 772 | #ifdef POSITION |
---|
| 773 | _component->interface_map (src ,"decod_"+toString(j), |
---|
| 774 | dest,"decod_"+toString(i)+"_"+toString(j)); |
---|
| 775 | #endif |
---|
| 776 | |
---|
| 777 | if (_param->_have_port_context_id) |
---|
| 778 | COMPONENT_MAP(_component,src ,"out_DECOD_"+toString(j)+ "_CONTEXT_ID" , |
---|
| 779 | dest, "in_DECOD_"+toString(i)+"_"+toString(j)+"_DECOD_UNIT_CONTEXT_ID" ); |
---|
| 780 | |
---|
| 781 | x++; |
---|
| 782 | } |
---|
| 783 | |
---|
| 784 | // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 785 | for (uint32_t j=0; j<_param->_nb_inst_decod[i]; ++j) |
---|
| 786 | { |
---|
| 787 | dest = _name+"_prediction_unit"; |
---|
| 788 | #ifdef POSITION |
---|
| 789 | _component->interface_map (src ,"predict_"+toString(j), |
---|
| 790 | dest,"decod_"+toString(i)+"_"+toString(j)); |
---|
| 791 | #endif |
---|
| 792 | |
---|
| 793 | COMPONENT_MAP(_component,src ,"out_PREDICT_"+toString(j)+ "_VAL" , |
---|
| 794 | dest, "in_DECOD_" +toString(i)+"_"+toString(j)+"_VAL" ); |
---|
| 795 | COMPONENT_MAP(_component,src , "in_PREDICT_"+toString(j)+ "_ACK" , |
---|
| 796 | dest,"out_DECOD_" +toString(i)+"_"+toString(j)+"_ACK" ); |
---|
| 797 | if (_param->_have_port_context_id) |
---|
| 798 | COMPONENT_MAP(_component,src ,"out_PREDICT_"+toString(j)+ "_CONTEXT_ID" , |
---|
| 799 | dest, "in_DECOD_" +toString(i)+"_"+toString(j)+"_CONTEXT_ID" ); |
---|
| 800 | COMPONENT_MAP(_component,src ,"out_PREDICT_"+toString(j)+ "_MATCH_INST_IFETCH_PTR" , |
---|
| 801 | dest, "in_DECOD_" +toString(i)+"_"+toString(j)+"_MATCH_INST_IFETCH_PTR" ); |
---|
| 802 | COMPONENT_MAP(_component,src ,"out_PREDICT_"+toString(j)+ "_BRANCH_STATE" , |
---|
| 803 | dest, "in_DECOD_" +toString(i)+"_"+toString(j)+"_BRANCH_STATE" ); |
---|
| 804 | if (_param->_have_port_depth) |
---|
| 805 | COMPONENT_MAP(_component,src ,"out_PREDICT_"+toString(j)+ "_BRANCH_UPDATE_PREDICTION_ID", |
---|
| 806 | dest, "in_DECOD_" +toString(i)+"_"+toString(j)+"_BRANCH_UPDATE_PREDICTION_ID"); |
---|
| 807 | COMPONENT_MAP(_component,src ,"out_PREDICT_"+toString(j)+ "_BRANCH_CONDITION" , |
---|
| 808 | dest, "in_DECOD_" +toString(i)+"_"+toString(j)+"_BRANCH_CONDITION" ); |
---|
| 809 | COMPONENT_MAP(_component,src ,"out_PREDICT_"+toString(j)+ "_BRANCH_DIRECTION" , |
---|
| 810 | dest, "in_DECOD_" +toString(i)+"_"+toString(j)+"_BRANCH_DIRECTION" ); |
---|
| 811 | // COMPONENT_MAP(_component,src ,"out_PREDICT_"+toString(j)+ "_BRANCH_STACK_WRITE" , |
---|
| 812 | // dest, "in_DECOD_" +toString(i)+"_"+toString(j)+"_BRANCH_STACK_WRITE" ); |
---|
| 813 | COMPONENT_MAP(_component,src ,"out_PREDICT_"+toString(j)+ "_ADDRESS_SRC" , |
---|
| 814 | dest, "in_DECOD_" +toString(i)+"_"+toString(j)+"_ADDRESS_SRC" ); |
---|
| 815 | COMPONENT_MAP(_component,src ,"out_PREDICT_"+toString(j)+ "_ADDRESS_DEST" , |
---|
| 816 | dest, "in_DECOD_" +toString(i)+"_"+toString(j)+"_ADDRESS_DEST" ); |
---|
[110] | 817 | COMPONENT_MAP(_component,src , "in_PREDICT_"+toString(j)+ "_CAN_CONTINUE" , |
---|
| 818 | dest,"out_DECOD_" +toString(i)+"_"+toString(j)+"_CAN_CONTINUE" ); |
---|
[88] | 819 | |
---|
| 820 | } |
---|
| 821 | |
---|
| 822 | // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 823 | for (uint32_t j=0; j<_param->_decod_unit_nb_context[i]; ++j) |
---|
| 824 | { |
---|
| 825 | // uint32_t y=(_param->_translate_context_id_from_decod_unit[i])[j]; |
---|
| 826 | |
---|
| 827 | dest = _name+"_glue"; |
---|
| 828 | #ifdef POSITION |
---|
| 829 | _component->interface_map (src ,"depth_"+toString(j), |
---|
| 830 | dest,"depth_"+toString(j)); |
---|
| 831 | #endif |
---|
| 832 | |
---|
| 833 | if (_param->_have_port_depth) |
---|
[101] | 834 | { |
---|
[88] | 835 | COMPONENT_MAP(_component,src , "in_DEPTH_"+toString(j)+ "_MIN", |
---|
| 836 | dest,"out_DEPTH_"+toString(i)+"_"+toString(j)+"_DECOD_UNIT_MIN"); |
---|
| 837 | COMPONENT_MAP(_component,src , "in_DEPTH_"+toString(j)+ "_MAX", |
---|
| 838 | dest,"out_DEPTH_"+toString(i)+"_"+toString(j)+"_DECOD_UNIT_MAX"); |
---|
[101] | 839 | } |
---|
| 840 | COMPONENT_MAP(_component,src , "in_DEPTH_"+toString(j)+ "_FULL", |
---|
| 841 | dest,"out_DEPTH_"+toString(i)+"_"+toString(j)+"_DECOD_UNIT_FULL"); |
---|
| 842 | |
---|
[88] | 843 | } |
---|
| 844 | |
---|
| 845 | // ~~~~~[ Interface : "nb_inst" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 846 | for (uint32_t j=0; j<_param->_decod_unit_nb_context[i]; ++j) |
---|
| 847 | { |
---|
| 848 | uint32_t y=(_param->_translate_context_id_from_decod_unit[i])[j]; |
---|
| 849 | |
---|
[108] | 850 | dest = _name+"_glue"; |
---|
[88] | 851 | #ifdef POSITION |
---|
| 852 | _component->interface_map (src ,"nb_inst_"+toString(j), |
---|
| 853 | dest,"nb_inst_"+toString(y)); |
---|
| 854 | #endif |
---|
| 855 | |
---|
[108] | 856 | COMPONENT_MAP(_component,src ,"out_NB_INST_"+toString(j)+ "_DECOD_ALL", |
---|
| 857 | dest, "in_NB_INST_"+toString(y)+"_DECOD_UNIT_DECOD_ALL"); |
---|
[88] | 858 | } |
---|
| 859 | |
---|
| 860 | // ~~~~~[ Interface : "context" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 861 | for (uint32_t j=0; j<_param->_decod_unit_nb_context[i]; ++j) |
---|
| 862 | { |
---|
| 863 | uint32_t y=(_param->_translate_context_id_from_decod_unit[i])[j]; |
---|
| 864 | |
---|
| 865 | dest = _name+"_context_state"; |
---|
| 866 | #ifdef POSITION |
---|
| 867 | _component->interface_map (src ,"context_"+toString(j), |
---|
| 868 | dest,"context_"+toString(y)); |
---|
| 869 | #endif |
---|
| 870 | |
---|
| 871 | COMPONENT_MAP(_component,src , "in_CONTEXT_"+toString(j)+"_DECOD_ENABLE", |
---|
| 872 | dest,"out_CONTEXT_"+toString(y)+"_DECOD_ENABLE"); |
---|
[123] | 873 | COMPONENT_MAP(_component,src , "in_CONTEXT_"+toString(j)+"_EVENT", |
---|
| 874 | dest,"out_CONTEXT_"+toString(y)+"_EVENT"); |
---|
[88] | 875 | |
---|
| 876 | dest = _name+"_glue"; |
---|
| 877 | #ifdef POSITION |
---|
| 878 | _component->interface_map (src ,"context_"+toString(j), |
---|
| 879 | dest,"context_"+toString(i)+"_"+toString(j)); |
---|
| 880 | #endif |
---|
| 881 | |
---|
[101] | 882 | COMPONENT_MAP(_component,src , "in_CONTEXT_"+toString(j)+ "_DEPTH_VAL", |
---|
| 883 | dest,"out_CONTEXT_"+toString(i)+"_"+toString(j)+"_DECOD_UNIT_DEPTH_VAL"); |
---|
[88] | 884 | if (_param->_have_port_depth) |
---|
| 885 | COMPONENT_MAP(_component,src , "in_CONTEXT_"+toString(j)+ "_DEPTH", |
---|
| 886 | dest,"out_CONTEXT_"+toString(i)+"_"+toString(j)+"_DECOD_UNIT_DEPTH"); |
---|
| 887 | } |
---|
| 888 | |
---|
| 889 | |
---|
| 890 | // ~~~~~[ Interface : "context_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 891 | { |
---|
| 892 | dest = _name+"_context_state"; |
---|
| 893 | #ifdef POSITION |
---|
| 894 | _component->interface_map (src ,"context_event", |
---|
| 895 | dest,"decod_event_"+toString(i)); |
---|
| 896 | #endif |
---|
| 897 | |
---|
| 898 | COMPONENT_MAP(_component,src ,"out_CONTEXT_EVENT_VAL" ,dest, "in_DECOD_EVENT_"+toString(i)+"_VAL" ); |
---|
| 899 | COMPONENT_MAP(_component,src , "in_CONTEXT_EVENT_ACK" ,dest,"out_DECOD_EVENT_"+toString(i)+"_ACK" ); |
---|
| 900 | if (_param->_have_port_context_id) |
---|
| 901 | COMPONENT_MAP(_component,src ,"out_CONTEXT_EVENT_CONTEXT_ID" ,dest, "in_DECOD_EVENT_"+toString(i)+"_CONTEXT_ID" ); |
---|
| 902 | if (_param->_have_port_depth) |
---|
| 903 | COMPONENT_MAP(_component,src ,"out_CONTEXT_EVENT_DEPTH" ,dest, "in_DECOD_EVENT_"+toString(i)+"_DEPTH" ); |
---|
| 904 | COMPONENT_MAP(_component,src ,"out_CONTEXT_EVENT_TYPE" ,dest, "in_DECOD_EVENT_"+toString(i)+"_TYPE" ); |
---|
| 905 | COMPONENT_MAP(_component,src ,"out_CONTEXT_EVENT_IS_DELAY_SLOT",dest, "in_DECOD_EVENT_"+toString(i)+"_IS_DELAY_SLOT"); |
---|
| 906 | COMPONENT_MAP(_component,src ,"out_CONTEXT_EVENT_ADDRESS" ,dest, "in_DECOD_EVENT_"+toString(i)+"_ADDRESS" ); |
---|
| 907 | COMPONENT_MAP(_component,src ,"out_CONTEXT_EVENT_ADDRESS_EPCR" ,dest, "in_DECOD_EVENT_"+toString(i)+"_ADDRESS_EPCR" ); |
---|
| 908 | } |
---|
| 909 | } |
---|
| 910 | } |
---|
| 911 | |
---|
| 912 | // =================================================================== |
---|
| 913 | // =====[ context_state ]============================================= |
---|
| 914 | // =================================================================== |
---|
| 915 | { |
---|
| 916 | src = _name+"_context_state"; |
---|
| 917 | log_printf(TRACE,Front_end,FUNCTION,_("Instance : %s"),src.c_str()); |
---|
| 918 | |
---|
| 919 | { |
---|
| 920 | dest = _name; |
---|
| 921 | #ifdef POSITION |
---|
| 922 | _component->interface_map (src ,"", |
---|
| 923 | dest,""); |
---|
| 924 | #endif |
---|
| 925 | PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
| 926 | PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); |
---|
| 927 | } |
---|
| 928 | |
---|
| 929 | // ~~~~~[ Interface : "decod_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 930 | // in_DECOD_EVENT_VAL - component_decod_unit |
---|
| 931 | // out_DECOD_EVENT_ACK - component_decod_unit |
---|
| 932 | // in_DECOD_EVENT_CONTEXT_ID - component_decod_unit |
---|
| 933 | // in_DECOD_EVENT_DEPTH - component_decod_unit |
---|
| 934 | // in_DECOD_EVENT_TYPE - component_decod_unit |
---|
| 935 | // in_DECOD_EVENT_IS_DELAY_SLOT - component_decod_unit |
---|
| 936 | // in_DECOD_EVENT_ADDRESS - component_decod_unit |
---|
| 937 | // in_DECOD_EVENT_ADDRESS_EPCR - component_decod_unit |
---|
| 938 | |
---|
| 939 | // ~~~~~[ Interface : "commit_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 940 | { |
---|
| 941 | dest = _name; |
---|
| 942 | #ifdef POSITION |
---|
| 943 | _component->interface_map (src ,"commit_event", |
---|
| 944 | dest,"commit_event"); |
---|
| 945 | #endif |
---|
| 946 | |
---|
| 947 | PORT_MAP(_component,src , "in_COMMIT_EVENT_VAL" , |
---|
| 948 | dest, "in_COMMIT_EVENT_VAL" ); |
---|
| 949 | PORT_MAP(_component,src ,"out_COMMIT_EVENT_ACK" , |
---|
| 950 | dest,"out_COMMIT_EVENT_ACK" ); |
---|
| 951 | if (_param->_have_port_context_id) |
---|
| 952 | PORT_MAP(_component,src , "in_COMMIT_EVENT_CONTEXT_ID" , |
---|
| 953 | dest, "in_COMMIT_EVENT_CONTEXT_ID" ); |
---|
| 954 | if (_param->_have_port_depth) |
---|
| 955 | PORT_MAP(_component,src , "in_COMMIT_EVENT_DEPTH" , |
---|
| 956 | dest, "in_COMMIT_EVENT_DEPTH" ); |
---|
| 957 | PORT_MAP(_component,src , "in_COMMIT_EVENT_TYPE" , |
---|
| 958 | dest, "in_COMMIT_EVENT_TYPE" ); |
---|
| 959 | PORT_MAP(_component,src , "in_COMMIT_EVENT_IS_DELAY_SLOT" , |
---|
| 960 | dest, "in_COMMIT_EVENT_IS_DELAY_SLOT" ); |
---|
| 961 | PORT_MAP(_component,src , "in_COMMIT_EVENT_ADDRESS" , |
---|
| 962 | dest, "in_COMMIT_EVENT_ADDRESS" ); |
---|
[105] | 963 | PORT_MAP(_component,src , "in_COMMIT_EVENT_ADDRESS_EPCR_VAL", |
---|
| 964 | dest, "in_COMMIT_EVENT_ADDRESS_EPCR_VAL"); |
---|
[88] | 965 | PORT_MAP(_component,src , "in_COMMIT_EVENT_ADDRESS_EPCR" , |
---|
| 966 | dest, "in_COMMIT_EVENT_ADDRESS_EPCR" ); |
---|
| 967 | PORT_MAP(_component,src , "in_COMMIT_EVENT_ADDRESS_EEAR_VAL", |
---|
| 968 | dest, "in_COMMIT_EVENT_ADDRESS_EEAR_VAL"); |
---|
| 969 | PORT_MAP(_component,src , "in_COMMIT_EVENT_ADDRESS_EEAR" , |
---|
| 970 | dest, "in_COMMIT_EVENT_ADDRESS_EEAR" ); |
---|
| 971 | } |
---|
| 972 | |
---|
| 973 | // ~~~~~[ Interface : "branch_complete" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 974 | for (uint32_t i=0; i<_param->_nb_inst_branch_complete; ++i) |
---|
| 975 | { |
---|
| 976 | dest = _name+"_glue"; |
---|
| 977 | #ifdef POSITION |
---|
| 978 | _component->interface_map (src ,"branch_complete_"+toString(i), |
---|
| 979 | dest,"branch_complete_"+toString(i)); |
---|
| 980 | #endif |
---|
| 981 | |
---|
| 982 | COMPONENT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+ "_VAL" , |
---|
| 983 | dest,"out_BRANCH_COMPLETE_"+toString(i)+"_CONTEXT_STATE_VAL" ); |
---|
| 984 | COMPONENT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+ "_ACK" , |
---|
| 985 | dest, "in_BRANCH_COMPLETE_"+toString(i)+"_CONTEXT_STATE_ACK" ); |
---|
| 986 | COMPONENT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+ "_MISS_PREDICTION", |
---|
| 987 | dest,"out_BRANCH_COMPLETE_"+toString(i)+"_CONTEXT_STATE_MISS_PREDICTION"); |
---|
| 988 | |
---|
| 989 | dest = _name; |
---|
| 990 | #ifdef POSITION |
---|
| 991 | _component->interface_map (src ,"branch_complete_"+toString(i), |
---|
| 992 | dest,"branch_complete_"+toString(i)); |
---|
| 993 | #endif |
---|
| 994 | |
---|
| 995 | if (_param->_have_port_context_id) |
---|
| 996 | PORT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+"_CONTEXT_ID", |
---|
| 997 | dest, "in_BRANCH_COMPLETE_"+toString(i)+"_CONTEXT_ID"); |
---|
| 998 | if (_param->_have_port_depth) |
---|
| 999 | PORT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+"_DEPTH" , |
---|
| 1000 | dest, "in_BRANCH_COMPLETE_"+toString(i)+"_DEPTH" ); |
---|
| 1001 | |
---|
| 1002 | // in_BRANCH_COMPLETE_TAKE - component_prediction_unit |
---|
| 1003 | // in_BRANCH_COMPLETE_ADDRESS_SRC - component_prediction_unit |
---|
| 1004 | // in_BRANCH_COMPLETE_ADDRESS_DEST - component_prediction_unit |
---|
| 1005 | } |
---|
| 1006 | |
---|
| 1007 | // ~~~~~[ Interface : "nb_inst" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 1008 | for (uint32_t i=0; i<_param->_nb_context; ++i) |
---|
| 1009 | { |
---|
| 1010 | dest = _name; |
---|
| 1011 | #ifdef POSITION |
---|
[108] | 1012 | _component->interface_map (src ,"nb_inst_"+toString(i), |
---|
| 1013 | dest,"nb_inst_"+toString(i)); |
---|
[88] | 1014 | #endif |
---|
| 1015 | |
---|
| 1016 | PORT_MAP(_component,src , "in_NB_INST_"+toString(i)+"_COMMIT_ALL", |
---|
| 1017 | dest, "in_NB_INST_"+toString(i)+"_COMMIT_ALL"); |
---|
| 1018 | PORT_MAP(_component,src , "in_NB_INST_"+toString(i)+"_COMMIT_MEM", |
---|
| 1019 | dest, "in_NB_INST_"+toString(i)+"_COMMIT_MEM"); |
---|
[108] | 1020 | |
---|
| 1021 | dest = _name+"_glue"; |
---|
| 1022 | #ifdef POSITION |
---|
| 1023 | _component->interface_map (src ,"nb_inst_"+toString(i), |
---|
| 1024 | dest,"nb_inst_"+toString(i)); |
---|
| 1025 | #endif |
---|
| 1026 | |
---|
| 1027 | COMPONENT_MAP(_component,src , "in_NB_INST_"+toString(i)+ "_DECOD_ALL", |
---|
| 1028 | dest,"out_NB_INST_"+toString(i)+"_CONTEXT_STATE_DECOD_ALL"); |
---|
[88] | 1029 | } |
---|
| 1030 | |
---|
| 1031 | // ~~~~~[ Interface "event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 1032 | for (uint32_t i=0; i<_param->_nb_context; ++i) |
---|
| 1033 | { |
---|
| 1034 | dest = _name+"_glue"; |
---|
| 1035 | #ifdef POSITION |
---|
| 1036 | _component->interface_map (src ,"event_"+toString(i), |
---|
| 1037 | dest,"event_"+toString(i)); |
---|
| 1038 | #endif |
---|
| 1039 | |
---|
| 1040 | COMPONENT_MAP(_component,src ,"out_EVENT_"+toString(i)+ "_VAL" , |
---|
| 1041 | dest, "in_EVENT_"+toString(i)+"_CONTEXT_STATE_VAL" ); |
---|
| 1042 | COMPONENT_MAP(_component,src , "in_EVENT_"+toString(i)+ "_ACK" , |
---|
| 1043 | dest,"out_EVENT_"+toString(i)+"_CONTEXT_STATE_ACK" ); |
---|
| 1044 | COMPONENT_MAP(_component,src ,"out_EVENT_"+toString(i)+ "_ADDRESS", |
---|
| 1045 | dest, "in_EVENT_"+toString(i)+"_CONTEXT_STATE_ADDRESS"); |
---|
| 1046 | COMPONENT_MAP(_component,src ,"out_EVENT_"+toString(i)+ "_ADDRESS_NEXT" , |
---|
| 1047 | dest, "in_EVENT_"+toString(i)+"_CONTEXT_STATE_ADDRESS_NEXT" ); |
---|
| 1048 | COMPONENT_MAP(_component,src ,"out_EVENT_"+toString(i)+ "_ADDRESS_NEXT_VAL", |
---|
| 1049 | dest, "in_EVENT_"+toString(i)+"_CONTEXT_STATE_ADDRESS_NEXT_VAL"); |
---|
| 1050 | COMPONENT_MAP(_component,src ,"out_EVENT_"+toString(i)+ "_IS_DS_TAKE" , |
---|
| 1051 | dest, "in_EVENT_"+toString(i)+"_CONTEXT_STATE_IS_DS_TAKE" ); |
---|
[97] | 1052 | COMPONENT_MAP(_component,src ,"out_EVENT_"+toString(i)+ "_TYPE" , |
---|
| 1053 | dest, "in_EVENT_"+toString(i)+"_CONTEXT_STATE_TYPE" ); |
---|
| 1054 | if (_param->_have_port_depth) |
---|
| 1055 | COMPONENT_MAP(_component,src ,"out_EVENT_"+toString(i)+ "_DEPTH" , |
---|
| 1056 | dest, "in_EVENT_"+toString(i)+"_CONTEXT_STATE_DEPTH" ); |
---|
[119] | 1057 | COMPONENT_MAP(_component,src ,"out_EVENT_"+toString(i)+ "_FLUSH_ONLY" , |
---|
| 1058 | dest, "in_EVENT_"+toString(i)+"_CONTEXT_STATE_FLUSH_ONLY" ); |
---|
[88] | 1059 | } |
---|
| 1060 | |
---|
| 1061 | // ~~~~~[ Interface "spr" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 1062 | for (uint32_t i=0; i<_param->_nb_context; ++i) |
---|
| 1063 | { |
---|
| 1064 | dest = _name; |
---|
| 1065 | #ifdef POSITION |
---|
| 1066 | _component->interface_map (src ,"spr_event_"+toString(i), |
---|
| 1067 | dest,"spr_event_"+toString(i)); |
---|
| 1068 | #endif |
---|
| 1069 | |
---|
| 1070 | PORT_MAP(_component,src ,"out_SPR_EVENT_"+toString(i)+"_VAL" , |
---|
| 1071 | dest,"out_SPR_EVENT_"+toString(i)+"_VAL" ); |
---|
| 1072 | PORT_MAP(_component,src , "in_SPR_EVENT_"+toString(i)+"_ACK" , |
---|
| 1073 | dest, "in_SPR_EVENT_"+toString(i)+"_ACK" ); |
---|
| 1074 | PORT_MAP(_component,src ,"out_SPR_EVENT_"+toString(i)+"_EPCR" , |
---|
| 1075 | dest,"out_SPR_EVENT_"+toString(i)+"_EPCR" ); |
---|
| 1076 | PORT_MAP(_component,src ,"out_SPR_EVENT_"+toString(i)+"_EEAR" , |
---|
| 1077 | dest,"out_SPR_EVENT_"+toString(i)+"_EEAR" ); |
---|
| 1078 | PORT_MAP(_component,src ,"out_SPR_EVENT_"+toString(i)+"_EEAR_WEN" , |
---|
| 1079 | dest,"out_SPR_EVENT_"+toString(i)+"_EEAR_WEN" ); |
---|
| 1080 | PORT_MAP(_component,src ,"out_SPR_EVENT_"+toString(i)+"_SR_DSX" , |
---|
| 1081 | dest,"out_SPR_EVENT_"+toString(i)+"_SR_DSX" ); |
---|
| 1082 | PORT_MAP(_component,src ,"out_SPR_EVENT_"+toString(i)+"_SR_TO_ESR", |
---|
| 1083 | dest,"out_SPR_EVENT_"+toString(i)+"_SR_TO_ESR"); |
---|
| 1084 | } |
---|
| 1085 | |
---|
| 1086 | // ~~~~~[ Interface : "context" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 1087 | // out_CONTEXT_DECOD_ENABLE - component_decod_unit |
---|
| 1088 | |
---|
| 1089 | // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 1090 | for (uint32_t i=0; i<_param->_nb_context; ++i) |
---|
| 1091 | { |
---|
| 1092 | dest = _name+"_glue"; |
---|
| 1093 | #ifdef POSITION |
---|
| 1094 | _component->interface_map (src ,"depth_"+toString(i), |
---|
| 1095 | dest,"depth_"+toString(i)); |
---|
| 1096 | #endif |
---|
| 1097 | |
---|
| 1098 | if (_param->_have_port_depth) |
---|
| 1099 | COMPONENT_MAP(_component,src , "in_DEPTH_"+toString(i)+ "_MIN", |
---|
| 1100 | dest,"out_DEPTH_"+toString(i)+"_CONTEXT_STATE_MIN"); |
---|
| 1101 | } |
---|
| 1102 | |
---|
| 1103 | // ~~~~~[ Interface : "spr" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 1104 | for (uint32_t i=0; i<_param->_nb_context; ++i) |
---|
| 1105 | { |
---|
| 1106 | dest = _name; |
---|
| 1107 | #ifdef POSITION |
---|
| 1108 | _component->interface_map (src ,"spr_"+toString(i), |
---|
| 1109 | dest,"spr_"+toString(i)); |
---|
| 1110 | #endif |
---|
| 1111 | |
---|
| 1112 | PORT_MAP(_component,src , "in_SPR_"+toString(i)+"_SR_IEE", |
---|
| 1113 | dest, "in_SPR_"+toString(i)+"_SR_IEE"); |
---|
| 1114 | PORT_MAP(_component,src , "in_SPR_"+toString(i)+"_SR_EPH", |
---|
| 1115 | dest, "in_SPR_"+toString(i)+"_SR_EPH"); |
---|
| 1116 | } |
---|
| 1117 | |
---|
| 1118 | // ~~~~~[ Interface : "interrupt" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 1119 | for (uint32_t i=0; i<_param->_nb_context; ++i) |
---|
| 1120 | { |
---|
| 1121 | dest = _name; |
---|
| 1122 | #ifdef POSITION |
---|
| 1123 | _component->interface_map (src ,"interrupt_"+toString(i), |
---|
| 1124 | dest,"interrupt_"+toString(i)); |
---|
| 1125 | #endif |
---|
| 1126 | |
---|
| 1127 | PORT_MAP(_component,src , "in_INTERRUPT_"+toString(i)+"_ENABLE", |
---|
| 1128 | dest, "in_INTERRUPT_"+toString(i)+"_ENABLE"); |
---|
| 1129 | } |
---|
| 1130 | |
---|
| 1131 | } |
---|
| 1132 | |
---|
| 1133 | // =================================================================== |
---|
| 1134 | // =====[ glue ]====================================================== |
---|
| 1135 | // =================================================================== |
---|
| 1136 | { |
---|
| 1137 | src = _name+"_glue"; |
---|
| 1138 | log_printf(TRACE,Front_end,FUNCTION,_("Instance : %s"),src.c_str()); |
---|
| 1139 | |
---|
| 1140 | { |
---|
| 1141 | dest = _name; |
---|
| 1142 | #ifdef POSITION |
---|
| 1143 | _component->interface_map (src ,"", |
---|
| 1144 | dest,""); |
---|
| 1145 | #endif |
---|
| 1146 | PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
| 1147 | PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); |
---|
| 1148 | } |
---|
| 1149 | |
---|
| 1150 | // ~~~~~[ Interface : "ifetch" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 1151 | // out_IFETCH_DECOD_UNIT_CONTEXT_ID - component_decod_unit |
---|
| 1152 | |
---|
| 1153 | // ~~~~~[ Interface : "decod" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 1154 | uint32_t x=0; |
---|
| 1155 | for (uint32_t i=0; i<_param->_nb_decod_unit; ++i) |
---|
| 1156 | for (uint32_t j=0; j<_param->_nb_inst_decod[i];++j) |
---|
| 1157 | { |
---|
| 1158 | dest = _name; |
---|
| 1159 | #ifdef POSITION |
---|
| 1160 | _component->interface_map (src ,"decod_"+toString(i)+"_"+toString(j), |
---|
| 1161 | dest,"decod_"+toString(x)); |
---|
| 1162 | #endif |
---|
| 1163 | |
---|
| 1164 | if (_param->_have_port_context_id) |
---|
| 1165 | PORT_MAP(_component,src ,"out_DECOD_"+toString(i)+"_"+toString(j)+"_CONTEXT_ID", |
---|
| 1166 | dest,"out_DECOD_"+toString(x)+ "_CONTEXT_ID"); |
---|
| 1167 | x++; |
---|
| 1168 | } |
---|
| 1169 | // in_DECOD_DECOD_UNIT_CONTEXT_ID - component_decod_unit |
---|
| 1170 | |
---|
| 1171 | // ~~~~~[ Interface : "branch_complete" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 1172 | for (uint32_t i=0; i<_param->_nb_inst_branch_complete; ++i) |
---|
| 1173 | { |
---|
| 1174 | dest = _name; |
---|
| 1175 | #ifdef POSITION |
---|
| 1176 | _component->interface_map (src ,"branch_complete_"+toString(i), |
---|
| 1177 | dest,"branch_complete_"+toString(i)); |
---|
| 1178 | #endif |
---|
| 1179 | |
---|
| 1180 | PORT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+"_VAL" , |
---|
| 1181 | dest, "in_BRANCH_COMPLETE_"+toString(i)+"_VAL" ); |
---|
| 1182 | PORT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_ACK" , |
---|
| 1183 | dest,"out_BRANCH_COMPLETE_"+toString(i)+"_ACK" ); |
---|
| 1184 | PORT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_MISS_PREDICTION", |
---|
| 1185 | dest,"out_BRANCH_COMPLETE_"+toString(i)+"_MISS_PREDICTION"); |
---|
| 1186 | } |
---|
| 1187 | |
---|
| 1188 | // out_BRANCH_COMPLETE_PREDICTION_UNIT_VAL - component_prediction_unit |
---|
| 1189 | // in_BRANCH_COMPLETE_PREDICTION_UNIT_ACK - component_prediction_unit |
---|
| 1190 | // in_BRANCH_COMPLETE_PREDICTION_UNIT_MISS_PREDICTION - component_prediction_unit |
---|
| 1191 | // out_BRANCH_COMPLETE_CONTEXT_STATE_VAL - component_context_state |
---|
| 1192 | // in_BRANCH_COMPLETE_CONTEXT_STATE_ACK - component_context_state |
---|
| 1193 | // out_BRANCH_COMPLETE_CONTEXT_STATE_MISS_PREDICTION - component_context_state |
---|
| 1194 | |
---|
| 1195 | // ~~~~~[ Interface "event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 1196 | for (uint32_t i=0; i<_param->_nb_context; ++i) |
---|
| 1197 | { |
---|
| 1198 | dest = _name; |
---|
| 1199 | #ifdef POSITION |
---|
| 1200 | _component->interface_map (src ,"event_"+toString(i), |
---|
| 1201 | dest,"event_"+toString(i)); |
---|
| 1202 | #endif |
---|
| 1203 | |
---|
| 1204 | PORT_MAP(_component,src ,"out_EVENT_"+toString(i)+"_VAL" , |
---|
| 1205 | dest,"out_EVENT_"+toString(i)+"_VAL" ); |
---|
| 1206 | PORT_MAP(_component,src , "in_EVENT_"+toString(i)+"_ACK" , |
---|
| 1207 | dest, "in_EVENT_"+toString(i)+"_ACK" ); |
---|
| 1208 | PORT_MAP(_component,src ,"out_EVENT_"+toString(i)+"_ADDRESS" , |
---|
| 1209 | dest,"out_EVENT_"+toString(i)+"_ADDRESS" ); |
---|
| 1210 | PORT_MAP(_component,src ,"out_EVENT_"+toString(i)+"_ADDRESS_NEXT" , |
---|
| 1211 | dest,"out_EVENT_"+toString(i)+"_ADDRESS_NEXT" ); |
---|
| 1212 | PORT_MAP(_component,src ,"out_EVENT_"+toString(i)+"_ADDRESS_NEXT_VAL", |
---|
| 1213 | dest,"out_EVENT_"+toString(i)+"_ADDRESS_NEXT_VAL"); |
---|
| 1214 | PORT_MAP(_component,src ,"out_EVENT_"+toString(i)+"_IS_DS_TAKE" , |
---|
| 1215 | dest,"out_EVENT_"+toString(i)+"_IS_DS_TAKE" ); |
---|
| 1216 | } |
---|
| 1217 | |
---|
| 1218 | // out_EVENT_IFETCH_UNIT_VAL - component_ifetch_unit |
---|
| 1219 | // in_EVENT_IFETCH_UNIT_ACK - component_ifetch_unit |
---|
| 1220 | // out_EVENT_IFETCH_UNIT_ADDRESS - component_ifetch_unit |
---|
[97] | 1221 | // out_EVENT_IFETCH_UNIT_ADDRESS_NEXT - component_ifetch_unit |
---|
[88] | 1222 | // out_EVENT_IFETCH_UNIT_ADDRESS_NEXT_VAL - component_ifetch_unit |
---|
| 1223 | // in_EVENT_IFETCH_UNIT_IS_DS_TAKE - component_ifetch_unit |
---|
[97] | 1224 | // out_EVENT_PREDICTION_UNIT_VAL - component_prediction_unit |
---|
| 1225 | // in_EVENT_PREDICTION_UNIT_ACK - component_prediction_unit |
---|
| 1226 | // out_EVENT_PREDICTION_UNIT_TYPE - component_prediction_unit |
---|
| 1227 | // out_EVENT_PREDICTION_UNIT_DEPTH - component_prediction_unit |
---|
[88] | 1228 | // in_EVENT_CONTEXT_STATE_VAL - component_context_state |
---|
| 1229 | // out_EVENT_CONTEXT_STATE_ACK - component_context_state |
---|
| 1230 | // in_EVENT_CONTEXT_STATE_ADDRESS - component_context_state |
---|
| 1231 | // in_EVENT_CONTEXT_STATE_ADDRESS_NEXT - component_context_state |
---|
[97] | 1232 | // in_EVENT_CONTEXT_STATE_ADDRESS_NEXT_VAL - component_context_state |
---|
[88] | 1233 | // in_EVENT_CONTEXT_STATE_IS_DS_TAKE - component_context_state |
---|
[97] | 1234 | // in_EVENT_CONTEXT_STATE_TYPE - component_context_state |
---|
| 1235 | // in_EVENT_CONTEXT_STATE_DEPTH - component_context_state |
---|
[88] | 1236 | |
---|
| 1237 | // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 1238 | for (uint32_t i=0; i<_param->_nb_context; ++i) |
---|
| 1239 | { |
---|
| 1240 | dest = _name; |
---|
| 1241 | #ifdef POSITION |
---|
| 1242 | _component->interface_map (src ,"depth_"+toString(i), |
---|
| 1243 | dest,"depth_"+toString(i)); |
---|
| 1244 | #endif |
---|
| 1245 | |
---|
| 1246 | if (_param->_have_port_depth) |
---|
[101] | 1247 | { |
---|
[88] | 1248 | PORT_MAP(_component,src ,"out_DEPTH_"+toString(i)+"_MIN", |
---|
| 1249 | dest,"out_DEPTH_"+toString(i)+"_MIN"); |
---|
| 1250 | PORT_MAP(_component,src ,"out_DEPTH_"+toString(i)+"_MAX", |
---|
| 1251 | dest,"out_DEPTH_"+toString(i)+"_MAX"); |
---|
[101] | 1252 | } |
---|
| 1253 | PORT_MAP(_component,src ,"out_DEPTH_"+toString(i)+"_FULL", |
---|
| 1254 | dest,"out_DEPTH_"+toString(i)+"_FULL"); |
---|
[88] | 1255 | } |
---|
| 1256 | |
---|
[101] | 1257 | // in_DEPTH_PREDICTION_UNIT_VAL - component_prediction_unit |
---|
[88] | 1258 | // in_DEPTH_PREDICTION_UNIT_CURRENT - component_prediction_unit |
---|
| 1259 | // in_DEPTH_PREDICTION_UNIT_MIN - component_prediction_unit |
---|
| 1260 | // in_DEPTH_PREDICTION_UNIT_MAX - component_prediction_unit |
---|
[101] | 1261 | // in_DEPTH_PREDICTION_UNIT_FULL - component_prediction_unit |
---|
[88] | 1262 | // out_DEPTH_DECOD_UNIT_MIN - component_decod_unit |
---|
| 1263 | // out_DEPTH_DECOD_UNIT_MAX - component_decod_unit |
---|
[101] | 1264 | // out_DEPTH_DECOD_UNIT_FULL - component_decod_unit |
---|
[88] | 1265 | // out_DEPTH_CONTEXT_STATE_MIN - component_context_state |
---|
| 1266 | |
---|
| 1267 | // ~~~~~[ Interface : "context"" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
[101] | 1268 | // out_CONTEXT_DECOD_UNIT_DEPTH_VAL - component_decod_unit |
---|
[88] | 1269 | // out_CONTEXT_DECOD_UNIT_DEPTH - component_decod_unit |
---|
[108] | 1270 | |
---|
| 1271 | // ~~~~~[ Interface : "nb_inst" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 1272 | for (uint32_t i=0; i<_param->_nb_context; ++i) |
---|
| 1273 | { |
---|
| 1274 | dest = _name; |
---|
| 1275 | #ifdef POSITION |
---|
| 1276 | _component->interface_map (src ,"nb_inst_"+toString(i), |
---|
| 1277 | dest,"nb_inst_"+toString(i)); |
---|
| 1278 | #endif |
---|
| 1279 | |
---|
| 1280 | PORT_MAP(_component,src ,"out_NB_INST_"+toString(i)+"_DECOD_ALL", |
---|
| 1281 | dest,"out_NB_INST_"+toString(i)+"_DECOD_ALL"); |
---|
| 1282 | |
---|
| 1283 | // in_NB_INST_DECOD_UNIT_DECOD_ALL - component_decod_unit |
---|
| 1284 | // out_NB_INST_CONTEXT_STATE_DECOD_ALL - component_context_state |
---|
| 1285 | } |
---|
[88] | 1286 | } |
---|
| 1287 | |
---|
| 1288 | // ~~~~~[ Others ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 1289 | #if DEBUG_Front_end == true |
---|
| 1290 | _component->test_map(false); |
---|
| 1291 | #endif |
---|
| 1292 | |
---|
| 1293 | #ifdef POSITION |
---|
| 1294 | if (usage_is_set(_usage,USE_POSITION)) |
---|
| 1295 | _component->generate_file(); |
---|
| 1296 | #endif |
---|
| 1297 | |
---|
| 1298 | log_end(Front_end,FUNCTION); |
---|
| 1299 | }; |
---|
| 1300 | |
---|
| 1301 | }; // end namespace front_end |
---|
| 1302 | }; // end namespace multi_front_end |
---|
| 1303 | }; // end namespace core |
---|
| 1304 | |
---|
| 1305 | }; // end namespace behavioural |
---|
| 1306 | }; // end namespace morpheo |
---|