Index: trunk/IPs/systemC/Environment/Cache/include/Cache_OneLevel.h
===================================================================
--- trunk/IPs/systemC/Environment/Cache/include/Cache_OneLevel.h	(revision 88)
+++ trunk/IPs/systemC/Environment/Cache/include/Cache_OneLevel.h	(revision 101)
@@ -32,21 +32,24 @@
 
 
-  public    : void             reset             (void);
-  public    : void             transition        (void);
-  private   : void             update_lru        (uint32_t familly, uint32_t num_associativity);
-  private   : uint32_t         index_victim      (uint32_t familly);
-  private   : Address          translate_address (uint32_t address);
-  public    : type_rsp_cache_t access            (uint32_t num_port, uint32_t address, uint32_t trdid, type_req_cache_t type, direction_req_cache_t dir);
-  private   : type_rsp_cache_t access_cached     (uint32_t num_port, uint32_t address, uint32_t trdid,                        direction_req_cache_t dir);
-  private   : type_rsp_cache_t access_uncached   (uint32_t num_port, uint32_t address, uint32_t trdid);
-  private   : type_rsp_cache_t access_invalidate (uint32_t num_port, uint32_t address, uint32_t trdid);
-  private   : type_rsp_cache_t access_flush      (uint32_t num_port, uint32_t address, uint32_t trdid);
-  private   : uint32_t         hit_write_buffer  (uint32_t trdid, Address address);
-  private   : uint32_t         hit_cache         (uint32_t trdid, Address address);
-  private   : uint32_t         hit_access_port   (uint32_t trdid, Address address);
-  public    : uint32_t         need_slot         (void);
-  public    : uint32_t         latence           (uint32_t num_port);
-  public    : uint32_t         update_latence    (uint32_t num_port, uint32_t latence);
-  public    : std::string      information       (uint32_t depth);
+  public    : void             reset                  (void);
+  public    : void             transition             (void);
+  private   : void             update_lru             (uint32_t familly, uint32_t num_associativity);
+  private   : uint32_t         index_victim           (uint32_t familly);
+  private   : Address          translate_address      (uint32_t address);
+  public    : type_rsp_cache_t access                 (uint32_t num_port, uint32_t address, uint32_t trdid, type_req_cache_t type, direction_req_cache_t dir);
+  private   : type_rsp_cache_t access_cached          (uint32_t num_port, uint32_t address, uint32_t trdid,                        direction_req_cache_t dir);
+  private   : type_rsp_cache_t access_uncached        (uint32_t num_port, uint32_t address, uint32_t trdid);
+  private   : type_rsp_cache_t access_invalidate      (uint32_t num_port, uint32_t address, uint32_t trdid);
+  private   : type_rsp_cache_t access_flush           (uint32_t num_port, uint32_t address, uint32_t trdid);
+  private   : type_rsp_cache_t access_lock            (uint32_t num_port, uint32_t address, uint32_t trdid);
+  private   : type_rsp_cache_t access_prefetch        (uint32_t num_port, uint32_t address, uint32_t trdid);
+  private   : type_rsp_cache_t access_synchronization (uint32_t num_port, uint32_t address, uint32_t trdid);
+  private   : uint32_t         hit_write_buffer       (uint32_t trdid, Address address);
+  private   : uint32_t         hit_cache              (uint32_t trdid, Address address);
+  private   : uint32_t         hit_access_port        (uint32_t trdid, Address address);
+  public    : uint32_t         need_slot              (void);
+  public    : uint32_t         latence                (uint32_t num_port);
+  public    : uint32_t         update_latence         (uint32_t num_port, uint32_t latence);
+  public    : std::string      information            (uint32_t depth);
 
   public    : friend std::ostream& operator<< (std::ostream& output, Cache_OneLevel & x);
Index: trunk/IPs/systemC/Environment/Cache/include/Types.h
===================================================================
--- trunk/IPs/systemC/Environment/Cache/include/Types.h	(revision 88)
+++ trunk/IPs/systemC/Environment/Cache/include/Types.h	(revision 101)
@@ -32,9 +32,11 @@
   typedef enum 
     {
-      CACHED     , // address can be in the cache
-      UNCACHED   , // Always miss (not address in cache)
-      INVALIDATE , // The direction is not used
-      PREFETCH   , // The direction is not used
-      FLUSH        // The direction is not used
+      CACHED         , // address can be in the cache
+      UNCACHED       , // Always miss (not address in cache)
+      INVALIDATE     , // The direction is not used
+      PREFETCH       , // The direction is not used
+      FLUSH          , // The direction is not used
+      LOCK           , // The direction is not used
+      SYNCHRONIZATION  // The direction is not used
     } type_req_cache_t;
 
