- Timestamp:
- Jun 17, 2009, 2:11:25 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/Environment/src/Environment_genMoore.cpp
r88 r124 30 30 //----------------------------------------------------------------------------- 31 31 { 32 // init 32 33 for (uint32_t j = 0; j < param->icache_dedicated_nb_port [i]; j ++) 34 icache_rsp_val [i][j] = 0; 35 36 for (uint32_t j = 0; j+1 < component_buffer_irsp [i]->nb_slot_use(); j ++) 33 37 { 34 38 // Test the number of element in the respons's buffer 35 if (j >= component_buffer_irsp [i]->nb_slot_use()) 36 { 37 icache_rsp_val [i][j] = 0; // No respons 38 } 39 else 40 { 41 queue::slot_t<irsp_t*> slot = component_buffer_irsp [i]->read(j); 39 40 queue::slot_t<irsp_t*> slot = component_buffer_irsp [i]->read(j); 41 42 uint32_t port = slot._data->port; 43 44 bool val = ((slot._delay == 0) and (icache_rsp_val [i][port] == 0)); 45 46 _cout(ENVIRONMENT, "buffer_irsp [%d][%d] - delay %d - port %d\n",i,j,slot._delay,port); 47 48 49 if (val) 50 { 51 _cout(ENVIRONMENT, "ICACHE_RSP [%d][%d] - respons valid\n",i,port); 52 53 icache_rsp_val [i][port] = 1; 54 55 ICACHE_RSP_CONTEXT_ID [i][port]->write(slot._data->trdid); // TODO : test if exist 56 ICACHE_RSP_PACKET_ID [i][port]->write(slot._data->pktid); // TODO : test if exist 57 ICACHE_RSP_ERROR [i][port]->write(slot._data->error); 42 58 43 bool val = (slot._delay == 0); 44 45 icache_rsp_val [i][j] = (val); // respons if have a result 46 47 if (val) 48 { 49 ICACHE_RSP_CONTEXT_ID [i][j]->write(slot._data->trdid); // TODO : test if exist 50 ICACHE_RSP_PACKET_ID [i][j]->write(slot._data->pktid); // TODO : test if exist 51 ICACHE_RSP_ERROR [i][j]->write(slot._data->error); 52 53 for (uint32_t k = 0; k < param->iaccess_nb_instruction[i]; k ++) 54 { 55 Ticache_instruction_t data = 0; 56 57 atoi (slot._data->data[k], data, param->iaccess_size_instruction[i]/8); 58 59 ICACHE_RSP_INSTRUCTION [i][j][k]->write(data); 60 } 61 } 62 } 63 64 ICACHE_RSP_VAL [i][j]->write (icache_rsp_val [i][j]); 65 } 59 for (uint32_t k = 0; k < param->iaccess_nb_instruction[i]; k ++) 60 { 61 Ticache_instruction_t data = 0; 62 63 atoi (slot._data->data[k], data, param->iaccess_size_instruction[i]/8); 64 65 ICACHE_RSP_INSTRUCTION [i][port][k]->write(data); 66 } 67 } 68 } 69 70 for (uint32_t j = 0; j < param->icache_dedicated_nb_port [i]; j ++) 71 ICACHE_RSP_VAL [i][j]->write (icache_rsp_val [i][j]); 66 72 } 67 73 … … 103 109 if (val) 104 110 { 111 _cout(ENVIRONMENT, "DCACHE_RSP [%d][%d] - respons valid\n",i,j); 112 105 113 DCACHE_RSP_CONTEXT_ID [i][j]->write(slot._data->trdid); // TODO : test if exist 106 114 DCACHE_RSP_PACKET_ID [i][j]->write(slot._data->pktid); // TODO : test if exist
Note: See TracChangeset
for help on using the changeset viewer.