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 101)
+++ trunk/modules/vci_synthetic_initator/caba/sources/include/vci_synthetic_initiator.h	(revision 102)
@@ -47,5 +47,5 @@
       : public soclib::caba::BaseModule
     {
-      //typedef sc_dt::sc_uint<40> addr_t;
+      typedef sc_dt::sc_uint<40> addr_t;
       typedef typename vci_param::fast_addr_t vci_addr_t;
       typedef uint32_t data_t;
@@ -56,18 +56,18 @@
 
       // Type of the addr_t and access of the fields
-      typedef union{
-        PACKED_BITFIELD(
-	  vci_addr_t srcid:vci_param::S,
-	  vci_addr_t null:(8*sizeof(vci_addr_t)-(2*vci_param::S)),
-	) normal_address;
-	PACKED_BITFIELD(
-	  vci_addr_t xmin:vci_param::S,
-	  vci_addr_t xmax:vci_param::S,
-	  vci_addr_t ymin:vci_param::S,
-	  vci_addr_t ymax:vci_param::S,
-	  vci_addr_t null_:(8*sizeof(vci_addr_t)-(4*vci_param::S)),
-	  vci_addr_t bc:2,
-	) broadcast_address;
-      } addr_t;
+      //typedef union{
+      //  PACKED_BITFIELD(
+      //    vci_addr_t srcid:vci_param::S,
+      //    vci_addr_t null:(8*sizeof(vci_addr_t)-(2*vci_param::S)),
+      //  ) normal_address;
+      //  PACKED_BITFIELD(
+      //    vci_addr_t xmin:vci_param::S,
+      //    vci_addr_t xmax:vci_param::S,
+      //    vci_addr_t ymin:vci_param::S,
+      //    vci_addr_t ymax:vci_param::S,
+      //    vci_addr_t null_:(8*sizeof(vci_addr_t)-(4*vci_param::S)),
+      //    vci_addr_t bc:2,
+      //  ) broadcast_address;
+      //} addr_t;
 
 
@@ -99,16 +99,16 @@
       VciSyntheticInitiator(
 		sc_module_name name,
-		const  soclib::common::MappingTable &mt,
-		const  soclib::common::IntTab       &vci_index,
-		size_t length,    // Packet length (flit numbers)
-		float  rho,       // Packets ratio on the network
-		size_t depth,     // Fifo depth
-		size_t xmesh,	
-		size_t ymesh,
-		size_t bc_period = 0, // Broadcast period, if no broadcast => 0
-		size_t xmin = 0, 
-		size_t xmax = 0,
-		size_t ymin = 0,
-		size_t ymax = 0,
+		const soclib::common::MappingTable &mt,
+		const soclib::common::IntTab       &vci_index,
+		const uint32_t length,    // Packet length (flit numbers)
+		const float  rho,       // Packets ratio on the network
+		const uint32_t depth,     // Fifo depth
+		const uint32_t xmesh,	
+		const uint32_t ymesh,
+		const uint32_t bc_period = 0, // Broadcast period, if no broadcast => 0
+		const uint32_t xmin = 0, 
+		const uint32_t xmax = 0,
+		const uint32_t ymin = 0,
+		const uint32_t ymax = 0
 		);                                 
 
@@ -119,5 +119,5 @@
       void genMoore();
 
-      void destAdress(size_t X_local, size_t Y_local, size_t &X_dest, size_t &Y_dest);
+      size_t destAdress();
 
     private:
@@ -125,5 +125,5 @@
       // Component attributes
       const size_t   			  m_length;		// Number of words to write
-      const size_t			  m_rho;		// Rate of packets in the network wanted
+      const float			  m_rho;		// Rate of packets in the network wanted
       const size_t			  m_depth;     		// Fifo depth
       const size_t			  m_xmesh;	
@@ -141,5 +141,4 @@
       uint64_t	  			  m_start_latency1;         // Start time of sending packet wanted
       uint64_t	  			  m_start_latency2;         // Start time of sending packet
-      addr_t				  m_address_to_send;        // Address to send the write command
       float				  m_rhos;		    // Effective Rho during the simulation
       size_t				  m_bc_nrsp;		    // Expected number of responses for a broadcast command
@@ -154,4 +153,6 @@
       sc_signal<bool>	       r_broadcast_req;
 
+      sc_signal<addr_t>	       r_address_to_send;        // Address to send the write command
+
     }; // end class VciSyntheticInitiator
  
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 101)
+++ trunk/modules/vci_synthetic_initator/caba/sources/src/vci_synthetic_initiator.cpp	(revision 102)
@@ -45,16 +45,16 @@
   tmpl(/**/)::VciSyntheticInitiator( 
       sc_module_name name,
-      const  soclib::common::MappingTable &mt,
-      const  soclib::common::IntTab       &vci_index,
-      size_t length,    // Packet length (flit numbers)
-      float  rho,       // Packets ratio on the network
-      size_t depth,     // Fifo depth
-      size_t xmesh,	
-      size_t ymesh,
-      size_t bc_period = 0, // Broadcast period, if no broadcast => 0
-      size_t xmin = 0, 
-      size_t xmax = 0,
-      size_t ymin = 0,
-      size_t ymax = 0
+      const soclib::common::MappingTable &mt,
+      const soclib::common::IntTab       &vci_index,
+      const uint32_t length,    // Packet length (flit numbers)
+      const float  rho,       // Packets ratio on the network
+      const uint32_t depth,     // Fifo depth
+      const uint32_t xmesh,	
+      const uint32_t ymesh,
+      const uint32_t bc_period, // Broadcast period, if no broadcast => 0
+      const uint32_t xmin, 
+      const uint32_t xmax,
+      const uint32_t ymin,
+      const uint32_t ymax
       )
 