Index: trunk/IPs/systemC/Environment/Cache/src/Cache_OneLevel_access.cpp
===================================================================
--- trunk/IPs/systemC/Environment/Cache/src/Cache_OneLevel_access.cpp	(revision 88)
+++ trunk/IPs/systemC/Environment/Cache/src/Cache_OneLevel_access.cpp	(revision 101)
@@ -20,12 +20,15 @@
 // 	      << " * direction  : " << dir      << std::endl;
 
+ // no difference with the simple read cached (have no add a prefetch cache)
     switch (type)
       {
-      case UNCACHED   : return access_uncached   (num_port,address,trdid    ); break;
-      case INVALIDATE : return access_invalidate (num_port,address,trdid    ); break;
-      case FLUSH      : return access_flush      (num_port,address,trdid    ); break;
-      case PREFETCH   : // no difference with the simple read cached (have no add a prefetch cache)
-      case CACHED     : return access_cached     (num_port,address,trdid,dir); break;
-      default         : std::cout << "<Cache_Onelevel.access> unknow type : " << std::endl; exit(1); break;
+      case UNCACHED        : return access_uncached        (num_port,address,trdid    ); break;
+      case INVALIDATE      : return access_invalidate      (num_port,address,trdid    ); break;
+      case FLUSH           : return access_flush           (num_port,address,trdid    ); break;
+      case PREFETCH        : return access_prefetch        (num_port,address,trdid    ); break;
+      case LOCK            : return access_lock            (num_port,address,trdid    ); break;
+      case SYNCHRONIZATION : return access_synchronization (num_port,address,trdid    ); break;
+      case CACHED          : return access_cached          (num_port,address,trdid,dir); break;
+      default              : std::cout << "<Cache_Onelevel.access> unknow type : " << std::endl; exit(1); break;
       }
   }
Index: trunk/IPs/systemC/Environment/Data/src/Data_entity.cpp
===================================================================
--- trunk/IPs/systemC/Environment/Data/src/Data_entity.cpp	(revision 88)
+++ trunk/IPs/systemC/Environment/Data/src/Data_entity.cpp	(revision 101)
@@ -1,3 +1,4 @@
 #include "../include/Data.h"
