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