Index: trunk/modules/vci_synthetic_initator/caba/sources/include/vci_synthetic_initiator.h
===================================================================
--- trunk/modules/vci_synthetic_initator/caba/sources/include/vci_synthetic_initiator.h	(revision 144)
+++ trunk/modules/vci_synthetic_initator/caba/sources/include/vci_synthetic_initiator.h	(revision 145)
@@ -117,4 +117,8 @@
       void printStats();
 
+      double getLatencySingle();
+
+      double getLatencyBC();
+
       void print_trace();
 
Index: trunk/modules/vci_synthetic_initator/caba/sources/src/vci_synthetic_initiator.cpp
===================================================================
--- trunk/modules/vci_synthetic_initator/caba/sources/src/vci_synthetic_initiator.cpp	(revision 144)
+++ trunk/modules/vci_synthetic_initator/caba/sources/src/vci_synthetic_initiator.cpp	(revision 145)
@@ -35,4 +35,5 @@
 
 //#define DETERMINISTIC
+#define RANDOM_PERIOD
 
 namespace soclib { namespace caba {
@@ -133,5 +134,26 @@
   }
 
-  
+  //////////////////////////////////
+  tmpl(double)::getLatencySingle()
+  //////////////////////////////////
+  {
+	if (m_rho) 
+	  return (double)(r_latency_single.read())/(double)(r_nb_single.read());
+	else
+	  return 0;
+
+  }
+
+  //////////////////////////////////
+  tmpl(double)::getLatencyBC()
+  //////////////////////////////////
+  {
+	if(m_bc_period)
+	  return ((double)r_latency_bc.read()/(double)r_nb_bc.read());
+	else
+	  return 0;
+
+  }
+
   //////////////////////////////////
   tmpl(void)::print_trace()
@@ -151,5 +173,6 @@
 		  << " Adresse to send : " << std::hex << r_cmd_address.read()
 		  << " Number of broadcast to receive : " << std::dec << r_bc_nrsp.read() 
-		  << " Number of packets sent : " << std::dec << r_nb_single.read() << " " << r_cmd_trdid.read() << std::endl;
+		  << " Number of packets sent : " << std::dec << r_nb_single.read() << " " << r_cmd_trdid.read() 
+		  << " Cycles to the next BC : " << r_cpt_period.read() << std::endl;
 	for(int i = 0; i < (1<<vci_param::T) ; i++){
 	  std::cout << "ID : " << i << " " << (uint64_t)(r_pending_date[i].read()) << std::endl;
@@ -322,5 +345,9 @@
     //  traffic regulator
     ////////////////////////
+#ifdef RANDOM_PERIOD
+    if ( m_bc_period && (r_cpt_period.read() == 0) )
+#else
     if ( m_bc_period && (r_cpt_period.read() > m_bc_period) )
+#endif
     { 
       fifo_put = true ;
@@ -329,5 +356,9 @@
       {
         r_nb_bc = r_nb_bc.read() + 1;
+#ifdef RANDOM_PERIOD
+	r_cpt_period = (uint64_t) (rand()%(2*m_bc_period));
+#else
         r_cpt_period = 0;
+#endif
       }
     }
@@ -339,8 +370,15 @@
     }
 
+#ifdef RANDOM_PERIOD
+    if ( m_bc_period && (r_cpt_period.read() == 0) && r_date_fifo.wok() ) 
+	r_cpt_period = (uint64_t) (rand()%(2*m_bc_period));
+    else
+      r_cpt_period = r_cpt_period.read() - 1;
+#else
     if ( m_bc_period && (r_cpt_period.read() > m_bc_period) && r_date_fifo.wok() ) 
       r_cpt_period = 0;
     else
       r_cpt_period = r_cpt_period.read() + 1;
+#endif
 
     ////////////////////////
