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