[76] | 1 | /* |
---|
[97] | 2 | * $id: Read_unit_allocation.cpp 88 2008-12-10 18:31:39Z rosiere $ |
---|
[76] | 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/include/Read_unit.h" |
---|
| 9 | #include "Behavioural/include/Allocation.h" |
---|
| 10 | |
---|
| 11 | namespace morpheo { |
---|
| 12 | namespace behavioural { |
---|
| 13 | namespace core { |
---|
| 14 | namespace multi_execute_loop { |
---|
| 15 | namespace execute_loop { |
---|
| 16 | namespace multi_read_unit { |
---|
| 17 | namespace read_unit { |
---|
| 18 | |
---|
| 19 | |
---|
| 20 | |
---|
| 21 | #undef FUNCTION |
---|
| 22 | #define FUNCTION "Read_unit::allocation" |
---|
| 23 | void Read_unit::allocation ( |
---|
| 24 | #ifdef STATISTICS |
---|
| 25 | morpheo::behavioural::Parameters_Statistics * param_statistics |
---|
| 26 | #else |
---|
| 27 | void |
---|
| 28 | #endif |
---|
| 29 | ) |
---|
| 30 | { |
---|
| 31 | log_printf(FUNC,Read_unit,FUNCTION,"Begin"); |
---|
| 32 | |
---|
| 33 | _component = new Component (_usage); |
---|
| 34 | |
---|
| 35 | Entity * entity = _component->set_entity (_name |
---|
| 36 | ,"Read_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, |
---|
[88] | 50 | _("Generalist interface") |
---|
[76] | 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 | // ~~~~~[ Interface "read_unit_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 58 | { |
---|
[88] | 59 | ALLOC_INTERFACE("read_unit_in", IN, WEST, _("Enter of new operation")); |
---|
[76] | 60 | |
---|
[78] | 61 | ALLOC_VALACK_IN ( in_READ_UNIT_IN_VAL,VAL); |
---|
| 62 | ALLOC_VALACK_OUT (out_READ_UNIT_IN_ACK,ACK); |
---|
[76] | 63 | ALLOC_SIGNAL_IN ( in_READ_UNIT_IN_CONTEXT_ID ,"context_id" ,Tcontext_t ,_param->_size_context_id ); |
---|
| 64 | ALLOC_SIGNAL_IN ( in_READ_UNIT_IN_FRONT_END_ID ,"front_end_id" ,Tcontext_t ,_param->_size_front_end_id ); |
---|
| 65 | ALLOC_SIGNAL_IN ( in_READ_UNIT_IN_OOO_ENGINE_ID ,"ooo_engine_id" ,Tcontext_t ,_param->_size_ooo_engine_id); |
---|
[88] | 66 | ALLOC_SIGNAL_IN ( in_READ_UNIT_IN_PACKET_ID ,"packet_id" ,Tpacket_t ,_param->_size_rob_ptr ); |
---|
[76] | 67 | ALLOC_SIGNAL_IN ( in_READ_UNIT_IN_OPERATION ,"operation" ,Toperation_t ,_param->_size_operation ); |
---|
| 68 | ALLOC_SIGNAL_IN ( in_READ_UNIT_IN_TYPE ,"type" ,Ttype_t ,_param->_size_type ); |
---|
[88] | 69 | ALLOC_SIGNAL_IN ( in_READ_UNIT_IN_STORE_QUEUE_PTR_WRITE,"store_queue_ptr_write",Tlsq_ptr_t ,_param->_size_store_queue_ptr); |
---|
| 70 | ALLOC_SIGNAL_IN ( in_READ_UNIT_IN_LOAD_QUEUE_PTR_WRITE ,"load_queue_ptr_write" ,Tlsq_ptr_t ,_param->_size_load_queue_ptr); |
---|
[76] | 71 | ALLOC_SIGNAL_IN ( in_READ_UNIT_IN_HAS_IMMEDIAT ,"has_immediat" ,Tcontrol_t ,1); |
---|
| 72 | ALLOC_SIGNAL_IN ( in_READ_UNIT_IN_IMMEDIAT ,"immediat" ,Tgeneral_data_t ,_param->_size_general_data); |
---|
| 73 | ALLOC_SIGNAL_IN ( in_READ_UNIT_IN_READ_RA ,"read_ra" ,Tcontrol_t ,1); |
---|
| 74 | ALLOC_SIGNAL_IN ( in_READ_UNIT_IN_NUM_REG_RA ,"num_reg_ra" ,Tgeneral_address_t,_param->_size_general_register); |
---|
| 75 | ALLOC_SIGNAL_IN ( in_READ_UNIT_IN_READ_RB ,"read_rb" ,Tcontrol_t ,1); |
---|
| 76 | ALLOC_SIGNAL_IN ( in_READ_UNIT_IN_NUM_REG_RB ,"num_reg_rb" ,Tgeneral_address_t,_param->_size_general_register); |
---|
| 77 | ALLOC_SIGNAL_IN ( in_READ_UNIT_IN_READ_RC ,"read_rc" ,Tcontrol_t ,1); |
---|
| 78 | ALLOC_SIGNAL_IN ( in_READ_UNIT_IN_NUM_REG_RC ,"num_reg_rc" ,Tspecial_address_t,_param->_size_special_register); |
---|
| 79 | ALLOC_SIGNAL_IN ( in_READ_UNIT_IN_WRITE_RD ,"write_rd" ,Tcontrol_t ,1); |
---|
| 80 | ALLOC_SIGNAL_IN ( in_READ_UNIT_IN_NUM_REG_RD ,"num_reg_rd" ,Tgeneral_address_t,_param->_size_general_register); |
---|
| 81 | ALLOC_SIGNAL_IN ( in_READ_UNIT_IN_WRITE_RE ,"write_re" ,Tcontrol_t ,1); |
---|
| 82 | ALLOC_SIGNAL_IN ( in_READ_UNIT_IN_NUM_REG_RE ,"num_reg_re" ,Tspecial_address_t,_param->_size_special_register); |
---|
| 83 | } |
---|
| 84 | |
---|
| 85 | // ~~~~~[ Interface "read_unit_out" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 86 | { |
---|
[88] | 87 | ALLOC1_INTERFACE("read_unit_out", OUT, EAST, _("Output of operation. All operand is valid."), _param->_nb_inst_retire); |
---|
[76] | 88 | |
---|
[78] | 89 | ALLOC1_VALACK_OUT (out_READ_UNIT_OUT_VAL,VAL); |
---|
| 90 | ALLOC1_VALACK_IN ( in_READ_UNIT_OUT_ACK,ACK); |
---|
[76] | 91 | ALLOC1_SIGNAL_OUT(out_READ_UNIT_OUT_CONTEXT_ID ,"context_id" ,Tcontext_t ,_param->_size_context_id ); |
---|
| 92 | ALLOC1_SIGNAL_OUT(out_READ_UNIT_OUT_FRONT_END_ID ,"front_end_id" ,Tcontext_t ,_param->_size_front_end_id ); |
---|
| 93 | ALLOC1_SIGNAL_OUT(out_READ_UNIT_OUT_OOO_ENGINE_ID ,"ooo_engine_id" ,Tcontext_t ,_param->_size_ooo_engine_id ); |
---|
[88] | 94 | ALLOC1_SIGNAL_OUT(out_READ_UNIT_OUT_PACKET_ID ,"packet_id" ,Tpacket_t ,_param->_size_rob_ptr ); |
---|
[76] | 95 | ALLOC1_SIGNAL_OUT(out_READ_UNIT_OUT_OPERATION ,"operation" ,Toperation_t ,_param->_size_operation ); |
---|
| 96 | ALLOC1_SIGNAL_OUT(out_READ_UNIT_OUT_TYPE ,"type" ,Ttype_t ,_param->_size_type ); |
---|
[88] | 97 | ALLOC1_SIGNAL_OUT(out_READ_UNIT_OUT_STORE_QUEUE_PTR_WRITE,"store_queue_ptr_write",Tlsq_ptr_t ,_param->_size_store_queue_ptr); |
---|
| 98 | ALLOC1_SIGNAL_OUT(out_READ_UNIT_OUT_LOAD_QUEUE_PTR_WRITE ,"load_queue_ptr_write" ,Tlsq_ptr_t ,_param->_size_load_queue_ptr); |
---|
[76] | 99 | ALLOC1_SIGNAL_OUT(out_READ_UNIT_OUT_HAS_IMMEDIAT ,"has_immediat" ,Tcontrol_t ,1 ); |
---|
| 100 | ALLOC1_SIGNAL_OUT(out_READ_UNIT_OUT_IMMEDIAT ,"immediat" ,Tgeneral_data_t ,_param->_size_general_data ); |
---|
| 101 | ALLOC1_SIGNAL_OUT(out_READ_UNIT_OUT_DATA_RA ,"data_ra" ,Tgeneral_data_t ,_param->_size_general_data ); |
---|
| 102 | ALLOC1_SIGNAL_OUT(out_READ_UNIT_OUT_DATA_RB ,"data_rb" ,Tgeneral_data_t ,_param->_size_general_data ); |
---|
| 103 | ALLOC1_SIGNAL_OUT(out_READ_UNIT_OUT_DATA_RC ,"data_rc" ,Tspecial_data_t ,_param->_size_special_data ); |
---|
| 104 | ALLOC1_SIGNAL_OUT(out_READ_UNIT_OUT_WRITE_RD ,"write_rd" ,Tcontrol_t ,1 ); |
---|
| 105 | ALLOC1_SIGNAL_OUT(out_READ_UNIT_OUT_NUM_REG_RD ,"num_reg_rd" ,Tgeneral_address_t,_param->_size_general_register); |
---|
| 106 | ALLOC1_SIGNAL_OUT(out_READ_UNIT_OUT_WRITE_RE ,"write_re" ,Tcontrol_t ,1 ); |
---|
| 107 | ALLOC1_SIGNAL_OUT(out_READ_UNIT_OUT_NUM_REG_RE ,"num_reg_re" ,Tspecial_address_t,_param->_size_special_register); |
---|
| 108 | } |
---|
| 109 | |
---|
| 110 | // ~~~~~[ Interface "gpr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 111 | { |
---|
[88] | 112 | ALLOC1_INTERFACE("gpr_read", OUT, SOUTH, _("Read port."), _param->_nb_gpr_read); |
---|
[76] | 113 | |
---|
[78] | 114 | ALLOC1_VALACK_OUT (out_GPR_READ_VAL,VAL); |
---|
| 115 | ALLOC1_VALACK_IN ( in_GPR_READ_ACK,ACK); |
---|
[76] | 116 | ALLOC1_SIGNAL_OUT(out_GPR_READ_OOO_ENGINE_ID,"ooo_engine_id",Tcontext_t ,_param->_size_ooo_engine_id ); |
---|
[97] | 117 | ALLOC1_SIGNAL_OUT(out_GPR_READ_NUM_REG ,"num_reg" ,Tgeneral_address_t,_param->_size_general_register); |
---|
| 118 | ALLOC1_SIGNAL_IN ( in_GPR_READ_DATA ,"data" ,Tgeneral_data_t ,_param->_size_general_data ); |
---|
[76] | 119 | ALLOC1_SIGNAL_IN ( in_GPR_READ_DATA_VAL ,"data_val" ,Tcontrol_t ,1); |
---|
| 120 | } |
---|
| 121 | |
---|
| 122 | // ~~~~~[ Interface "spr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 123 | { |
---|
[88] | 124 | ALLOC1_INTERFACE("spr_read", OUT, SOUTH, _("Read port."), _param->_nb_spr_read); |
---|
[76] | 125 | |
---|
[78] | 126 | ALLOC1_VALACK_OUT (out_SPR_READ_VAL,VAL); |
---|
| 127 | ALLOC1_VALACK_IN ( in_SPR_READ_ACK,ACK); |
---|
[76] | 128 | ALLOC1_SIGNAL_OUT(out_SPR_READ_OOO_ENGINE_ID,"ooo_engine_id",Tcontext_t ,_param->_size_ooo_engine_id ); |
---|
[97] | 129 | ALLOC1_SIGNAL_OUT(out_SPR_READ_NUM_REG ,"num_reg" ,Tspecial_address_t,_param->_size_special_register); |
---|
| 130 | ALLOC1_SIGNAL_IN ( in_SPR_READ_DATA ,"data" ,Tspecial_data_t ,_param->_size_special_data ); |
---|
[76] | 131 | ALLOC1_SIGNAL_IN ( in_SPR_READ_DATA_VAL ,"data_val" ,Tcontrol_t ,1); |
---|
| 132 | } |
---|
| 133 | |
---|
| 134 | // ~~~~~[ Interface "gpr_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 135 | { |
---|
[88] | 136 | ALLOC1_INTERFACE("gpr_write", IN , SOUTH, _("Write port."), _param->_nb_gpr_write); |
---|
[76] | 137 | |
---|
[78] | 138 | ALLOC1_VALACK_IN ( in_GPR_WRITE_VAL,VAL); |
---|
[76] | 139 | ALLOC1_SIGNAL_IN ( in_GPR_WRITE_OOO_ENGINE_ID,"ooo_engine_id",Tcontext_t ,_param->_size_ooo_engine_id ); |
---|
[97] | 140 | ALLOC1_SIGNAL_IN ( in_GPR_WRITE_NUM_REG ,"num_reg" ,Tgeneral_address_t,_param->_size_general_register); |
---|
| 141 | ALLOC1_SIGNAL_IN ( in_GPR_WRITE_DATA ,"data" ,Tgeneral_data_t ,_param->_size_general_data); |
---|
[76] | 142 | } |
---|
| 143 | |
---|
| 144 | // ~~~~~[ Interface "spr_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 145 | { |
---|
[88] | 146 | ALLOC1_INTERFACE("spr_write", IN , SOUTH, _("Write port."), _param->_nb_spr_write); |
---|
[76] | 147 | |
---|
[78] | 148 | ALLOC1_VALACK_IN ( in_SPR_WRITE_VAL,VAL); |
---|
[76] | 149 | ALLOC1_SIGNAL_IN ( in_SPR_WRITE_OOO_ENGINE_ID,"ooo_engine_id",Tcontext_t ,_param->_size_ooo_engine_id ); |
---|
[97] | 150 | ALLOC1_SIGNAL_IN ( in_SPR_WRITE_NUM_REG ,"num_reg" ,Tspecial_address_t,_param->_size_special_register); |
---|
| 151 | ALLOC1_SIGNAL_IN ( in_SPR_WRITE_DATA ,"data" ,Tspecial_data_t ,_param->_size_special_data); |
---|
[76] | 152 | } |
---|
| 153 | |
---|
| 154 | // ~~~~~[ Interface "bypass_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 155 | { |
---|
[88] | 156 | ALLOC1_INTERFACE("bypass_write", IN , NORTH, _("Output of write_queue."), _param->_nb_bypass_write); |
---|
[76] | 157 | |
---|
| 158 | ALLOC1_SIGNAL_IN ( in_BYPASS_WRITE_OOO_ENGINE_ID,"ooo_engine_id",Tcontext_t ,_param->_size_ooo_engine_id ); |
---|
| 159 | ALLOC1_SIGNAL_IN ( in_BYPASS_WRITE_GPR_VAL ,"gpr_val" ,Tcontrol_t ,1); |
---|
[97] | 160 | ALLOC1_SIGNAL_IN ( in_BYPASS_WRITE_GPR_NUM_REG ,"gpr_num_reg" ,Tgeneral_address_t,_param->_size_general_register); |
---|
| 161 | ALLOC1_SIGNAL_IN ( in_BYPASS_WRITE_GPR_DATA ,"gpr_data" ,Tgeneral_data_t ,_param->_size_general_data ); |
---|
[76] | 162 | ALLOC1_SIGNAL_IN ( in_BYPASS_WRITE_SPR_VAL ,"spr_val" ,Tcontrol_t ,1); |
---|
[97] | 163 | ALLOC1_SIGNAL_IN ( in_BYPASS_WRITE_SPR_NUM_REG ,"spr_num_reg" ,Tspecial_address_t,_param->_size_special_register); |
---|
| 164 | ALLOC1_SIGNAL_IN ( in_BYPASS_WRITE_SPR_DATA ,"spr_data" ,Tspecial_data_t ,_param->_size_special_data ); |
---|
[76] | 165 | } |
---|
| 166 | |
---|
| 167 | // ~~~~~[ Interface "bypass_memory" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 168 | { |
---|
[88] | 169 | ALLOC1_INTERFACE("bypass_memory", IN , NORTH, _("Output of write_queue."), _param->_nb_bypass_memory); |
---|
[76] | 170 | |
---|
| 171 | ALLOC1_SIGNAL_IN ( in_BYPASS_MEMORY_VAL ,"val" ,Tcontrol_t ,1); |
---|
| 172 | ALLOC1_SIGNAL_IN ( in_BYPASS_MEMORY_OOO_ENGINE_ID,"ooo_engine_id",Tcontext_t ,_param->_size_ooo_engine_id ); |
---|
[97] | 173 | ALLOC1_SIGNAL_IN ( in_BYPASS_MEMORY_NUM_REG ,"num_reg" ,Tgeneral_address_t,_param->_size_general_register); |
---|
| 174 | ALLOC1_SIGNAL_IN ( in_BYPASS_MEMORY_DATA ,"data" ,Tgeneral_data_t ,_param->_size_general_data ); |
---|
[76] | 175 | } |
---|
| 176 | |
---|
| 177 | // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 178 | |
---|
| 179 | std::string name; |
---|
| 180 | |
---|
| 181 | { |
---|
| 182 | name = _name+"_read_queue"; |
---|
[88] | 183 | log_printf(INFO,Core,FUNCTION,_("Create : %s"),name.c_str()); |
---|
[76] | 184 | |
---|
[82] | 185 | _component_read_queue = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::read_queue::Read_queue |
---|
| 186 | (name.c_str() |
---|
[76] | 187 | #ifdef STATISTICS |
---|
[82] | 188 | ,param_statistics |
---|
[76] | 189 | #endif |
---|
[82] | 190 | ,_param->_param_read_queue |
---|
| 191 | ,_usage); |
---|
[76] | 192 | |
---|
| 193 | _component->set_component (_component_read_queue->_component |
---|
| 194 | #ifdef POSITION |
---|
| 195 | , 50, 50, 10, 10 |
---|
| 196 | #endif |
---|
| 197 | ); |
---|
| 198 | } |
---|
| 199 | { |
---|
| 200 | name = _name+"_reservation_station"; |
---|
[88] | 201 | log_printf(INFO,Core,FUNCTION,_("Create : %s"),name.c_str()); |
---|
| 202 | |
---|
[82] | 203 | _component_reservation_station = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_read_unit::read_unit::reservation_station::Reservation_station |
---|
| 204 | (name.c_str() |
---|
[76] | 205 | #ifdef STATISTICS |
---|
[82] | 206 | ,param_statistics |
---|
[76] | 207 | #endif |
---|
[82] | 208 | ,_param->_param_reservation_station |
---|
| 209 | ,_usage); |
---|
[76] | 210 | |
---|
| 211 | _component->set_component (_component_reservation_station->_component |
---|
| 212 | #ifdef POSITION |
---|
| 213 | , 50, 50, 10, 10 |
---|
| 214 | #endif |
---|
| 215 | ); |
---|
| 216 | } |
---|
| 217 | |
---|
| 218 | // ~~~~~[ Instanciation ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 219 | { |
---|
| 220 | name = _name+"_read_queue"; |
---|
[88] | 221 | log_printf(INFO,Core,FUNCTION,_("Instance : %s"),name.c_str()); |
---|
| 222 | |
---|
[76] | 223 | { |
---|
| 224 | #ifdef POSITION |
---|
| 225 | _component->interface_map (name ,"", |
---|
| 226 | _name,""); |
---|
| 227 | #endif |
---|
| 228 | |
---|
| 229 | _component->port_map(name,"in_CLOCK" , _name, "in_CLOCK"); |
---|
| 230 | _component->port_map(name,"in_NRESET", _name, "in_NRESET"); |
---|
| 231 | } |
---|
| 232 | |
---|
| 233 | // ~~~~~[ Interface "read_queue_in" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 234 | { |
---|
| 235 | std::string dest = _name; |
---|
| 236 | #ifdef POSITION |
---|
| 237 | _component->interface_map (name,"read_queue_in", |
---|
| 238 | dest,"read_unit_in"); |
---|
| 239 | #endif |
---|
| 240 | |
---|
| 241 | _component->port_map(name, "in_READ_QUEUE_IN_VAL" ,dest, "in_READ_UNIT_IN_VAL" ); |
---|
| 242 | _component->port_map(name,"out_READ_QUEUE_IN_ACK" ,dest,"out_READ_UNIT_IN_ACK" ); |
---|
| 243 | if (_param->_have_port_context_id) |
---|
| 244 | _component->port_map(name, "in_READ_QUEUE_IN_CONTEXT_ID" ,dest, "in_READ_UNIT_IN_CONTEXT_ID" ); |
---|
| 245 | if (_param->_have_port_front_end_id) |
---|
| 246 | _component->port_map(name, "in_READ_QUEUE_IN_FRONT_END_ID" ,dest, "in_READ_UNIT_IN_FRONT_END_ID" ); |
---|
| 247 | if (_param->_have_port_ooo_engine_id) |
---|
| 248 | _component->port_map(name, "in_READ_QUEUE_IN_OOO_ENGINE_ID" ,dest, "in_READ_UNIT_IN_OOO_ENGINE_ID" ); |
---|
[88] | 249 | if (_param->_have_port_rob_ptr) |
---|
[76] | 250 | _component->port_map(name, "in_READ_QUEUE_IN_ROB_ID" ,dest, "in_READ_UNIT_IN_PACKET_ID" ); |
---|
| 251 | _component->port_map(name, "in_READ_QUEUE_IN_OPERATION" ,dest, "in_READ_UNIT_IN_OPERATION" ); |
---|
| 252 | _component->port_map(name, "in_READ_QUEUE_IN_TYPE" ,dest, "in_READ_UNIT_IN_TYPE" ); |
---|
| 253 | _component->port_map(name, "in_READ_QUEUE_IN_STORE_QUEUE_PTR_WRITE",dest, "in_READ_UNIT_IN_STORE_QUEUE_PTR_WRITE"); |
---|
[78] | 254 | if (_param->_have_port_load_queue_ptr) |
---|
[76] | 255 | _component->port_map(name, "in_READ_QUEUE_IN_LOAD_QUEUE_PTR_WRITE" ,dest, "in_READ_UNIT_IN_LOAD_QUEUE_PTR_WRITE" ); |
---|
| 256 | _component->port_map(name, "in_READ_QUEUE_IN_HAS_IMMEDIAT" ,dest, "in_READ_UNIT_IN_HAS_IMMEDIAT" ); |
---|
| 257 | _component->port_map(name, "in_READ_QUEUE_IN_IMMEDIAT" ,dest, "in_READ_UNIT_IN_IMMEDIAT" ); |
---|
| 258 | _component->port_map(name, "in_READ_QUEUE_IN_READ_RA" ,dest, "in_READ_UNIT_IN_READ_RA" ); |
---|
| 259 | _component->port_map(name, "in_READ_QUEUE_IN_NUM_REG_RA" ,dest, "in_READ_UNIT_IN_NUM_REG_RA" ); |
---|
| 260 | _component->port_map(name, "in_READ_QUEUE_IN_READ_RB" ,dest, "in_READ_UNIT_IN_READ_RB" ); |
---|
| 261 | _component->port_map(name, "in_READ_QUEUE_IN_NUM_REG_RB" ,dest, "in_READ_UNIT_IN_NUM_REG_RB" ); |
---|
| 262 | _component->port_map(name, "in_READ_QUEUE_IN_READ_RC" ,dest, "in_READ_UNIT_IN_READ_RC" ); |
---|
| 263 | _component->port_map(name, "in_READ_QUEUE_IN_NUM_REG_RC" ,dest, "in_READ_UNIT_IN_NUM_REG_RC" ); |
---|
| 264 | _component->port_map(name, "in_READ_QUEUE_IN_WRITE_RD" ,dest, "in_READ_UNIT_IN_WRITE_RD" ); |
---|
| 265 | _component->port_map(name, "in_READ_QUEUE_IN_NUM_REG_RD" ,dest, "in_READ_UNIT_IN_NUM_REG_RD" ); |
---|
| 266 | _component->port_map(name, "in_READ_QUEUE_IN_WRITE_RE" ,dest, "in_READ_UNIT_IN_WRITE_RE" ); |
---|
| 267 | _component->port_map(name, "in_READ_QUEUE_IN_NUM_REG_RE" ,dest, "in_READ_UNIT_IN_NUM_REG_RE" ); |
---|
| 268 | } |
---|
| 269 | // ~~~~~[ Interface "read_queue_out" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 270 | { |
---|
| 271 | std::string dest = _name+"_reservation_station"; |
---|
| 272 | |
---|
| 273 | #ifdef POSITION |
---|
| 274 | _component->interface_map (name,"read_queue_in", |
---|
| 275 | dest,"insert"); |
---|
| 276 | #endif |
---|
| 277 | |
---|
| 278 | _component->port_map(name,"out_READ_QUEUE_OUT_VAL" ,dest, "in_INSERT_VAL" ); |
---|
| 279 | _component->port_map(name, "in_READ_QUEUE_OUT_ACK" ,dest,"out_INSERT_ACK" ); |
---|
| 280 | if (_param->_have_port_context_id) |
---|
| 281 | _component->port_map(name,"out_READ_QUEUE_OUT_CONTEXT_ID" ,dest, "in_INSERT_CONTEXT_ID" ); |
---|
| 282 | if (_param->_have_port_front_end_id) |
---|
| 283 | _component->port_map(name,"out_READ_QUEUE_OUT_FRONT_END_ID" ,dest, "in_INSERT_FRONT_END_ID" ); |
---|
| 284 | if (_param->_have_port_ooo_engine_id) |
---|
| 285 | _component->port_map(name,"out_READ_QUEUE_OUT_OOO_ENGINE_ID" ,dest, "in_INSERT_OOO_ENGINE_ID" ); |
---|
[88] | 286 | if (_param->_have_port_rob_ptr) |
---|
[76] | 287 | _component->port_map(name,"out_READ_QUEUE_OUT_ROB_ID" ,dest, "in_INSERT_ROB_ID" ); |
---|
| 288 | _component->port_map(name,"out_READ_QUEUE_OUT_OPERATION" ,dest, "in_INSERT_OPERATION" ); |
---|
| 289 | _component->port_map(name,"out_READ_QUEUE_OUT_TYPE" ,dest, "in_INSERT_TYPE" ); |
---|
| 290 | _component->port_map(name,"out_READ_QUEUE_OUT_STORE_QUEUE_PTR_WRITE",dest, "in_INSERT_STORE_QUEUE_PTR_WRITE"); |
---|
[78] | 291 | if (_param->_have_port_load_queue_ptr) |
---|
[76] | 292 | _component->port_map(name,"out_READ_QUEUE_OUT_LOAD_QUEUE_PTR_WRITE" ,dest, "in_INSERT_LOAD_QUEUE_PTR_WRITE" ); |
---|
| 293 | _component->port_map(name,"out_READ_QUEUE_OUT_HAS_IMMEDIAT" ,dest, "in_INSERT_HAS_IMMEDIAT" ); |
---|
| 294 | _component->port_map(name,"out_READ_QUEUE_OUT_IMMEDIAT" ,dest, "in_INSERT_IMMEDIAT" ); |
---|
| 295 | // _component->port_map(name,"out_READ_QUEUE_OUT_READ_RA" ,dest, "in_INSERT_READ_RA" ); |
---|
| 296 | _component->port_map(name,"out_READ_QUEUE_OUT_NUM_REG_RA" ,dest, "in_INSERT_NUM_REG_RA" ); |
---|
| 297 | _component->port_map(name,"out_READ_QUEUE_OUT_DATA_RA_VAL" ,dest, "in_INSERT_DATA_RA_VAL" ); |
---|
| 298 | _component->port_map(name,"out_READ_QUEUE_OUT_DATA_RA" ,dest, "in_INSERT_DATA_RA" ); |
---|
| 299 | // _component->port_map(name,"out_READ_QUEUE_OUT_READ_RB" ,dest, "in_INSERT_READ_RB" ); |
---|
| 300 | _component->port_map(name,"out_READ_QUEUE_OUT_NUM_REG_RB" ,dest, "in_INSERT_NUM_REG_RB" ); |
---|
| 301 | _component->port_map(name,"out_READ_QUEUE_OUT_DATA_RB_VAL" ,dest, "in_INSERT_DATA_RB_VAL" ); |
---|
| 302 | _component->port_map(name,"out_READ_QUEUE_OUT_DATA_RB" ,dest, "in_INSERT_DATA_RB" ); |
---|
| 303 | // _component->port_map(name,"out_READ_QUEUE_OUT_READ_RC" ,dest, "in_INSERT_READ_RC" ); |
---|
| 304 | _component->port_map(name,"out_READ_QUEUE_OUT_NUM_REG_RC" ,dest, "in_INSERT_NUM_REG_RC" ); |
---|
| 305 | _component->port_map(name,"out_READ_QUEUE_OUT_DATA_RC_VAL" ,dest, "in_INSERT_DATA_RC_VAL" ); |
---|
| 306 | _component->port_map(name,"out_READ_QUEUE_OUT_DATA_RC" ,dest, "in_INSERT_DATA_RC" ); |
---|
| 307 | _component->port_map(name,"out_READ_QUEUE_OUT_WRITE_RD" ,dest, "in_INSERT_WRITE_RD" ); |
---|
| 308 | _component->port_map(name,"out_READ_QUEUE_OUT_NUM_REG_RD" ,dest, "in_INSERT_NUM_REG_RD" ); |
---|
| 309 | _component->port_map(name,"out_READ_QUEUE_OUT_WRITE_RE" ,dest, "in_INSERT_WRITE_RE" ); |
---|
| 310 | _component->port_map(name,"out_READ_QUEUE_OUT_NUM_REG_RE" ,dest, "in_INSERT_NUM_REG_RE" ); |
---|
| 311 | } |
---|
| 312 | // ~~~~~[ Interface "gpr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 313 | for (uint32_t i=0; i<_param->_nb_gpr_read; i++) |
---|
| 314 | { |
---|
| 315 | std::string dest = _name; |
---|
| 316 | #ifdef POSITION |
---|
| 317 | _component->interface_map (name,"gpr_read_"+toString(i), |
---|
| 318 | dest,"gpr_read_"+toString(i)); |
---|
| 319 | #endif |
---|
| 320 | |
---|
| 321 | _component->port_map(name,"out_GPR_READ_"+toString(i)+"_VAL" ,dest,"out_GPR_READ_"+toString(i)+"_VAL" ); |
---|
| 322 | _component->port_map(name, "in_GPR_READ_"+toString(i)+"_ACK" ,dest, "in_GPR_READ_"+toString(i)+"_ACK" ); |
---|
| 323 | if (_param->_have_port_ooo_engine_id) |
---|
| 324 | _component->port_map(name,"out_GPR_READ_"+toString(i)+"_OOO_ENGINE_ID",dest,"out_GPR_READ_"+toString(i)+"_OOO_ENGINE_ID"); |
---|
| 325 | _component->port_map(name,"out_GPR_READ_"+toString(i)+"_NUM_REG" ,dest,"out_GPR_READ_"+toString(i)+"_NUM_REG" ); |
---|
| 326 | _component->port_map(name, "in_GPR_READ_"+toString(i)+"_DATA" ,dest, "in_GPR_READ_"+toString(i)+"_DATA" ); |
---|
| 327 | _component->port_map(name, "in_GPR_READ_"+toString(i)+"_DATA_VAL" ,dest, "in_GPR_READ_"+toString(i)+"_DATA_VAL" ); |
---|
| 328 | } |
---|
| 329 | |
---|
| 330 | // ~~~~~[ Interface "spr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 331 | for (uint32_t i=0; i<_param->_nb_spr_read; i++) |
---|
| 332 | { |
---|
| 333 | std::string dest = _name; |
---|
| 334 | #ifdef POSITION |
---|
| 335 | _component->interface_map (name,"spr_read_"+toString(i), |
---|
| 336 | dest,"spr_read_"+toString(i)); |
---|
| 337 | #endif |
---|
| 338 | |
---|
| 339 | _component->port_map(name,"out_SPR_READ_"+toString(i)+"_VAL" ,dest,"out_SPR_READ_"+toString(i)+"_VAL" ); |
---|
| 340 | _component->port_map(name, "in_SPR_READ_"+toString(i)+"_ACK" ,dest, "in_SPR_READ_"+toString(i)+"_ACK" ); |
---|
| 341 | if (_param->_have_port_ooo_engine_id) |
---|
| 342 | _component->port_map(name,"out_SPR_READ_"+toString(i)+"_OOO_ENGINE_ID",dest,"out_SPR_READ_"+toString(i)+"_OOO_ENGINE_ID"); |
---|
| 343 | _component->port_map(name,"out_SPR_READ_"+toString(i)+"_NUM_REG" ,dest,"out_SPR_READ_"+toString(i)+"_NUM_REG" ); |
---|
| 344 | _component->port_map(name, "in_SPR_READ_"+toString(i)+"_DATA" ,dest, "in_SPR_READ_"+toString(i)+"_DATA" ); |
---|
| 345 | _component->port_map(name, "in_SPR_READ_"+toString(i)+"_DATA_VAL" ,dest, "in_SPR_READ_"+toString(i)+"_DATA_VAL" ); |
---|
| 346 | } |
---|
| 347 | |
---|
| 348 | // ~~~~~[ Interface "gpr_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 349 | for (uint32_t i=0; i<_param->_nb_gpr_write; i++) |
---|
| 350 | { |
---|
| 351 | std::string dest = _name; |
---|
| 352 | #ifdef POSITION |
---|
| 353 | _component->interface_map (name,"gpr_write_"+toString(i), |
---|
| 354 | dest,"gpr_write_"+toString(i)); |
---|
| 355 | #endif |
---|
| 356 | |
---|
| 357 | _component->port_map(name, "in_GPR_WRITE_"+toString(i)+"_VAL" ,dest, "in_GPR_WRITE_"+toString(i)+"_VAL" ); |
---|
| 358 | if (_param->_have_port_ooo_engine_id) |
---|
| 359 | _component->port_map(name, "in_GPR_WRITE_"+toString(i)+"_OOO_ENGINE_ID",dest, "in_GPR_WRITE_"+toString(i)+"_OOO_ENGINE_ID"); |
---|
| 360 | _component->port_map(name, "in_GPR_WRITE_"+toString(i)+"_NUM_REG" ,dest, "in_GPR_WRITE_"+toString(i)+"_NUM_REG" ); |
---|
| 361 | _component->port_map(name, "in_GPR_WRITE_"+toString(i)+"_DATA" ,dest, "in_GPR_WRITE_"+toString(i)+"_DATA" ); |
---|
| 362 | } |
---|
| 363 | // ~~~~~[ Interface "spr_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 364 | for (uint32_t i=0; i<_param->_nb_spr_write; i++) |
---|
| 365 | { |
---|
| 366 | std::string dest = _name; |
---|
| 367 | #ifdef POSITION |
---|
| 368 | _component->interface_map (name,"spr_write_"+toString(i), |
---|
| 369 | dest,"spr_write_"+toString(i)); |
---|
| 370 | #endif |
---|
| 371 | |
---|
| 372 | _component->port_map(name, "in_SPR_WRITE_"+toString(i)+"_VAL" ,dest, "in_SPR_WRITE_"+toString(i)+"_VAL" ); |
---|
| 373 | if (_param->_have_port_ooo_engine_id) |
---|
| 374 | _component->port_map(name, "in_SPR_WRITE_"+toString(i)+"_OOO_ENGINE_ID",dest, "in_SPR_WRITE_"+toString(i)+"_OOO_ENGINE_ID"); |
---|
| 375 | _component->port_map(name, "in_SPR_WRITE_"+toString(i)+"_NUM_REG" ,dest, "in_SPR_WRITE_"+toString(i)+"_NUM_REG" ); |
---|
| 376 | _component->port_map(name, "in_SPR_WRITE_"+toString(i)+"_DATA" ,dest, "in_SPR_WRITE_"+toString(i)+"_DATA" ); |
---|
| 377 | } |
---|
| 378 | } |
---|
| 379 | |
---|
| 380 | { |
---|
| 381 | name = _name+"_reservation_station"; |
---|
[88] | 382 | log_printf(INFO,Core,FUNCTION,_("Instance : %s"),name.c_str()); |
---|
[76] | 383 | { |
---|
| 384 | #ifdef POSITION |
---|
| 385 | _component->interface_map (name ,"", |
---|
| 386 | _name,""); |
---|
| 387 | #endif |
---|
| 388 | |
---|
| 389 | _component->port_map(name,"in_CLOCK" , _name, "in_CLOCK"); |
---|
| 390 | _component->port_map(name,"in_NRESET", _name, "in_NRESET"); |
---|
| 391 | } |
---|
| 392 | |
---|
| 393 | // ~~~~~[ Interface "insert" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 394 | { |
---|
| 395 | std::string dest = _name+"_read_queue"; |
---|
| 396 | |
---|
| 397 | #ifdef POSITION |
---|
| 398 | _component->interface_map (name,"insert", |
---|
| 399 | dest,"read_queue_in"); |
---|
| 400 | #endif |
---|
| 401 | |
---|
| 402 | _component->port_map(name, "in_INSERT_VAL" ,dest,"out_READ_QUEUE_OUT_VAL" ); |
---|
| 403 | _component->port_map(name,"out_INSERT_ACK" ,dest, "in_READ_QUEUE_OUT_ACK" ); |
---|
| 404 | if (_param->_have_port_context_id) |
---|
| 405 | _component->port_map(name, "in_INSERT_CONTEXT_ID" ,dest,"out_READ_QUEUE_OUT_CONTEXT_ID" ); |
---|
| 406 | if (_param->_have_port_front_end_id) |
---|
| 407 | _component->port_map(name, "in_INSERT_FRONT_END_ID" ,dest,"out_READ_QUEUE_OUT_FRONT_END_ID" ); |
---|
| 408 | if (_param->_have_port_ooo_engine_id) |
---|
| 409 | _component->port_map(name, "in_INSERT_OOO_ENGINE_ID" ,dest,"out_READ_QUEUE_OUT_OOO_ENGINE_ID" ); |
---|
[88] | 410 | if (_param->_have_port_rob_ptr) |
---|
[76] | 411 | _component->port_map(name, "in_INSERT_ROB_ID" ,dest,"out_READ_QUEUE_OUT_ROB_ID" ); |
---|
| 412 | _component->port_map(name, "in_INSERT_OPERATION" ,dest,"out_READ_QUEUE_OUT_OPERATION" ); |
---|
| 413 | _component->port_map(name, "in_INSERT_TYPE" ,dest,"out_READ_QUEUE_OUT_TYPE" ); |
---|
| 414 | _component->port_map(name, "in_INSERT_STORE_QUEUE_PTR_WRITE",dest,"out_READ_QUEUE_OUT_STORE_QUEUE_PTR_WRITE"); |
---|
[78] | 415 | if (_param->_have_port_load_queue_ptr) |
---|
[76] | 416 | _component->port_map(name, "in_INSERT_LOAD_QUEUE_PTR_WRITE" ,dest,"out_READ_QUEUE_OUT_LOAD_QUEUE_PTR_WRITE" ); |
---|
| 417 | _component->port_map(name, "in_INSERT_HAS_IMMEDIAT" ,dest,"out_READ_QUEUE_OUT_HAS_IMMEDIAT" ); |
---|
| 418 | _component->port_map(name, "in_INSERT_IMMEDIAT" ,dest,"out_READ_QUEUE_OUT_IMMEDIAT" ); |
---|
| 419 | // _component->port_map(name, "in_INSERT_READ_RA" ,dest,"out_READ_QUEUE_OUT_READ_RA" ); |
---|
| 420 | _component->port_map(name, "in_INSERT_NUM_REG_RA" ,dest,"out_READ_QUEUE_OUT_NUM_REG_RA" ); |
---|
| 421 | _component->port_map(name, "in_INSERT_DATA_RA_VAL" ,dest,"out_READ_QUEUE_OUT_DATA_RA_VAL" ); |
---|
| 422 | _component->port_map(name, "in_INSERT_DATA_RA" ,dest,"out_READ_QUEUE_OUT_DATA_RA" ); |
---|
| 423 | // _component->port_map(name, "in_INSERT_READ_RB" ,dest,"out_READ_QUEUE_OUT_READ_RB" ); |
---|
| 424 | _component->port_map(name, "in_INSERT_NUM_REG_RB" ,dest,"out_READ_QUEUE_OUT_NUM_REG_RB" ); |
---|
| 425 | _component->port_map(name, "in_INSERT_DATA_RB_VAL" ,dest,"out_READ_QUEUE_OUT_DATA_RB_VAL" ); |
---|
| 426 | _component->port_map(name, "in_INSERT_DATA_RB" ,dest,"out_READ_QUEUE_OUT_DATA_RB" ); |
---|
| 427 | // _component->port_map(name, "in_INSERT_READ_RC" ,dest,"out_READ_QUEUE_OUT_READ_RC" ); |
---|
| 428 | _component->port_map(name, "in_INSERT_NUM_REG_RC" ,dest,"out_READ_QUEUE_OUT_NUM_REG_RC" ); |
---|
| 429 | _component->port_map(name, "in_INSERT_DATA_RC_VAL" ,dest,"out_READ_QUEUE_OUT_DATA_RC_VAL" ); |
---|
| 430 | _component->port_map(name, "in_INSERT_DATA_RC" ,dest,"out_READ_QUEUE_OUT_DATA_RC" ); |
---|
| 431 | _component->port_map(name, "in_INSERT_WRITE_RD" ,dest,"out_READ_QUEUE_OUT_WRITE_RD" ); |
---|
| 432 | _component->port_map(name, "in_INSERT_NUM_REG_RD" ,dest,"out_READ_QUEUE_OUT_NUM_REG_RD" ); |
---|
| 433 | _component->port_map(name, "in_INSERT_WRITE_RE" ,dest,"out_READ_QUEUE_OUT_WRITE_RE" ); |
---|
| 434 | _component->port_map(name, "in_INSERT_NUM_REG_RE" ,dest,"out_READ_QUEUE_OUT_NUM_REG_RE" ); |
---|
| 435 | } |
---|
| 436 | |
---|
| 437 | // ~~~~~[ Interface "retire" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 438 | for (uint32_t i=0; i<_param->_nb_inst_retire; i++) |
---|
| 439 | { |
---|
| 440 | std::string dest = _name; |
---|
| 441 | |
---|
| 442 | #ifdef POSITION |
---|
| 443 | _component->interface_map (name,"retire_"+toString(i), |
---|
| 444 | dest,"read_unit_out_"+toString(i)); |
---|
| 445 | #endif |
---|
| 446 | |
---|
| 447 | _component->port_map(name,"out_RETIRE_"+toString(i)+"_VAL" ,dest,"out_READ_UNIT_OUT_"+toString(i)+"_VAL" ); |
---|
| 448 | _component->port_map(name, "in_RETIRE_"+toString(i)+"_ACK" ,dest, "in_READ_UNIT_OUT_"+toString(i)+"_ACK" ); |
---|
| 449 | if (_param->_have_port_context_id) |
---|
| 450 | _component->port_map(name,"out_RETIRE_"+toString(i)+"_CONTEXT_ID" ,dest,"out_READ_UNIT_OUT_"+toString(i)+"_CONTEXT_ID" ); |
---|
| 451 | if (_param->_have_port_front_end_id) |
---|
| 452 | _component->port_map(name,"out_RETIRE_"+toString(i)+"_FRONT_END_ID" ,dest,"out_READ_UNIT_OUT_"+toString(i)+"_FRONT_END_ID" ); |
---|
| 453 | if (_param->_have_port_ooo_engine_id) |
---|
| 454 | _component->port_map(name,"out_RETIRE_"+toString(i)+"_OOO_ENGINE_ID" ,dest,"out_READ_UNIT_OUT_"+toString(i)+"_OOO_ENGINE_ID" ); |
---|
[88] | 455 | if (_param->_have_port_rob_ptr) |
---|
[76] | 456 | _component->port_map(name,"out_RETIRE_"+toString(i)+"_ROB_ID" ,dest,"out_READ_UNIT_OUT_"+toString(i)+"_PACKET_ID" ); |
---|
| 457 | _component->port_map(name,"out_RETIRE_"+toString(i)+"_OPERATION" ,dest,"out_READ_UNIT_OUT_"+toString(i)+"_OPERATION" ); |
---|
| 458 | _component->port_map(name,"out_RETIRE_"+toString(i)+"_TYPE" ,dest,"out_READ_UNIT_OUT_"+toString(i)+"_TYPE" ); |
---|
| 459 | _component->port_map(name,"out_RETIRE_"+toString(i)+"_STORE_QUEUE_PTR_WRITE",dest,"out_READ_UNIT_OUT_"+toString(i)+"_STORE_QUEUE_PTR_WRITE"); |
---|
[78] | 460 | if (_param->_have_port_load_queue_ptr) |
---|
[76] | 461 | _component->port_map(name,"out_RETIRE_"+toString(i)+"_LOAD_QUEUE_PTR_WRITE" ,dest,"out_READ_UNIT_OUT_"+toString(i)+"_LOAD_QUEUE_PTR_WRITE" ); |
---|
| 462 | _component->port_map(name,"out_RETIRE_"+toString(i)+"_HAS_IMMEDIAT" ,dest,"out_READ_UNIT_OUT_"+toString(i)+"_HAS_IMMEDIAT" ); |
---|
| 463 | _component->port_map(name,"out_RETIRE_"+toString(i)+"_IMMEDIAT" ,dest,"out_READ_UNIT_OUT_"+toString(i)+"_IMMEDIAT" ); |
---|
| 464 | _component->port_map(name,"out_RETIRE_"+toString(i)+"_DATA_RA" ,dest,"out_READ_UNIT_OUT_"+toString(i)+"_DATA_RA" ); |
---|
| 465 | _component->port_map(name,"out_RETIRE_"+toString(i)+"_DATA_RB" ,dest,"out_READ_UNIT_OUT_"+toString(i)+"_DATA_RB" ); |
---|
| 466 | _component->port_map(name,"out_RETIRE_"+toString(i)+"_DATA_RC" ,dest,"out_READ_UNIT_OUT_"+toString(i)+"_DATA_RC" ); |
---|
| 467 | _component->port_map(name,"out_RETIRE_"+toString(i)+"_WRITE_RD" ,dest,"out_READ_UNIT_OUT_"+toString(i)+"_WRITE_RD" ); |
---|
| 468 | _component->port_map(name,"out_RETIRE_"+toString(i)+"_NUM_REG_RD" ,dest,"out_READ_UNIT_OUT_"+toString(i)+"_NUM_REG_RD" ); |
---|
| 469 | _component->port_map(name,"out_RETIRE_"+toString(i)+"_WRITE_RE" ,dest,"out_READ_UNIT_OUT_"+toString(i)+"_WRITE_RE" ); |
---|
| 470 | _component->port_map(name,"out_RETIRE_"+toString(i)+"_NUM_REG_RE" ,dest,"out_READ_UNIT_OUT_"+toString(i)+"_NUM_REG_RE" ); |
---|
| 471 | } |
---|
| 472 | |
---|
| 473 | // ~~~~~[ Interface "gpr_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 474 | for (uint32_t i=0; i<_param->_nb_gpr_write; i++) |
---|
| 475 | { |
---|
| 476 | std::string dest = _name; |
---|
| 477 | #ifdef POSITION |
---|
| 478 | _component->interface_map (name,"gpr_write_"+toString(i), |
---|
| 479 | dest,"gpr_write_"+toString(i)); |
---|
| 480 | #endif |
---|
| 481 | |
---|
| 482 | _component->port_map(name, "in_GPR_WRITE_"+toString(i)+"_VAL" ,dest, "in_GPR_WRITE_"+toString(i)+"_VAL" ); |
---|
| 483 | if (_param->_have_port_ooo_engine_id) |
---|
| 484 | _component->port_map(name, "in_GPR_WRITE_"+toString(i)+"_OOO_ENGINE_ID",dest, "in_GPR_WRITE_"+toString(i)+"_OOO_ENGINE_ID"); |
---|
| 485 | _component->port_map(name, "in_GPR_WRITE_"+toString(i)+"_NUM_REG" ,dest, "in_GPR_WRITE_"+toString(i)+"_NUM_REG" ); |
---|
| 486 | _component->port_map(name, "in_GPR_WRITE_"+toString(i)+"_DATA" ,dest, "in_GPR_WRITE_"+toString(i)+"_DATA" ); |
---|
| 487 | } |
---|
| 488 | // ~~~~~[ Interface "spr_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 489 | for (uint32_t i=0; i<_param->_nb_spr_write; i++) |
---|
| 490 | { |
---|
| 491 | std::string dest = _name; |
---|
| 492 | #ifdef POSITION |
---|
| 493 | _component->interface_map (name,"spr_write_"+toString(i), |
---|
| 494 | dest,"spr_write_"+toString(i)); |
---|
| 495 | #endif |
---|
| 496 | |
---|
| 497 | _component->port_map(name, "in_SPR_WRITE_"+toString(i)+"_VAL" ,dest, "in_SPR_WRITE_"+toString(i)+"_VAL" ); |
---|
| 498 | if (_param->_have_port_ooo_engine_id) |
---|
| 499 | _component->port_map(name, "in_SPR_WRITE_"+toString(i)+"_OOO_ENGINE_ID",dest, "in_SPR_WRITE_"+toString(i)+"_OOO_ENGINE_ID"); |
---|
| 500 | _component->port_map(name, "in_SPR_WRITE_"+toString(i)+"_NUM_REG" ,dest, "in_SPR_WRITE_"+toString(i)+"_NUM_REG" ); |
---|
| 501 | _component->port_map(name, "in_SPR_WRITE_"+toString(i)+"_DATA" ,dest, "in_SPR_WRITE_"+toString(i)+"_DATA" ); |
---|
| 502 | } |
---|
| 503 | // ~~~~~[ Interface "bypass_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 504 | for (uint32_t i=0; i<_param->_nb_bypass_write; i++) |
---|
| 505 | { |
---|
| 506 | std::string dest = _name; |
---|
| 507 | #ifdef POSITION |
---|
| 508 | _component->interface_map (name,"bypass_write_"+toString(i), |
---|
| 509 | dest,"bypass_write_"+toString(i)); |
---|
| 510 | #endif |
---|
| 511 | |
---|
| 512 | if (_param->_have_port_ooo_engine_id) |
---|
| 513 | _component->port_map(name, "in_BYPASS_WRITE_"+toString(i)+"_OOO_ENGINE_ID",dest, "in_BYPASS_WRITE_"+toString(i)+"_OOO_ENGINE_ID"); |
---|
| 514 | _component->port_map(name, "in_BYPASS_WRITE_"+toString(i)+"_GPR_VAL" ,dest, "in_BYPASS_WRITE_"+toString(i)+"_GPR_VAL" ); |
---|
| 515 | _component->port_map(name, "in_BYPASS_WRITE_"+toString(i)+"_GPR_NUM_REG" ,dest, "in_BYPASS_WRITE_"+toString(i)+"_GPR_NUM_REG" ); |
---|
| 516 | _component->port_map(name, "in_BYPASS_WRITE_"+toString(i)+"_GPR_DATA" ,dest, "in_BYPASS_WRITE_"+toString(i)+"_GPR_DATA" ); |
---|
| 517 | _component->port_map(name, "in_BYPASS_WRITE_"+toString(i)+"_SPR_VAL" ,dest, "in_BYPASS_WRITE_"+toString(i)+"_SPR_VAL" ); |
---|
| 518 | _component->port_map(name, "in_BYPASS_WRITE_"+toString(i)+"_SPR_NUM_REG" ,dest, "in_BYPASS_WRITE_"+toString(i)+"_SPR_NUM_REG" ); |
---|
| 519 | _component->port_map(name, "in_BYPASS_WRITE_"+toString(i)+"_SPR_DATA" ,dest, "in_BYPASS_WRITE_"+toString(i)+"_SPR_DATA" ); |
---|
| 520 | } |
---|
| 521 | // ~~~~~[ Interface "bypass_memory" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 522 | for (uint32_t i=0; i<_param->_nb_bypass_memory; i++) |
---|
| 523 | { |
---|
| 524 | std::string dest = _name; |
---|
| 525 | #ifdef POSITION |
---|
| 526 | _component->interface_map (name,"bypass_memory_"+toString(i), |
---|
| 527 | dest,"bypass_memory_"+toString(i)); |
---|
| 528 | #endif |
---|
| 529 | |
---|
| 530 | if (_param->_have_port_ooo_engine_id) |
---|
| 531 | _component->port_map(name, "in_BYPASS_MEMORY_"+toString(i)+"_OOO_ENGINE_ID",dest, "in_BYPASS_MEMORY_"+toString(i)+"_OOO_ENGINE_ID"); |
---|
| 532 | _component->port_map(name, "in_BYPASS_MEMORY_"+toString(i)+"_VAL" ,dest, "in_BYPASS_MEMORY_"+toString(i)+"_VAL" ); |
---|
| 533 | _component->port_map(name, "in_BYPASS_MEMORY_"+toString(i)+"_NUM_REG" ,dest, "in_BYPASS_MEMORY_"+toString(i)+"_NUM_REG" ); |
---|
| 534 | _component->port_map(name, "in_BYPASS_MEMORY_"+toString(i)+"_DATA" ,dest, "in_BYPASS_MEMORY_"+toString(i)+"_DATA" ); |
---|
| 535 | } |
---|
| 536 | } |
---|
[78] | 537 | |
---|
[88] | 538 | #if DEBUG_Read_unit == true |
---|
| 539 | _component->test_map(); |
---|
| 540 | #endif |
---|
[76] | 541 | |
---|
| 542 | #ifdef POSITION |
---|
[88] | 543 | if (usage_is_set(_usage,USE_POSITION)) |
---|
| 544 | _component->generate_file(); |
---|
[76] | 545 | #endif |
---|
| 546 | |
---|
| 547 | log_printf(FUNC,Read_unit,FUNCTION,"End"); |
---|
| 548 | }; |
---|
| 549 | |
---|
| 550 | }; // end namespace read_unit |
---|
| 551 | }; // end namespace multi_read_unit |
---|
| 552 | }; // end namespace execute_loop |
---|
| 553 | }; // end namespace multi_execute_loop |
---|
| 554 | }; // end namespace core |
---|
| 555 | |
---|
| 556 | }; // end namespace behavioural |
---|
| 557 | }; // end namespace morpheo |
---|