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