@@ -71,6 +71,4 @@
     m_rho(rho),
     m_depth(depth),
-    m_x(x),
-    m_y(y),
     m_xmesh(xmesh),
     m_ymesh(ymesh),
@@ -81,5 +79,5 @@
     m_ymax(ymax),
     m_date_fifo("m_date_fifo", depth),
-    r_vci_fsm("r_vci_fsm"),
+    r_vci_fsm("r_vci_fsm")
     {
 
@@ -160,5 +158,5 @@
 	    } else {
 	      r_vci_fsm = VCI_SINGLE_SEND ;
-	      destAdress();
+	      r_address_to_send = destAdress();
 	      m_count = 0;
 	    }
@@ -196,9 +194,10 @@
       case VCI_BC_SEND:
         {
-	  m_address_to_send.broadcast_address.xmin = m_xmin;
-	  m_address_to_send.broadcast_address.xmax = m_xmax;
-	  m_address_to_send.broadcast_address.ymin = m_ymin;
-	  m_address_to_send.broadcast_address.ymax = m_ymax;
-	  m_address_to_send.broadcast_address.bc   = 0x3;
+	  r_address_to_send = (((((((((m_xmin << 5) & m_xmax ) << 5 ) & m_ymin ) << 5 ) & m_ymax ) << 5 ) << 17 ) & 0x3) | 0 ;
+	  //m_address_to_send.broadcast_address.xmin = m_xmin;
+	  //m_address_to_send.broadcast_address.xmax = m_xmax;
+	  //m_address_to_send.broadcast_address.ymin = m_ymin;
+	  //m_address_to_send.broadcast_address.ymax = m_ymax;
+	  //m_address_to_send.broadcast_address.bc   = 0x3;
 	  m_bc_nrsp = (m_xmax - m_xmin) * (m_ymax - m_ymin);
 	  r_vci_fsm = VCI_BC_SEND;
@@ -223,9 +222,9 @@
 
 /////////////////// Filling fifo
-    if( (rhos < m_rho) && (rand()/RAND_MAX) ){
+    if( (m_rhos < m_rho) && (rand()/RAND_MAX) ){
       if (m_date_fifo.wok()){
         date_fifo_put = true ;
       } 
-      if (!r_broadcast_req.read() && (m_cpt_cycles % bc_period)){
+      if (!r_broadcast_req.read() && (m_cpt_cycles % m_bc_period)){
         r_broadcast_req = true;
       }
@@ -288,5 +287,5 @@
         {
 	  p_vci.cmdval  = true;                 
-	  p_vci.address = (typename vci_param::addr_t)(m_address_to_send+(m_count*4)); 
+	  p_vci.address = (vci_addr_t)(r_address_to_send.read() + (m_count*4)); 
 	  p_vci.plen    = m_length*4;                                         
 	  p_vci.wdata   = 0;                                       
@@ -316,5 +315,5 @@
         {
        	  p_vci.cmdval  = true;                 
-	  p_vci.address = (typename vci_param::addr_t) m_address_to_send; 
+	  p_vci.address = (vci_addr_t) r_address_to_send.read(); 
 	  p_vci.plen    = 4;                                         
 	  p_vci.wdata   = 0;                                       
