Changeset 124
- Timestamp:
- Jan 10, 2011, 3:50:25 PM (14 years ago)
- Location:
- trunk/modules/vci_synthetic_initator/caba/sources
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/vci_synthetic_initator/caba/sources/include/vci_synthetic_initiator.h
r123 r124 41 41 #include "mapping_table.h" 42 42 #include "arithmetics.h" 43 //#include <cmath>44 43 45 44 namespace soclib { namespace caba { -
trunk/modules/vci_synthetic_initator/caba/sources/src/vci_synthetic_initiator.cpp
r123 r124 107 107 ///////////////////////////////// 108 108 { 109 for(int i = 0; i < tab_size ; i++){ 110 delete r_req_id[i]; 111 } 112 delete r_req_id; 109 113 } 110 114 … … 142 146 << " Adresse to send : " << std::hex << m_address_to_send 143 147 << " Number of broadcast to receive : " << std::dec << r_bc_nrsp.read() 144 << " Number of packets sent : " << std::dec << m_npackets << m_id_to_send << std::endl;148 << " Number of packets sent : " << std::dec << m_npackets << " " << m_id_to_send << std::endl; 145 149 for(int i = 0; i < (1<<vci_param::T) ; i++){ 146 std::cout << "ID : " << i << " " << r_req_id[i][0].read() << " " << r_req_id[i][0].read() << std::endl;150 std::cout << "ID : " << i << " " << (r_req_id[i][0].read()) << " " << (r_req_id[i][0].read()) << std::endl; 147 151 } 148 152 } … … 198 202 r_req_id[i][0] = 0; 199 203 r_req_id[i][1] = 0; 200 //std::cout << name() << " bla bla " << i<< std::endl;204 // std::cout << "bla bla" << std::endl; 201 205 } 202 206 … … 219 223 r_cmd_fsm = VCI_BC_SEND ; 220 224 } else { 225 m_id_to_send = -1; 221 226 for(int i = 0; i < tab_size; i++){ 222 if(r_req_id[i][0] == 0){227 if(r_req_id[i][0].read() == 0){ 223 228 m_id_to_send = i; 229 r_req_id[i][0] = m_date_fifo.read(); 230 r_req_id[i][1] = m_cpt_cycles; 224 231 break; 225 }else{226 m_id_to_send = -1;227 232 } 228 233 } … … 248 253 if (p_vci.cmdack.read()){ 249 254 if (m_count == m_length-1) { 250 r_req_id[(int)m_id_to_send][0] = m_date_fifo.read(); 251 r_req_id[m_id_to_send][1] = m_cpt_cycles; 255 //r_req_id[m_id_to_send][0] = (uint64_t)(m_date_fifo.read()); 256 //r_req_id[m_id_to_send][0] = m_date_fifo.read(); 257 //r_req_id[m_id_to_send][1] = m_cpt_cycles; 258 //std::cout << name () << " FIFO " << m_date_fifo.read() << std::endl; 252 259 date_fifo_get = true; 253 260 r_cmd_fsm = VCI_IDLE ; … … 265 272 r_bc_nrsp = (m_xmax - m_xmin) * (m_ymax - m_ymin) ; 266 273 m_start_latency_bc = m_cpt_cycles; 274 r_broadcast_rsp = true; 267 275 date_fifo_get = true; 268 r_broadcast_rsp = true;269 276 r_bc_rsp_fsm = VCI_IDLE; 270 277 break; 271 278 } 272 279 } 273 274 280 } // end switch vci_fsm 275 281 … … 305 311 if(p_vci.rspval.read()){ 306 312 if((int)(p_vci.pktid.read()) == 0){ 307 m_latency1 = m_latency1 + (m_cpt_cycles - r_req_id[(int)(p_vci. trdid.read())][0]);308 m_latency2 = m_latency2 + (m_cpt_cycles - r_req_id[(int)(p_vci. trdid.read())][1]);313 m_latency1 = m_latency1 + (m_cpt_cycles - r_req_id[(int)(p_vci.rtrdid.read())][0].read()); 314 m_latency2 = m_latency2 + (m_cpt_cycles - r_req_id[(int)(p_vci.rtrdid.read())][1].read()); 309 315 m_npackets++; 310 r_req_id[(int)(p_vci.trdid.read())][0] = 0; 311 r_req_id[(int)(p_vci.trdid.read())][1] = 0; 316 r_req_id[(int)(p_vci.rtrdid.read())][0] = 0; 317 r_req_id[(int)(p_vci.rtrdid.read())][1] = 0; 318 //std::cout << name() << " bla bla " << p_vci.rtrdid.read() << std::endl; 312 319 } 313 320 }
Note: See TracChangeset
for help on using the changeset viewer.