+#include "../../Common/include/Debug.h"
 
 namespace environment {
@@ -6,4 +7,8 @@
   Entity Data::entity (uint32_t address, uint32_t size)
   {
+//     _cout(DATA, "  * Data::entity\n");
+//     _cout(DATA, "    * address      : %.8x\n",address);
+//     _cout(DATA, "    * size         : %d\n"  ,size   );
+
     for (uint32_t num_seg = 0; num_seg < nb_seg; num_seg ++)
       if (segment[num_seg]->test (address,size) == true)
Index: trunk/IPs/systemC/Environment/Data/src/Segment_test.cpp
===================================================================
--- trunk/IPs/systemC/Environment/Data/src/Segment_test.cpp	(revision 88)
+++ trunk/IPs/systemC/Environment/Data/src/Segment_test.cpp	(revision 101)
@@ -1,3 +1,4 @@
 #include "../include/Segment.h"
+#include "../../Common/include/Debug.h"
 
 namespace environment {
@@ -11,4 +12,10 @@
   bool Segment::test (uint32_t address, uint32_t size)
   {
+//     _cout(DATA,"  * Segment::test\n");
+//     _cout(DATA,"    * address      : %.8x\n",address   );
+//     _cout(DATA,"    * size         : %d\n"  ,size      );
+//     _cout(DATA,"    * segment base : %.8x\n",this->base);
+//     _cout(DATA,"    * segment size : %.8x\n",this->size);
+
     bool res = (((address     ) >= (this->base           )) and
 		((address+size) <= (this->base+this->size)));
Index: trunk/IPs/systemC/Environment/src/Cache_Access_dreq_type2cache_type.cpp
===================================================================
--- trunk/IPs/systemC/Environment/src/Cache_Access_dreq_type2cache_type.cpp	(revision 88)
+++ trunk/IPs/systemC/Environment/src/Cache_Access_dreq_type2cache_type.cpp	(revision 101)
@@ -10,18 +10,18 @@
     switch (dreq_type)
       {
-      case DCACHE_TYPE_LOAD_8     : direction=cache::READ ; type=((uncached==true)?cache::UNCACHED:cache::CACHED); nb_bytes = 1; break; 
-      case DCACHE_TYPE_LOAD_16    : direction=cache::READ ; type=((uncached==true)?cache::UNCACHED:cache::CACHED); nb_bytes = 2; break; 
-      case DCACHE_TYPE_LOAD_32    : direction=cache::READ ; type=((uncached==true)?cache::UNCACHED:cache::CACHED); nb_bytes = 4; break; 
-      case DCACHE_TYPE_LOAD_64    : direction=cache::READ ; type=((uncached==true)?cache::UNCACHED:cache::CACHED); nb_bytes = 8; break; 
-      case DCACHE_TYPE_INVALIDATE : direction=cache::NONE ; type=cache::INVALIDATE                        ; nb_bytes = 1; break;
-      case DCACHE_TYPE_FLUSH      : direction=cache::NONE ; type=cache::FLUSH                             ; nb_bytes = 1; break;
-      case DCACHE_TYPE_PREFETCH   : direction=cache::NONE ; type=cache::INVALIDATE                        ; nb_bytes = 1; break;
-//    case DCACHE_TYPE_STORE_8_ACK: direction=cache::WRITE; type=((uncached==true)?cache::UNCACHED:cache::CACHED); nb_bytes = 1; break;
-      case DCACHE_TYPE_STORE_8    : direction=cache::WRITE; type=((uncached==true)?cache::UNCACHED:cache::CACHED); nb_bytes = 1; break;
-      case DCACHE_TYPE_STORE_16   : direction=cache::WRITE; type=((uncached==true)?cache::UNCACHED:cache::CACHED); nb_bytes = 2; break;
-      case DCACHE_TYPE_STORE_32   : direction=cache::WRITE; type=((uncached==true)?cache::UNCACHED:cache::CACHED); nb_bytes = 4; break;
-      case DCACHE_TYPE_STORE_64   : direction=cache::WRITE; type=((uncached==true)?cache::UNCACHED:cache::CACHED); nb_bytes = 8; break;
-      case DCACHE_TYPE_LOCK            :
-      case DCACHE_TYPE_SYNCHRONIZATION :
+      case DCACHE_TYPE_LOAD_8          : direction=cache::READ ;type=((uncached==true)?cache::UNCACHED:cache::CACHED);nb_bytes = 1;break; 
+      case DCACHE_TYPE_LOAD_16         : direction=cache::READ ;type=((uncached==true)?cache::UNCACHED:cache::CACHED);nb_bytes = 2;break; 
+      case DCACHE_TYPE_LOAD_32         : direction=cache::READ ;type=((uncached==true)?cache::UNCACHED:cache::CACHED);nb_bytes = 4;break; 
+      case DCACHE_TYPE_LOAD_64         : direction=cache::READ ;type=((uncached==true)?cache::UNCACHED:cache::CACHED);nb_bytes = 8;break; 
+      case DCACHE_TYPE_INVALIDATE      : direction=cache::NONE ;type=cache::INVALIDATE                               ;nb_bytes = 1;break;
+      case DCACHE_TYPE_FLUSH           : direction=cache::NONE ;type=cache::FLUSH                                    ;nb_bytes = 1;break;
+      case DCACHE_TYPE_PREFETCH        : direction=cache::NONE ;type=cache::PREFETCH                                 ;nb_bytes = 1;break;
+//    case DCACHE_TYPE_STORE_8_ACK     : direction=cache::WRITE;type=((uncached==true)?cache::UNCACHED:cache::CACHED);nb_bytes = 1;break;
+      case DCACHE_TYPE_STORE_8         : direction=cache::WRITE;type=((uncached==true)?cache::UNCACHED:cache::CACHED);nb_bytes = 1;break;
+      case DCACHE_TYPE_STORE_16        : direction=cache::WRITE;type=((uncached==true)?cache::UNCACHED:cache::CACHED);nb_bytes = 2;break;
+      case DCACHE_TYPE_STORE_32        : direction=cache::WRITE;type=((uncached==true)?cache::UNCACHED:cache::CACHED);nb_bytes = 4;break;
+      case DCACHE_TYPE_STORE_64        : direction=cache::WRITE;type=((uncached==true)?cache::UNCACHED:cache::CACHED);nb_bytes = 8;break;
+      case DCACHE_TYPE_SYNCHRONIZATION : direction=cache::NONE ;type=cache::SYNCHRONIZATION                          ;nb_bytes = 1;break;
+      case DCACHE_TYPE_LOCK            : direction=cache::NONE ;type=cache::LOCK                                     ;nb_bytes = 1;break;
       default : {std::cerr << "<ireq_type2cache_type> Unkown type (" << dreq_type << ")" << std::endl; exit(1);}
       }
Index: trunk/IPs/systemC/Environment/src/Cache_Access_ireq_type2cache_type.cpp
===================================================================
--- trunk/IPs/systemC/Environment/src/Cache_Access_ireq_type2cache_type.cpp	(revision 88)
+++ trunk/IPs/systemC/Environment/src/Cache_Access_ireq_type2cache_type.cpp	(revision 101)
@@ -13,5 +13,5 @@
       case ICACHE_TYPE_INVALIDATE : {direction=cache::NONE ; type=cache::INVALIDATE; break;}
       case ICACHE_TYPE_PREFETCH   : {direction=cache::NONE ; type=cache::PREFETCH  ; break;}
-      case ICACHE_TYPE_LOCK       :
+      case ICACHE_TYPE_LOCK       : {direction=cache::NONE ; type=cache::LOCK      ; break;}
       default : {std::cerr << "<ireq_type2cache_type> Unkown type (" << ireq_type << ")" << std::endl; exit(1);}
       }
Index: trunk/IPs/systemC/Environment/src/Environment_transition.cpp
===================================================================
--- trunk/IPs/systemC/Environment/src/Environment_transition.cpp	(revision 88)
+++ trunk/IPs/systemC/Environment/src/Environment_transition.cpp	(revision 101)
@@ -1,3 +1,6 @@
 #include "../include/Environment.h"
+
+#define CYCLE_MAX 0
+#include "../../processor/Morpheo/Common/include/Test.h"
 
 using namespace morpheo;
@@ -171,15 +174,10 @@
 		uint32_t          size      = param->daccess_size_data [i]/8;
 
-// 		_cout(ENVIRONMENT," * information\n");
-// 		_cout(ENVIRONMENT,"   * context : %d\n" ,static_cast<uint32_t>(context));
-// 		_cout(ENVIRONMENT,"   * packet  : %d\n" ,static_cast<uint32_t>(packet ));
-// 		_cout(ENVIRONMENT,"   * address : %.x\n",static_cast<uint32_t>(address));
-// 		_cout(ENVIRONMENT,"   * type    : %d\n" ,static_cast<uint32_t>(type   ));
-// 		_cout(ENVIRONMENT,"   * size    : %d\n" ,static_cast<uint32_t>(size   ));
-
-		// search the entity
-		data::Entity      entity    = component_data->entity(static_cast<uint32_t>(address),size);
-
-		std::cout << entity << std::endl;
+		_cout(ENVIRONMENT," * information\n");
+		_cout(ENVIRONMENT,"   * context : %d\n" ,static_cast<uint32_t>(context));
+		_cout(ENVIRONMENT,"   * packet  : %d\n" ,static_cast<uint32_t>(packet ));
+		_cout(ENVIRONMENT,"   * address : %.x\n",static_cast<uint32_t>(address));
+		_cout(ENVIRONMENT,"   * type    : %d\n" ,static_cast<uint32_t>(type   ));
+		_cout(ENVIRONMENT,"   * size    : %d\n" ,static_cast<uint32_t>(size   ));
 
 		bool              uncached  = false;
@@ -209,4 +207,9 @@
 		  default                          :{            must_read=false; must_write=false; must_ack=false; must_ack_on_error=false; break;} 
 		  }
+                
+		// search the entity
+		data::Entity      entity    = component_data->entity(static_cast<uint32_t>(address),nb_bytes);
+
+		std::cout << entity << std::endl;
 		
 		// Test the type of the address
@@ -250,4 +253,9 @@
 				       ,static_cast<uint32_t>((wdata>> 0)&0xff)
 				       );
+
+                                if (wdata == 0)
+                                  std::cout << STR_OK << std::endl;
+                                else
+                                  std::cout << STR_KO << std::endl;
 
                                 stop (context);
@@ -289,8 +297,8 @@
 			      // Read
 			      _cout(ENVIRONMENT," * Read  (%d bytes)\n",size);
-			      bus_error |= !component_data->read(address,size,read_dram[0]); // always read a complete word
+			      bus_error |= !component_data->read(address,nb_bytes,read_dram[0]); // always read a complete word
 
 			      _cout(ENVIRONMENT," * Rdata : ");
-			      for (uint32_t i=0; i<size; i++)
+			      for (uint32_t i=0; i<nb_bytes; i++)
 				_cout(ENVIRONMENT,"%.2x",0xff&static_cast<uint32_t>(read_dram[0][i]));
 			      _cout(ENVIRONMENT,".\n");
