Changeset 128 for trunk/IPs/systemC
- Timestamp:
- Jun 26, 2009, 10:43:23 AM (15 years ago)
- Location:
- trunk/IPs/systemC
- Files:
-
- 134 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/Environment/Queue/include/Sort_Queue.h
r85 r128 63 63 if (num >= Queue <T>::_nb_slot) 64 64 { 65 std::cerr << "< Sort_Queue.read> {ERROR} can't read because : num (" << num << ") >= nb_slot (" << Queue <T>::_nb_slot << ")" << std::endl;65 std::cerr << "<" << Queue<T>::_name << ".read> {ERROR} can't read because : num (" << num << ") >= nb_slot (" << Queue <T>::_nb_slot << ")" << std::endl; 66 66 exit(1); 67 67 } … … 76 76 if (num >= Queue <T>::_nb_slot) 77 77 { 78 std::cerr << "< Sort_Queue.pop> {ERROR} can't read because : num (" << num << ") >= nb_slot (" << Queue <T>::_nb_slot << ")" << std::endl;78 std::cerr << "<" << Queue<T>::_name << ".pop> {ERROR} can't read because : num (" << num << ") >= nb_slot (" << Queue <T>::_nb_slot << ")" << std::endl; 79 79 exit(1); 80 80 } -
trunk/IPs/systemC/Environment/include/Environment.h
r117 r128 62 62 public : morpheo::Tcontrol_t ** icache_req_ack ; 63 63 public : morpheo::Tcontrol_t ** icache_rsp_val ; 64 public : uint32_t ** icache_rsp_num ; 64 65 public : morpheo::Tcontrol_t ** dcache_req_ack ; 65 66 public : morpheo::Tcontrol_t ** dcache_rsp_val ; 67 public : uint32_t ** dcache_rsp_num ; 66 68 67 69 // ===== [ Variables ]=================================================== -
trunk/IPs/systemC/Environment/selftest/main.cpp
r88 r128 175 175 Parameters * param = new Parameters 176 176 (nb_entity, 177 nb_entity, 177 178 178 179 iaccess_nb_context, -
trunk/IPs/systemC/Environment/src/Environment.cpp
r123 r128 1 1 #include "../include/Environment.h" 2 #include "../../processor/Morpheo/Common/include/ToString.h" 2 3 3 4 using namespace morpheo; … … 13 14 component_tty = new tty::TTY * [param->nb_component_tty]; 14 15 for (uint32_t i=0; i<param->nb_component_tty; i++) 15 component_tty [i] = new tty::TTY ("tty_"+i,param->param_tty [i]);16 component_tty [i] = new tty::TTY ("tty_"+morpheo::toString(i),param->param_tty [i]); 16 17 component_ramlock = new ramlock::RamLock * [param->nb_component_ramlock]; 17 18 for (uint32_t i=0; i<param->nb_component_ramlock; i++) 18 component_ramlock [i] = new ramlock::RamLock ("ramlock_"+ i,param->param_ramlock [i]);19 component_ramlock [i] = new ramlock::RamLock ("ramlock_"+morpheo::toString(i),param->param_ramlock [i]); 19 20 component_sim2os = new sim2os::Sim2OS ("sim2os" ,param->param_sim2os ); 20 21 component_data = new data::Data ("data" ,param->param_data ); … … 186 187 icache_req_ack = new Tcontrol_t * [param->nb_entity]; 187 188 icache_rsp_val = new Tcontrol_t * [param->nb_entity]; 189 icache_rsp_num = new uint32_t * [param->nb_entity]; 188 190 dcache_req_ack = new Tcontrol_t * [param->nb_entity]; 189 191 dcache_rsp_val = new Tcontrol_t * [param->nb_entity]; 192 dcache_rsp_num = new uint32_t * [param->nb_entity]; 190 193 191 194 for (uint32_t i=0; i<param->nb_entity; i++) … … 193 196 icache_req_ack [i] = new Tcontrol_t [param->icache_dedicated_nb_port[i]]; 194 197 icache_rsp_val [i] = new Tcontrol_t [param->icache_dedicated_nb_port[i]]; 198 icache_rsp_num [i] = new uint32_t [param->icache_dedicated_nb_port[i]]; 195 199 dcache_req_ack [i] = new Tcontrol_t [param->dcache_dedicated_nb_port[i]]; 196 200 dcache_rsp_val [i] = new Tcontrol_t [param->dcache_dedicated_nb_port[i]]; 201 dcache_rsp_num [i] = new uint32_t [param->dcache_dedicated_nb_port[i]]; 197 202 } 198 203 … … 214 219 delete [] icache_req_ack [i]; 215 220 delete [] icache_rsp_val [i]; 221 delete [] icache_rsp_num [i]; 216 222 delete [] dcache_req_ack [i]; 217 223 delete [] dcache_rsp_val [i]; 224 delete [] dcache_rsp_num [i]; 218 225 } 219 226 220 227 delete [] icache_req_ack; 221 228 delete [] icache_rsp_val; 229 delete [] icache_rsp_num; 222 230 delete [] dcache_req_ack; 223 231 delete [] dcache_rsp_val; 232 delete [] dcache_rsp_num; 224 233 225 234 delete CLOCK ; … … 243 252 244 253 for (uint32_t k=0; k<param->iaccess_nb_instruction[i]; k++) 245 delete ICACHE_RSP_INSTRUCTION [i][j][k]; 246 254 delete ICACHE_RSP_INSTRUCTION [i][j][k]; 247 255 delete [] ICACHE_RSP_INSTRUCTION [i][j]; 248 256 } 257 249 258 delete [] ICACHE_REQ_VAL [i]; 250 259 delete [] ICACHE_REQ_ACK [i]; … … 276 285 for (uint32_t i=0; i<param->nb_entity; i++) 277 286 { 278 for (uint32_t j=0; j<param-> icache_dedicated_nb_port[i]; j++)287 for (uint32_t j=0; j<param->dcache_dedicated_nb_port[i]; j++) 279 288 { 280 289 delete DCACHE_REQ_VAL [i][j]; -
trunk/IPs/systemC/Environment/src/Environment_genMoore.cpp
r127 r128 1 1 #include "../include/Environment.h" 2 #include "../../processor/Morpheo/Common/include/Systemc.h" 2 3 3 4 using namespace morpheo; … … 7 8 void Environment::genMoore (void) 8 9 { 10 _cout(ENVIRONMENT, " [%d] <Environment::genMoore>\n",static_cast<uint32_t>(simulation_cycle())); 11 9 12 //Scan all entity and for each entity scan all port 10 13 for (uint32_t i = 0; i < param->nb_entity; i++) … … 32 35 // init 33 36 for (uint32_t j = 0; j < param->icache_dedicated_nb_port [i]; j ++) 34 icache_rsp_val [i][j] = 0; 37 { 38 icache_rsp_val [i][j] = 0; 39 icache_rsp_num [i][j] = 0; 40 } 35 41 36 _cout(ENVIRONMENT, " buffer_irsp [%d] : nb_slot_use %d\n",i,component_buffer_irsp [i]->nb_slot_use());42 _cout(ENVIRONMENT, " * buffer_irsp [%d] : nb_slot_use %d\n",i,component_buffer_irsp [i]->nb_slot_use()); 37 43 for (uint32_t j = 0; j+1 <= component_buffer_irsp [i]->nb_slot_use(); j ++) 38 44 { … … 45 51 bool val = ((slot._delay == 0) and (icache_rsp_val [i][port] == 0)); 46 52 47 _cout(ENVIRONMENT, " buffer_irsp [%d][%d] - delay %d - port %d\n",i,j,slot._delay,port);53 _cout(ENVIRONMENT, " * buffer_irsp [%d][%d] - delay %d - port %d\n",i,j,slot._delay,port); 48 54 49 55 50 56 if (val) 51 57 { 52 _cout(ENVIRONMENT, " ICACHE_RSP [%d][%d] - respons valid\n",i,port);58 _cout(ENVIRONMENT, " * ICACHE_RSP [%d][%d] - respons valid\n",i,port); 53 59 54 60 icache_rsp_val [i][port] = 1; 61 icache_rsp_num [i][port] = j; 55 62 56 63 ICACHE_RSP_CONTEXT_ID [i][port]->write(slot._data->trdid); // TODO : test if exist … … 93 100 //----------------------------------------------------------------------------- 94 101 { 102 // init 95 103 for (uint32_t j = 0; j < param->dcache_dedicated_nb_port [i]; j ++) 104 { 105 dcache_rsp_val [i][j] = 0; 106 dcache_rsp_num [i][j] = 0; 107 } 108 109 for (uint32_t j = 0; j+1 <= component_buffer_drsp [i]->nb_slot_use(); j ++) 96 110 { 97 // Test the number of element in the respons's buffer 98 if (j >= component_buffer_drsp [i]->nb_slot_use()) 99 { 100 dcache_rsp_val [i][j] = 0; // No respons 101 } 102 else 103 { 104 queue::slot_t<drsp_t*> slot = component_buffer_drsp [i]->read(j); 111 queue::slot_t<drsp_t*> slot = component_buffer_drsp [i]->read(j); 112 113 uint32_t port = slot._data->port; 114 bool val = ((slot._delay == 0) and (dcache_rsp_val [i][port] == 0)); 115 116 if (val) 117 { 118 _cout(ENVIRONMENT, " * DCACHE_RSP [%d][%d] - respons valid\n",i,port); 119 120 dcache_rsp_val [i][port] = 1; 121 dcache_rsp_num [i][port] = j; 122 123 DCACHE_RSP_CONTEXT_ID [i][port]->write(slot._data->trdid); // TODO : test if exist 124 DCACHE_RSP_PACKET_ID [i][port]->write(slot._data->pktid); // TODO : test if exist 125 DCACHE_RSP_ERROR [i][port]->write(slot._data->error); 126 127 Tdcache_data_t data = 0; 128 atoi (slot._data->data[0], data, param->daccess_size_data[i]/8); 129 130 DCACHE_RSP_RDATA [i][port]->write(data); 131 } 132 } 105 133 106 bool val = (slot._delay == 0); // respons if have a result 107 108 dcache_rsp_val [i][j] = (val); // respons if have a result 109 110 if (val) 111 { 112 _cout(ENVIRONMENT, "DCACHE_RSP [%d][%d] - respons valid\n",i,j); 113 114 DCACHE_RSP_CONTEXT_ID [i][j]->write(slot._data->trdid); // TODO : test if exist 115 DCACHE_RSP_PACKET_ID [i][j]->write(slot._data->pktid); // TODO : test if exist 116 DCACHE_RSP_ERROR [i][j]->write(slot._data->error); 117 118 Tdcache_data_t data = 0; 119 atoi (slot._data->data[0], data, param->daccess_size_data[i]/8); 120 121 DCACHE_RSP_RDATA [i][j]->write(data); 122 } 123 } 124 DCACHE_RSP_VAL [i][j]->write (dcache_rsp_val [i][j]); 125 } 134 for (uint32_t j = 0; j < param->dcache_dedicated_nb_port [i]; j ++) 135 DCACHE_RSP_VAL [i][j]->write (dcache_rsp_val [i][j]); 126 136 } 127 137 } -
trunk/IPs/systemC/Environment/src/Environment_transition.cpp
r124 r128 3 3 #define CYCLE_MAX 0 4 4 #include "../../processor/Morpheo/Common/include/Test.h" 5 #include "../../processor/Morpheo/Common/include/Systemc.h" 5 6 6 7 using namespace morpheo; … … 10 11 void Environment::transition (void) 11 12 { 13 _cout(ENVIRONMENT, " [%d] <Environment::transition>\n",static_cast<uint32_t>(simulation_cycle())); 14 12 15 if (NRESET->read() == 0) 13 16 { … … 21 24 for (uint32_t i = 0; i < param->nb_entity; i++) 22 25 for (int32_t j=param->icache_dedicated_nb_port [i]-1; j>=0; j--) 23 if (icache_rsp_val [i][j] and ICACHE_RSP_ACK [i][j]->read()) 24 { 25 delete component_buffer_irsp [i]->read(j)._data; 26 component_buffer_irsp [i]->pop(j); 27 } 26 { 27 _cout(ENVIRONMENT, " * ICACHE_RSP [%d][%d]\n",i,j); 28 29 if (icache_rsp_val [i][j] and ICACHE_RSP_ACK [i][j]->read()) 30 { 31 _cout(ENVIRONMENT, " * ICACHE_RSP [%d][%d] : Transaction accepted\n",i,j); 32 33 uint32_t num = icache_rsp_num [i][j]; 34 35 delete component_buffer_irsp [i]->read(num)._data; 36 component_buffer_irsp [i]->pop(num); 37 } 38 } 28 39 //============================================================================= 29 40 //===== [ DCACHE - RESPONS ]=================================================== … … 31 42 for (uint32_t i = 0; i < param->nb_entity; i++) 32 43 for (int32_t j=param->dcache_dedicated_nb_port [i]-1; j>=0; j--) 33 if (dcache_rsp_val [i][j] and DCACHE_RSP_ACK [i][j]->read()) 34 { 35 delete component_buffer_drsp [i]->read(j)._data; 36 component_buffer_drsp [i]->pop(j); 37 } 44 { 45 _cout(ENVIRONMENT, " * DCACHE_RSP [%d][%d]\n",i,j); 46 if (dcache_rsp_val [i][j] and DCACHE_RSP_ACK [i][j]->read()) 47 { 48 _cout(ENVIRONMENT, " * DCACHE_RSP [%d][%d] : Transaction accepted\n",i,j); 49 50 uint32_t num = dcache_rsp_num [i][j]; 51 52 delete component_buffer_drsp [i]->read(num)._data; 53 component_buffer_drsp [i]->pop(num); 54 } 55 } 38 56 39 57 //============================================================================= … … 44 62 if (ICACHE_REQ_VAL [i][j]->read() and icache_req_ack [i][j]) 45 63 { 46 _cout(ENVIRONMENT, " ICACHE_REQ [%d][%d] : Transaction accepted\n",i,j);64 _cout(ENVIRONMENT, " * ICACHE_REQ [%d][%d] : Transaction accepted\n",i,j); 47 65 48 66 Ticache_context_t context = ICACHE_REQ_CONTEXT_ID [i][j]->read();// TODO : test presence … … 52 70 uint32_t size = (param->iaccess_size_address [i]+2)/8; 53 71 54 _cout(ENVIRONMENT," * information\n");55 _cout(ENVIRONMENT," * context : %d\n" ,static_cast<uint32_t>(context));56 _cout(ENVIRONMENT," * packet : %d\n" ,static_cast<uint32_t>(packet ));57 _cout(ENVIRONMENT," * address : %.x\n",static_cast<uint32_t>(address));58 _cout(ENVIRONMENT," * type : %d\n" ,static_cast<uint32_t>(type ));59 _cout(ENVIRONMENT," * size : %d\n" ,static_cast<uint32_t>(size ));72 _cout(ENVIRONMENT," * information\n"); 73 _cout(ENVIRONMENT," * context : %d\n" ,static_cast<uint32_t>(context)); 74 _cout(ENVIRONMENT," * packet : %d\n" ,static_cast<uint32_t>(packet )); 75 _cout(ENVIRONMENT," * address : %.x\n",static_cast<uint32_t>(address)); 76 _cout(ENVIRONMENT," * type : %d\n" ,static_cast<uint32_t>(type )); 77 _cout(ENVIRONMENT," * size : %d\n" ,static_cast<uint32_t>(size )); 60 78 61 79 // search the entity … … 72 90 (entity.segment->getType() == data::TYPE_TARGET_MEMORY)) 73 91 { 74 _cout(ENVIRONMENT," * OK !\n");92 _cout(ENVIRONMENT," * OK !\n"); 75 93 bus_error = false; 76 94 uncached = entity.segment->getUncached(); … … 78 96 if (must_read == true) // Test if must read the ram 79 97 { 80 _cout(ENVIRONMENT," * must read\n");98 _cout(ENVIRONMENT," * must read\n"); 81 99 // Read all instruction 82 100 for (unsigned int k=0; k<param->iaccess_nb_instruction[i]; k++) 83 101 { 84 102 uint32_t addr = address+k*(size); 85 _cout(ENVIRONMENT," * addr : %.8x - ",addr);103 _cout(ENVIRONMENT," * addr : %.8x - ",addr); 86 104 87 105 bus_error |= !component_data->read(addr,size,read_iram[k]); … … 102 120 else 103 121 { 104 _cout(ENVIRONMENT, " * KO !\n");105 _cout(ENVIRONMENT, " * present : %d\n",entity.present);122 _cout(ENVIRONMENT, " * KO !\n"); 123 _cout(ENVIRONMENT, " * present : %d\n",entity.present); 106 124 if (entity.present) 107 _cout(ENVIRONMENT, " * type : %d must be data::TYPE_TARGET_MEMORY (%d)\n",entity.segment->getType(), data::TYPE_TARGET_MEMORY);125 _cout(ENVIRONMENT, " * type : %d must be data::TYPE_TARGET_MEMORY (%d)\n",entity.segment->getType(), data::TYPE_TARGET_MEMORY); 108 126 109 127 // entity is not present, or is present but is not a memory : have a bus error … … 121 139 cache_type.direction); 122 140 123 _cout(ENVIRONMENT, " * latence : %d\n",latence);141 _cout(ENVIRONMENT, " * latence : %d\n",latence); 124 142 125 143 // If is a respons -> compute the latence and push in the write_buffer 126 144 if (must_ack or (must_ack_on_error and bus_error)) 127 145 { 128 _cout(ENVIRONMENT, " * must ack\n");146 _cout(ENVIRONMENT, " * must ack\n"); 129 147 130 148 if (bus_error == true) 131 149 { 132 _cout(ENVIRONMENT," * Icache : have a bus error\n");133 _cout(ENVIRONMENT," * entity : %d\n",i);134 _cout(ENVIRONMENT," * port : %d\n",j);135 _cout(ENVIRONMENT," * req_addr : %x\n",address);136 _cout(ENVIRONMENT," * req_trdid : %d\n",context);137 _cout(ENVIRONMENT," * req_pktid : %d\n",packet );150 _cout(ENVIRONMENT," * Icache : have a bus error\n"); 151 _cout(ENVIRONMENT," * entity : %d\n",i); 152 _cout(ENVIRONMENT," * port : %d\n",j); 153 _cout(ENVIRONMENT," * req_addr : %x\n",address); 154 _cout(ENVIRONMENT," * req_trdid : %d\n",context); 155 _cout(ENVIRONMENT," * req_pktid : %d\n",packet ); 138 156 139 157 // Write in instruction [0] the bad address (only 32bit ....) … … 142 160 143 161 // Simplification : the size of a line is a multiple of size_iword (no test) 144 _cout(ENVIRONMENT, " * push in buffer_irsp[%d]\n",i);162 _cout(ENVIRONMENT, " * push in buffer_irsp[%d]\n",i); 145 163 146 164 irsp_t * rsp = new irsp_t(j, … … 154 172 } 155 173 156 _cout(ENVIRONMENT, " * End request\n");174 _cout(ENVIRONMENT, " * End request\n"); 157 175 } 158 176 … … 164 182 if (DCACHE_REQ_VAL [i][j]->read() and dcache_req_ack [i][j]) 165 183 { 166 _cout(ENVIRONMENT, " DCACHE_REQ [%d][%d] : Transaction accepted\n",i,j);184 _cout(ENVIRONMENT, " * DCACHE_REQ [%d][%d] : Transaction accepted\n",i,j); 167 185 168 186 Tdcache_context_t context = DCACHE_REQ_CONTEXT_ID [i][j]->read();// TODO : test presence … … 173 191 uint32_t size = param->daccess_size_data [i]/8; 174 192 175 _cout(ENVIRONMENT," * information\n");176 _cout(ENVIRONMENT," * context : %d\n" ,static_cast<uint32_t>(context));177 _cout(ENVIRONMENT," * packet : %d\n" ,static_cast<uint32_t>(packet ));178 _cout(ENVIRONMENT," * address : %.x\n",static_cast<uint32_t>(address));179 _cout(ENVIRONMENT," * type : %d\n" ,static_cast<uint32_t>(type ));180 _cout(ENVIRONMENT," * size : %d\n" ,static_cast<uint32_t>(size ));193 _cout(ENVIRONMENT," * information\n"); 194 _cout(ENVIRONMENT," * context : %d\n" ,static_cast<uint32_t>(context)); 195 _cout(ENVIRONMENT," * packet : %d\n" ,static_cast<uint32_t>(packet )); 196 _cout(ENVIRONMENT," * address : %.x\n",static_cast<uint32_t>(address)); 197 _cout(ENVIRONMENT," * type : %d\n" ,static_cast<uint32_t>(type )); 198 _cout(ENVIRONMENT," * size : %d\n" ,static_cast<uint32_t>(size )); 181 199 182 200 bool uncached = false; … … 231 249 uint32_t num_tty = (address - entity.segment->getBase())>>4; 232 250 uint32_t num_print = ((address>>2) & 0x3); 233 _cout(true," * TYPE_TARGET_TTY : num_tty : %d, num_print : %d\n",num_tty, num_print);251 _cout(true," * TYPE_TARGET_TTY : num_tty : %d, num_print : %d\n",num_tty, num_print); 234 252 235 253 switch (num_print) … … 294 312 case data::TYPE_TARGET_MEMORY : 295 313 { 296 _cout(ENVIRONMENT," * TYPE_TARGET_MEMORY\n");297 _cout(ENVIRONMENT," * access : %x\n",address);314 _cout(ENVIRONMENT," * TYPE_TARGET_MEMORY\n"); 315 _cout(ENVIRONMENT," * access : %x\n",address); 298 316 299 317 if (must_read == true) 300 318 { 301 319 // Read 302 _cout(ENVIRONMENT," * Read (%d bytes)\n",size);320 _cout(ENVIRONMENT," * Read (%d bytes)\n",size); 303 321 bus_error |= !component_data->read(address,nb_bytes,read_dram[0]); // always read a complete word 304 322 … … 315 333 { 316 334 // Write 317 _cout(ENVIRONMENT," * Write (%d bytes)\n",size);318 _cout(ENVIRONMENT," * Wdata : %x\n",wdata);335 _cout(ENVIRONMENT," * Write (%d bytes)\n",size); 336 _cout(ENVIRONMENT," * Wdata : %x\n",wdata); 319 337 itoa<Tdcache_data_t>(wdata,write_dram,nb_bytes); 320 338 … … 330 348 case data::TYPE_TARGET_RAMLOCK : 331 349 { 332 _cout(ENVIRONMENT," * TYPE_TARGET_RAMLOCK\n");350 _cout(ENVIRONMENT," * TYPE_TARGET_RAMLOCK\n"); 333 351 334 352 // Access is on a byte, else error … … 343 361 uint32_t num_component_ramlock = entity.segment->getIndex(); 344 362 345 // _cout(ENVIRONMENT,"* num_ramlock : %d\n",num_ramlock );346 // _cout(ENVIRONMENT,"* num_lock : %d\n",num_lock );347 // _cout(ENVIRONMENT,"* num_component_ramlock : %d\n",num_component_ramlock);348 _cout(true,"* num_ramlock : %d\n",num_ramlock );349 _cout(true,"* num_lock : %d\n",num_lock );350 _cout(true,"* num_component_ramlock : %d\n",num_component_ramlock);363 _cout(ENVIRONMENT," * num_ramlock : %d\n",num_ramlock ); 364 _cout(ENVIRONMENT," * num_lock : %d\n",num_lock ); 365 _cout(ENVIRONMENT," * num_component_ramlock : %d\n",num_component_ramlock); 366 // _cout(true," * num_ramlock : %d\n",num_ramlock ); 367 // _cout(true," * num_lock : %d\n",num_lock ); 368 // _cout(true," * num_component_ramlock : %d\n",num_component_ramlock); 351 369 352 370 // No test : because out of range … … 364 382 read_dram [0][num_lock] = static_cast<char>(component_ramlock [num_component_ramlock]->write(num_ramlock)); 365 383 366 _cout(true,"* lock : %d\n",(int)read_dram [0][num_lock]);367 // _cout(ENVIRONMENT,"* lock : %d\n",(int)read_dram [0][num_lock]);384 // _cout(true," * lock : %d\n",(int)read_dram [0][num_lock]); 385 _cout(ENVIRONMENT," * lock : %d\n",(int)read_dram [0][num_lock]); 368 386 369 387 break; … … 375 393 case data::TYPE_TARGET_SIM2OS : 376 394 { 377 _cout(ENVIRONMENT," * TYPE_TARGET_SIM2OS\n");395 _cout(ENVIRONMENT," * TYPE_TARGET_SIM2OS\n"); 378 396 379 397 // Mapping : … … 385 403 uint32_t num_reg = (address - entity.segment->getBase())>>2; 386 404 387 _cout(ENVIRONMENT," * num_reg : %d\n",num_reg);405 _cout(ENVIRONMENT," * num_reg : %d\n",num_reg); 388 406 389 407 switch (num_reg) … … 398 416 else 399 417 { 400 _cout(ENVIRONMENT," * service : %x\n",wdata);418 _cout(ENVIRONMENT," * service : %x\n",wdata); 401 419 component_sim2os->execute(sim2os::int2service(static_cast<uint32_t>(wdata))); 402 420 } … … 414 432 // Decomposition en groupe octect 415 433 Tdcache_data_t result = static_cast<Tdcache_data_t>(reinterpret_cast<uint64_t>(component_sim2os->result)); 416 _cout(ENVIRONMENT," * result : %x\n",result);434 _cout(ENVIRONMENT," * result : %x\n",result); 417 435 418 436 itoa<Tdcache_data_t>(result,read_dram[0],size); … … 431 449 // Decomposition en groupe octect 432 450 Tdcache_data_t error = (Tdcache_data_t)component_sim2os->error; 433 _cout(ENVIRONMENT," * error : %x\n",error);451 _cout(ENVIRONMENT," * error : %x\n",error); 434 452 435 453 itoa<Tdcache_data_t>(error,read_dram[0],size); … … 447 465 else 448 466 { 449 _cout(ENVIRONMENT," * argument[%d] : %x\n",num_reg-1,wdata);467 _cout(ENVIRONMENT," * argument[%d] : %x\n",num_reg-1,wdata); 450 468 component_sim2os->parameter(num_reg-2,(void *)wdata); 451 469 } … … 498 516 if (bus_error == true) 499 517 { 500 _cout(ENVIRONMENT," * Dcache : have a bus error\n");501 _cout(ENVIRONMENT," * entity : %d\n",i);502 _cout(ENVIRONMENT," * port : %d\n",j);503 _cout(ENVIRONMENT," * req_addr : 0x%x\n",address);504 _cout(ENVIRONMENT," * req_trdid : %d\n",context);505 _cout(ENVIRONMENT," * req_pktid : %d\n",packet );518 _cout(ENVIRONMENT," * Dcache : have a bus error\n"); 519 _cout(ENVIRONMENT," * entity : %d\n",i); 520 _cout(ENVIRONMENT," * port : %d\n",j); 521 _cout(ENVIRONMENT," * req_addr : 0x%x\n",address); 522 _cout(ENVIRONMENT," * req_trdid : %d\n",context); 523 _cout(ENVIRONMENT," * req_pktid : %d\n",packet ); 506 524 507 525 // Write in data [0] the bad address (32bit or 64bits ) … … 509 527 } 510 528 511 _cout(ENVIRONMENT," * Rdata : ");529 _cout(ENVIRONMENT," * Rdata : "); 512 530 for (uint32_t x=0; x<nb_bytes; x++) 513 531 __cout(ENVIRONMENT,"%.2x",0xff&static_cast<uint32_t>(read_dram[0][x])); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Configuration/src/Instance.cpp
r112 r128 144 144 DELETE1(_param->_size_load_queue ,_param->_nb_load_store_unit); 145 145 DELETE1(_param->_size_store_queue ,_param->_nb_load_store_unit); 146 DELETE1(_param->_write_queue_scheme ,_param->_nb_write_bloc); 146 147 DELETE1(_param->_nb_bypass_write ,_param->_nb_write_bloc); 147 148 DELETE1(_param->_size_execute_queue ,_param->_nb_write_bloc); … … 150 151 DELETE1(_param->_size_reservation_station ,_param->_nb_read_bloc); 151 152 DELETE1(_param->_size_read_queue ,_param->_nb_read_bloc); 152 // 153 // DELETE1(_param->_size_read_counter ,_param->_nb_rename_bloc); 153 154 DELETE1(_param->_nb_rename_unit_bank ,_param->_nb_rename_bloc); 154 155 DELETE1(_param->_nb_reg_free ,_param->_nb_rename_bloc); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Configuration/src/Parameter_definition_test.cpp
r88 r128 56 56 57 57 delete tree; 58 58 delete operand; 59 59 60 log_end(Configuration,FUNCTION); 60 61 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Core_Glue/SelfTest/config-1_front_end-1_ooo_engine-1_execute_loop.cfg
r88 r128 11 11 4 4 +1 # ooo_engine_nb_inst_branch_complete [0] [nb_ooo_engine] 12 12 4 4 +1 # nb_inst_insert [0] [nb_ooo_engine] 13 4 4 +1 # nb_inst_reexecute [0] [nb_ooo_engine] 13 14 4 4 +1 # nb_inst_issue [0] [nb_ooo_engine] 14 15 4 4 +1 # nb_inst_execute [0] [nb_ooo_engine] -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Core_Glue/SelfTest/config-4_front_end-1_ooo_engine-1_execute_loop.cfg
r88 r128 20 20 4 4 +1 # ooo_engine_nb_inst_branch_complete [0] [nb_ooo_engine] 21 21 3 3 +1 # nb_inst_insert [0] [nb_ooo_engine] 22 3 3 +1 # nb_inst_reexecute [0] [nb_ooo_engine] 22 23 3 3 +1 # nb_inst_issue [0] [nb_ooo_engine] 23 24 4 4 +1 # nb_inst_execute [0] [nb_ooo_engine] -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Core_Glue/SelfTest/config-4_front_end-3_ooo_engine-1_execute_loop.cfg
r88 r128 28 28 1 1 +1 # nb_inst_insert [1] [nb_ooo_engine] 29 29 2 2 +1 # nb_inst_insert [2] [nb_ooo_engine] 30 3 3 +1 # nb_inst_reexecute [0] [nb_ooo_engine] 31 1 1 +1 # nb_inst_reexecute [1] [nb_ooo_engine] 32 2 2 +1 # nb_inst_reexecute [2] [nb_ooo_engine] 30 33 3 3 +1 # nb_inst_issue [0] [nb_ooo_engine] 31 34 1 1 +1 # nb_inst_issue [1] [nb_ooo_engine] -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Core_Glue/SelfTest/config-4_front_end-3_ooo_engine-2_execute_loop.cfg
r88 r128 29 29 1 1 +1 # nb_inst_insert [1] [nb_ooo_engine] 30 30 2 2 +1 # nb_inst_insert [2] [nb_ooo_engine] 31 3 3 +1 # nb_inst_reexecute [0] [nb_ooo_engine] 32 1 1 +1 # nb_inst_reexecute [1] [nb_ooo_engine] 33 2 2 +1 # nb_inst_reexecute [2] [nb_ooo_engine] 31 34 3 3 +1 # nb_inst_issue [0] [nb_ooo_engine] 32 35 1 1 +1 # nb_inst_issue [1] [nb_ooo_engine] -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Core_Glue/SelfTest/config-min.cfg
r117 r128 11 11 1 1 +1 # ooo_engine_nb_inst_branch_complete [0] [nb_ooo_engine] 12 12 1 1 +1 # nb_inst_insert [0] [nb_ooo_engine] 13 1 1 +1 # nb_inst_reexecute [0] [nb_ooo_engine] 13 14 1 1 +1 # nb_inst_issue [0] [nb_ooo_engine] 14 15 1 1 +1 # nb_inst_execute [0][0] [nb_ooo_engine][ooo_engine_nb_execute_loop] -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Core_Glue/SelfTest/src/main.cpp
r117 r128 25 25 err (_(" * ooo_engine_nb_inst_branch_complete [nb_ooo_engine] (uint32_t )\n")); 26 26 err (_(" * nb_inst_insert [nb_ooo_engine] (uint32_t )\n")); 27 err (_(" * nb_inst_reexecute [nb_ooo_engine] (uint32_t )\n")); 27 28 //err (_(" * nb_inst_issue_queue [nb_ooo_engine] (uint32_t )\n")); 28 29 err (_(" * nb_inst_issue_slot [nb_ooo_engine] (uint32_t )\n")); 29 30 err (_(" * nb_inst_execute [nb_ooo_engine][ooo_engine_nb_execute_loop] (uint32_t )\n")); 31 //err (_(" * issue_queue_in_order [nb_ooo_engine] (bool )\n")); 30 32 err (_(" * nb_read_unit [nb_execute_loop] (uint32_t )\n")); 31 33 err (_(" * nb_write_unit [nb_execute_loop] (uint32_t )\n")); … … 86 88 uint32_t * ooo_engine_nb_inst_branch_complete ;//[nb_ooo_engine] 87 89 uint32_t * nb_inst_insert ;//[nb_ooo_engine] 90 uint32_t * nb_inst_reexecute ;//[nb_ooo_engine] 88 91 uint32_t * nb_inst_issue_slot ;//[nb_ooo_engine] 89 92 uint32_t ** nb_inst_execute ;//[nb_ooo_engine][ooo_engine_nb_execute_loop] 93 bool * issue_queue_in_order ;//[nb_ooo_engine] 90 94 uint32_t * nb_read_unit ;//[nb_execute_loop] 91 95 uint32_t * nb_write_unit ;//[nb_execute_loop] … … 121 125 nb_params = static_cast<int> (2+NB_PARAMS+ 122 126 3*nb_front_end+ 123 5*nb_ooo_engine+127 6*nb_ooo_engine+ 124 128 3*nb_execute_loop 125 129 ); … … 134 138 SELFTEST1(ooo_engine_nb_inst_branch_complete ,uint32_t ,argv,x,nb_ooo_engine); 135 139 SELFTEST1(nb_inst_insert ,uint32_t ,argv,x,nb_ooo_engine); 140 SELFTEST1(nb_inst_reexecute ,uint32_t ,argv,x,nb_ooo_engine); 136 141 SELFTEST1(nb_inst_issue_slot ,uint32_t ,argv,x,nb_ooo_engine); 137 142 … … 149 154 nb_params = static_cast<int> (2+NB_PARAMS+ 150 155 3*nb_front_end+ 151 5*nb_ooo_engine+156 6*nb_ooo_engine+ 152 157 3*nb_execute_loop+ 153 158 1*sum_ooo_engine_nb_execute_loop … … 157 162 158 163 SELFTEST2(nb_inst_execute ,uint32_t ,argv,x,nb_ooo_engine,ooo_engine_nb_execute_loop[it1]); 164 165 ALLOC1 (issue_queue_in_order ,bool ,nb_ooo_engine); 166 for (uint32_t i=0; i<nb_ooo_engine; ++i) 167 issue_queue_in_order [i] = true; 168 159 169 SELFTEST1(nb_read_unit ,uint32_t ,argv,x,nb_execute_loop); 160 170 SELFTEST1(nb_write_unit ,uint32_t ,argv,x,nb_execute_loop); … … 179 189 nb_params = static_cast<int> (2+NB_PARAMS+ 180 190 3*nb_front_end+ 181 5*nb_ooo_engine+191 6*nb_ooo_engine+ 182 192 3*nb_execute_loop+ 183 193 sum_nb_inst_issue*sum_nb_read_unit+ … … 239 249 ooo_engine_nb_inst_branch_complete ,//[nb_ooo_engine] 240 250 nb_inst_insert ,//[nb_ooo_engine] 251 nb_inst_reexecute ,//[nb_ooo_engine] 241 252 nb_inst_issue_slot ,//[nb_ooo_engine] 242 253 nb_inst_issue_slot ,//[nb_ooo_engine] 243 254 nb_inst_execute ,//[nb_ooo_engine][ooo_engine_nb_execute_loop] 255 issue_queue_in_order ,//[nb_ooo_engine] 244 256 nb_read_unit ,//[nb_execute_loop] 245 257 nb_write_unit ,//[nb_execute_loop] … … 265 277 266 278 test (name,param); 279 280 delete param; 267 281 } 268 282 catch (morpheo::ErrorMorpheo & error) … … 285 299 } 286 300 287 DELETE2(translate_execute_loop_num_ooo_engine,nb_execute_loop,execute_loop_nb_ooo_engine[it1]); 288 DELETE2(translate_ooo_engine_num_execute_loop,nb_ooo_engine,ooo_engine_nb_execute_loop[it1]); 289 DELETE2(translate_ooo_engine_num_front_end ,nb_ooo_engine,ooo_engine_nb_front_end[it1]); 290 DELETE3(table_issue_type ,nb_execute_loop,nb_read_unit[it1],MAX_TYPE); 291 DELETE4(table_dispatch ,nb_ooo_engine,nb_inst_issue_slot[it1],nb_execute_loop,nb_read_unit[it2]); 301 //DELETE0(size_special_register ); 302 //DELETE0(size_general_register ); 303 //DELETE0(size_special_data ); 304 //DELETE0(size_general_data ); 305 //DELETE0(size_store_queue_ptr ); 306 //DELETE0(size_load_queue_ptr ); 307 //DELETE0(size_rob_ptr ); 308 //DELETE0(size_depth ); 292 309 DELETE1(nb_write_unit ,nb_execute_loop); 293 310 DELETE1(nb_read_unit ,nb_execute_loop); 311 DELETE1(issue_queue_in_order ,nb_ooo_engine); 294 312 DELETE2(nb_inst_execute ,nb_ooo_engine,ooo_engine_nb_execute_loop[it1]); 295 313 DELETE1(nb_inst_issue_slot ,nb_ooo_engine); 314 DELETE1(nb_inst_reexecute ,nb_ooo_engine); 315 DELETE1(nb_inst_insert ,nb_ooo_engine); 296 316 DELETE1(ooo_engine_nb_inst_branch_complete ,nb_ooo_engine); 297 317 DELETE1(front_end_nb_inst_branch_complete ,nb_front_end); … … 300 320 DELETE1(ooo_engine_nb_execute_loop ,nb_ooo_engine); 301 321 DELETE1(ooo_engine_nb_front_end ,nb_ooo_engine); 322 //DELETE0(nb_execute_loop ); 323 //DELETE0(nb_ooo_engine ); 302 324 DELETE1(nb_context ,nb_front_end); 325 //DELETE0(nb_front_end ); 303 326 304 327 return (_return); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Core_Glue/SelfTest/src/test.cpp
r117 r128 19 19 morpheo::behavioural::Parameters_Statistics * _parameters_statistics = new morpheo::behavioural::Parameters_Statistics (5,CYCLE_MAX); 20 20 #endif 21 22 _model.set_model(NAME_Core_Glue,MODEL_SYSTEMC,true); 21 23 22 24 Tusage_t _usage = USE_ALL; … … 50 52 51 53 sc_signal<Tcontext_t > *** out_RENAME_FRONT_END_ID ; 54 52 55 sc_signal<Tcontrol_t > *** out_BRANCH_COMPLETE_FRONT_END_VAL ; 53 56 sc_signal<Tcontrol_t > *** in_BRANCH_COMPLETE_FRONT_END_ACK ; … … 57 60 sc_signal<Tcontrol_t > *** out_BRANCH_COMPLETE_FRONT_END_NO_SEQUENCE ; 58 61 sc_signal<Tcontrol_t > *** in_BRANCH_COMPLETE_FRONT_END_MISS_PREDICTION ; 62 59 63 sc_signal<Tcontrol_t > *** in_BRANCH_COMPLETE_OOO_ENGINE_VAL ; 60 64 sc_signal<Tcontrol_t > *** out_BRANCH_COMPLETE_OOO_ENGINE_ACK ; … … 65 69 sc_signal<Tcontrol_t > *** in_BRANCH_COMPLETE_OOO_ENGINE_NO_SEQUENCE ; 66 70 sc_signal<Tcontrol_t > *** out_BRANCH_COMPLETE_OOO_ENGINE_MISS_PREDICTION; 71 67 72 sc_signal<Tcontrol_t > ** out_COMMIT_EVENT_FRONT_END_VAL ; 68 73 sc_signal<Tcontrol_t > ** in_COMMIT_EVENT_FRONT_END_ACK ; … … 76 81 sc_signal<Tcontrol_t > ** out_COMMIT_EVENT_FRONT_END_ADDRESS_EEAR_VAL ; 77 82 sc_signal<Tgeneral_data_t > ** out_COMMIT_EVENT_FRONT_END_ADDRESS_EEAR ; 83 78 84 sc_signal<Tcontrol_t > ** in_COMMIT_EVENT_OOO_ENGINE_VAL ; 79 85 sc_signal<Tcontrol_t > ** out_COMMIT_EVENT_OOO_ENGINE_ACK ; … … 88 94 sc_signal<Tcontrol_t > ** in_COMMIT_EVENT_OOO_ENGINE_ADDRESS_EEAR_VAL ; 89 95 sc_signal<Tgeneral_data_t > ** in_COMMIT_EVENT_OOO_ENGINE_ADDRESS_EEAR ; 96 90 97 sc_signal<Tcontrol_t > *** in_ISSUE_OOO_ENGINE_VAL ; 91 98 sc_signal<Tcontrol_t > *** out_ISSUE_OOO_ENGINE_ACK ; … … 96 103 sc_signal<Toperation_t > *** in_ISSUE_OOO_ENGINE_OPERATION ; 97 104 sc_signal<Tlsq_ptr_t > *** in_ISSUE_OOO_ENGINE_STORE_QUEUE_PTR_WRITE ; 105 sc_signal<Tlsq_ptr_t > *** in_ISSUE_OOO_ENGINE_STORE_QUEUE_PTR_READ ; 106 sc_signal<Tcontrol_t > *** in_ISSUE_OOO_ENGINE_STORE_QUEUE_EMPTY ; 98 107 sc_signal<Tlsq_ptr_t > *** in_ISSUE_OOO_ENGINE_LOAD_QUEUE_PTR_WRITE ; 99 108 sc_signal<Tcontrol_t > *** in_ISSUE_OOO_ENGINE_HAS_IMMEDIAT ; … … 109 118 sc_signal<Tcontrol_t > *** in_ISSUE_OOO_ENGINE_WRITE_RE ; 110 119 sc_signal<Tspecial_address_t> *** in_ISSUE_OOO_ENGINE_NUM_REG_RE ; 120 111 121 sc_signal<Tcontrol_t > *** out_ISSUE_EXECUTE_LOOP_VAL ; 112 122 sc_signal<Tcontrol_t > *** in_ISSUE_EXECUTE_LOOP_ACK ; … … 118 128 sc_signal<Ttype_t > *** out_ISSUE_EXECUTE_LOOP_TYPE ; 119 129 sc_signal<Tlsq_ptr_t > *** out_ISSUE_EXECUTE_LOOP_STORE_QUEUE_PTR_WRITE ; 130 sc_signal<Tlsq_ptr_t > *** out_ISSUE_EXECUTE_LOOP_STORE_QUEUE_PTR_READ ; 131 sc_signal<Tcontrol_t > *** out_ISSUE_EXECUTE_LOOP_STORE_QUEUE_EMPTY ; 120 132 sc_signal<Tlsq_ptr_t > *** out_ISSUE_EXECUTE_LOOP_LOAD_QUEUE_PTR_WRITE ; 121 133 sc_signal<Tcontrol_t > *** out_ISSUE_EXECUTE_LOOP_HAS_IMMEDIAT ; … … 131 143 sc_signal<Tcontrol_t > *** out_ISSUE_EXECUTE_LOOP_WRITE_RE ; 132 144 sc_signal<Tspecial_address_t> *** out_ISSUE_EXECUTE_LOOP_NUM_REG_RE ; 145 133 146 sc_signal<Tcontrol_t > **** out_EXECUTE_OOO_ENGINE_VAL ; 134 147 sc_signal<Tcontrol_t > **** in_EXECUTE_OOO_ENGINE_ACK ; … … 143 156 sc_signal<Taddress_t > **** out_EXECUTE_OOO_ENGINE_ADDRESS ; 144 157 sc_signal<Tgeneral_data_t > **** out_EXECUTE_OOO_ENGINE_DATA ; 158 145 159 sc_signal<Tcontrol_t > *** in_EXECUTE_EXECUTE_LOOP_VAL ; 146 160 sc_signal<Tcontrol_t > *** out_EXECUTE_EXECUTE_LOOP_ACK ; … … 156 170 sc_signal<Taddress_t > *** in_EXECUTE_EXECUTE_LOOP_ADDRESS ; 157 171 sc_signal<Tgeneral_data_t > *** in_EXECUTE_EXECUTE_LOOP_DATA ; 172 158 173 sc_signal<Tcontrol_t > *** in_INSERT_OOO_ENGINE_VAL ; 159 174 sc_signal<Tcontrol_t > *** out_INSERT_OOO_ENGINE_ACK ; … … 216 231 ALLOC2_SC_SIGNAL( in_ISSUE_OOO_ENGINE_OPERATION ," in_ISSUE_OOO_ENGINE_OPERATION ",Toperation_t ,_param->_nb_ooo_engine,_param->_nb_inst_issue_queue[it1]); 217 232 ALLOC2_SC_SIGNAL( in_ISSUE_OOO_ENGINE_STORE_QUEUE_PTR_WRITE ," in_ISSUE_OOO_ENGINE_STORE_QUEUE_PTR_WRITE ",Tlsq_ptr_t ,_param->_nb_ooo_engine,_param->_nb_inst_issue_queue[it1]); 233 ALLOC2_SC_SIGNAL( in_ISSUE_OOO_ENGINE_STORE_QUEUE_PTR_READ ," in_ISSUE_OOO_ENGINE_STORE_QUEUE_PTR_READ ",Tlsq_ptr_t ,_param->_nb_ooo_engine,_param->_nb_inst_issue_queue[it1]); 234 ALLOC2_SC_SIGNAL( in_ISSUE_OOO_ENGINE_STORE_QUEUE_EMPTY ," in_ISSUE_OOO_ENGINE_STORE_QUEUE_EMPTY ",Tcontrol_t ,_param->_nb_ooo_engine,_param->_nb_inst_issue_queue[it1]); 218 235 ALLOC2_SC_SIGNAL( in_ISSUE_OOO_ENGINE_LOAD_QUEUE_PTR_WRITE ," in_ISSUE_OOO_ENGINE_LOAD_QUEUE_PTR_WRITE ",Tlsq_ptr_t ,_param->_nb_ooo_engine,_param->_nb_inst_issue_queue[it1]); 219 236 ALLOC2_SC_SIGNAL( in_ISSUE_OOO_ENGINE_HAS_IMMEDIAT ," in_ISSUE_OOO_ENGINE_HAS_IMMEDIAT ",Tcontrol_t ,_param->_nb_ooo_engine,_param->_nb_inst_issue_queue[it1]); … … 238 255 ALLOC2_SC_SIGNAL(out_ISSUE_EXECUTE_LOOP_TYPE ,"out_ISSUE_EXECUTE_LOOP_TYPE ",Ttype_t ,_param->_nb_execute_loop,_param->_nb_read_unit[it1]); 239 256 ALLOC2_SC_SIGNAL(out_ISSUE_EXECUTE_LOOP_STORE_QUEUE_PTR_WRITE ,"out_ISSUE_EXECUTE_LOOP_STORE_QUEUE_PTR_WRITE ",Tlsq_ptr_t ,_param->_nb_execute_loop,_param->_nb_read_unit[it1]); 257 ALLOC2_SC_SIGNAL(out_ISSUE_EXECUTE_LOOP_STORE_QUEUE_PTR_READ ,"out_ISSUE_EXECUTE_LOOP_STORE_QUEUE_PTR_READ ",Tlsq_ptr_t ,_param->_nb_execute_loop,_param->_nb_read_unit[it1]); 258 ALLOC2_SC_SIGNAL(out_ISSUE_EXECUTE_LOOP_STORE_QUEUE_EMPTY ,"out_ISSUE_EXECUTE_LOOP_STORE_QUEUE_EMPTY ",Tcontrol_t ,_param->_nb_execute_loop,_param->_nb_read_unit[it1]); 240 259 ALLOC2_SC_SIGNAL(out_ISSUE_EXECUTE_LOOP_LOAD_QUEUE_PTR_WRITE ,"out_ISSUE_EXECUTE_LOOP_LOAD_QUEUE_PTR_WRITE ",Tlsq_ptr_t ,_param->_nb_execute_loop,_param->_nb_read_unit[it1]); 241 260 ALLOC2_SC_SIGNAL(out_ISSUE_EXECUTE_LOOP_HAS_IMMEDIAT ,"out_ISSUE_EXECUTE_LOOP_HAS_IMMEDIAT ",Tcontrol_t ,_param->_nb_execute_loop,_param->_nb_read_unit[it1]); … … 358 377 INSTANCE2_SC_SIGNAL(_Core_Glue, in_ISSUE_OOO_ENGINE_TYPE ,_param->_nb_ooo_engine,_param->_nb_inst_issue_queue[it1]); 359 378 INSTANCE2_SC_SIGNAL(_Core_Glue, in_ISSUE_OOO_ENGINE_OPERATION ,_param->_nb_ooo_engine,_param->_nb_inst_issue_queue[it1]); 360 INSTANCE2_SC_SIGNAL(_Core_Glue, in_ISSUE_OOO_ENGINE_STORE_QUEUE_PTR_WRITE ,_param->_nb_ooo_engine,_param->_nb_inst_issue_queue[it1]); 379 INSTANCE2_SC_SIGNAL(_Core_Glue, in_ISSUE_OOO_ENGINE_STORE_QUEUE_PTR_WRITE ,_param->_nb_ooo_engine,_param->_nb_inst_issue_queue[it1]); 380 INSTANCE2_SC_SIGNAL(_Core_Glue, in_ISSUE_OOO_ENGINE_STORE_QUEUE_PTR_READ ,_param->_nb_ooo_engine,_param->_nb_inst_issue_queue[it1]); 381 INSTANCE2_SC_SIGNAL(_Core_Glue, in_ISSUE_OOO_ENGINE_STORE_QUEUE_EMPTY ,_param->_nb_ooo_engine,_param->_nb_inst_issue_queue[it1]); 361 382 if (_param->_have_port_load_queue_ptr) 362 383 INSTANCE2_SC_SIGNAL(_Core_Glue, in_ISSUE_OOO_ENGINE_LOAD_QUEUE_PTR_WRITE ,_param->_nb_ooo_engine,_param->_nb_inst_issue_queue[it1]); … … 386 407 INSTANCE2_SC_SIGNAL(_Core_Glue,out_ISSUE_EXECUTE_LOOP_TYPE ,_param->_nb_execute_loop,_param->_nb_read_unit[it1]); 387 408 INSTANCE2_SC_SIGNAL(_Core_Glue,out_ISSUE_EXECUTE_LOOP_STORE_QUEUE_PTR_WRITE ,_param->_nb_execute_loop,_param->_nb_read_unit[it1]); 409 INSTANCE2_SC_SIGNAL(_Core_Glue,out_ISSUE_EXECUTE_LOOP_STORE_QUEUE_PTR_READ ,_param->_nb_execute_loop,_param->_nb_read_unit[it1]); 410 INSTANCE2_SC_SIGNAL(_Core_Glue,out_ISSUE_EXECUTE_LOOP_STORE_QUEUE_EMPTY ,_param->_nb_execute_loop,_param->_nb_read_unit[it1]); 388 411 if (_param->_have_port_load_queue_ptr) 389 412 INSTANCE2_SC_SIGNAL(_Core_Glue,out_ISSUE_EXECUTE_LOOP_LOAD_QUEUE_PTR_WRITE ,_param->_nb_execute_loop,_param->_nb_read_unit[it1]); … … 469 492 in_NRESET->write(1); 470 493 494 #ifdef SELFTEST 471 495 LABEL("Test RENAME_FRONT_END_ID"); 472 496 if (_param->_have_port_front_end_id) … … 612 636 in_ISSUE_OOO_ENGINE_OPERATION [i][j]->write(range<Ttype_t >(rand(),_param->_size_type )); 613 637 in_ISSUE_OOO_ENGINE_STORE_QUEUE_PTR_WRITE [i][j]->write(range<Tlsq_ptr_t >(rand(),_param->_size_store_queue_ptr )); 638 in_ISSUE_OOO_ENGINE_STORE_QUEUE_PTR_READ [i][j]->write(range<Tlsq_ptr_t >(rand(),_param->_size_store_queue_ptr )); 639 in_ISSUE_OOO_ENGINE_STORE_QUEUE_EMPTY [i][j]->write(rand()%2); 614 640 in_ISSUE_OOO_ENGINE_LOAD_QUEUE_PTR_WRITE [i][j]->write(range<Tlsq_ptr_t >(rand(),_param->_size_load_queue_ptr )); 615 641 in_ISSUE_OOO_ENGINE_HAS_IMMEDIAT [i][j]->write(rand()%2); … … 751 777 TEST(Tlsq_ptr_t ,out_ISSUE_EXECUTE_LOOP_STORE_QUEUE_PTR_WRITE [i][j]->read(), 752 778 in_ISSUE_OOO_ENGINE_STORE_QUEUE_PTR_WRITE [x][y]->read()); 779 TEST(Tlsq_ptr_t ,out_ISSUE_EXECUTE_LOOP_STORE_QUEUE_PTR_READ [i][j]->read(), 780 in_ISSUE_OOO_ENGINE_STORE_QUEUE_PTR_READ [x][y]->read()); 781 TEST(Tlsq_ptr_t ,out_ISSUE_EXECUTE_LOOP_STORE_QUEUE_EMPTY [i][j]->read(), 782 in_ISSUE_OOO_ENGINE_STORE_QUEUE_EMPTY [x][y]->read()); 753 783 TEST(Tlsq_ptr_t ,out_ISSUE_EXECUTE_LOOP_LOAD_QUEUE_PTR_WRITE [i][j]->read(), 754 784 in_ISSUE_OOO_ENGINE_LOAD_QUEUE_PTR_WRITE [x][y]->read()); … … 781 811 SC_START(1); 782 812 } 813 #else 814 SC_START(5); 815 #endif 783 816 784 817 /******************************************************** … … 841 874 DELETE2_SC_SIGNAL( in_ISSUE_OOO_ENGINE_OPERATION ,_param->_nb_ooo_engine,_param->_nb_inst_issue_queue[it1]); 842 875 DELETE2_SC_SIGNAL( in_ISSUE_OOO_ENGINE_STORE_QUEUE_PTR_WRITE ,_param->_nb_ooo_engine,_param->_nb_inst_issue_queue[it1]); 876 DELETE2_SC_SIGNAL( in_ISSUE_OOO_ENGINE_STORE_QUEUE_PTR_READ ,_param->_nb_ooo_engine,_param->_nb_inst_issue_queue[it1]); 877 DELETE2_SC_SIGNAL( in_ISSUE_OOO_ENGINE_STORE_QUEUE_EMPTY ,_param->_nb_ooo_engine,_param->_nb_inst_issue_queue[it1]); 843 878 DELETE2_SC_SIGNAL( in_ISSUE_OOO_ENGINE_LOAD_QUEUE_PTR_WRITE ,_param->_nb_ooo_engine,_param->_nb_inst_issue_queue[it1]); 844 879 DELETE2_SC_SIGNAL( in_ISSUE_OOO_ENGINE_HAS_IMMEDIAT ,_param->_nb_ooo_engine,_param->_nb_inst_issue_queue[it1]); … … 863 898 DELETE2_SC_SIGNAL(out_ISSUE_EXECUTE_LOOP_TYPE ,_param->_nb_execute_loop,_param->_nb_read_unit[it1]); 864 899 DELETE2_SC_SIGNAL(out_ISSUE_EXECUTE_LOOP_STORE_QUEUE_PTR_WRITE ,_param->_nb_execute_loop,_param->_nb_read_unit[it1]); 900 DELETE2_SC_SIGNAL(out_ISSUE_EXECUTE_LOOP_STORE_QUEUE_PTR_READ ,_param->_nb_execute_loop,_param->_nb_read_unit[it1]); 901 DELETE2_SC_SIGNAL(out_ISSUE_EXECUTE_LOOP_STORE_QUEUE_EMPTY ,_param->_nb_execute_loop,_param->_nb_read_unit[it1]); 865 902 DELETE2_SC_SIGNAL(out_ISSUE_EXECUTE_LOOP_LOAD_QUEUE_PTR_WRITE ,_param->_nb_execute_loop,_param->_nb_read_unit[it1]); 866 903 DELETE2_SC_SIGNAL(out_ISSUE_EXECUTE_LOOP_HAS_IMMEDIAT ,_param->_nb_execute_loop,_param->_nb_read_unit[it1]); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Core_Glue/src/Core_Glue_allocation.cpp
r122 r128 10 10 #include "Common/include/Max.h" 11 11 12 namespace morpheo 12 namespace morpheo { 13 13 namespace behavioural { 14 14 namespace core { 15 15 namespace core_glue { 16 17 18 16 19 17 #undef FUNCTION -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Dcache_Access/SelfTest/src/main.cpp
r88 r128 15 15 err (_("<Usage> %s name_instance list_params.\n"),argv[0]); 16 16 err (_("list_params is :\n")); 17 //err (_(" * nb_thread (uint32_t )\n")); 17 18 err (_(" * nb_execute_loop (uint32_t )\n")); 18 19 err (_(" * nb_load_store_unit [nb_execute_loop] (uint32_t )\n")); … … 158 159 159 160 test (name,param); 161 162 delete param; 160 163 } 161 164 catch (morpheo::ErrorMorpheo & error) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Dcache_Access/SelfTest/src/test.cpp
r88 r128 54 54 sc_clock * in_CLOCK = new sc_clock ("clock", 1.0, 0.5); 55 55 sc_signal<Tcontrol_t> * in_NRESET = new sc_signal<Tcontrol_t> ("NRESET"); 56 57 sc_signal<Tcontrol_t > ** out_DCACHE_REQ_VAL ; 58 sc_signal<Tcontrol_t > ** in_DCACHE_REQ_ACK ; 59 sc_signal<Tcontext_t > ** out_DCACHE_REQ_THREAD_ID ; 60 sc_signal<Tpacket_t > ** out_DCACHE_REQ_PACKET_ID ; 61 sc_signal<Tdcache_address_t > ** out_DCACHE_REQ_ADDRESS ; 62 sc_signal<Tdcache_data_t > ** out_DCACHE_REQ_WDATA ; 63 sc_signal<Tdcache_type_t > ** out_DCACHE_REQ_TYPE ; 64 65 sc_signal<Tcontrol_t > ** in_DCACHE_RSP_VAL ; 66 sc_signal<Tcontrol_t > ** out_DCACHE_RSP_ACK ; 67 sc_signal<Tcontext_t > ** in_DCACHE_RSP_THREAD_ID ; 68 sc_signal<Tpacket_t > ** in_DCACHE_RSP_PACKET_ID ; 69 sc_signal<Tdcache_data_t > ** in_DCACHE_RSP_RDATA ; 70 sc_signal<Tdcache_error_t > ** in_DCACHE_RSP_ERROR ; 71 72 sc_signal<Tcontrol_t > **** in_LSQ_REQ_VAL ; 73 sc_signal<Tcontrol_t > **** out_LSQ_REQ_ACK ; 74 sc_signal<Tcontext_t > **** in_LSQ_REQ_THREAD_ID ; 75 sc_signal<Tpacket_t > **** in_LSQ_REQ_PACKET_ID ; 76 sc_signal<Tdcache_address_t > **** in_LSQ_REQ_ADDRESS ; 77 sc_signal<Tdcache_data_t > **** in_LSQ_REQ_WDATA ; 78 sc_signal<Tdcache_type_t > **** in_LSQ_REQ_TYPE ; 79 80 sc_signal<Tcontrol_t > **** out_LSQ_RSP_VAL ; 81 sc_signal<Tcontrol_t > **** in_LSQ_RSP_ACK ; 82 sc_signal<Tcontext_t > **** out_LSQ_RSP_THREAD_ID ; 83 sc_signal<Tpacket_t > **** out_LSQ_RSP_PACKET_ID ; 84 sc_signal<Tdcache_data_t > **** out_LSQ_RSP_RDATA ; 85 sc_signal<Tdcache_error_t > **** out_LSQ_RSP_ERROR ; 56 86 57 87 ALLOC1_SC_SIGNAL(out_DCACHE_REQ_VAL ,"out_DCACHE_REQ_VAL ",Tcontrol_t ,_param->_nb_dcache_port); … … 183 213 in_NRESET->write(1); 184 214 215 #ifdef SELFTEST 185 216 LABEL("Loop of Test"); 186 217 … … 280 311 SC_START(1); 281 312 } 313 #else 314 SC_START(5); 315 #endif 282 316 283 317 /******************************************************** -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Dcache_Access/src/Dcache_Access_genMealy_req.cpp
r123 r128 20 20 { 21 21 log_begin(Dcache_Access,FUNCTION); 22 log_function(Dcache_Access,FUNCTION,_name.c_str()); 22 23 23 24 if (PORT_READ(in_NRESET)) … … 53 54 { 54 55 uint32_t num_port = _param->_table_routing[num_execute_loop][num_load_store_unit][num_cache_access]; 56 57 log_printf(TRACE,Dcache_Access,FUNCTION," * LSQ_REQ [%d][%d][%d] <-> DCACHE_REQ [%d]",num_execute_loop,num_load_store_unit,num_cache_access,num_port); 58 55 59 Tcontrol_t dcache_req_ack = PORT_READ(in_DCACHE_REQ_ACK [num_port]); 56 60 57 log_printf(TRACE,Dcache_Access,FUNCTION," * num_port : %d",num_port);58 59 61 #ifdef STATISTICS 60 62 if (dcache_req_ack) … … 67 69 if (not dcache_req_val [num_port]) 68 70 { 71 log_printf(TRACE,Dcache_Access,FUNCTION," * is valid !!!"); 72 69 73 dcache_req_val [num_port] = 1; 70 74 lsq_req_ack [num_execute_loop][num_load_store_unit][num_cache_access] = dcache_req_ack; 71 75 72 log_printf(TRACE,Dcache_Access,FUNCTION," * kane - dcache");73 74 76 if (_param->_have_port_dcache_thread_id) 75 77 { … … 79 81 log_printf(TRACE,Dcache_Access,FUNCTION," * num_thread : %d",num_thread ); 80 82 83 #ifdef DEBUG_TEST 84 if (num_thread >= _param->_nb_thread) 85 throw ERRORMORPHEO(FUNCTION,toString(_("Invalid thread number : %d\n"),num_thread)); 86 #endif 81 87 82 88 PORT_WRITE(out_DCACHE_REQ_THREAD_ID [num_port], num_thread); … … 88 94 if (_param->_have_port_dcache_packet_id) 89 95 { 90 Tpacket_t packet_id = (_param->_have_port_lsq_packet_id [num_execute_loop][num_load_store_unit])?PORT_READ(in_LSQ_REQ_PACKET_ID [num_execute_loop][num_load_store_unit][num_cache_access]):0; 91 PORT_WRITE(out_DCACHE_REQ_PACKET_ID [num_port], ((num_cache_access << _param->_shift_num_cache_access )+ 92 packet_id)); 96 Tpacket_t packet_id = ((num_cache_access << _param->_shift_num_cache_access)+ 97 ((_param->_have_port_lsq_packet_id [num_execute_loop][num_load_store_unit])?PORT_READ(in_LSQ_REQ_PACKET_ID [num_execute_loop][num_load_store_unit][num_cache_access]):0)); 98 99 log_printf(TRACE,Dcache_Access,FUNCTION," * packet_id : %d",packet_id); 100 101 PORT_WRITE(out_DCACHE_REQ_PACKET_ID [num_port], packet_id); 93 102 } 94 103 PORT_WRITE(out_DCACHE_REQ_ADDRESS [num_port], PORT_READ(in_LSQ_REQ_ADDRESS [num_execute_loop][num_load_store_unit][num_cache_access])); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Dcache_Access/src/Dcache_Access_genMealy_rsp.cpp
r123 r128 20 20 { 21 21 log_begin(Dcache_Access,FUNCTION); 22 log_function(Dcache_Access,FUNCTION,_name.c_str()); 22 23 23 24 if (PORT_READ(in_NRESET)) … … 46 47 Tpacket_t lsq_packet_id = packet_id & _param->_mask_num_lsq_packet; 47 48 48 // log_printf(TRACE,Dcache_Access,FUNCTION,"thread_id : %d",thread_id); 49 // log_printf(TRACE,Dcache_Access,FUNCTION,"execute_loop_id : %d",execute_loop_id); 50 // log_printf(TRACE,Dcache_Access,FUNCTION,"load_store_unit_id : %d",load_store_unit_id); 51 // log_printf(TRACE,Dcache_Access,FUNCTION,"cache_access_id : %d",cache_access_id); 49 log_printf(TRACE,Dcache_Access,FUNCTION," * DCACHE_RSP [%d] <-> LSQ_RSP [%d][%d][%d]",i,execute_loop_id,load_store_unit_id,cache_access_id); 50 51 log_printf(TRACE,Dcache_Access,FUNCTION," * thread_id : %d",thread_id); 52 log_printf(TRACE,Dcache_Access,FUNCTION," * execute_loop_id : %d",execute_loop_id); 53 log_printf(TRACE,Dcache_Access,FUNCTION," * load_store_unit_id : %d",load_store_unit_id); 54 log_printf(TRACE,Dcache_Access,FUNCTION," * context_id : %d",context_id); 55 log_printf(TRACE,Dcache_Access,FUNCTION," * packet_id : %d",thread_id); 56 log_printf(TRACE,Dcache_Access,FUNCTION," * cache_access_id : %d",cache_access_id); 57 log_printf(TRACE,Dcache_Access,FUNCTION," * lsq_packet_id : %d",lsq_packet_id); 52 58 53 59 #ifdef DEBUG_TEST -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Dcache_Access/src/Parameters.cpp
r88 r128 55 55 _translate_load_store_unit_to_thread = translate_load_store_unit_to_thread; 56 56 57 // log_printf(TRACE,Dcache_Access,FUNCTION," * table_routing"); 58 // for (uint32_t i=0; i<_nb_execute_loop; i++) 59 // for (uint32_t j=0; j<_nb_load_store_unit [i]; ++j) 60 // for (uint32_t k=0; k<_nb_cache_access [i][j]; ++k) 61 // log_printf(TRACE,Dcache_Access,FUNCTION," [%d][%d][%d] %d",i,j,k,_table_routing [i][j][k]); 62 63 // log_printf(TRACE,Dcache_Access,FUNCTION," * translate_load_store_unit_to_thread"); 64 // for (uint32_t i=0; i<_nb_execute_loop; i++) 65 // for (uint32_t j=0; j<_nb_load_store_unit [i]; j++) 66 // for (uint32_t k=0; k<_nb_context[i]; k++) 67 // log_printf(TRACE,Dcache_Access,FUNCTION," [%d][%d][%d] %d",i,j,k,_translate_load_store_unit_to_thread [i][j][k]); 68 57 69 test(); 58 70 … … 93 105 _translate_thread_to_context = new uint32_t [nb_thread]; 94 106 107 log_printf(TRACE,Dcache_Access,FUNCTION," * translate_load_store_unit_to_thread"); 108 95 109 for (uint32_t i=0; i<_nb_execute_loop; ++i) 96 110 for (uint32_t j=0; j<_nb_load_store_unit [i]; ++j) … … 99 113 uint32_t num_thread = _translate_load_store_unit_to_thread [i][j][k]; 100 114 115 log_printf(TRACE,Dcache_Access,FUNCTION," [%d][%d][%d] %d",i,j,k,_translate_load_store_unit_to_thread [i][j][k]); 116 117 if (num_thread < _nb_thread) 118 { 101 119 _translate_thread_to_execute_loop [num_thread] = i; 102 120 _translate_thread_to_load_store_unit [num_thread] = j; 103 121 _translate_thread_to_context [num_thread] = k; 122 } 123 else 124 { 125 _translate_thread_to_execute_loop [num_thread] = _nb_execute_loop; 126 _translate_thread_to_load_store_unit [num_thread] = _nb_load_store_unit [i]; 127 _translate_thread_to_context [num_thread] = _nb_context [i]; 128 } 104 129 } 105 130 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Dcache_Access/src/Parameters_msg_error.cpp
r88 r128 49 49 { 50 50 uint32_t num_thread = _translate_load_store_unit_to_thread [i][j][k]; 51 if (num_thread >= _nb_thread) 52 test.error(toString(_("Context [%d][%d][%d] is linked with an invalid thread id.\n"),i,j,k)); 53 else 54 if (thread_link [num_thread] == true) 55 test.error(toString(_("Context [%d][%d][%d] is linked with an already used thread id.\n"),i,j,k)); 56 else 57 thread_link [num_thread] = true; 51 52 if (num_thread != _nb_thread) 53 thread_link [num_thread] = true; 54 55 // if (num_thread >= _nb_thread) 56 // test.error(toString(_("Context [%d][%d][%d] is linked with an invalid thread id.\n"),i,j,k)); 57 // else 58 // if (thread_link [num_thread] == true) 59 // test.error(toString(_("Context [%d][%d][%d] is linked with an already used thread id.\n"),i,j,k)); 60 // else 61 // thread_link [num_thread] = true; 58 62 } 59 63 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Icache_Access/SelfTest/src/main.cpp
r88 r128 121 121 122 122 test (name,param); 123 124 delete param; 123 125 } 124 126 catch (morpheo::ErrorMorpheo & error) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Icache_Access/SelfTest/src/test.cpp
r112 r128 53 53 sc_clock * in_CLOCK = new sc_clock ("clock", 1.0, 0.5); 54 54 sc_signal<Tcontrol_t> * in_NRESET = new sc_signal<Tcontrol_t> ("NRESET"); 55 56 sc_signal<Tcontrol_t > ** out_ICACHE_REQ_VAL ; 57 sc_signal<Tcontrol_t > ** in_ICACHE_REQ_ACK ; 58 sc_signal<Tcontext_t > ** out_ICACHE_REQ_THREAD_ID ; 59 sc_signal<Tpacket_t > ** out_ICACHE_REQ_PACKET_ID ; 60 sc_signal<Ticache_address_t > ** out_ICACHE_REQ_ADDRESS ; 61 sc_signal<Ticache_type_t > ** out_ICACHE_REQ_TYPE ; 62 sc_signal<Tcontrol_t > ** in_ICACHE_RSP_VAL ; 63 sc_signal<Tcontrol_t > ** out_ICACHE_RSP_ACK ; 64 sc_signal<Tcontext_t > ** in_ICACHE_RSP_THREAD_ID ; 65 sc_signal<Tpacket_t > ** in_ICACHE_RSP_PACKET_ID ; 66 sc_signal<Ticache_instruction_t> *** in_ICACHE_RSP_INSTRUCTION ; 67 sc_signal<Ticache_error_t > ** in_ICACHE_RSP_ERROR ; 68 sc_signal<Tcontrol_t > *** in_CONTEXT_REQ_VAL ; 69 sc_signal<Tcontrol_t > *** out_CONTEXT_REQ_ACK ; 70 //sc_signal<Tcontext_t > *** in_CONTEXT_REQ_THREAD_ID ; 71 sc_signal<Tpacket_t > *** in_CONTEXT_REQ_PACKET_ID ; 72 sc_signal<Ticache_address_t > *** in_CONTEXT_REQ_ADDRESS ; 73 sc_signal<Ticache_type_t > *** in_CONTEXT_REQ_TYPE ; 74 sc_signal<Tcontrol_t > *** out_CONTEXT_RSP_VAL ; 75 sc_signal<Tcontrol_t > *** in_CONTEXT_RSP_ACK ; 76 //sc_signal<Tcontext_t > *** out_CONTEXT_RSP_THREAD_ID ; 77 sc_signal<Tpacket_t > *** out_CONTEXT_RSP_PACKET_ID ; 78 sc_signal<Ticache_instruction_t> **** out_CONTEXT_RSP_INSTRUCTION; 79 sc_signal<Ticache_error_t > *** out_CONTEXT_RSP_ERROR ; 55 80 56 81 ALLOC1_SC_SIGNAL(out_ICACHE_REQ_VAL ,"out_ICACHE_REQ_VAL ",Tcontrol_t ,_param->_nb_icache_port); … … 165 190 in_NRESET->write(1); 166 191 192 #ifdef SELFTEST 167 193 LABEL("Loop of Test"); 168 194 … … 259 285 SC_START(1); 260 286 } 287 #else 288 SC_START(5); 289 #endif 261 290 262 291 /******************************************************** -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/Operation/include/Types.h
r116 r128 109 109 for (uint32_t i=0; i<NB_GROUP; i++) 110 110 { 111 _spr 111 _spr [i] = NULL; 112 112 } 113 113 } … … 117 117 for (uint32_t x=0; x<NB_GROUP; x++) 118 118 if (_spr[x] != NULL) 119 delete _spr[x];120 delete _spr;121 delete _spr_access_mode;119 delete [] _spr[x]; 120 delete [] _spr; 121 delete _spr_access_mode; 122 122 } 123 123 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit_deallocation.cpp
r122 r128 32 32 DELETE0_SIGNAL( in_EXECUTE_IN_VAL ,1); 33 33 DELETE0_SIGNAL(out_EXECUTE_IN_ACK ,1); 34 DELETE0_SIGNAL( in_EXECUTE_IN_CONTEXT_ID , 35 DELETE0_SIGNAL( in_EXECUTE_IN_FRONT_END_ID , 36 DELETE0_SIGNAL( in_EXECUTE_IN_OOO_ENGINE_ID , 37 DELETE0_SIGNAL( in_EXECUTE_IN_PACKET_ID , _param->_size_rob_ptr);38 DELETE0_SIGNAL( in_EXECUTE_IN_OPERATION , 39 DELETE0_SIGNAL( in_EXECUTE_IN_TYPE , 34 DELETE0_SIGNAL( in_EXECUTE_IN_CONTEXT_ID ,_param->_size_context_id ); 35 DELETE0_SIGNAL( in_EXECUTE_IN_FRONT_END_ID ,_param->_size_front_end_id ); 36 DELETE0_SIGNAL( in_EXECUTE_IN_OOO_ENGINE_ID ,_param->_size_ooo_engine_id); 37 DELETE0_SIGNAL( in_EXECUTE_IN_PACKET_ID ,_param->_size_rob_ptr ); 38 DELETE0_SIGNAL( in_EXECUTE_IN_OPERATION ,_param->_size_operation ); 39 DELETE0_SIGNAL( in_EXECUTE_IN_TYPE ,_param->_size_type ); 40 40 DELETE0_SIGNAL( in_EXECUTE_IN_STORE_QUEUE_PTR_WRITE ,_param->_size_store_queue_ptr); 41 41 DELETE0_SIGNAL( in_EXECUTE_IN_STORE_QUEUE_PTR_READ ,_param->_size_store_queue_ptr); 42 DELETE0_SIGNAL( in_EXECUTE_IN_STORE_QUEUE_EMPTY , 42 DELETE0_SIGNAL( in_EXECUTE_IN_STORE_QUEUE_EMPTY ,1); 43 43 DELETE0_SIGNAL( in_EXECUTE_IN_LOAD_QUEUE_PTR_WRITE ,_param->_size_load_queue_ptr); 44 DELETE0_SIGNAL( in_EXECUTE_IN_HAS_IMMEDIAT , 45 DELETE0_SIGNAL( in_EXECUTE_IN_IMMEDIAT , 46 DELETE0_SIGNAL( in_EXECUTE_IN_DATA_RA , 47 DELETE0_SIGNAL( in_EXECUTE_IN_DATA_RB , 48 DELETE0_SIGNAL( in_EXECUTE_IN_DATA_RC , 49 DELETE0_SIGNAL( in_EXECUTE_IN_WRITE_RD , 50 DELETE0_SIGNAL( in_EXECUTE_IN_NUM_REG_RD , 51 DELETE0_SIGNAL( in_EXECUTE_IN_WRITE_RE , 52 DELETE0_SIGNAL( in_EXECUTE_IN_NUM_REG_RE , 44 DELETE0_SIGNAL( in_EXECUTE_IN_HAS_IMMEDIAT ,1); 45 DELETE0_SIGNAL( in_EXECUTE_IN_IMMEDIAT ,_param->_size_general_data); 46 DELETE0_SIGNAL( in_EXECUTE_IN_DATA_RA ,_param->_size_general_data); 47 DELETE0_SIGNAL( in_EXECUTE_IN_DATA_RB ,_param->_size_general_data); 48 DELETE0_SIGNAL( in_EXECUTE_IN_DATA_RC ,_param->_size_special_data); 49 DELETE0_SIGNAL( in_EXECUTE_IN_WRITE_RD ,1); 50 DELETE0_SIGNAL( in_EXECUTE_IN_NUM_REG_RD ,_param->_size_general_register); 51 DELETE0_SIGNAL( in_EXECUTE_IN_WRITE_RE ,1); 52 DELETE0_SIGNAL( in_EXECUTE_IN_NUM_REG_RE ,_param->_size_special_register); 53 53 54 54 DELETE0_SIGNAL(out_EXECUTE_OUT_VAL ,1); … … 72 72 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 73 73 74 for (uint32_t i=0; i<_param->_nb_type; i++) 75 delete [] _function_execute [i]; 76 delete [] _function_execute; 77 74 78 for (uint32_t i=0; i<_param->_nb_context; i++) 75 for (uint32_t j=0; j<_param->_nb_front_end; j++) 76 for (uint32_t k=0; k<_param->_nb_ooo_engine; k++) 77 delete _execute_register [i][j][k]; 79 { 80 for (uint32_t j=0; j<_param->_nb_front_end; j++) 81 { 82 for (uint32_t k=0; k<_param->_nb_ooo_engine; k++) 83 delete _execute_register [i][j][k]; 84 delete [] _execute_register [i][j]; 85 } 86 delete [] _execute_register [i]; 87 } 88 delete [] _execute_register; 78 89 79 DELETE3(_execute_register,_param->_nb_context,_param->_nb_front_end,_param->_nb_ooo_engine);80 DELETE0(_execute_param);90 delete _execute_param; 91 delete _execute_operation_out; 81 92 if (_param->_have_pipeline_in) 82 DELETE0(_execute_operation_in); 83 DELETE0(_execute_operation_out); 84 DELETE2(_function_execute,_param->_nb_type,_param->_nb_operation); 93 delete _execute_operation_in; 85 94 } 86 95 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit_transition.cpp
r118 r128 132 132 execute_operation->_num_reg_re = PORT_READ(in_EXECUTE_IN_NUM_REG_RE ); 133 133 execute_operation->_data_re = 0; // no necessaray 134 execute_operation->_exception = 0; // no necessaray 135 execute_operation->_no_sequence = 0; // no necessaray 136 execute_operation->_address = 0; // no necessaray 134 137 135 138 log_printf(TRACE,Functionnal_unit,FUNCTION," * context_id : %d",execute_operation->_context_id ); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit_deallocation.cpp
r124 r128 122 122 123 123 #if defined(DEBUG) and defined(DEBUG_Load_store_unit) and (DEBUG_Load_store_unit == true) 124 for (uint32_t i=0; i<_param->_nb_thread; ++i) 125 if (_param->_num_thread_valid [i]) 126 { 127 memory_log_file [i].close(); 128 } 124 { 125 for (uint32_t i=0; i<_param->_nb_thread; ++i) 126 if (_param->_num_thread_valid [i]) 127 { 128 memory_log_file [i].close(); 129 } 130 delete [] memory_log_file; 131 } 129 132 #endif 130 133 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/src/Load_store_unit_function_speculative_load_commit_transition.cpp
r124 r128 239 239 _speculative_access_queue_control->clear(); 240 240 241 reg_STORE_QUEUE_PTR_READ = 0;241 reg_STORE_QUEUE_PTR_READ = 0; 242 242 reg_LOAD_QUEUE_CHECK_PRIORITY = 0; 243 243 244 244 for (uint32_t i=0; i< _param->_size_store_queue ; i++) 245 245 { 246 reg_STORE_QUEUE_NB_CHECK [i] = 0; 247 _store_queue [i]._state = STORE_QUEUE_EMPTY; 246 reg_STORE_QUEUE_NB_CHECK [i] = 0; 247 _store_queue [i]._state = STORE_QUEUE_EMPTY; 248 _store_queue [i]._context_id = 0; // not necessary 249 _store_queue [i]._front_end_id = 0; // not necessary 250 _store_queue [i]._ooo_engine_id = 0; // not necessary 251 _store_queue [i]._packet_id = 0; // not necessary 252 _store_queue [i]._operation = 0; // not necessary 253 _store_queue [i]._load_queue_ptr_write = 0; // not necessary 254 _store_queue [i]._address = 0; // not necessary 255 _store_queue [i]._wdata = 0; // not necessary 256 // _store_queue [i]._write_rd = 0; // not necessary 257 // _store_queue [i]._num_reg_rd = 0; // not necessary 258 _store_queue [i]._exception = 0; // not necessary 259 _store_queue [i]._send_commit = 0; // not necessary 248 260 } 249 261 250 262 for (uint32_t i=0; i< _param->_size_load_queue ; i++) 251 _load_queue [i]._state = LOAD_QUEUE_EMPTY; 263 { 264 _load_queue [i]._state = LOAD_QUEUE_EMPTY; 265 _load_queue [i]._context_id = 0; // not necessary 266 _load_queue [i]._front_end_id = 0; // not necessary 267 _load_queue [i]._ooo_engine_id = 0; // not necessary 268 _load_queue [i]._packet_id = 0; // not necessary 269 _load_queue [i]._operation = 0; // not necessary 270 _load_queue [i]._store_queue_ptr_write = 0; // not necessary 271 _load_queue [i]._store_queue_ptr_read = 0; // not necessary 272 _load_queue [i]._store_queue_empty = 0; // not necessary 273 _load_queue [i]._address = 0; // not necessary 274 _load_queue [i]._check_hit_byte = 0; // not necessary 275 _load_queue [i]._check_hit = 0; // not necessary 276 _load_queue [i]._shift = 0; // not necessary 277 _load_queue [i]._is_load_signed = 0; // not necessary 278 _load_queue [i]._access_size = 0; // not necessary 279 _load_queue [i]._rdata = 0; // not necessary 280 _load_queue [i]._write_rd = 0; // not necessary 281 _load_queue [i]._num_reg_rd = 0; // not necessary 282 _load_queue [i]._exception = 0; // not necessary 283 } 252 284 253 285 for (uint32_t i=0; i< _param->_size_speculative_access_queue; i++) 254 _speculative_access_queue [i]._state = SPECULATIVE_ACCESS_QUEUE_EMPTY; 286 { 287 _speculative_access_queue [i]._state = SPECULATIVE_ACCESS_QUEUE_EMPTY; 288 _speculative_access_queue [i]._context_id = 0; // not necessary 289 _speculative_access_queue [i]._front_end_id = 0; // not necessary 290 _speculative_access_queue [i]._ooo_engine_id = 0; // not necessary 291 _speculative_access_queue [i]._packet_id = 0; // not necessary 292 _speculative_access_queue [i]._operation = 0; // not necessary 293 _speculative_access_queue [i]._load_queue_ptr_write = 0; // not necessary 294 _speculative_access_queue [i]._store_queue_ptr_write = 0; // not necessary 295 _speculative_access_queue [i]._store_queue_ptr_read = 0; // not necessary 296 _speculative_access_queue [i]._store_queue_empty = 0; // not necessary 297 _speculative_access_queue [i]._address = 0; // not necessary 298 _speculative_access_queue [i]._write_rd = 0; // not necessary 299 _speculative_access_queue [i]._num_reg_rd = 0; // not necessary 300 _speculative_access_queue [i]._exception = 0; // not necessary 301 } 255 302 } 256 303 else … … 1000 1047 bool have_exception = (exception != EXCEPTION_MEMORY_NONE); 1001 1048 bool need_check= false; 1002 Tlsq_ptr_t 1003 Tlsq_ptr_t 1004 Tcontrol_t 1049 Tlsq_ptr_t store_queue_ptr_write = _speculative_access_queue [internal_SPECULATIVE_ACCESS_QUEUE_PTR_READ]._store_queue_ptr_write; 1050 Tlsq_ptr_t store_queue_ptr_read = _speculative_access_queue [internal_SPECULATIVE_ACCESS_QUEUE_PTR_READ]._store_queue_ptr_read ; 1051 Tcontrol_t store_queue_empty = _speculative_access_queue [internal_SPECULATIVE_ACCESS_QUEUE_PTR_READ]._store_queue_empty ; 1005 1052 1006 1053 if (have_exception) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue_deallocation.cpp
r122 r128 62 62 DELETE0_SIGNAL(out_READ_QUEUE_OUT_OPERATION ,_param->_size_operation ); 63 63 DELETE0_SIGNAL(out_READ_QUEUE_OUT_TYPE ,_param->_size_type ); 64 DELETE0_SIGNAL(out_READ_QUEUE_OUT_STORE_QUEUE_PTR_WRITE, _param->_size_store_queue_ptr ); 64 DELETE0_SIGNAL(out_READ_QUEUE_OUT_STORE_QUEUE_PTR_WRITE,_param->_size_store_queue_ptr ); 65 DELETE0_SIGNAL(out_READ_QUEUE_OUT_STORE_QUEUE_PTR_READ ,_param->_size_store_queue_ptr ); 66 DELETE0_SIGNAL(out_READ_QUEUE_OUT_STORE_QUEUE_EMPTY ,1 ); 65 67 DELETE0_SIGNAL(out_READ_QUEUE_OUT_LOAD_QUEUE_PTR_WRITE , _param->_size_load_queue_ptr ); 66 68 DELETE0_SIGNAL(out_READ_QUEUE_OUT_HAS_IMMEDIAT ,1 ); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/src/Read_queue_transition.cpp
r123 r128 42 42 43 43 // Init, else error in registerfile 44 _queue_head->_ooo_engine_id = 0; 45 // not necessary 46 _queue_head->_read_ra_val = false; 47 _queue_head->_read_rb_val = false; 48 _queue_head->_read_rc_val = false; 49 50 _queue_head->_data_ra_val = false; 51 _queue_head->_data_rb_val = false; 52 _queue_head->_data_rc_val = false; 53 54 _queue_head->_num_reg_ra = 0; 55 _queue_head->_num_reg_rb = 0; 56 _queue_head->_num_reg_rc = 0; 44 _queue_head->_context_id = 0;// not necessary 45 _queue_head->_front_end_id = 0;// not necessary 46 _queue_head->_ooo_engine_id = 0;// not necessary 47 48 _queue_head->_rob_id = 0;// not necessary 49 _queue_head->_operation = 0;// not necessary 50 _queue_head->_type = 0;// not necessary 51 _queue_head->_store_queue_ptr_write = 0;// not necessary 52 _queue_head->_store_queue_ptr_read = 0;// not necessary 53 _queue_head->_store_queue_empty = 0;// not necessary 54 _queue_head->_load_queue_ptr_write = 0;// not necessary 55 _queue_head->_has_immediat = 0;// not necessary 56 _queue_head->_immediat = 0;// not necessary 57 58 _queue_head->_read_ra = 0;// not necessary 59 _queue_head->_read_rb = 0;// not necessary 60 _queue_head->_read_rc = 0;// not necessary 61 _queue_head->_write_rd = 0;// not necessary 62 _queue_head->_write_re = 0;// not necessary 63 64 _queue_head->_read_ra_val = false; 65 _queue_head->_read_rb_val = false; 66 _queue_head->_read_rc_val = false; 67 68 _queue_head->_data_ra_val = false; 69 _queue_head->_data_rb_val = false; 70 _queue_head->_data_rc_val = false; 71 72 _queue_head->_num_reg_ra = 0;// not necessary 73 _queue_head->_num_reg_rb = 0;// not necessary 74 _queue_head->_num_reg_rc = 0;// not necessary 75 _queue_head->_num_reg_rd = 0;// not necessary 76 _queue_head->_num_reg_re = 0;// not necessary 57 77 } 58 78 else … … 76 96 Tread_queue_entry_t * entry = new Tread_queue_entry_t; 77 97 78 if(_param->_have_port_context_id ) 79 entry->_context_id = PORT_READ(in_READ_QUEUE_IN_CONTEXT_ID ); 80 if(_param->_have_port_front_end_id ) 81 entry->_front_end_id = PORT_READ(in_READ_QUEUE_IN_FRONT_END_ID); 82 if(_param->_have_port_ooo_engine_id) 83 entry->_ooo_engine_id= PORT_READ(in_READ_QUEUE_IN_OOO_ENGINE_ID); 84 if(_param->_have_port_rob_ptr ) 85 entry->_rob_id = PORT_READ(in_READ_QUEUE_IN_ROB_ID ); 86 entry->_operation = PORT_READ(in_READ_QUEUE_IN_OPERATION ); 87 entry->_type = PORT_READ(in_READ_QUEUE_IN_TYPE ); 98 entry->_context_id = (_param->_have_port_context_id )?PORT_READ(in_READ_QUEUE_IN_CONTEXT_ID ):0; 99 entry->_front_end_id = (_param->_have_port_front_end_id )?PORT_READ(in_READ_QUEUE_IN_FRONT_END_ID ):0; 100 entry->_ooo_engine_id = (_param->_have_port_ooo_engine_id )?PORT_READ(in_READ_QUEUE_IN_OOO_ENGINE_ID):0; 101 entry->_rob_id = (_param->_have_port_rob_ptr )?PORT_READ(in_READ_QUEUE_IN_ROB_ID ):0; 102 entry->_operation = PORT_READ(in_READ_QUEUE_IN_OPERATION ); 103 entry->_type = PORT_READ(in_READ_QUEUE_IN_TYPE ); 88 104 entry->_store_queue_ptr_write = PORT_READ(in_READ_QUEUE_IN_STORE_QUEUE_PTR_WRITE); 89 105 entry->_store_queue_ptr_read = PORT_READ(in_READ_QUEUE_IN_STORE_QUEUE_PTR_READ ); 90 106 entry->_store_queue_empty = PORT_READ(in_READ_QUEUE_IN_STORE_QUEUE_EMPTY ); 91 if (_param->_have_port_load_queue_ptr) 92 entry->_load_queue_ptr_write = PORT_READ(in_READ_QUEUE_IN_LOAD_QUEUE_PTR_WRITE ); 93 entry->_has_immediat = PORT_READ(in_READ_QUEUE_IN_HAS_IMMEDIAT); 94 entry->_immediat = PORT_READ(in_READ_QUEUE_IN_IMMEDIAT ); 95 entry->_read_ra = PORT_READ(in_READ_QUEUE_IN_READ_RA ); 96 entry->_num_reg_ra = PORT_READ(in_READ_QUEUE_IN_NUM_REG_RA ); 97 entry->_read_rb = PORT_READ(in_READ_QUEUE_IN_READ_RB ); 98 entry->_num_reg_rb = PORT_READ(in_READ_QUEUE_IN_NUM_REG_RB ); 99 entry->_read_rc = PORT_READ(in_READ_QUEUE_IN_READ_RC ); 100 entry->_num_reg_rc = PORT_READ(in_READ_QUEUE_IN_NUM_REG_RC ); 101 entry->_write_rd = PORT_READ(in_READ_QUEUE_IN_WRITE_RD ); 102 entry->_num_reg_rd = PORT_READ(in_READ_QUEUE_IN_NUM_REG_RD ); 103 entry->_write_re = PORT_READ(in_READ_QUEUE_IN_WRITE_RE ); 104 entry->_num_reg_re = PORT_READ(in_READ_QUEUE_IN_NUM_REG_RE ); 107 entry->_load_queue_ptr_write = (_param->_have_port_load_queue_ptr)?PORT_READ(in_READ_QUEUE_IN_LOAD_QUEUE_PTR_WRITE ):0; 108 entry->_has_immediat = PORT_READ(in_READ_QUEUE_IN_HAS_IMMEDIAT); 109 entry->_immediat = PORT_READ(in_READ_QUEUE_IN_IMMEDIAT ); 110 entry->_read_ra = PORT_READ(in_READ_QUEUE_IN_READ_RA ); 111 entry->_num_reg_ra = PORT_READ(in_READ_QUEUE_IN_NUM_REG_RA ); 112 entry->_read_rb = PORT_READ(in_READ_QUEUE_IN_READ_RB ); 113 entry->_num_reg_rb = PORT_READ(in_READ_QUEUE_IN_NUM_REG_RB ); 114 entry->_read_rc = PORT_READ(in_READ_QUEUE_IN_READ_RC ); 115 entry->_num_reg_rc = PORT_READ(in_READ_QUEUE_IN_NUM_REG_RC ); 116 entry->_write_rd = PORT_READ(in_READ_QUEUE_IN_WRITE_RD ); 117 entry->_num_reg_rd = PORT_READ(in_READ_QUEUE_IN_NUM_REG_RD ); 118 entry->_write_re = PORT_READ(in_READ_QUEUE_IN_WRITE_RE ); 119 entry->_num_reg_re = PORT_READ(in_READ_QUEUE_IN_NUM_REG_RE ); 105 120 106 121 log_printf(TRACE,Read_queue,FUNCTION," * push (id : %d-%d)",entry->_context_id, entry->_rob_id); … … 122 137 // Pop the entry 123 138 log_printf(TRACE,Read_queue,FUNCTION," * pop (id : %d-%d)",_queue->front()->_context_id, _queue->front()->_rob_id); 139 delete _queue->front(); 124 140 _queue->pop_front(); 125 141 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/src/Reservation_station_transition.cpp
r122 r128 112 112 _queue_control->clear(); 113 113 #endif 114 115 for (uint32_t i=0; i<_param->_size_queue; i++) 116 { 117 _queue[i]._context_id = 0; // not necessary 118 _queue[i]._front_end_id = 0; // not necessary 119 _queue[i]._ooo_engine_id = 0; // not necessary 120 _queue[i]._rob_id = 0; // not necessary 121 _queue[i]._operation = 0; // not necessary 122 _queue[i]._type = 0; // not necessary 123 _queue[i]._store_queue_ptr_write = 0; // not necessary 124 _queue[i]._store_queue_ptr_read = 0; // not necessary 125 _queue[i]._store_queue_empty = 0; // not necessary 126 _queue[i]._load_queue_ptr_write = 0; // not necessary 127 _queue[i]._has_immediat = 0; // not necessary 128 _queue[i]._immediat = 0; // not necessary 129 // _queue[i]._read_ra = 0; // not necessary 130 _queue[i]._num_reg_ra = 0; // not necessary 131 _queue[i]._data_ra_val = 0; // not necessary 132 _queue[i]._data_ra = 0; // not necessary 133 // _queue[i]._read_rb = 0; // not necessary 134 _queue[i]._num_reg_rb = 0; // not necessary 135 _queue[i]._data_rb_val = 0; // not necessary 136 _queue[i]._data_rb = 0; // not necessary 137 // _queue[i]._read_rc = 0; // not necessary 138 _queue[i]._num_reg_rc = 0; // not necessary 139 _queue[i]._data_rc_val = 0; // not necessary 140 _queue[i]._data_rc = 0; // not necessary 141 _queue[i]._write_rd = 0; // not necessary 142 _queue[i]._num_reg_rd = 0; // not necessary 143 _queue[i]._write_re = 0; // not necessary 144 _queue[i]._num_reg_re = 0; // not necessary 145 } 114 146 } 115 147 else -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/src/Read_unit_deallocation.cpp
r112 r128 38 38 DELETE0_SIGNAL( in_READ_UNIT_IN_TYPE ,_param->_size_type ); 39 39 DELETE0_SIGNAL( in_READ_UNIT_IN_STORE_QUEUE_PTR_WRITE,_param->_size_store_queue_ptr); 40 DELETE0_SIGNAL( in_READ_UNIT_IN_STORE_QUEUE_PTR_READ ,_param->_size_store_queue_ptr); 41 DELETE0_SIGNAL( in_READ_UNIT_IN_STORE_QUEUE_EMPTY ,1); 40 42 DELETE0_SIGNAL( in_READ_UNIT_IN_LOAD_QUEUE_PTR_WRITE ,_param->_size_load_queue_ptr); 41 43 DELETE0_SIGNAL( in_READ_UNIT_IN_HAS_IMMEDIAT ,1); … … 61 63 DELETE1_SIGNAL(out_READ_UNIT_OUT_TYPE ,_param->_nb_inst_retire,_param->_size_type ); 62 64 DELETE1_SIGNAL(out_READ_UNIT_OUT_STORE_QUEUE_PTR_WRITE,_param->_nb_inst_retire,_param->_size_store_queue_ptr); 65 DELETE1_SIGNAL(out_READ_UNIT_OUT_STORE_QUEUE_PTR_READ ,_param->_nb_inst_retire,_param->_size_store_queue_ptr); 66 DELETE1_SIGNAL(out_READ_UNIT_OUT_STORE_QUEUE_EMPTY ,_param->_nb_inst_retire,1); 63 67 DELETE1_SIGNAL(out_READ_UNIT_OUT_LOAD_QUEUE_PTR_WRITE ,_param->_nb_inst_retire,_param->_size_load_queue_ptr); 64 68 DELETE1_SIGNAL(out_READ_UNIT_OUT_HAS_IMMEDIAT ,_param->_nb_inst_retire,1 ); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_deallocation.cpp
r113 r128 91 91 delete _queue; 92 92 93 #ifdef VHDL 94 if (usage_is_set(_usage,USE_VHDL)) 95 { 96 delete _component_queue; 97 delete _param_queue; 98 } 99 #endif 100 93 101 delete _component; 94 delete _component_queue;95 delete _param_queue;96 102 97 103 log_printf(FUNC,Write_queue,FUNCTION,"End"); … … 104 110 }; // end namespace multi_execute_loop 105 111 }; // end namespace core 106 107 112 }; // end namespace behavioural 108 113 }; // end namespace morpheo -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_transition.cpp
r101 r128 18 18 namespace write_unit { 19 19 namespace write_queue { 20 21 20 22 21 #undef FUNCTION … … 114 113 (*it)->_no_sequence , 115 114 (*it)->_address ); 115 116 // log_printf(TRACE,Write_queue,FUNCTION," * context_id : %d", (*it)->_context_id ); 117 // log_printf(TRACE,Write_queue,FUNCTION," * front_end_id : %d", (*it)->_front_end_id ); 118 // log_printf(TRACE,Write_queue,FUNCTION," * ooo_engine_id: %d", (*it)->_ooo_engine_id); 119 // log_printf(TRACE,Write_queue,FUNCTION," * packet_id : %d", (*it)->_packet_id ); 120 // log_printf(TRACE,Write_queue,FUNCTION," * write_rd : %d", (*it)->_write_rd ); 121 // log_printf(TRACE,Write_queue,FUNCTION," * num_reg_rd : %d", (*it)->_num_reg_rd ); 122 // log_printf(TRACE,Write_queue,FUNCTION," * data_rd : %d", (*it)->_data_rd ); 123 // log_printf(TRACE,Write_queue,FUNCTION," * write_re : %d", (*it)->_write_re ); 124 // log_printf(TRACE,Write_queue,FUNCTION," * num_reg_re : %d", (*it)->_num_reg_re ); 125 // log_printf(TRACE,Write_queue,FUNCTION," * data_re : %d", (*it)->_data_re ); 126 // log_printf(TRACE,Write_queue,FUNCTION," * exception : %d", (*it)->_exception ); 127 // log_printf(TRACE,Write_queue,FUNCTION," * no_sequence : %d", (*it)->_no_sequence ); 128 // log_printf(TRACE,Write_queue,FUNCTION," * address : %d", (*it)->_address ); 129 116 130 i++; 117 131 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Read_unit_to_Execution_unit/src/Read_unit_to_Execution_unit_deallocation.cpp
r115 r128 38 38 DELETE2_SIGNAL( in_READ_UNIT_OUT_TYPE , _param->_nb_read_unit, _param->_nb_read_unit_port [it1],_param->_size_type ); 39 39 DELETE2_SIGNAL( in_READ_UNIT_OUT_STORE_QUEUE_PTR_WRITE , _param->_nb_read_unit, _param->_nb_read_unit_port [it1],_param->_size_store_queue_ptr ); 40 DELETE2_SIGNAL( in_READ_UNIT_OUT_STORE_QUEUE_PTR_READ , _param->_nb_read_unit, _param->_nb_read_unit_port [it1],_param->_size_store_queue_ptr ); 41 DELETE2_SIGNAL( in_READ_UNIT_OUT_STORE_QUEUE_EMPTY , _param->_nb_read_unit, _param->_nb_read_unit_port [it1],1 ); 40 42 DELETE2_SIGNAL( in_READ_UNIT_OUT_LOAD_QUEUE_PTR_WRITE , _param->_nb_read_unit, _param->_nb_read_unit_port [it1],_param->_size_load_queue_ptr ); 41 43 DELETE2_SIGNAL( in_READ_UNIT_OUT_HAS_IMMEDIAT , _param->_nb_read_unit, _param->_nb_read_unit_port [it1],1 ); … … 63 65 DELETE2_SIGNAL(out_EXECUTE_UNIT_IN_NUM_REG_RE , _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1],_param->_size_special_register ); 64 66 DELETE2_SIGNAL(out_EXECUTE_UNIT_IN_STORE_QUEUE_PTR_WRITE, _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1],_param->_size_store_queue_ptr ); 67 DELETE2_SIGNAL(out_EXECUTE_UNIT_IN_STORE_QUEUE_PTR_READ , _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1],_param->_size_store_queue_ptr ); 68 DELETE2_SIGNAL(out_EXECUTE_UNIT_IN_STORE_QUEUE_EMPTY , _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1],1 ); 65 69 DELETE2_SIGNAL(out_EXECUTE_UNIT_IN_LOAD_QUEUE_PTR_WRITE , _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1],_param->_size_load_queue_ptr ); 66 70 DELETE2_SIGNAL(out_EXECUTE_UNIT_IN_IMMEDIAT , _param->_nb_execute_unit, _param->_nb_execute_unit_port [it1],_param->_size_general_data ); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/include/Register_unit_Glue.h
r88 r128 61 61 public : SC_CLOCK * in_CLOCK ; 62 62 public : SC_IN (Tcontrol_t) * in_NRESET ; 63 64 63 //public : SC_OUT(Tcontrol_t ) * out_CONST_0; 64 //public : SC_OUT(Tcontrol_t ) * out_CONST_1; 65 65 66 66 // ~~~~~[ Interface "gpr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ … … 77 77 public : SC_OUT(Tcontrol_t ) *** out_GPR_READ_STATUS_VAL ; 78 78 public : SC_IN (Tcontrol_t ) *** in_GPR_READ_STATUS_ACK ; 79 public : SC_IN (T control_t ) *** in_GPR_READ_STATUS_DATA_VAL ;79 public : SC_IN (Tgeneral_data_t ) *** in_GPR_READ_STATUS_DATA_VAL ; // type for compatibility with the registerFile 80 80 81 81 // ~~~~~[ Interface "spr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ … … 92 92 public : SC_OUT(Tcontrol_t ) *** out_SPR_READ_STATUS_VAL ; 93 93 public : SC_IN (Tcontrol_t ) *** in_SPR_READ_STATUS_ACK ; 94 public : SC_IN (T control_t ) *** in_SPR_READ_STATUS_DATA_VAL ;94 public : SC_IN (Tspecial_data_t ) *** in_SPR_READ_STATUS_DATA_VAL ; // type for compatibility with the registerFile 95 95 96 96 // ~~~~~[ Interface "gpr_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ … … 104 104 public : SC_OUT(Tcontrol_t ) *** out_GPR_WRITE_STATUS_VAL ; 105 105 public : SC_IN (Tcontrol_t ) *** in_GPR_WRITE_STATUS_ACK ; 106 public : SC_OUT(Tgeneral_data_t ) *** out_GPR_WRITE_STATUS_DATA ; // type for compatibility with the registerFile 106 107 107 108 // ~~~~~[ Interface "spr_write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ … … 115 116 public : SC_OUT(Tcontrol_t ) *** out_SPR_WRITE_STATUS_VAL ; 116 117 public : SC_IN (Tcontrol_t ) *** in_SPR_WRITE_STATUS_ACK ; 118 public : SC_OUT(Tspecial_data_t ) *** out_SPR_WRITE_STATUS_DATA ; // type for compatibility with the registerFile 117 119 118 120 // ~~~~~[ Interface "insert_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ … … 124 126 public : SC_OUT(Tcontrol_t ) *** out_INSERT_ROB_GPR_STATUS_VAL ; 125 127 public : SC_IN (Tcontrol_t ) *** in_INSERT_ROB_GPR_STATUS_ACK ; 128 public : SC_OUT(Tgeneral_data_t ) *** out_INSERT_ROB_GPR_STATUS_DATA ; // type for compatibility with the registerFile 126 129 127 130 public : SC_OUT(Tcontrol_t ) *** out_INSERT_ROB_SPR_STATUS_VAL ; 128 131 public : SC_IN (Tcontrol_t ) *** in_INSERT_ROB_SPR_STATUS_ACK ; 132 public : SC_OUT(Tspecial_data_t ) *** out_INSERT_ROB_SPR_STATUS_DATA ; // type for compatibility with the registerFile 129 133 130 134 // // ~~~~~[ Interface "retire_rob" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue.cpp
r123 r128 71 71 { 72 72 // Constant 73 74 PORT_WRITE(out_CONST_0 ,0); 75 PORT_WRITE(out_CONST_1 ,1); 73 // PORT_WRITE(out_CONST_0 ,0); 74 // PORT_WRITE(out_CONST_1 ,1); 75 for (uint32_t i=0; i<_param->_nb_ooo_engine; ++i) 76 { 77 for (uint32_t j=0; j<_param->_nb_gpr_write; ++j) 78 PORT_WRITE(out_GPR_WRITE_STATUS_DATA [i][j],1); 79 for (uint32_t j=0; j<_param->_nb_spr_write; ++j) 80 PORT_WRITE(out_SPR_WRITE_STATUS_DATA [i][j],1); 81 82 for (uint32_t j=0; j<_param->_nb_inst_insert_rob[i]; ++j) 83 { 84 PORT_WRITE(out_INSERT_ROB_GPR_STATUS_DATA [i][j],0); 85 PORT_WRITE(out_INSERT_ROB_SPR_STATUS_DATA [i][j],0); 86 } 87 } 76 88 77 89 log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - transition"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_allocation.cpp
r112 r128 48 48 in_CLOCK = interface->set_signal_clk ("clock" ,1, CLOCK_VHDL_NO); 49 49 in_NRESET = interface->set_signal_in <Tcontrol_t> ("nreset",1, RESET_VHDL_NO); 50 out_CONST_0 = interface->set_signal_out <Tcontrol_t> ("const_0",1);51 out_CONST_1 = interface->set_signal_out <Tcontrol_t> ("const_1",1);50 // out_CONST_0 = interface->set_signal_out <Tcontrol_t> ("const_0",1); 51 // out_CONST_1 = interface->set_signal_out <Tcontrol_t> ("const_1",1); 52 52 53 53 // ~~~~~[ Interface "gpr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ … … 79 79 ALLOC2_VALACK_OUT(out_GPR_READ_STATUS_VAL ,VAL); 80 80 ALLOC2_VALACK_IN ( in_GPR_READ_STATUS_ACK ,ACK); 81 ALLOC2_SIGNAL_IN ( in_GPR_READ_STATUS_DATA_VAL,"data_val",T control_t,1);81 ALLOC2_SIGNAL_IN ( in_GPR_READ_STATUS_DATA_VAL,"data_val",Tgeneral_data_t,1); 82 82 83 83 ALLOC2_INTERFACE_END(_param->_nb_ooo_engine,_param->_nb_gpr_read); … … 112 112 ALLOC2_VALACK_OUT(out_SPR_READ_STATUS_VAL ,VAL); 113 113 ALLOC2_VALACK_IN ( in_SPR_READ_STATUS_ACK ,ACK); 114 ALLOC2_SIGNAL_IN ( in_SPR_READ_STATUS_DATA_VAL,"data_val",T control_t,1);114 ALLOC2_SIGNAL_IN ( in_SPR_READ_STATUS_DATA_VAL,"data_val",Tspecial_data_t,1); 115 115 116 116 ALLOC2_INTERFACE_END(_param->_nb_ooo_engine,_param->_nb_spr_read); … … 140 140 ALLOC2_INTERFACE_BEGIN("gpr_write_status",IN,NORTH,_("Interface to write generalist register - from/to status"),_param->_nb_ooo_engine,_param->_nb_gpr_write); 141 141 142 ALLOC2_VALACK_OUT(out_GPR_WRITE_STATUS_VAL,VAL); 143 ALLOC2_VALACK_IN ( in_GPR_WRITE_STATUS_ACK,ACK); 142 ALLOC2_VALACK_OUT(out_GPR_WRITE_STATUS_VAL ,VAL); 143 ALLOC2_VALACK_IN ( in_GPR_WRITE_STATUS_ACK ,ACK); 144 ALLOC2_SIGNAL_OUT(out_GPR_WRITE_STATUS_DATA,"data",Tgeneral_data_t,1); 144 145 145 146 ALLOC2_INTERFACE_END(_param->_nb_ooo_engine,_param->_nb_gpr_write); … … 171 172 ALLOC2_VALACK_OUT(out_SPR_WRITE_STATUS_VAL,VAL); 172 173 ALLOC2_VALACK_IN ( in_SPR_WRITE_STATUS_ACK,ACK); 174 ALLOC2_SIGNAL_OUT(out_SPR_WRITE_STATUS_DATA,"data",Tspecial_data_t,1); 173 175 174 176 ALLOC2_INTERFACE_END(_param->_nb_ooo_engine,_param->_nb_spr_write); … … 190 192 ALLOC2_INTERFACE_BEGIN("insert_rob_gpr_status",IN,WEST,_("Interface to update status (insert)"),_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]); 191 193 192 _ALLOC2_VALACK_OUT(out_INSERT_ROB_GPR_STATUS_VAL,VAL,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]); 193 _ALLOC2_VALACK_IN ( in_INSERT_ROB_GPR_STATUS_ACK,ACK,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]); 194 _ALLOC2_VALACK_OUT(out_INSERT_ROB_GPR_STATUS_VAL ,VAL ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]); 195 _ALLOC2_VALACK_IN ( in_INSERT_ROB_GPR_STATUS_ACK ,ACK ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]); 196 _ALLOC2_SIGNAL_OUT(out_INSERT_ROB_GPR_STATUS_DATA,"data",Tgeneral_data_t,1,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]); 194 197 195 198 ALLOC2_INTERFACE_END(_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]); … … 199 202 ALLOC2_INTERFACE_BEGIN("insert_rob_spr_status",IN,WEST,_("Interface to update status (insert)"),_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]); 200 203 201 _ALLOC2_VALACK_OUT(out_INSERT_ROB_SPR_STATUS_VAL,VAL,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]); 202 _ALLOC2_VALACK_IN ( in_INSERT_ROB_SPR_STATUS_ACK,ACK,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]); 204 _ALLOC2_VALACK_OUT(out_INSERT_ROB_SPR_STATUS_VAL ,VAL ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]); 205 _ALLOC2_VALACK_IN ( in_INSERT_ROB_SPR_STATUS_ACK ,ACK ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]); 206 _ALLOC2_SIGNAL_OUT(out_INSERT_ROB_SPR_STATUS_DATA,"data",Tspecial_data_t,1,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]); 203 207 204 208 ALLOC2_INTERFACE_END(_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1]); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_deallocation.cpp
r112 r128 24 24 log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin"); 25 25 26 if (usage_is_set(_usage,USE_VHDL))26 // if (usage_is_set(_usage,USE_VHDL)) 27 27 { 28 28 //#if defined(STATISTICS) or defined(VHDL_TESTBENCH) … … 30 30 //#endif 31 31 delete in_NRESET; 32 delete out_CONST_0;33 delete out_CONST_1;32 // delete out_CONST_0; 33 // delete out_CONST_1; 34 34 35 35 DELETE1_SIGNAL( in_GPR_READ_VAL ,_param->_nb_gpr_read,1 ); … … 69 69 DELETE2_SIGNAL( in_GPR_WRITE_REGISTERFILE_ACK,_param->_nb_ooo_engine,_param->_nb_gpr_write,1 ); 70 70 71 DELETE2_SIGNAL(out_GPR_WRITE_STATUS_VAL,_param->_nb_ooo_engine,_param->_nb_gpr_write,1 ); 72 DELETE2_SIGNAL( in_GPR_WRITE_STATUS_ACK,_param->_nb_ooo_engine,_param->_nb_gpr_write,1 ); 71 DELETE2_SIGNAL(out_GPR_WRITE_STATUS_VAL ,_param->_nb_ooo_engine,_param->_nb_gpr_write,1 ); 72 DELETE2_SIGNAL( in_GPR_WRITE_STATUS_ACK ,_param->_nb_ooo_engine,_param->_nb_gpr_write,1 ); 73 DELETE2_SIGNAL(out_GPR_WRITE_STATUS_DATA ,_param->_nb_ooo_engine,_param->_nb_gpr_write,1 ); 73 74 74 DELETE1_SIGNAL( in_SPR_WRITE_VAL ,_param->_nb_spr_write,1 );75 DELETE1_SIGNAL(out_SPR_WRITE_ACK ,_param->_nb_spr_write,1 );76 DELETE1_SIGNAL( in_SPR_WRITE_OOO_ENGINE_ID ,_param->_nb_spr_write,_param->_size_ooo_engine_id);75 DELETE1_SIGNAL( in_SPR_WRITE_VAL ,_param->_nb_spr_write,1 ); 76 DELETE1_SIGNAL(out_SPR_WRITE_ACK ,_param->_nb_spr_write,1 ); 77 DELETE1_SIGNAL( in_SPR_WRITE_OOO_ENGINE_ID ,_param->_nb_spr_write,_param->_size_ooo_engine_id); 77 78 78 79 DELETE2_SIGNAL(out_SPR_WRITE_REGISTERFILE_VAL,_param->_nb_ooo_engine,_param->_nb_spr_write,1 ); 79 80 DELETE2_SIGNAL( in_SPR_WRITE_REGISTERFILE_ACK,_param->_nb_ooo_engine,_param->_nb_spr_write,1 ); 80 81 81 DELETE2_SIGNAL(out_SPR_WRITE_STATUS_VAL,_param->_nb_ooo_engine,_param->_nb_spr_write,1 ); 82 DELETE2_SIGNAL( in_SPR_WRITE_STATUS_ACK,_param->_nb_ooo_engine,_param->_nb_spr_write,1 ); 82 DELETE2_SIGNAL(out_SPR_WRITE_STATUS_VAL ,_param->_nb_ooo_engine,_param->_nb_spr_write,1 ); 83 DELETE2_SIGNAL( in_SPR_WRITE_STATUS_ACK ,_param->_nb_ooo_engine,_param->_nb_spr_write,1 ); 84 DELETE2_SIGNAL(out_SPR_WRITE_STATUS_DATA ,_param->_nb_ooo_engine,_param->_nb_spr_write,1 ); 83 85 84 DELETE2_SIGNAL( in_INSERT_ROB_VAL ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1);85 DELETE2_SIGNAL(out_INSERT_ROB_ACK ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1);86 DELETE2_SIGNAL( in_INSERT_ROB_RD_USE ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1);87 DELETE2_SIGNAL( in_INSERT_ROB_RE_USE ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1);86 DELETE2_SIGNAL( in_INSERT_ROB_VAL ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1); 87 DELETE2_SIGNAL(out_INSERT_ROB_ACK ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1); 88 DELETE2_SIGNAL( in_INSERT_ROB_RD_USE ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1); 89 DELETE2_SIGNAL( in_INSERT_ROB_RE_USE ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1); 88 90 89 DELETE2_SIGNAL(out_INSERT_ROB_GPR_STATUS_VAL,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1); 90 DELETE2_SIGNAL( in_INSERT_ROB_GPR_STATUS_ACK,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1); 91 DELETE2_SIGNAL(out_INSERT_ROB_GPR_STATUS_VAL ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1); 92 DELETE2_SIGNAL( in_INSERT_ROB_GPR_STATUS_ACK ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1); 93 DELETE2_SIGNAL(out_INSERT_ROB_GPR_STATUS_DATA,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1); 91 94 92 DELETE2_SIGNAL(out_INSERT_ROB_SPR_STATUS_VAL,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1); 93 DELETE2_SIGNAL( in_INSERT_ROB_SPR_STATUS_ACK,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1); 95 DELETE2_SIGNAL(out_INSERT_ROB_SPR_STATUS_VAL ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1); 96 DELETE2_SIGNAL( in_INSERT_ROB_SPR_STATUS_ACK ,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1); 97 DELETE2_SIGNAL(out_INSERT_ROB_SPR_STATUS_DATA,_param->_nb_ooo_engine,_param->_nb_inst_insert_rob [it1],1); 94 98 } 95 99 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_genMealy_gpr_write_status.cpp
r123 r128 38 38 { 39 39 Tcontrol_t id = (i == ooo_engine_id)?1:0; 40 41 log_printf(TRACE,Register_unit_Glue,FUNCTION," * GPR_WRITE_STATUS_VAL [%d (%d)][%d] : %d (%d and %d)",i, ooo_engine_id,j,id and status_val, id, status_val); 42 40 43 PORT_WRITE(out_GPR_WRITE_STATUS_VAL [i][j], (id and status_val)); 41 44 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_genMealy_insert.cpp
r123 r128 46 46 gpr_status_ack); 47 47 48 log_printf(TRACE, OOO_Engine_Glue,FUNCTION," * insert_rob [%d][%d]",i,j);49 log_printf(TRACE, OOO_Engine_Glue,FUNCTION," * val (r) : %d",val );50 log_printf(TRACE, OOO_Engine_Glue,FUNCTION," * ack (w) : %d",ack );51 log_printf(TRACE, OOO_Engine_Glue,FUNCTION," * gpr_use (rd) (r) : %d",gpr_use );52 log_printf(TRACE, OOO_Engine_Glue,FUNCTION," * gpr_status_val (w) : %d",gpr_status_val);53 log_printf(TRACE, OOO_Engine_Glue,FUNCTION," * gpr_status_ack (r) : %d",gpr_status_ack);54 log_printf(TRACE, OOO_Engine_Glue,FUNCTION," * spr_use (re) (r) : %d",spr_use );55 log_printf(TRACE, OOO_Engine_Glue,FUNCTION," * spr_status_val (w) : %d",spr_status_val);56 log_printf(TRACE, OOO_Engine_Glue,FUNCTION," * spr_status_ack (r) : %d",spr_status_ack);48 log_printf(TRACE,Register_unit_Glue,FUNCTION," * insert_rob [%d][%d]",i,j); 49 log_printf(TRACE,Register_unit_Glue,FUNCTION," * val (r) : %d",val ); 50 log_printf(TRACE,Register_unit_Glue,FUNCTION," * ack (w) : %d",ack ); 51 log_printf(TRACE,Register_unit_Glue,FUNCTION," * gpr_use (rd) (r) : %d",gpr_use ); 52 log_printf(TRACE,Register_unit_Glue,FUNCTION," * gpr_status_val (w) : %d",gpr_status_val); 53 log_printf(TRACE,Register_unit_Glue,FUNCTION," * gpr_status_ack (r) : %d",gpr_status_ack); 54 log_printf(TRACE,Register_unit_Glue,FUNCTION," * spr_use (re) (r) : %d",spr_use ); 55 log_printf(TRACE,Register_unit_Glue,FUNCTION," * spr_status_val (w) : %d",spr_status_val); 56 log_printf(TRACE,Register_unit_Glue,FUNCTION," * spr_status_ack (r) : %d",spr_status_ack); 57 57 58 58 PORT_WRITE(out_INSERT_ROB_ACK [i][j], ack ); 59 59 PORT_WRITE(out_INSERT_ROB_GPR_STATUS_VAL [i][j], gpr_status_val); 60 60 PORT_WRITE(out_INSERT_ROB_SPR_STATUS_VAL [i][j], spr_status_val); 61 62 61 } 63 62 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue_genMealy_spr_read.cpp
r123 r128 1 1 2 #ifdef SYSTEMC 2 3 //#if defined(STATISTICS) or defined(VHDL_TESTBENCH) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/SelfTest/src/test.cpp
r88 r128 21 21 morpheo::behavioural::Parameters_Statistics * _parameters_statistics = new morpheo::behavioural::Parameters_Statistics (5,50); 22 22 #endif 23 24 _model.set_model(NAME_Register_unit ,MODEL_SYSTEMC, true); 25 _model.set_model(NAME_RegisterFile ,MODEL_SYSTEMC, true); 26 _model.set_model(NAME_RegisterFile_Monolithic ,MODEL_SYSTEMC, true); 27 _model.set_model(NAME_RegisterFile_Multi_Banked,MODEL_SYSTEMC, true); 28 _model.set_model(NAME_Register_unit_Glue ,MODEL_SYSTEMC, true); 23 29 24 30 Tusage_t _usage = USE_ALL; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/src/Register_unit_allocation.cpp
r112 r128 292 292 293 293 // ~~~~~[ Instanciation ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 294 std::string name_component;294 std::string src,dest; 295 295 296 296 for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 297 297 { 298 name_component= _name+"_gpr_"+toString(i);298 src = _name+"_gpr_"+toString(i); 299 299 300 log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"), name_component.c_str());300 log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),src.c_str()); 301 301 302 #ifdef POSITION 303 _component->interface_map (name_component,"", 304 _name ,""); 305 #endif 306 307 _component->port_map(name_component,"in_CLOCK" , _name, "in_CLOCK"); 308 _component->port_map(name_component,"in_NRESET" , _name, "in_NRESET"); 302 { 303 dest = _name; 304 #ifdef POSITION 305 _component->interface_map (src ,"", 306 dest,""); 307 #endif 308 PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); 309 PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); 310 } 309 311 310 312 for (uint32_t j=0; j<_param->_nb_gpr_read; j++) 311 313 { 312 _component->port_map(name_component, 313 "in_READ_"+toString(j)+"_VAL", 314 _name+"_glue", 315 "out_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL"); 316 _component->port_map(name_component, 317 "out_READ_"+toString(j)+"_ACK", 318 _name+"_glue", 319 "in_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK"); 320 _component->port_map(name_component, 321 "out_READ_"+toString(j)+"_DATA", 322 _name+"_glue", 323 "in_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_DATA"); 324 _component->port_map(name_component, 325 "in_READ_"+toString(j)+"_ADDRESS", 326 _name, 327 "in_GPR_READ_"+toString(j)+"_NUM_REG"); 314 dest = _name+"_glue"; 315 316 #ifdef POSITION 317 _component->interface_map (src , "read_"+toString(j), 318 dest,"gpr_read_registerfile_"+toString(i)+"_"+toString(j)); 319 #endif 320 321 COMPONENT_MAP(_component,src , "in_READ_" +toString(j)+"_VAL", 322 dest,"out_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL"); 323 COMPONENT_MAP(_component,src ,"out_READ_" +toString(j)+"_ACK", 324 dest, "in_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK"); 325 COMPONENT_MAP(_component,src ,"out_READ_" +toString(j)+"_DATA", 326 dest, "in_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_DATA"); 327 328 dest = _name; 329 330 PORT_MAP (_component,src , "in_READ_" +toString(j)+"_ADDRESS", 331 dest, "in_GPR_READ_"+toString(j)+"_NUM_REG"); 328 332 } 333 329 334 for (uint32_t j=0; j<_param->_nb_gpr_write; j++) 330 335 { 331 _component->port_map(name_component, 332 "in_WRITE_"+toString(j)+"_VAL", 333 _name+"_glue", 334 "out_GPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL"); 335 _component->port_map(name_component, 336 "out_WRITE_"+toString(j)+"_ACK", 337 _name+"_glue", 338 "in_GPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK"); 339 _component->port_map(name_component, 340 "in_WRITE_"+toString(j)+"_ADDRESS", 341 _name, 342 "in_GPR_WRITE_"+toString(j)+"_NUM_REG" 343 ); 344 _component->port_map(name_component, 345 "in_WRITE_"+toString(j)+"_DATA", 346 _name, 347 "in_GPR_WRITE_"+toString(j)+"_DATA"); 336 dest = _name+"_glue"; 337 338 #ifdef POSITION 339 _component->interface_map (src , "write_"+toString(j), 340 dest,"gpr_write_registerfile_"+toString(i)+"_"+toString(j)); 341 #endif 342 343 COMPONENT_MAP(_component,src , "in_WRITE_" +toString(j)+"_VAL", 344 dest,"out_GPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL"); 345 COMPONENT_MAP(_component,src ,"out_WRITE_" +toString(j)+"_ACK", 346 dest, "in_GPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK"); 347 348 dest = _name; 349 350 PORT_MAP (_component,src , "in_WRITE_" +toString(j)+"_ADDRESS", 351 dest, "in_GPR_WRITE_"+toString(j)+"_NUM_REG"); 352 PORT_MAP (_component,src , "in_WRITE_" +toString(j)+"_DATA", 353 dest, "in_GPR_WRITE_"+toString(j)+"_DATA"); 348 354 } 349 355 … … 353 359 for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 354 360 { 355 name_component= _name+"_gpr_status_"+toString(i);361 src = _name+"_gpr_status_"+toString(i); 356 362 357 log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),name_component.c_str()); 358 359 #ifdef POSITION 360 _component->interface_map (name_component,"", 361 _name ,""); 362 #endif 363 364 _component->port_map(name_component,"in_CLOCK" , _name, "in_CLOCK"); 365 _component->port_map(name_component,"in_NRESET", _name, "in_NRESET"); 366 363 log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),src.c_str()); 364 365 { 366 dest = _name; 367 #ifdef POSITION 368 _component->interface_map (src ,"", 369 dest,""); 370 #endif 371 PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); 372 PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); 373 } 374 367 375 for (uint32_t j=0; j<_param->_nb_gpr_read; j++) 368 376 { 369 _component->port_map(name_component, 370 "in_READ_"+toString(j)+"_VAL" , 371 _name+"_glue", 372 "out_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_VAL" ); 373 _component->port_map(name_component, 374 "out_READ_"+toString(j)+"_ACK", 375 _name+"_glue", 376 "in_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_ACK" ); 377 _component->port_map(name_component, 378 "out_READ_"+toString(j)+"_DATA", 379 _name+"_glue", 380 "in_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_DATA_VAL" ); 381 _component->port_map(name_component, 382 "in_READ_"+toString(j)+"_ADDRESS", 383 _name, 384 "in_GPR_READ_"+toString(j)+"_NUM_REG"); 377 dest = _name+"_glue"; 378 379 #ifdef POSITION 380 _component->interface_map (src , "read_"+toString(j), 381 dest,"gpr_read_status_"+toString(i)+"_"+toString(j)); 382 #endif 383 384 COMPONENT_MAP(_component,src , "in_READ_" +toString(j)+"_VAL", 385 dest,"out_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_VAL"); 386 COMPONENT_MAP(_component,src ,"out_READ_" +toString(j)+"_ACK", 387 dest, "in_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_ACK"); 388 COMPONENT_MAP(_component,src ,"out_READ_" +toString(j)+"_DATA", 389 dest, "in_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_DATA_VAL"); 390 391 dest = _name; 392 393 PORT_MAP (_component,src , "in_READ_" +toString(j)+"_ADDRESS", 394 dest, "in_GPR_READ_"+toString(j)+"_NUM_REG"); 385 395 } 386 396 … … 388 398 for (uint32_t j=0; j<_param->_nb_gpr_write; j++) 389 399 { 390 _component->port_map(name_component, 391 "in_WRITE_"+toString(x)+"_VAL" , 392 _name+"_glue", 393 "out_GPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_VAL"); 394 _component->port_map(name_component, 395 "out_WRITE_"+toString(x)+"_ACK", 396 _name+"_glue", 397 "in_GPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_ACK" ); 398 _component->port_map(name_component, 399 "in_WRITE_"+toString(x)+"_DATA" , 400 _name+"_glue", 401 "out_CONST_1"); 402 403 _component->port_map(_name+"_glue", 404 "out_CONST_1", 405 name_component, 406 "in_WRITE_"+toString(x)+"_DATA" ); 407 408 409 _component->port_map(name_component, 410 "in_WRITE_"+toString(x++)+"_ADDRESS", 411 _name, 412 "in_GPR_WRITE_"+toString(j)+"_NUM_REG"); 400 dest = _name+"_glue"; 401 402 #ifdef POSITION 403 _component->interface_map (src , "write_"+toString(j), 404 dest,"gpr_write_status_"+toString(i)+"_"+toString(j)); 405 #endif 406 407 COMPONENT_MAP(_component,src , "in_WRITE_" +toString(x)+"_VAL", 408 dest,"out_GPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_VAL"); 409 COMPONENT_MAP(_component,src ,"out_WRITE_" +toString(x)+"_ACK", 410 dest, "in_GPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_ACK"); 411 COMPONENT_MAP(_component,src , "in_WRITE_" +toString(x)+"_DATA", 412 dest,"out_GPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_DATA"); 413 // dest,"out_CONST_1"); 414 415 dest = _name; 416 417 PORT_MAP (_component,src , "in_WRITE_" +toString(x)+"_ADDRESS", 418 dest, "in_GPR_WRITE_"+toString(j)+"_NUM_REG"); 419 420 x++; 413 421 } 414 422 415 423 for (uint32_t j=0; j<_param->_nb_inst_insert_rob [i]; j++) 416 424 { 417 _component->port_map(name_component, 418 "in_WRITE_"+toString(x)+"_VAL" , 419 _name+"_glue", 420 "out_INSERT_ROB_GPR_STATUS_"+toString(i)+"_"+toString(j)+"_VAL"); 421 _component->port_map(name_component, 422 "out_WRITE_"+toString(x)+"_ACK", 423 _name+"_glue", 424 "in_INSERT_ROB_GPR_STATUS_"+toString(i)+"_"+toString(j)+"_ACK" ); 425 426 _component->port_map(name_component, 427 "in_WRITE_"+toString(x)+"_DATA", 428 _name+"_glue", 429 "out_CONST_0" 430 ); 431 _component->port_map( _name+"_glue", 432 "out_CONST_0", 433 name_component, 434 "in_WRITE_"+toString(x)+"_DATA"); 435 436 _component->port_map(name_component, 437 "in_WRITE_"+toString(x++)+"_ADDRESS", 438 _name, 439 "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RD_NUM_REG"); 440 425 dest = _name+"_glue"; 426 427 #ifdef POSITION 428 _component->interface_map (src , "write_"+toString(j), 429 dest,"insert_rob_gpr_status_"+toString(i)+"_"+toString(j)); 430 #endif 431 432 COMPONENT_MAP(_component,src , "in_WRITE_" +toString(x)+"_VAL", 433 dest,"out_INSERT_ROB_GPR_STATUS_"+toString(i)+"_"+toString(j)+"_VAL"); 434 COMPONENT_MAP(_component,src ,"out_WRITE_" +toString(x)+"_ACK", 435 dest, "in_INSERT_ROB_GPR_STATUS_"+toString(i)+"_"+toString(j)+"_ACK"); 436 COMPONENT_MAP(_component,src , "in_WRITE_" +toString(x)+"_DATA", 437 dest,"out_INSERT_ROB_GPR_STATUS_"+toString(i)+"_"+toString(j)+"_DATA"); 438 // dest,"out_CONST_0"); 439 440 dest = _name; 441 442 PORT_MAP (_component,src , "in_WRITE_" +toString(x)+"_ADDRESS", 443 dest, "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RD_NUM_REG"); 444 445 x++; 441 446 } 442 443 // for (uint32_t j=0; j<_param->_nb_inst_retire_rob [i]; j++)444 // {445 // _component->port_map(name_component,446 // "in_WRITE_"+toString(x)+"_VAL" ,447 // _name+"_glue",448 // "out_RETIRE_ROB_GPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_VAL");449 // _component->port_map(name_component,450 // "out_WRITE_"+toString(x)+"_ACK",451 // _name+"_glue",452 // "in_RETIRE_ROB_GPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_ACK" );453 454 // _component->port_map(name_component,455 // "in_WRITE_"+toString(x)+"_DATA" ,456 // _name+"_glue",457 // "out_CONST_0");458 // _component->port_map(_name+"_glue",459 // "out_CONST_0",460 // name_component,461 // "in_WRITE_"+toString(x)+"_DATA" );462 463 // _component->port_map(name_component,464 // "in_WRITE_"+toString(x++)+"_ADDRESS",465 // _name,466 // "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_OLD_NUM_REG");467 468 // _component->port_map(name_component,469 // "in_WRITE_"+toString(x)+"_VAL" ,470 // _name+"_glue",471 // "out_RETIRE_ROB_GPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_VAL");472 // _component->port_map(name_component,473 // "out_WRITE_"+toString(x)+"_ACK",474 // _name+"_glue",475 // "in_RETIRE_ROB_GPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_ACK" );476 477 // _component->port_map(name_component,478 // "in_WRITE_"+toString(x)+"_DATA" ,479 // _name+"_glue",480 // "out_CONST_1"481 // );482 // _component->port_map(_name+"_glue",483 // "out_CONST_1",484 // name_component,485 // "in_WRITE_"+toString(x)+"_DATA"486 // );487 488 // _component->port_map(name_component,489 // "in_WRITE_"+toString(x++)+"_ADDRESS",490 // _name,491 // "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_NEW_NUM_REG");492 // }493 447 494 448 } … … 497 451 for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 498 452 { 499 name_component= _name+"_spr_"+toString(i);453 src = _name+"_spr_"+toString(i); 500 454 501 log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"), name_component.c_str());455 log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),src.c_str()); 502 456 503 #ifdef POSITION 504 _component->interface_map (name_component,"", 505 _name ,""); 506 #endif 507 508 _component->port_map(name_component,"in_CLOCK" , _name, "in_CLOCK"); 509 _component->port_map(name_component,"in_NRESET", _name, "in_NRESET"); 457 { 458 dest = _name; 459 #ifdef POSITION 460 _component->interface_map (src ,"", 461 dest,""); 462 #endif 463 PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); 464 PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); 465 } 510 466 511 467 for (uint32_t j=0; j<_param->_nb_spr_read; j++) 512 468 { 513 _component->port_map(name_component, 514 "in_READ_"+toString(j)+"_VAL", 515 _name+"_glue", 516 "out_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL"); 517 _component->port_map(name_component, 518 "out_READ_"+toString(j)+"_ACK", 519 _name+"_glue", 520 "in_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK"); 521 _component->port_map(name_component, 522 "out_READ_"+toString(j)+"_DATA", 523 _name+"_glue", 524 "in_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_DATA"); 525 _component->port_map(name_component, 526 "in_READ_"+toString(j)+"_ADDRESS", 527 _name, 528 "in_SPR_READ_"+toString(j)+"_NUM_REG"); 469 dest = _name+"_glue"; 470 471 #ifdef POSITION 472 _component->interface_map (src , "read_"+toString(j), 473 dest,"spr_read_registerfile_"+toString(i)+"_"+toString(j)); 474 #endif 475 476 COMPONENT_MAP(_component,src , "in_READ_" +toString(j)+"_VAL", 477 dest,"out_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL"); 478 COMPONENT_MAP(_component,src ,"out_READ_" +toString(j)+"_ACK", 479 dest, "in_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK"); 480 COMPONENT_MAP(_component,src ,"out_READ_" +toString(j)+"_DATA", 481 dest, "in_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_DATA"); 482 483 dest = _name; 484 485 PORT_MAP (_component,src , "in_READ_" +toString(j)+"_ADDRESS", 486 dest, "in_SPR_READ_"+toString(j)+"_NUM_REG"); 529 487 } 488 530 489 for (uint32_t j=0; j<_param->_nb_spr_write; j++) 531 490 { 532 _component->port_map(name_component, 533 "in_WRITE_"+toString(j)+"_VAL", 534 _name+"_glue", 535 "out_SPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL"); 536 _component->port_map(name_component, 537 "out_WRITE_"+toString(j)+"_ACK", 538 _name+"_glue", 539 "in_SPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK"); 540 _component->port_map(name_component, 541 "in_WRITE_"+toString(j)+"_ADDRESS", 542 _name, 543 "in_SPR_WRITE_"+toString(j)+"_NUM_REG" 544 ); 545 _component->port_map(name_component, 546 "in_WRITE_"+toString(j)+"_DATA", 547 _name, 548 "in_SPR_WRITE_"+toString(j)+"_DATA"); 491 dest = _name+"_glue"; 492 493 #ifdef POSITION 494 _component->interface_map (src , "write_"+toString(j), 495 dest,"spr_write_registerfile_"+toString(i)+"_"+toString(j)); 496 #endif 497 498 COMPONENT_MAP(_component,src , "in_WRITE_" +toString(j)+"_VAL", 499 dest,"out_SPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL"); 500 COMPONENT_MAP(_component,src ,"out_WRITE_" +toString(j)+"_ACK", 501 dest, "in_SPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK"); 502 503 dest = _name; 504 505 PORT_MAP (_component,src , "in_WRITE_" +toString(j)+"_ADDRESS", 506 dest, "in_SPR_WRITE_"+toString(j)+"_NUM_REG"); 507 PORT_MAP (_component,src , "in_WRITE_" +toString(j)+"_DATA", 508 dest, "in_SPR_WRITE_"+toString(j)+"_DATA"); 549 509 } 550 510 … … 554 514 for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 555 515 { 556 name_component= _name+"_spr_status_"+toString(i);516 src = _name+"_spr_status_"+toString(i); 557 517 558 log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"), name_component.c_str());518 log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),src.c_str()); 559 519 560 #ifdef POSITION 561 _component->interface_map (name_component,"", 562 _name ,""); 563 #endif 564 565 _component->port_map(name_component,"in_CLOCK" , _name, "in_CLOCK"); 566 _component->port_map(name_component,"in_NRESET", _name, "in_NRESET"); 567 520 { 521 dest = _name; 522 #ifdef POSITION 523 _component->interface_map (src ,"", 524 dest,""); 525 #endif 526 PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); 527 PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); 528 } 529 568 530 for (uint32_t j=0; j<_param->_nb_spr_read; j++) 569 531 { 570 _component->port_map(name_component, 571 "in_READ_"+toString(j)+"_VAL" , 572 _name+"_glue", 573 "out_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_VAL" ); 574 _component->port_map(name_component, 575 "out_READ_"+toString(j)+"_ACK", 576 _name+"_glue", 577 "in_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_ACK" ); 578 _component->port_map(name_component, 579 "out_READ_"+toString(j)+"_DATA", 580 _name+"_glue", 581 "in_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_DATA_VAL" ); 582 _component->port_map(name_component, 583 "in_READ_"+toString(j)+"_ADDRESS", 584 _name, 585 "in_SPR_READ_"+toString(j)+"_NUM_REG"); 532 dest = _name+"_glue"; 533 534 #ifdef POSITION 535 _component->interface_map (src , "read_"+toString(j), 536 dest,"spr_read_status_"+toString(i)+"_"+toString(j)); 537 #endif 538 539 COMPONENT_MAP(_component,src , "in_READ_" +toString(j)+"_VAL", 540 dest,"out_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_VAL"); 541 COMPONENT_MAP(_component,src ,"out_READ_" +toString(j)+"_ACK", 542 dest, "in_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_ACK"); 543 COMPONENT_MAP(_component,src ,"out_READ_" +toString(j)+"_DATA", 544 dest, "in_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_DATA_VAL"); 545 546 dest = _name; 547 548 PORT_MAP (_component,src , "in_READ_" +toString(j)+"_ADDRESS", 549 dest, "in_SPR_READ_"+toString(j)+"_NUM_REG"); 586 550 } 587 551 … … 589 553 for (uint32_t j=0; j<_param->_nb_spr_write; j++) 590 554 { 591 _component->port_map(name_component, 592 "in_WRITE_"+toString(x)+"_VAL" , 593 _name+"_glue", 594 "out_SPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_VAL"); 595 _component->port_map(name_component, 596 "out_WRITE_"+toString(x)+"_ACK", 597 _name+"_glue", 598 "in_SPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_ACK" ); 599 _component->port_map(name_component, 600 "in_WRITE_"+toString(x)+"_DATA" , 601 _name+"_glue", 602 "out_CONST_1"); 603 _component->port_map(_name+"_glue", 604 "out_CONST_1", 605 name_component, 606 "in_WRITE_"+toString(x)+"_DATA" 607 ); 608 609 _component->port_map(name_component, 610 "in_WRITE_"+toString(x++)+"_ADDRESS", 611 _name, 612 "in_SPR_WRITE_"+toString(j)+"_NUM_REG"); 555 dest = _name+"_glue"; 556 557 #ifdef POSITION 558 _component->interface_map (src , "write_"+toString(j), 559 dest,"spr_write_status_"+toString(i)+"_"+toString(j)); 560 #endif 561 562 COMPONENT_MAP(_component,src , "in_WRITE_" +toString(x)+"_VAL", 563 dest,"out_SPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_VAL"); 564 COMPONENT_MAP(_component,src ,"out_WRITE_" +toString(x)+"_ACK", 565 dest, "in_SPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_ACK"); 566 COMPONENT_MAP(_component,src , "in_WRITE_" +toString(x)+"_DATA", 567 dest,"out_SPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_DATA"); 568 // dest,"out_CONST_1"); 569 570 dest = _name; 571 572 PORT_MAP (_component,src , "in_WRITE_" +toString(x)+"_ADDRESS", 573 dest, "in_SPR_WRITE_"+toString(j)+"_NUM_REG"); 574 575 x++; 613 576 } 614 577 615 578 for (uint32_t j=0; j<_param->_nb_inst_insert_rob [i]; j++) 616 579 { 617 _component->port_map(name_component, 618 "in_WRITE_"+toString(x)+"_VAL" , 619 _name+"_glue", 620 "out_INSERT_ROB_SPR_STATUS_"+toString(i)+"_"+toString(j)+"_VAL"); 621 _component->port_map(name_component, 622 "out_WRITE_"+toString(x)+"_ACK", 623 _name+"_glue", 624 "in_INSERT_ROB_SPR_STATUS_"+toString(i)+"_"+toString(j)+"_ACK" ); 625 626 _component->port_map(name_component, 627 "in_WRITE_"+toString(x)+"_DATA", 628 _name+"_glue", 629 "out_CONST_0" 630 ); 631 _component->port_map( _name+"_glue", 632 "out_CONST_0", 633 name_component, 634 "in_WRITE_"+toString(x)+"_DATA" 635 ); 636 637 _component->port_map(name_component, 638 "in_WRITE_"+toString(x++)+"_ADDRESS", 639 _name, 640 "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RE_NUM_REG"); 641 580 dest = _name+"_glue"; 581 582 #ifdef POSITION 583 _component->interface_map (src , "write_"+toString(j), 584 dest,"insert_rob_spr_status_"+toString(i)+"_"+toString(j)); 585 #endif 586 587 COMPONENT_MAP(_component,src , "in_WRITE_" +toString(x)+"_VAL", 588 dest,"out_INSERT_ROB_SPR_STATUS_"+toString(i)+"_"+toString(j)+"_VAL"); 589 COMPONENT_MAP(_component,src ,"out_WRITE_" +toString(x)+"_ACK", 590 dest, "in_INSERT_ROB_SPR_STATUS_"+toString(i)+"_"+toString(j)+"_ACK"); 591 COMPONENT_MAP(_component,src , "in_WRITE_" +toString(x)+"_DATA", 592 dest,"out_INSERT_ROB_SPR_STATUS_"+toString(i)+"_"+toString(j)+"_DATA"); 593 // dest,"out_CONST_0"); 594 595 dest = _name; 596 597 PORT_MAP (_component,src , "in_WRITE_" +toString(x)+"_ADDRESS", 598 dest, "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RE_NUM_REG"); 599 600 x++; 642 601 } 643 602 644 // for (uint32_t j=0; j<_param->_nb_inst_retire_rob [i]; j++)645 // {646 // _component->port_map(name_component,647 // "in_WRITE_"+toString(x)+"_VAL" ,648 // _name+"_glue",649 // "out_RETIRE_ROB_SPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_VAL");650 // _component->port_map(name_component,651 // "out_WRITE_"+toString(x)+"_ACK",652 // _name+"_glue",653 // "in_RETIRE_ROB_SPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_ACK" );654 655 // _component->port_map(name_component,656 // "in_WRITE_"+toString(x)+"_DATA" ,657 // _name+"_glue",658 // "out_CONST_0");659 // _component->port_map(_name+"_glue",660 // "out_CONST_0",661 // name_component,662 // "in_WRITE_"+toString(x)+"_DATA"663 // );664 665 // _component->port_map(name_component,666 // "in_WRITE_"+toString(x++)+"_ADDRESS",667 // _name,668 // "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_OLD_NUM_REG");669 670 // _component->port_map(name_component,671 // "in_WRITE_"+toString(x)+"_VAL" ,672 // _name+"_glue",673 // "out_RETIRE_ROB_SPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_VAL");674 // _component->port_map(name_component,675 // "out_WRITE_"+toString(x)+"_ACK",676 // _name+"_glue",677 // "in_RETIRE_ROB_SPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_ACK" );678 679 // _component->port_map(name_component,680 // "in_WRITE_"+toString(x)+"_DATA" ,681 // _name+"_glue",682 // "out_CONST_1"683 // );684 // _component->port_map(_name+"_glue",685 // "out_CONST_1",686 // name_component,687 // "in_WRITE_"+toString(x)+"_DATA"688 // );689 690 // _component->port_map(name_component,691 // "in_WRITE_"+toString(x++)+"_ADDRESS",692 // _name,693 // "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_NEW_NUM_REG");694 // }695 603 696 604 } … … 698 606 699 607 { 700 name_component= _name+"_glue";608 src = _name+"_glue"; 701 609 702 log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"), name_component.c_str());610 log_printf(INFO,Register_unit,FUNCTION,_("Instance : %s"),src.c_str()); 703 611 704 #ifdef POSITION 705 _component->interface_map (name_component,"",706 _name ,""); 707 #endif 708 709 _component->port_map(name_component,"in_CLOCK" , _name, "in_CLOCK" ); 710 _component->port_map(name_component,"in_NRESET", _name, "in_NRESET");711 // _component->port_map(name_component,"out_CONST_0",_name,"out_CONST_0");712 // _component->port_map(name_component,"out_CONST_1",_name,"out_CONST_1"); 612 { 613 dest = _name; 614 #ifdef POSITION 615 _component->interface_map (src ,"", 616 dest,""); 617 #endif 618 PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK"); 619 PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET"); 620 } 713 621 714 622 for (uint32_t j=0; j<_param->_nb_gpr_read; j++) 715 623 { 716 _component->port_map(name_component, 717 "in_GPR_READ_"+toString(j)+"_VAL", 718 _name, 719 "in_GPR_READ_"+toString(j)+"_VAL"); 720 _component->port_map(name_component, 721 "out_GPR_READ_"+toString(j)+"_ACK", 722 _name, 723 "out_GPR_READ_"+toString(j)+"_ACK" ); 624 dest = _name; 625 626 #ifdef POSITION 627 _component->interface_map (src ,"gpr_read_"+toString(j), 628 dest,"gpr_read_"+toString(j)); 629 #endif 630 631 PORT_MAP(_component,src , "in_GPR_READ_"+toString(j)+"_VAL", 632 dest, "in_GPR_READ_"+toString(j)+"_VAL"); 633 PORT_MAP(_component,src ,"out_GPR_READ_"+toString(j)+"_ACK", 634 dest,"out_GPR_READ_"+toString(j)+"_ACK"); 724 635 if (_param->_have_port_ooo_engine_id == true) 725 _component->port_map(name_component, 726 "in_GPR_READ_"+toString(j)+"_OOO_ENGINE_ID" , 727 _name, 728 "in_GPR_READ_"+toString(j)+"_OOO_ENGINE_ID"); 729 _component->port_map(name_component, 730 "out_GPR_READ_"+toString(j)+"_DATA" , 731 _name, 732 "out_GPR_READ_"+toString(j)+"_DATA"); 733 _component->port_map(name_component, 734 "out_GPR_READ_"+toString(j)+"_DATA_VAL" , 735 _name, 736 "out_GPR_READ_"+toString(j)+"_DATA_VAL"); 737 738 for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 739 { 740 _component->port_map(name_component , 741 "out_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL", 742 _name+"_gpr_"+toString(i), 743 "in_READ_"+toString(j)+"_VAL" ); 744 _component->port_map(name_component, 745 "in_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK" , 746 _name+"_gpr_"+toString(i), 747 "out_READ_"+toString(j)+"_ACK" ); 748 _component->port_map(name_component, 749 "in_GPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_DATA" , 750 _name+"_gpr_"+toString(i), 751 "out_READ_"+toString(j)+"_DATA"); 752 _component->port_map(name_component, 753 "out_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_VAL" , 754 _name+"_gpr_status_"+toString(i), 755 "in_READ_"+toString(j)+"_VAL" ); 756 _component->port_map(name_component, 757 "in_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_ACK" , 758 _name+"_gpr_status_"+toString(i), 759 "out_READ_"+toString(j)+"_ACK"); 760 _component->port_map(name_component, 761 "in_GPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_DATA_VAL" , 762 _name+"_gpr_status_"+toString(i), 763 "out_READ_"+toString(j)+"_DATA"); 764 } 636 PORT_MAP(_component,src , "in_GPR_READ_"+toString(j)+"_OOO_ENGINE_ID", 637 dest, "in_GPR_READ_"+toString(j)+"_OOO_ENGINE_ID"); 638 PORT_MAP(_component,src ,"out_GPR_READ_"+toString(j)+"_DATA", 639 dest,"out_GPR_READ_"+toString(j)+"_DATA"); 640 PORT_MAP(_component,src ,"out_GPR_READ_"+toString(j)+"_DATA_VAL", 641 dest,"out_GPR_READ_"+toString(j)+"_DATA_VAL"); 642 643 // out_GPR_READ_REGISTERFILE_VAL - gpr. in_READ_VAL 644 // in_GPR_READ_REGISTERFILE_ACK - gpr.out_READ_ACK 645 // in_GPR_READ_REGISTERFILE_DATA - gpr.out_READ_DATA 646 647 // out_GPR_READ_STATUS_VAL - gpr. in_READ_VAL 648 // in_GPR_READ_STATUS_ACK - gpr.out_READ_ACK 649 // in_GPR_READ_STATUS_DATA_VAL - gpr.out_READ_DATA 765 650 } 766 651 767 652 for (uint32_t j=0; j<_param->_nb_gpr_write; j++) 768 653 { 769 _component->port_map(name_component, 770 "in_GPR_WRITE_"+toString(j)+"_VAL", 771 _name, 772 "in_GPR_WRITE_"+toString(j)+"_VAL" ); 773 _component->port_map(name_component, 774 "out_GPR_WRITE_"+toString(j)+"_ACK", 775 _name, 776 "out_GPR_WRITE_"+toString(j)+"_ACK" ); 654 dest = _name; 655 656 #ifdef POSITION 657 _component->interface_map (src ,"gpr_write_"+toString(j), 658 dest,"gpr_write_"+toString(j)); 659 #endif 660 661 PORT_MAP(_component,src , "in_GPR_WRITE_"+toString(j)+"_VAL", 662 dest, "in_GPR_WRITE_"+toString(j)+"_VAL"); 663 PORT_MAP(_component,src ,"out_GPR_WRITE_"+toString(j)+"_ACK", 664 dest,"out_GPR_WRITE_"+toString(j)+"_ACK"); 777 665 if (_param->_have_port_ooo_engine_id == true) 778 _component->port_map(name_component, 779 "in_GPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID", 780 _name, 781 "in_GPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID" ); 782 783 for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 666 PORT_MAP(_component,src , "in_GPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID", 667 dest, "in_GPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID"); 668 669 // out_GPR_WRITE_REGISTERFILE_VAL - gpr. in_WRITE_VAL 670 // in_GPR_WRITE_REGISTERFILE_ACK - gpr.out_WRITE_ACK 671 // out_GPR_WRITE_STATUS_VAL - gpr. in_WRITE_VAL 672 // in_GPR_WRITE_STATUS_ACK - gpr.out_WRITE_ACK 673 // out_GPR_WRITE_STATUS_DATA - gpr. in_WRITE_DATA 674 } 675 676 for (uint32_t j=0; j<_param->_nb_spr_read; j++) 677 { 678 dest = _name; 679 680 #ifdef POSITION 681 _component->interface_map (src ,"spr_read_"+toString(j), 682 dest,"spr_read_"+toString(j)); 683 #endif 684 685 PORT_MAP(_component,src , "in_SPR_READ_"+toString(j)+"_VAL", 686 dest, "in_SPR_READ_"+toString(j)+"_VAL"); 687 PORT_MAP(_component,src ,"out_SPR_READ_"+toString(j)+"_ACK", 688 dest,"out_SPR_READ_"+toString(j)+"_ACK"); 689 if (_param->_have_port_ooo_engine_id == true) 690 PORT_MAP(_component,src , "in_SPR_READ_"+toString(j)+"_OOO_ENGINE_ID", 691 dest, "in_SPR_READ_"+toString(j)+"_OOO_ENGINE_ID"); 692 PORT_MAP(_component,src ,"out_SPR_READ_"+toString(j)+"_DATA", 693 dest,"out_SPR_READ_"+toString(j)+"_DATA"); 694 PORT_MAP(_component,src ,"out_SPR_READ_"+toString(j)+"_DATA_VAL", 695 dest,"out_SPR_READ_"+toString(j)+"_DATA_VAL"); 696 697 // out_SPR_READ_REGISTERFILE_VAL - spr. in_READ_VAL 698 // in_SPR_READ_REGISTERFILE_ACK - spr.out_READ_ACK 699 // in_SPR_READ_REGISTERFILE_DATA - spr.out_READ_DATA 700 701 // out_SPR_READ_STATUS_VAL - spr. in_READ_VAL 702 // in_SPR_READ_STATUS_ACK - spr.out_READ_ACK 703 // in_SPR_READ_STATUS_DATA_VAL - spr.out_READ_DATA 704 } 705 706 for (uint32_t j=0; j<_param->_nb_spr_write; j++) 707 { 708 dest = _name; 709 710 #ifdef POSITION 711 _component->interface_map (src ,"spr_write_"+toString(j), 712 dest,"spr_write_"+toString(j)); 713 #endif 714 715 PORT_MAP(_component,src , "in_SPR_WRITE_"+toString(j)+"_VAL", 716 dest, "in_SPR_WRITE_"+toString(j)+"_VAL"); 717 PORT_MAP(_component,src ,"out_SPR_WRITE_"+toString(j)+"_ACK", 718 dest,"out_SPR_WRITE_"+toString(j)+"_ACK"); 719 if (_param->_have_port_ooo_engine_id == true) 720 PORT_MAP(_component,src , "in_SPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID", 721 dest, "in_SPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID"); 722 723 // out_SPR_WRITE_REGISTERFILE_VAL - spr. in_WRITE_VAL 724 // in_SPR_WRITE_REGISTERFILE_ACK - spr.out_WRITE_ACK 725 // out_SPR_WRITE_STATUS_VAL - spr. in_WRITE_VAL 726 // in_SPR_WRITE_STATUS_ACK - spr.out_WRITE_ACK 727 // out_SPR_WRITE_STATUS_DATA - spr. in_WRITE_DATA 728 } 729 730 for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 731 { 732 uint32_t x =_param->_nb_inst_insert_rob [i]; 733 734 for (uint32_t j=0; j<x; j++) 784 735 { 785 _component->port_map(name_component, 786 "out_GPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL" , 787 _name+"_gpr_"+toString(i), 788 "in_WRITE_"+toString(j)+"_VAL" ); 789 _component->port_map(name_component, 790 "in_GPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK" , 791 _name+"_gpr_"+toString(i), 792 "out_WRITE_"+toString(j)+"_ACK" ); 793 _component->port_map(name_component, 794 "out_GPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_VAL" , 795 _name+"_gpr_status_"+toString(i), 796 "in_WRITE_"+toString(j)+"_VAL" ); 797 _component->port_map(name_component, 798 "in_GPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_ACK" , 799 _name+"_gpr_status_"+toString(i), 800 "out_WRITE_"+toString(j)+"_ACK" ); 736 dest = _name; 737 738 #ifdef POSITION 739 _component->interface_map (src ,"insert_rob_"+toString(i)+"_"+toString(j), 740 dest,"insert_rob_"+toString(i)+"_"+toString(j)); 741 #endif 742 743 PORT_MAP(_component,src , "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_VAL", 744 dest, "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_VAL"); 745 PORT_MAP(_component,src ,"out_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_ACK", 746 dest,"out_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_ACK"); 747 PORT_MAP(_component,src , "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RD_USE", 748 dest, "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RD_USE"); 749 PORT_MAP(_component,src , "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RE_USE", 750 dest, "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RE_USE"); 751 752 // out_INSERT_ROB_GPR_STATUS_VAL - gpr_status. in_WRITE_VAL 753 // in_INSERT_ROB_GPR_STATUS_ACK - gpr_status. out_WRITE_ACK 754 // out_INSERT_ROB_GPR_STATUS_DATA- gpr_status. in_WRITE_DATA 755 // out_INSERT_ROB_SPR_STATUS_VAL - spr_status. in_WRITE_VAL 756 // in_INSERT_ROB_SPR_STATUS_ACK - spr_status. out_WRITE_ACK 757 // in_INSERT_ROB_SPR_STATUS_DATA- spr_status. out_WRITE_DATA 801 758 } 802 759 } 803 760 804 for (uint32_t j=0; j<_param->_nb_spr_read; j++)805 {806 _component->port_map(name_component,807 "in_SPR_READ_"+toString(j)+"_VAL",808 _name,809 "in_SPR_READ_"+toString(j)+"_VAL");810 _component->port_map(name_component,811 "out_SPR_READ_"+toString(j)+"_ACK",812 _name,813 "out_SPR_READ_"+toString(j)+"_ACK" );814 if (_param->_have_port_ooo_engine_id == true)815 _component->port_map(name_component,816 "in_SPR_READ_"+toString(j)+"_OOO_ENGINE_ID" ,817 _name,818 "in_SPR_READ_"+toString(j)+"_OOO_ENGINE_ID");819 _component->port_map(name_component,820 "out_SPR_READ_"+toString(j)+"_DATA" ,821 _name,822 "out_SPR_READ_"+toString(j)+"_DATA");823 _component->port_map(name_component,824 "out_SPR_READ_"+toString(j)+"_DATA_VAL" ,825 _name,826 "out_SPR_READ_"+toString(j)+"_DATA_VAL");827 828 for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)829 {830 _component->port_map(name_component ,831 "out_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL",832 _name+"_spr_"+toString(i),833 "in_READ_"+toString(j)+"_VAL" );834 _component->port_map(name_component,835 "in_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK" ,836 _name+"_spr_"+toString(i),837 "out_READ_"+toString(j)+"_ACK" );838 _component->port_map(name_component,839 "in_SPR_READ_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_DATA" ,840 _name+"_spr_"+toString(i),841 "out_READ_"+toString(j)+"_DATA");842 _component->port_map(name_component,843 "out_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_VAL" ,844 _name+"_spr_status_"+toString(i),845 "in_READ_"+toString(j)+"_VAL" );846 _component->port_map(name_component,847 "in_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_ACK" ,848 _name+"_spr_status_"+toString(i),849 "out_READ_"+toString(j)+"_ACK");850 _component->port_map(name_component,851 "in_SPR_READ_STATUS_"+toString(i)+"_"+toString(j)+"_DATA_VAL" ,852 _name+"_spr_status_"+toString(i),853 "out_READ_"+toString(j)+"_DATA");854 }855 }856 857 for (uint32_t j=0; j<_param->_nb_spr_write; j++)858 {859 _component->port_map(name_component,860 "in_SPR_WRITE_"+toString(j)+"_VAL",861 _name,862 "in_SPR_WRITE_"+toString(j)+"_VAL" );863 _component->port_map(name_component,864 "out_SPR_WRITE_"+toString(j)+"_ACK",865 _name,866 "out_SPR_WRITE_"+toString(j)+"_ACK" );867 if (_param->_have_port_ooo_engine_id == true)868 _component->port_map(name_component,869 "in_SPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID",870 _name,871 "in_SPR_WRITE_"+toString(j)+"_OOO_ENGINE_ID" );872 873 for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)874 {875 _component->port_map(name_component,876 "out_SPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_VAL" ,877 _name+"_spr_"+toString(i),878 "in_WRITE_"+toString(j)+"_VAL" );879 _component->port_map(name_component,880 "in_SPR_WRITE_REGISTERFILE_"+toString(i)+"_"+toString(j)+"_ACK" ,881 _name+"_spr_"+toString(i),882 "out_WRITE_"+toString(j)+"_ACK" );883 _component->port_map(name_component,884 "out_SPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_VAL" ,885 _name+"_spr_status_"+toString(i),886 "in_WRITE_"+toString(j)+"_VAL" );887 _component->port_map(name_component,888 "in_SPR_WRITE_STATUS_"+toString(i)+"_"+toString(j)+"_ACK" ,889 _name+"_spr_status_"+toString(i),890 "out_WRITE_"+toString(j)+"_ACK" );891 }892 }893 894 for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)895 {896 uint32_t x =_param->_nb_inst_insert_rob [i];897 uint32_t gpr_j = _param->_nb_gpr_write;898 uint32_t spr_j = _param->_nb_spr_write;899 900 for (uint32_t j=0; j<x; j++)901 {902 _component->port_map(name_component,903 "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_VAL",904 _name,905 "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_VAL");906 _component->port_map(name_component,907 "out_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_ACK",908 _name,909 "out_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_ACK");910 _component->port_map(name_component,911 "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RD_USE",912 _name,913 "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RD_USE");914 _component->port_map(name_component,915 "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RE_USE",916 _name,917 "in_INSERT_ROB_"+toString(i)+"_"+toString(j)+"_RE_USE");918 _component->port_map(name_component,919 "out_INSERT_ROB_GPR_STATUS_"+toString(i)+"_"+toString(j)+"_VAL",920 _name+"_gpr_status_"+toString(i),921 "in_WRITE_"+toString(gpr_j)+"_VAL");922 _component->port_map(name_component,923 "in_INSERT_ROB_GPR_STATUS_"+toString(i)+"_"+toString(j)+"_ACK",924 _name+"_gpr_status_"+toString(i),925 "out_WRITE_"+toString(gpr_j++)+"_ACK");926 _component->port_map(name_component,927 "out_INSERT_ROB_SPR_STATUS_"+toString(i)+"_"+toString(j)+"_VAL",928 _name+"_spr_status_"+toString(i),929 "in_WRITE_"+toString(spr_j)+"_VAL");930 _component->port_map(name_component,931 "in_INSERT_ROB_SPR_STATUS_"+toString(i)+"_"+toString(j)+"_ACK",932 _name+"_spr_status_"+toString(i),933 "out_WRITE_"+toString(spr_j++)+"_ACK");934 }935 }936 937 // for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)938 // {939 // uint32_t x =_param->_nb_inst_retire_rob [i];940 // uint32_t gpr_j = _param->_nb_gpr_write + _param->_nb_inst_insert_rob [i];941 // uint32_t spr_j = _param->_nb_spr_write + _param->_nb_inst_insert_rob [i];942 943 // for (uint32_t j=0; j<x; j++)944 // {945 // _component->port_map(name_component,946 // "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_VAL",947 // _name,948 // "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_VAL");949 // _component->port_map(name_component,950 // "out_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_ACK",951 // _name,952 // "out_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_ACK");953 // _component->port_map(name_component,954 // "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_OLD_USE",955 // _name,956 // "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_OLD_USE");957 // _component->port_map(name_component,958 // "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_NEW_USE",959 // _name,960 // "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RD_NEW_USE");961 // _component->port_map(name_component,962 // "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_OLD_USE",963 // _name,964 // "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_OLD_USE");965 // _component->port_map(name_component,966 // "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_NEW_USE",967 // _name,968 // "in_RETIRE_ROB_"+toString(i)+"_"+toString(j)+"_RE_NEW_USE");969 970 // _component->port_map(name_component,971 // "out_RETIRE_ROB_GPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_VAL",972 // _name+"_gpr_status_"+toString(i),973 // "in_WRITE_"+toString(gpr_j)+"_VAL");974 // _component->port_map(name_component,975 // "in_RETIRE_ROB_GPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_ACK",976 // _name+"_gpr_status_"+toString(i),977 // "out_WRITE_"+toString(gpr_j++)+"_ACK");978 // _component->port_map(name_component,979 // "out_RETIRE_ROB_GPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_VAL",980 // _name+"_gpr_status_"+toString(i),981 // "in_WRITE_"+toString(gpr_j)+"_VAL");982 // _component->port_map(name_component,983 // "in_RETIRE_ROB_GPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_ACK",984 // _name+"_gpr_status_"+toString(i),985 // "out_WRITE_"+toString(gpr_j++)+"_ACK");986 // _component->port_map(name_component,987 // "out_RETIRE_ROB_SPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_VAL",988 // _name+"_spr_status_"+toString(i),989 // "in_WRITE_"+toString(spr_j)+"_VAL");990 // _component->port_map(name_component,991 // "in_RETIRE_ROB_SPR_STATUS_OLD_"+toString(i)+"_"+toString(j)+"_ACK",992 // _name+"_spr_status_"+toString(i),993 // "out_WRITE_"+toString(spr_j++)+"_ACK");994 // _component->port_map(name_component,995 // "out_RETIRE_ROB_SPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_VAL",996 // _name+"_spr_status_"+toString(i),997 // "in_WRITE_"+toString(spr_j)+"_VAL");998 // _component->port_map(name_component,999 // "in_RETIRE_ROB_SPR_STATUS_NEW_"+toString(i)+"_"+toString(j)+"_ACK",1000 // _name+"_spr_status_"+toString(i),1001 // "out_WRITE_"+toString(spr_j++)+"_ACK");1002 // }1003 // }1004 761 }// glue 1005 762 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/src/Register_unit_deallocation.cpp
r112 r128 74 74 75 75 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 76 76 for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) 77 { 78 delete component_gpr [i]; 79 delete component_gpr_status [i]; 80 delete component_spr [i]; 81 delete component_spr_status [i]; 82 } 77 83 delete [] component_gpr ; 78 84 delete [] component_gpr_status; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/SelfTest/src/main.cpp
r115 r128 7 7 8 8 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/SelfTest/include/test.h" 9 #include "Behavioural/include/Allocation.h" 9 10 10 11 #define NB_PARAMS 18 … … 309 310 morpheo::behavioural::custom::custom_information_t (*get_custom_information) (void) = &(morpheo::behavioural::custom::default_get_custom_information); 310 311 312 bool * num_thread_valid; 313 ALLOC1(num_thread_valid ,bool, nb_thread); 314 for (uint32_t i=0; i<nb_thread; ++i) 315 num_thread_valid [i] = true; 316 311 317 try 312 318 { … … 367 373 is_load_store_unit , //[nb_execute_unit] 368 374 translate_num_execute_unit , //[nb_execute_unit] 375 num_thread_valid , //[nb_thread] 369 376 true // is_toplevel 370 377 ); 371 378 372 379 test (name,param); 380 381 delete param; 373 382 } 374 383 catch (morpheo::ErrorMorpheo & error) … … 383 392 } 384 393 394 for (uint32_t i=0; i< nb_functionnal_unit; i++) 395 { 396 for (uint32_t j=0; j< MAX_TYPE; j++) 397 delete [] timing [i][j]; 398 delete [] timing [i]; 399 } 400 delete [] timing; 401 402 DELETE1(translate_num_execute_unit ,_nb_execute_unit); 403 DELETE1(is_load_store_unit ,_nb_execute_unit); 404 405 for (uint32_t i=0; i<nb_execute_unit; i++) 406 delete read_unit_to_execution_unit_table_thread [i]; 407 delete [] read_unit_to_execution_unit_table_thread; 408 409 for (uint32_t i=0; i<nb_read_unit; i++) 410 { 411 for (uint32_t j=0; j<nb_execute_unit; j++) 412 delete [] read_unit_to_execution_unit_table_routing [i][j]; 413 delete [] read_unit_to_execution_unit_table_routing [i]; 414 } 415 delete [] read_unit_to_execution_unit_table_routing; 416 417 for (uint32_t i=0; i<nb_write_unit; i++) 418 delete execution_unit_to_write_unit_table_thread [i]; 419 delete [] execution_unit_to_write_unit_table_thread; 420 421 for (uint32_t i=0; i<nb_execute_unit; i++) 422 { 423 uint32_t nb_execute_unit_port = (i<nb_load_store_unit)?nb_inst_memory[i]:nb_inst_functionnal_unit[i-nb_load_store_unit]; 424 for (uint32_t j=0; j<nb_execute_unit_port; j++) 425 delete [] execution_unit_to_write_unit_table_routing [i][j]; 426 delete [] execution_unit_to_write_unit_table_routing [i]; 427 } 428 delete [] execution_unit_to_write_unit_table_routing; 429 430 DELETE1(nb_inst_retire_rob ,_nb_ooo_engine); 431 DELETE1(nb_inst_insert_rob ,_nb_ooo_engine); 432 DELETE1(nb_special_register ,_nb_ooo_engine); 433 DELETE1(nb_general_register ,_nb_ooo_engine); 434 DELETE1(write_queue_scheme ,_nb_write_unit); 435 DELETE1(nb_bypass_write ,_nb_write_unit); 436 DELETE1(size_execute_queue ,_nb_write_unit); 437 DELETE1(size_write_queue ,_nb_write_unit); 438 DELETE1(nb_inst_memory ,_nb_load_store_unit); 439 DELETE1(nb_cache_port ,_nb_load_store_unit); 440 DELETE1(nb_bypass_memory ,_nb_load_store_unit); 441 DELETE1(speculative_load ,_nb_load_store_unit); 442 DELETE1(nb_port_check ,_nb_load_store_unit); 443 DELETE1(size_speculative_access_queue ,_nb_load_store_unit); 444 DELETE1(size_load_queue ,_nb_load_store_unit); 445 DELETE1(size_store_queue ,_nb_load_store_unit); 446 DELETE1(nb_inst_functionnal_unit ,_nb_functionnal_unit); 447 DELETE1(nb_inst_retire ,_nb_read_unit); 448 DELETE1(size_reservation_station ,_nb_read_unit); 449 DELETE1(size_read_queue ,_nb_read_unit); 450 DELETE1(num_thread_valid , nb_thread); 451 385 452 return (EXIT_SUCCESS); 386 453 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/SelfTest/src/test.cpp
r97 r128 50 50 sc_clock * in_CLOCK = new sc_clock ("clock", 1.0, 0.5); 51 51 sc_signal<Tcontrol_t> * in_NRESET = new sc_signal<Tcontrol_t> ("NRESET"); 52 53 sc_signal<Tcontrol_t > ** in_EXECUTE_LOOP_IN_VAL ; 54 sc_signal<Tcontrol_t > ** out_EXECUTE_LOOP_IN_ACK ; 55 sc_signal<Tcontext_t > ** in_EXECUTE_LOOP_IN_CONTEXT_ID ; 56 sc_signal<Tcontext_t > ** in_EXECUTE_LOOP_IN_FRONT_END_ID ; 57 sc_signal<Tcontext_t > ** in_EXECUTE_LOOP_IN_OOO_ENGINE_ID ; 58 sc_signal<Tpacket_t > ** in_EXECUTE_LOOP_IN_PACKET_ID ; 59 sc_signal<Toperation_t > ** in_EXECUTE_LOOP_IN_OPERATION ; 60 sc_signal<Ttype_t > ** in_EXECUTE_LOOP_IN_TYPE ; 61 sc_signal<Tlsq_ptr_t > ** in_EXECUTE_LOOP_IN_STORE_QUEUE_PTR_WRITE; 62 sc_signal<Tlsq_ptr_t > ** in_EXECUTE_LOOP_IN_LOAD_QUEUE_PTR_WRITE ; 63 sc_signal<Tcontrol_t > ** in_EXECUTE_LOOP_IN_HAS_IMMEDIAT ; 64 sc_signal<Tgeneral_data_t > ** in_EXECUTE_LOOP_IN_IMMEDIAT ; 65 sc_signal<Tcontrol_t > ** in_EXECUTE_LOOP_IN_READ_RA ; 66 sc_signal<Tgeneral_address_t> ** in_EXECUTE_LOOP_IN_NUM_REG_RA ; 67 sc_signal<Tcontrol_t > ** in_EXECUTE_LOOP_IN_READ_RB ; 68 sc_signal<Tgeneral_address_t> ** in_EXECUTE_LOOP_IN_NUM_REG_RB ; 69 sc_signal<Tcontrol_t > ** in_EXECUTE_LOOP_IN_READ_RC ; 70 sc_signal<Tspecial_address_t> ** in_EXECUTE_LOOP_IN_NUM_REG_RC ; 71 sc_signal<Tcontrol_t > ** in_EXECUTE_LOOP_IN_WRITE_RD ; 72 sc_signal<Tgeneral_address_t> ** in_EXECUTE_LOOP_IN_NUM_REG_RD ; 73 sc_signal<Tcontrol_t > ** in_EXECUTE_LOOP_IN_WRITE_RE ; 74 sc_signal<Tspecial_address_t> ** in_EXECUTE_LOOP_IN_NUM_REG_RE ; 75 sc_signal<Tcontrol_t > ** out_EXECUTE_LOOP_OUT_VAL ; 76 sc_signal<Tcontrol_t > ** in_EXECUTE_LOOP_OUT_ACK ; 77 sc_signal<Tcontext_t > ** out_EXECUTE_LOOP_OUT_CONTEXT_ID ; 78 sc_signal<Tcontext_t > ** out_EXECUTE_LOOP_OUT_FRONT_END_ID ; 79 sc_signal<Tcontext_t > ** out_EXECUTE_LOOP_OUT_OOO_ENGINE_ID ; 80 sc_signal<Tpacket_t > ** out_EXECUTE_LOOP_OUT_PACKET_ID ; 81 //sc_signal<Toperation_t > ** out_EXECUTE_LOOP_OUT_OPERATION ; 82 //sc_signal<Ttype_t > ** out_EXECUTE_LOOP_OUT_TYPE ; 83 sc_signal<Tspecial_data_t > ** out_EXECUTE_LOOP_OUT_FLAGS ; 84 sc_signal<Texception_t > ** out_EXECUTE_LOOP_OUT_EXCEPTION ; 85 sc_signal<Tcontrol_t > ** out_EXECUTE_LOOP_OUT_NO_SEQUENCE ; 86 sc_signal<Taddress_t > ** out_EXECUTE_LOOP_OUT_ADDRESS ; 87 sc_signal<Tgeneral_data_t > ** out_EXECUTE_LOOP_OUT_DATA ; 88 sc_signal<Tcontrol_t > *** out_DCACHE_REQ_VAL ; 89 sc_signal<Tcontrol_t > *** in_DCACHE_REQ_ACK ; 90 sc_signal<Tcontext_t > *** out_DCACHE_REQ_CONTEXT_ID ; 91 sc_signal<Tpacket_t > *** out_DCACHE_REQ_PACKET_ID ; 92 sc_signal<Tdcache_address_t > *** out_DCACHE_REQ_ADDRESS ; 93 sc_signal<Tdcache_type_t > *** out_DCACHE_REQ_TYPE ; 94 sc_signal<Tdcache_data_t > *** out_DCACHE_REQ_WDATA ; 95 sc_signal<Tcontrol_t > *** in_DCACHE_RSP_VAL ; 96 sc_signal<Tcontrol_t > *** out_DCACHE_RSP_ACK ; 97 sc_signal<Tcontext_t > *** in_DCACHE_RSP_CONTEXT_ID ; 98 sc_signal<Tpacket_t > *** in_DCACHE_RSP_PACKET_ID ; 99 sc_signal<Tdcache_data_t > *** in_DCACHE_RSP_RDATA ; 100 sc_signal<Tdcache_error_t > *** in_DCACHE_RSP_ERROR ; 101 sc_signal<Tcontrol_t > *** in_INSERT_ROB_VAL ; 102 sc_signal<Tcontrol_t > *** out_INSERT_ROB_ACK ; 103 sc_signal<Tcontrol_t > *** in_INSERT_ROB_RD_USE ; 104 sc_signal<Tgeneral_address_t> *** in_INSERT_ROB_RD_NUM_REG ; 105 sc_signal<Tcontrol_t > *** in_INSERT_ROB_RE_USE ; 106 sc_signal<Tspecial_address_t> *** in_INSERT_ROB_RE_NUM_REG ; 107 //sc_signal<Tcontrol_t > *** in_RETIRE_ROB_VAL ; 108 //sc_signal<Tcontrol_t > *** out_RETIRE_ROB_ACK ; 109 //sc_signal<Tcontrol_t > *** in_RETIRE_ROB_RD_OLD_USE ; 110 //sc_signal<Tgeneral_address_t> *** in_RETIRE_ROB_RD_OLD_NUM_REG ; 111 //sc_signal<Tcontrol_t > *** in_RETIRE_ROB_RD_NEW_USE ; 112 //sc_signal<Tgeneral_address_t> *** in_RETIRE_ROB_RD_NEW_NUM_REG ; 113 //sc_signal<Tcontrol_t > *** in_RETIRE_ROB_RE_OLD_USE ; 114 //sc_signal<Tspecial_address_t> *** in_RETIRE_ROB_RE_OLD_NUM_REG ; 115 //sc_signal<Tcontrol_t > *** in_RETIRE_ROB_RE_NEW_USE ; 116 //sc_signal<Tspecial_address_t> *** in_RETIRE_ROB_RE_NEW_NUM_REG ; 52 117 53 118 ALLOC1_SC_SIGNAL( in_EXECUTE_LOOP_IN_VAL ," in_EXECUTE_LOOP_IN_VAL ",Tcontrol_t ,_param->_nb_read_unit); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/src/Parameters.cpp
r124 r128 7 7 8 8 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/include/Parameters.h" 9 #include "Behavioural/include/Allocation.h" 9 10 #include "Common/include/Max.h" 10 11 … … 139 140 _nb_execute_unit = _nb_functionnal_unit + _nb_load_store_unit; 140 141 141 _nb_execute_unit_port = new uint32_t [_nb_execute_unit];142 143 _read_unit_to_execution_unit_table_execute_type = new bool * [_nb_execute_unit]; 142 ALLOC1(_nb_execute_unit_port ,uint32_t,_nb_execute_unit); 143 ALLOC2(_read_unit_to_execution_unit_table_execute_type,bool ,_nb_execute_unit,_nb_type); 144 144 145 for (uint32_t i=0; i<_nb_execute_unit; i++) 145 { 146 _read_unit_to_execution_unit_table_execute_type [i] = new bool [_nb_type]; 147 for (uint32_t j=0; j<_nb_type; j++) 148 _read_unit_to_execution_unit_table_execute_type [i][j] = false; 149 } 146 for (uint32_t j=0; j<_nb_type; j++) 147 _read_unit_to_execution_unit_table_execute_type [i][j] = false; 150 148 151 149 // Fill execute_type … … 203 201 uint32_t _max_nb_inst_memory = max<uint32_t>(_nb_inst_memory,_nb_load_store_unit); 204 202 205 _set_read_unit_source_register_write = new std::set<uint32_t> [_nb_read_unit];206 _set_read_unit_source_bypass_write = new std::set<uint32_t> [_nb_read_unit];207 _set_read_unit_source_bypass_memory = new std::set<uint32_t> [_nb_read_unit];208 209 _read_unit_nb_register_write = new uint32_t [_nb_read_unit];210 _read_unit_nb_bypass_write = new uint32_t [_nb_read_unit];211 _read_unit_nb_bypass_memory = new uint32_t [_nb_read_unit];212 213 _link_read_unit_with_load_store_unit = new bool ** [nb_read_unit];214 _link_read_unit_with_write_unit = new bool * [nb_read_unit];215 _link_read_unit_with_thread = new bool * [nb_read_unit];203 ALLOC1(_set_read_unit_source_register_write ,std::set<uint32_t>,_nb_read_unit); 204 ALLOC1(_set_read_unit_source_bypass_write ,std::set<uint32_t>,_nb_read_unit); 205 ALLOC1(_set_read_unit_source_bypass_memory ,std::set<uint32_t>,_nb_read_unit); 206 207 ALLOC1(_read_unit_nb_register_write ,uint32_t ,_nb_read_unit); 208 ALLOC1(_read_unit_nb_bypass_write ,uint32_t ,_nb_read_unit); 209 ALLOC1(_read_unit_nb_bypass_memory ,uint32_t ,_nb_read_unit); 210 211 ALLOC3(_link_read_unit_with_load_store_unit ,bool ,_nb_read_unit,_nb_execute_unit,_max_nb_inst_memory); 212 ALLOC2(_link_read_unit_with_write_unit ,bool ,_nb_read_unit,_nb_write_unit ); 213 ALLOC2(_link_read_unit_with_thread ,bool ,_nb_read_unit,_nb_thread ); 216 214 217 215 for (uint32_t i=0; i<_nb_read_unit; i++) … … 221 219 _read_unit_nb_bypass_memory [i] = 0; 222 220 223 _link_read_unit_with_load_store_unit [i] = new bool * [_nb_execute_unit];224 _link_read_unit_with_write_unit [i] = new bool [_nb_write_unit];225 _link_read_unit_with_thread [i] = new bool [_nb_thread];226 227 221 for (uint32_t j=0; j<_nb_execute_unit; j++) 228 { 229 _link_read_unit_with_load_store_unit [i][j] = new bool [_max_nb_inst_memory]; 230 231 for (uint32_t k=0; k<_max_nb_inst_memory; k++) 232 _link_read_unit_with_load_store_unit [i][j][k] = false; 233 } 222 for (uint32_t k=0; k<_max_nb_inst_memory; k++) 223 _link_read_unit_with_load_store_unit [i][j][k] = false; 224 234 225 for (uint32_t j=0; j<_nb_write_unit; j++) 235 226 _link_read_unit_with_write_unit [i][j] = false; … … 594 585 delete _param_read_unit [i]; 595 586 delete [] _param_read_unit; 596 587 597 588 for (uint32_t i=0; i<_nb_execute_unit; i++) 598 589 { 599 590 uint32_t x = _translate_num_execute_unit [i]; 600 591 601 592 if (_is_load_store_unit [i] == false) 602 593 delete _param_functionnal_unit [x]; 603 594 else 604 delete _param_load_store_unit [x];595 delete _param_load_store_unit [x]; 605 596 } 606 597 delete [] _param_functionnal_unit; … … 613 604 delete _param_register_unit; 614 605 615 delete [] _read_unit_to_execution_unit_table_execute_type; 616 delete [] _read_unit_nb_register_write; 617 delete [] _read_unit_nb_bypass_write; 618 delete [] _read_unit_nb_bypass_memory; 619 delete [] _set_read_unit_source_register_write ; 620 delete [] _set_read_unit_source_bypass_write ; 621 delete [] _set_read_unit_source_bypass_memory ; 622 delete [] _link_read_unit_with_load_store_unit; 623 delete [] _link_read_unit_with_write_unit; 624 delete [] _link_read_unit_with_thread; 625 delete [] _is_load_store_unit; 626 delete [] _translate_num_execute_unit; 627 delete [] _nb_execute_unit_port; 606 uint32_t _nb_thread = get_nb_thread(_nb_context, 607 _nb_front_end, 608 _nb_ooo_engine); 609 uint32_t _max_nb_inst_memory = max<uint32_t>(_nb_inst_memory,_nb_load_store_unit); 610 611 DELETE2(_link_read_unit_with_thread ,_nb_read_unit,_nb_thread ); 612 DELETE2(_link_read_unit_with_write_unit ,_nb_read_unit,_nb_write_unit ); 613 DELETE3(_link_read_unit_with_load_store_unit ,_nb_read_unit,_nb_execute_unit,_max_nb_inst_memory); 614 615 DELETE1(_read_unit_nb_bypass_memory ,_nb_read_unit); 616 DELETE1(_read_unit_nb_bypass_write ,_nb_read_unit); 617 DELETE1(_read_unit_nb_register_write ,_nb_read_unit); 618 619 DELETE1(_set_read_unit_source_bypass_memory ,_nb_read_unit); 620 DELETE1(_set_read_unit_source_bypass_write ,_nb_read_unit); 621 DELETE1(_set_read_unit_source_register_write ,_nb_read_unit); 622 623 DELETE2(_read_unit_to_execution_unit_table_execute_type,_nb_execute_unit,_nb_type); 624 DELETE1(_nb_execute_unit_port ,_nb_execute_unit); 625 628 626 log_printf(FUNC,Execute_loop,FUNCTION,"End"); 629 627 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_transition.cpp
r124 r128 50 50 reg_STATE [i] = CONTEXT_STATE_OK; 51 51 reg_INTERRUPT_ENABLE [i] = 0; 52 reg_EVENT_DEPTH [i] = 0; // unacessary 52 53 reg_EVENT_ADDRESS [i] = 0; // not necessary 54 reg_EVENT_ADDRESS_EPCR [i] = 0; // not necessary 55 reg_EVENT_ADDRESS_EPCR_VAL [i] = 0; // not necessary 56 reg_EVENT_ADDRESS_EEAR [i] = 0; // not necessary 57 reg_EVENT_ADDRESS_EEAR_VAL [i] = 0; // not necessary 58 reg_EVENT_IS_DELAY_SLOT [i] = 0; // not necessary 59 reg_EVENT_IS_DS_TAKE [i] = 0; // not necessary 60 reg_EVENT_DEPTH [i] = 0; // not necessary 61 reg_EVENT_FLUSH_ONLY [i] = 0; // not necessary 53 62 } 54 63 } … … 236 245 reg_STATE [i] = state; 237 246 } 247 248 // ------------------------------------------------------------------- 249 // -----[ BRANCH_EVENT ]---------------------------------------------- 250 // ------------------------------------------------------------------- 251 for (uint32_t i=0; i<_param->_nb_context; ++i) 252 if (PORT_READ(in_BRANCH_EVENT_VAL [i]) and internal_BRANCH_EVENT_ACK [i]) 253 { 254 log_printf(TRACE,Context_State,FUNCTION," * BRANCH_EVENT [%d]",i); 255 256 context_state_t state = reg_STATE [i]; 257 258 Tdepth_t depth = (_param->_have_port_depth)?PORT_READ(in_BRANCH_EVENT_DEPTH [i]):0; 259 Tdepth_t depth_cur = reg_EVENT_DEPTH [i]; 260 Tdepth_t depth_min = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MIN [i]):0; 261 Tdepth_t depth_max = _param->_nb_inst_branch_speculated [i]; 262 263 Tdepth_t depth0 = (depth_cur>=depth_min)?(depth_cur-depth_min):((depth_cur+depth_max-depth_min)); 264 Tdepth_t depth1 = (depth >=depth_min)?(depth -depth_min):((depth +depth_max-depth_min)); 265 // Tdepth_t depth0 = (depth_cur>=depth_min)?(depth_cur):((depth_cur+depth_max)); 266 // Tdepth_t depth1 = (depth >=depth_min)?(depth ):((depth +depth_max)); 267 268 // priority : miss_load > miss_branch > excep > spr/sync 269 uint8_t priority0 = get_priority(state); 270 uint8_t priority1 = PRIORITY_MISS_BRANCH; // miss 271 272 // is_valid = can modify local information 273 // if context_state_ok : yes 274 // if context_state_ko : test the depth, and the priority of event 275 bool is_valid = ((state == CONTEXT_STATE_OK) or 276 (state == CONTEXT_STATE_KO_MISS_BRANCH_WAIT_UPDATE) or 277 // (state == CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_WAIT_UPDATE) or 278 (depth1< depth0) or 279 ((depth1==depth0) and (priority1>=priority0))); // >= because another branch can be a miss prediction with same depth 280 281 bool is_invalid = priority0 == PRIORITY_MISS_LOAD; 282 283 #ifdef DEBUG_TEST 284 if ((state == CONTEXT_STATE_KO_MISS_BRANCH_WAIT_UPDATE) and 285 (depth0 != depth1)) 286 throw ERRORMORPHEO(FUNCTION,toString(_("BRANCH_EVENT[%d] : Invalid state : %s.\n"),i,toString(state).c_str())); 287 #endif 288 289 log_printf(TRACE,Context_State,FUNCTION," * state : %s",toString(state).c_str()); 290 log_printf(TRACE,Context_State,FUNCTION," * depth : %d",depth ); 291 log_printf(TRACE,Context_State,FUNCTION," * depth_cur : %d",depth_cur ); 292 log_printf(TRACE,Context_State,FUNCTION," * depth_min : %d",depth_min ); 293 log_printf(TRACE,Context_State,FUNCTION," * depth_max : %d",depth_max ); 294 log_printf(TRACE,Context_State,FUNCTION," * depth0 : %d",depth0 ); 295 log_printf(TRACE,Context_State,FUNCTION," * depth1 : %d",depth1 ); 296 log_printf(TRACE,Context_State,FUNCTION," * priority0 : %d",priority0 ); 297 log_printf(TRACE,Context_State,FUNCTION," * priority1 : %d",priority1 ); 298 log_printf(TRACE,Context_State,FUNCTION," * is_valid : %d",is_valid ); 299 log_printf(TRACE,Context_State,FUNCTION," * is_invalid : %d",is_invalid); 300 301 if (is_valid and not is_invalid) 302 { 303 // reg_STATE [i] = CONTEXT_STATE_KO_MISS_BRANCH_ADDR; 304 305 if (state == CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_WAIT_UPDATE) 306 { 307 // #if (MANAGE_EVENT == MANAGE_EVENT_NO_WAIT) 308 // reg_STATE [i] = CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_ADDR; 309 // #else 310 reg_STATE [i] = CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_WAITEND; 311 // #endif 312 } 313 else 314 { 315 Tcontrol_t can_continue = PORT_READ(in_BRANCH_EVENT_CAN_CONTINUE [i]); 316 Tcontrol_t dest_val = PORT_READ(in_BRANCH_EVENT_ADDRESS_DEST_VAL[i]); 317 318 log_printf(TRACE,Context_State,FUNCTION," * dest_val : %d",dest_val ); 319 log_printf(TRACE,Context_State,FUNCTION," * can_continue: %d",can_continue); 320 321 if (can_continue) 322 reg_STATE [i] = CONTEXT_STATE_KO_MISS_BRANCH_ADDR; 323 else 324 { 325 // #if (MANAGE_EVENT == MANAGE_EVENT_NO_WAIT) 326 // reg_STATE [i] = CONTEXT_STATE_KO_MISS_BRANCH_ADDR; 327 // #else 328 reg_STATE [i] = CONTEXT_STATE_KO_MISS_BRANCH_WAITEND; 329 // #endif 330 } 331 332 reg_EVENT_ADDRESS [i] = PORT_READ(in_BRANCH_EVENT_ADDRESS_SRC [i])+1; // address delay slot 333 reg_EVENT_ADDRESS_EPCR [i] = PORT_READ(in_BRANCH_EVENT_ADDRESS_DEST [i]); // address_next 334 reg_EVENT_ADDRESS_EPCR_VAL [i] = dest_val; 335 //reg_EVENT_ADDRESS_EEAR [i] = 0; 336 reg_EVENT_ADDRESS_EEAR_VAL [i] = 0; 337 reg_EVENT_IS_DELAY_SLOT [i] = 1; 338 reg_EVENT_IS_DS_TAKE [i] = dest_val; 339 reg_EVENT_DEPTH [i] = depth; 340 reg_EVENT_FLUSH_ONLY [i] = can_continue; 341 } 342 } 343 } 344 345 // ------------------------------------------------------------------- 346 // -----[ DECOD_EVENT ]----------------------------------------------- 347 // ------------------------------------------------------------------- 348 349 for (uint32_t i=0; i<_param->_nb_decod_unit; i++) 350 if (PORT_READ(in_DECOD_EVENT_VAL [i]) and internal_DECOD_EVENT_ACK [i]) 351 { 352 log_printf(TRACE,Context_State,FUNCTION," * DECOD_EVENT [%d]",i); 353 354 Tcontext_t context = (_param->_have_port_context_id )?PORT_READ(in_DECOD_EVENT_CONTEXT_ID [i]):0; 355 Tdepth_t depth = (_param->_have_port_depth )?PORT_READ(in_DECOD_EVENT_DEPTH [i]):0; 356 Tdepth_t depth_cur = reg_EVENT_DEPTH [context]; 357 Tdepth_t depth_min = (_param->_have_port_depth )?PORT_READ(in_DEPTH_MIN [context]):0; 358 Tdepth_t depth_max = _param->_nb_inst_branch_speculated [context]; 359 360 Tdepth_t depth0 = (depth_cur>=depth_min)?(depth_cur-depth_min):((depth_cur+depth_max-depth_min)); 361 Tdepth_t depth1 = (depth >=depth_min)?(depth -depth_min):((depth +depth_max-depth_min)); 362 // Tdepth_t depth0 = (depth_cur>=depth_min)?(depth_cur):((depth_cur+depth_max)); 363 // Tdepth_t depth1 = (depth >=depth_min)?(depth ):((depth +depth_max)); 364 365 context_state_t state = reg_STATE [context]; 366 Tevent_type_t type = PORT_READ(in_DECOD_EVENT_TYPE [i]); 367 368 // miss_load > miss_branch > excep > spr/sync 369 uint8_t priority0 = get_priority(state); 370 uint8_t priority1 = (state == EVENT_TYPE_EXCEPTION)?PRIORITY_EXCEPTION:PRIORITY_NONE; 371 372 // is_valid = can modify local information 373 // if context_state_ok : yes 374 // if context_state_ko : test the depth, and the priority of envent 375 376 bool is_valid = ((state == CONTEXT_STATE_OK) or 377 (depth1< depth0) or 378 ((depth1==depth0) and (priority1>=priority0))); 379 380 log_printf(TRACE,Context_State,FUNCTION," * depth : %d",depth ); 381 log_printf(TRACE,Context_State,FUNCTION," * depth_cur : %d",depth_cur ); 382 log_printf(TRACE,Context_State,FUNCTION," * depth_min : %d",depth_min ); 383 log_printf(TRACE,Context_State,FUNCTION," * depth_max : %d",depth_max ); 384 log_printf(TRACE,Context_State,FUNCTION," * depth0 : %d",depth0 ); 385 log_printf(TRACE,Context_State,FUNCTION," * depth1 : %d",depth1 ); 386 log_printf(TRACE,Context_State,FUNCTION," * priority0 : %d",priority0 ); 387 log_printf(TRACE,Context_State,FUNCTION," * priority1 : %d",priority1 ); 388 log_printf(TRACE,Context_State,FUNCTION," * is_valid : %d",is_valid ); 389 390 if (is_valid) 391 { 392 log_printf(TRACE,Context_State,FUNCTION," * is_valid"); 393 394 // decod : 395 // type : csync, psync, msync, spr_access (l.mac, l.maci, l.macrc, l.msb, l.mfspr, l.mtspr), exception (l.sys) 396 context_state_t state_next = state; 397 Taddress_t address = PORT_READ(in_DECOD_EVENT_ADDRESS [i]); 398 Tcontrol_t is_delay_slot = PORT_READ(in_DECOD_EVENT_IS_DELAY_SLOT [i]); 399 400 switch (type) 401 { 402 case EVENT_TYPE_EXCEPTION : 403 { 404 log_printf(TRACE,Context_State,FUNCTION," * EVENT_TYPE_EXCEPTION"); 405 406 state_next = CONTEXT_STATE_KO_EXCEP; 407 408 break; 409 } 410 case EVENT_TYPE_SPR_ACCESS : 411 { 412 log_printf(TRACE,Context_State,FUNCTION," * EVENT_TYPE_SPR_ACCESS"); 413 414 // state_next = CONTEXT_STATE_KO_SPR ; 415 state_next = CONTEXT_STATE_KO_SPR_EXEC; 416 address++; // take next address 417 // if (is_delay_slot) 418 // throw ERRORMORPHEO(FUNCTION,"SPR access in delay slot, not supported.\n"); 419 break; 420 } 421 case EVENT_TYPE_MSYNC : 422 { 423 log_printf(TRACE,Context_State,FUNCTION," * EVENT_TYPE_MSYNC"); 424 425 // state_next = CONTEXT_STATE_KO_MSYNC; 426 state_next = CONTEXT_STATE_KO_MSYNC_EXEC; 427 address++; // take next address 428 // if (is_delay_slot) 429 // throw ERRORMORPHEO(FUNCTION,"MSYNC in delay slot, not supported.\n"); 430 break; 431 } 432 case EVENT_TYPE_PSYNC : 433 { 434 log_printf(TRACE,Context_State,FUNCTION," * EVENT_TYPE_PSYNC"); 435 436 // state_next = CONTEXT_STATE_KO_PSYNC; 437 state_next = CONTEXT_STATE_KO_PSYNC_FLUSH; 438 address++; // take next address 439 if (is_delay_slot) 440 throw ERRORMORPHEO(FUNCTION,"PSYNC in delay slot, not supported.\n"); 441 break; 442 } 443 case EVENT_TYPE_CSYNC : 444 { 445 log_printf(TRACE,Context_State,FUNCTION," * EVENT_TYPE_CSYNC"); 446 447 // state_next = CONTEXT_STATE_KO_CSYNC; 448 state_next = CONTEXT_STATE_KO_CSYNC_FLUSH; 449 address++; // take next address 450 if (is_delay_slot) 451 throw ERRORMORPHEO(FUNCTION,"CSYNC in delay slot, not supported.\n"); 452 break; 453 } 454 case EVENT_TYPE_NONE : 455 case EVENT_TYPE_BRANCH_MISS_SPECULATION : 456 case EVENT_TYPE_LOAD_MISS_SPECULATION : 457 // case EVENT_TYPE_BRANCH_NO_ACCURATE : 458 default : 459 { 460 throw ERRORMORPHEO(FUNCTION,toString(_("DECOD_EVENT [%d] : invalid event_type : %s.\n"),i,toString(type).c_str())); 461 } 462 } 463 464 reg_STATE [context] = state_next; 465 reg_EVENT_ADDRESS [context] = address; 466 reg_EVENT_ADDRESS_EPCR [context] = PORT_READ(in_DECOD_EVENT_ADDRESS_EPCR [i]); 467 reg_EVENT_ADDRESS_EPCR_VAL [context] = 1; 468 //reg_EVENT_ADDRESS_EEAR [context] 469 reg_EVENT_ADDRESS_EEAR_VAL [context] = 0; 470 reg_EVENT_IS_DELAY_SLOT [context] = is_delay_slot; 471 //reg_EVENT_IS_DS_TAKE [context] = 0; 472 reg_EVENT_DEPTH [context] = depth; 473 reg_EVENT_FLUSH_ONLY [context] = false; 474 } 475 } 238 476 239 477 // ------------------------------------------------------------------- … … 283 521 284 522 // ------------------------------------------------------------------- 285 // -----[ BRANCH_EVENT ]----------------------------------------------286 // -------------------------------------------------------------------287 for (uint32_t i=0; i<_param->_nb_context; ++i)288 if (PORT_READ(in_BRANCH_EVENT_VAL [i]) and internal_BRANCH_EVENT_ACK [i])289 {290 log_printf(TRACE,Context_State,FUNCTION," * BRANCH_EVENT [%d]",i);291 292 context_state_t state = reg_STATE [i];293 294 Tdepth_t depth = (_param->_have_port_depth)?PORT_READ(in_BRANCH_EVENT_DEPTH [i]):0;295 Tdepth_t depth_cur = reg_EVENT_DEPTH [i];296 Tdepth_t depth_min = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MIN [i]):0;297 Tdepth_t depth_max = _param->_nb_inst_branch_speculated [i];298 299 Tdepth_t depth0 = (depth_cur>=depth_min)?(depth_cur-depth_min):((depth_cur+depth_max-depth_min));300 Tdepth_t depth1 = (depth >=depth_min)?(depth -depth_min):((depth +depth_max-depth_min));301 // Tdepth_t depth0 = (depth_cur>=depth_min)?(depth_cur):((depth_cur+depth_max));302 // Tdepth_t depth1 = (depth >=depth_min)?(depth ):((depth +depth_max));303 304 // priority : miss_load > miss_branch > excep > spr/sync305 uint8_t priority0 = get_priority(state);306 uint8_t priority1 = PRIORITY_MISS_BRANCH; // miss307 308 // is_valid = can modify local information309 // if context_state_ok : yes310 // if context_state_ko : test the depth, and the priority of event311 bool is_valid = ((state == CONTEXT_STATE_OK) or312 (state == CONTEXT_STATE_KO_MISS_BRANCH_WAIT_UPDATE) or313 // (state == CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_WAIT_UPDATE) or314 (depth1< depth0) or315 ((depth1==depth0) and (priority1>=priority0))); // >= because another branch can be a miss prediction with same depth316 317 bool is_invalid = priority0 == PRIORITY_MISS_LOAD;318 319 #ifdef DEBUG_TEST320 if ((state == CONTEXT_STATE_KO_MISS_BRANCH_WAIT_UPDATE) and321 (depth0 != depth1))322 throw ERRORMORPHEO(FUNCTION,toString(_("BRANCH_EVENT[%d] : Invalid state : %s.\n"),i,toString(state).c_str()));323 #endif324 325 log_printf(TRACE,Context_State,FUNCTION," * state : %s",toString(state).c_str());326 log_printf(TRACE,Context_State,FUNCTION," * depth : %d",depth );327 log_printf(TRACE,Context_State,FUNCTION," * depth_cur : %d",depth_cur );328 log_printf(TRACE,Context_State,FUNCTION," * depth_min : %d",depth_min );329 log_printf(TRACE,Context_State,FUNCTION," * depth_max : %d",depth_max );330 log_printf(TRACE,Context_State,FUNCTION," * depth0 : %d",depth0 );331 log_printf(TRACE,Context_State,FUNCTION," * depth1 : %d",depth1 );332 log_printf(TRACE,Context_State,FUNCTION," * priority0 : %d",priority0 );333 log_printf(TRACE,Context_State,FUNCTION," * priority1 : %d",priority1 );334 log_printf(TRACE,Context_State,FUNCTION," * is_valid : %d",is_valid );335 336 if (is_valid and not is_invalid)337 {338 // reg_STATE [i] = CONTEXT_STATE_KO_MISS_BRANCH_ADDR;339 340 if (state == CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_WAIT_UPDATE)341 {342 // #if (MANAGE_EVENT == MANAGE_EVENT_NO_WAIT)343 // reg_STATE [i] = CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_ADDR;344 // #else345 reg_STATE [i] = CONTEXT_STATE_KO_MISS_LOAD_AND_BRANCH_WAITEND;346 // #endif347 }348 else349 {350 Tcontrol_t can_continue = PORT_READ(in_BRANCH_EVENT_CAN_CONTINUE [i]);351 Tcontrol_t dest_val = PORT_READ(in_BRANCH_EVENT_ADDRESS_DEST_VAL[i]);352 353 log_printf(TRACE,Context_State,FUNCTION," * dest_val : %d",dest_val );354 log_printf(TRACE,Context_State,FUNCTION," * can_continue: %d",can_continue);355 356 if (can_continue)357 reg_STATE [i] = CONTEXT_STATE_KO_MISS_BRANCH_ADDR;358 else359 {360 // #if (MANAGE_EVENT == MANAGE_EVENT_NO_WAIT)361 // reg_STATE [i] = CONTEXT_STATE_KO_MISS_BRANCH_ADDR;362 // #else363 reg_STATE [i] = CONTEXT_STATE_KO_MISS_BRANCH_WAITEND;364 // #endif365 }366 367 reg_EVENT_ADDRESS [i] = PORT_READ(in_BRANCH_EVENT_ADDRESS_SRC [i])+1; // address delay slot368 reg_EVENT_ADDRESS_EPCR [i] = PORT_READ(in_BRANCH_EVENT_ADDRESS_DEST [i]); // address_next369 reg_EVENT_ADDRESS_EPCR_VAL [i] = dest_val;370 //reg_EVENT_ADDRESS_EEAR [i] = 0;371 reg_EVENT_ADDRESS_EEAR_VAL [i] = 0;372 reg_EVENT_IS_DELAY_SLOT [i] = 1;373 reg_EVENT_IS_DS_TAKE [i] = dest_val;374 reg_EVENT_DEPTH [i] = depth;375 reg_EVENT_FLUSH_ONLY [i] = can_continue;376 }377 }378 }379 380 // -------------------------------------------------------------------381 523 // -----[ BRANCH_COMPLETE ]---------------------------------------------- 382 524 // ------------------------------------------------------------------- … … 429 571 reg_EVENT_DEPTH [context_id] = depth; 430 572 reg_EVENT_FLUSH_ONLY [context_id] = false; 431 }432 }433 434 // -------------------------------------------------------------------435 // -----[ DECOD_EVENT ]-----------------------------------------------436 // -------------------------------------------------------------------437 438 for (uint32_t i=0; i<_param->_nb_decod_unit; i++)439 if (PORT_READ(in_DECOD_EVENT_VAL [i]) and internal_DECOD_EVENT_ACK [i])440 {441 log_printf(TRACE,Context_State,FUNCTION," * DECOD_EVENT [%d]",i);442 443 Tcontext_t context = (_param->_have_port_context_id )?PORT_READ(in_DECOD_EVENT_CONTEXT_ID [i]):0;444 Tdepth_t depth = (_param->_have_port_depth )?PORT_READ(in_DECOD_EVENT_DEPTH [i]):0;445 Tdepth_t depth_cur = reg_EVENT_DEPTH [context];446 Tdepth_t depth_min = (_param->_have_port_depth )?PORT_READ(in_DEPTH_MIN [context]):0;447 Tdepth_t depth_max = _param->_nb_inst_branch_speculated [context];448 449 Tdepth_t depth0 = (depth_cur>=depth_min)?(depth_cur-depth_min):((depth_cur+depth_max-depth_min));450 Tdepth_t depth1 = (depth >=depth_min)?(depth -depth_min):((depth +depth_max-depth_min));451 // Tdepth_t depth0 = (depth_cur>=depth_min)?(depth_cur):((depth_cur+depth_max));452 // Tdepth_t depth1 = (depth >=depth_min)?(depth ):((depth +depth_max));453 454 context_state_t state = reg_STATE [context];455 Tevent_type_t type = PORT_READ(in_DECOD_EVENT_TYPE [i]);456 457 // miss_load > miss_branch > excep > spr/sync458 uint8_t priority0 = get_priority(state);459 uint8_t priority1 = (state == EVENT_TYPE_EXCEPTION)?PRIORITY_EXCEPTION:PRIORITY_NONE;460 461 // is_valid = can modify local information462 // if context_state_ok : yes463 // if context_state_ko : test the depth, and the priority of envent464 465 bool is_valid = ((state == CONTEXT_STATE_OK) or466 (depth1< depth0) or467 ((depth1==depth0) and (priority1>=priority0)));468 469 log_printf(TRACE,Context_State,FUNCTION," * depth : %d",depth );470 log_printf(TRACE,Context_State,FUNCTION," * depth_cur : %d",depth_cur );471 log_printf(TRACE,Context_State,FUNCTION," * depth_min : %d",depth_min );472 log_printf(TRACE,Context_State,FUNCTION," * depth_max : %d",depth_max );473 log_printf(TRACE,Context_State,FUNCTION," * depth0 : %d",depth0 );474 log_printf(TRACE,Context_State,FUNCTION," * depth1 : %d",depth1 );475 log_printf(TRACE,Context_State,FUNCTION," * priority0 : %d",priority0 );476 log_printf(TRACE,Context_State,FUNCTION," * priority1 : %d",priority1 );477 log_printf(TRACE,Context_State,FUNCTION," * is_valid : %d",is_valid );478 479 if (is_valid)480 {481 log_printf(TRACE,Context_State,FUNCTION," * is_valid");482 483 // decod :484 // type : csync, psync, msync, spr_access (l.mac, l.maci, l.macrc, l.msb, l.mfspr, l.mtspr), exception (l.sys)485 context_state_t state_next = state;486 Taddress_t address = PORT_READ(in_DECOD_EVENT_ADDRESS [i]);487 Tcontrol_t is_delay_slot = PORT_READ(in_DECOD_EVENT_IS_DELAY_SLOT [i]);488 489 switch (type)490 {491 case EVENT_TYPE_EXCEPTION :492 {493 log_printf(TRACE,Context_State,FUNCTION," * EVENT_TYPE_EXCEPTION");494 495 state_next = CONTEXT_STATE_KO_EXCEP;496 497 break;498 }499 case EVENT_TYPE_SPR_ACCESS :500 {501 log_printf(TRACE,Context_State,FUNCTION," * EVENT_TYPE_SPR_ACCESS");502 503 // state_next = CONTEXT_STATE_KO_SPR ;504 state_next = CONTEXT_STATE_KO_SPR_EXEC;505 address++; // take next address506 // if (is_delay_slot)507 // throw ERRORMORPHEO(FUNCTION,"SPR access in delay slot, not supported.\n");508 break;509 }510 case EVENT_TYPE_MSYNC :511 {512 log_printf(TRACE,Context_State,FUNCTION," * EVENT_TYPE_MSYNC");513 514 // state_next = CONTEXT_STATE_KO_MSYNC;515 state_next = CONTEXT_STATE_KO_MSYNC_EXEC;516 address++; // take next address517 // if (is_delay_slot)518 // throw ERRORMORPHEO(FUNCTION,"MSYNC in delay slot, not supported.\n");519 break;520 }521 case EVENT_TYPE_PSYNC :522 {523 log_printf(TRACE,Context_State,FUNCTION," * EVENT_TYPE_PSYNC");524 525 // state_next = CONTEXT_STATE_KO_PSYNC;526 state_next = CONTEXT_STATE_KO_PSYNC_FLUSH;527 address++; // take next address528 if (is_delay_slot)529 throw ERRORMORPHEO(FUNCTION,"PSYNC in delay slot, not supported.\n");530 break;531 }532 case EVENT_TYPE_CSYNC :533 {534 log_printf(TRACE,Context_State,FUNCTION," * EVENT_TYPE_CSYNC");535 536 // state_next = CONTEXT_STATE_KO_CSYNC;537 state_next = CONTEXT_STATE_KO_CSYNC_FLUSH;538 address++; // take next address539 if (is_delay_slot)540 throw ERRORMORPHEO(FUNCTION,"CSYNC in delay slot, not supported.\n");541 break;542 }543 case EVENT_TYPE_NONE :544 case EVENT_TYPE_BRANCH_MISS_SPECULATION :545 case EVENT_TYPE_LOAD_MISS_SPECULATION :546 // case EVENT_TYPE_BRANCH_NO_ACCURATE :547 default :548 {549 throw ERRORMORPHEO(FUNCTION,toString(_("DECOD_EVENT [%d] : invalid event_type : %s.\n"),i,toString(type).c_str()));550 }551 }552 553 reg_STATE [context] = state_next;554 reg_EVENT_ADDRESS [context] = address;555 reg_EVENT_ADDRESS_EPCR [context] = PORT_READ(in_DECOD_EVENT_ADDRESS_EPCR [i]);556 reg_EVENT_ADDRESS_EPCR_VAL [context] = 1;557 //reg_EVENT_ADDRESS_EEAR [context]558 reg_EVENT_ADDRESS_EEAR_VAL [context] = 0;559 reg_EVENT_IS_DELAY_SLOT [context] = is_delay_slot;560 //reg_EVENT_IS_DS_TAKE [context] = 0;561 reg_EVENT_DEPTH [context] = depth;562 reg_EVENT_FLUSH_ONLY [context] = false;563 573 } 564 574 } … … 706 716 } 707 717 718 // ------------------------------------------------------------------- 719 // -----[ INTERRUPT ]------------------------------------------------- 720 // ------------------------------------------------------------------- 708 721 for (uint32_t i=0; i<_param->_nb_context; ++i) 709 722 { -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/src/Decod_unit_deallocation.cpp
r123 r128 90 90 DELETE1_SIGNAL(in_CONTEXT_DECOD_ENABLE ,_param->_nb_context,1); 91 91 DELETE1_SIGNAL(in_CONTEXT_EVENT ,_param->_nb_context,1); 92 DELETE1_SIGNAL(in_CONTEXT_DEPTH_VAL ,_param->_nb_context,1); 92 93 DELETE1_SIGNAL(in_CONTEXT_DEPTH ,_param->_nb_context,_param->_size_depth); 93 94 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/src/Address_management_deallocation.cpp
r112 r128 35 35 DELETE0_SIGNAL(out_ADDRESS_BRANCH_STATE ,_param->_size_branch_state ); 36 36 DELETE0_SIGNAL(out_ADDRESS_BRANCH_UPDATE_PREDICTION_ID,_param->_size_depth); 37 DELETE1_SIGNAL(out_ADDRESS_INSTRUCTION_ENABLE ,1,_param->_nb_instruction);37 DELETE1_SIGNAL(out_ADDRESS_INSTRUCTION_ENABLE ,_param->_nb_instruction,1); 38 38 39 39 DELETE0_SIGNAL(out_PREDICT_VAL ,1); … … 48 48 DELETE0_SIGNAL( in_PREDICT_BRANCH_UPDATE_PREDICTION_ID,_param->_size_depth); 49 49 DELETE0_SIGNAL( in_PREDICT_INST_IFETCH_PTR ,_param->_size_inst_ifetch_ptr); 50 DELETE1_SIGNAL(in_PREDICT_INSTRUCTION_ENABLE ,1,_param->_nb_instruction);50 DELETE1_SIGNAL(in_PREDICT_INSTRUCTION_ENABLE ,_param->_nb_instruction,1); 51 51 52 52 DELETE0_SIGNAL( in_EVENT_VAL ,1); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/src/Address_management_transition.cpp
r123 r128 28 28 { 29 29 // nothing is valid 30 reg_PC_ACCESS_VAL = 0; 31 32 reg_PC_CURRENT_VAL = 0; 33 34 reg_PC_NEXT_VAL = 1; 35 reg_PC_NEXT = 0x100>>2; 36 reg_PC_NEXT_IS_DS_TAKE = 0; 30 reg_PC_ACCESS_VAL = 0; 31 reg_PC_ACCESS = 0;// not necessary 32 reg_PC_ACCESS_IS_DS_TAKE = 0;// not necessary 33 for (uint32_t i=0; i<_param->_nb_instruction; i++) 34 reg_PC_ACCESS_INSTRUCTION_ENABLE [i] = 0;// not necessary 35 reg_PC_ACCESS_INST_IFETCH_PTR = 0;// not necessary 36 reg_PC_ACCESS_BRANCH_STATE = 0;// not necessary 37 reg_PC_ACCESS_BRANCH_UPDATE_PREDICTION_ID = 0;// not necessary 38 39 reg_PC_CURRENT_VAL = 0; 40 reg_PC_CURRENT = 0;// not necessary 41 reg_PC_CURRENT_IS_DS_TAKE = 0;// not necessary 42 for (uint32_t i=0; i<_param->_nb_instruction; i++) 43 reg_PC_CURRENT_INSTRUCTION_ENABLE [i] = 0;// not necessary 44 reg_PC_CURRENT_INST_IFETCH_PTR = 0;// not necessary 45 reg_PC_CURRENT_BRANCH_STATE = 0;// not necessary 46 reg_PC_CURRENT_BRANCH_UPDATE_PREDICTION_ID = 0;// not necessary 47 48 reg_PC_NEXT_VAL = 1; 49 reg_PC_NEXT = 0x100>>2; 50 reg_PC_NEXT_IS_DS_TAKE = 0; 37 51 uint32_t index = reg_PC_NEXT % _param->_nb_instruction; 38 52 for (uint32_t i=0; i<_param->_nb_instruction; i++) 39 reg_PC_NEXT_INSTRUCTION_ENABLE [i] = 0; 40 reg_PC_NEXT_INSTRUCTION_ENABLE [index] = 1; 41 reg_PC_NEXT_INST_IFETCH_PTR = 0; 42 reg_PC_NEXT_BRANCH_STATE = 0; 43 reg_PC_NEXT_BRANCH_UPDATE_PREDICTION_ID = 0; 44 45 46 reg_PC_NEXT_NEXT_VAL = 0; 53 reg_PC_NEXT_INSTRUCTION_ENABLE [i] = 0; 54 reg_PC_NEXT_INSTRUCTION_ENABLE [index] = 1; 55 reg_PC_NEXT_INST_IFETCH_PTR = 0; 56 reg_PC_NEXT_BRANCH_STATE = 0; 57 reg_PC_NEXT_BRANCH_UPDATE_PREDICTION_ID = 0; 58 59 reg_PC_NEXT_NEXT_VAL = 0; 60 reg_PC_NEXT_NEXT = 0;// not necessary 61 reg_PC_NEXT_NEXT_IS_DS_TAKE = 0;// not necessary 47 62 } 48 63 else -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/include/Types.h
r101 r128 47 47 public : ~ifetch_queue_entry_t (void) 48 48 { 49 delete _instruction ;50 delete _instruction_enable;49 delete [] _instruction ; 50 delete [] _instruction_enable; 51 51 } 52 53 // public : friend std::ostream& operator<< (std::ostream& output,54 // ifetch_queue_entry_t & x)55 // {56 // output << ;57 // return output;58 // }59 60 52 }; 61 53 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/src/Ifetch_queue_transition.cpp
r119 r128 31 31 32 32 for (uint32_t i=0; i<_param->_size_queue; i++) 33 _queue [i]->_state = IFETCH_QUEUE_STATE_EMPTY; 33 { 34 _queue [i]->_state = IFETCH_QUEUE_STATE_EMPTY; 35 _queue [i]->_address = 0; // not necessary 36 _queue [i]->_inst_ifetch_ptr = 0; // not necessary 37 _queue [i]->_branch_state = 0; // not necessary 38 _queue [i]->_branch_update_prediction_id = 0; // not necessary 39 _queue [i]->_exception = 0; // not necessary 40 41 for (uint32_t j=0; j<_param->_nb_instruction; j++) 42 { 43 _queue [i]->_instruction [j] = 0; // not necessary 44 _queue [i]->_instruction_enable [j] = 0; // not necessary 45 } 46 } 34 47 } 35 48 else -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/src/Ifetch_unit_deallocation.cpp
r123 r128 60 60 DELETE0_SIGNAL(out_DECOD_BRANCH_UPDATE_PREDICTION_ID,_param->_size_depth); 61 61 DELETE0_SIGNAL(out_DECOD_EXCEPTION ,_param->_size_exception_ifetch); 62 DELETE1_SIGNAL(out_DECOD_VAL , 1,_param->_nb_instruction);63 DELETE1_SIGNAL( in_DECOD_ACK , 1,_param->_nb_instruction);62 DELETE1_SIGNAL(out_DECOD_VAL ,_param->_nb_instruction,1); 63 DELETE1_SIGNAL( in_DECOD_ACK ,_param->_nb_instruction,1); 64 64 DELETE1_SIGNAL(out_DECOD_INSTRUCTION ,_param->_nb_instruction,_param->_size_instruction); 65 65 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/include/Branch_Target_Buffer_Glue.h
r82 r128 82 82 public : SC_IN (Tcontrol_t ) *** in_PREDICT_REGISTER_IS_ACCURATE ; //[nb_inst_predict][associativity] 83 83 84 public : SC_IN (T ptr_t) ** in_PREDICT_SORT_VAL ; //[nb_inst_predict]84 public : SC_IN (Tcontrol_t ) ** in_PREDICT_SORT_VAL ; //[nb_inst_predict] 85 85 public : SC_IN (Tptr_t ) ** in_PREDICT_SORT_INDEX ; //[nb_inst_predict] 86 86 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/src/Branch_Target_Buffer_Glue_allocation.cpp
r112 r128 74 74 if (_param->_have_port_victim) 75 75 { 76 ALLOC1_SIGNAL_IN ( in_PREDICT_SORT_VAL ,"sort_val" ,Tptr_t,1);77 ALLOC1_SIGNAL_IN ( in_PREDICT_SORT_INDEX ,"sort_index",Tptr_t,_param->_size_victim);76 ALLOC1_SIGNAL_IN ( in_PREDICT_SORT_VAL , "sort_val" ,Tcontrol_t ,1); 77 ALLOC1_SIGNAL_IN ( in_PREDICT_SORT_INDEX , "sort_index" ,Tptr_t ,_param->_size_victim); 78 78 79 79 ALLOC1_SIGNAL_OUT(out_PREDICT_VICTIM_VAL , "victim_val" ,Tcontrol_t , 1); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/src/Branch_Target_Buffer_Glue_genMealy_predict.cpp
r123 r128 38 38 log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION," * val : %d",val ); 39 39 log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION," * register_ack : %d",register_ack); 40 log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION," * port_victim : %d",_param->_have_port_victim); 40 41 log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION," * sort_val : %d",sort_val ); 41 42 log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION," * victim_ack : %d",victim_ack ); … … 51 52 52 53 // Multiplexor 54 53 55 PORT_WRITE(out_PREDICT_HIT [i],hit); 54 56 PORT_WRITE(out_PREDICT_ADDRESS_SRC [i],address_src); … … 64 66 victim_ack 65 67 )); 68 66 69 PORT_WRITE(out_PREDICT_REGISTER_VAL [i], ( 67 70 val and … … 84 87 PORT_WRITE(out_PREDICT_VICTIM_INDEX [i], index); 85 88 } 89 86 90 } 87 91 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register_transition.cpp
r107 r128 29 29 for (uint32_t i=0; i<_param->_size_bank; i++) 30 30 for (uint32_t j=0; j<_param->_associativity; j++) 31 reg_BTB [i][j]._val = false; 31 { 32 reg_BTB [i][j]._val = false; 33 reg_BTB [i][j]._context = 0; // not necessary 34 reg_BTB [i][j]._address_dest_val = 0; // not necessary 35 reg_BTB [i][j]._address_src = 0; // not necessary 36 reg_BTB [i][j]._address_dest = 0; // not necessary 37 reg_BTB [i][j]._condition = 0; // not necessary 38 reg_BTB [i][j]._last_take = 0; // not necessary 39 reg_BTB [i][j]._accurate = 0; // not necessary 40 } 32 41 } 33 42 else -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/src/Branch_Target_Buffer_deallocation.cpp
r115 r128 64 64 { 65 65 for (uint32_t i=0; i<_param->_nb_inst_predict; i++) 66 delete_component_sort [i];66 delete _component_sort [i]; 67 67 delete [] _component_sort; 68 delete _component_victim;68 delete _component_victim; 69 69 } 70 70 delete _component_branch_target_buffer_glue; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/src/Branch_Target_Buffer_statistics_allocation.cpp
r88 r128 35 35 } 36 36 37 //_stat->add_stat(_component_branch_target_buffer_glue ->_stat);37 _stat->add_stat(_component_branch_target_buffer_glue ->_stat); 38 38 _stat->add_stat(_component_branch_target_buffer_register->_stat); 39 39 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/src/Parameters.cpp
r111 r128 80 80 { 81 81 log_begin(Meta_Predictor_Glue,FUNCTION); 82 83 DELETE1(_predictor_history_mask ,_nb_predictor); 84 DELETE1(_predictor_history_shift_msb,_nb_predictor); 85 DELETE1(_predictor_history_shift ,_nb_predictor); 86 82 87 log_end(Meta_Predictor_Glue,FUNCTION); 83 88 }; … … 88 93 { 89 94 log_begin(Meta_Predictor_Glue,FUNCTION); 90 91 DELETE1(_predictor_history_mask ,_nb_predictor);92 DELETE1(_predictor_history_shift,_nb_predictor);93 94 95 log_end(Meta_Predictor_Glue,FUNCTION); 95 96 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/src/Meta_Predictor_deallocation.cpp
r112 r128 45 45 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 46 46 47 DELETE0(_component_glue); 48 DELETE1(_component_two_level_branch_predictor,_param->_nb_predictor); 47 delete _component_glue; 48 for (uint32_t i=0; i<_param->_nb_predictor; ++i) 49 delete _component_two_level_branch_predictor [i]; 50 delete [] _component_two_level_branch_predictor; 49 51 50 52 delete _component; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/src/Meta_Predictor_statistics_allocation.cpp
r110 r128 28 28 "Meta_Predictor", 29 29 param_statistics); 30 31 for (uint32_t i=0; i<_param->_nb_predictor; ++i) 32 _stat->add_stat(_component_two_level_branch_predictor [i]->_stat); 33 _stat->add_stat(_component_glue ->_stat); 30 34 31 35 log_end(Meta_Predictor,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/src/Parameters.cpp
r112 r128 122 122 log_begin(Meta_Predictor,FUNCTION); 123 123 124 DELETE1(_param_two_level_branch_predictor, _nb_predictor); 124 delete _param_glue; 125 for (uint32_t i=0; i<_nb_predictor; ++i) 126 delete _param_two_level_branch_predictor [i]; 127 delete [] _param_two_level_branch_predictor; 125 128 126 129 DELETE1(_predictor_size_history , _nb_predictor); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/src/Direction_statistics_allocation.cpp
r81 r128 28 28 param_statistics); 29 29 30 _stat->add_stat(_component_glue->_stat); 30 if (_param->_have_component_meta_predictor) 31 _stat->add_stat(_component_meta_predictor->_stat); 32 _stat->add_stat(_component_glue ->_stat); 31 33 32 34 log_printf(FUNC,Direction,FUNCTION,"End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/src/Return_Address_Stack_transition.cpp
r111 r128 37 37 // reg_PREDICT_BOTTOM [i] = 0; 38 38 reg_PREDICT_NB_ELT [i] = 0; 39 40 for (uint32_t j=0; j<_param->_size_queue [i]; ++j) 41 reg_stack [i][j]._address = 0; // not necessary 39 42 } 40 43 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Parameters.cpp
r122 r128 63 63 for (uint32_t i=0; i<_nb_thread; i++) 64 64 _have_thread[i] = false; 65 for (uint32_t i=0; i<_nb_ context; i++)65 for (uint32_t i=0; i<_nb_thread; i++) 66 66 _have_thread[_translate_num_context_to_num_thread [i]] = true; 67 67 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_deallocation.cpp
r122 r128 172 172 173 173 #if defined(DEBUG) and defined(DEBUG_Update_Prediction_Table) and (DEBUG_Update_Prediction_Table == true) 174 for (uint32_t i=0; i<_param->_nb_thread; ++i) 175 if (_param->_have_thread [i]) 176 { 177 branchement_log_file [i].close(); 178 } 174 { 175 for (uint32_t i=0; i<_param->_nb_thread; ++i) 176 if (_param->_have_thread [i]) 177 { 178 branchement_log_file [i].close(); 179 } 180 delete [] branchement_log_file; 181 } 179 182 #endif 180 183 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_statistics_deallocation.cpp
r97 r128 29 29 delete _stat; 30 30 31 DELETE2(_stat_nb_branch_hit ,_param->_nb_context,MAX_BRANCH_CONDITION); 32 DELETE2(_stat_nb_branch_miss ,_param->_nb_context,MAX_BRANCH_CONDITION); 33 DELETE1(_stat_nb_branch_unused ,_param->_nb_context); 34 DELETE1(_stat_ufpt_queue_nb_elt ,_param->_nb_context); 35 DELETE1(_stat_upt_queue_nb_elt ,_param->_nb_context); 31 DELETE2(_stat_nb_branch_hit ,_param->_nb_context,MAX_BRANCH_CONDITION); 32 DELETE2(_stat_nb_branch_miss ,_param->_nb_context,MAX_BRANCH_CONDITION); 33 DELETE1(_stat_nb_branch_unused ,_param->_nb_context); 34 35 DELETE1(_stat_nb_branch_ifetch_prediction,_param->_nb_context); 36 DELETE1(_stat_nb_branch_accurate ,_param->_nb_context); 37 38 DELETE1(_stat_ufpt_queue_nb_elt ,_param->_nb_context); 39 DELETE1(_stat_upt_queue_nb_elt ,_param->_nb_context); 36 40 37 41 log_printf(FUNC,Update_Prediction_Table,FUNCTION,"End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_transition.cpp
r124 r128 34 34 { 35 35 for (uint32_t j=0; j<_param->_size_ufpt_queue[i]; ++j) 36 reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._state = UPDATE_FETCH_PREDICTION_STATE_EMPTY; 36 { 37 reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._state = UPDATE_FETCH_PREDICTION_STATE_EMPTY; 38 reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._condition = 0; // not necessary 39 reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._address_src = 0; // not necessary 40 reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._address_dest = 0; // not necessary 41 reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._last_take = 0; // not necessary 42 reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._is_accurate = 0; // not necessary 43 reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._history = 0; // not necessary 44 reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._address_ras = 0; // not necessary 45 reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._index_ras = 0; // not necessary 46 } 37 47 reg_UFPT_BOTTOM [i] = 0; 38 48 reg_UFPT_TOP [i] = 0; … … 42 52 43 53 for (uint32_t j=0; j<_param->_size_upt_queue[i]; ++j) 44 reg_UPDATE_PREDICTION_TABLE [i][j]._state = UPDATE_PREDICTION_STATE_EMPTY; 54 { 55 reg_UPDATE_PREDICTION_TABLE [i][j]._state = UPDATE_PREDICTION_STATE_EMPTY; 56 reg_UPDATE_PREDICTION_TABLE [i][j]._condition = 0; // not necessary 57 reg_UPDATE_PREDICTION_TABLE [i][j]._address_src = 0; // not necessary 58 reg_UPDATE_PREDICTION_TABLE [i][j]._address_dest = 0; // not necessary 59 reg_UPDATE_PREDICTION_TABLE [i][j]._last_take = 0; // not necessary 60 reg_UPDATE_PREDICTION_TABLE [i][j]._good_take = 0; // not necessary 61 reg_UPDATE_PREDICTION_TABLE [i][j]._is_accurate = 0; // not necessary 62 reg_UPDATE_PREDICTION_TABLE [i][j]._history = 0; // not necessary 63 reg_UPDATE_PREDICTION_TABLE [i][j]._address_ras = 0; // not necessary 64 reg_UPDATE_PREDICTION_TABLE [i][j]._index_ras = 0; // not necessary 65 reg_UPDATE_PREDICTION_TABLE [i][j]._ifetch_prediction= 0; // not necessary 66 reg_UPDATE_PREDICTION_TABLE [i][j]._miss_commit = 0; // not necessary 67 reg_UPDATE_PREDICTION_TABLE [i][j]._retire_ok = 0; // not necessary 68 reg_UPDATE_PREDICTION_TABLE [i][j]._miss_prediction = 0; // not necessary 69 } 45 70 reg_UPT_BOTTOM [i] = 0; 46 71 reg_UPT_TOP [i] = 0; … … 54 79 reg_UPT_EVENT_STATE [i] = UPT_EVENT_STATE_OK; 55 80 56 // reg_EVENT_VAL [i] = false; 57 // reg_EVENT_STATE [i] = EVENT_STATE_OK; 58 // reg_EVENT_IS_BRANCH [i] = true; 81 reg_EVENT_UPT_PTR [i] = 0; // not necessary 82 reg_EVENT_UPT_FULL [i] = 0; // not necessary 83 84 // reg_EVENT_STATE [i] = EVENT_STATE_OK; // not necessary 85 // reg_EVENT_IS_BRANCH [i] = true ; // not necessary 86 87 reg_EVENT_DEPTH [i] = 0; // not necessary 88 reg_EVENT_ADDRESS_SRC [i] = 0; // not necessary 89 reg_EVENT_ADDRESS_DEST_VAL [i] = 0; // not necessary 90 reg_EVENT_ADDRESS_DEST [i] = 0; // not necessary 91 reg_EVENT_CAN_CONTINUE [i] = 0; // not necessary 92 59 93 } 60 94 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Prediction_unit_deallocation.cpp
r119 r128 66 66 DELETE1_SIGNAL( in_BRANCH_EVENT_ACK ,_param->_nb_context,1); 67 67 // DELETE1_SIGNAL(out_BRANCH_EVENT_CONTEXT_ID ,_param->_nb_context,_param->_size_context_id); 68 //DELETE1_SIGNAL(out_BRANCH_EVENT_DEPTH ,_param->_nb_context,_param->_size_depth);68 DELETE1_SIGNAL(out_BRANCH_EVENT_DEPTH ,_param->_nb_context,_param->_size_depth); 69 69 // DELETE1_SIGNAL(out_BRANCH_EVENT_MISS_PREDICTION ,_param->_nb_context,1); 70 70 DELETE1_SIGNAL(out_BRANCH_EVENT_ADDRESS_SRC ,_param->_nb_context,_param->_size_instruction_address); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/SelfTest/src/main.cpp
r111 r128 223 223 224 224 test (name,param); 225 226 delete param; 225 227 } 226 228 catch (morpheo::ErrorMorpheo & error) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/SelfTest/src/test.cpp
r108 r128 47 47 sc_clock * in_CLOCK = new sc_clock ("clock", 1.0, 0.5); 48 48 sc_signal<Tcontrol_t> * in_NRESET = new sc_signal<Tcontrol_t> ("NRESET"); 49 50 sc_signal<Tcontrol_t > ** out_ICACHE_REQ_VAL ; 51 sc_signal<Tcontrol_t > ** in_ICACHE_REQ_ACK ; 52 //sc_signal<Tcontext_t > ** out_ICACHE_REQ_THREAD_ID ; 53 sc_signal<Tpacket_t > ** out_ICACHE_REQ_PACKET_ID ; 54 sc_signal<Ticache_instruction_t> ** out_ICACHE_REQ_ADDRESS ; 55 sc_signal<Ticache_type_t > ** out_ICACHE_REQ_TYPE ; 56 sc_signal<Tcontrol_t > ** in_ICACHE_RSP_VAL ; 57 sc_signal<Tcontrol_t > ** out_ICACHE_RSP_ACK ; 58 //sc_signal<Tcontext_t > ** in_ICACHE_RSP_THREAD_ID ; 59 sc_signal<Tpacket_t > ** in_ICACHE_RSP_PACKET_ID ; 60 sc_signal<Ticache_instruction_t> *** in_ICACHE_RSP_INSTRUCTION ; 61 sc_signal<Ticache_error_t > ** in_ICACHE_RSP_ERROR ; 62 sc_signal<Tcontrol_t > ** out_DECOD_VAL ; 63 sc_signal<Tcontrol_t > ** in_DECOD_ACK ; 64 sc_signal<Tcontext_t > ** out_DECOD_CONTEXT_ID ; 65 sc_signal<Tdepth_t > ** out_DECOD_DEPTH ; 66 sc_signal<Ttype_t > ** out_DECOD_TYPE ; 67 sc_signal<Toperation_t > ** out_DECOD_OPERATION ; 68 sc_signal<Tcontrol_t > ** out_DECOD_NO_EXECUTE ; 69 sc_signal<Tcontrol_t > ** out_DECOD_IS_DELAY_SLOT ; 70 sc_signal<Tgeneral_data_t > ** out_DECOD_ADDRESS ; 71 sc_signal<Tgeneral_data_t > ** out_DECOD_ADDRESS_NEXT ; 72 sc_signal<Tcontrol_t > ** out_DECOD_HAS_IMMEDIAT ; 73 sc_signal<Tgeneral_data_t > ** out_DECOD_IMMEDIAT ; 74 sc_signal<Tcontrol_t > ** out_DECOD_READ_RA ; 75 sc_signal<Tgeneral_address_t > ** out_DECOD_NUM_REG_RA ; 76 sc_signal<Tcontrol_t > ** out_DECOD_READ_RB ; 77 sc_signal<Tgeneral_address_t > ** out_DECOD_NUM_REG_RB ; 78 sc_signal<Tcontrol_t > ** out_DECOD_READ_RC ; 79 sc_signal<Tspecial_address_t > ** out_DECOD_NUM_REG_RC ; 80 sc_signal<Tcontrol_t > ** out_DECOD_WRITE_RD ; 81 sc_signal<Tgeneral_address_t > ** out_DECOD_NUM_REG_RD ; 82 sc_signal<Tcontrol_t > ** out_DECOD_WRITE_RE ; 83 sc_signal<Tspecial_address_t > ** out_DECOD_NUM_REG_RE ; 84 sc_signal<Texception_t > ** out_DECOD_EXCEPTION_USE ; 85 sc_signal<Texception_t > ** out_DECOD_EXCEPTION ; 86 sc_signal<Tcontrol_t > ** in_BRANCH_COMPLETE_VAL ; 87 sc_signal<Tcontrol_t > ** out_BRANCH_COMPLETE_ACK ; 88 sc_signal<Tcontext_t > ** in_BRANCH_COMPLETE_CONTEXT_ID ; 89 sc_signal<Tdepth_t > ** in_BRANCH_COMPLETE_DEPTH ; 90 sc_signal<Taddress_t > ** in_BRANCH_COMPLETE_ADDRESS ; 91 sc_signal<Tcontrol_t > ** in_BRANCH_COMPLETE_NO_SEQUENCE ; 92 sc_signal<Tcontrol_t > ** out_BRANCH_COMPLETE_MISS_PREDICTION; 93 sc_signal<Tcontrol_t > * in_COMMIT_EVENT_VAL ; 94 sc_signal<Tcontrol_t > * out_COMMIT_EVENT_ACK ; 95 sc_signal<Tcontext_t > * in_COMMIT_EVENT_CONTEXT_ID ; 96 sc_signal<Tdepth_t > * in_COMMIT_EVENT_DEPTH ; 97 sc_signal<Tevent_type_t > * in_COMMIT_EVENT_TYPE ; 98 sc_signal<Tcontrol_t > * in_COMMIT_EVENT_IS_DELAY_SLOT ; 99 sc_signal<Taddress_t > * in_COMMIT_EVENT_ADDRESS ; 100 sc_signal<Tcontrol_t > * in_COMMIT_EVENT_ADDRESS_EPCR_VAL ; 101 sc_signal<Taddress_t > * in_COMMIT_EVENT_ADDRESS_EPCR ; 102 sc_signal<Tcontrol_t > * in_COMMIT_EVENT_ADDRESS_EEAR_VAL ; 103 sc_signal<Tgeneral_data_t > * in_COMMIT_EVENT_ADDRESS_EEAR ; 104 sc_signal<Tcontrol_t > ** out_EVENT_VAL ; 105 sc_signal<Tcontrol_t > ** in_EVENT_ACK ; 106 sc_signal<Taddress_t > ** out_EVENT_ADDRESS ; 107 sc_signal<Taddress_t > ** out_EVENT_ADDRESS_NEXT ; 108 sc_signal<Tcontrol_t > ** out_EVENT_ADDRESS_NEXT_VAL ; 109 sc_signal<Tcontrol_t > ** out_EVENT_IS_DS_TAKE ; 110 sc_signal<Tcontrol_t > ** out_SPR_EVENT_VAL ; 111 sc_signal<Tcontrol_t > ** in_SPR_EVENT_ACK ; 112 sc_signal<Tspr_t > ** out_SPR_EVENT_EPCR ; 113 sc_signal<Tcontrol_t > ** out_SPR_EVENT_EEAR_WEN ; 114 sc_signal<Tspr_t > ** out_SPR_EVENT_EEAR ; 115 sc_signal<Tcontrol_t > ** out_SPR_EVENT_SR_DSX ; 116 sc_signal<Tcontrol_t > ** out_SPR_EVENT_SR_TO_ESR ; 117 sc_signal<Tcounter_t > ** in_NB_INST_COMMIT_ALL ; 118 sc_signal<Tcounter_t > ** in_NB_INST_COMMIT_MEM ; 119 sc_signal<Tcounter_t > ** out_NB_INST_DECOD_ALL ; 120 sc_signal<Tdepth_t > ** out_DEPTH_MIN ; 121 sc_signal<Tdepth_t > ** out_DEPTH_MAX ; 122 sc_signal<Tcontrol_t > ** out_DEPTH_FULL ; 123 sc_signal<Tcontrol_t > ** in_SPR_SR_IEE ; 124 sc_signal<Tcontrol_t > ** in_SPR_SR_EPH ; 125 sc_signal<Tcontrol_t > ** in_INTERRUPT_ENABLE ; 49 126 50 127 ALLOC1_SC_SIGNAL(out_ICACHE_REQ_VAL ,"out_ICACHE_REQ_VAL ",Tcontrol_t ,_param->_nb_context); … … 68 145 ALLOC1_SC_SIGNAL(out_DECOD_NO_EXECUTE ,"out_DECOD_NO_EXECUTE ",Tcontrol_t ,_param->_sum_inst_decod); 69 146 ALLOC1_SC_SIGNAL(out_DECOD_IS_DELAY_SLOT ,"out_DECOD_IS_DELAY_SLOT ",Tcontrol_t ,_param->_sum_inst_decod); 70 #ifdef DEBUG71 147 ALLOC1_SC_SIGNAL(out_DECOD_ADDRESS ,"out_DECOD_ADDRESS ",Tgeneral_data_t ,_param->_sum_inst_decod); 72 #endif73 148 ALLOC1_SC_SIGNAL(out_DECOD_ADDRESS_NEXT ,"out_DECOD_ADDRESS_NEXT ",Tgeneral_data_t ,_param->_sum_inst_decod); 74 149 ALLOC1_SC_SIGNAL(out_DECOD_HAS_IMMEDIAT ,"out_DECOD_HAS_IMMEDIAT ",Tcontrol_t ,_param->_sum_inst_decod); … … 325 400 DELETE1_SC_SIGNAL(out_DECOD_NO_EXECUTE ,_param->_sum_inst_decod); 326 401 DELETE1_SC_SIGNAL(out_DECOD_IS_DELAY_SLOT ,_param->_sum_inst_decod); 327 #ifdef DEBUG328 402 DELETE1_SC_SIGNAL(out_DECOD_ADDRESS ,_param->_sum_inst_decod); 329 #endif330 403 DELETE1_SC_SIGNAL(out_DECOD_ADDRESS_NEXT ,_param->_sum_inst_decod); 331 404 DELETE1_SC_SIGNAL(out_DECOD_HAS_IMMEDIAT ,_param->_sum_inst_decod); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/src/Front_end_deallocation.cpp
r123 r128 109 109 DELETE1_SIGNAL(out_NB_INST_DECOD_ALL ,_param->_nb_context,_param->_size_nb_inst_decod); 110 110 111 DELETE1_SIGNAL(out_DEPTH_MIN ,_param->_nb_context,_param->_size_depth 112 DELETE1_SIGNAL(out_DEPTH_MAX ,_param->_nb_context,_param->_size_depth +1);113 DELETE1_SIGNAL(out_DEPTH_FULL ,_param->_nb_context, _param->_size_depth+1);111 DELETE1_SIGNAL(out_DEPTH_MIN ,_param->_nb_context,_param->_size_depth); 112 DELETE1_SIGNAL(out_DEPTH_MAX ,_param->_nb_context,_param->_size_depth); 113 DELETE1_SIGNAL(out_DEPTH_FULL ,_param->_nb_context,1); 114 114 115 115 DELETE1_SIGNAL( in_SPR_SR_IEE ,_param->_nb_context,1); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/src/Parameters.cpp
r122 r128 7 7 8 8 #include "Behavioural/Core/Multi_Front_end/Front_end/include/Parameters.h" 9 #include "Behavioural/include/Allocation.h" 9 10 #include "Common/include/Max.h" 10 11 … … 110 111 uint32_t size_instruction_address = size_general_data - 2; 111 112 112 _array_size_depth = new uint32_t [_nb_context];113 ALLOC1(_array_size_depth ,uint32_t,_nb_context); 113 114 for (uint32_t i=0; i<_nb_context; i++) 114 115 _array_size_depth [i] = log2(_upt_size_queue[i]); 115 116 116 _array_size_nb_inst_decod = new uint32_t [_nb_decod_unit];117 ALLOC1(_array_size_nb_inst_decod ,uint32_t,_nb_decod_unit); 117 118 for (uint32_t i=0; i<_nb_decod_unit; i++) 118 119 _array_size_nb_inst_decod [i] = log2(_size_decod_queue[i]+1); … … 159 160 ); 160 161 161 _translate_context_id_from_decod_unit= new std::vector<uint32_t> [_nb_decod_unit];162 ALLOC1(_translate_context_id_from_decod_unit,std::vector<uint32_t>,_nb_decod_unit); 162 163 163 164 for (uint32_t i=0; i<_nb_context; ++i) 164 165 _translate_context_id_from_decod_unit [_link_context_to_decod_unit[i]].push_back(i); 165 166 166 _decod_unit_nb_context = new uint32_t [_nb_decod_unit];167 _decod_unit_nb_inst_fetch = new uint32_t * [_nb_decod_unit];168 _decod_unit_nb_branch_speculated = new uint32_t * [_nb_decod_unit];169 // _decod_unit_depth = new uint32_t * [_nb_decod_unit];170 _decod_unit_instruction_implemeted = new bool ** [_nb_decod_unit];171 // _have_port_decod_unit_context_id = new bool [_nb_decod_unit];167 ALLOC1(_decod_unit_nb_context ,uint32_t,_nb_decod_unit); 168 ALLOC2(_decod_unit_nb_inst_fetch ,uint32_t,_nb_decod_unit,_translate_context_id_from_decod_unit [it1].size()); 169 ALLOC2(_decod_unit_nb_branch_speculated ,uint32_t,_nb_decod_unit,_translate_context_id_from_decod_unit [it1].size()); 170 // ALLOC2(_decod_unit_depth ,uint32_t,_nb_decod_unit,_translate_context_id_from_decod_unit [it1].size()); 171 ALLOC3(_decod_unit_instruction_implemeted,bool ,_nb_decod_unit,_translate_context_id_from_decod_unit [it1].size(),NB_INSTRUCTION); 172 // ALLOC2(_have_port_decod_unit_context_id ,bool ,_nb_decod_unit); 172 173 _sum_inst_decod = 0; 173 174 … … 179 180 180 181 _decod_unit_nb_context [i] = size; 181 _decod_unit_nb_inst_fetch [i] = new uint32_t [size]; 182 // _decod_unit_depth [i] = new uint32_t [size]; 183 _decod_unit_nb_branch_speculated [i] = new uint32_t [size]; 184 _decod_unit_instruction_implemeted [i] = new bool * [size]; 185 // _have_port_decod_unit_context_id [i] = size > 0; 182 // _have_port_decod_unit_context_id [i] = size > 0; 186 183 187 184 for (uint32_t j=0; j<size; ++j) … … 191 188 _decod_unit_nb_inst_fetch [i][j] = _nb_inst_fetch [x]; 192 189 _decod_unit_nb_branch_speculated [i][j] = _upt_size_queue [x]; 193 // _decod_unit_depth [i][j] = log2(_upt_size_queue[x]); 194 _decod_unit_instruction_implemeted [i][j] = new bool [NB_INSTRUCTION]; 190 // _decod_unit_depth [i][j] = log2(_upt_size_queue[x]); 195 191 196 192 for (uint32_t k=0; k<NB_INSTRUCTION; ++k) … … 302 298 delete [] _param_ifetch_unit ; 303 299 304 // delete [] _size_ifetch_queue_ptr; 305 // delete [] _size_nb_inst_decod; 306 delete [] _array_size_depth; 307 for (uint32_t i=0; i<_nb_context; ++i) 308 { 309 for (uint32_t j=0; j<_translate_context_id_from_decod_unit [i].size(); ++j) 310 delete [] _decod_unit_instruction_implemeted [i][j]; 311 312 delete [] _decod_unit_nb_inst_fetch [i]; 313 // delete [] _decod_unit_depth [i]; 314 delete [] _decod_unit_nb_branch_speculated [i]; 315 delete [] _decod_unit_instruction_implemeted [i]; 316 } 317 delete [] _decod_unit_nb_inst_fetch ; 318 // delete [] _decod_unit_depth ; 319 delete [] _decod_unit_nb_branch_speculated ; 320 delete [] _decod_unit_instruction_implemeted; 321 322 // delete [] _have_port_decod_unit_context_id; 323 delete [] _decod_unit_nb_context ; 324 delete [] _translate_context_id_from_decod_unit; 300 // DELETE2(_have_port_decod_unit_context_id ,_nb_decod_unit); 301 DELETE3(_decod_unit_instruction_implemeted ,_nb_decod_unit,_translate_context_id_from_decod_unit [it1].size(),NB_INSTRUCTION); 302 // DELETE2(_decod_unit_depth ,_nb_decod_unit,_translate_context_id_from_decod_unit [it1].size()); 303 DELETE2(_decod_unit_nb_branch_speculated ,_nb_decod_unit,_translate_context_id_from_decod_unit [it1].size()); 304 DELETE2(_decod_unit_nb_inst_fetch ,_nb_decod_unit,_translate_context_id_from_decod_unit [it1].size()); 305 DELETE1(_decod_unit_nb_context ,_nb_decod_unit); 306 307 DELETE1(_translate_context_id_from_decod_unit,_nb_decod_unit); 308 DELETE1(_array_size_nb_inst_decod ,_nb_decod_unit); 309 DELETE1(_array_size_depth ,_nb_context); 325 310 326 311 log_end(Front_end,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/SelfTest/src/main.cpp
r110 r128 142 142 143 143 test (name,param); 144 145 delete param; 144 146 } 145 147 catch (morpheo::ErrorMorpheo & error) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/SelfTest/src/test.cpp
r121 r128 29 29 #endif 30 30 31 simulation_init(0,0 );31 simulation_init(0,0,0,false,false); 32 32 33 33 debug_idle_cycle = CYCLE_MAX; … … 62 62 sc_signal<Tcontrol_t> * in_NRESET = new sc_signal<Tcontrol_t> ("NRESET"); 63 63 64 sc_signal<Tcontrol_t > *** in_INSERT_VAL ; 65 sc_signal<Tcontrol_t > *** out_INSERT_ACK ; 66 sc_signal<Tcontext_t > *** in_INSERT_FRONT_END_ID ; 67 sc_signal<Tcontext_t > *** in_INSERT_CONTEXT_ID ; 68 sc_signal<Tpacket_t > *** out_INSERT_PACKET_ID ; 69 //sc_signal<Tcontext_t > *** in_INSERT_RENAME_UNIT_ID ; 70 sc_signal<Tdepth_t > *** in_INSERT_DEPTH ; 71 sc_signal<Ttype_t > *** in_INSERT_TYPE ; 72 sc_signal<Toperation_t > *** in_INSERT_OPERATION ; 73 sc_signal<Tcontrol_t > *** in_INSERT_NO_EXECUTE ; 74 sc_signal<Tcontrol_t > *** in_INSERT_LAST_EVENT ; 75 sc_signal<Tcontrol_t > *** in_INSERT_IS_DELAY_SLOT ; 76 sc_signal<Taddress_t > *** in_INSERT_ADDRESS ; 77 sc_signal<Taddress_t > *** in_INSERT_ADDRESS_NEXT ; 78 sc_signal<Texception_t > *** in_INSERT_EXCEPTION ; 79 sc_signal<Texception_t > *** in_INSERT_EXCEPTION_USE ; 80 sc_signal<Tlsq_ptr_t > *** in_INSERT_STORE_QUEUE_PTR_WRITE ; 81 sc_signal<Tlsq_ptr_t > *** in_INSERT_LOAD_QUEUE_PTR_WRITE ; 82 sc_signal<Tcontrol_t > *** in_INSERT_READ_RA ; 83 sc_signal<Tgeneral_address_t> *** in_INSERT_NUM_REG_RA_LOG ; 84 sc_signal<Tgeneral_address_t> *** in_INSERT_NUM_REG_RA_PHY ; 85 sc_signal<Tcontrol_t > *** in_INSERT_READ_RB ; 86 sc_signal<Tgeneral_address_t> *** in_INSERT_NUM_REG_RB_LOG ; 87 sc_signal<Tgeneral_address_t> *** in_INSERT_NUM_REG_RB_PHY ; 88 sc_signal<Tcontrol_t > *** in_INSERT_READ_RC ; 89 sc_signal<Tspecial_address_t> *** in_INSERT_NUM_REG_RC_LOG ; 90 sc_signal<Tspecial_address_t> *** in_INSERT_NUM_REG_RC_PHY ; 91 sc_signal<Tcontrol_t > *** in_INSERT_WRITE_RD ; 92 sc_signal<Tgeneral_address_t> *** in_INSERT_NUM_REG_RD_LOG ; 93 sc_signal<Tgeneral_address_t> *** in_INSERT_NUM_REG_RD_PHY_OLD ; 94 sc_signal<Tgeneral_address_t> *** in_INSERT_NUM_REG_RD_PHY_NEW ; 95 sc_signal<Tcontrol_t > *** in_INSERT_WRITE_RE ; 96 sc_signal<Tspecial_address_t> *** in_INSERT_NUM_REG_RE_LOG ; 97 sc_signal<Tspecial_address_t> *** in_INSERT_NUM_REG_RE_PHY_OLD ; 98 sc_signal<Tspecial_address_t> *** in_INSERT_NUM_REG_RE_PHY_NEW ; 99 100 sc_signal<Tcontrol_t > *** out_RETIRE_VAL ; 101 sc_signal<Tcontrol_t > *** in_RETIRE_ACK ; 102 sc_signal<Tcontext_t > *** out_RETIRE_FRONT_END_ID ; 103 sc_signal<Tcontext_t > *** out_RETIRE_CONTEXT_ID ; 104 //sc_signal<Tcontext_t > *** out_RETIRE_RENAME_UNIT_ID ; 105 sc_signal<Tcontrol_t > *** out_RETIRE_USE_STORE_QUEUE ; 106 sc_signal<Tcontrol_t > *** out_RETIRE_USE_LOAD_QUEUE ; 107 sc_signal<Tlsq_ptr_t > *** out_RETIRE_STORE_QUEUE_PTR_WRITE ; 108 sc_signal<Tlsq_ptr_t > *** out_RETIRE_LOAD_QUEUE_PTR_WRITE ; 109 sc_signal<Tcontrol_t > *** out_RETIRE_READ_RA ; 110 sc_signal<Tgeneral_address_t> *** out_RETIRE_NUM_REG_RA_PHY ; 111 sc_signal<Tcontrol_t > *** out_RETIRE_READ_RB ; 112 sc_signal<Tgeneral_address_t> *** out_RETIRE_NUM_REG_RB_PHY ; 113 sc_signal<Tcontrol_t > *** out_RETIRE_READ_RC ; 114 sc_signal<Tspecial_address_t> *** out_RETIRE_NUM_REG_RC_PHY ; 115 sc_signal<Tcontrol_t > *** out_RETIRE_WRITE_RD ; 116 sc_signal<Tgeneral_address_t> *** out_RETIRE_NUM_REG_RD_LOG ; 117 sc_signal<Tgeneral_address_t> *** out_RETIRE_NUM_REG_RD_PHY_OLD ; 118 sc_signal<Tgeneral_address_t> *** out_RETIRE_NUM_REG_RD_PHY_NEW ; 119 sc_signal<Tcontrol_t > *** out_RETIRE_WRITE_RE ; 120 sc_signal<Tspecial_address_t> *** out_RETIRE_NUM_REG_RE_LOG ; 121 sc_signal<Tspecial_address_t> *** out_RETIRE_NUM_REG_RE_PHY_OLD ; 122 sc_signal<Tspecial_address_t> *** out_RETIRE_NUM_REG_RE_PHY_NEW ; 123 124 sc_signal<Tcontrol_t > *** out_RETIRE_EVENT_VAL ; 125 sc_signal<Tcontrol_t > *** in_RETIRE_EVENT_ACK ; 126 sc_signal<Tevent_state_t > *** out_RETIRE_EVENT_STATE ; 127 sc_signal<Tcontrol_t > *** out_RETIRE_EVENT_STOP ; 128 129 sc_signal<Tcontrol_t > ** in_COMMIT_VAL ; 130 sc_signal<Tcontrol_t > ** out_COMMIT_ACK ; 131 sc_signal<Tcontrol_t > ** in_COMMIT_WEN ; 132 sc_signal<Tpacket_t > ** in_COMMIT_PACKET_ID ; 133 //sc_signal<Toperation_t > ** in_COMMIT_OPERATION ; 134 //sc_signal<Ttype_t > ** in_COMMIT_TYPE ; 135 sc_signal<Tspecial_data_t > ** in_COMMIT_FLAGS ; 136 sc_signal<Texception_t > ** in_COMMIT_EXCEPTION ; 137 sc_signal<Tcontrol_t > ** in_COMMIT_NO_SEQUENCE ; 138 sc_signal<Taddress_t > ** in_COMMIT_ADDRESS ; 139 sc_signal<Tgeneral_address_t> ** out_COMMIT_NUM_REG_RD ; 140 141 sc_signal<Tcontrol_t > ** out_REEXECUTE_VAL ; 142 sc_signal<Tcontrol_t > ** in_REEXECUTE_ACK ; 143 sc_signal<Tcontext_t > ** out_REEXECUTE_CONTEXT_ID ; 144 sc_signal<Tcontext_t > ** out_REEXECUTE_FRONT_END_ID ; 145 sc_signal<Tpacket_t > ** out_REEXECUTE_PACKET_ID ; 146 sc_signal<Toperation_t > ** out_REEXECUTE_OPERATION ; 147 sc_signal<Ttype_t > ** out_REEXECUTE_TYPE ; 148 sc_signal<Tlsq_ptr_t > ** out_REEXECUTE_STORE_QUEUE_PTR_WRITE; 149 150 sc_signal<Tcontrol_t > ** out_BRANCH_COMPLETE_VAL ; 151 sc_signal<Tcontrol_t > ** in_BRANCH_COMPLETE_ACK ; 152 sc_signal<Tcontext_t > ** out_BRANCH_COMPLETE_CONTEXT_ID ; 153 sc_signal<Tcontext_t > ** out_BRANCH_COMPLETE_FRONT_END_ID ; 154 sc_signal<Tdepth_t > ** out_BRANCH_COMPLETE_DEPTH ; 155 sc_signal<Taddress_t > ** out_BRANCH_COMPLETE_ADDRESS ; 156 sc_signal<Tcontrol_t > ** out_BRANCH_COMPLETE_NO_SEQUENCE ; 157 sc_signal<Tcontrol_t > ** in_BRANCH_COMPLETE_MISS_PREDICTION; 158 159 sc_signal<Tcontrol_t > * out_UPDATE_VAL ; 160 sc_signal<Tcontrol_t > * in_UPDATE_ACK ; 161 sc_signal<Tcontext_t > * out_UPDATE_CONTEXT_ID ; 162 sc_signal<Tcontext_t > * out_UPDATE_FRONT_END_ID ; 163 sc_signal<Tdepth_t > * out_UPDATE_DEPTH ; 164 sc_signal<Tevent_type_t > * out_UPDATE_TYPE ; 165 sc_signal<Tcontrol_t > * out_UPDATE_IS_DELAY_SLOT ; 166 sc_signal<Taddress_t > * out_UPDATE_ADDRESS ; 167 sc_signal<Tcontrol_t > * out_UPDATE_ADDRESS_EPCR_VAL ; 168 sc_signal<Taddress_t > * out_UPDATE_ADDRESS_EPCR ; 169 sc_signal<Tcontrol_t > * out_UPDATE_ADDRESS_EEAR_VAL ; 170 sc_signal<Tgeneral_data_t > * out_UPDATE_ADDRESS_EEAR ; 171 172 sc_signal<Tcontrol_t > *** in_EVENT_VAL ; 173 sc_signal<Tcontrol_t > *** out_EVENT_ACK ; 174 sc_signal<Taddress_t > *** in_EVENT_ADDRESS ; 175 sc_signal<Taddress_t > *** in_EVENT_ADDRESS_NEXT ; 176 sc_signal<Tcontrol_t > *** in_EVENT_ADDRESS_NEXT_VAL ; 177 sc_signal<Tcontrol_t > *** in_EVENT_IS_DS_TAKE ; 178 179 sc_signal<Tcounter_t > *** out_NB_INST_COMMIT_ALL ; 180 sc_signal<Tcounter_t > *** out_NB_INST_COMMIT_MEM ; 181 sc_signal<Tcounter_t > *** in_NB_INST_DECOD_ALL ; 182 sc_signal<Tdepth_t > *** in_DEPTH_MIN ; 183 sc_signal<Tdepth_t > *** in_DEPTH_MAX ; 184 sc_signal<Tcontrol_t > *** in_DEPTH_FULL ; 185 186 sc_signal<Tcontrol_t > *** in_SPR_READ_SR_OVE ; 187 188 sc_signal<Tcontrol_t > *** out_SPR_WRITE_VAL ; 189 sc_signal<Tcontrol_t > *** in_SPR_WRITE_ACK ; 190 sc_signal<Tcontrol_t > *** out_SPR_WRITE_SR_F_VAL ; 191 sc_signal<Tcontrol_t > *** out_SPR_WRITE_SR_F ; 192 sc_signal<Tcontrol_t > *** out_SPR_WRITE_SR_CY_VAL ; 193 sc_signal<Tcontrol_t > *** out_SPR_WRITE_SR_CY ; 194 sc_signal<Tcontrol_t > *** out_SPR_WRITE_SR_OV_VAL ; 195 sc_signal<Tcontrol_t > *** out_SPR_WRITE_SR_OV ; 196 197 sc_signal<bool > * out_INFO_ROB_EMPTY ; 198 64 199 ALLOC2_SC_SIGNAL( in_INSERT_VAL ," in_INSERT_VAL ",Tcontrol_t ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 65 200 ALLOC2_SC_SIGNAL(out_INSERT_ACK ,"out_INSERT_ACK ",Tcontrol_t ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); … … 72 207 ALLOC2_SC_SIGNAL( in_INSERT_OPERATION ," in_INSERT_OPERATION ",Toperation_t ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 73 208 ALLOC2_SC_SIGNAL( in_INSERT_NO_EXECUTE ," in_INSERT_NO_EXECUTE ",Tcontrol_t ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 209 ALLOC2_SC_SIGNAL( in_INSERT_LAST_EVENT ," in_INSERT_LAST_EVENT ",Tcontrol_t ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 74 210 ALLOC2_SC_SIGNAL( in_INSERT_IS_DELAY_SLOT ," in_INSERT_IS_DELAY_SLOT ",Tcontrol_t ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 75 #ifdef DEBUG76 211 ALLOC2_SC_SIGNAL( in_INSERT_ADDRESS ," in_INSERT_ADDRESS ",Taddress_t ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 77 #endif78 212 ALLOC2_SC_SIGNAL( in_INSERT_ADDRESS_NEXT ," in_INSERT_ADDRESS_NEXT ",Taddress_t ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 79 213 ALLOC2_SC_SIGNAL( in_INSERT_EXCEPTION ," in_INSERT_EXCEPTION ",Texception_t ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); … … 125 259 ALLOC2_SC_SIGNAL( in_RETIRE_EVENT_ACK ," in_RETIRE_EVENT_ACK ",Tcontrol_t ,_param->_nb_front_end,_param->_nb_context[it1]); 126 260 ALLOC2_SC_SIGNAL(out_RETIRE_EVENT_STATE ,"out_RETIRE_EVENT_STATE ",Tevent_state_t ,_param->_nb_front_end,_param->_nb_context[it1]); 261 ALLOC2_SC_SIGNAL(out_RETIRE_EVENT_STOP ,"out_RETIRE_EVENT_STOP ",Tcontrol_t ,_param->_nb_front_end,_param->_nb_context[it1]); 127 262 128 263 ALLOC1_SC_SIGNAL( in_COMMIT_VAL ," in_COMMIT_VAL ",Tcontrol_t ,_param->_nb_inst_commit); … … 137 272 ALLOC1_SC_SIGNAL( in_COMMIT_ADDRESS ," in_COMMIT_ADDRESS ",Taddress_t ,_param->_nb_inst_commit); 138 273 ALLOC1_SC_SIGNAL(out_COMMIT_NUM_REG_RD ,"out_COMMIT_NUM_REG_RD ",Tgeneral_address_t,_param->_nb_inst_commit); 274 139 275 ALLOC1_SC_SIGNAL(out_REEXECUTE_VAL ,"out_REEXECUTE_VAL ",Tcontrol_t ,_param->_nb_inst_reexecute); 140 276 ALLOC1_SC_SIGNAL( in_REEXECUTE_ACK ," in_REEXECUTE_ACK ",Tcontrol_t ,_param->_nb_inst_reexecute); … … 191 327 ALLOC2_SC_SIGNAL(out_SPR_WRITE_SR_OV ,"out_SPR_WRITE_SR_OV ",Tcontrol_t ,_param->_nb_front_end,_param->_nb_context[it1]); 192 328 329 ALLOC0_SC_SIGNAL(out_INFO_ROB_EMPTY ,"out_INFO_ROB_EMPTY ",bool ); 330 193 331 /******************************************************** 194 332 * Instanciation … … 215 353 INSTANCE2_SC_SIGNAL(_Commit_unit, in_INSERT_IS_DELAY_SLOT ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 216 354 INSTANCE2_SC_SIGNAL(_Commit_unit, in_INSERT_NO_EXECUTE ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 355 INSTANCE2_SC_SIGNAL(_Commit_unit, in_INSERT_LAST_EVENT ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 217 356 #ifdef DEBUG 218 357 INSTANCE2_SC_SIGNAL(_Commit_unit, in_INSERT_ADDRESS ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); … … 272 411 INSTANCE2_SC_SIGNAL(_Commit_unit, in_RETIRE_EVENT_ACK ,_param->_nb_front_end,_param->_nb_context[it1]); 273 412 INSTANCE2_SC_SIGNAL(_Commit_unit,out_RETIRE_EVENT_STATE ,_param->_nb_front_end,_param->_nb_context[it1]); 413 INSTANCE2_SC_SIGNAL(_Commit_unit,out_RETIRE_EVENT_STOP ,_param->_nb_front_end,_param->_nb_context[it1]); 274 414 INSTANCE1_SC_SIGNAL(_Commit_unit, in_COMMIT_VAL ,_param->_nb_inst_commit); 275 415 INSTANCE1_SC_SIGNAL(_Commit_unit,out_COMMIT_ACK ,_param->_nb_inst_commit); … … 351 491 INSTANCE2_SC_SIGNAL(_Commit_unit,out_SPR_WRITE_SR_OV ,_param->_nb_front_end,_param->_nb_context[it1]); 352 492 493 #ifdef DEBUG_TEST 494 INSTANCE0_SC_SIGNAL(_Commit_unit,out_INFO_ROB_EMPTY ); 495 #endif 496 353 497 msg(_("<%s> : Start Simulation ............\n"),name.c_str()); 354 498 … … 378 522 in_NRESET->write(1); 379 523 524 #ifdef SELFTEST 380 525 LABEL("Loop of Test"); 381 526 for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++) … … 435 580 in_INSERT_IS_DELAY_SLOT [i][j]->write(0); 436 581 in_INSERT_NO_EXECUTE [i][j]->write(0); 582 in_INSERT_LAST_EVENT [i][j]->write(0); 437 583 in_INSERT_ADDRESS_NEXT [i][j]->write(addr); 438 584 in_INSERT_EXCEPTION [i][j]->write(0); … … 608 754 609 755 } 756 #else 757 SC_START(10); 758 #endif 610 759 611 760 /******************************************************** … … 631 780 DELETE2_SC_SIGNAL( in_INSERT_OPERATION ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 632 781 DELETE2_SC_SIGNAL( in_INSERT_NO_EXECUTE ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 782 DELETE2_SC_SIGNAL( in_INSERT_LAST_EVENT ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 633 783 DELETE2_SC_SIGNAL( in_INSERT_IS_DELAY_SLOT ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 634 #ifdef DEBUG635 784 DELETE2_SC_SIGNAL( in_INSERT_ADDRESS ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 636 #endif637 785 DELETE2_SC_SIGNAL( in_INSERT_ADDRESS_NEXT ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 638 786 DELETE2_SC_SIGNAL( in_INSERT_EXCEPTION ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); … … 666 814 DELETE2_SC_SIGNAL(out_RETIRE_STORE_QUEUE_PTR_WRITE ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]); 667 815 DELETE2_SC_SIGNAL(out_RETIRE_LOAD_QUEUE_PTR_WRITE ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]); 668 // 669 // 670 // 671 // 672 // 673 // 816 //DELETE2_SC_SIGNAL(out_RETIRE_READ_RA ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]); 817 //DELETE2_SC_SIGNAL(out_RETIRE_NUM_REG_RA_PHY ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]); 818 //DELETE2_SC_SIGNAL(out_RETIRE_READ_RB ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]); 819 //DELETE2_SC_SIGNAL(out_RETIRE_NUM_REG_RB_PHY ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]); 820 //DELETE2_SC_SIGNAL(out_RETIRE_READ_RC ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]); 821 //DELETE2_SC_SIGNAL(out_RETIRE_NUM_REG_RC_PHY ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]); 674 822 DELETE2_SC_SIGNAL(out_RETIRE_WRITE_RD ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]); 675 823 DELETE2_SC_SIGNAL(out_RETIRE_NUM_REG_RD_LOG ,_param->_nb_rename_unit,_param->_nb_inst_retire[it1]); … … 683 831 DELETE2_SC_SIGNAL( in_RETIRE_EVENT_ACK ,_param->_nb_front_end,_param->_nb_context[it1]); 684 832 DELETE2_SC_SIGNAL(out_RETIRE_EVENT_STATE ,_param->_nb_front_end,_param->_nb_context[it1]); 833 DELETE2_SC_SIGNAL(out_RETIRE_EVENT_STOP ,_param->_nb_front_end,_param->_nb_context[it1]); 685 834 DELETE1_SC_SIGNAL( in_COMMIT_VAL ,_param->_nb_inst_commit); 686 835 DELETE1_SC_SIGNAL(out_COMMIT_ACK ,_param->_nb_inst_commit); … … 747 896 DELETE2_SC_SIGNAL(out_SPR_WRITE_SR_OV_VAL ,_param->_nb_front_end,_param->_nb_context[it1]); 748 897 DELETE2_SC_SIGNAL(out_SPR_WRITE_SR_OV ,_param->_nb_front_end,_param->_nb_context[it1]); 898 899 DELETE0_SC_SIGNAL(out_INFO_ROB_EMPTY ); 749 900 } 750 901 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_deallocation.cpp
r125 r128 239 239 240 240 #if defined(DEBUG) and defined(DEBUG_Commit_unit) and (DEBUG_Commit_unit == true) 241 for (uint32_t i=0; i<_param->_nb_thread; ++i) 242 if (_param->_have_thread [i]) 243 { 244 instruction_log_file [i].close(); 245 } 241 { 242 for (uint32_t i=0; i<_param->_nb_thread; ++i) 243 if (_param->_have_thread [i]) 244 { 245 instruction_log_file [i].close(); 246 } 247 delete [] instruction_log_file; 248 } 246 249 #endif 247 250 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_genMealy_retire.cpp
r123 r128 52 52 for (uint32_t j=0; j<_param->_nb_context[i]; ++j) 53 53 { 54 spr_write_val [i][j] = 0;54 spr_write_val [i][j] = 0; 55 55 spr_write_sr_f_val [i][j] = 0; 56 56 spr_write_sr_cy_val [i][j] = 0; … … 63 63 for (uint32_t i=0; i<_param->_nb_bank; i++) 64 64 { 65 uint32_t num_bank = (internal_BANK_RETIRE_HEAD+i)%_param->_nb_bank; 65 uint32_t num_bank = (internal_BANK_RETIRE_HEAD+i)%_param->_nb_bank; 66 67 log_printf(TRACE,Commit_unit,FUNCTION," * BANK [%d]",num_bank); 66 68 67 69 // Test if have instruction … … 72 74 uint32_t x = entry->rename_unit_id; 73 75 uint32_t y = num_inst_retire [x]; 74 bool bypass= false; 75 // test if : 76 // * can retire (all previous instruction is retired) 77 // * all structure is ok (not busy) 78 if (can_retire [x] and // in-order 79 (y < _param->_nb_inst_retire [x]) and 80 PORT_READ(in_RETIRE_ACK [x][y])) // not busy 81 { 82 rob_state_t state = entry->state; 83 Tcontext_t front_end_id = entry->front_end_id; 84 Tcontext_t context_id = entry->context_id; 76 77 log_printf(TRACE,Commit_unit,FUNCTION," * num_rename_unit : %d",x); 78 log_printf(TRACE,Commit_unit,FUNCTION," * num_inst_retire : %d",y); 79 80 if (y < _param->_nb_inst_retire [x]) 81 { 82 #ifdef DEBUG_TEST 83 if (x >= _param->_nb_rename_unit) 84 throw ERRORMORPHEO(FUNCTION,toString(_("Invalid rename_unit number (%d, max is %d).\n"),x,_param->_nb_rename_unit)); 85 #endif 86 bool bypass= false; 87 88 log_printf(TRACE,Commit_unit,FUNCTION," * can_retire : %d",can_retire [x]); 89 log_printf(TRACE,Commit_unit,FUNCTION," * RETIRE_ACK : %d",PORT_READ(in_RETIRE_ACK [x][y])); 90 91 // test if : 92 // * can retire (all previous instruction is retired) 93 // * all structure is ok (not busy) 94 if (can_retire [x] and // in-order 95 PORT_READ(in_RETIRE_ACK [x][y])) // not busy 96 { 97 log_printf(TRACE,Commit_unit,FUNCTION," * valid !!!"); 98 99 rob_state_t state = entry->state; 100 Tcontext_t front_end_id = entry->front_end_id; 101 Tcontext_t context_id = entry->context_id; 102 103 log_printf(TRACE,Commit_unit,FUNCTION," * state : %s",toString(state).c_str()); 104 log_printf(TRACE,Commit_unit,FUNCTION," * front_end_id : %d",front_end_id); 105 log_printf(TRACE,Commit_unit,FUNCTION," * context_id : %d",context_id ); 106 107 if ((state == ROB_END_OK ) or 108 (state == ROB_END_KO ) or 109 (state == ROB_END_BRANCH_MISS) or 110 (state == ROB_END_LOAD_MISS ) or 111 (state == ROB_END_MISS )// or 112 // (state == ROB_END_EXCEPTION) 113 ) 114 { 115 Tcontrol_t write_re = entry->write_re; 116 Tspecial_address_t num_reg_re_log = entry->num_reg_re_log; 117 118 // if state is ok, when write flags in the SR regsiters 119 bool spr_write_ack = true; 120 121 // Write in SR the good flag 122 if ((state == ROB_END_OK ) and write_re) 123 // ROB_END_BRANCH_MISS is a valid branch instruction but don't modify RE 124 { 125 log_printf(TRACE,Commit_unit,FUNCTION," * need write SR flags"); 126 log_printf(TRACE,Commit_unit,FUNCTION," * SPR_WRITE_ACK : %d",PORT_READ(in_SPR_WRITE_ACK [front_end_id][context_id])); 127 128 spr_write_ack = PORT_READ(in_SPR_WRITE_ACK [front_end_id][context_id]); 129 130 // retire_ack is set !!! 131 spr_write_val [front_end_id][context_id] = 1; 132 133 Tspecial_data_t flags = entry->flags; 134 135 switch (num_reg_re_log) 136 { 137 case SPR_LOGIC_SR_F : 138 { 139 spr_write_sr_f_val [front_end_id][context_id] = 1; 140 spr_write_sr_f [front_end_id][context_id] = (flags & FLAG_F )!=0; 141 142 break; 143 } 144 case SPR_LOGIC_SR_CY_OV : 145 { 146 spr_write_sr_cy_val [front_end_id][context_id] = 1; 147 spr_write_sr_ov_val [front_end_id][context_id] = 1; 148 spr_write_sr_cy [front_end_id][context_id] = (flags & FLAG_CY)!=0; 149 spr_write_sr_ov [front_end_id][context_id] = (flags & FLAG_OV)!=0; 150 151 break; 152 } 153 default : 154 { 155 #ifdef DEBUG_TEST 156 throw ERRORMORPHEO(FUNCTION,_("Invalid num_reg_re_log.\n")); 157 #endif 158 } 159 } 160 } 161 162 // find an instruction can be retire, and in order 163 164 if (spr_write_ack) 165 { 166 retire_val [x][y] = 1; 167 num_inst_retire [x] ++; 168 internal_BANK_RETIRE_VAL [num_bank] = true; 169 } 170 171 internal_BANK_RETIRE_NUM_RENAME_UNIT [num_bank] = x; 172 internal_BANK_RETIRE_NUM_INST [num_bank] = y; 173 174 if (_param->_have_port_front_end_id) 175 PORT_WRITE(out_RETIRE_FRONT_END_ID [x][y], front_end_id ); 176 if (_param->_have_port_context_id) 177 PORT_WRITE(out_RETIRE_CONTEXT_ID [x][y], context_id ); 178 // PORT_WRITE(out_RETIRE_RENAME_UNIT_ID [x][y], entry->rename_unit_id ); 179 PORT_WRITE(out_RETIRE_USE_STORE_QUEUE [x][y], entry->use_store_queue ); 180 PORT_WRITE(out_RETIRE_USE_LOAD_QUEUE [x][y], entry->use_load_queue ); 181 PORT_WRITE(out_RETIRE_STORE_QUEUE_PTR_WRITE [x][y], entry->store_queue_ptr_write); 182 if (_param->_have_port_load_queue_ptr) 183 PORT_WRITE(out_RETIRE_LOAD_QUEUE_PTR_WRITE [x][y], entry->load_queue_ptr_write ); 184 // PORT_WRITE(out_RETIRE_READ_RA [x][y], entry->read_ra ); 185 // PORT_WRITE(out_RETIRE_NUM_REG_RA_PHY [x][y], entry->num_reg_ra_phy ); 186 // PORT_WRITE(out_RETIRE_READ_RB [x][y], entry->read_rb ); 187 // PORT_WRITE(out_RETIRE_NUM_REG_RB_PHY [x][y], entry->num_reg_rb_phy ); 188 // PORT_WRITE(out_RETIRE_READ_RC [x][y], entry->read_rc ); 189 // PORT_WRITE(out_RETIRE_NUM_REG_RC_PHY [x][y], entry->num_reg_rc_phy ); 190 PORT_WRITE(out_RETIRE_WRITE_RD [x][y], entry->write_rd ); 191 PORT_WRITE(out_RETIRE_NUM_REG_RD_LOG [x][y], entry->num_reg_rd_log ); 192 PORT_WRITE(out_RETIRE_NUM_REG_RD_PHY_OLD [x][y], entry->num_reg_rd_phy_old ); 193 PORT_WRITE(out_RETIRE_NUM_REG_RD_PHY_NEW [x][y], entry->num_reg_rd_phy_new ); 194 PORT_WRITE(out_RETIRE_WRITE_RE [x][y], write_re ); 195 PORT_WRITE(out_RETIRE_NUM_REG_RE_LOG [x][y], num_reg_re_log ); 196 PORT_WRITE(out_RETIRE_NUM_REG_RE_PHY_OLD [x][y], entry->num_reg_re_phy_old ); 197 PORT_WRITE(out_RETIRE_NUM_REG_RE_PHY_NEW [x][y], entry->num_reg_re_phy_new ); 198 199 // Event -> rob must be manage this event 200 if ((state == ROB_END_BRANCH_MISS) or 201 (state == ROB_END_LOAD_MISS)) 202 can_retire [x] = false; 203 } 204 205 log_printf(TRACE,Commit_unit,FUNCTION," * bypass (before) : %d",bypass); 206 207 bypass = ((state == ROB_END ) or 208 (state == ROB_STORE_OK ) or 209 (state == ROB_STORE_KO ) or 210 (state == ROB_STORE_OK_WAIT_END) or 211 (state == ROB_STORE_KO_WAIT_END)); 212 213 log_printf(TRACE,Commit_unit,FUNCTION," * bypass (after) : %d",bypass); 214 215 uint32_t packet = ((entry->ptr << _param->_shift_num_slot) | num_bank); 216 217 log_printf(TRACE,Commit_unit,FUNCTION," * packet : %d",packet); 218 219 // if future event, don't update after this event 220 if ((reg_EVENT_STATE [front_end_id][context_id] == COMMIT_EVENT_STATE_NOT_YET_EVENT) and 221 (reg_EVENT_PACKET [front_end_id][context_id] == packet)) 222 { 223 log_printf(TRACE,Commit_unit,FUNCTION," * is the event instruction, stop bypass !!!"); 224 bypass = false; 225 } 226 } 85 227 86 if ((state == ROB_END_OK ) or 87 (state == ROB_END_KO ) or 88 (state == ROB_END_BRANCH_MISS) or 89 (state == ROB_END_LOAD_MISS ) or 90 (state == ROB_END_MISS )// or 91 // (state == ROB_END_EXCEPTION) 92 ) 93 { 94 Tcontrol_t write_re = entry->write_re; 95 Tspecial_address_t num_reg_re_log = entry->num_reg_re_log; 96 97 // if state is ok, when write flags in the SR regsiters 98 bool spr_write_ack = true; 99 100 // Write in SR the good flag 101 if ((state == ROB_END_OK ) and write_re) 102 // ROB_END_BRANCH_MISS is a valid branch instruction but don't modify RE 103 { 104 spr_write_ack = PORT_READ(in_SPR_WRITE_ACK [front_end_id][context_id]); 105 106 // retire_ack is set !!! 107 spr_write_val [front_end_id][context_id] = 1; 108 109 Tspecial_data_t flags = entry->flags; 110 111 switch (num_reg_re_log) 112 { 113 case SPR_LOGIC_SR_F : 114 { 115 spr_write_sr_f_val [front_end_id][context_id] = 1; 116 spr_write_sr_f [front_end_id][context_id] = (flags & FLAG_F )!=0; 117 118 break; 119 } 120 case SPR_LOGIC_SR_CY_OV : 121 { 122 spr_write_sr_cy_val [front_end_id][context_id] = 1; 123 spr_write_sr_ov_val [front_end_id][context_id] = 1; 124 spr_write_sr_cy [front_end_id][context_id] = (flags & FLAG_CY)!=0; 125 spr_write_sr_ov [front_end_id][context_id] = (flags & FLAG_OV)!=0; 126 127 break; 128 } 129 default : 130 { 131 #ifdef DEBUG_TEST 132 throw ERRORMORPHEO(FUNCTION,_("Invalid num_reg_re_log.\n")); 133 #endif 134 } 135 } 136 } 137 138 // find an instruction can be retire, and in order 139 140 if (spr_write_ack) 141 { 142 retire_val [x][y] = 1; 143 num_inst_retire [x] ++; 144 internal_BANK_RETIRE_VAL [num_bank] = true; 145 } 146 147 internal_BANK_RETIRE_NUM_RENAME_UNIT [num_bank] = x; 148 internal_BANK_RETIRE_NUM_INST [num_bank] = y; 149 150 if (_param->_have_port_front_end_id) 151 PORT_WRITE(out_RETIRE_FRONT_END_ID [x][y], front_end_id ); 152 if (_param->_have_port_context_id) 153 PORT_WRITE(out_RETIRE_CONTEXT_ID [x][y], context_id ); 154 // PORT_WRITE(out_RETIRE_RENAME_UNIT_ID [x][y], entry->rename_unit_id ); 155 PORT_WRITE(out_RETIRE_USE_STORE_QUEUE [x][y], entry->use_store_queue ); 156 PORT_WRITE(out_RETIRE_USE_LOAD_QUEUE [x][y], entry->use_load_queue ); 157 PORT_WRITE(out_RETIRE_STORE_QUEUE_PTR_WRITE [x][y], entry->store_queue_ptr_write); 158 if (_param->_have_port_load_queue_ptr) 159 PORT_WRITE(out_RETIRE_LOAD_QUEUE_PTR_WRITE [x][y], entry->load_queue_ptr_write ); 160 // PORT_WRITE(out_RETIRE_READ_RA [x][y], entry->read_ra ); 161 // PORT_WRITE(out_RETIRE_NUM_REG_RA_PHY [x][y], entry->num_reg_ra_phy ); 162 // PORT_WRITE(out_RETIRE_READ_RB [x][y], entry->read_rb ); 163 // PORT_WRITE(out_RETIRE_NUM_REG_RB_PHY [x][y], entry->num_reg_rb_phy ); 164 // PORT_WRITE(out_RETIRE_READ_RC [x][y], entry->read_rc ); 165 // PORT_WRITE(out_RETIRE_NUM_REG_RC_PHY [x][y], entry->num_reg_rc_phy ); 166 PORT_WRITE(out_RETIRE_WRITE_RD [x][y], entry->write_rd ); 167 PORT_WRITE(out_RETIRE_NUM_REG_RD_LOG [x][y], entry->num_reg_rd_log ); 168 PORT_WRITE(out_RETIRE_NUM_REG_RD_PHY_OLD [x][y], entry->num_reg_rd_phy_old ); 169 PORT_WRITE(out_RETIRE_NUM_REG_RD_PHY_NEW [x][y], entry->num_reg_rd_phy_new ); 170 PORT_WRITE(out_RETIRE_WRITE_RE [x][y], write_re ); 171 PORT_WRITE(out_RETIRE_NUM_REG_RE_LOG [x][y], num_reg_re_log ); 172 PORT_WRITE(out_RETIRE_NUM_REG_RE_PHY_OLD [x][y], entry->num_reg_re_phy_old ); 173 PORT_WRITE(out_RETIRE_NUM_REG_RE_PHY_NEW [x][y], entry->num_reg_re_phy_new ); 174 175 // Event -> rob must be manage this event 176 if ((state == ROB_END_BRANCH_MISS) or 177 (state == ROB_END_LOAD_MISS)) 178 can_retire [x] = false; 179 } 180 181 bypass = ((state == ROB_END ) or 182 (state == ROB_STORE_OK ) or 183 (state == ROB_STORE_KO ) or 184 (state == ROB_STORE_OK_WAIT_END) or 185 (state == ROB_STORE_KO_WAIT_END)); 186 187 uint32_t packet = ((entry->ptr << _param->_shift_num_slot) | num_bank); 188 189 // if future event, don't update after this event 190 if ((reg_EVENT_STATE [entry->front_end_id][entry->context_id] == COMMIT_EVENT_STATE_NOT_YET_EVENT) and 191 (reg_EVENT_PACKET [entry->front_end_id][entry->context_id] == packet)) 192 bypass = false; 193 } 194 195 // Retire "in-order" 196 can_retire [x] &= (retire_val [x][y] or bypass); 228 // Retire "in-order" 229 can_retire [x] &= (retire_val [x][y] or bypass); 230 } 197 231 } 198 232 } … … 219 253 for (uint32_t j=0; j<_param->_nb_inst_retire[i]; j++) 220 254 PORT_WRITE(out_RETIRE_VAL [i][j],0); 255 256 for (uint32_t i=0; i<_param->_nb_front_end; ++i) 257 for (uint32_t j=0; j<_param->_nb_context[i]; ++j) 258 PORT_WRITE(out_SPR_WRITE_VAL [i][j], 0); 221 259 } 222 260 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_transition.cpp
r124 r128 54 54 // reg_EVENT_FLUSH [i][j] = false; 55 55 // reg_EVENT_STOP [i][j] = false; 56 reg_EVENT_NUM_BANK [i][j] = 0; // not necessary 57 reg_EVENT_NUM_PTR [i][j] = 0; // not necessary 58 //reg_EVENT_CAN_RESTART [i][j] = 0; // not necessary 59 reg_EVENT_PACKET [i][j] = 0; // not necessary 56 60 reg_EVENT_NB_INST [i][j] = 0; 57 61 reg_EVENT_LAST [i][j] = false; 62 reg_EVENT_LAST_NUM_BANK [i][j] = 0; // not necessary 63 reg_EVENT_LAST_NUM_PTR [i][j] = 0; // not necessary 58 64 59 65 reg_EVENT_NEXT_STOP [i][j] = false; 66 reg_EVENT_NEXT_PACKET [i][j] = 0; // not necessary 60 67 61 68 // reg_PC_PREVIOUS [i][j] = (0x100-4)>>2; … … 274 281 entry->num_reg_re_phy_old = PORT_READ(in_INSERT_NUM_REG_RE_PHY_OLD [x][y]); 275 282 entry->num_reg_re_phy_new = PORT_READ(in_INSERT_NUM_REG_RE_PHY_NEW [x][y]); 283 284 entry->flags = 0; // not necessary 276 285 entry->no_sequence = type == TYPE_BRANCH; 277 286 // entry->speculative = true; 278 287 #ifdef DEBUG 279 288 entry->address = PORT_READ(in_INSERT_ADDRESS [x][y]); 289 #else 290 entry->address = 0; // not necessary 280 291 #endif 281 292 entry->address_next = PORT_READ(in_INSERT_ADDRESS_NEXT [x][y]); … … 1339 1350 (*it)->flags , 1340 1351 (*it)->no_sequence , 1341 // 1352 // (*it)->speculative , 1342 1353 (*it)->address , 1343 1354 (*it)->address<<2 , -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/SelfTest/src/test.cpp
r117 r128 57 57 sc_signal<Ttype_t > *** in_ISSUE_IN_TYPE ; 58 58 sc_signal<Tlsq_ptr_t > *** in_ISSUE_IN_STORE_QUEUE_PTR_WRITE ; 59 sc_signal<Tlsq_ptr_t > *** in_ISSUE_IN_STORE_QUEUE_PTR_READ ; 60 sc_signal<Tcontrol_t > *** in_ISSUE_IN_STORE_QUEUE_EMPTY ; 59 61 sc_signal<Tlsq_ptr_t > *** in_ISSUE_IN_LOAD_QUEUE_PTR_WRITE ; 60 62 sc_signal<Tcontrol_t > *** in_ISSUE_IN_HAS_IMMEDIAT ; … … 78 80 sc_signal<Ttype_t > ** in_REEXECUTE_TYPE ; 79 81 sc_signal<Tlsq_ptr_t > ** in_REEXECUTE_STORE_QUEUE_PTR_WRITE; 82 sc_signal<Tlsq_ptr_t > ** in_REEXECUTE_STORE_QUEUE_PTR_READ ; 83 sc_signal<Tcontrol_t > ** in_REEXECUTE_STORE_QUEUE_EMPTY ; 80 84 sc_signal<Tlsq_ptr_t > ** in_REEXECUTE_LOAD_QUEUE_PTR_WRITE ; 81 85 sc_signal<Tcontrol_t > ** in_REEXECUTE_HAS_IMMEDIAT ; … … 99 103 sc_signal<Ttype_t > ** out_ISSUE_OUT_TYPE ; 100 104 sc_signal<Tlsq_ptr_t > ** out_ISSUE_OUT_STORE_QUEUE_PTR_WRITE; 105 sc_signal<Tlsq_ptr_t > ** out_ISSUE_OUT_STORE_QUEUE_PTR_READ ; 106 sc_signal<Tcontrol_t > ** out_ISSUE_OUT_STORE_QUEUE_EMPTY ; 101 107 sc_signal<Tlsq_ptr_t > ** out_ISSUE_OUT_LOAD_QUEUE_PTR_WRITE ; 102 108 sc_signal<Tcontrol_t > ** out_ISSUE_OUT_HAS_IMMEDIAT ; … … 121 127 ALLOC2_SC_SIGNAL( in_ISSUE_IN_TYPE ," in_ISSUE_IN_TYPE ",Ttype_t ,_param->_nb_rename_unit,_param->_nb_inst_rename[it1]); 122 128 ALLOC2_SC_SIGNAL( in_ISSUE_IN_STORE_QUEUE_PTR_WRITE ," in_ISSUE_IN_STORE_QUEUE_PTR_WRITE ",Tlsq_ptr_t ,_param->_nb_rename_unit,_param->_nb_inst_rename[it1]); 129 ALLOC2_SC_SIGNAL( in_ISSUE_IN_STORE_QUEUE_PTR_READ ," in_ISSUE_IN_STORE_QUEUE_PTR_READ ",Tlsq_ptr_t ,_param->_nb_rename_unit,_param->_nb_inst_rename[it1]); 130 ALLOC2_SC_SIGNAL( in_ISSUE_IN_STORE_QUEUE_EMPTY ," in_ISSUE_IN_STORE_QUEUE_EMPTY ",Tcontrol_t ,_param->_nb_rename_unit,_param->_nb_inst_rename[it1]); 123 131 ALLOC2_SC_SIGNAL( in_ISSUE_IN_LOAD_QUEUE_PTR_WRITE ," in_ISSUE_IN_LOAD_QUEUE_PTR_WRITE ",Tlsq_ptr_t ,_param->_nb_rename_unit,_param->_nb_inst_rename[it1]); 124 132 ALLOC2_SC_SIGNAL( in_ISSUE_IN_HAS_IMMEDIAT ," in_ISSUE_IN_HAS_IMMEDIAT ",Tcontrol_t ,_param->_nb_rename_unit,_param->_nb_inst_rename[it1]); … … 142 150 ALLOC1_SC_SIGNAL( in_REEXECUTE_TYPE ," in_REEXECUTE_TYPE ",Ttype_t ,_param->_nb_inst_reexecute); 143 151 ALLOC1_SC_SIGNAL( in_REEXECUTE_STORE_QUEUE_PTR_WRITE," in_REEXECUTE_STORE_QUEUE_PTR_WRITE",Tlsq_ptr_t ,_param->_nb_inst_reexecute); 152 ALLOC1_SC_SIGNAL( in_REEXECUTE_STORE_QUEUE_PTR_READ ," in_REEXECUTE_STORE_QUEUE_PTR_READ ",Tlsq_ptr_t ,_param->_nb_inst_reexecute); 153 ALLOC1_SC_SIGNAL( in_REEXECUTE_STORE_QUEUE_EMPTY ," in_REEXECUTE_STORE_QUEUE_EMPTY ",Tcontrol_t ,_param->_nb_inst_reexecute); 144 154 ALLOC1_SC_SIGNAL( in_REEXECUTE_LOAD_QUEUE_PTR_WRITE ," in_REEXECUTE_LOAD_QUEUE_PTR_WRITE ",Tlsq_ptr_t ,_param->_nb_inst_reexecute); 145 155 ALLOC1_SC_SIGNAL( in_REEXECUTE_HAS_IMMEDIAT ," in_REEXECUTE_HAS_IMMEDIAT ",Tcontrol_t ,_param->_nb_inst_reexecute); … … 163 173 ALLOC1_SC_SIGNAL(out_ISSUE_OUT_TYPE ,"out_ISSUE_OUT_TYPE ",Ttype_t ,_param->_nb_inst_issue); 164 174 ALLOC1_SC_SIGNAL(out_ISSUE_OUT_STORE_QUEUE_PTR_WRITE,"out_ISSUE_OUT_STORE_QUEUE_PTR_WRITE",Tlsq_ptr_t ,_param->_nb_inst_issue); 175 ALLOC1_SC_SIGNAL(out_ISSUE_OUT_STORE_QUEUE_PTR_READ ,"out_ISSUE_OUT_STORE_QUEUE_PTR_READ ",Tlsq_ptr_t ,_param->_nb_inst_issue); 176 ALLOC1_SC_SIGNAL(out_ISSUE_OUT_STORE_QUEUE_EMPTY ,"out_ISSUE_OUT_STORE_QUEUE_EMPTY ",Tcontrol_t ,_param->_nb_inst_issue); 165 177 ALLOC1_SC_SIGNAL(out_ISSUE_OUT_LOAD_QUEUE_PTR_WRITE ,"out_ISSUE_OUT_LOAD_QUEUE_PTR_WRITE ",Tlsq_ptr_t ,_param->_nb_inst_issue); 166 178 ALLOC1_SC_SIGNAL(out_ISSUE_OUT_HAS_IMMEDIAT ,"out_ISSUE_OUT_HAS_IMMEDIAT ",Tcontrol_t ,_param->_nb_inst_issue); … … 197 209 INSTANCE2_SC_SIGNAL(_Issue_queue, in_ISSUE_IN_TYPE ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1]); 198 210 INSTANCE2_SC_SIGNAL(_Issue_queue, in_ISSUE_IN_STORE_QUEUE_PTR_WRITE ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1]); 211 INSTANCE2_SC_SIGNAL(_Issue_queue, in_ISSUE_IN_STORE_QUEUE_PTR_READ ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1]); 212 INSTANCE2_SC_SIGNAL(_Issue_queue, in_ISSUE_IN_STORE_QUEUE_EMPTY ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1]); 199 213 if (_param->_have_port_load_queue_ptr) 200 214 INSTANCE2_SC_SIGNAL(_Issue_queue, in_ISSUE_IN_LOAD_QUEUE_PTR_WRITE ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1]); … … 223 237 INSTANCE1_SC_SIGNAL(_Issue_queue, in_REEXECUTE_TYPE ,_param->_nb_inst_reexecute); 224 238 INSTANCE1_SC_SIGNAL(_Issue_queue, in_REEXECUTE_STORE_QUEUE_PTR_WRITE,_param->_nb_inst_reexecute); 239 INSTANCE1_SC_SIGNAL(_Issue_queue, in_REEXECUTE_STORE_QUEUE_PTR_READ ,_param->_nb_inst_reexecute); 240 INSTANCE1_SC_SIGNAL(_Issue_queue, in_REEXECUTE_STORE_QUEUE_EMPTY ,_param->_nb_inst_reexecute); 225 241 if (_param->_have_port_load_queue_ptr) 226 242 INSTANCE1_SC_SIGNAL(_Issue_queue, in_REEXECUTE_LOAD_QUEUE_PTR_WRITE ,_param->_nb_inst_reexecute); … … 249 265 INSTANCE1_SC_SIGNAL(_Issue_queue,out_ISSUE_OUT_TYPE ,_param->_nb_inst_issue); 250 266 INSTANCE1_SC_SIGNAL(_Issue_queue,out_ISSUE_OUT_STORE_QUEUE_PTR_WRITE,_param->_nb_inst_issue); 267 INSTANCE1_SC_SIGNAL(_Issue_queue,out_ISSUE_OUT_STORE_QUEUE_PTR_READ ,_param->_nb_inst_issue); 268 INSTANCE1_SC_SIGNAL(_Issue_queue,out_ISSUE_OUT_STORE_QUEUE_EMPTY ,_param->_nb_inst_issue); 251 269 if (_param->_have_port_load_queue_ptr) 252 270 INSTANCE1_SC_SIGNAL(_Issue_queue,out_ISSUE_OUT_LOAD_QUEUE_PTR_WRITE ,_param->_nb_inst_issue); … … 423 441 DELETE2_SC_SIGNAL( in_ISSUE_IN_TYPE ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1]); 424 442 DELETE2_SC_SIGNAL( in_ISSUE_IN_STORE_QUEUE_PTR_WRITE ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1]); 443 DELETE2_SC_SIGNAL( in_ISSUE_IN_STORE_QUEUE_PTR_READ ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1]); 444 DELETE2_SC_SIGNAL( in_ISSUE_IN_STORE_QUEUE_EMPTY ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1]); 425 445 DELETE2_SC_SIGNAL( in_ISSUE_IN_LOAD_QUEUE_PTR_WRITE ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1]); 426 446 DELETE2_SC_SIGNAL( in_ISSUE_IN_HAS_IMMEDIAT ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1]); … … 445 465 DELETE1_SC_SIGNAL( in_REEXECUTE_TYPE ,_param->_nb_inst_reexecute); 446 466 DELETE1_SC_SIGNAL( in_REEXECUTE_STORE_QUEUE_PTR_WRITE,_param->_nb_inst_reexecute); 467 DELETE1_SC_SIGNAL( in_REEXECUTE_STORE_QUEUE_PTR_READ ,_param->_nb_inst_reexecute); 468 DELETE1_SC_SIGNAL( in_REEXECUTE_STORE_QUEUE_EMPTY ,_param->_nb_inst_reexecute); 447 469 DELETE1_SC_SIGNAL( in_REEXECUTE_LOAD_QUEUE_PTR_WRITE ,_param->_nb_inst_reexecute); 448 470 DELETE1_SC_SIGNAL( in_REEXECUTE_HAS_IMMEDIAT ,_param->_nb_inst_reexecute); … … 467 489 DELETE1_SC_SIGNAL(out_ISSUE_OUT_TYPE ,_param->_nb_inst_issue); 468 490 DELETE1_SC_SIGNAL(out_ISSUE_OUT_STORE_QUEUE_PTR_WRITE,_param->_nb_inst_issue); 491 DELETE1_SC_SIGNAL(out_ISSUE_OUT_STORE_QUEUE_PTR_READ ,_param->_nb_inst_issue); 492 DELETE1_SC_SIGNAL(out_ISSUE_OUT_STORE_QUEUE_EMPTY ,_param->_nb_inst_issue); 469 493 DELETE1_SC_SIGNAL(out_ISSUE_OUT_LOAD_QUEUE_PTR_WRITE ,_param->_nb_inst_issue); 470 494 DELETE1_SC_SIGNAL(out_ISSUE_OUT_HAS_IMMEDIAT ,_param->_nb_inst_issue); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_allocation.cpp
r122 r128 156 156 157 157 // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 158 ALLOC1(internal_BANK_IN_ACK ,Tcontrol_t,_param->_nb_bank);159 ALLOC1(internal_BANK_IN_NUM_RENAME_UNIT ,uint32_t ,_param->_nb_bank);160 ALLOC1(internal_BANK_IN_NUM_INST ,uint32_t ,_param->_nb_bank);161 162 158 ALLOC1(internal_ISSUE_OUT_VAL ,Tcontrol_t,_param->_nb_inst_issue); 163 159 ALLOC1(internal_ISSUE_OUT_FROM_REEXECUTE,Tcontrol_t,_param->_nb_inst_issue); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_deallocation.cpp
r122 r128 101 101 102 102 // ~~~~~[ Registers ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 103 while (not _reexecute_queue.empty()) 104 { 105 delete _reexecute_queue.front(); 106 _reexecute_queue.pop_front(); 107 } 108 103 109 DELETE1(_issue_queue ,_param->_nb_bank); 104 110 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_function_in_order_transition.cpp
r122 r128 105 105 log_printf(TRACE,Issue_queue,FUNCTION," * ISSUE_OUT [%d] - From issue_queue [%d]",i,num_bank); 106 106 107 delete entry; 108 107 109 _issue_queue [num_bank].remove(entry); 108 110 109 111 reg_NUM_BANK_HEAD = (reg_NUM_BANK_HEAD+1)%_param->_nb_bank; 110 111 delete entry;112 112 } 113 113 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_function_out_of_order_transition.cpp
r122 r128 101 101 log_printf(TRACE,Issue_queue,FUNCTION," * ISSUE_OUT [%d] - From issue_queue [%d]",i,num_bank); 102 102 103 delete entry; 104 103 105 _issue_queue [num_bank].remove(entry); 104 delete entry;105 106 } 106 107 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/OOO_Engine_Glue/SelfTest/src/main.cpp
r88 r128 108 108 109 109 test (name,param); 110 111 delete param; 110 112 } 111 113 catch (morpheo::ErrorMorpheo & error) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/OOO_Engine_Glue/SelfTest/src/test.cpp
r121 r128 48 48 sc_signal<Tcontrol_t> * in_NRESET = new sc_signal<Tcontrol_t> ("NRESET"); 49 49 50 sc_signal<Tcontext_t > *** in_RENAME_FRONT_END_ID ; 51 sc_signal<Tcontext_t > *** out_RENAME_RENAME_UNIT_FRONT_END_ID ; 52 53 sc_signal<Tcontrol_t > ** out_INSERT_VAL ; 54 sc_signal<Tcontrol_t > ** in_INSERT_ACK ; 55 sc_signal<Tcontrol_t > ** out_INSERT_RD_USE ; 56 sc_signal<Tgeneral_address_t > ** out_INSERT_RD_NUM_REG ; 57 sc_signal<Tcontrol_t > ** out_INSERT_RE_USE ; 58 sc_signal<Tspecial_address_t > ** out_INSERT_RE_NUM_REG ; 59 60 sc_signal<Tcontrol_t > *** in_INSERT_RENAME_UNIT_VAL ; 61 sc_signal<Tcontrol_t > *** out_INSERT_RENAME_UNIT_ACK ; 62 sc_signal<Tcontext_t > *** in_INSERT_RENAME_UNIT_FRONT_END_ID ; 63 sc_signal<Tcontext_t > *** in_INSERT_RENAME_UNIT_CONTEXT_ID ; 64 sc_signal<Ttype_t > *** in_INSERT_RENAME_UNIT_TYPE ; 65 sc_signal<Toperation_t > *** in_INSERT_RENAME_UNIT_OPERATION ; 66 sc_signal<Tcontrol_t > *** in_INSERT_RENAME_UNIT_NO_EXECUTE ; 67 sc_signal<Tcontrol_t > *** in_INSERT_RENAME_UNIT_HAS_IMMEDIAT ; 68 sc_signal<Tgeneral_data_t > *** in_INSERT_RENAME_UNIT_IMMEDIAT ; 69 sc_signal<Tlsq_ptr_t > *** in_INSERT_RENAME_UNIT_STORE_QUEUE_PTR_WRITE; 70 sc_signal<Tlsq_ptr_t > *** in_INSERT_RENAME_UNIT_STORE_QUEUE_PTR_READ ; 71 sc_signal<Tcontrol_t > *** in_INSERT_RENAME_UNIT_STORE_QUEUE_EMPTY ; 72 sc_signal<Tlsq_ptr_t > *** in_INSERT_RENAME_UNIT_LOAD_QUEUE_PTR_WRITE ; 73 sc_signal<Tcontrol_t > *** in_INSERT_RENAME_UNIT_READ_RA ; 74 sc_signal<Tgeneral_address_t > *** in_INSERT_RENAME_UNIT_NUM_REG_RA_PHY ; 75 sc_signal<Tcontrol_t > *** in_INSERT_RENAME_UNIT_READ_RB ; 76 sc_signal<Tgeneral_address_t > *** in_INSERT_RENAME_UNIT_NUM_REG_RB_PHY ; 77 sc_signal<Tcontrol_t > *** in_INSERT_RENAME_UNIT_READ_RC ; 78 sc_signal<Tspecial_address_t > *** in_INSERT_RENAME_UNIT_NUM_REG_RC_PHY ; 79 sc_signal<Tcontrol_t > *** in_INSERT_RENAME_UNIT_WRITE_RD ; 80 sc_signal<Tgeneral_address_t > *** in_INSERT_RENAME_UNIT_NUM_REG_RD_PHY_OLD ; 81 sc_signal<Tgeneral_address_t > *** in_INSERT_RENAME_UNIT_NUM_REG_RD_PHY_NEW ; 82 sc_signal<Tcontrol_t > *** in_INSERT_RENAME_UNIT_WRITE_RE ; 83 sc_signal<Tspecial_address_t > *** in_INSERT_RENAME_UNIT_NUM_REG_RE_PHY_OLD ; 84 sc_signal<Tspecial_address_t > *** in_INSERT_RENAME_UNIT_NUM_REG_RE_PHY_NEW ; 85 86 sc_signal<Tcontrol_t > *** out_INSERT_COMMIT_UNIT_VAL ; 87 sc_signal<Tcontrol_t > *** in_INSERT_COMMIT_UNIT_ACK ; 88 sc_signal<Tcontext_t > *** out_INSERT_COMMIT_UNIT_FRONT_END_ID ; 89 sc_signal<Tcontext_t > *** out_INSERT_COMMIT_UNIT_CONTEXT_ID ; 90 //sc_signal<Tcontext_t > *** out_INSERT_COMMIT_UNIT_RENAME_UNIT_ID ; 91 sc_signal<Ttype_t > *** out_INSERT_COMMIT_UNIT_TYPE ; 92 sc_signal<Toperation_t > *** out_INSERT_COMMIT_UNIT_OPERATION ; 93 sc_signal<Tcontrol_t > *** out_INSERT_COMMIT_UNIT_NO_EXECUTE ; 94 sc_signal<Tlsq_ptr_t > *** out_INSERT_COMMIT_UNIT_STORE_QUEUE_PTR_WRITE; 95 // sc_signal<Tlsq_ptr_t > *** out_INSERT_COMMIT_UNIT_STORE_QUEUE_PTR_READ ; 96 // sc_signal<Tcontrol_t > *** out_INSERT_COMMIT_UNIT_STORE_QUEUE_EMPTY ; 97 sc_signal<Tlsq_ptr_t > *** out_INSERT_COMMIT_UNIT_LOAD_QUEUE_PTR_WRITE ; 98 sc_signal<Tcontrol_t > *** out_INSERT_COMMIT_UNIT_READ_RA ; 99 sc_signal<Tgeneral_address_t > *** out_INSERT_COMMIT_UNIT_NUM_REG_RA_PHY ; 100 sc_signal<Tcontrol_t > *** out_INSERT_COMMIT_UNIT_READ_RB ; 101 sc_signal<Tgeneral_address_t > *** out_INSERT_COMMIT_UNIT_NUM_REG_RB_PHY ; 102 sc_signal<Tcontrol_t > *** out_INSERT_COMMIT_UNIT_READ_RC ; 103 sc_signal<Tspecial_address_t > *** out_INSERT_COMMIT_UNIT_NUM_REG_RC_PHY ; 104 sc_signal<Tcontrol_t > *** out_INSERT_COMMIT_UNIT_WRITE_RD ; 105 sc_signal<Tgeneral_address_t > *** out_INSERT_COMMIT_UNIT_NUM_REG_RD_PHY_OLD ; 106 sc_signal<Tgeneral_address_t > *** out_INSERT_COMMIT_UNIT_NUM_REG_RD_PHY_NEW ; 107 sc_signal<Tcontrol_t > *** out_INSERT_COMMIT_UNIT_WRITE_RE ; 108 sc_signal<Tspecial_address_t > *** out_INSERT_COMMIT_UNIT_NUM_REG_RE_PHY_OLD ; 109 sc_signal<Tspecial_address_t > *** out_INSERT_COMMIT_UNIT_NUM_REG_RE_PHY_NEW ; 110 111 sc_signal<Tcontrol_t > *** out_INSERT_ISSUE_QUEUE_VAL ; 112 sc_signal<Tcontrol_t > *** in_INSERT_ISSUE_QUEUE_ACK ; 113 sc_signal<Tcontext_t > *** out_INSERT_ISSUE_QUEUE_CONTEXT_ID ; 114 sc_signal<Tcontext_t > *** out_INSERT_ISSUE_QUEUE_FRONT_END_ID ; 115 sc_signal<Toperation_t > *** out_INSERT_ISSUE_QUEUE_OPERATION ; 116 sc_signal<Ttype_t > *** out_INSERT_ISSUE_QUEUE_TYPE ; 117 sc_signal<Tlsq_ptr_t > *** out_INSERT_ISSUE_QUEUE_STORE_QUEUE_PTR_WRITE; 118 sc_signal<Tlsq_ptr_t > *** out_INSERT_ISSUE_QUEUE_STORE_QUEUE_PTR_READ ; 119 sc_signal<Tcontrol_t > *** out_INSERT_ISSUE_QUEUE_STORE_QUEUE_EMPTY ; 120 sc_signal<Tlsq_ptr_t > *** out_INSERT_ISSUE_QUEUE_LOAD_QUEUE_PTR_WRITE ; 121 sc_signal<Tcontrol_t > *** out_INSERT_ISSUE_QUEUE_HAS_IMMEDIAT ; 122 sc_signal<Tgeneral_data_t > *** out_INSERT_ISSUE_QUEUE_IMMEDIAT ; 123 sc_signal<Tcontrol_t > *** out_INSERT_ISSUE_QUEUE_READ_RA ; 124 sc_signal<Tgeneral_address_t > *** out_INSERT_ISSUE_QUEUE_NUM_REG_RA ; 125 sc_signal<Tcontrol_t > *** out_INSERT_ISSUE_QUEUE_READ_RB ; 126 sc_signal<Tgeneral_address_t > *** out_INSERT_ISSUE_QUEUE_NUM_REG_RB ; 127 sc_signal<Tcontrol_t > *** out_INSERT_ISSUE_QUEUE_READ_RC ; 128 sc_signal<Tspecial_address_t > *** out_INSERT_ISSUE_QUEUE_NUM_REG_RC ; 129 sc_signal<Tcontrol_t > *** out_INSERT_ISSUE_QUEUE_WRITE_RD ; 130 sc_signal<Tgeneral_address_t > *** out_INSERT_ISSUE_QUEUE_NUM_REG_RD ; 131 sc_signal<Tcontrol_t > *** out_INSERT_ISSUE_QUEUE_WRITE_RE ; 132 sc_signal<Tspecial_address_t > *** out_INSERT_ISSUE_QUEUE_NUM_REG_RE ; 133 134 //sc_signal<Tcontrol_t > ** out_RETIRE_VAL ; 135 //sc_signal<Tcontrol_t > ** in_RETIRE_ACK ; 136 //sc_signal<Tcontrol_t > ** out_RETIRE_RD_OLD_USE ; 137 //sc_signal<Tgeneral_address_t > ** out_RETIRE_RD_OLD_NUM_REG ; 138 //sc_signal<Tcontrol_t > ** out_RETIRE_RD_NEW_USE ; 139 //sc_signal<Tgeneral_address_t > ** out_RETIRE_RD_NEW_NUM_REG ; 140 //sc_signal<Tcontrol_t > ** out_RETIRE_RE_OLD_USE ; 141 //sc_signal<Tspecial_address_t > ** out_RETIRE_RE_OLD_NUM_REG ; 142 //sc_signal<Tcontrol_t > ** out_RETIRE_RE_NEW_USE ; 143 //sc_signal<Tspecial_address_t > ** out_RETIRE_RE_NEW_NUM_REG ; 144 145 //sc_signal<Tcontrol_t > *** out_RETIRE_RENAME_UNIT_VAL ; 146 //sc_signal<Tcontrol_t > *** in_RETIRE_RENAME_UNIT_ACK ; 147 //sc_signal<Tcontext_t > *** out_RETIRE_RENAME_UNIT_FRONT_END_ID ; 148 //sc_signal<Tcontrol_t > *** out_RETIRE_RENAME_UNIT_WRITE_RD ; 149 //sc_signal<Tgeneral_address_t > *** out_RETIRE_RENAME_UNIT_NUM_REG_RD_PHY_OLD ; 150 //sc_signal<Tgeneral_address_t > *** out_RETIRE_RENAME_UNIT_NUM_REG_RD_PHY_NEW ; 151 //sc_signal<Tcontrol_t > *** out_RETIRE_RENAME_UNIT_WRITE_RE ; 152 //sc_signal<Tspecial_address_t > *** out_RETIRE_RENAME_UNIT_NUM_REG_RE_PHY_OLD ; 153 //sc_signal<Tspecial_address_t > *** out_RETIRE_RENAME_UNIT_NUM_REG_RE_PHY_NEW ; 154 //sc_signal<Tevent_state_t > *** out_RETIRE_RENAME_UNIT_EVENT_STATE ; 155 156 //sc_signal<Tcontrol_t > *** in_RETIRE_COMMIT_UNIT_VAL ; 157 //sc_signal<Tcontrol_t > *** out_RETIRE_COMMIT_UNIT_ACK ; 158 //sc_signal<Tcontext_t > *** in_RETIRE_COMMIT_UNIT_FRONT_END_ID ; 159 //sc_signal<Tcontrol_t > *** in_RETIRE_COMMIT_UNIT_WRITE_RD ; 160 //sc_signal<Tgeneral_address_t > *** in_RETIRE_COMMIT_UNIT_NUM_REG_RD_PHY_OLD ; 161 //sc_signal<Tgeneral_address_t > *** in_RETIRE_COMMIT_UNIT_NUM_REG_RD_PHY_NEW ; 162 //sc_signal<Tcontrol_t > *** in_RETIRE_COMMIT_UNIT_WRITE_RE ; 163 //sc_signal<Tspecial_address_t > *** in_RETIRE_COMMIT_UNIT_NUM_REG_RE_PHY_OLD ; 164 //sc_signal<Tspecial_address_t > *** in_RETIRE_COMMIT_UNIT_NUM_REG_RE_PHY_NEW ; 165 //sc_signal<Tevent_state_t > *** in_RETIRE_COMMIT_UNIT_EVENT_STATE ; 166 167 sc_signal<Tcontrol_t > *** out_SPR_SR_IEE ; 168 sc_signal<Tcontrol_t > *** out_SPR_SR_EPH ; 169 sc_signal<Tspr_t > *** out_SPR_RENAME_UNIT_SR ; 170 sc_signal<Tcontrol_t > *** out_SPR_COMMIT_UNIT_SR_OVE ; 171 sc_signal<Tspr_t > *** in_SPR_SPECIAL_REGISTER_UNIT_SR ; 172 50 173 ALLOC2_SC_SIGNAL( in_RENAME_FRONT_END_ID ," in_RENAME_FRONT_END_ID ",Tcontext_t ,_param->_nb_front_end,_param->_nb_inst_decod[it1]); 51 174 ALLOC2_SC_SIGNAL(out_RENAME_RENAME_UNIT_FRONT_END_ID ,"out_RENAME_RENAME_UNIT_FRONT_END_ID ",Tcontext_t ,_param->_nb_front_end,_param->_nb_inst_decod[it1]); … … 68 191 ALLOC2_SC_SIGNAL( in_INSERT_RENAME_UNIT_IMMEDIAT ," in_INSERT_RENAME_UNIT_IMMEDIAT ",Tgeneral_data_t ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 69 192 ALLOC2_SC_SIGNAL( in_INSERT_RENAME_UNIT_STORE_QUEUE_PTR_WRITE," in_INSERT_RENAME_UNIT_STORE_QUEUE_PTR_WRITE",Tlsq_ptr_t ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 193 ALLOC2_SC_SIGNAL( in_INSERT_RENAME_UNIT_STORE_QUEUE_PTR_READ ," in_INSERT_RENAME_UNIT_STORE_QUEUE_PTR_READ ",Tlsq_ptr_t ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 194 ALLOC2_SC_SIGNAL( in_INSERT_RENAME_UNIT_STORE_QUEUE_EMPTY ," in_INSERT_RENAME_UNIT_STORE_QUEUE_EMPTY ",Tcontrol_t ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 70 195 ALLOC2_SC_SIGNAL( in_INSERT_RENAME_UNIT_LOAD_QUEUE_PTR_WRITE ," in_INSERT_RENAME_UNIT_LOAD_QUEUE_PTR_WRITE ",Tlsq_ptr_t ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 71 196 ALLOC2_SC_SIGNAL( in_INSERT_RENAME_UNIT_READ_RA ," in_INSERT_RENAME_UNIT_READ_RA ",Tcontrol_t ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); … … 91 216 ALLOC2_SC_SIGNAL(out_INSERT_COMMIT_UNIT_NO_EXECUTE ,"out_INSERT_COMMIT_UNIT_NO_EXECUTE ",Tcontrol_t ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 92 217 ALLOC2_SC_SIGNAL(out_INSERT_COMMIT_UNIT_STORE_QUEUE_PTR_WRITE,"out_INSERT_COMMIT_UNIT_STORE_QUEUE_PTR_WRITE",Tlsq_ptr_t ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 218 // ALLOC2_SC_SIGNAL(out_INSERT_COMMIT_UNIT_STORE_QUEUE_PTR_READ ,"out_INSERT_COMMIT_UNIT_STORE_QUEUE_PTR_READ ",Tlsq_ptr_t ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 219 // ALLOC2_SC_SIGNAL(out_INSERT_COMMIT_UNIT_STORE_QUEUE_EMPTY ,"out_INSERT_COMMIT_UNIT_STORE_QUEUE_EMPTY ",Tcontrol_t ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 93 220 ALLOC2_SC_SIGNAL(out_INSERT_COMMIT_UNIT_LOAD_QUEUE_PTR_WRITE ,"out_INSERT_COMMIT_UNIT_LOAD_QUEUE_PTR_WRITE ",Tlsq_ptr_t ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 94 221 ALLOC2_SC_SIGNAL(out_INSERT_COMMIT_UNIT_READ_RA ,"out_INSERT_COMMIT_UNIT_READ_RA ",Tcontrol_t ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); … … 112 239 ALLOC2_SC_SIGNAL(out_INSERT_ISSUE_QUEUE_TYPE ,"out_INSERT_ISSUE_QUEUE_TYPE ",Ttype_t ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 113 240 ALLOC2_SC_SIGNAL(out_INSERT_ISSUE_QUEUE_STORE_QUEUE_PTR_WRITE,"out_INSERT_ISSUE_QUEUE_STORE_QUEUE_PTR_WRITE",Tlsq_ptr_t ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 241 ALLOC2_SC_SIGNAL(out_INSERT_ISSUE_QUEUE_STORE_QUEUE_PTR_READ ,"out_INSERT_ISSUE_QUEUE_STORE_QUEUE_PTR_READ ",Tlsq_ptr_t ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 242 ALLOC2_SC_SIGNAL(out_INSERT_ISSUE_QUEUE_STORE_QUEUE_EMPTY ,"out_INSERT_ISSUE_QUEUE_STORE_QUEUE_EMPTY ",Tcontrol_t ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 114 243 ALLOC2_SC_SIGNAL(out_INSERT_ISSUE_QUEUE_LOAD_QUEUE_PTR_WRITE ,"out_INSERT_ISSUE_QUEUE_LOAD_QUEUE_PTR_WRITE ",Tlsq_ptr_t ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 115 244 ALLOC2_SC_SIGNAL(out_INSERT_ISSUE_QUEUE_HAS_IMMEDIAT ,"out_INSERT_ISSUE_QUEUE_HAS_IMMEDIAT ",Tcontrol_t ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); … … 199 328 INSTANCE2_SC_SIGNAL(_OOO_Engine_Glue, in_INSERT_RENAME_UNIT_IMMEDIAT ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 200 329 INSTANCE2_SC_SIGNAL(_OOO_Engine_Glue, in_INSERT_RENAME_UNIT_STORE_QUEUE_PTR_WRITE ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 330 INSTANCE2_SC_SIGNAL(_OOO_Engine_Glue, in_INSERT_RENAME_UNIT_STORE_QUEUE_PTR_READ ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 331 INSTANCE2_SC_SIGNAL(_OOO_Engine_Glue, in_INSERT_RENAME_UNIT_STORE_QUEUE_EMPTY ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 201 332 if (_param->_have_port_load_queue_ptr) 202 333 INSTANCE2_SC_SIGNAL(_OOO_Engine_Glue, in_INSERT_RENAME_UNIT_LOAD_QUEUE_PTR_WRITE ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); … … 225 356 INSTANCE2_SC_SIGNAL(_OOO_Engine_Glue,out_INSERT_COMMIT_UNIT_NO_EXECUTE ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 226 357 INSTANCE2_SC_SIGNAL(_OOO_Engine_Glue,out_INSERT_COMMIT_UNIT_STORE_QUEUE_PTR_WRITE ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 358 // INSTANCE2_SC_SIGNAL(_OOO_Engine_Glue,out_INSERT_COMMIT_UNIT_STORE_QUEUE_PTR_READ ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 359 // INSTANCE2_SC_SIGNAL(_OOO_Engine_Glue,out_INSERT_COMMIT_UNIT_STORE_QUEUE_EMPTY ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 227 360 if (_param->_have_port_load_queue_ptr) 228 361 INSTANCE2_SC_SIGNAL(_OOO_Engine_Glue,out_INSERT_COMMIT_UNIT_LOAD_QUEUE_PTR_WRITE ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); … … 251 384 INSTANCE2_SC_SIGNAL(_OOO_Engine_Glue,out_INSERT_ISSUE_QUEUE_TYPE ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 252 385 INSTANCE2_SC_SIGNAL(_OOO_Engine_Glue,out_INSERT_ISSUE_QUEUE_STORE_QUEUE_PTR_WRITE ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 386 INSTANCE2_SC_SIGNAL(_OOO_Engine_Glue,out_INSERT_ISSUE_QUEUE_STORE_QUEUE_PTR_READ ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 387 INSTANCE2_SC_SIGNAL(_OOO_Engine_Glue,out_INSERT_ISSUE_QUEUE_STORE_QUEUE_EMPTY ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 253 388 if (_param->_have_port_load_queue_ptr) 254 389 INSTANCE2_SC_SIGNAL(_OOO_Engine_Glue,out_INSERT_ISSUE_QUEUE_LOAD_QUEUE_PTR_WRITE ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); … … 399 534 DELETE2_SC_SIGNAL( in_INSERT_RENAME_UNIT_IMMEDIAT ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 400 535 DELETE2_SC_SIGNAL( in_INSERT_RENAME_UNIT_STORE_QUEUE_PTR_WRITE ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 536 DELETE2_SC_SIGNAL( in_INSERT_RENAME_UNIT_STORE_QUEUE_PTR_READ ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 537 DELETE2_SC_SIGNAL( in_INSERT_RENAME_UNIT_STORE_QUEUE_EMPTY ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 401 538 DELETE2_SC_SIGNAL( in_INSERT_RENAME_UNIT_LOAD_QUEUE_PTR_WRITE ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 402 539 DELETE2_SC_SIGNAL( in_INSERT_RENAME_UNIT_READ_RA ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); … … 422 559 DELETE2_SC_SIGNAL(out_INSERT_COMMIT_UNIT_NO_EXECUTE ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 423 560 DELETE2_SC_SIGNAL(out_INSERT_COMMIT_UNIT_STORE_QUEUE_PTR_WRITE ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 561 // DELETE2_SC_SIGNAL(out_INSERT_COMMIT_UNIT_STORE_QUEUE_PTR_READ ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 562 // DELETE2_SC_SIGNAL(out_INSERT_COMMIT_UNIT_STORE_QUEUE_EMPTY ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 424 563 DELETE2_SC_SIGNAL(out_INSERT_COMMIT_UNIT_LOAD_QUEUE_PTR_WRITE ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 425 564 DELETE2_SC_SIGNAL(out_INSERT_COMMIT_UNIT_READ_RA ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); … … 443 582 DELETE2_SC_SIGNAL(out_INSERT_ISSUE_QUEUE_TYPE ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 444 583 DELETE2_SC_SIGNAL(out_INSERT_ISSUE_QUEUE_STORE_QUEUE_PTR_WRITE ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 584 DELETE2_SC_SIGNAL(out_INSERT_ISSUE_QUEUE_STORE_QUEUE_PTR_READ ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 585 DELETE2_SC_SIGNAL(out_INSERT_ISSUE_QUEUE_STORE_QUEUE_EMPTY ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 445 586 DELETE2_SC_SIGNAL(out_INSERT_ISSUE_QUEUE_LOAD_QUEUE_PTR_WRITE ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); 446 587 DELETE2_SC_SIGNAL(out_INSERT_ISSUE_QUEUE_HAS_IMMEDIAT ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/OOO_Engine_Glue/src/OOO_Engine_Glue_deallocation.cpp
r122 r128 71 71 DELETE2_SIGNAL(out_INSERT_COMMIT_UNIT_TYPE ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_type ); 72 72 DELETE2_SIGNAL(out_INSERT_COMMIT_UNIT_OPERATION ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_operation ); 73 DELETE2_SIGNAL(out_INSERT_COMMIT_UNIT_NO_EXECUTE ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],1); 73 74 DELETE2_SIGNAL(out_INSERT_COMMIT_UNIT_STORE_QUEUE_PTR_WRITE ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_store_queue_ptr ); 74 75 DELETE2_SIGNAL(out_INSERT_COMMIT_UNIT_LOAD_QUEUE_PTR_WRITE ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_load_queue_ptr ); … … 95 96 DELETE2_SIGNAL(out_INSERT_ISSUE_QUEUE_TYPE ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_type ); 96 97 DELETE2_SIGNAL(out_INSERT_ISSUE_QUEUE_STORE_QUEUE_PTR_WRITE ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_store_queue_ptr ); 98 DELETE2_SIGNAL(out_INSERT_ISSUE_QUEUE_STORE_QUEUE_PTR_READ ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_store_queue_ptr ); 99 DELETE2_SIGNAL(out_INSERT_ISSUE_QUEUE_STORE_QUEUE_EMPTY ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],1); 97 100 DELETE2_SIGNAL(out_INSERT_ISSUE_QUEUE_LOAD_QUEUE_PTR_WRITE ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_load_queue_ptr ); 98 101 DELETE2_SIGNAL(out_INSERT_ISSUE_QUEUE_HAS_IMMEDIAT ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],1 ); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/OOO_Engine_Glue/src/OOO_Engine_Glue_genMealy_insert.cpp
r123 r128 54 54 Tspecial_address_t NUM_REG_RE_PHY_NEW = PORT_READ(in_INSERT_RENAME_UNIT_NUM_REG_RE_PHY_NEW [i][j]); 55 55 56 Tgeneral_address_t general_address_msb = FRONT_END_ID<< _param->_size_general_register;57 Tspecial_address_t special_address_msb = FRONT_END_ID<< _param->_size_special_register;56 Tgeneral_address_t general_address_msb = i << _param->_size_general_register; 57 Tspecial_address_t special_address_msb = i << _param->_size_special_register; 58 58 59 59 PORT_WRITE(out_INSERT_RD_USE [x] ,WRITE_RD); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/OOO_Engine_Glue/src/Parameters.cpp
r109 r128 7 7 8 8 #include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/OOO_Engine_Glue/include/Parameters.h" 9 #include "Behavioural/include/Allocation.h" 9 10 #include "Common/include/Max.h" 10 11 #include "Common/include/BitManipulation.h" … … 61 62 } 62 63 63 _translate_front_end_id_to_rename_unit = new uint32_t [_nb_front_end];64 ALLOC1(_translate_front_end_id_to_rename_unit,uint32_t,_nb_front_end); 64 65 65 66 for (uint32_t i=0; i<_nb_front_end; i++) … … 119 120 { 120 121 log_begin(OOO_Engine_Glue,FUNCTION); 121 delete _translate_front_end_id_to_rename_unit; 122 123 DELETE1(_translate_front_end_id_to_rename_unit,_nb_front_end); 124 122 125 log_end(OOO_Engine_Glue,FUNCTION); 123 126 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Reexecute_unit/SelfTest/src/main.cpp
r88 r128 101 101 102 102 test (name,param); 103 104 delete param; 103 105 } 104 106 catch (morpheo::ErrorMorpheo & error) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Reexecute_unit/SelfTest/src/test.cpp
r117 r128 137 137 sc_signal<Tcontrol_t> * in_NRESET = new sc_signal<Tcontrol_t> ("NRESET"); 138 138 139 sc_signal<Tcontrol_t > *** in_EXECUTE_LOOP_VAL ; 140 sc_signal<Tcontrol_t > *** out_EXECUTE_LOOP_ACK ; 141 sc_signal<Tcontext_t > *** in_EXECUTE_LOOP_CONTEXT_ID ; 142 sc_signal<Tcontext_t > *** in_EXECUTE_LOOP_FRONT_END_ID ; 143 sc_signal<Tpacket_t > *** in_EXECUTE_LOOP_PACKET_ID ; 144 //sc_signal<Toperation_t > *** in_EXECUTE_LOOP_OPERATION ; 145 //sc_signal<Ttype_t > *** in_EXECUTE_LOOP_TYPE ; 146 sc_signal<Tspecial_data_t > *** in_EXECUTE_LOOP_FLAGS ; 147 sc_signal<Texception_t > *** in_EXECUTE_LOOP_EXCEPTION ; 148 sc_signal<Tcontrol_t > *** in_EXECUTE_LOOP_NO_SEQUENCE ; 149 sc_signal<Tgeneral_data_t > *** in_EXECUTE_LOOP_ADDRESS ; 150 sc_signal<Tgeneral_data_t > *** in_EXECUTE_LOOP_DATA ; 151 152 sc_signal<Tcontrol_t > ** out_COMMIT_VAL ; 153 sc_signal<Tcontrol_t > ** in_COMMIT_ACK ; 154 sc_signal<Tcontrol_t > ** out_COMMIT_WEN ; 155 sc_signal<Tcontext_t > ** out_COMMIT_CONTEXT_ID ; 156 sc_signal<Tcontext_t > ** out_COMMIT_FRONT_END_ID ; 157 sc_signal<Tpacket_t > ** out_COMMIT_PACKET_ID ; 158 //sc_signal<Toperation_t > ** out_COMMIT_OPERATION ; 159 //sc_signal<Ttype_t > ** out_COMMIT_TYPE ; 160 sc_signal<Tspecial_data_t > ** out_COMMIT_FLAGS ; 161 sc_signal<Texception_t > ** out_COMMIT_EXCEPTION ; 162 sc_signal<Tcontrol_t > ** out_COMMIT_NO_SEQUENCE ; 163 sc_signal<Tgeneral_data_t > ** out_COMMIT_ADDRESS ; 164 sc_signal<Tgeneral_address_t > ** in_COMMIT_NUM_REG_RD ; 165 166 sc_signal<Tcontrol_t > ** out_SPR_VAL ; 167 sc_signal<Tcontrol_t > ** in_SPR_ACK ; 168 sc_signal<Tcontrol_t > ** out_SPR_WEN ; 169 sc_signal<Tcontext_t > ** out_SPR_CONTEXT_ID ; 170 sc_signal<Tcontext_t > ** out_SPR_FRONT_END_ID ; 171 sc_signal<Tspr_address_t > ** out_SPR_NUM_GROUP ; 172 sc_signal<Tspr_address_t > ** out_SPR_NUM_REG ; 173 sc_signal<Tspr_t > ** out_SPR_WDATA ; 174 sc_signal<Tspr_t > ** in_SPR_RDATA ; 175 sc_signal<Tcontrol_t > ** in_SPR_INVALID ; 176 177 sc_signal<Tcontrol_t > ** in_REEXECUTE_ROB_VAL ; 178 sc_signal<Tcontrol_t > ** out_REEXECUTE_ROB_ACK ; 179 sc_signal<Tcontext_t > ** in_REEXECUTE_ROB_CONTEXT_ID ; 180 sc_signal<Tcontext_t > ** in_REEXECUTE_ROB_FRONT_END_ID ; 181 sc_signal<Tpacket_t > ** in_REEXECUTE_ROB_PACKET_ID ; 182 sc_signal<Toperation_t > ** in_REEXECUTE_ROB_OPERATION ; 183 sc_signal<Ttype_t > ** in_REEXECUTE_ROB_TYPE ; 184 sc_signal<Tlsq_ptr_t > ** in_REEXECUTE_ROB_STORE_QUEUE_PTR_WRITE ; 185 186 sc_signal<Tcontrol_t > ** out_REEXECUTE_VAL ; 187 sc_signal<Tcontrol_t > ** in_REEXECUTE_ACK ; 188 sc_signal<Tcontext_t > ** out_REEXECUTE_CONTEXT_ID ; 189 sc_signal<Tcontext_t > ** out_REEXECUTE_FRONT_END_ID ; 190 sc_signal<Tpacket_t > ** out_REEXECUTE_PACKET_ID ; 191 sc_signal<Toperation_t > ** out_REEXECUTE_OPERATION ; 192 sc_signal<Ttype_t > ** out_REEXECUTE_TYPE ; 193 sc_signal<Tlsq_ptr_t > ** out_REEXECUTE_STORE_QUEUE_PTR_WRITE ; 194 sc_signal<Tlsq_ptr_t > ** out_REEXECUTE_STORE_QUEUE_PTR_READ ; 195 sc_signal<Tcontrol_t > ** out_REEXECUTE_STORE_QUEUE_EMPTY ; 196 sc_signal<Tlsq_ptr_t > ** out_REEXECUTE_LOAD_QUEUE_PTR_WRITE ; 197 sc_signal<Tcontrol_t > ** out_REEXECUTE_HAS_IMMEDIAT ; 198 sc_signal<Tgeneral_data_t > ** out_REEXECUTE_IMMEDIAT ; 199 sc_signal<Tcontrol_t > ** out_REEXECUTE_READ_RA ; 200 sc_signal<Tgeneral_address_t > ** out_REEXECUTE_NUM_REG_RA ; 201 sc_signal<Tcontrol_t > ** out_REEXECUTE_READ_RB ; 202 sc_signal<Tgeneral_address_t > ** out_REEXECUTE_NUM_REG_RB ; 203 sc_signal<Tcontrol_t > ** out_REEXECUTE_READ_RC ; 204 sc_signal<Tspecial_address_t > ** out_REEXECUTE_NUM_REG_RC ; 205 sc_signal<Tcontrol_t > ** out_REEXECUTE_WRITE_RD ; 206 sc_signal<Tgeneral_address_t > ** out_REEXECUTE_NUM_REG_RD ; 207 sc_signal<Tcontrol_t > ** out_REEXECUTE_WRITE_RE ; 208 sc_signal<Tspecial_address_t > ** out_REEXECUTE_NUM_REG_RE ; 209 139 210 ALLOC2_SC_SIGNAL( in_EXECUTE_LOOP_VAL ," in_EXECUTE_LOOP_VAL ",Tcontrol_t ,_param->_nb_execute_loop,_param->_nb_inst_execute[it1]); 140 211 ALLOC2_SC_SIGNAL(out_EXECUTE_LOOP_ACK ,"out_EXECUTE_LOOP_ACK ",Tcontrol_t ,_param->_nb_execute_loop,_param->_nb_inst_execute[it1]); … … 192 263 ALLOC1_SC_SIGNAL(out_REEXECUTE_TYPE ,"out_REEXECUTE_TYPE ",Ttype_t ,_param->_nb_inst_reexecute); 193 264 ALLOC1_SC_SIGNAL(out_REEXECUTE_STORE_QUEUE_PTR_WRITE ,"out_REEXECUTE_STORE_QUEUE_PTR_WRITE ",Tlsq_ptr_t ,_param->_nb_inst_reexecute); 265 ALLOC1_SC_SIGNAL(out_REEXECUTE_STORE_QUEUE_PTR_READ ,"out_REEXECUTE_STORE_QUEUE_PTR_READ ",Tlsq_ptr_t ,_param->_nb_inst_reexecute); 266 ALLOC1_SC_SIGNAL(out_REEXECUTE_STORE_QUEUE_EMPTY ,"out_REEXECUTE_STORE_QUEUE_EMPTY ",Tcontrol_t ,_param->_nb_inst_reexecute); 194 267 ALLOC1_SC_SIGNAL(out_REEXECUTE_LOAD_QUEUE_PTR_WRITE ,"out_REEXECUTE_LOAD_QUEUE_PTR_WRITE ",Tlsq_ptr_t ,_param->_nb_inst_reexecute); 195 268 ALLOC1_SC_SIGNAL(out_REEXECUTE_HAS_IMMEDIAT ,"out_REEXECUTE_HAS_IMMEDIAT ",Tcontrol_t ,_param->_nb_inst_reexecute); … … 284 357 INSTANCE1_SC_SIGNAL(_Reexecute_unit,out_REEXECUTE_TYPE ,_param->_nb_inst_reexecute); 285 358 INSTANCE1_SC_SIGNAL(_Reexecute_unit,out_REEXECUTE_STORE_QUEUE_PTR_WRITE ,_param->_nb_inst_reexecute); 359 INSTANCE1_SC_SIGNAL(_Reexecute_unit,out_REEXECUTE_STORE_QUEUE_PTR_READ ,_param->_nb_inst_reexecute); 360 INSTANCE1_SC_SIGNAL(_Reexecute_unit,out_REEXECUTE_STORE_QUEUE_EMPTY ,_param->_nb_inst_reexecute); 286 361 if (_param->_have_port_load_queue_ptr) 287 362 INSTANCE1_SC_SIGNAL(_Reexecute_unit,out_REEXECUTE_LOAD_QUEUE_PTR_WRITE ,_param->_nb_inst_reexecute); … … 475 550 TEST(Tcontrol_t ,out_REEXECUTE_HAS_IMMEDIAT [i]->read(), 1); 476 551 TEST(Tlsq_ptr_t ,out_REEXECUTE_STORE_QUEUE_PTR_WRITE [i]->read(), 0); 552 TEST(Tlsq_ptr_t ,out_REEXECUTE_STORE_QUEUE_PTR_READ [i]->read(), 0); 553 TEST(Tlsq_ptr_t ,out_REEXECUTE_STORE_QUEUE_EMPTY [i]->read(), 0); 477 554 TEST(Tlsq_ptr_t ,out_REEXECUTE_LOAD_QUEUE_PTR_WRITE [i]->read(), 0); 478 555 TEST(Tcontrol_t ,out_REEXECUTE_READ_RA [i]->read(), 0); … … 568 645 DELETE1_SC_SIGNAL(out_REEXECUTE_TYPE ,_param->_nb_inst_reexecute); 569 646 DELETE1_SC_SIGNAL(out_REEXECUTE_STORE_QUEUE_PTR_WRITE ,_param->_nb_inst_reexecute); 647 DELETE1_SC_SIGNAL(out_REEXECUTE_STORE_QUEUE_PTR_READ ,_param->_nb_inst_reexecute); 648 DELETE1_SC_SIGNAL(out_REEXECUTE_STORE_QUEUE_EMPTY ,_param->_nb_inst_reexecute); 570 649 DELETE1_SC_SIGNAL(out_REEXECUTE_LOAD_QUEUE_PTR_WRITE ,_param->_nb_inst_reexecute); 571 650 DELETE1_SC_SIGNAL(out_REEXECUTE_HAS_IMMEDIAT ,_param->_nb_inst_reexecute); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/src/Free_List_unit_statistics_deallocation.cpp
r110 r128 29 29 delete _stat; 30 30 31 delete [] _stat_bank_spr_nb_elt; 31 32 delete [] _stat_bank_gpr_nb_elt; 32 33 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/SelfTest/src/main.cpp
r88 r128 67 67 68 68 test (name,param); 69 70 delete param; 69 71 } 70 72 catch (morpheo::ErrorMorpheo & error) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/SelfTest/src/test.cpp
r112 r128 50 50 sc_clock * in_CLOCK = new sc_clock ("clock", 1.0, 0.5); 51 51 sc_signal<Tcontrol_t> * in_NRESET = new sc_signal<Tcontrol_t> ("NRESET"); 52 53 sc_signal<Tcontrol_t > ** in_RENAME_VAL ; 54 sc_signal<Tcontrol_t > ** out_RENAME_ACK ; 55 sc_signal<Tcontext_t > ** in_RENAME_FRONT_END_ID ; 56 sc_signal<Tcontext_t > ** in_RENAME_CONTEXT_ID ; 57 sc_signal<Tgeneral_address_t> ** in_RENAME_NUM_REG_RA_LOG ; 58 sc_signal<Tgeneral_address_t> ** in_RENAME_NUM_REG_RB_LOG ; 59 sc_signal<Tspecial_address_t> ** in_RENAME_NUM_REG_RC_LOG ; 60 sc_signal<Tgeneral_address_t> ** in_RENAME_NUM_REG_RD_LOG ; 61 sc_signal<Tspecial_address_t> ** in_RENAME_NUM_REG_RE_LOG ; 62 sc_signal<Tgeneral_address_t> ** out_RENAME_NUM_REG_RA_PHY ; 63 sc_signal<Tgeneral_address_t> ** out_RENAME_NUM_REG_RB_PHY ; 64 sc_signal<Tspecial_address_t> ** out_RENAME_NUM_REG_RC_PHY ; 65 sc_signal<Tgeneral_address_t> ** out_RENAME_NUM_REG_RD_PHY_OLD; 66 sc_signal<Tspecial_address_t> ** out_RENAME_NUM_REG_RE_PHY_OLD; 67 68 sc_signal<Tcontrol_t > ** in_INSERT_VAL ; 69 sc_signal<Tcontrol_t > ** out_INSERT_ACK ; 70 //sc_signal<Tcontext_t > ** in_INSERT_FRONT_END_ID ; 71 //sc_signal<Tcontext_t > ** in_INSERT_CONTEXT_ID ; 72 sc_signal<Tcontrol_t > ** in_INSERT_WRITE_RD ; 73 sc_signal<Tcontrol_t > ** in_INSERT_WRITE_RE ; 74 sc_signal<Tgeneral_address_t> ** in_INSERT_NUM_REG_RD_LOG ; 75 sc_signal<Tspecial_address_t> ** in_INSERT_NUM_REG_RE_LOG ; 76 sc_signal<Tgeneral_address_t> ** in_INSERT_NUM_REG_RD_PHY ; 77 sc_signal<Tspecial_address_t> ** in_INSERT_NUM_REG_RE_PHY ; 78 79 sc_signal<Tcontrol_t > ** in_RETIRE_VAL ; 80 sc_signal<Tcontrol_t > ** out_RETIRE_ACK ; 81 sc_signal<Tcontext_t > ** in_RETIRE_FRONT_END_ID ; 82 sc_signal<Tcontext_t > ** in_RETIRE_CONTEXT_ID ; 83 sc_signal<Tcontrol_t > ** in_RETIRE_WRITE_RD ; 84 sc_signal<Tcontrol_t > ** in_RETIRE_WRITE_RE ; 85 sc_signal<Tgeneral_address_t> ** in_RETIRE_NUM_REG_RD_LOG ; 86 sc_signal<Tspecial_address_t> ** in_RETIRE_NUM_REG_RE_LOG ; 87 sc_signal<Tgeneral_address_t> ** in_RETIRE_NUM_REG_RD_PHY_NEW; 88 sc_signal<Tspecial_address_t> ** in_RETIRE_NUM_REG_RE_PHY_NEW; 89 sc_signal<Tcontrol_t > ** out_RETIRE_RESTORE_RD_PHY_OLD; 90 sc_signal<Tcontrol_t > ** out_RETIRE_RESTORE_RE_PHY_OLD; 91 sc_signal<Tcontrol_t > ** out_RETIRE_RESTORE ; 92 93 sc_signal<Tcontrol_t > *** in_RETIRE_EVENT_VAL ; 94 sc_signal<Tcontrol_t > *** out_RETIRE_EVENT_ACK ; 95 sc_signal<Tevent_state_t > *** in_RETIRE_EVENT_STATE ; 52 96 53 97 ALLOC1_SC_SIGNAL( in_RENAME_VAL ," in_RENAME_VAL ",Tcontrol_t ,_param->_nb_inst_insert); … … 85 129 ALLOC1_SC_SIGNAL( in_RETIRE_NUM_REG_RD_LOG ," in_RETIRE_NUM_REG_RD_LOG ",Tgeneral_address_t,_param->_nb_inst_retire); 86 130 ALLOC1_SC_SIGNAL( in_RETIRE_NUM_REG_RE_LOG ," in_RETIRE_NUM_REG_RE_LOG ",Tspecial_address_t,_param->_nb_inst_retire); 87 ALLOC1_SC_SIGNAL( in_RETIRE_NUM_REG_RD_PHY_ OLD," in_RETIRE_NUM_REG_RD_PHY_OLD",Tgeneral_address_t,_param->_nb_inst_retire);88 ALLOC1_SC_SIGNAL( in_RETIRE_NUM_REG_RE_PHY_ OLD," in_RETIRE_NUM_REG_RE_PHY_OLD",Tspecial_address_t,_param->_nb_inst_retire);131 ALLOC1_SC_SIGNAL( in_RETIRE_NUM_REG_RD_PHY_NEW," in_RETIRE_NUM_REG_RD_PHY_NEW",Tgeneral_address_t,_param->_nb_inst_retire); 132 ALLOC1_SC_SIGNAL( in_RETIRE_NUM_REG_RE_PHY_NEW," in_RETIRE_NUM_REG_RE_PHY_NEW",Tspecial_address_t,_param->_nb_inst_retire); 89 133 ALLOC1_SC_SIGNAL(out_RETIRE_RESTORE_RD_PHY_OLD,"out_RETIRE_RESTORE_RD_PHY_OLD",Tcontrol_t ,_param->_nb_inst_retire); 90 134 ALLOC1_SC_SIGNAL(out_RETIRE_RESTORE_RE_PHY_OLD,"out_RETIRE_RESTORE_RE_PHY_OLD",Tcontrol_t ,_param->_nb_inst_retire); … … 144 188 INSTANCE1_SC_SIGNAL(_Register_Address_Translation_unit, in_RETIRE_NUM_REG_RD_LOG ,_param->_nb_inst_retire); 145 189 INSTANCE1_SC_SIGNAL(_Register_Address_Translation_unit, in_RETIRE_NUM_REG_RE_LOG ,_param->_nb_inst_retire); 146 INSTANCE1_SC_SIGNAL(_Register_Address_Translation_unit, in_RETIRE_NUM_REG_RD_PHY_ OLD,_param->_nb_inst_retire);147 INSTANCE1_SC_SIGNAL(_Register_Address_Translation_unit, in_RETIRE_NUM_REG_RE_PHY_ OLD,_param->_nb_inst_retire);190 INSTANCE1_SC_SIGNAL(_Register_Address_Translation_unit, in_RETIRE_NUM_REG_RD_PHY_NEW,_param->_nb_inst_retire); 191 INSTANCE1_SC_SIGNAL(_Register_Address_Translation_unit, in_RETIRE_NUM_REG_RE_PHY_NEW,_param->_nb_inst_retire); 148 192 INSTANCE1_SC_SIGNAL(_Register_Address_Translation_unit,out_RETIRE_RESTORE_RD_PHY_OLD,_param->_nb_inst_retire); 149 193 INSTANCE1_SC_SIGNAL(_Register_Address_Translation_unit,out_RETIRE_RESTORE_RE_PHY_OLD,_param->_nb_inst_retire); … … 272 316 in_RETIRE_NUM_REG_RD_LOG [i]->write(rand() % _param->_nb_general_register_logic); 273 317 in_RETIRE_NUM_REG_RE_LOG [i]->write(rand() % _param->_nb_special_register_logic); 274 in_RETIRE_NUM_REG_RD_PHY_ OLD[i]->write(rand() % _param->_nb_general_register);275 in_RETIRE_NUM_REG_RE_PHY_ OLD[i]->write(rand() % _param->_nb_special_register);318 in_RETIRE_NUM_REG_RD_PHY_NEW [i]->write(rand() % _param->_nb_general_register); 319 in_RETIRE_NUM_REG_RE_PHY_NEW [i]->write(rand() % _param->_nb_special_register); 276 320 277 321 in_RETIRE_EVENT_STATE [front_end_id][context_id]->write(EVENT_STATE_NO_EVENT); … … 409 453 in_RETIRE_NUM_REG_RD_LOG [i]->write(rand() % _param->_nb_general_register_logic); 410 454 in_RETIRE_NUM_REG_RE_LOG [i]->write(rand() % _param->_nb_special_register_logic); 411 in_RETIRE_NUM_REG_RD_PHY_ OLD[i]->write(rand() % _param->_nb_general_register);412 in_RETIRE_NUM_REG_RE_PHY_ OLD[i]->write(rand() % _param->_nb_special_register);455 in_RETIRE_NUM_REG_RD_PHY_NEW [i]->write(rand() % _param->_nb_general_register); 456 in_RETIRE_NUM_REG_RE_PHY_NEW [i]->write(rand() % _param->_nb_special_register); 413 457 414 458 in_RETIRE_EVENT_STATE [retire_front_end_id [i]][retire_context_id [i]]->write(EVENT_STATE_WAITEND); … … 451 495 452 496 if (rat_gpr_updt [front_end_id][context_id][in_RETIRE_NUM_REG_RD_LOG[i]->read()] == false) 453 rat_gpr[front_end_id][context_id][in_RETIRE_NUM_REG_RD_LOG[i]->read()] = in_RETIRE_NUM_REG_RD_PHY_ OLD[i]->read();497 rat_gpr[front_end_id][context_id][in_RETIRE_NUM_REG_RD_LOG[i]->read()] = in_RETIRE_NUM_REG_RD_PHY_NEW[i]->read(); 454 498 rat_gpr_updt [front_end_id][context_id][in_RETIRE_NUM_REG_RD_LOG[i]->read()] = true; 455 499 } … … 459 503 460 504 if (rat_spr_updt [front_end_id][context_id][in_RETIRE_NUM_REG_RE_LOG[i]->read()] == false) 461 rat_spr[front_end_id][context_id][in_RETIRE_NUM_REG_RE_LOG[i]->read()] = in_RETIRE_NUM_REG_RE_PHY_ OLD[i]->read();505 rat_spr[front_end_id][context_id][in_RETIRE_NUM_REG_RE_LOG[i]->read()] = in_RETIRE_NUM_REG_RE_PHY_NEW[i]->read(); 462 506 rat_spr_updt [front_end_id][context_id][in_RETIRE_NUM_REG_RE_LOG[i]->read()] = true; 463 507 } … … 498 542 delete in_NRESET; 499 543 500 delete [] in_RENAME_VAL ; 501 delete [] out_RENAME_ACK ; 502 if (_param->_have_port_front_end_id) 503 delete [] in_RENAME_FRONT_END_ID ; 504 if (_param->_have_port_context_id) 505 delete [] in_RENAME_CONTEXT_ID ; 506 delete [] in_RENAME_NUM_REG_RA_LOG ; 507 delete [] in_RENAME_NUM_REG_RB_LOG ; 508 delete [] in_RENAME_NUM_REG_RC_LOG ; 509 delete [] in_RENAME_NUM_REG_RD_LOG ; 510 delete [] in_RENAME_NUM_REG_RE_LOG ; 511 delete [] out_RENAME_NUM_REG_RA_PHY ; 512 delete [] out_RENAME_NUM_REG_RB_PHY ; 513 delete [] out_RENAME_NUM_REG_RC_PHY ; 514 delete [] out_RENAME_NUM_REG_RD_PHY_OLD; 515 delete [] out_RENAME_NUM_REG_RE_PHY_OLD; 516 517 delete [] in_INSERT_VAL ; 518 delete [] out_INSERT_ACK ; 519 //if (_param->_have_port_front_end_id) 520 //delete [] in_INSERT_FRONT_END_ID ; 521 //if (_param->_have_port_context_id) 522 //delete [] in_INSERT_CONTEXT_ID ; 523 delete [] in_INSERT_WRITE_RD ; 524 delete [] in_INSERT_WRITE_RE ; 525 delete [] in_INSERT_NUM_REG_RD_LOG ; 526 delete [] in_INSERT_NUM_REG_RE_LOG ; 527 delete [] in_INSERT_NUM_REG_RD_PHY ; 528 delete [] in_INSERT_NUM_REG_RE_PHY ; 529 530 delete [] in_RETIRE_VAL ; 531 delete [] out_RETIRE_ACK ; 532 if (_param->_have_port_front_end_id) 533 delete [] in_RETIRE_FRONT_END_ID ; 534 if (_param->_have_port_context_id) 535 delete [] in_RETIRE_CONTEXT_ID ; 536 delete [] in_RETIRE_WRITE_RD ; 537 delete [] in_RETIRE_WRITE_RE ; 538 delete [] in_RETIRE_NUM_REG_RD_LOG ; 539 delete [] in_RETIRE_NUM_REG_RE_LOG ; 540 delete [] in_RETIRE_NUM_REG_RD_PHY_OLD; 541 delete [] in_RETIRE_NUM_REG_RE_PHY_OLD; 542 delete [] out_RETIRE_RESTORE_RD_PHY_OLD; 543 delete [] out_RETIRE_RESTORE_RE_PHY_OLD; 544 delete [] out_RETIRE_RESTORE ; 545 546 DELETE2_SC_SIGNAL( in_RETIRE_EVENT_VAL ,_param->_nb_front_end, _param->_nb_context[it1]); 547 DELETE2_SC_SIGNAL(out_RETIRE_EVENT_ACK ,_param->_nb_front_end, _param->_nb_context[it1]); 548 DELETE2_SC_SIGNAL( in_RETIRE_EVENT_STATE ,_param->_nb_front_end, _param->_nb_context[it1]); 544 545 DELETE1_SC_SIGNAL( in_RENAME_VAL ,_param->_nb_inst_insert); 546 DELETE1_SC_SIGNAL(out_RENAME_ACK ,_param->_nb_inst_insert); 547 DELETE1_SC_SIGNAL( in_RENAME_FRONT_END_ID ,_param->_nb_inst_insert); 548 DELETE1_SC_SIGNAL( in_RENAME_CONTEXT_ID ,_param->_nb_inst_insert); 549 DELETE1_SC_SIGNAL( in_RENAME_NUM_REG_RA_LOG ,_param->_nb_inst_insert); 550 DELETE1_SC_SIGNAL( in_RENAME_NUM_REG_RB_LOG ,_param->_nb_inst_insert); 551 DELETE1_SC_SIGNAL( in_RENAME_NUM_REG_RC_LOG ,_param->_nb_inst_insert); 552 DELETE1_SC_SIGNAL( in_RENAME_NUM_REG_RD_LOG ,_param->_nb_inst_insert); 553 DELETE1_SC_SIGNAL( in_RENAME_NUM_REG_RE_LOG ,_param->_nb_inst_insert); 554 DELETE1_SC_SIGNAL(out_RENAME_NUM_REG_RA_PHY ,_param->_nb_inst_insert); 555 DELETE1_SC_SIGNAL(out_RENAME_NUM_REG_RB_PHY ,_param->_nb_inst_insert); 556 DELETE1_SC_SIGNAL(out_RENAME_NUM_REG_RC_PHY ,_param->_nb_inst_insert); 557 DELETE1_SC_SIGNAL(out_RENAME_NUM_REG_RD_PHY_OLD,_param->_nb_inst_insert); 558 DELETE1_SC_SIGNAL(out_RENAME_NUM_REG_RE_PHY_OLD,_param->_nb_inst_insert); 559 560 DELETE1_SC_SIGNAL( in_INSERT_VAL ,_param->_nb_inst_insert); 561 DELETE1_SC_SIGNAL(out_INSERT_ACK ,_param->_nb_inst_insert); 562 //DELETE1_SC_SIGNAL( in_INSERT_FRONT_END_ID ,_param->_nb_inst_insert); 563 //DELETE1_SC_SIGNAL( in_INSERT_CONTEXT_ID ,_param->_nb_inst_insert); 564 DELETE1_SC_SIGNAL( in_INSERT_WRITE_RD ,_param->_nb_inst_insert); 565 DELETE1_SC_SIGNAL( in_INSERT_WRITE_RE ,_param->_nb_inst_insert); 566 DELETE1_SC_SIGNAL( in_INSERT_NUM_REG_RD_LOG ,_param->_nb_inst_insert); 567 DELETE1_SC_SIGNAL( in_INSERT_NUM_REG_RE_LOG ,_param->_nb_inst_insert); 568 DELETE1_SC_SIGNAL( in_INSERT_NUM_REG_RD_PHY ,_param->_nb_inst_insert); 569 DELETE1_SC_SIGNAL( in_INSERT_NUM_REG_RE_PHY ,_param->_nb_inst_insert); 570 571 DELETE1_SC_SIGNAL( in_RETIRE_VAL ,_param->_nb_inst_retire); 572 DELETE1_SC_SIGNAL(out_RETIRE_ACK ,_param->_nb_inst_retire); 573 DELETE1_SC_SIGNAL( in_RETIRE_FRONT_END_ID ,_param->_nb_inst_retire); 574 DELETE1_SC_SIGNAL( in_RETIRE_CONTEXT_ID ,_param->_nb_inst_retire); 575 DELETE1_SC_SIGNAL( in_RETIRE_WRITE_RD ,_param->_nb_inst_retire); 576 DELETE1_SC_SIGNAL( in_RETIRE_WRITE_RE ,_param->_nb_inst_retire); 577 DELETE1_SC_SIGNAL( in_RETIRE_NUM_REG_RD_LOG ,_param->_nb_inst_retire); 578 DELETE1_SC_SIGNAL( in_RETIRE_NUM_REG_RE_LOG ,_param->_nb_inst_retire); 579 DELETE1_SC_SIGNAL( in_RETIRE_NUM_REG_RD_PHY_NEW,_param->_nb_inst_retire); 580 DELETE1_SC_SIGNAL( in_RETIRE_NUM_REG_RE_PHY_NEW,_param->_nb_inst_retire); 581 DELETE1_SC_SIGNAL(out_RETIRE_RESTORE_RD_PHY_OLD,_param->_nb_inst_retire); 582 DELETE1_SC_SIGNAL(out_RETIRE_RESTORE_RE_PHY_OLD,_param->_nb_inst_retire); 583 DELETE1_SC_SIGNAL(out_RETIRE_RESTORE ,_param->_nb_inst_retire); 584 585 DELETE2_SC_SIGNAL( in_RETIRE_EVENT_VAL ,_param->_nb_front_end,_param->_nb_context[it1]); 586 DELETE2_SC_SIGNAL(out_RETIRE_EVENT_ACK ,_param->_nb_front_end,_param->_nb_context[it1]); 587 DELETE2_SC_SIGNAL( in_RETIRE_EVENT_STATE ,_param->_nb_front_end,_param->_nb_context[it1]); 549 588 #endif 550 589 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Register_Address_Translation_unit_transition.cpp
r123 r128 36 36 rat_gpr_not_speculative [i][j][0] = 0; 37 37 rat_gpr_speculative_valid [i][j][0] = false; 38 rat_gpr_speculative [i][j][0] = 0 ; // not necessary 39 rat_gpr_update_table [i][j][0] = false; // not necessary 38 40 39 41 for (uint32_t k=1; k<_param->_nb_general_register_logic; k++) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/src/Parameters.cpp
r112 r128 127 127 log_printf(FUNC,Register_translation_unit,FUNCTION,"Begin"); 128 128 129 delete []_param_dependency_checking_unit;130 delete []_param_free_list_unit;131 delete []_param_register_address_translation_unit;132 delete []_param_stat_list_unit;133 delete []_param_register_translation_unit_glue;129 delete _param_dependency_checking_unit; 130 delete _param_free_list_unit; 131 delete _param_register_address_translation_unit; 132 delete _param_stat_list_unit; 133 delete _param_register_translation_unit_glue; 134 134 135 135 log_printf(FUNC,Register_translation_unit,FUNCTION,"End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/SelfTest/src/main.cpp
r112 r128 135 135 136 136 test (name,param); 137 138 delete param; 137 139 } 138 140 catch (morpheo::ErrorMorpheo & error) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/SelfTest/src/test.cpp
r121 r128 48 48 sc_signal<Tcontrol_t> * in_NRESET = new sc_signal<Tcontrol_t> ("NRESET"); 49 49 50 sc_signal<Tcontrol_t > *** in_RENAME_IN_VAL ; 51 sc_signal<Tcontrol_t > *** out_RENAME_IN_ACK ; 52 sc_signal<Tcontext_t > *** in_RENAME_IN_FRONT_END_ID ; 53 sc_signal<Tcontext_t > *** in_RENAME_IN_CONTEXT_ID ; 54 sc_signal<Tdepth_t > *** in_RENAME_IN_DEPTH ; 55 sc_signal<Ttype_t > *** in_RENAME_IN_TYPE ; 56 sc_signal<Toperation_t > *** in_RENAME_IN_OPERATION ; 57 sc_signal<Tcontrol_t > *** in_RENAME_IN_NO_EXECUTE ; 58 sc_signal<Tcontrol_t > *** in_RENAME_IN_LAST_EVENT ; 59 sc_signal<Tcontrol_t > *** in_RENAME_IN_IS_DELAY_SLOT ; 60 sc_signal<Tgeneral_data_t > *** in_RENAME_IN_ADDRESS ; 61 sc_signal<Tgeneral_data_t > *** in_RENAME_IN_ADDRESS_NEXT ; 62 sc_signal<Tcontrol_t > *** in_RENAME_IN_HAS_IMMEDIAT ; 63 sc_signal<Tgeneral_data_t > *** in_RENAME_IN_IMMEDIAT ; 64 sc_signal<Tcontrol_t > *** in_RENAME_IN_READ_RA ; 65 sc_signal<Tgeneral_address_t> *** in_RENAME_IN_NUM_REG_RA ; 66 sc_signal<Tcontrol_t > *** in_RENAME_IN_READ_RB ; 67 sc_signal<Tgeneral_address_t> *** in_RENAME_IN_NUM_REG_RB ; 68 sc_signal<Tcontrol_t > *** in_RENAME_IN_READ_RC ; 69 sc_signal<Tspecial_address_t> *** in_RENAME_IN_NUM_REG_RC ; 70 sc_signal<Tcontrol_t > *** in_RENAME_IN_WRITE_RD ; 71 sc_signal<Tgeneral_address_t> *** in_RENAME_IN_NUM_REG_RD ; 72 sc_signal<Tcontrol_t > *** in_RENAME_IN_WRITE_RE ; 73 sc_signal<Tspecial_address_t> *** in_RENAME_IN_NUM_REG_RE ; 74 sc_signal<Texception_t > *** in_RENAME_IN_EXCEPTION_USE ; 75 sc_signal<Texception_t > *** in_RENAME_IN_EXCEPTION ; 76 sc_signal<Tcontrol_t > ** out_INSERT_VAL ; 77 sc_signal<Tcontrol_t > ** in_INSERT_ACK ; 78 sc_signal<Tcontext_t > ** out_INSERT_FRONT_END_ID ; 79 sc_signal<Tcontext_t > ** out_INSERT_CONTEXT_ID ; 80 sc_signal<Tdepth_t > ** out_INSERT_DEPTH ; 81 sc_signal<Ttype_t > ** out_INSERT_TYPE ; 82 sc_signal<Toperation_t > ** out_INSERT_OPERATION ; 83 sc_signal<Tcontrol_t > ** out_INSERT_NO_EXECUTE ; 84 sc_signal<Tcontrol_t > ** out_INSERT_LAST_EVENT ; 85 sc_signal<Tcontrol_t > ** out_INSERT_IS_DELAY_SLOT ; 86 sc_signal<Tgeneral_data_t > ** out_INSERT_ADDRESS ; 87 sc_signal<Tgeneral_data_t > ** out_INSERT_ADDRESS_NEXT ; 88 sc_signal<Tcontrol_t > ** out_INSERT_HAS_IMMEDIAT ; 89 sc_signal<Tgeneral_data_t > ** out_INSERT_IMMEDIAT ; 90 sc_signal<Tlsq_ptr_t > ** out_INSERT_STORE_QUEUE_PTR_WRITE; 91 sc_signal<Tlsq_ptr_t > ** out_INSERT_STORE_QUEUE_PTR_READ ; 92 sc_signal<Tcontrol_t > ** out_INSERT_STORE_QUEUE_EMPTY ; 93 sc_signal<Tlsq_ptr_t > ** out_INSERT_LOAD_QUEUE_PTR_WRITE ; 94 sc_signal<Tcontrol_t > ** out_INSERT_READ_RA ; 95 sc_signal<Tgeneral_address_t> ** out_INSERT_NUM_REG_RA_LOG ; 96 sc_signal<Tgeneral_address_t> ** out_INSERT_NUM_REG_RA_PHY ; 97 sc_signal<Tcontrol_t > ** out_INSERT_READ_RB ; 98 sc_signal<Tgeneral_address_t> ** out_INSERT_NUM_REG_RB_LOG ; 99 sc_signal<Tgeneral_address_t> ** out_INSERT_NUM_REG_RB_PHY ; 100 sc_signal<Tcontrol_t > ** out_INSERT_READ_RC ; 101 sc_signal<Tspecial_address_t> ** out_INSERT_NUM_REG_RC_LOG ; 102 sc_signal<Tspecial_address_t> ** out_INSERT_NUM_REG_RC_PHY ; 103 sc_signal<Tcontrol_t > ** out_INSERT_WRITE_RD ; 104 sc_signal<Tgeneral_address_t> ** out_INSERT_NUM_REG_RD_LOG ; 105 sc_signal<Tgeneral_address_t> ** out_INSERT_NUM_REG_RD_PHY_OLD ; 106 sc_signal<Tgeneral_address_t> ** out_INSERT_NUM_REG_RD_PHY_NEW ; 107 sc_signal<Tcontrol_t > ** out_INSERT_WRITE_RE ; 108 sc_signal<Tspecial_address_t> ** out_INSERT_NUM_REG_RE_LOG ; 109 sc_signal<Tspecial_address_t> ** out_INSERT_NUM_REG_RE_PHY_OLD ; 110 sc_signal<Tspecial_address_t> ** out_INSERT_NUM_REG_RE_PHY_NEW ; 111 sc_signal<Texception_t > ** out_INSERT_EXCEPTION_USE ; 112 sc_signal<Texception_t > ** out_INSERT_EXCEPTION ; 113 sc_signal<Tcontrol_t > ** in_RETIRE_VAL ; 114 sc_signal<Tcontrol_t > ** out_RETIRE_ACK ; 115 sc_signal<Tcontext_t > ** in_RETIRE_FRONT_END_ID ; 116 sc_signal<Tcontext_t > ** in_RETIRE_CONTEXT_ID ; 117 //sc_signal<Ttype_t > ** in_RETIRE_TYPE ; 118 //sc_signal<Toperation_t > ** in_RETIRE_OPERATION ; 119 sc_signal<Tcontrol_t > ** in_RETIRE_USE_STORE_QUEUE ; 120 sc_signal<Tcontrol_t > ** in_RETIRE_USE_LOAD_QUEUE ; 121 sc_signal<Tlsq_ptr_t > ** in_RETIRE_STORE_QUEUE_PTR_WRITE; 122 sc_signal<Tlsq_ptr_t > ** in_RETIRE_LOAD_QUEUE_PTR_WRITE ; 123 sc_signal<Tcontrol_t > ** in_RETIRE_READ_RA ; 124 sc_signal<Tgeneral_address_t> ** in_RETIRE_NUM_REG_RA_PHY ; 125 sc_signal<Tcontrol_t > ** in_RETIRE_READ_RB ; 126 sc_signal<Tgeneral_address_t> ** in_RETIRE_NUM_REG_RB_PHY ; 127 sc_signal<Tcontrol_t > ** in_RETIRE_READ_RC ; 128 sc_signal<Tspecial_address_t> ** in_RETIRE_NUM_REG_RC_PHY ; 129 sc_signal<Tcontrol_t > ** in_RETIRE_WRITE_RD ; 130 sc_signal<Tgeneral_address_t> ** in_RETIRE_NUM_REG_RD_LOG ; 131 sc_signal<Tgeneral_address_t> ** in_RETIRE_NUM_REG_RD_PHY_OLD ; 132 sc_signal<Tgeneral_address_t> ** in_RETIRE_NUM_REG_RD_PHY_NEW ; 133 sc_signal<Tcontrol_t > ** in_RETIRE_WRITE_RE ; 134 sc_signal<Tspecial_address_t> ** in_RETIRE_NUM_REG_RE_LOG ; 135 sc_signal<Tspecial_address_t> ** in_RETIRE_NUM_REG_RE_PHY_OLD ; 136 sc_signal<Tspecial_address_t> ** in_RETIRE_NUM_REG_RE_PHY_NEW ; 137 sc_signal<Tcontrol_t > *** in_RETIRE_EVENT_VAL ; 138 sc_signal<Tcontrol_t > *** out_RETIRE_EVENT_ACK ; 139 sc_signal<Tevent_state_t > *** in_RETIRE_EVENT_STATE ; 140 sc_signal<Tspr_t > *** in_SPR_READ_SR ; 141 sc_signal<bool > * in_INFO_ROB_EMPTY ; 142 50 143 ALLOC2_SC_SIGNAL( in_RENAME_IN_VAL ," in_RENAME_IN_VAL ",Tcontrol_t ,_param->_nb_front_end,_param->_nb_inst_decod[it1]); 51 144 ALLOC2_SC_SIGNAL(out_RENAME_IN_ACK ,"out_RENAME_IN_ACK ",Tcontrol_t ,_param->_nb_front_end,_param->_nb_inst_decod[it1]); … … 56 149 ALLOC2_SC_SIGNAL( in_RENAME_IN_OPERATION ," in_RENAME_IN_OPERATION ",Toperation_t ,_param->_nb_front_end,_param->_nb_inst_decod[it1]); 57 150 ALLOC2_SC_SIGNAL( in_RENAME_IN_NO_EXECUTE ," in_RENAME_IN_NO_EXECUTE ",Tcontrol_t ,_param->_nb_front_end,_param->_nb_inst_decod[it1]); 151 ALLOC2_SC_SIGNAL( in_RENAME_IN_LAST_EVENT ," in_RENAME_IN_LAST_EVENT ",Tcontrol_t ,_param->_nb_front_end,_param->_nb_inst_decod[it1]); 58 152 ALLOC2_SC_SIGNAL( in_RENAME_IN_IS_DELAY_SLOT ," in_RENAME_IN_IS_DELAY_SLOT ",Tcontrol_t ,_param->_nb_front_end,_param->_nb_inst_decod[it1]); 59 #ifdef DEBUG60 153 ALLOC2_SC_SIGNAL( in_RENAME_IN_ADDRESS ," in_RENAME_IN_ADDRESS ",Tgeneral_data_t ,_param->_nb_front_end,_param->_nb_inst_decod[it1]); 61 #endif62 154 ALLOC2_SC_SIGNAL( in_RENAME_IN_ADDRESS_NEXT ," in_RENAME_IN_ADDRESS_NEXT ",Tgeneral_data_t ,_param->_nb_front_end,_param->_nb_inst_decod[it1]); 63 155 ALLOC2_SC_SIGNAL( in_RENAME_IN_HAS_IMMEDIAT ," in_RENAME_IN_HAS_IMMEDIAT ",Tcontrol_t ,_param->_nb_front_end,_param->_nb_inst_decod[it1]); … … 83 175 ALLOC1_SC_SIGNAL(out_INSERT_OPERATION ,"out_INSERT_OPERATION ",Toperation_t ,_param->_nb_inst_insert); 84 176 ALLOC1_SC_SIGNAL(out_INSERT_NO_EXECUTE ,"out_INSERT_NO_EXECUTE ",Tcontrol_t ,_param->_nb_inst_insert); 177 ALLOC1_SC_SIGNAL(out_INSERT_LAST_EVENT ,"out_INSERT_LAST_EVENT ",Tcontrol_t ,_param->_nb_inst_insert); 85 178 ALLOC1_SC_SIGNAL(out_INSERT_IS_DELAY_SLOT ,"out_INSERT_IS_DELAY_SLOT ",Tcontrol_t ,_param->_nb_inst_insert); 86 #ifdef DEBUG87 179 ALLOC1_SC_SIGNAL(out_INSERT_ADDRESS ,"out_INSERT_ADDRESS ",Tgeneral_data_t ,_param->_nb_inst_insert); 88 #endif89 180 ALLOC1_SC_SIGNAL(out_INSERT_ADDRESS_NEXT ,"out_INSERT_ADDRESS_NEXT ",Tgeneral_data_t ,_param->_nb_inst_insert); 90 181 ALLOC1_SC_SIGNAL(out_INSERT_HAS_IMMEDIAT ,"out_INSERT_HAS_IMMEDIAT ",Tcontrol_t ,_param->_nb_inst_insert); 91 182 ALLOC1_SC_SIGNAL(out_INSERT_IMMEDIAT ,"out_INSERT_IMMEDIAT ",Tgeneral_data_t ,_param->_nb_inst_insert); 92 183 ALLOC1_SC_SIGNAL(out_INSERT_STORE_QUEUE_PTR_WRITE,"out_INSERT_STORE_QUEUE_PTR_WRITE",Tlsq_ptr_t ,_param->_nb_inst_insert); 184 ALLOC1_SC_SIGNAL(out_INSERT_STORE_QUEUE_PTR_READ ,"out_INSERT_STORE_QUEUE_PTR_READ ",Tlsq_ptr_t ,_param->_nb_inst_insert); 185 ALLOC1_SC_SIGNAL(out_INSERT_STORE_QUEUE_EMPTY ,"out_INSERT_STORE_QUEUE_EMPTY ",Tcontrol_t ,_param->_nb_inst_insert); 93 186 ALLOC1_SC_SIGNAL(out_INSERT_LOAD_QUEUE_PTR_WRITE ,"out_INSERT_LOAD_QUEUE_PTR_WRITE ",Tlsq_ptr_t ,_param->_nb_inst_insert); 94 187 ALLOC1_SC_SIGNAL(out_INSERT_READ_RA ,"out_INSERT_READ_RA ",Tcontrol_t ,_param->_nb_inst_insert); … … 139 232 ALLOC2_SC_SIGNAL( in_RETIRE_EVENT_STATE ," in_RETIRE_EVENT_STATE ",Tevent_state_t ,_param->_nb_front_end,_param->_nb_context[it1]); 140 233 ALLOC2_SC_SIGNAL( in_SPR_READ_SR ," in_SPR_READ_SR ",Tspr_t ,_param->_nb_front_end,_param->_nb_context[it1]); 234 ALLOC0_SC_SIGNAL( in_INFO_ROB_EMPTY ," in_INFO_ROB_EMPTY ",bool ); 141 235 142 236 /******************************************************** … … 160 254 INSTANCE2_SC_SIGNAL(_Rename_unit, in_RENAME_IN_OPERATION ,_param->_nb_front_end, _param->_nb_inst_decod[it1]); 161 255 INSTANCE2_SC_SIGNAL(_Rename_unit, in_RENAME_IN_NO_EXECUTE ,_param->_nb_front_end, _param->_nb_inst_decod[it1]); 256 INSTANCE2_SC_SIGNAL(_Rename_unit, in_RENAME_IN_LAST_EVENT ,_param->_nb_front_end, _param->_nb_inst_decod[it1]); 162 257 INSTANCE2_SC_SIGNAL(_Rename_unit, in_RENAME_IN_IS_DELAY_SLOT ,_param->_nb_front_end, _param->_nb_inst_decod[it1]); 163 258 #ifdef DEBUG … … 191 286 INSTANCE1_SC_SIGNAL(_Rename_unit,out_INSERT_OPERATION ,_param->_nb_inst_insert); 192 287 INSTANCE1_SC_SIGNAL(_Rename_unit,out_INSERT_NO_EXECUTE ,_param->_nb_inst_insert); 288 INSTANCE1_SC_SIGNAL(_Rename_unit,out_INSERT_LAST_EVENT ,_param->_nb_inst_insert); 193 289 INSTANCE1_SC_SIGNAL(_Rename_unit,out_INSERT_IS_DELAY_SLOT ,_param->_nb_inst_insert); 194 290 #ifdef DEBUG … … 199 295 INSTANCE1_SC_SIGNAL(_Rename_unit,out_INSERT_IMMEDIAT ,_param->_nb_inst_insert); 200 296 INSTANCE1_SC_SIGNAL(_Rename_unit,out_INSERT_STORE_QUEUE_PTR_WRITE,_param->_nb_inst_insert); 297 INSTANCE1_SC_SIGNAL(_Rename_unit,out_INSERT_STORE_QUEUE_PTR_READ ,_param->_nb_inst_insert); 298 INSTANCE1_SC_SIGNAL(_Rename_unit,out_INSERT_STORE_QUEUE_EMPTY ,_param->_nb_inst_insert); 201 299 if (_param->_have_port_load_queue_ptr) 202 300 INSTANCE1_SC_SIGNAL(_Rename_unit,out_INSERT_LOAD_QUEUE_PTR_WRITE ,_param->_nb_inst_insert); … … 261 359 INSTANCE2_SC_SIGNAL(_Rename_unit,in_SPR_READ_SR ,_param->_nb_front_end, _param->_nb_context[it1]); 262 360 361 #ifdef DEBUG_TEST 362 INSTANCE0_SC_SIGNAL(_Rename_unit,in_INFO_ROB_EMPTY ); 363 #endif 263 364 264 365 msg(_("<%s> : Start Simulation ............\n"),name.c_str()); … … 314 415 DELETE2_SC_SIGNAL( in_RENAME_IN_OPERATION ,_param->_nb_front_end, _param->_nb_inst_decod[it1]); 315 416 DELETE2_SC_SIGNAL( in_RENAME_IN_NO_EXECUTE ,_param->_nb_front_end, _param->_nb_inst_decod[it1]); 417 DELETE2_SC_SIGNAL( in_RENAME_IN_LAST_EVENT ,_param->_nb_front_end, _param->_nb_inst_decod[it1]); 316 418 DELETE2_SC_SIGNAL( in_RENAME_IN_IS_DELAY_SLOT ,_param->_nb_front_end, _param->_nb_inst_decod[it1]); 317 #ifdef DEBUG318 419 DELETE2_SC_SIGNAL( in_RENAME_IN_ADDRESS ,_param->_nb_front_end, _param->_nb_inst_decod[it1]); 319 #endif320 420 DELETE2_SC_SIGNAL( in_RENAME_IN_ADDRESS_NEXT ,_param->_nb_front_end, _param->_nb_inst_decod[it1]); 321 421 DELETE2_SC_SIGNAL( in_RENAME_IN_HAS_IMMEDIAT ,_param->_nb_front_end, _param->_nb_inst_decod[it1]); … … 342 442 DELETE1_SC_SIGNAL(out_INSERT_OPERATION ,_param->_nb_inst_insert); 343 443 DELETE1_SC_SIGNAL(out_INSERT_NO_EXECUTE ,_param->_nb_inst_insert); 444 DELETE1_SC_SIGNAL(out_INSERT_LAST_EVENT ,_param->_nb_inst_insert); 344 445 DELETE1_SC_SIGNAL(out_INSERT_IS_DELAY_SLOT ,_param->_nb_inst_insert); 345 #ifdef DEBUG346 446 DELETE1_SC_SIGNAL(out_INSERT_ADDRESS ,_param->_nb_inst_insert); 347 #endif348 447 DELETE1_SC_SIGNAL(out_INSERT_ADDRESS_NEXT ,_param->_nb_inst_insert); 349 448 DELETE1_SC_SIGNAL(out_INSERT_HAS_IMMEDIAT ,_param->_nb_inst_insert); 350 449 DELETE1_SC_SIGNAL(out_INSERT_IMMEDIAT ,_param->_nb_inst_insert); 351 450 DELETE1_SC_SIGNAL(out_INSERT_STORE_QUEUE_PTR_WRITE,_param->_nb_inst_insert); 451 DELETE1_SC_SIGNAL(out_INSERT_STORE_QUEUE_PTR_READ ,_param->_nb_inst_insert); 452 DELETE1_SC_SIGNAL(out_INSERT_STORE_QUEUE_EMPTY ,_param->_nb_inst_insert); 352 453 DELETE1_SC_SIGNAL(out_INSERT_LOAD_QUEUE_PTR_WRITE ,_param->_nb_inst_insert); 353 454 DELETE1_SC_SIGNAL(out_INSERT_EXCEPTION_USE ,_param->_nb_inst_insert); … … 401 502 402 503 DELETE2_SC_SIGNAL(in_SPR_READ_SR ,_param->_nb_front_end, _param->_nb_context[it1]); 504 505 DELETE0_SC_SIGNAL(in_INFO_ROB_EMPTY ); 403 506 } 404 507 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/SelfTest/src/test.cpp
r117 r128 20 20 #endif 21 21 22 simulation_init(0,0 );22 simulation_init(0,0,0,false,false); 23 23 24 24 debug_idle_cycle = CYCLE_MAX; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Special_Register_unit/SelfTest/src/test.cpp
r88 r128 47 47 sc_clock * in_CLOCK = new sc_clock ("clock", 1.0, 0.5); 48 48 sc_signal<Tcontrol_t> * in_NRESET = new sc_signal<Tcontrol_t> ("NRESET"); 49 50 sc_signal<Tcontrol_t > ** in_SPR_ACCESS_VAL ; 51 sc_signal<Tcontrol_t > ** out_SPR_ACCESS_ACK ; 52 sc_signal<Tcontext_t > ** in_SPR_ACCESS_FRONT_END_ID; 53 sc_signal<Tcontext_t > ** in_SPR_ACCESS_CONTEXT_ID ; 54 sc_signal<Tcontrol_t > ** in_SPR_ACCESS_WEN ; 55 sc_signal<Tspr_address_t> ** in_SPR_ACCESS_NUM_GROUP ; 56 sc_signal<Tspr_address_t> ** in_SPR_ACCESS_NUM_REG ; 57 sc_signal<Tspr_t > ** in_SPR_ACCESS_WDATA ; 58 sc_signal<Tspr_t > ** out_SPR_ACCESS_RDATA ; 59 sc_signal<Tcontrol_t > ** out_SPR_ACCESS_INVALID ; 60 61 sc_signal<Tspr_t > *** out_SPR_READ_SR ; 62 63 sc_signal<Tcontrol_t > *** in_SPR_COMMIT_VAL ; 64 sc_signal<Tcontrol_t > *** out_SPR_COMMIT_ACK ; 65 sc_signal<Tcontrol_t > *** in_SPR_COMMIT_SR_F_VAL ; 66 sc_signal<Tcontrol_t > *** in_SPR_COMMIT_SR_F ; 67 sc_signal<Tcontrol_t > *** in_SPR_COMMIT_SR_CY_VAL ; 68 sc_signal<Tcontrol_t > *** in_SPR_COMMIT_SR_CY ; 69 sc_signal<Tcontrol_t > *** in_SPR_COMMIT_SR_OV_VAL ; 70 sc_signal<Tcontrol_t > *** in_SPR_COMMIT_SR_OV ; 71 72 sc_signal<Tcontrol_t > *** in_SPR_EVENT_VAL ; 73 sc_signal<Tcontrol_t > *** out_SPR_EVENT_ACK ; 74 sc_signal<Tspr_t > *** in_SPR_EVENT_EPCR ; 75 sc_signal<Tcontrol_t > *** in_SPR_EVENT_EEAR_WEN ; 76 sc_signal<Tspr_t > *** in_SPR_EVENT_EEAR ; 77 sc_signal<Tcontrol_t > *** in_SPR_EVENT_SR_DSX ; 78 sc_signal<Tcontrol_t > *** in_SPR_EVENT_SR_TO_ESR ; 49 79 50 80 ALLOC1_SC_SIGNAL( in_SPR_ACCESS_VAL ," in_SPR_ACCESS_VAL ",Tcontrol_t ,_param->_nb_inst_reexecute); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Special_Register_unit/include/SPR.h
r117 r128 578 578 public : void reset (void ) 579 579 { 580 thread_id = 0; // not necessary 580 581 }; 581 582 public : Tspr_t read (void ) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/src/OOO_Engine_deallocation.cpp
r123 r128 158 158 159 159 // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 160 for (uint32_t i=0; i<_param->_nb_rename_unit; ++i) 161 delete _component_rename_unit [i] ; 160 162 delete [] _component_rename_unit ; 161 163 delete _component_commit_unit ; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/src/Parameters.cpp
r120 r128 411 411 delete [] _link_front_end_with_rename_unit ; 412 412 413 for (uint32_t i=0; i<_nb_rename_unit; i++) 414 delete _param_rename_unit [i] ; 413 415 delete [] _param_rename_unit ; 414 416 delete _param_commit_unit ; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/src/Core_deallocation.cpp
r123 r128 61 61 delete _component; 62 62 63 //delete _component_glue;64 //delete _component_dcache_access;65 //delete _component_icache_access;66 //for (uint32_t i=0; i<_param->_nb_execute_loop; ++i)67 //delete _component_execute_loop [i];68 //delete [] _component_execute_loop;69 //for (uint32_t i=0; i<_param->_nb_ooo_engine; ++i)70 //delete _component_ooo_engine [i];71 //delete [] _component_ooo_engine;72 //for (uint32_t i=0; i<_param->_nb_front_end; ++i)73 //delete _component_front_end [i];74 //delete [] _component_front_end;63 delete _component_glue; 64 delete _component_dcache_access; 65 delete _component_icache_access; 66 for (uint32_t i=0; i<_param->_nb_execute_loop; ++i) 67 delete _component_execute_loop [i]; 68 delete [] _component_execute_loop; 69 for (uint32_t i=0; i<_param->_nb_ooo_engine; ++i) 70 delete _component_ooo_engine [i]; 71 delete [] _component_ooo_engine; 72 for (uint32_t i=0; i<_param->_nb_front_end; ++i) 73 delete _component_front_end [i]; 74 delete [] _component_front_end; 75 75 76 76 log_end(Core,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/src/Parameters.cpp
r123 r128 394 394 _link_thread_with_context [x.first][x.second] = i; 395 395 } 396 397 // log_printf(TRACE,Core,FUNCTION,_(" * _link_decod_unit_with_decod_bloc")); 396 398 for (uint32_t i=0; i<_nb_decod_bloc; ++i) 397 399 { 398 400 pair_dual x = _link_decod_unit_with_decod_bloc[i]; 399 401 _link_decod_bloc_with_decod_unit [x.first][x.second] = i; 402 // log_printf(TRACE,Core,FUNCTION,_(" [%d][%d] -> %d"),x.first,x.second,i); 400 403 } 404 401 405 for (uint32_t i=0; i<_nb_rename_bloc; ++i) 402 406 { … … 803 807 ALLOC2(_front_end_context_select_load_balancing ,Tload_balancing_t,_nb_front_end,_nb_decod_unit[it1]); 804 808 809 log_printf(TRACE,Core,FUNCTION,_(" * decod_unit")); 810 805 811 for (uint32_t i=0; i<_nb_front_end; ++i) 806 812 { … … 813 819 { 814 820 uint32_t num_decod_bloc=_link_decod_bloc_with_decod_unit[i][j]; 815 821 822 log_printf(TRACE,Core,FUNCTION,_(" [%d][%d] -> %d"),i,j,num_decod_bloc); 823 816 824 _front_end_size_decod_queue [i][j] = _size_decod_queue [num_decod_bloc]; 817 825 _front_end_decod_queue_scheme [i][j] = _decod_queue_scheme [num_decod_bloc]; … … 1827 1835 uint32_t num_load_store_unit = _list_load_store_unit_with_execute_unit [i][j]; 1828 1836 1829 uint32_t num_thread;1830 for (num_thread = 0; num_thread<_nb_thread; ++num_thread)1831 if (_link_load_store_unit_with_thread [num_thread] == num_load_store_unit)1832 break;1833 1837 { 1838 uint32_t num_thread; 1839 for (num_thread = 0; num_thread<_nb_thread; ++num_thread) 1840 if (_link_load_store_unit_with_thread [num_thread] == num_load_store_unit) 1841 break; 1834 1842 #ifdef DEBUG_TEST 1835 if (num_thread == _nb_thread)1836 throw ERRORMORPHEO(FUNCTION,toString(_("Load_store_unit [%d] is not link with a thread.\n"),num_load_store_unit));1843 if (num_thread == _nb_thread) 1844 throw ERRORMORPHEO(FUNCTION,toString(_("Load_store_unit [%d] is not link with a thread.\n"),num_load_store_unit)); 1837 1845 #endif 1846 } 1847 1838 1848 // init with an invalid thread_id 1839 1849 for (uint32_t k=0; k<_dcache_access_nb_context [i]; ++k) … … 1858 1868 uint32_t num_thread = _link_thread_with_context [num_front_end][num_context]; 1859 1869 1860 uint32_t index = ((num_ooo_engine<<(_size_context_id + _size_front_end_id )) | 1861 (num_front_end <<(_size_context_id)) | 1862 (num_context)); 1863 1864 _dcache_access_translate_load_store_unit_to_thread [i][j][index] = num_thread; 1870 if (_link_load_store_unit_with_thread [num_thread] == num_load_store_unit) 1871 { 1872 uint32_t index = ((num_ooo_engine<<(_size_context_id + _size_front_end_id )) | 1873 (num_front_end <<(_size_context_id)) | 1874 (num_context)); 1875 1876 _dcache_access_translate_load_store_unit_to_thread [i][j][index] = num_thread; 1877 } 1865 1878 } 1866 1879 } … … 1960 1973 _nb_thread , 1961 1974 _link_thread_with_context [i] 1962 );1975 ); 1963 1976 1964 1977 ALLOC1(_nb_inst_issue_queue,uint32_t,_nb_ooo_engine); … … 2181 2194 log_begin(Core,FUNCTION); 2182 2195 2183 // for (uint32_t i=0; i<_nb_front_end; ++i) 2184 // delete _param_front_end [i]; 2185 // delete [] _param_front_end; 2186 // for (uint32_t i=0; i<_nb_ooo_engine; ++i) 2187 // delete _param_ooo_engine [i]; 2188 // delete [] _param_ooo_engine; 2189 // for (uint32_t i=0; i<_nb_execute_loop; ++i) 2190 // delete _param_execute_loop [i]; 2191 // delete [] _param_execute_loop; 2192 // delete _param_icache_access; 2193 // delete _param_dcache_access; 2194 // delete _param_glue; 2195 2196 for (uint32_t i=0; i<_nb_front_end; ++i) 2197 delete _param_front_end [i]; 2198 delete [] _param_front_end; 2199 for (uint32_t i=0; i<_nb_ooo_engine; ++i) 2200 delete _param_ooo_engine [i]; 2201 delete [] _param_ooo_engine; 2202 for (uint32_t i=0; i<_nb_execute_loop; ++i) 2203 delete _param_execute_loop [i]; 2204 delete [] _param_execute_loop; 2205 delete _param_icache_access; 2206 delete _param_dcache_access; 2207 delete _param_glue; 2208 2209 DELETE1(_nb_inst_issue_queue ,_nb_ooo_engine); 2210 DELETE1(_issue_queue_in_order ,_nb_ooo_engine); 2196 2211 DELETE3(_dcache_access_translate_load_store_unit_to_thread ,_nb_execute_loop,_execute_loop_nb_load_store_unit[it1],_dcache_access_nb_context[it1]); 2197 2212 DELETE1(_dcache_access_nb_context ,_nb_execute_loop); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/src/Parameters_msg_error.cpp
r117 r128 59 59 // set link 60 60 for (uint32_t i=0; i<_nb_decod_bloc; ++i) 61 nb_link_decod_unit[_link_decod_unit_with_decod_bloc[i].first][_link_decod_unit_with_decod_bloc[i].second] ++; 62 61 { 62 uint32_t num_front_end = _link_decod_unit_with_decod_bloc[i].first; 63 uint32_t num_decod_unit = _link_decod_unit_with_decod_bloc[i].second; 64 65 bool error = false; 66 67 if (num_front_end >= _nb_front_end) 68 { 69 error = true; 70 test.error(toString(_("Decod_bloc [%d] is connected with an invalid front_end (%d).\n"),i,num_front_end)); 71 } 72 73 if (num_decod_unit >= _nb_decod_unit[num_front_end]) 74 { 75 error = true; 76 test.error(toString(_("Decod_bloc [%d] is connected with an invalid decod_unit (%d.%d).\n"),i,num_front_end,num_decod_unit)); 77 } 78 79 if (not error) 80 nb_link_decod_unit[num_front_end][num_decod_unit] ++; 81 } 63 82 // test 64 83 for (uint32_t i=0; i<_nb_front_end; ++i) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/SelfTest/src/main.cpp
r113 r128 56 56 57 57 test (name,param); 58 59 delete param; 58 60 } 59 61 catch (morpheo::ErrorMorpheo & error) -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/Types.h
r82 r128 5 5 * $Id$ 6 6 * 7 * [ 7 * [ Description ] 8 8 * 9 9 */ … … 18 18 19 19 // typedef uint32_t Taddress_t; 20 typedef uint32_t Tdata_t;20 typedef Tgeneral_data_t Tdata_t; 21 21 22 22 }; // end namespace registerfile_monolithic -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_transition.cpp
r111 r128 22 22 log_function(RegisterFile_Monolithic,FUNCTION,_name.c_str()); 23 23 24 if ( _param->_have_init_value and (PORT_READ(in_NRESET) == 0))24 if (PORT_READ(in_NRESET) == 0) 25 25 { 26 for (uint32_t i=0; i<_param->_nb_word; ++i) 27 reg_DATA[i] = fromString<Tdata_t>(_param->_init_value); 26 if (_param->_have_init_value) 27 { 28 for (uint32_t i=0; i<_param->_nb_word; ++i) 29 reg_DATA[i] = fromString<Tdata_t>(_param->_init_value); 30 } 31 else 32 { 33 for (uint32_t i=0; i<_param->_nb_word; ++i) 34 reg_DATA[i] = 0; 35 } 28 36 } 29 37 else … … 31 39 for (uint32_t i=0; i<_param->_nb_port_write; i++) 32 40 { 41 log_printf(TRACE,RegisterFile,FUNCTION," * WRITE [%d] : %d",i,PORT_READ(in_WRITE_VAL[i])); 42 33 43 // Have a write? 34 44 if ( PORT_READ(in_WRITE_VAL[i]) == true) … … 38 48 (*_stat_nb_write) ++; 39 49 #endif 40 50 41 51 Taddress_t address = (_param->_have_port_address)?PORT_READ(in_WRITE_ADDRESS[i]):0; 42 52 Tdata_t data = PORT_READ(in_WRITE_DATA [i]); 53 54 log_printf(TRACE,RegisterFile,FUNCTION," * address : %d",address); 55 log_printf(TRACE,RegisterFile,FUNCTION," * gloup"); 56 log_printf(TRACE,RegisterFile,FUNCTION," * data : %d",data); 43 57 44 58 log_printf(TRACE,RegisterFile,FUNCTION," * [%d] <- %.8x",static_cast<uint32_t>(address),static_cast<uint32_t>(data)); 59 60 #ifdef DEBUG_TEST 61 if (address >= _param->_nb_word) 62 throw ERRORMORPHEO(FUNCTION,toString(_("Address (%d) is invalid (size : %d).\n"),address,_param->_nb_word)); 63 #endif 45 64 46 65 // Write in registerFile … … 50 69 for (uint32_t i=0; i<_param->_nb_port_read_write; i++) 51 70 { 71 log_printf(TRACE,RegisterFile,FUNCTION," * READ_WRITE [%d] : %d",i,PORT_READ(in_READ_WRITE_VAL[i])); 72 52 73 // Have a read_write? 53 74 if (PORT_READ(in_READ_WRITE_VAL[i]) == true) … … 65 86 log_printf(TRACE,RegisterFile,FUNCTION," * [%d] <- %.8x",static_cast<uint32_t>(address),static_cast<uint32_t>(data)); 66 87 88 89 #ifdef DEBUG_TEST 90 if (address >= _param->_nb_word) 91 throw ERRORMORPHEO(FUNCTION,toString(_("Address (%d) is invalid (size : %d).\n"),address,_param->_nb_word)); 92 #endif 93 67 94 // Write in registerFile 68 95 reg_DATA[address] = data; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/include/Types.h
r82 r128 5 5 * $Id$ 6 6 * 7 * [ 7 * [ Description ] 8 8 * 9 9 */ … … 19 19 20 20 //typedef uint32_t Taddress_t; 21 typedef uint32_t Tdata_t;21 typedef Tgeneral_data_t Tdata_t; 22 22 23 23 }; // end namespace registerfile_multi_banked -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/src/RegisterFile_Multi_Banked_transition.cpp
r124 r128 25 25 // call function pointer 26 26 // (this->*function_transition) (); 27 if ( _param->_have_init_value and (PORT_READ(in_NRESET) == 0))27 if (PORT_READ(in_NRESET) == 0) 28 28 { 29 for (uint32_t i=0; i<_param->_nb_bank; ++i) 30 for (uint32_t j=0; j<_param->_nb_word; ++j) 31 reg_DATA[i][j] = fromString<Tdata_t>(_param->_init_value); 29 if (_param->_have_init_value) 30 { 31 for (uint32_t i=0; i<_param->_nb_bank; ++i) 32 for (uint32_t j=0; j<_param->_nb_word; ++j) 33 reg_DATA[i][j] = fromString<Tdata_t>(_param->_init_value); 34 } 35 else 36 { 37 for (uint32_t i=0; i<_param->_nb_bank; ++i) 38 for (uint32_t j=0; j<_param->_nb_word; ++j) 39 reg_DATA[i][j] = 0; 40 } 32 41 } 33 42 else -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/src/RegisterFile_deallocation.cpp
r81 r128 22 22 delete in_NRESET; 23 23 // ----- Interface Read 24 for (uint32_t i=0; i<_param->_nb_port_read; i++) 25 { 26 delete in_READ_VAL [i]; 27 delete out_READ_ACK [i]; 28 if (_param->_have_port_address == true) 29 delete in_READ_ADDRESS[i]; 30 delete out_READ_DATA [i]; 31 } 32 24 33 delete [] in_READ_VAL ; 25 34 delete [] out_READ_ACK ; … … 29 38 30 39 // ----- Interface Write 40 for (uint32_t i=0; i<_param->_nb_port_write; i++) 41 { 42 delete in_WRITE_VAL [i]; 43 delete out_WRITE_ACK [i]; 44 if (_param->_have_port_address == true) 45 delete in_WRITE_ADDRESS[i]; 46 delete in_WRITE_DATA [i]; 47 } 48 31 49 delete [] in_WRITE_VAL ; 32 50 delete [] out_WRITE_ACK ; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Sort/src/Sort.cpp
r123 r128 71 71 if (usage_is_set(_usage,USE_SYSTEMC)) 72 72 { 73 # if defined(STATISTICS) or defined(VHDL_TESTBENCH) 73 74 log_printf(INFO,Sort,FUNCTION,"Method - transition"); 74 75 … … 77 78 sensitive << (*(in_CLOCK)).pos(); 78 79 79 # ifdef SYSTEMCASS_SPECIFIC80 # ifdef SYSTEMCASS_SPECIFIC 80 81 // List dependency information 81 # endif 82 # endif 83 # endif 82 84 83 85 log_printf(INFO,Sort,FUNCTION,"Method - genMealy"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Sort/src/Sort_transition.cpp
r81 r128 14 14 namespace generic { 15 15 namespace sort { 16 17 16 18 17 #undef FUNCTION -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/include/Types.h
r81 r128 47 47 public : entry_t () 48 48 { 49 _entry = NULL; 49 50 }; 50 51 public : entry_t (uint32_t size) : _size (size) … … 53 54 54 55 // initialisation 55 for (uint32_t i=0; i<size; i++) 56 _entry [i] = false; 56 reset (); 57 57 } 58 58 59 59 public : ~entry_t () 60 60 { 61 delete _entry; 61 if (_entry != NULL) 62 delete [] _entry; 63 } 64 65 public : void reset () 66 { 67 // initialisation 68 for (uint32_t i=0; i<_size; i++) 69 _entry [i] = false; 62 70 } 63 71 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_deallocation.cpp
r112 r128 29 29 DELETE1_SIGNAL(out_ACCESS_VICTIM ,_param->_nb_access,log2(_param->_nb_entity )); 30 30 31 DELETE1(reg_TABLE ,_param->_size_table); 31 for (uint32_t i=0; i<_param->_size_table; i++) 32 delete reg_TABLE [i]; 33 delete [] reg_TABLE; 34 32 35 DELETE1(internal_ACCESS_ACK ,_param->_nb_access); 33 36 DELETE1(internal_ACCESS_VICTIM,_param->_nb_access); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_genMealy.cpp
r123 r128 22 22 Taddress_t address = (_param->_size_table>1)?PORT_READ(in_ACCESS_ADDRESS[i]):0; 23 23 24 #ifdef DEBUG_TEST 25 if (address >= _param->_size_table) 26 throw ERRORMORPHEO(FUNCTION,toString(_("Address (%d) is invalid (size : %d).\n"),address,_param->_size_table)); 27 #endif 28 24 29 internal_ACCESS_VICTIM[i] = reg_TABLE[address]->access(); 25 30 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/src/Victim_Pseudo_LRU_transition.cpp
r123 r128 17 17 void Victim_Pseudo_LRU::transition (void) 18 18 { 19 for (uint32_t i=0; i<_param->_nb_access; i++) 19 20 if (PORT_READ(in_NRESET) == 0) 20 21 { 21 if (PORT_READ (in_ACCESS_VAL[i]) and internal_ACCESS_ACK) 22 { 23 Taddress_t address = (_param->_size_table>1)?PORT_READ(in_ACCESS_ADDRESS[i]):0; 24 Tentity_t entity = 0; 22 for (uint32_t i=0; i<_param->_size_table; ++i) 23 reg_TABLE[i]->reset(); 24 } 25 else 26 { 27 for (uint32_t i=0; i<_param->_nb_access; i++) 28 { 29 if (PORT_READ (in_ACCESS_VAL[i]) and internal_ACCESS_ACK) 30 { 31 Taddress_t address = (_param->_size_table>1)?PORT_READ(in_ACCESS_ADDRESS[i]):0; 32 Tentity_t entity = 0; 33 34 if (PORT_READ(in_ACCESS_HIT [i])) 35 { 36 // Hit : don't need a victim 37 // #ifdef STATISTICS 38 // _stat_nb_update ++; 39 // #endif 40 entity = PORT_READ(in_ACCESS_ENTITY[i]); 41 } 42 else 43 { 44 // Miss : need victim 45 // #ifdef STATISTICS 46 // _stat_nb_access ++; 47 // #endif 48 entity = internal_ACCESS_VICTIM[i]; 49 } 50 51 #ifdef DEBUG_TEST 52 if (address >= _param->_size_table) 53 throw ERRORMORPHEO(FUNCTION,toString(_("Address (%d) is invalid (size : %d).\n"),address, _param->_size_table)); 54 #endif 55 reg_TABLE[address]->update(entity); 56 } 57 }//end for i 58 } 25 59 26 if (PORT_READ(in_ACCESS_HIT [i]))27 {28 // Hit : don't need a victim29 // #ifdef STATISTICS30 // _stat_nb_update ++;31 // #endif32 entity = PORT_READ(in_ACCESS_ENTITY[i]);33 }34 else35 {36 // Miss : need victim37 // #ifdef STATISTICS38 // _stat_nb_access ++;39 // #endif40 entity = internal_ACCESS_VICTIM[i];41 }42 43 reg_TABLE[address]->update(entity);44 }45 }//end for i46 47 60 #if defined(STATISTICS) or defined(VHDL_TESTBENCH) 48 61 end_cycle (); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/src/Victim_deallocation.cpp
r112 r128 38 38 delete in_NRESET; 39 39 40 for (uint32_t i=0; i<_param->_nb_access; ++i) 41 { 42 delete in_ACCESS_VAL [i]; 43 delete out_ACCESS_ACK [i]; 44 if (_param->_have_port_address) 45 delete in_ACCESS_ADDRESS[i]; 46 delete in_ACCESS_HIT [i]; 47 delete in_ACCESS_ENTITY [i]; 48 delete out_ACCESS_VICTIM [i]; 49 } 50 40 51 delete [] in_ACCESS_VAL ; 41 52 delete [] out_ACCESS_ACK ; … … 47 58 } 48 59 49 50 60 log_printf(FUNC,Victim,FUNCTION,"End"); 51 61 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.Selftest
r117 r128 25 25 #MODELTECH_LIBRARY = $(LIBRARY) 26 26 27 EXEC_PREFIX = 28 #$(VALGRIND) 27 EXEC_PREFIX = $(VALGRIND) 29 28 EXEC_PARAMS = $(SYSTEMC_EXEC_PARAMS_$(SIMULATOR_SYSTEMC)) 30 29 EXEC_LOG = $(patsubst $(DIR_CFG_GEN)/%.cfg,$(DIR_LOG)/%.exec.log,$(wildcard $(DIR_CFG_GEN)/*.cfg)) \ -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Allocation.h
r122 r128 15 15 // ====================================================================== 16 16 #define ALLOC0(var,type) \ 17 var = new type 18 19 #define ALLOC1(var,type,s1) \ 20 var = new type [s1] 21 17 do \ 18 { \ 19 var = new type; \ 20 } while (0) 21 22 #define ALLOC1(var,type,s1) \ 23 do \ 24 { \ 25 var = new type [s1]; \ 26 } while (0) 27 22 28 #define ALLOC2(var,type,s1,s2) \ 23 var = new type * [s1]; \ 24 for (uint32_t it1=0; it1<s1; ++it1) \ 29 do \ 25 30 { \ 26 var [it1] = new type [s2]; \ 27 } 31 var = new type * [s1]; \ 32 for (uint32_t it1=0; it1<s1; ++it1) \ 33 { \ 34 var [it1] = new type [s2]; \ 35 } \ 36 } while (0) 28 37 29 38 #define ALLOC3(var,type,s1,s2,s3) \ 30 var = new type ** [s1]; \ 31 for (uint32_t it1=0; it1<s1; ++it1) \ 39 do \ 32 40 { \ 33 var [it1] = new type * [s2];\34 for (uint32_t it 2=0; it2<s2; ++it2) \41 var = new type ** [s1]; \ 42 for (uint32_t it1=0; it1<s1; ++it1) \ 35 43 { \ 36 var [it1][it2] = new type [s3]; \ 44 var [it1] = new type * [s2]; \ 45 for (uint32_t it2=0; it2<s2; ++it2) \ 46 { \ 47 var [it1][it2] = new type [s3]; \ 48 } \ 37 49 } \ 38 } 39 50 } while (0) 51 40 52 #define ALLOC4(var,type,s1,s2,s3,s4) \ 41 var = new type *** [s1]; \ 42 for (uint32_t it1=0; it1<s1; ++it1) \ 53 do \ 43 54 { \ 44 var [it1] = new type ** [s2];\45 for (uint32_t it 2=0; it2<s2; ++it2) \55 var = new type *** [s1]; \ 56 for (uint32_t it1=0; it1<s1; ++it1) \ 46 57 { \ 47 var [it1] [it2] = new type * [s3];\48 for (uint32_t it 3=0; it3<s3; ++it3) \58 var [it1] = new type ** [s2]; \ 59 for (uint32_t it2=0; it2<s2; ++it2) \ 49 60 { \ 50 var [it1][it2][it3] = new type [s4]; \ 61 var [it1][it2] = new type * [s3]; \ 62 for (uint32_t it3=0; it3<s3; ++it3) \ 63 { \ 64 var [it1][it2][it3] = new type [s4]; \ 65 } \ 51 66 } \ 52 67 } \ 53 } 68 } while (0) 54 69 55 70 #define DELETE0(var) \ 56 delete var; 57 58 #define DELETE1(var,s1) \ 59 delete [] var; 60 61 #define DELETE2(var,s1,s2) \ 62 for (uint32_t it1=0; it1<s1; ++it1) \ 71 do \ 72 { \ 73 delete var; \ 74 } while (0) 75 76 #define DELETE1(var,s1) \ 77 do \ 78 { \ 79 delete [] var; \ 80 } while (0) 81 82 #define DELETE2(var,s1,s2) \ 83 do \ 63 84 { \ 64 delete [] var [it1]; \ 65 } \ 66 delete [] var; 67 85 for (uint32_t it1=0; it1<s1; ++it1) \ 86 { \ 87 delete [] var [it1]; \ 88 } \ 89 delete [] var; \ 90 } while (0) 91 68 92 #define DELETE3(var,s1,s2,s3) \ 69 for (uint32_t it1=0; it1<s1; ++it1)\93 do \ 70 94 { \ 71 for (uint32_t it 2=0; it2<s2; ++it2) \95 for (uint32_t it1=0; it1<s1; ++it1) \ 72 96 { \ 73 delete [] var [it1][it2]; \ 97 for (uint32_t it2=0; it2<s2; ++it2) \ 98 { \ 99 delete [] var [it1][it2]; \ 100 } \ 101 delete [] var [it1]; \ 74 102 } \ 75 delete [] var [it1]; \ 76 } \ 77 delete [] var; 78 79 #define DELETE4(var,s1,s2,s3,s4) \ 80 for (uint32_t it1=0; it1<s1; ++it1) \ 81 { \ 82 for (uint32_t it2=0; it2<s2; ++it2) \ 83 { \ 84 for (uint32_t it3=0; it3<s3; ++it3) \ 85 { \ 86 delete [] var [it1][it2][it3]; \ 87 } \ 88 delete [] var [it1][it2]; \ 89 } \ 90 delete [] var [it1]; \ 91 } \ 92 delete [] var; 103 delete [] var; \ 104 } while (0) 105 106 #define DELETE4(var,s1,s2,s3,s4) \ 107 do \ 108 { \ 109 for (uint32_t it1=0; it1<s1; ++it1) \ 110 { \ 111 for (uint32_t it2=0; it2<s2; ++it2) \ 112 { \ 113 for (uint32_t it3=0; it3<s3; ++it3) \ 114 { \ 115 delete [] var [it1][it2][it3]; \ 116 } \ 117 delete [] var [it1][it2]; \ 118 } \ 119 delete [] var [it1]; \ 120 } \ 121 delete [] var; \ 122 } while (0) 93 123 94 124 // ====================================================================== … … 108 138 109 139 #define __ALLOC0_SIGNAL(sig, name, type) \ 110 { \ 111 sig = new type (name); \ 112 } 140 do \ 141 { \ 142 sig = new type (name); \ 143 } while (0) 113 144 114 145 #ifdef POSITION … … 125 156 126 157 #define ALLOC0_VAL_ACK_IN( sig, name, type) \ 127 { \ 128 sig = interface->set_signal_valack_in (name, type); \ 129 } 158 do \ 159 { \ 160 sig = interface->set_signal_valack_in (name, type); \ 161 } while (0) 162 130 163 #define ALLOC0_VAL_ACK_OUT( sig, name, type) \ 131 { \ 132 sig = interface->set_signal_valack_out(name, type); \ 133 } 164 do \ 165 { \ 166 sig = interface->set_signal_valack_out(name, type); \ 167 } while (0) 168 134 169 #define ALLOC0_VALACK_IN( sig, type) \ 135 { \ 136 sig = interface->set_signal_valack_in (type); \ 137 } 138 #define ALLOC0_VALACK_OUT( sig, type) \ 139 { \ 140 sig = interface->set_signal_valack_out(type); \ 141 } 142 #define ALLOC0_SIGNAL_IN( sig, name, type, size) \ 143 if (size > 0) \ 144 { \ 145 sig = interface->set_signal_in <type> (name, size); \ 146 } \ 147 else \ 148 { \ 149 PRINT_SIZE_NUL(_component,interface,name); \ 150 } 151 152 #define ALLOC0_SIGNAL_OUT( sig, name, type, size) \ 153 if (size > 0) \ 154 { \ 155 sig = interface->set_signal_out<type> (name, size); \ 156 } \ 157 else \ 158 { \ 159 PRINT_SIZE_NUL(_component,interface,name); \ 160 } 170 do \ 171 { \ 172 sig = interface->set_signal_valack_in (type); \ 173 } while (0) 174 175 #define ALLOC0_VALACK_OUT( sig, type) \ 176 do \ 177 { \ 178 sig = interface->set_signal_valack_out(type); \ 179 } while (0) 180 181 #define ALLOC0_SIGNAL_IN( sig, name, type, size) \ 182 do \ 183 { \ 184 if (size > 0) \ 185 { \ 186 sig = interface->set_signal_in <type> (name, size); \ 187 } \ 188 else \ 189 { \ 190 PRINT_SIZE_NUL(_component,interface,name); \ 191 } \ 192 } while (0) 193 194 #define ALLOC0_SIGNAL_OUT( sig, name, type, size) \ 195 do \ 196 { \ 197 if (size > 0) \ 198 { \ 199 sig = interface->set_signal_out<type> (name, size); \ 200 } \ 201 else \ 202 { \ 203 PRINT_SIZE_NUL(_component,interface,name); \ 204 } \ 205 } while (0) 161 206 162 207 #define DELETE0_SIGNAL( sig, size) \ 163 if (size > 0) \ 164 { \ 208 do \ 209 { \ 210 if (size > 0) \ 211 { \ 212 delete sig; \ 213 } \ 214 } while (0) 215 216 #define ALLOC0_FOREIGN_SIGNAL_IN( sig, interface, name, type, size) \ 217 do \ 218 { \ 219 if (size > 0) \ 220 { \ 221 std::string str = (toString("in")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(name)); \ 222 sig = new SC_IN (type) (str.c_str()); \ 223 } \ 224 } while (0) 225 226 #define ALLOC0_FOREIGN_SIGNAL_OUT( sig, interface, name, type, size) \ 227 do \ 228 { \ 229 if (size > 0) \ 230 { \ 231 std::string str = (toString("out")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(name)); \ 232 sig = new SC_OUT (type) (str.c_str()); \ 233 } \ 234 } while (0) 235 236 #define DELETE0_FOREIGN_SIGNAL( sig, size) \ 237 do \ 238 { \ 239 DELETE0_SIGNAL(sig,size); \ 240 } while (0) 241 242 #define INSTANCE0_FOREIGN_SIGNAL(component, sig, type, name, size) \ 243 do \ 244 { \ 245 if (size > 0) \ 246 { \ 247 INSTANCE_FOREIGN_PRINT(name); \ 248 _component->set_sc_signal<type>(_name,name,static_cast<void*>(component->sig)); \ 249 } \ 250 } while (0) 251 252 #define ALLOC0_SC_SIGNAL( sig, name, type) \ 253 do \ 254 { \ 255 sig = new sc_signal<type> (name); \ 256 PRINT_SIGNAL_ADDRESS(name,sig); \ 257 } while (0) 258 259 #define INSTANCE0_SC_SIGNAL(component, sig) \ 260 do \ 261 { \ 262 TEST_SIGNAL(component->sig->name(),component->sig); \ 263 TEST_SIGNAL(sig ->name(),sig); \ 264 (*(component->sig)) (*(sig)); \ 265 } while (0) 266 267 #define _INSTANCE0_SC_SIGNAL(component, sig1,sig2) \ 268 do \ 269 { \ 270 TEST_SIGNAL(component->sig1->name(),component->sig1); \ 271 TEST_SIGNAL(sig2 ->name(),sig2); \ 272 (*(component->sig1)) (*(sig2)); \ 273 } while (0) 274 275 #define DELETE0_SC_SIGNAL( sig) \ 276 do \ 277 { \ 278 PRINT_SIGNAL_ADDRESS("",sig); \ 165 279 delete sig; \ 166 } 167 168 #define ALLOC0_FOREIGN_SIGNAL_IN( sig, interface, name, type, size) \ 169 if (size > 0) \ 170 { \ 171 std::string str = (toString("in")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(name)); \ 172 sig = new SC_IN (type) (str.c_str()); \ 173 } 174 175 #define ALLOC0_FOREIGN_SIGNAL_OUT( sig, interface, name, type, size) \ 176 if (size > 0) \ 177 { \ 178 std::string str = (toString("out")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(name)); \ 179 sig = new SC_OUT (type) (str.c_str()); \ 180 } 181 182 #define DELETE0_FOREIGN_SIGNAL( sig, size) \ 183 { \ 184 DELETE0_SIGNAL(sig,size); \ 185 } 186 187 #define INSTANCE0_FOREIGN_SIGNAL(component, sig, type, name, size) \ 188 if (size > 0) \ 189 { \ 190 INSTANCE_FOREIGN_PRINT(name); \ 191 _component->set_sc_signal<type>(_name,name,static_cast<void*>(component->sig)); \ 192 } 193 194 #define ALLOC0_SC_SIGNAL( sig, name, type) \ 195 sig = new sc_signal<type> (name); \ 196 PRINT_SIGNAL_ADDRESS(name,sig); 197 198 #define INSTANCE0_SC_SIGNAL(component, sig) \ 199 { \ 200 TEST_SIGNAL(component->sig->name(),component->sig); \ 201 TEST_SIGNAL(sig ->name(),sig); \ 202 (*(component->sig)) (*(sig)); \ 203 } 204 205 #define _INSTANCE0_SC_SIGNAL(component, sig1,sig2) \ 206 { \ 207 TEST_SIGNAL(component->sig1->name(),component->sig1); \ 208 TEST_SIGNAL(sig2 ->name(),sig2); \ 209 (*(component->sig1)) (*(sig2)); \ 210 } 211 212 #define DELETE0_SC_SIGNAL( sig) \ 213 { \ 214 PRINT_SIGNAL_ADDRESS("",sig); \ 215 delete sig; \ 216 } 280 } while (0) 217 281 218 282 // ---------------------------------------------------------------------- … … 220 284 // ---------------------------------------------------------------------- 221 285 222 #define __ALLOC1_INTERFACE_BEGIN(name, x1) 286 #define __ALLOC1_INTERFACE_BEGIN(name, x1) \ 223 287 INTERFACE_PRINT(name); \ 224 288 const std::string interface_name = name; \ … … 228 292 229 293 #define __ALLOC1_SIGNAL_IN( sig, name, type) \ 230 { \ 231 sig = new SC_IN(type) * [iterator_1]; \ 232 std::string separator="_"; \ 233 for (uint32_t it1=0; it1<iterator_1; it1++) \ 234 { \ 235 std::string str = "in_"+interface_name+separator+toString(it1)+separator+name; \ 236 sig [it1] = new SC_IN(type) (str.c_str()); \ 237 } \ 238 } 294 do \ 295 { \ 296 sig = new SC_IN(type) * [iterator_1]; \ 297 std::string separator="_"; \ 298 for (uint32_t it1=0; it1<iterator_1; it1++) \ 299 { \ 300 std::string str = "in_"+interface_name+separator+toString(it1)+separator+name; \ 301 sig [it1] = new SC_IN(type) (str.c_str()); \ 302 } \ 303 } while (0) 304 239 305 240 306 #define __ALLOC1_SIGNAL_OUT( sig, name, type) \ 241 { \ 242 sig = new SC_OUT(type) * [iterator_1]; \ 243 std::string separator="_"; \ 244 for (uint32_t it1=0; it1<iterator_1; it1++) \ 245 { \ 246 std::string str = "out_"+interface_name+separator+toString(it1)+separator+name; \ 247 sig [it1] = new SC_OUT(type) (str.c_str()); \ 248 } \ 249 } 307 do \ 308 { \ 309 sig = new SC_OUT(type) * [iterator_1]; \ 310 std::string separator="_"; \ 311 for (uint32_t it1=0; it1<iterator_1; it1++) \ 312 { \ 313 std::string str = "out_"+interface_name+separator+toString(it1)+separator+name; \ 314 sig [it1] = new SC_OUT(type) (str.c_str()); \ 315 } \ 316 } while (0) 250 317 251 318 #ifdef POSITION … … 264 331 } 265 332 #else 266 #define ALLOC1_INTERFACE_BEGIN( name, direction, localisation, str, x1) 333 #define ALLOC1_INTERFACE_BEGIN( name, direction, localisation, str, x1) \ 267 334 INTERFACE_PRINT(name); \ 268 335 uint32_t iterator_1 = 0; \ … … 279 346 #endif 280 347 281 #define ALLOC1_INTERFACE_END(x1) \ 282 delete [] interface; 348 #define ALLOC1_INTERFACE_END(x1) \ 349 do \ 350 { \ 351 delete [] interface; \ 352 } while (0) 283 353 284 354 #define ALLOC1_VAL_ACK_IN( sig, name, type) \ 285 { \ 286 sig = new SC_IN (Tcontrol_t) * [iterator_1]; \ 287 for (uint32_t it1=0; it1<iterator_1; it1++) \ 288 { \ 289 sig [it1] = interface[it1]->set_signal_valack_in (name, type); \ 290 } \ 291 } 355 do \ 356 { \ 357 sig = new SC_IN (Tcontrol_t) * [iterator_1]; \ 358 for (uint32_t it1=0; it1<iterator_1; it1++) \ 359 { \ 360 sig [it1] = interface[it1]->set_signal_valack_in (name, type); \ 361 } \ 362 } while (0) 363 292 364 #define ALLOC1_VAL_ACK_OUT(sig, name, type) \ 293 { \ 294 sig = new SC_OUT(Tcontrol_t) * [iterator_1]; \ 295 for (uint32_t it1=0; it1<iterator_1; it1++) \ 296 { \ 297 sig [it1] = interface[it1]->set_signal_valack_out(name, type); \ 298 } \ 299 } 365 do \ 366 { \ 367 sig = new SC_OUT(Tcontrol_t) * [iterator_1]; \ 368 for (uint32_t it1=0; it1<iterator_1; it1++) \ 369 { \ 370 sig [it1] = interface[it1]->set_signal_valack_out(name, type); \ 371 } \ 372 } while (0) 373 300 374 #define ALLOC1_VALACK_IN( sig, type) \ 301 { \ 302 sig = new SC_IN (Tcontrol_t) * [iterator_1]; \ 303 for (uint32_t it1=0; it1<iterator_1; it1++) \ 304 { \ 305 sig [it1] = interface[it1]->set_signal_valack_in (type); \ 306 } \ 307 } 375 do \ 376 { \ 377 sig = new SC_IN (Tcontrol_t) * [iterator_1]; \ 378 for (uint32_t it1=0; it1<iterator_1; it1++) \ 379 { \ 380 sig [it1] = interface[it1]->set_signal_valack_in (type); \ 381 } \ 382 } while (0) 383 308 384 #define ALLOC1_VALACK_OUT( sig, type) \ 309 { \ 310 sig = new SC_OUT(Tcontrol_t) * [iterator_1]; \ 311 for (uint32_t it1=0; it1<iterator_1; it1++) \ 312 { \ 313 sig [it1] = interface[it1]->set_signal_valack_out(type); \ 314 } \ 315 } 385 do \ 386 { \ 387 sig = new SC_OUT(Tcontrol_t) * [iterator_1]; \ 388 for (uint32_t it1=0; it1<iterator_1; it1++) \ 389 { \ 390 sig [it1] = interface[it1]->set_signal_valack_out(type); \ 391 } \ 392 } while (0) 393 316 394 #define ALLOC1_SIGNAL_IN( sig, name, type, size) \ 317 { \ 318 sig = new SC_IN (type) * [iterator_1]; \ 319 for (uint32_t it1=0; it1<iterator_1; it1++) \ 320 { \ 395 do \ 396 { \ 397 sig = new SC_IN (type) * [iterator_1]; \ 398 for (uint32_t it1=0; it1<iterator_1; it1++) \ 399 { \ 400 if (size > 0) \ 401 { \ 402 sig [it1] = interface[it1]->set_signal_in <type> (name, size); \ 403 } \ 404 else \ 405 { \ 406 PRINT_SIZE_NUL(_component,interface[it1],name); \ 407 } \ 408 } \ 409 } while (0) 410 411 #define ALLOC1_SIGNAL_OUT(sig, name, type, size) \ 412 do \ 413 { \ 414 sig = new SC_OUT(type) * [iterator_1]; \ 415 for (uint32_t it1=0; it1<iterator_1; it1++) \ 416 { \ 417 if (size > 0) \ 418 { \ 419 sig [it1] = interface[it1]->set_signal_out<type> (name, size); \ 420 } \ 421 else \ 422 { \ 423 PRINT_SIZE_NUL(_component,interface[it1],name); \ 424 } \ 425 } \ 426 } while (0) 427 428 #define DELETE1_SIGNAL(sig, x1, size) \ 429 do \ 430 { \ 431 for (uint32_t it1=0; it1<x1; it1++) \ 432 { \ 433 if (size > 0) \ 434 { \ 435 delete sig[it1]; \ 436 } \ 437 } \ 438 delete [] sig; \ 439 } while (0) 440 441 #define ALLOC1_FOREIGN_SIGNAL_IN(sig, interface, name, type, size,x1) \ 442 do \ 443 { \ 444 sig = new SC_IN (type) * [x1]; \ 445 for (uint32_t it1=0; it1<x1; it1++) \ 321 446 if (size > 0) \ 322 447 { \ 323 sig [it1] = interface[it1]->set_signal_in <type> (name, size); \ 448 std::string str = (toString("in")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(it1)+"_"+toString(name)); \ 449 sig [it1] = new SC_IN (type) (str.c_str()); \ 324 450 } \ 325 else \ 451 } while (0) 452 453 #define ALLOC1_FOREIGN_SIGNAL_OUT(sig, interface, name, type, size,x1) \ 454 do \ 455 { \ 456 sig = new SC_OUT (type) * [x1]; \ 457 for (uint32_t it1=0; it1<x1; it1++) \ 458 if (size > 0) \ 326 459 { \ 327 PRINT_SIZE_NUL(_component,interface[it1],name); \ 460 std::string str = (toString("out")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(it1)+"_"+toString(name)); \ 461 sig [it1] = new SC_OUT (type) (str.c_str()); \ 462 } \ 463 } while (0) 464 465 #define DELETE1_FOREIGN_SIGNAL( sig, size,x1) \ 466 do \ 467 { \ 468 DELETE1_SIGNAL(sig,x1,size); \ 469 } while (0) 470 471 #define ALLOC1_SC_SIGNAL( sig, name, type, x1) \ 472 do \ 473 { \ 474 sig = new sc_signal<type> * [x1]; \ 475 { \ 476 std::string separator="_"; \ 477 std::string str; \ 478 for (uint32_t it1=0; it1<x1; it1++) \ 479 { \ 480 str = name+separator+toString(it1); \ 481 sig [it1] = new sc_signal<type> (str.c_str()); \ 482 PRINT_SIGNAL_ADDRESS(str.c_str(),sig[it1]); \ 328 483 } \ 329 484 } \ 330 } 331 332 #define ALLOC1_SIGNAL_OUT(sig, name, type, size) \ 333 { \ 334 sig = new SC_OUT(type) * [iterator_1]; \ 335 for (uint32_t it1=0; it1<iterator_1; it1++) \ 336 { \ 337 if (size > 0) \ 338 { \ 339 sig [it1] = interface[it1]->set_signal_out<type> (name, size); \ 340 } \ 341 else \ 342 { \ 343 PRINT_SIZE_NUL(_component,interface[it1],name); \ 344 } \ 345 } \ 346 } 347 348 #define DELETE1_SIGNAL(sig, x1, size) \ 349 { \ 350 for (uint32_t it1=0; it1<x1; it1++) \ 351 { \ 352 if (size > 0) \ 353 { \ 354 delete sig[it1]; \ 355 } \ 356 } \ 357 delete [] sig; \ 358 } 359 360 #define ALLOC1_FOREIGN_SIGNAL_IN(sig, interface, name, type, size,x1) \ 361 { \ 362 sig = new SC_IN (type) * [x1]; \ 363 for (uint32_t it1=0; it1<x1; it1++) \ 364 if (size > 0) \ 365 { \ 366 std::string str = (toString("in")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(it1)+"_"+toString(name)); \ 367 sig [it1] = new SC_IN (type) (str.c_str()); \ 368 } \ 369 } 370 371 #define ALLOC1_FOREIGN_SIGNAL_OUT(sig, interface, name, type, size,x1) \ 372 { \ 373 sig = new SC_OUT (type) * [x1]; \ 374 for (uint32_t it1=0; it1<x1; it1++) \ 375 if (size > 0) \ 376 { \ 377 std::string str = (toString("out")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(it1)+"_"+toString(name)); \ 378 sig [it1] = new SC_OUT (type) (str.c_str()); \ 379 } \ 380 } 381 382 #define DELETE1_FOREIGN_SIGNAL( sig, size,x1) \ 383 { \ 384 DELETE1_SIGNAL(sig,x1,size); \ 385 } 386 387 #define ALLOC1_SC_SIGNAL( sig, name, type, x1) \ 388 sig = new sc_signal<type> * [x1]; \ 389 { \ 390 std::string separator="_"; \ 391 std::string str; \ 392 for (uint32_t it1=0; it1<x1; it1++) \ 393 { \ 394 str = name+separator+toString(it1); \ 395 sig [it1] = new sc_signal<type> (str.c_str()); \ 396 PRINT_SIGNAL_ADDRESS(str.c_str(),sig[it1]); \ 397 } \ 398 } 399 400 #define INSTANCE1_SC_SIGNAL(component, sig, x1) \ 401 for (uint32_t it1=0; it1<x1; it1++) \ 402 { \ 403 TEST_SIGNAL(component->sig [it1]->name(),component->sig [it1]); \ 404 TEST_SIGNAL(sig [it1]->name(),sig [it1]); \ 405 (*(component->sig[it1])) (*(sig[it1])); \ 406 } 407 408 #define _INSTANCE1_SC_SIGNAL(component, sig1, sig2, x1) \ 409 for (uint32_t it1=0; it1<x1; it1++) \ 410 { \ 411 TEST_SIGNAL(component->sig1 [it1]->name(),component->sig1 [it1]); \ 412 TEST_SIGNAL(sig2 [it1]->name(),sig2 [it1]); \ 413 (*(component->sig1[it1])) (*(sig2[it1])); \ 414 } 485 } while (0) 486 487 #define INSTANCE1_SC_SIGNAL(component, sig, x1) \ 488 do \ 489 { \ 490 for (uint32_t it1=0; it1<x1; it1++) \ 491 { \ 492 TEST_SIGNAL(component->sig [it1]->name(),component->sig [it1]); \ 493 TEST_SIGNAL(sig [it1]->name(),sig [it1]); \ 494 (*(component->sig[it1])) (*(sig[it1])); \ 495 } \ 496 } while (0) 497 498 #define _INSTANCE1_SC_SIGNAL(component, sig1, sig2, x1) \ 499 do \ 500 { \ 501 for (uint32_t it1=0; it1<x1; it1++) \ 502 { \ 503 TEST_SIGNAL(component->sig1 [it1]->name(),component->sig1 [it1]); \ 504 TEST_SIGNAL(sig2 [it1]->name(),sig2 [it1]); \ 505 (*(component->sig1[it1])) (*(sig2[it1])); \ 506 } \ 507 } while (0) 415 508 416 509 #define DELETE1_SC_SIGNAL(sig, x1) \ 417 { \ 418 for (uint32_t it1=0; it1<x1; it1++) \ 419 { \ 420 PRINT_SIGNAL_ADDRESS("",sig[it1]); \ 421 delete sig[it1]; \ 422 } \ 423 delete [] sig; \ 424 } 510 do \ 511 { \ 512 for (uint32_t it1=0; it1<x1; it1++) \ 513 { \ 514 PRINT_SIGNAL_ADDRESS("",sig[it1]); \ 515 delete sig[it1]; \ 516 } \ 517 delete [] sig; \ 518 } while (0) 425 519 426 520 // ---------------------------------------------------------------------- … … 429 523 430 524 #ifdef POSITION 431 #define ALLOC2_INTERFACE_BEGIN( name, direction, localisation, str, x1, x2) 525 #define ALLOC2_INTERFACE_BEGIN( name, direction, localisation, str, x1, x2) \ 432 526 INTERFACE_PRINT(name); \ 433 527 uint32_t iterator_1 = 0; \ … … 449 543 } 450 544 #else 451 #define ALLOC2_INTERFACE_BEGIN( name, direction, localisation, str, x1, x2) 545 #define ALLOC2_INTERFACE_BEGIN( name, direction, localisation, str, x1, x2) \ 452 546 INTERFACE_PRINT(name); \ 453 547 uint32_t iterator_1 = 0; \ … … 471 565 472 566 #define ALLOC2_INTERFACE_END(x1, x2) \ 473 for (uint32_t it1=0; it1<x1; it1++) \ 474 delete [] interface [it1]; \ 475 delete [] interface; 567 do \ 568 { \ 569 for (uint32_t it1=0; it1<x1; it1++) \ 570 delete [] interface [it1]; \ 571 delete [] interface; \ 572 } while (0) 476 573 477 574 #define _ALLOC2_VAL_ACK_IN( sig, name, type, x1, x2) \ 478 { \ 479 sig = new SC_IN (Tcontrol_t) ** [x1]; \ 480 for (uint32_t it1=0; it1<x1; it1++) \ 481 { \ 482 sig [it1] = new SC_IN (Tcontrol_t) * [x2]; \ 483 for (uint32_t it2=0; it2<x2; it2++) \ 484 { \ 485 sig [it1][it2] = interface[it1][it2]->set_signal_valack_in (name, type); \ 486 } \ 487 } \ 488 } 575 do \ 576 { \ 577 sig = new SC_IN (Tcontrol_t) ** [x1]; \ 578 for (uint32_t it1=0; it1<x1; it1++) \ 579 { \ 580 sig [it1] = new SC_IN (Tcontrol_t) * [x2]; \ 581 for (uint32_t it2=0; it2<x2; it2++) \ 582 { \ 583 sig [it1][it2] = interface[it1][it2]->set_signal_valack_in (name, type); \ 584 } \ 585 } \ 586 } while (0) 489 587 490 588 #define _ALLOC2_VAL_ACK_OUT( sig, name, type, x1, x2) \ 491 { \ 492 sig = new SC_OUT (Tcontrol_t) ** [x1]; \ 493 for (uint32_t it1=0; it1<x1; it1++) \ 494 { \ 495 sig [it1] = new SC_OUT (Tcontrol_t) * [x2]; \ 496 for (uint32_t it2=0; it2<x2; it2++) \ 497 { \ 498 sig [it1][it2] = interface[it1][it2]->set_signal_valack_out (name, type); \ 499 } \ 500 } \ 501 } 589 do \ 590 { \ 591 sig = new SC_OUT (Tcontrol_t) ** [x1]; \ 592 for (uint32_t it1=0; it1<x1; it1++) \ 593 { \ 594 sig [it1] = new SC_OUT (Tcontrol_t) * [x2]; \ 595 for (uint32_t it2=0; it2<x2; it2++) \ 596 { \ 597 sig [it1][it2] = interface[it1][it2]->set_signal_valack_out (name, type); \ 598 } \ 599 } \ 600 } while (0) 502 601 503 602 #define _ALLOC2_VALACK_IN( sig,type, x1, x2) \ 504 { \ 505 sig = new SC_IN (Tcontrol_t) ** [x1]; \ 506 for (uint32_t it1=0; it1<x1; it1++) \ 507 { \ 508 sig [it1] = new SC_IN (Tcontrol_t) * [x2]; \ 509 for (uint32_t it2=0; it2<x2; it2++) \ 510 { \ 511 sig [it1][it2] = interface[it1][it2]->set_signal_valack_in (type); \ 512 } \ 513 } \ 514 } 603 do \ 604 { \ 605 sig = new SC_IN (Tcontrol_t) ** [x1]; \ 606 for (uint32_t it1=0; it1<x1; it1++) \ 607 { \ 608 sig [it1] = new SC_IN (Tcontrol_t) * [x2]; \ 609 for (uint32_t it2=0; it2<x2; it2++) \ 610 { \ 611 sig [it1][it2] = interface[it1][it2]->set_signal_valack_in (type); \ 612 } \ 613 } \ 614 } while (0) 515 615 516 616 #define _ALLOC2_VALACK_OUT( sig,type, x1, x2) \ 517 { \ 518 sig = new SC_OUT (Tcontrol_t) ** [x1]; \ 519 for (uint32_t it1=0; it1<x1; it1++) \ 520 { \ 521 sig [it1] = new SC_OUT (Tcontrol_t) * [x2]; \ 522 for (uint32_t it2=0; it2<x2; it2++) \ 523 { \ 524 sig [it1][it2] = interface[it1][it2]->set_signal_valack_out (type); \ 525 } \ 526 } \ 527 } 617 do \ 618 { \ 619 sig = new SC_OUT (Tcontrol_t) ** [x1]; \ 620 for (uint32_t it1=0; it1<x1; it1++) \ 621 { \ 622 sig [it1] = new SC_OUT (Tcontrol_t) * [x2]; \ 623 for (uint32_t it2=0; it2<x2; it2++) \ 624 { \ 625 sig [it1][it2] = interface[it1][it2]->set_signal_valack_out (type); \ 626 } \ 627 } \ 628 } while (0) 528 629 529 630 #define _ALLOC2_SIGNAL_IN( sig, name, type, size, x1, x2) \ 530 { \ 531 sig = new SC_IN (type) ** [x1]; \ 532 for (uint32_t it1=0; it1<x1; it1++) \ 533 { \ 534 sig [it1] = new SC_IN (type) * [x2]; \ 535 for (uint32_t it2=0; it2<x2; it2++) \ 536 { \ 537 if (size > 0) \ 538 { \ 539 sig [it1][it2] = interface[it1][it2]->set_signal_in <type> (name, size); \ 540 } \ 541 else \ 542 { \ 543 PRINT_SIZE_NUL(_component,interface[it1][it2],name); \ 544 } \ 545 } \ 546 } \ 547 } 631 do \ 632 { \ 633 sig = new SC_IN (type) ** [x1]; \ 634 for (uint32_t it1=0; it1<x1; it1++) \ 635 { \ 636 sig [it1] = new SC_IN (type) * [x2]; \ 637 for (uint32_t it2=0; it2<x2; it2++) \ 638 { \ 639 if (size > 0) \ 640 { \ 641 sig [it1][it2] = interface[it1][it2]->set_signal_in <type> (name, size); \ 642 } \ 643 else \ 644 { \ 645 PRINT_SIZE_NUL(_component,interface[it1][it2],name); \ 646 } \ 647 } \ 648 } \ 649 } while (0) 548 650 549 651 #define _ALLOC2_SIGNAL_OUT( sig, name, type, size, x1, x2) \ 550 { \ 551 sig = new SC_OUT (type) ** [x1]; \ 552 for (uint32_t it1=0; it1<x1; it1++) \ 553 { \ 554 sig [it1] = new SC_OUT (type) * [x2]; \ 555 for (uint32_t it2=0; it2<x2; it2++) \ 556 { \ 557 if (size > 0) \ 558 { \ 559 sig [it1][it2] = interface[it1][it2]->set_signal_out <type> (name, size); \ 560 } \ 561 else \ 562 { \ 563 PRINT_SIZE_NUL(_component,interface[it1][it2],name); \ 564 } \ 565 } \ 566 } \ 567 } 652 do \ 653 { \ 654 sig = new SC_OUT (type) ** [x1]; \ 655 for (uint32_t it1=0; it1<x1; it1++) \ 656 { \ 657 sig [it1] = new SC_OUT (type) * [x2]; \ 658 for (uint32_t it2=0; it2<x2; it2++) \ 659 { \ 660 if (size > 0) \ 661 { \ 662 sig [it1][it2] = interface[it1][it2]->set_signal_out <type> (name, size); \ 663 } \ 664 else \ 665 { \ 666 PRINT_SIZE_NUL(_component,interface[it1][it2],name); \ 667 } \ 668 } \ 669 } \ 670 } while (0) 568 671 569 672 #define ALLOC2_VAL_ACK_IN( sig, name, type ) _ALLOC2_VAL_ACK_IN( sig, name, type , iterator_1, iterator_2) … … 575 678 576 679 #define DELETE2_SIGNAL(sig, x1,x2, size) \ 577 { \ 578 for (uint32_t it1=0; it1<x1; it1++) \ 680 do \ 681 { \ 682 for (uint32_t it1=0; it1<x1; it1++) \ 683 { \ 684 for (uint32_t it2=0; it2<x2; it2++) \ 685 { \ 686 if (size > 0) \ 687 { \ 688 delete sig[it1][it2]; \ 689 } \ 690 } \ 691 delete [] sig[it1]; \ 692 } \ 693 delete [] sig; \ 694 } while (0) 695 696 #define ALLOC2_FOREIGN_SIGNAL_IN( sig, interface, name, type, size, x1, x2) \ 697 do \ 698 { \ 699 sig = new SC_IN (type) ** [x1]; \ 700 for (uint32_t it1=0; it1<x1; it1++) \ 701 { \ 702 sig [it1] = new SC_IN (type) * [x2]; \ 703 for (uint32_t it2=0; it2<x2; it2++) \ 704 if (size > 0) \ 705 { \ 706 std::string str = (toString("in")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(it1)+"_"+toString(it2)+"_"+toString(name)); \ 707 sig [it1][it2] = new SC_IN (type) (str.c_str()); \ 708 } \ 709 } \ 710 } while (0) 711 712 #define ALLOC2_FOREIGN_SIGNAL_OUT( sig, interface, name, type, size, x1, x2) \ 713 do \ 714 { \ 715 sig = new SC_OUT (type) ** [x1]; \ 716 for (uint32_t it1=0; it1<x1; it1++) \ 717 { \ 718 sig [it1] = new SC_OUT (type) * [x2]; \ 719 for (uint32_t it2=0; it2<x2; it2++) \ 720 if (size > 0) \ 721 { \ 722 std::string str = (toString("out")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(it1)+"_"+toString(it2)+"_"+toString(name)); \ 723 sig [it1][it2] = new SC_IN (type) (str.c_str()); \ 724 } \ 725 } \ 726 } while (0) 727 728 #define DELETE2_FOREIGN_SIGNAL( sig, size,x1,x2) \ 729 do \ 730 { \ 731 DELETE2_SIGNAL(sig,x1,x2,size); \ 732 } while (0) 733 734 #define ALLOC2_SC_SIGNAL( sig, name, type, x1, x2) \ 735 do \ 736 { \ 737 sig = new sc_signal<type> ** [x1]; \ 579 738 { \ 739 std::string separator="_"; \ 740 std::string str; \ 741 for (uint32_t it1=0; it1<x1; it1++) \ 742 { \ 743 sig [it1] = new sc_signal<type> * [x2]; \ 744 for (uint32_t it2=0; it2<x2; it2++) \ 745 { \ 746 str = name+separator+toString(it1)+separator+toString(it2); \ 747 sig [it1][it2] = new sc_signal<type> (str.c_str()); \ 748 PRINT_SIGNAL_ADDRESS(str.c_str(),sig[it1][it2]); \ 749 } \ 750 } \ 751 } \ 752 } while (0) 753 754 #define INSTANCE2_SC_SIGNAL(component, sig, x1, x2) \ 755 do \ 756 { \ 757 for (uint32_t it1=0; it1<x1; it1++) \ 580 758 for (uint32_t it2=0; it2<x2; it2++) \ 581 759 { \ 582 if (size > 0) \ 583 { \ 584 delete sig[it1][it2]; \ 585 } \ 760 TEST_SIGNAL(component->sig [it1][it2]->name(),component->sig [it1][it2]); \ 761 TEST_SIGNAL(sig [it1][it2]->name(),sig [it1][it2]); \ 762 (*(component->sig[it1][it2])) (*(sig[it1][it2])); \ 586 763 } \ 587 delete [] sig[it1]; \ 588 } \ 589 delete [] sig; \ 590 } 591 592 593 #define ALLOC2_FOREIGN_SIGNAL_IN( sig, interface, name, type, size, x1, x2) \ 594 { \ 595 sig = new SC_IN (type) ** [x1]; \ 596 for (uint32_t it1=0; it1<x1; it1++) \ 597 { \ 598 sig [it1] = new SC_IN (type) * [x2]; \ 599 for (uint32_t it2=0; it2<x2; it2++) \ 600 if (size > 0) \ 601 { \ 602 std::string str = (toString("in")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(it1)+"_"+toString(it2)+"_"+toString(name)); \ 603 sig [it1][it2] = new SC_IN (type) (str.c_str()); \ 604 } \ 605 } \ 606 } 607 608 #define ALLOC2_FOREIGN_SIGNAL_OUT( sig, interface, name, type, size, x1, x2) \ 609 { \ 610 sig = new SC_OUT (type) ** [x1]; \ 611 for (uint32_t it1=0; it1<x1; it1++) \ 612 { \ 613 sig [it1] = new SC_OUT (type) * [x2]; \ 614 for (uint32_t it2=0; it2<x2; it2++) \ 615 if (size > 0) \ 616 { \ 617 std::string str = (toString("out")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(it1)+"_"+toString(it2)+"_"+toString(name)); \ 618 sig [it1][it2] = new SC_IN (type) (str.c_str()); \ 619 } \ 620 } \ 621 } 622 623 #define DELETE2_FOREIGN_SIGNAL( sig, size,x1,x2) \ 624 { \ 625 DELETE2_SIGNAL(sig,x1,x2,size); \ 626 } 627 628 #define ALLOC2_SC_SIGNAL( sig, name, type, x1, x2) \ 629 sig = new sc_signal<type> ** [x1]; \ 630 { \ 631 std::string separator="_"; \ 632 std::string str; \ 633 for (uint32_t it1=0; it1<x1; it1++) \ 634 { \ 635 sig [it1] = new sc_signal<type> * [x2]; \ 764 } while (0) 765 766 #define _INSTANCE2_SC_SIGNAL(component, sig1, sig2, x1, x2) \ 767 do \ 768 { \ 769 for (uint32_t it1=0; it1<x1; it1++) \ 636 770 for (uint32_t it2=0; it2<x2; it2++) \ 637 771 { \ 638 str = name+separator+toString(it1)+separator+toString(it2); \639 sig [it1][it2] = new sc_signal<type> (str.c_str());\640 PRINT_SIGNAL_ADDRESS(str.c_str(),sig[it1][it2]);\772 TEST_SIGNAL(component->sig1 [it1][it2]->name(),component->sig1 [it1][it2]); \ 773 TEST_SIGNAL(sig2 [it1][it2]->name(),sig2 [it1][it2]); \ 774 (*(component->sig1[it1][it2])) (*(sig2[it1][it2])); \ 641 775 } \ 642 } \ 643 } 644 645 #define INSTANCE2_SC_SIGNAL(component, sig, x1, x2) \ 646 for (uint32_t it1=0; it1<x1; it1++) \ 647 for (uint32_t it2=0; it2<x2; it2++) \ 648 { \ 649 TEST_SIGNAL(component->sig [it1][it2]->name(),component->sig [it1][it2]); \ 650 TEST_SIGNAL(sig [it1][it2]->name(),sig [it1][it2]); \ 651 (*(component->sig[it1][it2])) (*(sig[it1][it2])); \ 652 } 653 654 #define _INSTANCE2_SC_SIGNAL(component, sig1, sig2, x1, x2) \ 655 for (uint32_t it1=0; it1<x1; it1++) \ 656 for (uint32_t it2=0; it2<x2; it2++) \ 657 { \ 658 TEST_SIGNAL(component->sig1 [it1][it2]->name(),component->sig1 [it1][it2]); \ 659 TEST_SIGNAL(sig2 [it1][it2]->name(),sig2 [it1][it2]); \ 660 (*(component->sig1[it1][it2])) (*(sig2[it1][it2])); \ 661 } 776 } while (0) 662 777 663 778 #define DELETE2_SC_SIGNAL(sig,x1,x2) \ 664 { \ 665 for (uint32_t it1=0; it1<x1; it1++) \ 666 { \ 667 for (uint32_t it2=0; it2<x2; it2++) \ 668 { \ 669 PRINT_SIGNAL_ADDRESS("",sig[it1][it2]); \ 670 delete sig[it1][it2]; \ 671 } \ 672 delete [] sig[it1]; \ 673 } \ 674 delete [] sig; \ 675 } 779 do \ 780 { \ 781 for (uint32_t it1=0; it1<x1; it1++) \ 782 { \ 783 for (uint32_t it2=0; it2<x2; it2++) \ 784 { \ 785 PRINT_SIGNAL_ADDRESS("",sig[it1][it2]); \ 786 delete sig[it1][it2]; \ 787 } \ 788 delete [] sig[it1]; \ 789 } \ 790 delete [] sig; \ 791 } while (0) 676 792 677 793 // ---------------------------------------------------------------------- … … 734 850 735 851 #define ALLOC3_INTERFACE_END(x1, x2, x3) \ 736 for (uint32_t it1=0; it1<x1; it1++) \ 737 { \ 738 for (uint32_t it2=0; it2<x2; it2++) \ 739 delete [] interface [it1][it2]; \ 740 delete [] interface [it1]; \ 741 } \ 742 delete [] interface; 852 do \ 853 { \ 854 for (uint32_t it1=0; it1<x1; it1++) \ 855 { \ 856 for (uint32_t it2=0; it2<x2; it2++) \ 857 delete [] interface [it1][it2]; \ 858 delete [] interface [it1]; \ 859 } \ 860 delete [] interface; \ 861 } while (0) 743 862 744 863 // #define _ALLOC3_VAL_ACK_IN( sig, name, type, x1, x2, x3) … … 746 865 747 866 #define _ALLOC3_VALACK_IN( sig,type, x1, x2, x3) \ 748 { \ 749 sig = new SC_IN (Tcontrol_t) *** [x1]; \ 750 for (uint32_t it1=0; it1<x1; it1++) \ 751 { \ 752 sig [it1] = new SC_IN (Tcontrol_t) ** [x2]; \ 753 for (uint32_t it2=0; it2<x2; it2++) \ 754 { \ 755 sig [it1][it2] = new SC_IN (Tcontrol_t) * [x3]; \ 756 for (uint32_t it3=0; it3<x3; it3++) \ 757 { \ 758 sig [it1][it2][it3] = interface[it1][it2][it3]->set_signal_valack_in (type); \ 759 } \ 760 } \ 761 } \ 762 } 867 do \ 868 { \ 869 sig = new SC_IN (Tcontrol_t) *** [x1]; \ 870 for (uint32_t it1=0; it1<x1; it1++) \ 871 { \ 872 sig [it1] = new SC_IN (Tcontrol_t) ** [x2]; \ 873 for (uint32_t it2=0; it2<x2; it2++) \ 874 { \ 875 sig [it1][it2] = new SC_IN (Tcontrol_t) * [x3]; \ 876 for (uint32_t it3=0; it3<x3; it3++) \ 877 { \ 878 sig [it1][it2][it3] = interface[it1][it2][it3]->set_signal_valack_in (type); \ 879 } \ 880 } \ 881 } \ 882 } while (0) 763 883 764 884 #define _ALLOC3_VALACK_OUT( sig,type, x1, x2, x3) \ 765 { \ 766 sig = new SC_OUT (Tcontrol_t) *** [x1]; \ 767 for (uint32_t it1=0; it1<x1; it1++) \ 768 { \ 769 sig [it1] = new SC_OUT (Tcontrol_t) ** [x2]; \ 770 for (uint32_t it2=0; it2<x2; it2++) \ 771 { \ 772 sig [it1][it2] = new SC_OUT (Tcontrol_t) * [x3]; \ 773 for (uint32_t it3=0; it3<x3; it3++) \ 774 { \ 775 sig [it1][it2][it3] = interface[it1][it2][it3]->set_signal_valack_out (type); \ 776 } \ 777 } \ 778 } \ 779 } 885 do \ 886 { \ 887 sig = new SC_OUT (Tcontrol_t) *** [x1]; \ 888 for (uint32_t it1=0; it1<x1; it1++) \ 889 { \ 890 sig [it1] = new SC_OUT (Tcontrol_t) ** [x2]; \ 891 for (uint32_t it2=0; it2<x2; it2++) \ 892 { \ 893 sig [it1][it2] = new SC_OUT (Tcontrol_t) * [x3]; \ 894 for (uint32_t it3=0; it3<x3; it3++) \ 895 { \ 896 sig [it1][it2][it3] = interface[it1][it2][it3]->set_signal_valack_out (type); \ 897 } \ 898 } \ 899 } \ 900 } while (0) 780 901 781 902 782 903 #define _ALLOC3_SIGNAL_IN( sig, name, type, size, x1, x2,x3) \ 783 { \ 784 sig = new SC_IN (type) *** [x1]; \ 785 for (uint32_t it1=0; it1<x1; it1++) \ 786 { \ 787 sig [it1] = new SC_IN (type) ** [x2]; \ 788 for (uint32_t it2=0; it2<x2; it2++) \ 789 { \ 790 sig [it1][it2] = new SC_IN (type) * [x3]; \ 791 for (uint32_t it3=0; it3<x3; it3++) \ 792 { \ 793 if (size > 0) \ 794 { \ 795 sig [it1][it2][it3] = interface[it1][it2][it3]->set_signal_in <type> (name, size); \ 796 } \ 797 else \ 798 { \ 799 PRINT_SIZE_NUL(_component,interface[it1][it2][it3],name); \ 800 } \ 801 } \ 802 } \ 803 } \ 804 } 904 do \ 905 { \ 906 sig = new SC_IN (type) *** [x1]; \ 907 for (uint32_t it1=0; it1<x1; it1++) \ 908 { \ 909 sig [it1] = new SC_IN (type) ** [x2]; \ 910 for (uint32_t it2=0; it2<x2; it2++) \ 911 { \ 912 sig [it1][it2] = new SC_IN (type) * [x3]; \ 913 for (uint32_t it3=0; it3<x3; it3++) \ 914 { \ 915 if (size > 0) \ 916 { \ 917 sig [it1][it2][it3] = interface[it1][it2][it3]->set_signal_in <type> (name, size); \ 918 } \ 919 else \ 920 { \ 921 PRINT_SIZE_NUL(_component,interface[it1][it2][it3],name); \ 922 } \ 923 } \ 924 } \ 925 } \ 926 } while (0) 805 927 806 928 #define _ALLOC3_SIGNAL_OUT( sig, name, type, size, x1, x2,x3) \ 807 { \ 808 sig = new SC_OUT (type) *** [x1]; \ 809 for (uint32_t it1=0; it1<x1; it1++) \ 810 { \ 811 sig [it1] = new SC_OUT (type) ** [x2]; \ 812 for (uint32_t it2=0; it2<x2; it2++) \ 813 { \ 814 sig [it1][it2] = new SC_OUT (type) * [x3]; \ 815 for (uint32_t it3=0; it3<x3; it3++) \ 816 { \ 817 if (size > 0) \ 818 { \ 819 sig [it1][it2][it3] = interface[it1][it2][it3]->set_signal_out <type> (name, size); \ 820 } \ 821 else \ 822 { \ 823 PRINT_SIZE_NUL(_component,interface[it1][it2][it3],name); \ 824 } \ 825 } \ 826 } \ 827 } \ 828 } 929 do \ 930 { \ 931 sig = new SC_OUT (type) *** [x1]; \ 932 for (uint32_t it1=0; it1<x1; it1++) \ 933 { \ 934 sig [it1] = new SC_OUT (type) ** [x2]; \ 935 for (uint32_t it2=0; it2<x2; it2++) \ 936 { \ 937 sig [it1][it2] = new SC_OUT (type) * [x3]; \ 938 for (uint32_t it3=0; it3<x3; it3++) \ 939 { \ 940 if (size > 0) \ 941 { \ 942 sig [it1][it2][it3] = interface[it1][it2][it3]->set_signal_out <type> (name, size); \ 943 } \ 944 else \ 945 { \ 946 PRINT_SIZE_NUL(_component,interface[it1][it2][it3],name); \ 947 } \ 948 } \ 949 } \ 950 } \ 951 } while (0) 829 952 830 953 // #define ALLOC3_VAL_ACK_IN( sig, name, type ) _ALLOC3_VAL_ACK_IN( sig, name, type , iterator_1, iterator_2, iterator_3) … … 836 959 837 960 #define DELETE3_SIGNAL(sig, x1, x2, x3, size) \ 838 { \ 839 for (uint32_t it1=0; it1<x1; it1++) \ 840 { \ 841 for (uint32_t it2=0; it2<x2; it2++) \ 842 { \ 843 for (uint32_t it3=0; it3<x3; it3++) \ 844 { \ 961 do \ 962 { \ 963 for (uint32_t it1=0; it1<x1; it1++) \ 964 { \ 965 for (uint32_t it2=0; it2<x2; it2++) \ 966 { \ 967 for (uint32_t it3=0; it3<x3; it3++) \ 968 { \ 969 if (size > 0) \ 970 { \ 971 delete sig[it1][it2][it3]; \ 972 } \ 973 } \ 974 delete [] sig[it1][it2]; \ 975 } \ 976 delete [] sig[it1]; \ 977 } \ 978 delete [] sig; \ 979 } while (0) 980 981 #define ALLOC3_FOREIGN_SIGNAL_IN( sig, interface, name, type, size, x1, x2,x3) \ 982 do \ 983 { \ 984 sig = new SC_IN (type) *** [x1]; \ 985 for (uint32_t it1=0; it1<x1; it1++) \ 986 { \ 987 sig [it1] = new SC_IN (type) ** [x2]; \ 988 for (uint32_t it2=0; it2<x2; it2++) \ 989 { \ 990 sig [it1][it2] = new SC_IN (type) * [x3]; \ 991 for (uint32_t it3=0; it3<x3; it3++) \ 845 992 if (size > 0) \ 846 993 { \ 847 delete sig[it1][it2][it3]; \ 994 std::string str = (toString("in")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(it1)+"_"+toString(it2)+"_"+toString(it3)+"_"+toString(name)); \ 995 sig [it1][it2][it3] = new SC_IN (type) (str.c_str()); \ 996 } \ 997 } \ 998 } \ 999 } while (0) 1000 1001 #define ALLOC3_FOREIGN_SIGNAL_OUT( sig, interface, name, type, size, x1, x2,x3) \ 1002 do \ 1003 { \ 1004 sig = new SC_OUT (type) *** [x1]; \ 1005 for (uint32_t it1=0; it1<x1; it1++) \ 1006 { \ 1007 sig [it1] = new SC_OUT (type) ** [x2]; \ 1008 for (uint32_t it2=0; it2<x2; it2++) \ 1009 { \ 1010 sig [it1][it2] = new SC_OUT (type) * [x3]; \ 1011 for (uint32_t it3=0; it3<x3; it3++) \ 1012 if (size > 0) \ 1013 { \ 1014 std::string str = (toString("out")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(it1)+"_"+toString(it2)+"_"+toString(it3)+"_"+toString(name)); \ 1015 sig [it1][it2][it3] = new SC_OUT(type) (str.c_str()); \ 1016 } \ 1017 } \ 1018 } \ 1019 } while (0) 1020 1021 #define DELETE3_FOREIGN_SIGNAL( sig, size,x1,x2,x3) \ 1022 do \ 1023 { \ 1024 DELETE3_SIGNAL(sig,x1,x2,x3,size); \ 1025 } while (0) 1026 1027 #define ALLOC3_SC_SIGNAL( sig, name, type, x1, x2, x3) \ 1028 do \ 1029 { \ 1030 sig = new sc_signal<type> *** [x1]; \ 1031 { \ 1032 std::string separator="_"; \ 1033 std::string str; \ 1034 for (uint32_t it1=0; it1<x1; it1++) \ 1035 { \ 1036 sig [it1] = new sc_signal<type> ** [x2]; \ 1037 for (uint32_t it2=0; it2<x2; it2++) \ 1038 { \ 1039 sig [it1][it2] = new sc_signal<type> * [x3]; \ 1040 for (uint32_t it3=0; it3<x3; it3++) \ 1041 { \ 1042 str = name+separator+toString(it1)+separator+toString(it2)+separator+toString(it3); \ 1043 sig [it1][it2][it3] = new sc_signal<type> (str.c_str()); \ 1044 PRINT_SIGNAL_ADDRESS(str.c_str(),sig[it1][it2][it3]); \ 848 1045 } \ 849 1046 } \ 850 delete [] sig[it1][it2]; \851 } \852 delete [] sig[it1]; \853 } \854 delete [] sig; \855 }856 857 #define ALLOC3_FOREIGN_SIGNAL_IN( sig, interface, name, type, size, x1, x2,x3) \858 { \859 sig = new SC_IN (type) *** [x1]; \860 for (uint32_t it1=0; it1<x1; it1++) \861 { \862 sig [it1] = new SC_IN (type) ** [x2]; \863 for (uint32_t it2=0; it2<x2; it2++) \864 { \865 sig [it1][it2] = new SC_IN (type) * [x3]; \866 for (uint32_t it3=0; it3<x3; it3++) \867 if (size > 0) \868 { \869 std::string str = (toString("in")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(it1)+"_"+toString(it2)+"_"+toString(it3)+"_"+toString(name)); \870 sig [it1][it2][it3] = new SC_IN (type) (str.c_str()); \871 } \872 1047 } \ 873 1048 } \ 874 } 875 876 #define ALLOC3_FOREIGN_SIGNAL_OUT( sig, interface, name, type, size, x1, x2,x3) \ 877 { \ 878 sig = new SC_OUT (type) *** [x1]; \ 879 for (uint32_t it1=0; it1<x1; it1++) \ 880 { \ 881 sig [it1] = new SC_OUT (type) ** [x2]; \ 1049 } while (0) 1050 1051 #define INSTANCE3_SC_SIGNAL(component, sig, x1, x2, x3) \ 1052 do \ 1053 { \ 1054 for (uint32_t it1=0; it1<x1; it1++) \ 882 1055 for (uint32_t it2=0; it2<x2; it2++) \ 883 {\884 sig [it1][it2] = new SC_OUT (type) * [x3];\885 for (uint32_t it3=0; it3<x3; it3++)\886 if (size > 0)\887 {\888 std::string str = (toString("out")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(it1)+"_"+toString(it2)+"_"+toString(it3)+"_"+toString(name));\889 sig [it1][it2][it3] = new SC_OUT(type) (str.c_str()); \890 } \ 891 }\892 }\893 }894 895 #define DELETE3_FOREIGN_SIGNAL( sig, size,x1,x2,x3)\896 {\897 DELETE3_SIGNAL(sig,x1,x2,x3,size);\898 }899 900 #define ALLOC3_SC_SIGNAL( sig, name, type, x1, x2, x3)\901 sig = new sc_signal<type> *** [x1];\902 { \903 std::string separator="_"; \ 904 std::string str;\905 for (uint32_t it1=0; it1<x1; it1++)\906 {\907 sig [it1] = new sc_signal<type> ** [x2];\908 for (uint32_t it2=0; it2<x2; it2++)\909 {\910 sig [it1][it2] = new sc_signal<type> * [x3];\1056 for (uint32_t it3=0; it3<x3; it3++) \ 1057 { \ 1058 TEST_SIGNAL(component->sig [it1][it2][it3]->name(),component->sig [it1][it2][it3]); \ 1059 TEST_SIGNAL(sig [it1][it2][it3]->name(),sig [it1][it2][it3]); \ 1060 (*(component->sig[it1][it2][it3])) (*(sig[it1][it2][it3])); \ 1061 } \ 1062 } while (0) 1063 1064 #define _INSTANCE3_SC_SIGNAL(component, sig1, sig2, x1, x2, x3) \ 1065 do \ 1066 { \ 1067 for (uint32_t it1=0; it1<x1; it1++) \ 1068 for (uint32_t it2=0; it2<x2; it2++) \ 1069 for (uint32_t it3=0; it3<x3; it3++) \ 1070 { \ 1071 TEST_SIGNAL(component->sig1 [it1][it2][it3]->name(),component->sig1 [it1][it2][it3]); \ 1072 TEST_SIGNAL(sig2 [it1][it2][it3]->name(),sig2 [it1][it2][it3]); \ 1073 (*(component->sig1[it1][it2][it3])) (*(sig2[it1][it2][it3])); \ 1074 } \ 1075 } while (0) 1076 1077 #define DELETE3_SC_SIGNAL(sig,x1,x2,x3) \ 1078 do \ 1079 { \ 1080 for (uint32_t it1=0; it1<x1; it1++) \ 1081 { \ 1082 for (uint32_t it2=0; it2<x2; it2++) \ 1083 { \ 911 1084 for (uint32_t it3=0; it3<x3; it3++) \ 912 1085 { \ 913 str = name+separator+toString(it1)+separator+toString(it2)+separator+toString(it3); \ 914 sig [it1][it2][it3] = new sc_signal<type> (str.c_str()); \ 915 PRINT_SIGNAL_ADDRESS(str.c_str(),sig[it1][it2][it3]); \ 1086 PRINT_SIGNAL_ADDRESS("",sig[it1][it2][it3]); \ 1087 delete sig[it1][it2][it3]; \ 916 1088 } \ 917 } \ 918 } \ 919 } 920 921 #define INSTANCE3_SC_SIGNAL(component, sig, x1, x2, x3) \ 922 for (uint32_t it1=0; it1<x1; it1++) \ 923 for (uint32_t it2=0; it2<x2; it2++) \ 924 for (uint32_t it3=0; it3<x3; it3++) \ 925 { \ 926 TEST_SIGNAL(component->sig [it1][it2][it3]->name(),component->sig [it1][it2][it3]); \ 927 TEST_SIGNAL(sig [it1][it2][it3]->name(),sig [it1][it2][it3]); \ 928 (*(component->sig[it1][it2][it3])) (*(sig[it1][it2][it3])); \ 929 } 930 931 #define _INSTANCE3_SC_SIGNAL(component, sig1, sig2, x1, x2, x3) \ 932 for (uint32_t it1=0; it1<x1; it1++) \ 933 for (uint32_t it2=0; it2<x2; it2++) \ 934 for (uint32_t it3=0; it3<x3; it3++) \ 935 { \ 936 TEST_SIGNAL(component->sig1 [it1][it2][it3]->name(),component->sig1 [it1][it2][it3]); \ 937 TEST_SIGNAL(sig2 [it1][it2][it3]->name(),sig2 [it1][it2][it3]); \ 938 (*(component->sig1[it1][it2][it3])) (*(sig2[it1][it2][it3])); \ 939 } 940 941 #define DELETE3_SC_SIGNAL(sig,x1,x2,x3) \ 942 { \ 943 for (uint32_t it1=0; it1<x1; it1++) \ 944 { \ 945 for (uint32_t it2=0; it2<x2; it2++) \ 946 { \ 947 for (uint32_t it3=0; it3<x3; it3++) \ 948 { \ 949 PRINT_SIGNAL_ADDRESS("",sig[it1][it2][it3]); \ 950 delete sig[it1][it2][it3]; \ 951 } \ 952 delete [] sig[it1][it2]; \ 953 } \ 954 delete [] sig[it1]; \ 955 } \ 956 delete [] sig; \ 957 } 1089 delete [] sig[it1][it2]; \ 1090 } \ 1091 delete [] sig[it1]; \ 1092 } \ 1093 delete [] sig; \ 1094 } while (0) 958 1095 959 1096 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Types.h
r124 r128 16 16 17 17 // ***** general 18 typedef uint32_t Tcounter_t; // universal counter 19 typedef uint32_t Tptr_t; // universal pointer 18 20 typedef uint32_t Tinstruction_t; 19 21 typedef bool Tcontrol_t; 20 22 typedef uint8_t Texception_t; 21 23 typedef uint8_t Tcontext_t; 22 typedef uint16_tTpacket_t;24 typedef Tptr_t Tpacket_t; 23 25 typedef uint8_t Toperation_t; 24 26 typedef uint8_t Ttype_t; 25 typedef uint32_t Tcounter_t; // universal counter26 typedef uint32_t Tptr_t; // universal pointer27 27 typedef uint32_t Tspr_t; 28 28 typedef uint16_t Tspr_address_t; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Version.h
r127 r128 10 10 #define MORPHEO_MAJOR_VERSION "0" 11 11 #define MORPHEO_MINOR_VERSION "2" 12 #define MORPHEO_REVISION "12 7"12 #define MORPHEO_REVISION "128" 13 13 #define MORPHEO_CODENAME "Castor" 14 14 15 #define MORPHEO_DATE_DAY " 17"15 #define MORPHEO_DATE_DAY "26" 16 16 #define MORPHEO_DATE_MONTH "06" 17 17 #define MORPHEO_DATE_YEAR "2009" -
trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_link.cpp
r113 r128 29 29 throw (ERRORMORPHEO (FUNCTION,"Signal \""+_name+"\", can't map with signal \""+signal_dest->get_name()+"\", because the second signal is not already allocate.")); 30 30 31 // Test if type is compatible 32 if (_type_info != signal_dest->_type_info) 33 throw (ERRORMORPHEO (FUNCTION,toString(_("Signal \"%s\" can't been linked with signal \"%s\" : incompatible type (%s != %s)."), 34 _name.c_str(), 35 signal_dest->get_name().c_str(), 36 toString(_type_info).c_str(), 37 toString(signal_dest->_type_info).c_str()))); 38 31 39 // List of all case 32 40 // … … 39 47 40 48 // list valid case 49 41 50 if (not ( signal_dest_is_port and (((signal_src->_direction == IN ) and (signal_dest->_direction == IN )) or 42 51 ((signal_src->_direction == OUT) and (signal_dest->_direction == OUT )))) and -
trunk/IPs/systemC/processor/Morpheo/Files/Instance_x1_w8_1.cfg
r124 r128 102 102 <parameter name="dir_bht_nb_shifter" value="1024" /> 103 103 <parameter name="dir_have_pht" value="1" /> 104 <parameter name="dir_pht_size_counter" value=" 3" />104 <parameter name="dir_pht_size_counter" value="2" /> 105 105 <parameter name="dir_pht_nb_counter" value="4096" /> 106 106 <parameter name="dir_pht_size_address_share" value="0" /> -
trunk/IPs/systemC/processor/Morpheo/Files/Instance_x1_w8_2.cfg
r124 r128 31 31 <parameter name="rename_select_nb_front_end_select" value="1" /> 32 32 <parameter name="nb_general_register" value="512"/> 33 <parameter name="nb_special_register" value=" 128"/>33 <parameter name="nb_special_register" value="256"/> 34 34 <parameter name="nb_reg_free" value="16" /> 35 35 <parameter name="nb_rename_unit_bank" value="16" /> … … 102 102 <parameter name="dir_bht_nb_shifter" value="1024" /> 103 103 <parameter name="dir_have_pht" value="1" /> 104 <parameter name="dir_pht_size_counter" value=" 3" />104 <parameter name="dir_pht_size_counter" value="2" /> 105 105 <parameter name="dir_pht_nb_counter" value="4096" /> 106 106 <parameter name="dir_pht_size_address_share" value="0" /> -
trunk/IPs/systemC/processor/Morpheo/Files/Instance_x4_w8_1.cfg
r124 r128 31 31 <parameter name="rename_select_nb_front_end_select" value="1" /> 32 32 <parameter name="nb_general_register" value="512"/> 33 <parameter name="nb_special_register" value=" 128"/>33 <parameter name="nb_special_register" value="256"/> 34 34 <parameter name="nb_reg_free" value="16" /> 35 35 <parameter name="nb_rename_unit_bank" value="16" /> … … 49 49 </write_bloc> 50 50 51 <load_store_unit id="0 ">52 <parameter name="size_store_queue" value=" 16" />53 <parameter name="size_load_queue" value=" 32" />54 <parameter name="size_speculative_access_queue" value=" 4" />55 <parameter name="nb_port_check" value=" 4" />51 <load_store_unit id="0,1,2,3"> 52 <parameter name="size_store_queue" value="4" /> 53 <parameter name="size_load_queue" value="8" /> 54 <parameter name="size_speculative_access_queue" value="2" /> 55 <parameter name="nb_port_check" value="1" /> 56 56 <parameter name="speculative_load" value="2" /> 57 57 <parameter name="nb_bypass_memory" value="0" /> … … 98 98 99 99 <predictor id="0"> 100 <parameter name="dir_have_bht" value="1" /> 101 <parameter name="dir_bht_size_shifter" value="10" /> 102 <parameter name="dir_bht_nb_shifter" value="1024" /> 100 <parameter name="dir_have_bht" value="0" /> 103 101 <parameter name="dir_have_pht" value="1" /> 104 <parameter name="dir_pht_size_counter" value=" 3" />102 <parameter name="dir_pht_size_counter" value="2" /> 105 103 <parameter name="dir_pht_nb_counter" value="4096" /> 106 104 <parameter name="dir_pht_size_address_share" value="0" /> 107 </predictor>108 <predictor id="1">109 <parameter name="dir_have_bht" value="1" />110 <parameter name="dir_bht_size_shifter" value="12" />111 <parameter name="dir_bht_nb_shifter" value="1" />112 <parameter name="dir_have_pht" value="1" />113 <parameter name="dir_pht_size_counter" value="2" />114 <parameter name="dir_pht_nb_counter" value="4096" />115 <parameter name="dir_pht_size_address_share" value="0" />116 </predictor>117 <predictor id="2">118 <parameter name="dir_have_bht" value="1" />119 <parameter name="dir_bht_size_shifter" value="12" />120 <parameter name="dir_bht_nb_shifter" value="1" />121 <parameter name="dir_have_pht" value="1" />122 <parameter name="dir_pht_size_counter" value="2" />123 <parameter name="dir_pht_nb_counter" value="4096" />124 <parameter name="dir_pht_size_address_share" value="0" />125 105 </predictor> 126 106 … … 152 132 <parameter name="nb_read_unit" value="11" /> 153 133 <parameter name="nb_write_unit" value="11" /> 154 <parameter name="nb_execute_unit" value="1 1" />134 <parameter name="nb_execute_unit" value="14" /> 155 135 <parameter name="nb_gpr_bank" value="1" /> 156 136 <parameter name="nb_gpr_port_read_by_bank" value="22" /> … … 172 152 <parameter name="icache_port_load_balancing" value="1" /> 173 153 174 <parameter name="nb_dcache_port" value=" 1" />154 <parameter name="nb_dcache_port" value="4" /> 175 155 <parameter name="dcache_port_priority" value="1" /> 176 156 <parameter name="dcache_port_load_balancing" value="1" /> … … 216 196 217 197 <link name="link_load_store_unit_with_thread" src="0" dest="0" /> 218 <link name="link_load_store_unit_with_thread" src="1" dest=" 0" />219 <link name="link_load_store_unit_with_thread" src="2" dest=" 0" />220 <link name="link_load_store_unit_with_thread" src="3" dest=" 0" />198 <link name="link_load_store_unit_with_thread" src="1" dest="1" /> 199 <link name="link_load_store_unit_with_thread" src="2" dest="2" /> 200 <link name="link_load_store_unit_with_thread" src="3" dest="3" /> 221 201 222 202 <link name="link_execute_unit_with_load_store_unit" src="0" dest="0.0"/> 223 <link name="link_execute_unit_with_functionnal_unit" src="0" dest="0.1"/> 224 <link name="link_execute_unit_with_functionnal_unit" src="1" dest="0.2"/> 225 <link name="link_execute_unit_with_functionnal_unit" src="2" dest="0.3"/> 226 <link name="link_execute_unit_with_functionnal_unit" src="3" dest="0.4"/> 227 <link name="link_execute_unit_with_functionnal_unit" src="4" dest="0.5"/> 228 <link name="link_execute_unit_with_functionnal_unit" src="5" dest="0.6"/> 229 <link name="link_execute_unit_with_functionnal_unit" src="6" dest="0.7"/> 230 <link name="link_execute_unit_with_functionnal_unit" src="7" dest="0.8"/> 231 <link name="link_execute_unit_with_functionnal_unit" src="8" dest="0.9"/> 232 <link name="link_execute_unit_with_functionnal_unit" src="9" dest="0.10"/> 203 <link name="link_execute_unit_with_load_store_unit" src="1" dest="0.1"/> 204 <link name="link_execute_unit_with_load_store_unit" src="2" dest="0.2"/> 205 <link name="link_execute_unit_with_load_store_unit" src="3" dest="0.3"/> 206 207 <link name="link_execute_unit_with_functionnal_unit" src="0" dest="0.4"/> 208 <link name="link_execute_unit_with_functionnal_unit" src="1" dest="0.5"/> 209 <link name="link_execute_unit_with_functionnal_unit" src="2" dest="0.6"/> 210 <link name="link_execute_unit_with_functionnal_unit" src="3" dest="0.7"/> 211 <link name="link_execute_unit_with_functionnal_unit" src="4" dest="0.8"/> 212 <link name="link_execute_unit_with_functionnal_unit" src="5" dest="0.9"/> 213 <link name="link_execute_unit_with_functionnal_unit" src="6" dest="0.10"/> 214 <link name="link_execute_unit_with_functionnal_unit" src="7" dest="0.11"/> 215 <link name="link_execute_unit_with_functionnal_unit" src="8" dest="0.12"/> 216 <link name="link_execute_unit_with_functionnal_unit" src="9" dest="0.13"/> 233 217 234 218 <link name="link_icache_port_with_thread" src="0" dest="0" /> … … 238 222 239 223 <link name="link_dcache_port_with_load_store_unit" src="0.0" dest="0" /> 224 <link name="link_dcache_port_with_load_store_unit" src="1.0" dest="1" /> 225 <link name="link_dcache_port_with_load_store_unit" src="2.0" dest="2" /> 226 <link name="link_dcache_port_with_load_store_unit" src="3.0" dest="3" /> 240 227 241 228 <link name="table_dispatch" src="0.0.0" dest="1" /> … … 350 337 <link name="link_read_bloc_and_load_store_unit" src="10.0" dest="0" /> 351 338 339 <link name="link_read_bloc_and_load_store_unit" src="0.1" dest="1" /> 340 <link name="link_read_bloc_and_load_store_unit" src="1.1" dest="0" /> 341 <link name="link_read_bloc_and_load_store_unit" src="2.1" dest="0" /> 342 <link name="link_read_bloc_and_load_store_unit" src="3.1" dest="0" /> 343 <link name="link_read_bloc_and_load_store_unit" src="4.1" dest="0" /> 344 <link name="link_read_bloc_and_load_store_unit" src="5.1" dest="0" /> 345 <link name="link_read_bloc_and_load_store_unit" src="6.1" dest="0" /> 346 <link name="link_read_bloc_and_load_store_unit" src="7.1" dest="0" /> 347 <link name="link_read_bloc_and_load_store_unit" src="8.1" dest="0" /> 348 <link name="link_read_bloc_and_load_store_unit" src="9.1" dest="0" /> 349 <link name="link_read_bloc_and_load_store_unit" src="10.1" dest="0" /> 350 351 <link name="link_read_bloc_and_load_store_unit" src="0.2" dest="1" /> 352 <link name="link_read_bloc_and_load_store_unit" src="1.2" dest="0" /> 353 <link name="link_read_bloc_and_load_store_unit" src="2.2" dest="0" /> 354 <link name="link_read_bloc_and_load_store_unit" src="3.2" dest="0" /> 355 <link name="link_read_bloc_and_load_store_unit" src="4.2" dest="0" /> 356 <link name="link_read_bloc_and_load_store_unit" src="5.2" dest="0" /> 357 <link name="link_read_bloc_and_load_store_unit" src="6.2" dest="0" /> 358 <link name="link_read_bloc_and_load_store_unit" src="7.2" dest="0" /> 359 <link name="link_read_bloc_and_load_store_unit" src="8.2" dest="0" /> 360 <link name="link_read_bloc_and_load_store_unit" src="9.2" dest="0" /> 361 <link name="link_read_bloc_and_load_store_unit" src="10.2" dest="0" /> 362 363 <link name="link_read_bloc_and_load_store_unit" src="0.3" dest="1" /> 364 <link name="link_read_bloc_and_load_store_unit" src="1.3" dest="0" /> 365 <link name="link_read_bloc_and_load_store_unit" src="2.3" dest="0" /> 366 <link name="link_read_bloc_and_load_store_unit" src="3.3" dest="0" /> 367 <link name="link_read_bloc_and_load_store_unit" src="4.3" dest="0" /> 368 <link name="link_read_bloc_and_load_store_unit" src="5.3" dest="0" /> 369 <link name="link_read_bloc_and_load_store_unit" src="6.3" dest="0" /> 370 <link name="link_read_bloc_and_load_store_unit" src="7.3" dest="0" /> 371 <link name="link_read_bloc_and_load_store_unit" src="8.3" dest="0" /> 372 <link name="link_read_bloc_and_load_store_unit" src="9.3" dest="0" /> 373 <link name="link_read_bloc_and_load_store_unit" src="10.3" dest="0" /> 374 352 375 <link name="link_read_bloc_and_functionnal_unit" src="0.0" dest="1" /> 353 376 <link name="link_read_bloc_and_functionnal_unit" src="1.0" dest="1" /> … … 482 505 <link name="link_write_bloc_and_load_store_unit" src="10.0" dest="0" /> 483 506 507 <link name="link_write_bloc_and_load_store_unit" src="0.1" dest="1" /> 508 <link name="link_write_bloc_and_load_store_unit" src="1.1" dest="0" /> 509 <link name="link_write_bloc_and_load_store_unit" src="2.1" dest="0" /> 510 <link name="link_write_bloc_and_load_store_unit" src="3.1" dest="0" /> 511 <link name="link_write_bloc_and_load_store_unit" src="4.1" dest="0" /> 512 <link name="link_write_bloc_and_load_store_unit" src="5.1" dest="0" /> 513 <link name="link_write_bloc_and_load_store_unit" src="6.1" dest="0" /> 514 <link name="link_write_bloc_and_load_store_unit" src="7.1" dest="0" /> 515 <link name="link_write_bloc_and_load_store_unit" src="8.1" dest="0" /> 516 <link name="link_write_bloc_and_load_store_unit" src="9.1" dest="0" /> 517 <link name="link_write_bloc_and_load_store_unit" src="10.1" dest="0" /> 518 519 <link name="link_write_bloc_and_load_store_unit" src="0.2" dest="1" /> 520 <link name="link_write_bloc_and_load_store_unit" src="1.2" dest="0" /> 521 <link name="link_write_bloc_and_load_store_unit" src="2.2" dest="0" /> 522 <link name="link_write_bloc_and_load_store_unit" src="3.2" dest="0" /> 523 <link name="link_write_bloc_and_load_store_unit" src="4.2" dest="0" /> 524 <link name="link_write_bloc_and_load_store_unit" src="5.2" dest="0" /> 525 <link name="link_write_bloc_and_load_store_unit" src="6.2" dest="0" /> 526 <link name="link_write_bloc_and_load_store_unit" src="7.2" dest="0" /> 527 <link name="link_write_bloc_and_load_store_unit" src="8.2" dest="0" /> 528 <link name="link_write_bloc_and_load_store_unit" src="9.2" dest="0" /> 529 <link name="link_write_bloc_and_load_store_unit" src="10.2" dest="0" /> 530 531 <link name="link_write_bloc_and_load_store_unit" src="0.3" dest="1" /> 532 <link name="link_write_bloc_and_load_store_unit" src="1.3" dest="0" /> 533 <link name="link_write_bloc_and_load_store_unit" src="2.3" dest="0" /> 534 <link name="link_write_bloc_and_load_store_unit" src="3.3" dest="0" /> 535 <link name="link_write_bloc_and_load_store_unit" src="4.3" dest="0" /> 536 <link name="link_write_bloc_and_load_store_unit" src="5.3" dest="0" /> 537 <link name="link_write_bloc_and_load_store_unit" src="6.3" dest="0" /> 538 <link name="link_write_bloc_and_load_store_unit" src="7.3" dest="0" /> 539 <link name="link_write_bloc_and_load_store_unit" src="8.3" dest="0" /> 540 <link name="link_write_bloc_and_load_store_unit" src="9.3" dest="0" /> 541 <link name="link_write_bloc_and_load_store_unit" src="10.3" dest="0" /> 542 484 543 <link name="link_write_bloc_and_functionnal_unit" src="0.0" dest="0" /> 485 544 <link name="link_write_bloc_and_functionnal_unit" src="1.0" dest="1" /> -
trunk/IPs/systemC/processor/Morpheo/Files/Morpheo.sim
r127 r128 15 15 <parameter name="directory_vhdl" value="." /> 16 16 <parameter name="directory_position" value="." /> 17 <parameter name="directory_log" value="/ tmp/" />17 <parameter name="directory_log" value="/dsk/l1/misc/Morpheo/" /> 18 18 19 19 <parameter name="statistics_cycle_start" value="1000000" /> … … 25 25 <parameter name="simulation_file_with_date" value="1" /> 26 26 27 <parameter name="debug_level" value=" 3" />27 <parameter name="debug_level" value="0" /> 28 28 <parameter name="debug_cycle_start" value="0" /> 29 29 <parameter name="debug_cycle_stop" value="20000000"/> -
trunk/IPs/systemC/processor/Morpheo/Files/debug.sim
r127 r128 15 15 <parameter name="directory_vhdl" value="." /> 16 16 <parameter name="directory_position" value="." /> 17 <parameter name="directory_log" value="/ tmp/" />17 <parameter name="directory_log" value="/dsk/l1/misc/Morpheo/" /> 18 18 19 <parameter name="statistics_cycle_start" value=" 100"/>19 <parameter name="statistics_cycle_start" value="5" /> 20 20 <parameter name="statistics_period" value="0" /> 21 21 … … 27 27 <parameter name="debug_level" value="3" /> 28 28 <parameter name="debug_cycle_start" value="0" /> 29 <parameter name="debug_cycle_stop" value=" 50" />29 <parameter name="debug_cycle_stop" value="100" /> 30 30 <parameter name="debug_nb_cycle" value="200000" /> 31 31 32 32 <parameter name="debug_log_file_generate" value="0" /> 33 33 <parameter name="debug_idle_cycle" value="200" /> 34 <parameter name="debug_idle_time" value=" 5" />34 <parameter name="debug_idle_time" value="20" /> 35 35 36 <component name="Comparator" model="systemc" debug=" 0" />37 <component name="Counter" model="systemc" debug=" 0" />38 <component name="Divider" model="systemc" debug=" 0" />39 <component name="Multiplier" model="systemc" debug=" 0" />40 <component name="Priority" model="systemc" debug=" 0" />41 <component name="Queue_Control" model="systemc" debug=" 0" />42 <component name="Queue" model="systemc" debug=" 0" />43 <component name="RegisterFile_Monolithic" model="systemc" debug=" 0" />44 <component name="RegisterFile_Multi_Banked" model="systemc" debug=" 0" />45 <component name="RegisterFile" model="systemc" debug=" 0" />46 <component name="Select_Priority_Fixed" model="systemc" debug=" 0" />47 <component name="Select" model="systemc" debug=" 0" />48 <component name="Shifter" model="systemc" debug=" 0" />49 <component name="Sort" model="systemc" debug=" 0" />50 <component name="Victim_Pseudo_LRU" model="systemc" debug=" 0" />51 <component name="Victim" model="systemc" debug=" 0" />52 <component name="Execute_loop_Glue" model="systemc" debug=" 0" />53 <component name="Functionnal_unit" model="systemc" debug=" 0" />54 <component name="Load_store_unit" model="systemc" debug=" 0" />55 <component name="Read_queue" model="systemc" debug=" 0" />56 <component name="Reservation_station" model="systemc" debug=" 0" />57 <component name="Read_unit" model="systemc" debug=" 0" />58 <component name="Execute_queue" model="systemc" debug=" 0" />59 <component name="Write_queue" model="systemc" debug=" 0" />60 <component name="Write_unit" model="systemc" debug=" 0" />61 <component name="Execution_unit_to_Write_unit" model="systemc" debug=" 0" />62 <component name="Read_unit_to_Execution_unit" model="systemc" debug=" 0" />63 <component name="Register_unit_Glue" model="systemc" debug=" 0" />64 <component name="Register_unit" model="systemc" debug=" 0" />65 <component name="Execute_loop" model="systemc" debug=" 0" />36 <component name="Comparator" model="systemc" debug="1" /> 37 <component name="Counter" model="systemc" debug="1" /> 38 <component name="Divider" model="systemc" debug="1" /> 39 <component name="Multiplier" model="systemc" debug="1" /> 40 <component name="Priority" model="systemc" debug="1" /> 41 <component name="Queue_Control" model="systemc" debug="1" /> 42 <component name="Queue" model="systemc" debug="1" /> 43 <component name="RegisterFile_Monolithic" model="systemc" debug="1" /> 44 <component name="RegisterFile_Multi_Banked" model="systemc" debug="1" /> 45 <component name="RegisterFile" model="systemc" debug="1" /> 46 <component name="Select_Priority_Fixed" model="systemc" debug="1" /> 47 <component name="Select" model="systemc" debug="1" /> 48 <component name="Shifter" model="systemc" debug="1" /> 49 <component name="Sort" model="systemc" debug="1" /> 50 <component name="Victim_Pseudo_LRU" model="systemc" debug="1" /> 51 <component name="Victim" model="systemc" debug="1" /> 52 <component name="Execute_loop_Glue" model="systemc" debug="1" /> 53 <component name="Functionnal_unit" model="systemc" debug="1" /> 54 <component name="Load_store_unit" model="systemc" debug="1" /> 55 <component name="Read_queue" model="systemc" debug="1" /> 56 <component name="Reservation_station" model="systemc" debug="1" /> 57 <component name="Read_unit" model="systemc" debug="1" /> 58 <component name="Execute_queue" model="systemc" debug="1" /> 59 <component name="Write_queue" model="systemc" debug="1" /> 60 <component name="Write_unit" model="systemc" debug="1" /> 61 <component name="Execution_unit_to_Write_unit" model="systemc" debug="1" /> 62 <component name="Read_unit_to_Execution_unit" model="systemc" debug="1" /> 63 <component name="Register_unit_Glue" model="systemc" debug="1" /> 64 <component name="Register_unit" model="systemc" debug="1" /> 65 <component name="Execute_loop" model="systemc" debug="1" /> 66 66 <component name="Commit_unit" model="systemc" debug="1" /> 67 67 <component name="Issue_queue" model="systemc" debug="1" /> 68 <component name="OOO_Engine_Glue" model="systemc" debug=" 0" />68 <component name="OOO_Engine_Glue" model="systemc" debug="1" /> 69 69 <component name="Reexecute_unit" model="systemc" debug="1" /> 70 <component name="Load_Store_pointer_unit" model="systemc" debug=" 0" />71 <component name="Dependency_checking_unit" model="systemc" debug=" 0" />72 <component name="Free_List_unit" model="systemc" debug=" 0" />73 <component name="Register_Address_Translation_unit" model="systemc" debug=" 0" />74 <component name="Register_translation_unit_Glue" model="systemc" debug=" 0" />75 <component name="Stat_List_unit" model="systemc" debug=" 0" />76 <component name="Register_translation_unit" model="systemc" debug=" 0" />77 <component name="Rename_unit_Glue" model="systemc" debug=" 0" />78 <component name="Rename_select" model="systemc" debug=" 0" />79 <component name="Rename_unit" model="systemc" debug=" 0" />80 <component name="Special_Register_unit" model="systemc" debug=" 0" />81 <component name="OOO_Engine" model="systemc" debug=" 0" />70 <component name="Load_Store_pointer_unit" model="systemc" debug="1" /> 71 <component name="Dependency_checking_unit" model="systemc" debug="1" /> 72 <component name="Free_List_unit" model="systemc" debug="1" /> 73 <component name="Register_Address_Translation_unit" model="systemc" debug="1" /> 74 <component name="Register_translation_unit_Glue" model="systemc" debug="1" /> 75 <component name="Stat_List_unit" model="systemc" debug="1" /> 76 <component name="Register_translation_unit" model="systemc" debug="1" /> 77 <component name="Rename_unit_Glue" model="systemc" debug="1" /> 78 <component name="Rename_select" model="systemc" debug="1" /> 79 <component name="Rename_unit" model="systemc" debug="1" /> 80 <component name="Special_Register_unit" model="systemc" debug="1" /> 81 <component name="OOO_Engine" model="systemc" debug="1" /> 82 82 <component name="Context_State" model="systemc" debug="1" /> 83 83 <component name="Decod" model="systemc" debug="1" /> 84 84 <component name="Decod_queue" model="systemc" debug="1" /> 85 <component name="Decod_unit" model="systemc" debug=" 0" />86 <component name="Front_end_Glue" model="systemc" debug=" 0" />87 <component name="Address_management" model="systemc" debug=" 0" />85 <component name="Decod_unit" model="systemc" debug="1" /> 86 <component name="Front_end_Glue" model="systemc" debug="1" /> 87 <component name="Address_management" model="systemc" debug="1" /> 88 88 <component name="Ifetch_queue" model="systemc" debug="1" /> 89 <component name="Ifetch_unit_Glue" model="systemc" debug=" 0" />90 <component name="Ifetch_unit" model="systemc" debug=" 0" />91 <component name="Branch_Target_Buffer_Glue" model="systemc" debug=" 0" />92 <component name="Branch_Target_Buffer_Register" model="systemc" debug=" 0" />93 <component name="Branch_Target_Buffer" model="systemc" debug=" 0" />94 <component name="Direction_Glue" model="systemc" debug=" 0" />95 <component name="Direction" model="systemc" debug=" 0" />96 <component name="Two_Level_Branch_Predictor" model="systemc" debug=" 0" />97 <component name="Meta_Predictor_Glue" model="systemc" debug=" 0" />98 <component name="Meta_Predictor" model="systemc" debug=" 0" />99 <component name="Prediction_unit_Glue" model="systemc" debug=" 0" />100 <component name="Return_Address_Stack" model="systemc" debug=" 0" />89 <component name="Ifetch_unit_Glue" model="systemc" debug="1" /> 90 <component name="Ifetch_unit" model="systemc" debug="1" /> 91 <component name="Branch_Target_Buffer_Glue" model="systemc" debug="1" /> 92 <component name="Branch_Target_Buffer_Register" model="systemc" debug="1" /> 93 <component name="Branch_Target_Buffer" model="systemc" debug="1" /> 94 <component name="Direction_Glue" model="systemc" debug="1" /> 95 <component name="Direction" model="systemc" debug="1" /> 96 <component name="Two_Level_Branch_Predictor" model="systemc" debug="1" /> 97 <component name="Meta_Predictor_Glue" model="systemc" debug="1" /> 98 <component name="Meta_Predictor" model="systemc" debug="1" /> 99 <component name="Prediction_unit_Glue" model="systemc" debug="1" /> 100 <component name="Return_Address_Stack" model="systemc" debug="1" /> 101 101 <component name="Update_Prediction_Table" model="systemc" debug="1" /> 102 <component name="Prediction_unit" model="systemc" debug=" 0" />103 <component name="Front_end" model="systemc" debug=" 0" />102 <component name="Prediction_unit" model="systemc" debug="1" /> 103 <component name="Front_end" model="systemc" debug="1" /> 104 104 <component name="Icache_Access" model="systemc" debug="1" /> 105 <component name="Dcache_Access" model="systemc" debug=" 0" />106 <component name="Core_Glue" model="systemc" debug=" 0" />107 <component name="Core" model="systemc" debug=" 0" />108 <component name="TopLevel" model="systemc" debug=" 0" />105 <component name="Dcache_Access" model="systemc" debug="1" /> 106 <component name="Core_Glue" model="systemc" debug="1" /> 107 <component name="Core" model="systemc" debug="1" /> 108 <component name="TopLevel" model="systemc" debug="1" /> 109 109 110 <component name="Behavioural" model="systemc" debug=" 0" />111 <component name="Interface" model="systemc" debug=" 0" />112 <component name="Allocation" model="systemc" debug=" 0" />110 <component name="Behavioural" model="systemc" debug="1" /> 111 <component name="Interface" model="systemc" debug="1" /> 112 <component name="Allocation" model="systemc" debug="1" /> 113 113 114 114 </parameters> -
trunk/IPs/systemC/processor/Morpheo/Script/distexe.sh
r126 r128 5 5 #----------------------------------------------------------- 6 6 7 VERSION="1.0" 7 declare VERSION="1.0" 8 declare -i SLEEP=3 8 9 9 10 # Need : test, echo, cd, dirname, basename, ssh, ps aux … … 106 107 107 108 header; 108 echo " * {"$(my_date)"} <${HOSTNAME}> file : ${FILE_CMD}"; 109 echo " * {"$(my_date)"} <${HOSTNAME}> path : ${PATH_EXE}"; 109 110 echo " * {"$(my_date)"} <${HOSTNAME}> file : ${FILE_CMD}"; 111 echo " * {"$(my_date)"} <${HOSTNAME}> path : ${PATH_EXE}"; 112 echo " * {"$(my_date)"} <${HOSTNAME}> sleep : ${SLEEP}"; 110 113 111 114 local hosts="${DISTEXE_HOSTS}"; … … 133 136 local -i res=1 134 137 135 while t est ${res} -ne 0; do138 while true; do 136 139 res=$(ps aux | grep -c "${commands[${cpt}]}"); 140 141 if test ${res} -eq 0; then 142 break; 143 fi; 144 145 # wait (to not have 100% cpu) 146 sleep ${SLEEP}; 137 147 done 138 148 -
trunk/IPs/systemC/processor/Morpheo/Script/execute.sh
r127 r128 89 89 90 90 local -i NB_DIGIT=0; 91 local -i x=${#COMMAND[*]}; 91 local -i NB_COMMAND=${#COMMAND[*]}; 92 local -i x=${NB_COMMAND}; 92 93 93 94 while test ${x} -ne 0; do … … 113 114 114 115 # test if this number is valid 115 if test ${CPT} -ge ${ #COMMAND[*]}; then116 CPT=${ #COMMAND[*]};116 if test ${CPT} -ge ${NB_COMMAND}; then 117 CPT=${NB_COMMAND}; 117 118 fi; 118 119 … … 129 130 130 131 # test if this number is valid 131 if test ${CPT} -eq ${ #COMMAND[*]}; then132 if test ${CPT} -eq ${NB_COMMAND}; then 132 133 break; 133 134 fi; … … 138 139 139 140 # echo " * {"$(my_date)"} <${ID}> execute command [${NUM}] : ${COMMAND[${CPT}]}"; 140 echo " * {"$(my_date)"} <${ID}> command [${NUM} ] : execute";141 echo " * {"$(my_date)"} <${ID}> command [${NUM}/${NB_COMMAND}] : execute"; 141 142 local PATH_CURRENT=${PWD}; 142 143 … … 154 155 ./${OUTPUT_FILE_CMD} &> ${OUTPUT_FILE_OUT}; 155 156 cd ${PATH_CURRENT} &> /dev/null; 156 echo " * {"$(my_date)"} <${ID}> command [${NUM} ] : done";157 echo " * {"$(my_date)"} <${ID}> command [${NUM}/${NB_COMMAND}] : done"; 157 158 fi; 158 159 done;
Note: See TracChangeset
for help on using the changeset viewer.