[88] | 1 | /* |
---|
| 2 | * $Id: Rename_unit_allocation.cpp 122 2009-06-03 08:15:51Z rosiere $ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/include/Rename_unit.h" |
---|
| 9 | #include "Behavioural/include/Allocation.h" |
---|
| 10 | |
---|
| 11 | namespace morpheo { |
---|
| 12 | namespace behavioural { |
---|
| 13 | namespace core { |
---|
| 14 | namespace multi_ooo_engine { |
---|
| 15 | namespace ooo_engine { |
---|
| 16 | namespace rename_unit { |
---|
| 17 | |
---|
| 18 | |
---|
| 19 | |
---|
| 20 | #undef FUNCTION |
---|
| 21 | #define FUNCTION "Rename_unit::allocation" |
---|
| 22 | void Rename_unit::allocation |
---|
| 23 | ( |
---|
| 24 | #ifdef STATISTICS |
---|
| 25 | morpheo::behavioural::Parameters_Statistics * param_statistics |
---|
| 26 | #else |
---|
| 27 | void |
---|
| 28 | #endif |
---|
| 29 | ) |
---|
| 30 | { |
---|
| 31 | log_begin(Rename_unit,FUNCTION); |
---|
| 32 | |
---|
| 33 | _component = new Component (_usage); |
---|
| 34 | |
---|
| 35 | Entity * entity = _component->set_entity (_name |
---|
| 36 | ,"Rename_unit" |
---|
| 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 : "rename_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 59 | { |
---|
[112] | 60 | ALLOC2_INTERFACE_BEGIN("rename_in", IN, EAST, _("output of decod's stage"), _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
[88] | 61 | |
---|
| 62 | _ALLOC2_VALACK_IN ( in_RENAME_IN_VAL ,VAL, _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
| 63 | _ALLOC2_VALACK_OUT(out_RENAME_IN_ACK ,ACK, _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
| 64 | _ALLOC2_SIGNAL_IN ( in_RENAME_IN_FRONT_END_ID ,"front_end_id" ,Tcontext_t ,_param->_size_front_end_id , _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
| 65 | _ALLOC2_SIGNAL_IN ( in_RENAME_IN_CONTEXT_ID ,"context_id" ,Tcontext_t ,_param->_size_context_id , _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
| 66 | _ALLOC2_SIGNAL_IN ( in_RENAME_IN_DEPTH ,"depth" ,Tdepth_t ,_param->_size_depth , _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
| 67 | _ALLOC2_SIGNAL_IN ( in_RENAME_IN_TYPE ,"type" ,Ttype_t ,_param->_size_type , _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
| 68 | _ALLOC2_SIGNAL_IN ( in_RENAME_IN_OPERATION ,"operation" ,Toperation_t ,_param->_size_operation , _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
| 69 | _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NO_EXECUTE ,"no_execute" ,Tcontrol_t ,1 , _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
| 70 | _ALLOC2_SIGNAL_IN ( in_RENAME_IN_IS_DELAY_SLOT ,"is_delay_slot",Tcontrol_t ,1 , _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
[108] | 71 | #ifdef DEBUG |
---|
| 72 | _ALLOC2_SIGNAL_IN ( in_RENAME_IN_ADDRESS ,"address" ,Taddress_t ,_param->_size_instruction_address , _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
| 73 | #endif |
---|
[105] | 74 | _ALLOC2_SIGNAL_IN ( in_RENAME_IN_ADDRESS_NEXT ,"address_next" ,Taddress_t ,_param->_size_instruction_address , _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
[88] | 75 | _ALLOC2_SIGNAL_IN ( in_RENAME_IN_HAS_IMMEDIAT ,"has_immediat" ,Tcontrol_t ,1 , _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
| 76 | _ALLOC2_SIGNAL_IN ( in_RENAME_IN_IMMEDIAT ,"immediat" ,Tgeneral_data_t ,_param->_size_general_data , _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
| 77 | _ALLOC2_SIGNAL_IN ( in_RENAME_IN_READ_RA ,"read_ra" ,Tcontrol_t ,1 , _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
| 78 | _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NUM_REG_RA ,"num_reg_ra" ,Tgeneral_address_t,_param->_size_general_register_logic, _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
| 79 | _ALLOC2_SIGNAL_IN ( in_RENAME_IN_READ_RB ,"read_rb" ,Tcontrol_t ,1 , _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
| 80 | _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NUM_REG_RB ,"num_reg_rb" ,Tgeneral_address_t,_param->_size_general_register_logic, _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
| 81 | _ALLOC2_SIGNAL_IN ( in_RENAME_IN_READ_RC ,"read_rc" ,Tcontrol_t ,1 , _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
| 82 | _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NUM_REG_RC ,"num_reg_rc" ,Tspecial_address_t,_param->_size_special_register_logic, _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
| 83 | _ALLOC2_SIGNAL_IN ( in_RENAME_IN_WRITE_RD ,"write_rd" ,Tcontrol_t ,1 , _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
| 84 | _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NUM_REG_RD ,"num_reg_rd" ,Tgeneral_address_t,_param->_size_general_register_logic, _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
| 85 | _ALLOC2_SIGNAL_IN ( in_RENAME_IN_WRITE_RE ,"write_re" ,Tcontrol_t ,1 , _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
| 86 | _ALLOC2_SIGNAL_IN ( in_RENAME_IN_NUM_REG_RE ,"num_reg_re" ,Tspecial_address_t,_param->_size_special_register_logic, _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
| 87 | _ALLOC2_SIGNAL_IN ( in_RENAME_IN_EXCEPTION_USE ,"exception_use",Texception_t ,_param->_size_exception_use , _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
| 88 | _ALLOC2_SIGNAL_IN ( in_RENAME_IN_EXCEPTION ,"exception" ,Texception_t ,_param->_size_exception , _param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
[112] | 89 | |
---|
| 90 | ALLOC2_INTERFACE_END(_param->_nb_front_end, _param->_nb_inst_decod[it1]); |
---|
[88] | 91 | } |
---|
| 92 | |
---|
| 93 | // ~~~~~[ Interface "insert" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 94 | { |
---|
[112] | 95 | ALLOC1_INTERFACE_BEGIN("insert",OUT,WEST , _("Instruction with physical register"), _param->_nb_inst_insert); |
---|
[88] | 96 | |
---|
| 97 | ALLOC1_VALACK_OUT(out_INSERT_VAL ,VAL); |
---|
| 98 | ALLOC1_VALACK_IN ( in_INSERT_ACK ,ACK); |
---|
| 99 | ALLOC1_SIGNAL_OUT(out_INSERT_FRONT_END_ID ,"front_end_id" ,Tcontext_t ,_param->_size_front_end_id ); |
---|
| 100 | ALLOC1_SIGNAL_OUT(out_INSERT_CONTEXT_ID ,"context_id" ,Tcontext_t ,_param->_size_context_id ); |
---|
| 101 | ALLOC1_SIGNAL_OUT(out_INSERT_DEPTH ,"depth" ,Tdepth_t ,_param->_size_depth ); |
---|
| 102 | ALLOC1_SIGNAL_OUT(out_INSERT_TYPE ,"type" ,Ttype_t ,_param->_size_type ); |
---|
| 103 | ALLOC1_SIGNAL_OUT(out_INSERT_OPERATION ,"operation" ,Toperation_t ,_param->_size_operation ); |
---|
| 104 | ALLOC1_SIGNAL_OUT(out_INSERT_NO_EXECUTE ,"no_execute" ,Tcontrol_t ,1 ); |
---|
| 105 | ALLOC1_SIGNAL_OUT(out_INSERT_IS_DELAY_SLOT ,"is_delay_slot" ,Tcontrol_t ,1 ); |
---|
[108] | 106 | #ifdef DEBUG |
---|
| 107 | ALLOC1_SIGNAL_OUT(out_INSERT_ADDRESS ,"address" ,Taddress_t ,_param->_size_instruction_address ); |
---|
| 108 | #endif |
---|
[105] | 109 | ALLOC1_SIGNAL_OUT(out_INSERT_ADDRESS_NEXT ,"address_next" ,Taddress_t ,_param->_size_instruction_address ); |
---|
[88] | 110 | ALLOC1_SIGNAL_OUT(out_INSERT_HAS_IMMEDIAT ,"has_immediat" ,Tcontrol_t ,1 ); |
---|
| 111 | ALLOC1_SIGNAL_OUT(out_INSERT_IMMEDIAT ,"immediat" ,Tgeneral_data_t ,_param->_size_general_data ); |
---|
| 112 | ALLOC1_SIGNAL_OUT(out_INSERT_STORE_QUEUE_PTR_WRITE,"store_queue_ptr_write",Tlsq_ptr_t ,_param->_size_store_queue_ptr ); |
---|
[122] | 113 | ALLOC1_SIGNAL_OUT(out_INSERT_STORE_QUEUE_PTR_READ ,"store_queue_ptr_read" ,Tlsq_ptr_t ,_param->_size_store_queue_ptr ); |
---|
| 114 | ALLOC1_SIGNAL_OUT(out_INSERT_STORE_QUEUE_EMPTY ,"store_queue_empty" ,Tcontrol_t ,1 ); |
---|
[88] | 115 | ALLOC1_SIGNAL_OUT(out_INSERT_LOAD_QUEUE_PTR_WRITE ,"load_queue_ptr_write" ,Tlsq_ptr_t ,_param->_size_load_queue_ptr ); |
---|
| 116 | ALLOC1_SIGNAL_OUT(out_INSERT_EXCEPTION_USE ,"exception_use" ,Texception_t ,_param->_size_exception_use ); |
---|
| 117 | ALLOC1_SIGNAL_OUT(out_INSERT_EXCEPTION ,"exception" ,Texception_t ,_param->_size_exception ); |
---|
| 118 | ALLOC1_SIGNAL_OUT(out_INSERT_READ_RA ,"read_ra" ,Tcontrol_t ,1 ); |
---|
[121] | 119 | #ifdef DEBUG |
---|
[88] | 120 | ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RA_LOG ,"num_reg_ra_log" ,Tgeneral_address_t,_param->_size_general_register_logic); |
---|
[121] | 121 | #endif |
---|
[88] | 122 | ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RA_PHY ,"num_reg_ra_phy" ,Tgeneral_address_t,_param->_size_general_register ); |
---|
| 123 | ALLOC1_SIGNAL_OUT(out_INSERT_READ_RB ,"read_rb" ,Tcontrol_t ,1 ); |
---|
[121] | 124 | #ifdef DEBUG |
---|
[88] | 125 | ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RB_LOG ,"num_reg_rb_log" ,Tgeneral_address_t,_param->_size_general_register_logic); |
---|
[121] | 126 | #endif |
---|
[88] | 127 | ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RB_PHY ,"num_reg_rb_phy" ,Tgeneral_address_t,_param->_size_general_register ); |
---|
| 128 | ALLOC1_SIGNAL_OUT(out_INSERT_READ_RC ,"read_rc" ,Tcontrol_t ,1 ); |
---|
[121] | 129 | #ifdef DEBUG |
---|
[88] | 130 | ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RC_LOG ,"num_reg_rc_log" ,Tspecial_address_t,_param->_size_special_register_logic); |
---|
[121] | 131 | #endif |
---|
[88] | 132 | ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RC_PHY ,"num_reg_rc_phy" ,Tspecial_address_t,_param->_size_special_register ); |
---|
| 133 | ALLOC1_SIGNAL_OUT(out_INSERT_WRITE_RD ,"write_rd" ,Tcontrol_t ,1 ); |
---|
| 134 | ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RD_LOG ,"num_reg_rd_log" ,Tgeneral_address_t,_param->_size_general_register_logic); |
---|
| 135 | ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RD_PHY_OLD ,"num_reg_rd_phy_old" ,Tgeneral_address_t,_param->_size_general_register ); |
---|
| 136 | ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RD_PHY_NEW ,"num_reg_rd_phy_new" ,Tgeneral_address_t,_param->_size_general_register ); |
---|
| 137 | ALLOC1_SIGNAL_OUT(out_INSERT_WRITE_RE ,"write_re" ,Tcontrol_t ,1 ); |
---|
| 138 | ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RE_LOG ,"num_reg_re_log" ,Tspecial_address_t,_param->_size_special_register_logic); |
---|
| 139 | ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RE_PHY_OLD ,"num_reg_re_phy_old" ,Tspecial_address_t,_param->_size_special_register ); |
---|
| 140 | ALLOC1_SIGNAL_OUT(out_INSERT_NUM_REG_RE_PHY_NEW ,"num_reg_re_phy_new" ,Tspecial_address_t,_param->_size_special_register ); |
---|
[112] | 141 | |
---|
| 142 | ALLOC1_INTERFACE_END(_param->_nb_inst_insert); |
---|
[88] | 143 | } |
---|
| 144 | |
---|
| 145 | // ~~~~~[ Interface "retire" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 146 | { |
---|
[112] | 147 | ALLOC1_INTERFACE_BEGIN("retire",IN ,NORTH, _("Retire instruction, update renaming structure."), _param->_nb_inst_retire); |
---|
[88] | 148 | |
---|
| 149 | ALLOC1_VALACK_IN ( in_RETIRE_VAL ,VAL); |
---|
| 150 | ALLOC1_VALACK_OUT(out_RETIRE_ACK ,ACK); |
---|
| 151 | ALLOC1_SIGNAL_IN ( in_RETIRE_FRONT_END_ID ,"front_end_id" ,Tcontext_t ,_param->_size_front_end_id ); |
---|
| 152 | ALLOC1_SIGNAL_IN ( in_RETIRE_CONTEXT_ID ,"context_id" ,Tcontext_t ,_param->_size_context_id ); |
---|
| 153 | // ALLOC1_SIGNAL_IN ( in_RETIRE_TYPE ,"type" ,Ttype_t ,_param->_size_type ); |
---|
| 154 | // ALLOC1_SIGNAL_IN ( in_RETIRE_OPERATION ,"operation" ,Toperation_t ,_param->_size_operation ); |
---|
| 155 | ALLOC1_SIGNAL_IN ( in_RETIRE_USE_STORE_QUEUE ,"use_store_queue" ,Tcontrol_t ,1 ); |
---|
| 156 | ALLOC1_SIGNAL_IN ( in_RETIRE_USE_LOAD_QUEUE ,"use_load_queue" ,Tcontrol_t ,1 ); |
---|
| 157 | ALLOC1_SIGNAL_IN ( in_RETIRE_STORE_QUEUE_PTR_WRITE,"store_queue_ptr_write",Tlsq_ptr_t ,_param->_size_store_queue_ptr ); |
---|
| 158 | ALLOC1_SIGNAL_IN ( in_RETIRE_LOAD_QUEUE_PTR_WRITE ,"load_queue_ptr_write" ,Tlsq_ptr_t ,_param->_size_load_queue_ptr ); |
---|
[121] | 159 | // ALLOC1_SIGNAL_IN ( in_RETIRE_READ_RA ,"read_ra" ,Tcontrol_t ,1 ); |
---|
| 160 | // ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RA_PHY ,"num_reg_ra_phy" ,Tgeneral_address_t,_param->_size_general_register ); |
---|
| 161 | // ALLOC1_SIGNAL_IN ( in_RETIRE_READ_RB ,"read_rb" ,Tcontrol_t ,1 ); |
---|
| 162 | // ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RB_PHY ,"num_reg_rb_phy" ,Tgeneral_address_t,_param->_size_general_register ); |
---|
| 163 | // ALLOC1_SIGNAL_IN ( in_RETIRE_READ_RC ,"read_rc" ,Tcontrol_t ,1 ); |
---|
| 164 | // ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RC_PHY ,"num_reg_rc_phy" ,Tspecial_address_t,_param->_size_special_register ); |
---|
[88] | 165 | ALLOC1_SIGNAL_IN ( in_RETIRE_WRITE_RD ,"write_rd" ,Tcontrol_t ,1 ); |
---|
| 166 | ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RD_LOG ,"num_reg_rd_log" ,Tgeneral_address_t,_param->_size_general_register_logic); |
---|
| 167 | ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RD_PHY_OLD ,"num_reg_rd_phy_old" ,Tgeneral_address_t,_param->_size_general_register ); |
---|
| 168 | ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RD_PHY_NEW ,"num_reg_rd_phy_new" ,Tgeneral_address_t,_param->_size_general_register ); |
---|
| 169 | ALLOC1_SIGNAL_IN ( in_RETIRE_WRITE_RE ,"write_re" ,Tcontrol_t ,1 ); |
---|
| 170 | ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RE_LOG ,"num_reg_re_log" ,Tspecial_address_t,_param->_size_special_register_logic); |
---|
| 171 | ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RE_PHY_OLD ,"num_reg_re_phy_old" ,Tspecial_address_t,_param->_size_special_register ); |
---|
| 172 | ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RE_PHY_NEW ,"num_reg_re_phy_new" ,Tspecial_address_t,_param->_size_special_register ); |
---|
[112] | 173 | |
---|
| 174 | ALLOC1_INTERFACE_END(_param->_nb_inst_retire); |
---|
[88] | 175 | } |
---|
| 176 | |
---|
[104] | 177 | // ~~~~~[ Interface : "retire_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 178 | { |
---|
[112] | 179 | ALLOC2_INTERFACE_BEGIN("retire_event", IN,NORTH, _("Retire event"), _param->_nb_front_end, _param->_nb_context[it1]); |
---|
[104] | 180 | |
---|
| 181 | _ALLOC2_VALACK_IN ( in_RETIRE_EVENT_VAL ,VAL,_param->_nb_front_end, _param->_nb_context[it1]); |
---|
| 182 | _ALLOC2_VALACK_OUT(out_RETIRE_EVENT_ACK ,ACK,_param->_nb_front_end, _param->_nb_context[it1]); |
---|
| 183 | _ALLOC2_SIGNAL_IN ( in_RETIRE_EVENT_STATE ,"state" ,Tevent_state_t ,_param->_size_event_state, _param->_nb_front_end, _param->_nb_context[it1]); |
---|
[122] | 184 | _ALLOC2_SIGNAL_IN ( in_RETIRE_EVENT_FLUSH ,"flush" ,Tcontrol_t ,1 , _param->_nb_front_end, _param->_nb_context[it1]); |
---|
| 185 | _ALLOC2_SIGNAL_IN ( in_RETIRE_EVENT_STOP ,"stop" ,Tcontrol_t ,1 , _param->_nb_front_end, _param->_nb_context[it1]); |
---|
[112] | 186 | |
---|
| 187 | ALLOC2_INTERFACE_END(_param->_nb_front_end, _param->_nb_context[it1]); |
---|
[104] | 188 | } |
---|
| 189 | |
---|
[88] | 190 | // ~~~~~[ Interface : "spr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 191 | { |
---|
[112] | 192 | ALLOC2_INTERFACE_BEGIN("spr_read", IN,NORTH, _("Special register"), _param->_nb_front_end, _param->_nb_context[it1]); |
---|
[88] | 193 | |
---|
| 194 | _ALLOC2_SIGNAL_IN (in_SPR_READ_SR ,"sr",Tspr_t ,_param->_size_spr, _param->_nb_front_end, _param->_nb_context[it1]); |
---|
[112] | 195 | |
---|
| 196 | ALLOC2_INTERFACE_END(_param->_nb_front_end, _param->_nb_context[it1]); |
---|
[88] | 197 | } |
---|
| 198 | |
---|
| 199 | // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 200 | |
---|
| 201 | std::string name; |
---|
| 202 | |
---|
| 203 | { |
---|
| 204 | name = _name+"_rename_select"; |
---|
| 205 | log_printf(TRACE,Rename_unit,FUNCTION,_("Create : %s"),name.c_str()); |
---|
| 206 | |
---|
| 207 | _component_rename_select = new morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::rename_select::Rename_select |
---|
| 208 | (name.c_str() |
---|
| 209 | #ifdef STATISTICS |
---|
| 210 | ,param_statistics |
---|
| 211 | #endif |
---|
| 212 | ,_param->_param_rename_select |
---|
| 213 | ,_usage); |
---|
| 214 | |
---|
| 215 | _component->set_component (_component_rename_select->_component |
---|
| 216 | #ifdef POSITION |
---|
| 217 | , 50, 50, 10, 10 |
---|
| 218 | #endif |
---|
| 219 | ); |
---|
| 220 | } |
---|
| 221 | |
---|
| 222 | { |
---|
| 223 | name = _name+"_register_translation_unit"; |
---|
| 224 | log_printf(TRACE,Rename_unit,FUNCTION,_("Create : %s"),name.c_str()); |
---|
| 225 | |
---|
| 226 | _component_register_translation_unit = new morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::register_translation_unit::Register_translation_unit |
---|
| 227 | (name.c_str() |
---|
| 228 | #ifdef STATISTICS |
---|
| 229 | ,param_statistics |
---|
| 230 | #endif |
---|
| 231 | ,_param->_param_register_translation_unit |
---|
| 232 | ,_usage); |
---|
| 233 | |
---|
| 234 | _component->set_component (_component_register_translation_unit->_component |
---|
| 235 | #ifdef POSITION |
---|
| 236 | , 50, 50, 10, 10 |
---|
| 237 | #endif |
---|
| 238 | ); |
---|
| 239 | } |
---|
| 240 | |
---|
| 241 | { |
---|
| 242 | name = _name+"_load_store_pointer_unit"; |
---|
| 243 | log_printf(TRACE,Rename_unit,FUNCTION,_("Create : %s"),name.c_str()); |
---|
| 244 | |
---|
| 245 | _component_load_store_pointer_unit = new morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::load_store_pointer_unit::Load_Store_pointer_unit |
---|
| 246 | (name.c_str() |
---|
| 247 | #ifdef STATISTICS |
---|
| 248 | ,param_statistics |
---|
| 249 | #endif |
---|
| 250 | ,_param->_param_load_store_pointer_unit |
---|
| 251 | ,_usage); |
---|
| 252 | |
---|
| 253 | _component->set_component (_component_load_store_pointer_unit->_component |
---|
| 254 | #ifdef POSITION |
---|
| 255 | , 50, 50, 10, 10 |
---|
| 256 | #endif |
---|
| 257 | ); |
---|
| 258 | } |
---|
| 259 | |
---|
| 260 | { |
---|
| 261 | name = _name+"_glue"; |
---|
| 262 | log_printf(TRACE,Rename_unit,FUNCTION,_("Create : %s"),name.c_str()); |
---|
| 263 | |
---|
| 264 | _component_glue = new morpheo::behavioural::core::multi_ooo_engine::ooo_engine::rename_unit::rename_unit_glue::Rename_unit_Glue |
---|
| 265 | (name.c_str() |
---|
| 266 | #ifdef STATISTICS |
---|
| 267 | ,param_statistics |
---|
| 268 | #endif |
---|
| 269 | ,_param->_param_glue |
---|
| 270 | ,_usage); |
---|
| 271 | |
---|
| 272 | _component->set_component (_component_glue->_component |
---|
| 273 | #ifdef POSITION |
---|
| 274 | , 50, 50, 10, 10 |
---|
| 275 | #endif |
---|
| 276 | ); |
---|
| 277 | } |
---|
| 278 | |
---|
| 279 | // ~~~~~[ Instanciation ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 280 | std::string src,dest; |
---|
| 281 | |
---|
| 282 | // =================================================================== |
---|
| 283 | // =====[ rename_select ]============================================= |
---|
| 284 | // =================================================================== |
---|
| 285 | { |
---|
| 286 | src = _name+"_rename_select"; |
---|
| 287 | log_printf(TRACE,Rename_unit,FUNCTION,_("Instance : %s"),name.c_str()); |
---|
| 288 | |
---|
| 289 | { |
---|
| 290 | dest = _name; |
---|
| 291 | #ifdef POSITION |
---|
| 292 | _component->interface_map (src ,"", |
---|
| 293 | dest,""); |
---|
| 294 | #endif |
---|
| 295 | PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
| 296 | PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); |
---|
| 297 | } |
---|
| 298 | |
---|
| 299 | for (uint32_t i=0; i<_param->_nb_front_end; i++) |
---|
| 300 | for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++) |
---|
| 301 | { |
---|
| 302 | dest = _name; |
---|
| 303 | #ifdef POSITION |
---|
| 304 | _component->interface_map (src ,"rename_in_"+toString(i)+"_"+toString(j), |
---|
| 305 | dest,"rename_in_"+toString(i)+"_"+toString(j)); |
---|
| 306 | #endif |
---|
| 307 | |
---|
| 308 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_VAL" , |
---|
| 309 | dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_VAL" ); |
---|
| 310 | PORT_MAP(_component,src ,"out_RENAME_IN_"+toString(i)+"_"+toString(j)+"_ACK" , |
---|
| 311 | dest,"out_RENAME_IN_"+toString(i)+"_"+toString(j)+"_ACK" ); |
---|
| 312 | if (_param->_have_port_front_end_id) |
---|
| 313 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_FRONT_END_ID" , |
---|
| 314 | dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_FRONT_END_ID" ); |
---|
| 315 | if (_param->_have_port_context_id) |
---|
| 316 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_CONTEXT_ID" , |
---|
| 317 | dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_CONTEXT_ID" ); |
---|
| 318 | if (_param->_have_port_depth) |
---|
| 319 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_DEPTH" , |
---|
| 320 | dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_DEPTH" ); |
---|
| 321 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_TYPE" , |
---|
| 322 | dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_TYPE" ); |
---|
| 323 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_OPERATION" , |
---|
| 324 | dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_OPERATION" ); |
---|
| 325 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_NO_EXECUTE" , |
---|
| 326 | dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_NO_EXECUTE" ); |
---|
| 327 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_IS_DELAY_SLOT", |
---|
| 328 | dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_IS_DELAY_SLOT"); |
---|
[108] | 329 | #ifdef DEBUG |
---|
| 330 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_ADDRESS" , |
---|
| 331 | dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_ADDRESS" ); |
---|
| 332 | #endif |
---|
[105] | 333 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_ADDRESS_NEXT" , |
---|
| 334 | dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_ADDRESS_NEXT" ); |
---|
[88] | 335 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_HAS_IMMEDIAT" , |
---|
| 336 | dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_HAS_IMMEDIAT" ); |
---|
| 337 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_IMMEDIAT" , |
---|
| 338 | dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_IMMEDIAT" ); |
---|
| 339 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_READ_RA" , |
---|
| 340 | dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_READ_RA" ); |
---|
| 341 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_NUM_REG_RA" , |
---|
| 342 | dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_NUM_REG_RA" ); |
---|
| 343 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_READ_RB" , |
---|
| 344 | dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_READ_RB" ); |
---|
| 345 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_NUM_REG_RB" , |
---|
| 346 | dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_NUM_REG_RB" ); |
---|
| 347 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_READ_RC" , |
---|
| 348 | dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_READ_RC" ); |
---|
| 349 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_NUM_REG_RC" , |
---|
| 350 | dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_NUM_REG_RC" ); |
---|
| 351 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_WRITE_RD" , |
---|
| 352 | dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_WRITE_RD" ); |
---|
| 353 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_NUM_REG_RD" , |
---|
| 354 | dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_NUM_REG_RD" ); |
---|
| 355 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_WRITE_RE" , |
---|
| 356 | dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_WRITE_RE" ); |
---|
| 357 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_NUM_REG_RE" , |
---|
| 358 | dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_NUM_REG_RE" ); |
---|
| 359 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_EXCEPTION_USE", |
---|
| 360 | dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_EXCEPTION_USE"); |
---|
| 361 | PORT_MAP(_component,src , "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_EXCEPTION" , |
---|
| 362 | dest, "in_RENAME_IN_"+toString(i)+"_"+toString(j)+"_EXCEPTION" ); |
---|
| 363 | } |
---|
| 364 | |
---|
| 365 | for (uint32_t i=0; i<_param->_nb_inst_insert; i++) |
---|
| 366 | { |
---|
| 367 | dest = _name; |
---|
| 368 | |
---|
| 369 | #ifdef POSITION |
---|
| 370 | _component->interface_map (src ,"rename_out_"+toString(i), |
---|
| 371 | dest,"insert_" +toString(i)); |
---|
| 372 | #endif |
---|
| 373 | |
---|
| 374 | PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_IS_DELAY_SLOT", |
---|
| 375 | dest,"out_INSERT_" +toString(i)+"_IS_DELAY_SLOT"); |
---|
| 376 | if (_param->_have_port_depth) |
---|
| 377 | PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_DEPTH" , |
---|
| 378 | dest,"out_INSERT_" +toString(i)+"_DEPTH" ); |
---|
[108] | 379 | #ifdef DEBUG |
---|
| 380 | PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_ADDRESS" , |
---|
| 381 | dest,"out_INSERT_" +toString(i)+"_ADDRESS" ); |
---|
| 382 | #endif |
---|
[105] | 383 | PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_ADDRESS_NEXT", |
---|
| 384 | dest,"out_INSERT_" +toString(i)+"_ADDRESS_NEXT"); |
---|
[88] | 385 | PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_HAS_IMMEDIAT", |
---|
| 386 | dest,"out_INSERT_" +toString(i)+"_HAS_IMMEDIAT"); |
---|
| 387 | PORT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_EXCEPTION_USE", |
---|
| 388 | dest,"out_INSERT_" +toString(i)+"_EXCEPTION_USE"); |
---|
| 389 | |
---|
| 390 | dest = _name+"_register_translation_unit"; |
---|
| 391 | |
---|
| 392 | #ifdef POSITION |
---|
| 393 | _component->interface_map (src ,"rename_out_"+toString(i), |
---|
| 394 | dest,"rename_" +toString(i)); |
---|
| 395 | #endif |
---|
| 396 | |
---|
| 397 | COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_READ_RA" , |
---|
| 398 | dest, "in_RENAME_" +toString(i)+"_READ_RA" ); |
---|
| 399 | COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RA", |
---|
| 400 | dest, "in_RENAME_" +toString(i)+"_NUM_REG_RA_LOG"); |
---|
| 401 | COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_READ_RB" , |
---|
| 402 | dest, "in_RENAME_" +toString(i)+"_READ_RB" ); |
---|
| 403 | COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RB", |
---|
| 404 | dest, "in_RENAME_" +toString(i)+"_NUM_REG_RB_LOG"); |
---|
| 405 | COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_READ_RC" , |
---|
| 406 | dest, "in_RENAME_" +toString(i)+"_READ_RC" ); |
---|
| 407 | COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RC", |
---|
| 408 | dest, "in_RENAME_" +toString(i)+"_NUM_REG_RC_LOG"); |
---|
| 409 | COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_WRITE_RD" , |
---|
| 410 | dest, "in_RENAME_" +toString(i)+"_WRITE_RD" ); |
---|
| 411 | COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RD", |
---|
| 412 | dest, "in_RENAME_" +toString(i)+"_NUM_REG_RD_LOG"); |
---|
| 413 | COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_WRITE_RE" , |
---|
| 414 | dest, "in_RENAME_" +toString(i)+"_WRITE_RE" ); |
---|
| 415 | COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+"_NUM_REG_RE", |
---|
| 416 | dest, "in_RENAME_" +toString(i)+"_NUM_REG_RE_LOG"); |
---|
| 417 | |
---|
| 418 | dest = _name+"_glue"; |
---|
| 419 | |
---|
| 420 | #ifdef POSITION |
---|
| 421 | _component->interface_map (src ,"rename_out_"+toString(i), |
---|
| 422 | dest,"insert_" +toString(i)); |
---|
| 423 | #endif |
---|
| 424 | |
---|
| 425 | COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+ "_VAL" , |
---|
| 426 | dest, "in_INSERT_" +toString(i)+"_RENAME_SELECT_VAL" ); |
---|
| 427 | COMPONENT_MAP(_component,src , "in_RENAME_OUT_"+toString(i)+ "_ACK" , |
---|
| 428 | dest,"out_INSERT_" +toString(i)+"_RENAME_SELECT_ACK" ); |
---|
| 429 | if (_param->_have_port_front_end_id) |
---|
| 430 | COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+ "_FRONT_END_ID" , |
---|
| 431 | dest, "in_INSERT_" +toString(i)+"_RENAME_SELECT_FRONT_END_ID" ); |
---|
| 432 | if (_param->_have_port_context_id) |
---|
| 433 | COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+ "_CONTEXT_ID" , |
---|
| 434 | dest, "in_INSERT_" +toString(i)+"_RENAME_SELECT_CONTEXT_ID" ); |
---|
| 435 | COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+ "_TYPE" , |
---|
| 436 | dest, "in_INSERT_" +toString(i)+"_RENAME_SELECT_TYPE" ); |
---|
| 437 | COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+ "_OPERATION" , |
---|
| 438 | dest, "in_INSERT_" +toString(i)+"_RENAME_SELECT_OPERATION" ); |
---|
| 439 | COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+ "_IMMEDIAT" , |
---|
| 440 | dest, "in_INSERT_" +toString(i)+"_RENAME_SELECT_IMMEDIAT" ); |
---|
| 441 | // COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+ "_EXCEPTION_USE", |
---|
| 442 | // dest, "in_INSERT_" +toString(i)+"_RENAME_SELECT_EXCEPTION_USE"); |
---|
| 443 | COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+ "_EXCEPTION" , |
---|
| 444 | dest, "in_INSERT_" +toString(i)+"_RENAME_SELECT_EXCEPTION" ); |
---|
[115] | 445 | COMPONENT_MAP(_component,src ,"out_RENAME_OUT_"+toString(i)+ "_NO_EXECUTE" , |
---|
| 446 | dest, "in_INSERT_" +toString(i)+"_RENAME_SELECT_NO_EXECUTE" ); |
---|
[88] | 447 | } |
---|
[108] | 448 | |
---|
| 449 | for (uint32_t i=0; i<_param->_nb_front_end; i++) |
---|
| 450 | for (uint32_t j=0; j<_param->_nb_context[i]; j++) |
---|
| 451 | { |
---|
| 452 | dest = _name; |
---|
| 453 | |
---|
| 454 | #ifdef POSITION |
---|
| 455 | _component->interface_map (src ,"retire_event_"+toString(i)+"_"+toString(j), |
---|
| 456 | dest,"retire_event_"+toString(i)+"_"+toString(j)); |
---|
| 457 | #endif |
---|
[122] | 458 | PORT_MAP(_component,src , "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_FLUSH", |
---|
| 459 | dest, "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_FLUSH"); |
---|
| 460 | PORT_MAP(_component,src , "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_STOP", |
---|
| 461 | dest, "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_STOP"); |
---|
[108] | 462 | } |
---|
[88] | 463 | } |
---|
| 464 | |
---|
| 465 | // =================================================================== |
---|
| 466 | // =====[ register_translation_unit ]================================= |
---|
| 467 | // =================================================================== |
---|
| 468 | { |
---|
| 469 | src = _name+"_register_translation_unit"; |
---|
| 470 | log_printf(TRACE,Rename_unit,FUNCTION,_("Instance : %s"),name.c_str()); |
---|
| 471 | |
---|
| 472 | { |
---|
| 473 | dest = _name; |
---|
| 474 | #ifdef POSITION |
---|
| 475 | _component->interface_map (src ,"", |
---|
| 476 | dest,""); |
---|
| 477 | #endif |
---|
| 478 | PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
| 479 | PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); |
---|
| 480 | } |
---|
| 481 | |
---|
| 482 | for (uint32_t i=0; i<_param->_nb_inst_insert; i++) |
---|
| 483 | { |
---|
| 484 | dest = _name+"_rename_select"; |
---|
| 485 | |
---|
| 486 | #ifdef POSITION |
---|
| 487 | _component->interface_map (src ,"rename_" +toString(i), |
---|
| 488 | dest,"rename_out_"+toString(i)); |
---|
| 489 | #endif |
---|
| 490 | |
---|
| 491 | dest = _name+"_glue"; |
---|
| 492 | |
---|
| 493 | #ifdef POSITION |
---|
| 494 | _component->interface_map (src ,"rename_"+toString(i), |
---|
| 495 | dest,"insert_"+toString(i)); |
---|
| 496 | #endif |
---|
| 497 | |
---|
| 498 | COMPONENT_MAP(_component,src , "in_RENAME_"+toString(i)+ "_VAL" , |
---|
| 499 | dest,"out_INSERT_"+toString(i)+"_REGISTER_TRANSLATION_VAL" ); |
---|
| 500 | COMPONENT_MAP(_component,src ,"out_RENAME_"+toString(i)+ "_ACK" , |
---|
| 501 | dest, "in_INSERT_"+toString(i)+"_REGISTER_TRANSLATION_ACK" ); |
---|
| 502 | if (_param->_have_port_front_end_id) |
---|
| 503 | COMPONENT_MAP(_component,src , "in_RENAME_"+toString(i)+ "_FRONT_END_ID", |
---|
| 504 | dest,"out_INSERT_"+toString(i)+"_REGISTER_TRANSLATION_FRONT_END_ID"); |
---|
| 505 | if (_param->_have_port_context_id) |
---|
| 506 | COMPONENT_MAP(_component,src , "in_RENAME_"+toString(i)+ "_CONTEXT_ID" , |
---|
| 507 | dest,"out_INSERT_"+toString(i)+"_REGISTER_TRANSLATION_CONTEXT_ID" ); |
---|
| 508 | |
---|
| 509 | // in_RENAME_READ_RA - rename_select |
---|
| 510 | // in_RENAME_NUM_REG_RA_LOG - rename_select |
---|
| 511 | // in_RENAME_READ_RB - rename_select |
---|
| 512 | // in_RENAME_NUM_REG_RB_LOG - rename_select |
---|
| 513 | // in_RENAME_READ_RC - rename_select |
---|
| 514 | // in_RENAME_NUM_REG_RC_LOG - rename_select |
---|
| 515 | // in_RENAME_WRITE_RD - rename_select |
---|
| 516 | // in_RENAME_NUM_REG_RD_LOG - rename_select |
---|
| 517 | // in_RENAME_WRITE_RE - rename_select |
---|
| 518 | // in_RENAME_NUM_REG_RE_LOG - rename_select |
---|
| 519 | |
---|
| 520 | } |
---|
| 521 | |
---|
| 522 | for (uint32_t i=0; i<_param->_nb_inst_insert; i++) |
---|
| 523 | { |
---|
| 524 | dest = _name; |
---|
| 525 | |
---|
| 526 | #ifdef POSITION |
---|
| 527 | _component->interface_map (src ,"insert_"+toString(i), |
---|
| 528 | dest,"insert_"+toString(i)); |
---|
| 529 | #endif |
---|
| 530 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_VAL" , |
---|
| 531 | dest,"out_INSERT_"+toString(i)+"_VAL" ); |
---|
| 532 | PORT_MAP(_component,src , "in_INSERT_"+toString(i)+"_ACK" , |
---|
| 533 | dest, "in_INSERT_"+toString(i)+"_ACK" ); |
---|
| 534 | if (_param->_have_port_front_end_id) |
---|
| 535 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_FRONT_END_ID" , |
---|
| 536 | dest,"out_INSERT_"+toString(i)+"_FRONT_END_ID" ); |
---|
| 537 | if (_param->_have_port_context_id) |
---|
| 538 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_CONTEXT_ID" , |
---|
| 539 | dest,"out_INSERT_"+toString(i)+"_CONTEXT_ID" ); |
---|
| 540 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_READ_RA" , |
---|
| 541 | dest,"out_INSERT_"+toString(i)+"_READ_RA" ); |
---|
[121] | 542 | #ifdef DEBUG |
---|
[88] | 543 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_NUM_REG_RA_LOG" , |
---|
| 544 | dest,"out_INSERT_"+toString(i)+"_NUM_REG_RA_LOG" ); |
---|
[121] | 545 | #endif |
---|
[88] | 546 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_NUM_REG_RA_PHY" , |
---|
| 547 | dest,"out_INSERT_"+toString(i)+"_NUM_REG_RA_PHY" ); |
---|
| 548 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_READ_RB" , |
---|
| 549 | dest,"out_INSERT_"+toString(i)+"_READ_RB" ); |
---|
[121] | 550 | #ifdef DEBUG |
---|
[88] | 551 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_NUM_REG_RB_LOG" , |
---|
| 552 | dest,"out_INSERT_"+toString(i)+"_NUM_REG_RB_LOG" ); |
---|
[121] | 553 | #endif |
---|
[88] | 554 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_NUM_REG_RB_PHY" , |
---|
| 555 | dest,"out_INSERT_"+toString(i)+"_NUM_REG_RB_PHY" ); |
---|
| 556 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_READ_RC" , |
---|
| 557 | dest,"out_INSERT_"+toString(i)+"_READ_RC" ); |
---|
[121] | 558 | #ifdef DEBUG |
---|
[88] | 559 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_NUM_REG_RC_LOG" , |
---|
| 560 | dest,"out_INSERT_"+toString(i)+"_NUM_REG_RC_LOG" ); |
---|
[121] | 561 | #endif |
---|
[88] | 562 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_NUM_REG_RC_PHY" , |
---|
| 563 | dest,"out_INSERT_"+toString(i)+"_NUM_REG_RC_PHY" ); |
---|
| 564 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_WRITE_RD" , |
---|
| 565 | dest,"out_INSERT_"+toString(i)+"_WRITE_RD" ); |
---|
| 566 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_NUM_REG_RD_LOG" , |
---|
| 567 | dest,"out_INSERT_"+toString(i)+"_NUM_REG_RD_LOG" ); |
---|
| 568 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_NUM_REG_RD_PHY_OLD", |
---|
| 569 | dest,"out_INSERT_"+toString(i)+"_NUM_REG_RD_PHY_OLD"); |
---|
| 570 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_NUM_REG_RD_PHY_NEW", |
---|
| 571 | dest,"out_INSERT_"+toString(i)+"_NUM_REG_RD_PHY_NEW"); |
---|
| 572 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_WRITE_RE" , |
---|
| 573 | dest,"out_INSERT_"+toString(i)+"_WRITE_RE" ); |
---|
| 574 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_NUM_REG_RE_LOG" , |
---|
| 575 | dest,"out_INSERT_"+toString(i)+"_NUM_REG_RE_LOG" ); |
---|
| 576 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_NUM_REG_RE_PHY_OLD", |
---|
| 577 | dest,"out_INSERT_"+toString(i)+"_NUM_REG_RE_PHY_OLD"); |
---|
| 578 | |
---|
| 579 | // HACK : use the field num_reg_re to pass the SM and SUMRA flag. |
---|
| 580 | // cf : rename_unit_glue and functionnal_unit/Operation |
---|
| 581 | dest = _name+"_glue"; |
---|
| 582 | |
---|
| 583 | COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(i)+ "_NUM_REG_RE_PHY_NEW", |
---|
| 584 | dest, "in_INSERT_"+toString(i)+"_REGISTER_TRANSLATION_NUM_REG_RE_PHY_NEW"); |
---|
| 585 | } |
---|
| 586 | |
---|
| 587 | for (uint32_t i=0; i<_param->_nb_inst_retire; i++) |
---|
| 588 | { |
---|
| 589 | dest = _name; |
---|
| 590 | |
---|
| 591 | #ifdef POSITION |
---|
| 592 | _component->interface_map (src ,"retire_"+toString(i), |
---|
| 593 | dest,"retire_"+toString(i)); |
---|
| 594 | #endif |
---|
| 595 | |
---|
| 596 | if (_param->_have_port_front_end_id) |
---|
| 597 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_FRONT_END_ID" , |
---|
| 598 | dest, "in_RETIRE_"+toString(i)+"_FRONT_END_ID" ); |
---|
| 599 | if (_param->_have_port_context_id) |
---|
| 600 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_CONTEXT_ID" , |
---|
| 601 | dest, "in_RETIRE_"+toString(i)+"_CONTEXT_ID" ); |
---|
[121] | 602 | // PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_READ_RA" , |
---|
| 603 | // dest, "in_RETIRE_"+toString(i)+"_READ_RA" ); |
---|
| 604 | // PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_NUM_REG_RA_PHY" , |
---|
| 605 | // dest, "in_RETIRE_"+toString(i)+"_NUM_REG_RA_PHY" ); |
---|
| 606 | // PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_READ_RB" , |
---|
| 607 | // dest, "in_RETIRE_"+toString(i)+"_READ_RB" ); |
---|
| 608 | // PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_NUM_REG_RB_PHY" , |
---|
| 609 | // dest, "in_RETIRE_"+toString(i)+"_NUM_REG_RB_PHY" ); |
---|
| 610 | // PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_READ_RC" , |
---|
| 611 | // dest, "in_RETIRE_"+toString(i)+"_READ_RC" ); |
---|
| 612 | // PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_NUM_REG_RC_PHY" , |
---|
| 613 | // dest, "in_RETIRE_"+toString(i)+"_NUM_REG_RC_PHY" ); |
---|
[88] | 614 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_WRITE_RD" , |
---|
| 615 | dest, "in_RETIRE_"+toString(i)+"_WRITE_RD" ); |
---|
| 616 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_NUM_REG_RD_LOG" , |
---|
| 617 | dest, "in_RETIRE_"+toString(i)+"_NUM_REG_RD_LOG" ); |
---|
| 618 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_NUM_REG_RD_PHY_OLD", |
---|
| 619 | dest, "in_RETIRE_"+toString(i)+"_NUM_REG_RD_PHY_OLD"); |
---|
| 620 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_NUM_REG_RD_PHY_NEW", |
---|
| 621 | dest, "in_RETIRE_"+toString(i)+"_NUM_REG_RD_PHY_NEW"); |
---|
| 622 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_WRITE_RE" , |
---|
| 623 | dest, "in_RETIRE_"+toString(i)+"_WRITE_RE" ); |
---|
| 624 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_NUM_REG_RE_LOG" , |
---|
| 625 | dest, "in_RETIRE_"+toString(i)+"_NUM_REG_RE_LOG" ); |
---|
| 626 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_NUM_REG_RE_PHY_OLD", |
---|
| 627 | dest, "in_RETIRE_"+toString(i)+"_NUM_REG_RE_PHY_OLD"); |
---|
| 628 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_NUM_REG_RE_PHY_NEW", |
---|
| 629 | dest, "in_RETIRE_"+toString(i)+"_NUM_REG_RE_PHY_NEW"); |
---|
| 630 | |
---|
| 631 | dest = _name+"_glue"; |
---|
| 632 | |
---|
| 633 | #ifdef POSITION |
---|
| 634 | _component->interface_map (src ,"retire_"+toString(i), |
---|
| 635 | dest,"retire_"+toString(i)); |
---|
| 636 | #endif |
---|
| 637 | |
---|
| 638 | COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_VAL",dest,"out_RETIRE_"+toString(i)+"_REGISTER_TRANSLATION_VAL"); |
---|
| 639 | COMPONENT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_ACK",dest, "in_RETIRE_"+toString(i)+"_REGISTER_TRANSLATION_ACK"); |
---|
| 640 | } |
---|
[104] | 641 | |
---|
| 642 | for (uint32_t i=0; i<_param->_nb_front_end; i++) |
---|
| 643 | for (uint32_t j=0; j<_param->_nb_context[i]; j++) |
---|
| 644 | { |
---|
[122] | 645 | dest = _name+"_glue"; |
---|
[104] | 646 | |
---|
| 647 | #ifdef POSITION |
---|
| 648 | _component->interface_map (src ,"retire_event_"+toString(i)+"_"+toString(j), |
---|
| 649 | dest,"retire_event_"+toString(i)+"_"+toString(j)); |
---|
| 650 | #endif |
---|
[122] | 651 | COMPONENT_MAP(_component,src , "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+ "_VAL" , |
---|
| 652 | dest,"out_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_REGISTER_TRANSLATION_VAL" ); |
---|
| 653 | COMPONENT_MAP(_component,src ,"out_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+ "_ACK" , |
---|
| 654 | dest, "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_REGISTER_TRANSLATION_ACK" ); |
---|
| 655 | |
---|
| 656 | dest = _name; |
---|
| 657 | |
---|
| 658 | #ifdef POSITION |
---|
| 659 | _component->interface_map (src ,"retire_event_"+toString(i)+"_"+toString(j), |
---|
| 660 | dest,"retire_event_"+toString(i)+"_"+toString(j)); |
---|
| 661 | #endif |
---|
[104] | 662 | PORT_MAP(_component,src , "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_STATE", |
---|
| 663 | dest, "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_STATE"); |
---|
| 664 | } |
---|
[88] | 665 | } |
---|
| 666 | |
---|
| 667 | // =================================================================== |
---|
| 668 | // =====[ load_store_pointer_unit ]=================================== |
---|
| 669 | // =================================================================== |
---|
| 670 | { |
---|
| 671 | src = _name+"_load_store_pointer_unit"; |
---|
| 672 | log_printf(TRACE,Rename_unit,FUNCTION,_("Instance : %s"),name.c_str()); |
---|
| 673 | |
---|
| 674 | { |
---|
| 675 | dest = _name; |
---|
| 676 | #ifdef POSITION |
---|
| 677 | _component->interface_map (src ,"", |
---|
| 678 | dest,""); |
---|
| 679 | #endif |
---|
| 680 | PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
| 681 | PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); |
---|
| 682 | } |
---|
| 683 | |
---|
| 684 | for (uint32_t i=0; i<_param->_nb_inst_insert; i++) |
---|
| 685 | { |
---|
| 686 | dest = _name; |
---|
| 687 | |
---|
| 688 | #ifdef POSITION |
---|
| 689 | _component->interface_map (src ,"insert_"+toString(i), |
---|
| 690 | dest,"insert_"+toString(i)); |
---|
| 691 | #endif |
---|
| 692 | |
---|
| 693 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_STORE_QUEUE_PTR_WRITE", |
---|
| 694 | dest,"out_INSERT_"+toString(i)+"_STORE_QUEUE_PTR_WRITE"); |
---|
[122] | 695 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_STORE_QUEUE_PTR_READ" , |
---|
| 696 | dest,"out_INSERT_"+toString(i)+"_STORE_QUEUE_PTR_READ" ); |
---|
| 697 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_STORE_QUEUE_EMPTY" , |
---|
| 698 | dest,"out_INSERT_"+toString(i)+"_STORE_QUEUE_EMPTY" ); |
---|
[88] | 699 | if (_param->_have_port_load_queue_ptr) |
---|
| 700 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_LOAD_QUEUE_PTR_WRITE" , |
---|
| 701 | dest,"out_INSERT_"+toString(i)+"_LOAD_QUEUE_PTR_WRITE" ); |
---|
| 702 | |
---|
| 703 | dest = _name+"_glue"; |
---|
| 704 | |
---|
| 705 | #ifdef POSITION |
---|
| 706 | _component->interface_map (src ,"insert_"+toString(i), |
---|
| 707 | dest,"insert_"+toString(i)); |
---|
| 708 | #endif |
---|
| 709 | |
---|
| 710 | COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+ "_VAL" , |
---|
| 711 | dest,"out_INSERT_"+toString(i)+"_LOAD_STORE_QUEUE_POINTER_VAL" ); |
---|
| 712 | COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(i)+ "_ACK" , |
---|
| 713 | dest, "in_INSERT_"+toString(i)+"_LOAD_STORE_QUEUE_POINTER_ACK" ); |
---|
| 714 | if (_param->_have_port_front_end_id) |
---|
| 715 | COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+ "_FRONT_END_ID", |
---|
| 716 | dest,"out_INSERT_"+toString(i)+"_LOAD_STORE_QUEUE_POINTER_FRONT_END_ID"); |
---|
| 717 | if (_param->_have_port_context_id) |
---|
| 718 | COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+ "_CONTEXT_ID" , |
---|
| 719 | dest,"out_INSERT_"+toString(i)+"_LOAD_STORE_QUEUE_POINTER_CONTEXT_ID" ); |
---|
| 720 | COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+ "_TYPE" , |
---|
| 721 | dest,"out_INSERT_"+toString(i)+"_LOAD_STORE_QUEUE_POINTER_TYPE" ); |
---|
| 722 | COMPONENT_MAP(_component,src , "in_INSERT_"+toString(i)+ "_OPERATION" , |
---|
| 723 | dest,"out_INSERT_"+toString(i)+"_LOAD_STORE_QUEUE_POINTER_OPERATION" ); |
---|
| 724 | } |
---|
| 725 | |
---|
| 726 | for (uint32_t i=0; i<_param->_nb_inst_retire; i++) |
---|
| 727 | { |
---|
| 728 | dest = _name; |
---|
| 729 | |
---|
| 730 | #ifdef POSITION |
---|
| 731 | _component->interface_map (src ,"retire_"+toString(i), |
---|
| 732 | dest,"retire_"+toString(i)); |
---|
| 733 | #endif |
---|
| 734 | |
---|
| 735 | if (_param->_have_port_front_end_id) |
---|
| 736 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_FRONT_END_ID" , |
---|
| 737 | dest, "in_RETIRE_"+toString(i)+"_FRONT_END_ID" ); |
---|
| 738 | if (_param->_have_port_context_id) |
---|
| 739 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_CONTEXT_ID" , |
---|
| 740 | dest, "in_RETIRE_"+toString(i)+"_CONTEXT_ID" ); |
---|
| 741 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_USE_STORE_QUEUE" , |
---|
| 742 | dest, "in_RETIRE_"+toString(i)+"_USE_STORE_QUEUE" ); |
---|
| 743 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_USE_LOAD_QUEUE" , |
---|
| 744 | dest, "in_RETIRE_"+toString(i)+"_USE_LOAD_QUEUE" ); |
---|
| 745 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_STORE_QUEUE_PTR_WRITE", |
---|
| 746 | dest, "in_RETIRE_"+toString(i)+"_STORE_QUEUE_PTR_WRITE"); |
---|
| 747 | if (_param->_have_port_load_queue_ptr) |
---|
| 748 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_LOAD_QUEUE_PTR_WRITE" , |
---|
| 749 | dest, "in_RETIRE_"+toString(i)+"_LOAD_QUEUE_PTR_WRITE" ); |
---|
| 750 | |
---|
| 751 | dest = _name+"_glue"; |
---|
| 752 | |
---|
| 753 | #ifdef POSITION |
---|
| 754 | _component->interface_map (src ,"retire_"+toString(i), |
---|
| 755 | dest,"retire_"+toString(i)); |
---|
| 756 | #endif |
---|
| 757 | |
---|
| 758 | COMPONENT_MAP(_component,src , "in_RETIRE_"+toString(i)+ "_VAL" , |
---|
| 759 | dest,"out_RETIRE_"+toString(i)+"_LOAD_STORE_QUEUE_POINTER_VAL" ); |
---|
| 760 | COMPONENT_MAP(_component,src ,"out_RETIRE_"+toString(i)+ "_ACK" , |
---|
| 761 | dest, "in_RETIRE_"+toString(i)+"_LOAD_STORE_QUEUE_POINTER_ACK" ); |
---|
| 762 | //// in_RETIRE_TYPE - glue |
---|
| 763 | //// in_RETIRE_OPERATION - glue |
---|
| 764 | } |
---|
[122] | 765 | |
---|
| 766 | for (uint32_t i=0; i<_param->_nb_front_end; i++) |
---|
| 767 | for (uint32_t j=0; j<_param->_nb_context[i]; j++) |
---|
| 768 | { |
---|
| 769 | dest = _name+"_glue"; |
---|
| 770 | |
---|
| 771 | #ifdef POSITION |
---|
| 772 | _component->interface_map (src ,"retire_event_"+toString(i)+"_"+toString(j), |
---|
| 773 | dest,"retire_event_"+toString(i)+"_"+toString(j)); |
---|
| 774 | #endif |
---|
| 775 | COMPONENT_MAP(_component,src , "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+ "_VAL" , |
---|
| 776 | dest,"out_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_LOAD_STORE_QUEUE_POINTER_VAL" ); |
---|
| 777 | COMPONENT_MAP(_component,src ,"out_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+ "_ACK" , |
---|
| 778 | dest, "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_LOAD_STORE_QUEUE_POINTER_ACK" ); |
---|
| 779 | |
---|
| 780 | dest = _name; |
---|
| 781 | |
---|
| 782 | #ifdef POSITION |
---|
| 783 | _component->interface_map (src ,"retire_event_"+toString(i)+"_"+toString(j), |
---|
| 784 | dest,"retire_event_"+toString(i)+"_"+toString(j)); |
---|
| 785 | #endif |
---|
| 786 | PORT_MAP(_component,src , "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_STATE", |
---|
| 787 | dest, "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_STATE"); |
---|
| 788 | } |
---|
[88] | 789 | } |
---|
| 790 | |
---|
| 791 | // =================================================================== |
---|
| 792 | // =====[ glue ]====================================================== |
---|
| 793 | // =================================================================== |
---|
| 794 | { |
---|
| 795 | src = _name+"_glue"; |
---|
| 796 | log_printf(TRACE,Rename_unit,FUNCTION,_("Instance : %s"),name.c_str()); |
---|
| 797 | |
---|
| 798 | { |
---|
| 799 | dest = _name; |
---|
| 800 | #ifdef POSITION |
---|
| 801 | _component->interface_map (src ,"", |
---|
| 802 | dest,""); |
---|
| 803 | #endif |
---|
| 804 | PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); |
---|
| 805 | PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); |
---|
| 806 | } |
---|
| 807 | |
---|
| 808 | for (uint32_t i=0; i<_param->_nb_inst_insert; i++) |
---|
| 809 | { |
---|
| 810 | dest = _name; |
---|
| 811 | |
---|
| 812 | #ifdef POSITION |
---|
| 813 | _component->interface_map (src ,"insert_"+toString(i), |
---|
| 814 | dest,"insert_"+toString(i)); |
---|
| 815 | #endif |
---|
| 816 | |
---|
| 817 | // //out_INSERT_VAL |
---|
| 818 | // // in_INSERT_ACK |
---|
| 819 | if (_param->_have_port_front_end_id) |
---|
| 820 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_FRONT_END_ID" , |
---|
| 821 | dest,"out_INSERT_"+toString(i)+"_FRONT_END_ID" ); |
---|
| 822 | if (_param->_have_port_context_id) |
---|
| 823 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_CONTEXT_ID" , |
---|
| 824 | dest,"out_INSERT_"+toString(i)+"_CONTEXT_ID" ); |
---|
| 825 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_TYPE" , |
---|
| 826 | dest,"out_INSERT_"+toString(i)+"_TYPE" ); |
---|
| 827 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_OPERATION" , |
---|
| 828 | dest,"out_INSERT_"+toString(i)+"_OPERATION" ); |
---|
| 829 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_IMMEDIAT" , |
---|
| 830 | dest,"out_INSERT_"+toString(i)+"_IMMEDIAT" ); |
---|
| 831 | // PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_EXCEPTION_USE", |
---|
| 832 | // dest,"out_INSERT_"+toString(i)+"_EXCEPTION_USE"); |
---|
| 833 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_EXCEPTION" , |
---|
| 834 | dest,"out_INSERT_"+toString(i)+"_EXCEPTION" ); |
---|
| 835 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_NUM_REG_RE_PHY_NEW", |
---|
| 836 | dest,"out_INSERT_"+toString(i)+"_NUM_REG_RE_PHY_NEW"); |
---|
[115] | 837 | PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_NO_EXECUTE" , |
---|
| 838 | dest,"out_INSERT_"+toString(i)+"_NO_EXECUTE" ); |
---|
[88] | 839 | |
---|
| 840 | // in_INSERT_RENAME_SELECT_VAL - rename_select |
---|
| 841 | // out_INSERT_RENAME_SELECT_ACK - rename_select |
---|
| 842 | // in_INSERT_RENAME_SELECT_FRONT_END_ID - rename_select |
---|
| 843 | // in_INSERT_RENAME_SELECT_CONTEXT_ID - rename_select |
---|
| 844 | // in_INSERT_RENAME_SELECT_TYPE - rename_select |
---|
| 845 | // in_INSERT_RENAME_SELECT_OPERATION - rename_select |
---|
| 846 | // in_INSERT_RENAME_SELECT_IMMEDIAT - rename_select |
---|
| 847 | // // in_INSERT_RENAME_SELECT_EXCEPTION_USE - rename_select |
---|
| 848 | // in_INSERT_RENAME_SELECT_EXCEPTION - rename_select |
---|
| 849 | |
---|
| 850 | // out_INSERT_REGISTER_TRANSLATION_VAL - register_translation_unit |
---|
| 851 | // in_INSERT_REGISTER_TRANSLATION_ACK - register_translation_unit |
---|
| 852 | // out_INSERT_REGISTER_TRANSLATION_FRONT_END_ID - register_translation_unit |
---|
| 853 | // out_INSERT_REGISTER_TRANSLATION_CONTEXT_ID - register_translation_unit |
---|
| 854 | // out_INSERT_REGISTER_TRANSLATION_NUM_REG_RE_PHY_NEW - register_translation_unit |
---|
| 855 | |
---|
| 856 | // out_INSERT_LOAD_STORE_QUEUE_POINTER_VAL - load_store_pointer_unit |
---|
| 857 | // in_INSERT_LOAD_STORE_QUEUE_POINTER_ACK - load_store_pointer_unit |
---|
| 858 | // out_INSERT_LOAD_STORE_QUEUE_POINTER_FRONT_END_ID - load_store_pointer_unit |
---|
| 859 | // out_INSERT_LOAD_STORE_QUEUE_POINTER_CONTEXT_ID - load_store_pointer_unit |
---|
| 860 | // out_INSERT_LOAD_STORE_QUEUE_POINTER_TYPE - load_store_pointer_unit |
---|
| 861 | // out_INSERT_LOAD_STORE_QUEUE_POINTER_OPERATION - load_store_pointer_unit |
---|
| 862 | } |
---|
| 863 | |
---|
| 864 | for (uint32_t i=0; i<_param->_nb_inst_retire; i++) |
---|
| 865 | { |
---|
| 866 | dest = _name; |
---|
| 867 | |
---|
| 868 | #ifdef POSITION |
---|
| 869 | _component->interface_map (src ,"retire_"+toString(i), |
---|
| 870 | dest,"retire_"+toString(i)); |
---|
| 871 | #endif |
---|
| 872 | |
---|
| 873 | PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_VAL", |
---|
| 874 | dest, "in_RETIRE_"+toString(i)+"_VAL"); |
---|
| 875 | PORT_MAP(_component,src ,"out_RETIRE_"+toString(i)+"_ACK", |
---|
| 876 | dest,"out_RETIRE_"+toString(i)+"_ACK"); |
---|
| 877 | |
---|
| 878 | // out_RETIRE_LOAD_STORE_QUEUE_POINTER_VAL - load_store_pointer_unit |
---|
| 879 | // in_RETIRE_LOAD_STORE_QUEUE_POINTER_ACK - load_store_pointer_unit |
---|
| 880 | // //out_RETIRE_LOAD_STORE_QUEUE_POINTER_TYPE - load_store_pointer_unit |
---|
| 881 | // //out_RETIRE_LOAD_STORE_QUEUE_POINTER_OPERATION - load_store_pointer_unit |
---|
| 882 | // out_RETIRE_REGISTER_TRANSLATION_VAL - register_translation_unit |
---|
| 883 | // in_RETIRE_REGISTER_TRANSLATION_ACK - register_translation_unit |
---|
| 884 | } |
---|
| 885 | |
---|
| 886 | for (uint32_t i=0; i<_param->_nb_front_end; i++) |
---|
[122] | 887 | for (uint32_t j=0; j<_param->_nb_context[i]; j++) |
---|
| 888 | { |
---|
| 889 | dest = _name; |
---|
| 890 | |
---|
| 891 | #ifdef POSITION |
---|
| 892 | _component->interface_map (src ,"retire_event_"+toString(i)+"_"+toString(j), |
---|
| 893 | dest,"retire_event_"+toString(i)+"_"+toString(j)); |
---|
| 894 | #endif |
---|
| 895 | |
---|
| 896 | PORT_MAP(_component,src , "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_VAL", |
---|
| 897 | dest, "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_VAL"); |
---|
| 898 | PORT_MAP(_component,src ,"out_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_ACK", |
---|
| 899 | dest,"out_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_ACK"); |
---|
| 900 | |
---|
| 901 | // out_RETIRE_EVENT_LOAD_STORE_QUEUE_POINTER_VAL - load_store_pointer_unit |
---|
| 902 | // in_RETIRE_EVENT_LOAD_STORE_QUEUE_POINTER_ACK - load_store_pointer_unit |
---|
| 903 | // out_RETIRE_EVENT_REGISTER_TRANSLATION_VAL - register_translation_unit |
---|
| 904 | // in_RETIRE_EVENT_REGISTER_TRANSLATION_ACK - register_translation_unit |
---|
| 905 | } |
---|
| 906 | |
---|
| 907 | |
---|
| 908 | for (uint32_t i=0; i<_param->_nb_front_end; i++) |
---|
[88] | 909 | for (uint32_t j=0; j<_param->_nb_context[i]; j++) |
---|
| 910 | { |
---|
| 911 | dest = _name; |
---|
| 912 | #ifdef POSITION |
---|
| 913 | _component->interface_map (src ,"spr_read_"+toString(i)+"_"+toString(j), |
---|
| 914 | dest,"spr_read_"+toString(i)+"_"+toString(j)); |
---|
| 915 | #endif |
---|
| 916 | |
---|
| 917 | PORT_MAP(_component,src , "in_SPR_READ_"+toString(i)+"_"+toString(j)+"_SR", |
---|
| 918 | dest, "in_SPR_READ_"+toString(i)+"_"+toString(j)+"_SR"); |
---|
| 919 | } |
---|
| 920 | } |
---|
| 921 | |
---|
| 922 | // ~~~~~[ Others ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 923 | #if DEBUG_Rename_unit == true |
---|
| 924 | _component->test_map(); |
---|
| 925 | #endif |
---|
| 926 | |
---|
| 927 | #ifdef POSITION |
---|
| 928 | if (usage_is_set(_usage,USE_POSITION)) |
---|
| 929 | _component->generate_file(); |
---|
| 930 | #endif |
---|
| 931 | |
---|
| 932 | log_end(Rename_unit,FUNCTION); |
---|
| 933 | }; |
---|
| 934 | |
---|
| 935 | }; // end namespace rename_unit |
---|
| 936 | }; // end namespace ooo_engine |
---|
| 937 | }; // end namespace multi_ooo_engine |
---|
| 938 | }; // end namespace core |
---|
| 939 | |
---|
| 940 | }; // end namespace behavioural |
---|
| 941 | }; // end namespace morpheo |
---|