Changeset 135 for trunk/modules/vci_synthetic_initator
- Timestamp:
- Jan 28, 2011, 2:16:55 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
r132 r135 133 133 const size_t m_ymax; 134 134 const size_t m_srcid; 135 static const intm_tab_size = 1 << vci_param::T;135 static const size_t m_tab_size = 1 << vci_param::T; 136 136 137 137 -
trunk/modules/vci_synthetic_initator/caba/sources/src/vci_synthetic_initiator.cpp
r132 r135 34 34 35 35 36 #define DETERMINISTIC36 //#define DETERMINISTIC 37 37 38 38 namespace soclib { namespace caba { … … 68 68 p_resetn("resetn"), 69 69 p_vci("vci_ini"), 70 70 // FIFOs 71 71 m_srcid( mt.indexForId(vci_index) ), 72 // FIFOs73 72 m_length(length), 74 73 m_rho(rho), … … 163 162 { 164 163 std::cout << name() << " : "<< std::dec << r_cpt_cycles.read() << " cycles, " << r_nb_single.read() << " packets sent" << std::endl; 164 if (m_rho) 165 { 166 std::cout << "Average latency : " << (double)(r_latency_single.read())/(double)(r_nb_single.read()) << std::endl; 167 } 165 168 if(m_bc_period) 166 169 { 167 170 std::cout << "Number of broadcast sent and received : " << r_nb_bc.read() << std::endl; 168 std::cout << ((double)r_latency_bc.read()/(double)r_nb_bc.read()) << std::endl;171 std::cout << "Average latency : " << ((double)r_latency_bc.read()/(double)r_nb_bc.read()) << std::endl; 169 172 } 170 173 } … … 192 195 193 196 // Initializing the instrumentation registers 194 r_latency_single = 0 197 r_latency_single = 0; 195 198 r_nb_single = 0; 196 r_latency_bc = 0 199 r_latency_bc = 0; 197 200 r_nb_bc = 0; 198 201 r_cpt_cycles = 0; 199 202 r_cpt_period = 0; 200 203 201 r_cmd_seed = (uint32_t)m_srcid;204 r_cmd_seed = (uint32_t)m_srcid; 202 205 203 206 return; … … 206 209 bool fifo_put = false; 207 210 bool fifo_get = false; 208 bool fifo_bc; 209 211 bool fifo_bc = false; 212 213 214 #ifdef DETERMINISTIC 210 215 uint32_t m_local_seed ; 216 #endif 211 217 212 218 ////////////////// … … 229 235 { 230 236 int id = -1; 231 for( int i = 1; i < m_tab_size; i++){ // ID 0 reserved for broadcast transactions237 for(size_t i = 1; i < m_tab_size; i++){ // ID 0 reserved for broadcast transactions 232 238 if(r_pending_fsm[i].read() == false) 233 239 { 234 id = i;240 id = (int)i; 235 241 break; 236 242 } … … 259 265 if (r_cmd_count.read() == m_length-1) 260 266 { 261 r_nb_single = r_nb_single.read() + 1;267 //r_nb_single = r_nb_single.read() + 1; 262 268 r_cmd_fsm = VCI_SINGLE_REGISTER ; 263 269 }
Note: See TracChangeset
for help on using the changeset viewer.