Changeset 128 for trunk/IPs/systemC/Environment
- Timestamp:
- Jun 26, 2009, 10:43:23 AM (16 years ago)
- Location:
- trunk/IPs/systemC/Environment
- Files:
-
- 6 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]));
Note: See TracChangeset
for help on using the changeset viewer.