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