Index: trunk/IPs/systemC/Environment/Cache/Makefile
===================================================================
--- trunk/IPs/systemC/Environment/Cache/Makefile	(revision 112)
+++ trunk/IPs/systemC/Environment/Cache/Makefile	(revision 113)
@@ -1,12 +1,2 @@
-#-----[ Directory ]----------------------------------------
-
-DIR_QUEUE			= ../Queue
-
-#-----[ Variable ]-----------------------------------------
-
-ENTITY                         ?= Cache
-
-OBJECTS_DEPS			= $(patsubst $(DIR_QUEUE)/$(DIR_SRC)/%.cpp,$(DIR_QUEUE)/$(DIR_OBJ)/%.o,$(wildcard $(DIR_QUEUE)/$(DIR_SRC)/*.cpp))
-
 #-----[ Rules ]--------------------------------------------
 
@@ -26,3 +16,4 @@
 				@$(MAKE) environment_help
 
-include                         ../Makefile.Environment
+include                         Makefile.defs
+include                         $(DIR_ENVIRONMENT)/Makefile.Environment
Index: trunk/IPs/systemC/Environment/Cache/Makefile.defs
===================================================================
--- trunk/IPs/systemC/Environment/Cache/Makefile.defs	(revision 113)
+++ trunk/IPs/systemC/Environment/Cache/Makefile.defs	(revision 113)
@@ -0,0 +1,14 @@
+#-----[ Directory ]----------------------------------------
+
+DIR_ENVIRONMENT                ?= ..
+DIR_QUEUE                      := $(DIR_ENVIRONMENT)/Queue
+
+include                         $(DIR_QUEUE)/Makefile.defs
+
+#-----[ Variable ]-----------------------------------------
+
+ENTITY                         := Cache
+
+include                         $(DIR_ENVIRONMENT)/Makefile.defs
+
+Cache_OBJECTS_DEPS             := $(OBJECTS) $(Queue_OBJECTS_DEPS)
Index: trunk/IPs/systemC/Environment/Data/Makefile
===================================================================
--- trunk/IPs/systemC/Environment/Data/Makefile	(revision 112)
+++ trunk/IPs/systemC/Environment/Data/Makefile	(revision 113)
@@ -1,25 +1,9 @@
-#-----[ Directory ]----------------------------------------
-
-# DIR_ENDIANNESS			= ../Endianness
-
-#-----[ Variable ]-----------------------------------------
-
-ENTITY                         ?= Data
-
-# OBJECTS_DEPS			= $(patsubst $(DIR_ENDIANNESS)/$(DIR_SRC)/%.cpp,$(DIR_ENDIANNESS)/$(DIR_OBJ)/%.o,$(wildcard $(DIR_ENDIANNESS)/$(DIR_SRC)/*.cpp))
-
 #-----[ Rules ]--------------------------------------------
 
 all				:
-				@\
-				$(MAKE) all_environment
-
-# 				$(MAKE) --directory=$(DIR_ENDIANNESS) all; \
+				@$(MAKE) all_environment
 
 clean				:
-				@\
-				$(MAKE) environment_clean
-
-# 				$(MAKE) --directory=$(DIR_ENDIANNESS) clean; \
+				@$(MAKE) environment_clean
 
 clean_all			: clean
@@ -28,3 +12,4 @@
 				@$(MAKE) environment_help
 
-include                         ../Makefile.Environment
+include				Makefile.defs
+include                         $(DIR_ENVIRONMENT)/Makefile.Environment
Index: trunk/IPs/systemC/Environment/Data/Makefile.defs
===================================================================
--- trunk/IPs/systemC/Environment/Data/Makefile.defs	(revision 113)
+++ trunk/IPs/systemC/Environment/Data/Makefile.defs	(revision 113)
@@ -0,0 +1,10 @@
+#-----[ Directory ]----------------------------------------
+DIR_ENVIRONMENT                 ?= ..
+
+#-----[ Variable ]-----------------------------------------
+
+ENTITY                          := Data
+
+include                         $(DIR_ENVIRONMENT)/Makefile.defs
+
+Data_OBJECTS_DEPS		:= $(OBJECTS)
Index: trunk/IPs/systemC/Environment/Endianness/Makefile
===================================================================
--- trunk/IPs/systemC/Environment/Endianness/Makefile	(revision 112)
+++ trunk/IPs/systemC/Environment/Endianness/Makefile	(revision 113)
@@ -1,10 +1,2 @@
-#-----[ Directory ]----------------------------------------
-
-#-----[ Variable ]-----------------------------------------
-
-ENTITY                         ?= Endianness
-
-#OBJECTS_DEPS			=
-
 #-----[ Rules ]--------------------------------------------
 
@@ -22,3 +14,4 @@
 				@$(MAKE) environment_help
 
-include                         ../Makefile.Environment
+include                         Makefile.defs
+include                         $(DIR_ENVIRONMENT)/Makefile.Environment
Index: trunk/IPs/systemC/Environment/Endianness/Makefile.defs
===================================================================
--- trunk/IPs/systemC/Environment/Endianness/Makefile.defs	(revision 113)
+++ trunk/IPs/systemC/Environment/Endianness/Makefile.defs	(revision 113)
@@ -0,0 +1,11 @@
+#-----[ Directory ]----------------------------------------
+
+DIR_ENVIRONMENT                   ?= ..
+
+#-----[ Variable ]-----------------------------------------
+
+ENTITY                            := Endianness
+
+include                           $(DIR_ENVIRONMENT)/Makefile.defs
+
+Endianness_OBJECTS_DEPS		  := $(OBJECTS)
Index: trunk/IPs/systemC/Environment/Makefile
===================================================================
--- trunk/IPs/systemC/Environment/Makefile	(revision 112)
+++ trunk/IPs/systemC/Environment/Makefile	(revision 113)
@@ -1,69 +1,65 @@
+ifeq ($(origin MORPHEO_TMP), undefined)
+	$(error "variable MORPHEO_TMP      is undefined");
+endif
+
 #-----[ Directory ]----------------------------------------
+DIR_LIB				= $(DIR_TMP)/lib
+DIR_ENVIRONMENT			= .
+DIR_CACHE			= Cache
+DIR_DATA			= Data
+DIR_ENDIANNESS			= Endianness
+DIR_QUEUE			= Queue
+DIR_RAMLOCK			= RamLock
+DIR_SIM2OS			= Sim2OS
+DIR_TTY   			= TTY
 
-DIR_LIB				= ./lib
-DIR_CACHE			= ./Cache
-DIR_DATA			= ./Data
-DIR_ENDIANNESS			= ./Endianness
-DIR_QUEUE			= ./Queue
-DIR_RAMLOCK			= ./RamLock
-DIR_SIM2OS			= ./Sim2OS
-DIR_TTY   			= ./TTY
+include $(DIR_CACHE)/Makefile.defs
+include $(DIR_DATA)/Makefile.defs
+include $(DIR_ENDIANNESS)/Makefile.defs
+include $(DIR_QUEUE)/Makefile.defs
+include $(DIR_RAMLOCK)/Makefile.defs
+include $(DIR_SIM2OS)/Makefile.defs
+include $(DIR_TTY)/Makefile.defs
 
 #-----[ Variable ]-----------------------------------------
-ENTITY                         ?=	Environment
 
-LIBRARY_NAME			= Environment
-LIBRARY_FILE			= $(DIR_LIB)/lib$(LIBRARY_NAME).a
+ENTITY                          := Environment
+DIR_SRC				 = $(DIR_ENVIRONMENT)/src
 
-OBJECTS_DEPS			= 	$(patsubst $(DIR_CACHE)/$(DIR_SRC)/%.cpp,$(DIR_CACHE)/$(DIR_OBJ)/%.o,$(wildcard $(DIR_CACHE)/$(DIR_SRC)/*.cpp))			\
-					$(patsubst $(DIR_DATA)/$(DIR_SRC)/%.cpp,$(DIR_DATA)/$(DIR_OBJ)/%.o,$(wildcard $(DIR_DATA)/$(DIR_SRC)/*.cpp))			\
-					$(patsubst $(DIR_DATA)/$(DIR_SRC)/%.c,$(DIR_DATA)/$(DIR_OBJ)/%.o,$(wildcard $(DIR_DATA)/$(DIR_SRC)/*.c))			\
-					$(patsubst $(DIR_ENDIANNESS)/$(DIR_SRC)/%.cpp,$(DIR_ENDIANNESS)/$(DIR_OBJ)/%.o,$(wildcard $(DIR_ENDIANNESS)/$(DIR_SRC)/*.cpp))	\
-					$(patsubst $(DIR_QUEUE)/$(DIR_SRC)/%.cpp,$(DIR_QUEUE)/$(DIR_OBJ)/%.o,$(wildcard $(DIR_QUEUE)/$(DIR_SRC)/*.cpp))			\
-					$(patsubst $(DIR_RAMLOCK)/$(DIR_SRC)/%.cpp,$(DIR_RAMLOCK)/$(DIR_OBJ)/%.o,$(wildcard $(DIR_RAMLOCK)/$(DIR_SRC)/*.cpp))		\
-					$(patsubst $(DIR_SIM2OS)/$(DIR_SRC)/%.cpp,$(DIR_SIM2OS)/$(DIR_OBJ)/%.o,$(wildcard $(DIR_SIM2OS)/$(DIR_SRC)/*.cpp)) 		\
-					$(patsubst $(DIR_TTY)/$(DIR_SRC)/%.cpp,$(DIR_TTY)/$(DIR_OBJ)/%.o,$(wildcard $(DIR_TTY)/$(DIR_SRC)/*.cpp))			
+include                          $(DIR_ENVIRONMENT)/Makefile.defs
 
+LIBRARY_NAME			:= $(ENTITY)
+LIBRARY_FILE			:= $(DIR_LIB)/lib$(LIBRARY_NAME).a
+
+Environment_OBJECTS_DEPS	:= 	$(OBJECTS) \
+					$(Cache_OBJECTS_DEPS) \
+					$(Data_OBJECTS_DEPS) \
+					$(Endianness_OBJECTS_DEPS) \
+					$(Queue_OBJECTS_DEPS) \
+					$(RamLock_OBJECTS_DEPS) \
+					$(Sim2OS_OBJECTS_DEPS) \
+					$(TTY_OBJECTS_DEPS)
 
 #-----[ Rules ]--------------------------------------------
 
-all				: a b c d e f g
+all				:
 				@\
 				$(MAKE) all_environment; \
+				$(MAKE) --directory=$(DIR_CACHE)      all; \
+				$(MAKE) --directory=$(DIR_DATA)       all; \
+				$(MAKE) --directory=$(DIR_ENDIANNESS) all; \
+				$(MAKE) --directory=$(DIR_QUEUE)      all; \
+				$(MAKE) --directory=$(DIR_RAMLOCK)    all; \
+				$(MAKE) --directory=$(DIR_SIM2OS)     all; \
+				$(MAKE) --directory=$(DIR_TTY)        all; \
 				$(MAKE) $(LIBRARY_FILE);
 
-a				:
-				@\
-				$(MAKE) --directory=$(DIR_CACHE)      all;
 
-b				:
-				@\
-				$(MAKE) --directory=$(DIR_DATA)       all;
-
-c				:
-				@\
-				$(MAKE) --directory=$(DIR_ENDIANNESS) all;
-
-d				:
-				@\
-				$(MAKE) --directory=$(DIR_QUEUE)      all;
-
-e				:
-				@\
-				$(MAKE) --directory=$(DIR_RAMLOCK)    all;
-
-f				:
-				@\
-				$(MAKE) --directory=$(DIR_SIM2OS)     all;
-
-g				:
-				@\
-				$(MAKE) --directory=$(DIR_TTY)        all;
-
-
-$(LIBRARY_FILE)			: $(OBJECTS_DEPS) $(OBJECTS) $(DIR_LIB)
+$(LIBRARY_FILE)			: $(Environment_OBJECTS_DEPS)
 				@\
 				$(ECHO) "Archive            : $@";\
-				$(AR)  -r $@ $(OBJECTS_DEPS) $(OBJECTS);\
+				$(ECHO) "Archive            : $@";\
+				$(MKDIR) $(DIR_LIB);\
+				$(AR)  -r $@ $(Environment_OBJECTS_DEPS);\
 				$(RANLIB) $@;
 
@@ -71,16 +67,24 @@
 				@\
 				$(ECHO) "Create directory   : $@";\
-				$(MKDIR) $@;
+				$(MKDIR) $@
 
 exe_all				:
 				@\
+				$(MAKE) --directory=$(DIR_CACHE)      clean; \
 				$(MAKE) --directory=$(DIR_CACHE)      exe; \
+				$(MAKE) --directory=$(DIR_DATA)       clean; \
 				$(MAKE) --directory=$(DIR_DATA)       exe; \
+				$(MAKE) --directory=$(DIR_ENDIANNESS) clean; \
 				$(MAKE) --directory=$(DIR_ENDIANNESS) exe; \
+				$(MAKE) --directory=$(DIR_QUEUE)      clean; \
 				$(MAKE) --directory=$(DIR_QUEUE)      exe; \
+				$(MAKE) --directory=$(DIR_RAMLOCK)    clean; \
 				$(MAKE) --directory=$(DIR_RAMLOCK)    exe; \
+				$(MAKE) --directory=$(DIR_SIM2OS)     clean; \
 				$(MAKE) --directory=$(DIR_SIM2OS)     exe; \
+				$(MAKE) --directory=$(DIR_TTY)        clean; \
 				$(MAKE) --directory=$(DIR_TTY)        exe; \
-				$(MAKE) exe; \
+				$(MAKE) clean; \
+				$(MAKE) exe;
 
 clean				:
Index: trunk/IPs/systemC/Environment/Makefile.Environment
===================================================================
--- trunk/IPs/systemC/Environment/Makefile.Environment	(revision 112)
+++ trunk/IPs/systemC/Environment/Makefile.Environment	(revision 113)
@@ -1,48 +1,3 @@
-ifeq ($(origin MORPHEO_TOPLEVEL), undefined)
-	$(error "variable MORPHEO_TOPLEVEL is undefined");
-else
-	include $(MORPHEO_TOPLEVEL)/Makefile.tools
-	include $(MORPHEO_TOPLEVEL)/Makefile.flags
-endif
-
-#-----[ Directory ]----------------------------------------
-ENTITY                         ?=	Environment
-
-DIR_TMP				=	$(MORPHEO_TMP)/$(ENTITY)
-DIR_TST                         = 	./selftest
-DIR_INC				= 	./include
-DIR_SRC				= 	./src
-DIR_OBJ				= 	./obj
-DIR_BIN				= 	$(DIR_TMP)/bin
-
-#-----[ Compilation ]--------------------------------------
-INCDIR 				= $(SYSTEMC_INCDIR_$(SIMULATOR)) 	\
-				  -I$(DIR_INC)				\
-				  -I../processor/Morpheo
-
-LIBDIR 				= $(SYSTEMC_LIBDIR_$(SIMULATOR))
-
-LIBNAME  			= -lbfd                                 \
-                                  -liberty                              \
-                                  $(SYSTEMC_LIBNAME_$(SIMULATOR)) 
-
-FLAGS				= $(SYSTEMC_CFLAGS_$(SIMULATOR))
-
-MORPHEO_CC_FLAGS		= $(MORPHEO_FLAGS) $(CC_FLAGS)           $(INCDIR)
-MORPHEO_CXX_FLAGS		= $(MORPHEO_FLAGS) $(CXX_FLAGS) $(FLAGS) $(INCDIR) 
-MORPHEO_L_FLAGS			= $(MORPHEO_FLAGS) $(CXX_FLAGS) $(FLAGS) $(LIBDIR)
-
-#-----[ Variable ]-----------------------------------------
-
-OBJECTS				= $(patsubst $(DIR_SRC)/%.cpp,$(DIR_OBJ)/%.o,$(wildcard $(DIR_SRC)/*.cpp)) \
-				  $(patsubst $(DIR_SRC)/%.c,$(DIR_OBJ)/%.o,$(wildcard $(DIR_SRC)/*.c))
-OBJECTS_BIN			= $(patsubst $(DIR_TST)/%.cpp,$(DIR_OBJ)/%.o,$(wildcard $(DIR_TST)/*.cpp))
-
-HEADERS  			= $(wildcard $(DIR_INC)/*.h)
-
-EXE				= $(DIR_BIN)/soft.x
-
-EXEC_PREFIX			= 
-#$(VALGRIND) 
+include Makefile.defs
 
 #-----[ Rules ]--------------------------------------------
@@ -53,5 +8,5 @@
 vpath	%.o	$(DIR_OBJ)
 
-.PRECIOUS			: $(DIR_OBJ)/%.o $(DIR_BIN)/%.x
+.PRECIOUS			: $(DIR_OBJ)/$(ENTITY)_%.o $(DIR_BIN)/%.x
 
 test_env			:
@@ -59,16 +14,16 @@
 				$(ECHO) "-------------------| $(ENTITY)"
 
-$(DIR_OBJ)/%.o			: %.cpp $(HEADERS)
+$(DIR_OBJ)/$(ENTITY)_%.o	: %.cpp $(HEADERS)
 				@\
 				$(ECHO) "Compilation        : $*";\
 				$(CXX) $(MORPHEO_CXX_FLAGS) -c -o $@ $<;
 
-$(DIR_OBJ)/%.o			: %.c $(HEADERS)
+$(DIR_OBJ)/$(ENTITY)_%.o        : %.c $(HEADERS)
 				@\
 				$(ECHO) "Compilation        : $*";\
 				$(CC)  $(MORPHEO_CC_FLAGS)  -c -o $@ $<;
 
-$(DIR_BIN)/%.x			: $(OBJECTS_DEPS) $(OBJECTS) $(OBJECTS_BIN)
-				\
+$(DIR_BIN)/%.x			: $($(ENTITY)_OBJECTS_DEPS) $(OBJECTS_BIN)
+				@\
 				$(ECHO) "Compilation        : $*";\
 				$(CXX) $(MORPHEO_L_FLAGS)      -o $@ $^ $(LIBNAME);
@@ -93,5 +48,5 @@
 all_environment			: test_env $(DIR_OBJ)
 				@\
-				$(MAKE) $(OBJECTS_DEPS) $(OBJECTS) $(OBJECTS_BIN)
+				$(MAKE) $($(ENTITY)_OBJECTS_DEPS) $(OBJECTS_BIN)
 
 environment_clean		:
Index: trunk/IPs/systemC/Environment/Makefile.defs
===================================================================
--- trunk/IPs/systemC/Environment/Makefile.defs	(revision 113)
+++ trunk/IPs/systemC/Environment/Makefile.defs	(revision 113)
@@ -0,0 +1,44 @@
+ifeq ($(origin MORPHEO_TOPLEVEL), undefined)
+	$(error "variable MORPHEO_TOPLEVEL is undefined");
+else
+	include $(MORPHEO_TOPLEVEL)/Makefile.tools
+	include $(MORPHEO_TOPLEVEL)/Makefile.flags
+endif
+
+#-----[ Directory ]----------------------------------------
+DIR_TMP				=	$(MORPHEO_TMP)
+DIR_TST                         = 	selftest
+DIR_INC				= 	include
+DIR_SRC				?= 	$(DIR_ENVIRONMENT)/$(ENTITY)/src
+DIR_OBJ				= 	$(MORPHEO_TMP)/obj
+DIR_BIN				= 	$(MORPHEO_TMP)/bin
+
+#-----[ Compilation ]--------------------------------------
+INCDIR 				= $(SYSTEMC_INCDIR_$(SIMULATOR)) 	\
+				  -I$(DIR_INC)				\
+				  -I../processor/Morpheo
+
+LIBDIR 				= $(SYSTEMC_LIBDIR_$(SIMULATOR))
+
+LIBNAME  			= -lbfd                                 \
+                                  -liberty                              \
+                                  $(SYSTEMC_LIBNAME_$(SIMULATOR)) 
+
+FLAGS				= $(SYSTEMC_CFLAGS_$(SIMULATOR))
+
+MORPHEO_CC_FLAGS		= $(MORPHEO_FLAGS) $(CC_FLAGS)           $(INCDIR)
+MORPHEO_CXX_FLAGS		= $(MORPHEO_FLAGS) $(CXX_FLAGS) $(FLAGS) $(INCDIR) 
+MORPHEO_L_FLAGS			= $(MORPHEO_FLAGS) $(CXX_FLAGS) $(FLAGS) $(LIBDIR)
+
+#-----[ Variable ]-----------------------------------------
+
+OBJECTS				= $(addprefix $(DIR_OBJ)/$(ENTITY)_, $(addsuffix .o, $(basename $(notdir $(wildcard $(DIR_SRC)/*.cpp))))) \
+				  $(addprefix $(DIR_OBJ)/$(ENTITY)_, $(addsuffix .o, $(basename $(notdir $(wildcard $(DIR_SRC)/*.c)))))
+OBJECTS_BIN			= $(addprefix $(DIR_OBJ)/$(ENTITY)_, $(addsuffix .o, $(basename $(notdir $(wildcard $(DIR_TST)/*.cpp)))))
+
+HEADERS  			= $(wildcard $(DIR_INC)/*.h)
+
+EXE				= $(DIR_BIN)/soft.x
+
+EXEC_PREFIX			= 
+#$(VALGRIND) 
Index: trunk/IPs/systemC/Environment/Makefile.deps
===================================================================
--- trunk/IPs/systemC/Environment/Makefile.deps	(revision 112)
+++ trunk/IPs/systemC/Environment/Makefile.deps	(revision 113)
@@ -17,3 +17,3 @@
 ENVIRONMENT_INCDIR		=	-I$(ENVIRONMENT_DIR)/include
 ENVIRONMENT_LIBDIR		=	-L$(ENVIRONMENT_DIR)/lib
-ENVIRONMENT_LIBNAME		=	-lEnvironment -lbfd -liberty 
+ENVIRONMENT_LIBNAME		=	-lEnvironment -lbfd -liberty
Index: trunk/IPs/systemC/Environment/Queue/Makefile
===================================================================
--- trunk/IPs/systemC/Environment/Queue/Makefile	(revision 112)
+++ trunk/IPs/systemC/Environment/Queue/Makefile	(revision 113)
@@ -1,6 +1,2 @@
-#-----[ Variables ]----------------------------------------
-
-ENTITY                         ?= Queue
-
 #-----[ Rules ]--------------------------------------------
 
@@ -16,3 +12,4 @@
 				@$(MAKE) environment_help
 
-include                         ../Makefile.Environment
+include                         Makefile.defs
+include                         $(DIR_ENVIRONMENT)/Makefile.Environment
Index: trunk/IPs/systemC/Environment/Queue/Makefile.defs
===================================================================
--- trunk/IPs/systemC/Environment/Queue/Makefile.defs	(revision 113)
+++ trunk/IPs/systemC/Environment/Queue/Makefile.defs	(revision 113)
@@ -0,0 +1,10 @@
+#-----[ Directory ]----------------------------------------
+DIR_ENVIRONMENT                 ?= ..
+
+#-----[ Variable ]-----------------------------------------
+
+ENTITY                          := Queue
+
+include                         $(DIR_ENVIRONMENT)/Makefile.defs
+
+Queue_OBJECTS_DEPS		:= $(OBJECTS)
Index: trunk/IPs/systemC/Environment/RamLock/Makefile
===================================================================
--- trunk/IPs/systemC/Environment/RamLock/Makefile	(revision 112)
+++ trunk/IPs/systemC/Environment/RamLock/Makefile	(revision 113)
@@ -1,6 +1,2 @@
-#-----[ Variables ]----------------------------------------
-
-ENTITY                         ?= RamLock
-
 #-----[ Rules ]--------------------------------------------
 
@@ -16,3 +12,4 @@
 				@$(MAKE) environment_help
 
-include                         ../Makefile.Environment
+include				Makefile.defs
+include                         $(DIR_ENVIRONMENT)/Makefile.Environment
Index: trunk/IPs/systemC/Environment/RamLock/Makefile.defs
===================================================================
--- trunk/IPs/systemC/Environment/RamLock/Makefile.defs	(revision 113)
+++ trunk/IPs/systemC/Environment/RamLock/Makefile.defs	(revision 113)
@@ -0,0 +1,9 @@
+#-----[ Directory ]----------------------------------------
+DIR_ENVIRONMENT                 ?= ..
+
+#-----[ Variable ]-----------------------------------------
+ENTITY                          := RamLock
+
+include                         $(DIR_ENVIRONMENT)/Makefile.defs
+
+RamLock_OBJECTS_DEPS		:= $(OBJECTS)
Index: trunk/IPs/systemC/Environment/Sim2OS/Makefile
===================================================================
--- trunk/IPs/systemC/Environment/Sim2OS/Makefile	(revision 112)
+++ trunk/IPs/systemC/Environment/Sim2OS/Makefile	(revision 113)
@@ -1,12 +1,2 @@
-#-----[ Directory ]----------------------------------------
-
-DIR_ENDIANNESS			= ../Endianness
-
-#-----[ Variable ]-----------------------------------------
-
-ENTITY                         ?= Sim2OS
-
-OBJECTS_DEPS			= $(patsubst $(DIR_ENDIANNESS)/$(DIR_SRC)/%.cpp,$(DIR_ENDIANNESS)/$(DIR_OBJ)/%.o,$(wildcard $(DIR_ENDIANNESS)/$(DIR_SRC)/*.cpp))
-
 #-----[ Rules ]--------------------------------------------
 
@@ -26,3 +16,5 @@
 				@$(MAKE) environment_help
 
-include                         ../Makefile.Environment
+include                         Makefile.defs
+include                         $(DIR_ENVIRONMENT)/Makefile.Environment
+
Index: trunk/IPs/systemC/Environment/Sim2OS/Makefile.defs
===================================================================
--- trunk/IPs/systemC/Environment/Sim2OS/Makefile.defs	(revision 113)
+++ trunk/IPs/systemC/Environment/Sim2OS/Makefile.defs	(revision 113)
@@ -0,0 +1,15 @@
+#-----[ Directory ]----------------------------------------
+
+DIR_ENVIRONMENT                  ?= ..
+DIR_ENDIANNESS			 := $(DIR_ENVIRONMENT)/Endianness
+
+include                          $(DIR_ENDIANNESS)/Makefile.defs
+
+#-----[ Variable ]-----------------------------------------
+
+ENTITY                           := Sim2OS
+
+include                          $(DIR_ENVIRONMENT)/Makefile.defs
+
+Sim2OS_OBJECTS_DEPS	         :=  $(Endianness_OBJECTS_DEPS) $(OBJECTS)
+
Index: trunk/IPs/systemC/Environment/TTY/Makefile
===================================================================
--- trunk/IPs/systemC/Environment/TTY/Makefile	(revision 112)
+++ trunk/IPs/systemC/Environment/TTY/Makefile	(revision 113)
@@ -1,20 +1,9 @@
-#-----[ Directory ]----------------------------------------
-
-#-----[ Variable ]-----------------------------------------
-
-ENTITY                         ?= TTY
-
-#OBJECTS_DEPS			=
-
 #-----[ Rules ]--------------------------------------------
 
 all				:
-				@\
-				$(MAKE) all_environment;
+				@$(MAKE) all_environment
 
 clean				:
-				@\
-				$(MAKE)  environment_clean;\
-				$(RM) tty_*;
+				@$(MAKE) environment_clean; $(RM) tty_*
 
 clean_all			: clean
Index: trunk/IPs/systemC/Environment/TTY/Makefile.defs
===================================================================
--- trunk/IPs/systemC/Environment/TTY/Makefile.defs	(revision 113)
+++ trunk/IPs/systemC/Environment/TTY/Makefile.defs	(revision 113)
@@ -0,0 +1,9 @@
+#-----[ Directory ]----------------------------------------
+DIR_ENVIRONMENT                 ?= ..
+
+#-----[ Variable ]-----------------------------------------
+ENTITY                          := TTY
+
+include                         $(DIR_ENVIRONMENT)/Makefile.defs
+
+TTY_OBJECTS_DEPS		:= $(OBJECTS)
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Configuration/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Configuration/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Configuration/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Configuration
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Core_Glue/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Core_Glue/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Core_Glue/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Core_Glue
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Dcache_Access/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Dcache_Access/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Dcache_Access/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Dcache_Access
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Icache_Access/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Icache_Access/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Icache_Access/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Icache_Access
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Core
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Execute_loop_Glue/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Execute_loop_Glue/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Execute_loop_Glue/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Execute_loop_Glue
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Execute_loop_Glue/SelfTest/src/test.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Execute_loop_Glue/SelfTest/src/test.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Execute_loop_Glue/SelfTest/src/test.cpp	(revision 113)
@@ -48,4 +48,33 @@
   sc_signal<Tcontrol_t> *  in_NRESET = new sc_signal<Tcontrol_t> ("NRESET");
   
+  sc_signal<Tcontrol_t        > **  in_GPR_WRITE_WRITE_UNIT_VAL               ;
+  sc_signal<Tcontrol_t        > ** out_GPR_WRITE_WRITE_UNIT_ACK               ;
+  sc_signal<Tcontext_t        > **  in_GPR_WRITE_WRITE_UNIT_OOO_ENGINE_ID     ;
+  sc_signal<Tgeneral_address_t> **  in_GPR_WRITE_WRITE_UNIT_NUM_REG           ;
+  sc_signal<Tgeneral_data_t   > **  in_GPR_WRITE_WRITE_UNIT_DATA              ;
+  sc_signal<Tcontrol_t        > ** out_GPR_WRITE_REGISTER_FILE_VAL            ;
+  sc_signal<Tcontrol_t        > **  in_GPR_WRITE_REGISTER_FILE_ACK            ;
+  sc_signal<Tcontext_t        > ** out_GPR_WRITE_REGISTER_FILE_OOO_ENGINE_ID  ;
+  sc_signal<Tgeneral_address_t> ** out_GPR_WRITE_REGISTER_FILE_NUM_REG        ;
+  sc_signal<Tgeneral_data_t   > ** out_GPR_WRITE_REGISTER_FILE_DATA           ;
+  sc_signal<Tcontrol_t        > ** out_GPR_WRITE_READ_UNIT_VAL                ;
+  sc_signal<Tcontext_t        > ** out_GPR_WRITE_READ_UNIT_OOO_ENGINE_ID      ;
+  sc_signal<Tgeneral_address_t> ** out_GPR_WRITE_READ_UNIT_NUM_REG            ;
+  sc_signal<Tgeneral_data_t   > ** out_GPR_WRITE_READ_UNIT_DATA               ;
+  sc_signal<Tcontrol_t        > **  in_SPR_WRITE_WRITE_UNIT_VAL               ;
+  sc_signal<Tcontrol_t        > ** out_SPR_WRITE_WRITE_UNIT_ACK               ;
+  sc_signal<Tcontext_t        > **  in_SPR_WRITE_WRITE_UNIT_OOO_ENGINE_ID     ;
+  sc_signal<Tspecial_address_t> **  in_SPR_WRITE_WRITE_UNIT_NUM_REG           ;
+  sc_signal<Tspecial_data_t   > **  in_SPR_WRITE_WRITE_UNIT_DATA              ;
+  sc_signal<Tcontrol_t        > ** out_SPR_WRITE_REGISTER_FILE_VAL            ;
+  sc_signal<Tcontrol_t        > **  in_SPR_WRITE_REGISTER_FILE_ACK            ;
+  sc_signal<Tcontext_t        > ** out_SPR_WRITE_REGISTER_FILE_OOO_ENGINE_ID  ;
+  sc_signal<Tspecial_address_t> ** out_SPR_WRITE_REGISTER_FILE_NUM_REG        ;
+  sc_signal<Tspecial_data_t   > ** out_SPR_WRITE_REGISTER_FILE_DATA           ;
+  sc_signal<Tcontrol_t        > ** out_SPR_WRITE_READ_UNIT_VAL                ;
+  sc_signal<Tcontext_t        > ** out_SPR_WRITE_READ_UNIT_OOO_ENGINE_ID      ;
+  sc_signal<Tspecial_address_t> ** out_SPR_WRITE_READ_UNIT_NUM_REG            ;
+  sc_signal<Tspecial_data_t   > ** out_SPR_WRITE_READ_UNIT_DATA               ;
+
   ALLOC1_SC_SIGNAL( in_GPR_WRITE_WRITE_UNIT_VAL               ," in_GPR_WRITE_WRITE_UNIT_VAL             ",Tcontrol_t        ,_param->_nb_gpr_write);
   ALLOC1_SC_SIGNAL(out_GPR_WRITE_WRITE_UNIT_ACK               ,"out_GPR_WRITE_WRITE_UNIT_ACK             ",Tcontrol_t        ,_param->_nb_gpr_write);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Execute_loop
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Functionnal_unit
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../../../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/Operation/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/Operation/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/Operation/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Operation
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../../../../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/Makefile.defs	(revision 113)
@@ -2,10 +2,12 @@
 # $Id$
 # 
-# [ Description ]
+# [ Description ]
 # 
 # Makefile
 # 
 
-#-----[ Directory ]----------------------------------------
+ENTITY                          = Load_store_unit
+
+#-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../../../../..
 DIR_MORPHEO			= $(DIR_COMPONENT)/$(DIR_COMPONENT_MORPHEO)
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest/include/Memory.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest/include/Memory.h	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest/include/Memory.h	(revision 113)
@@ -147,5 +147,5 @@
     trace_memory_t trace;
 
-    trace._cycle    = sc_simulation_time();
+    trace._cycle    = simulation_cycle();
     trace._context  = context;
     trace._address  = address;
@@ -229,5 +229,5 @@
     trace_memory_t trace;
 
-    trace._cycle    = sc_simulation_time();
+    trace._cycle    = simulation_cycle();
     trace._context  = context;
     trace._address  = address;
@@ -247,5 +247,5 @@
     trace_memory_t trace;
 
-    trace._cycle    = sc_simulation_time();
+    trace._cycle    = simulation_cycle();
     trace._context  = context;
     trace._address  = address;
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest/src/test1.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest/src/test1.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest/src/test1.cpp	(revision 113)
@@ -270,5 +270,5 @@
 	    load_queue_use  [i] = false;
 
-	  double             current_cycle = sc_simulation_time();
+	  double             current_cycle = simulation_cycle();
 	  double             cycle_min     = current_cycle;
 
@@ -451,5 +451,5 @@
 	      in_MEMORY_IN_VAL ->write((not fifo_request.empty()) and 
 				       can_execute                and 
-				       (sc_simulation_time() >= fifo_request.top()._cycle));
+				       (simulation_cycle() >= fifo_request.top()._cycle));
 
 	      if (_param->_have_port_context_id)
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest/src/test2.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest/src/test2.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Load_store_unit/SelfTest/src/test2.cpp	(revision 113)
@@ -412,5 +412,5 @@
 	      if (not fifo_request.empty())
 		{
-		  can_execute = sc_simulation_time() >= fifo_request.top()._cycle;
+		  can_execute = simulation_cycle() >= fifo_request.top()._cycle;
 		  if (is_operation_memory_store(fifo_request.top()._operation))
 		    can_execute &= (not store_queue_use [fifo_request.top()._store_queue_ptr_write] and (nb_store_slot_use < _param->_size_store_queue-1)) or is_operation_memory_store_head(fifo_request.top()._operation);
@@ -512,6 +512,4 @@
 		    }
 		  
-		  std::cout << "kane - nb_request_memory_out : " << nb_request_memory_out << std::endl;
-
 		  // a lot of test
 		  TEST(Tpacket_t         , out_MEMORY_OUT_PACKET_ID    [0]->read(), tab_request[packet_id]._packet_id    );
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Read_unit
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Read_queue/Makefile.defs	(revision 113)
@@ -2,10 +2,12 @@
 # $Id$
 # 
-# [ Description ]
+# [ Description ]
 # 
 # Makefile
 # 
 
-#-----[ Directory ]----------------------------------------
+ENTITY                          = Read_queue
+
+#-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../../../../..
 DIR_MORPHEO			= $(DIR_COMPONENT)/$(DIR_COMPONENT_MORPHEO)
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Read_unit/Read_unit/Reservation_station/Makefile.defs	(revision 113)
@@ -2,10 +2,12 @@
 # $Id$
 # 
-# [ Description ]
+# [ Description ]
 # 
 # Makefile
 # 
 
-#-----[ Directory ]----------------------------------------
+ENTITY                          = Reservation_station
+
+#-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../../../../..
 DIR_MORPHEO			= $(DIR_COMPONENT)/$(DIR_COMPONENT_MORPHEO)
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Execute_queue
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../../../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/SelfTest/include/test.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/SelfTest/include/test.h	(revision 112)
+++ 	(revision )
@@ -1,32 +1,0 @@
-/*
- * $Id$
- *
- * [ Description ]
- * 
- * Test "RegisterFile"
- */
-
-#ifdef SYSTEMC
-#include "systemc.h"
-#endif
-
-#include <string>
-#include <iostream>
-#include <sys/time.h>
-
-#include "Common/include/Time.h"
-#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Execute_queue.h"
-
-using namespace std;
-using namespace morpheo;
-using namespace morpheo::behavioural;
-using namespace morpheo::behavioural::core;
-using namespace morpheo::behavioural::core::multi_execute_loop;
-using namespace morpheo::behavioural::core::multi_execute_loop::execute_loop;
-using namespace morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit;
-using namespace morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit;
-
-using namespace morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::execute_queue;
-
-void test    (string name,
-	      morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::execute_queue::Parameters * param);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/SelfTest/include/top.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/SelfTest/include/top.h	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/SelfTest/include/top.h	(revision 113)
@@ -0,0 +1,93 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ * Test "Execute_queue"
+ */
+
+#ifdef SYSTEMC
+#include "systemc.h"
+#endif
+
+#define NB_ITERATION  16
+#define CYCLE_MAX     (1024*NB_ITERATION)
+
+#include "Common/include/Test.h"
+#include "Common/include/Time.h"
+#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Execute_queue.h"
+
+using namespace std;
+using namespace morpheo;
+using namespace morpheo::behavioural;
+using namespace morpheo::behavioural::core;
+using namespace morpheo::behavioural::core::multi_execute_loop;
+using namespace morpheo::behavioural::core::multi_execute_loop::execute_loop;
+using namespace morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit;
+using namespace morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit;
+
+using namespace morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::execute_queue;
+
+SC_MODULE(top)
+{
+#ifdef SYSTEMC
+ private: sc_clock               *  in_CLOCK ;
+ private: sc_signal<Tcontrol_t>  *  in_NRESET;
+
+  private: sc_signal<Tcontrol_t        >    *  in_EXECUTE_QUEUE_IN_VAL           ;
+  private: sc_signal<Tcontrol_t        >    * out_EXECUTE_QUEUE_IN_ACK           ;
+  private: sc_signal<Tcontext_t        >    *  in_EXECUTE_QUEUE_IN_CONTEXT_ID    ;
+  private: sc_signal<Tcontext_t        >    *  in_EXECUTE_QUEUE_IN_FRONT_END_ID  ;
+  private: sc_signal<Tcontext_t        >    *  in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID ;
+  private: sc_signal<Tpacket_t         >    *  in_EXECUTE_QUEUE_IN_PACKET_ID     ;
+//private: sc_signal<Toperation_t      >    *  in_EXECUTE_QUEUE_IN_OPERATION     ;
+//private: sc_signal<Ttype_t           >    *  in_EXECUTE_QUEUE_IN_TYPE          ;
+  private: sc_signal<Tspecial_data_t   >    *  in_EXECUTE_QUEUE_IN_FLAGS         ;
+  private: sc_signal<Texception_t      >    *  in_EXECUTE_QUEUE_IN_EXCEPTION     ;
+  private: sc_signal<Tcontrol_t        >    *  in_EXECUTE_QUEUE_IN_NO_SEQUENCE   ;
+  private: sc_signal<Taddress_t        >    *  in_EXECUTE_QUEUE_IN_ADDRESS       ;
+  private: sc_signal<Tgeneral_data_t   >    *  in_EXECUTE_QUEUE_IN_DATA          ;
+
+  private: sc_signal<Tcontrol_t        >    * out_EXECUTE_QUEUE_OUT_VAL          ;
+  private: sc_signal<Tcontrol_t        >    *  in_EXECUTE_QUEUE_OUT_ACK          ;
+  private: sc_signal<Tcontext_t        >    * out_EXECUTE_QUEUE_OUT_CONTEXT_ID   ;
+  private: sc_signal<Tcontext_t        >    * out_EXECUTE_QUEUE_OUT_FRONT_END_ID ;
+  private: sc_signal<Tcontext_t        >    * out_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID;
+  private: sc_signal<Tpacket_t         >    * out_EXECUTE_QUEUE_OUT_PACKET_ID    ;
+//private: sc_signal<Toperation_t      >    * out_EXECUTE_QUEUE_OUT_OPERATION    ;
+//private: sc_signal<Ttype_t           >    * out_EXECUTE_QUEUE_OUT_TYPE         ;
+  private: sc_signal<Tspecial_data_t   >    * out_EXECUTE_QUEUE_OUT_FLAGS        ;
+  private: sc_signal<Texception_t      >    * out_EXECUTE_QUEUE_OUT_EXCEPTION    ;
+  private: sc_signal<Tcontrol_t        >    * out_EXECUTE_QUEUE_OUT_NO_SEQUENCE  ;
+  private: sc_signal<Taddress_t        >    * out_EXECUTE_QUEUE_OUT_ADDRESS      ;
+  private: sc_signal<Tgeneral_data_t   >    * out_EXECUTE_QUEUE_OUT_DATA         ;
+
+#endif
+
+ private: std::string name;
+ private: Tusage_t _usage;
+ private: morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::execute_queue::Parameters * _param;
+#ifdef STATISTICS
+ private: morpheo::behavioural::Parameters_Statistics * _param_stat;
+#endif
+ private: Execute_queue * component;
+
+ private: void usage
+    (
+#ifdef MTI_SYSTEMC
+     int argc, const char * const * argv
+#else
+     int argc, char * argv[]
+#endif
+     );
+ private: void allocation   (void);
+ private: void deallocation (void);
+ public : void test         (void);
+
+#ifdef MTI_SYSTEMC
+  SC_CTOR(top::top);
+#else
+ public : top (sc_module_name module_name,int argc, char * argv[]);
+#endif
+ public : ~top(void);
+};
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/SelfTest/src/main.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/SelfTest/src/main.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/SelfTest/src/main.cpp	(revision 113)
@@ -2,76 +2,47 @@
  * $Id$
  *
- * [ Description ]
+ * [ Description ]
  * 
  */
 
-#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/SelfTest/include/test.h"
+#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/SelfTest/include/top.h"
 
-#define NB_PARAMS 7
-
-void usage (int argc, char * argv[])
+#ifndef MTI_SYSTEMC
+# ifndef SYSTEMC
+int main    (int argc, char * argv[])
+# else
+int sc_main (int argc, char * argv[])
+# endif
 {
-  err (_("<Usage> %s name_instance list_params.\n"),argv[0]);
-  err (_("list_params is :\n"));
-  err (_(" * size_queue          (uint32_t)\n"));
-  err (_(" * nb_context          (uint32_t)\n"));
-  err (_(" * nb_front_end        (uint32_t)\n"));
-  err (_(" * nb_ooo_engine       (uint32_t)\n"));
-  err (_(" * nb_packet           (uint32_t)\n"));
-  err (_(" * size_general_data   (uint32_t)\n"));
-  err (_(" * size_special_data   (uint32_t)\n"));
-
-  exit (1);
-}
-
-#ifndef SYSTEMC
-int main    (int argc, char * argv[])
-#else
-int sc_main (int argc, char * argv[])
-#endif
-{
-  if (argc != 2+NB_PARAMS)
-    usage (argc, argv);
-
-  uint32_t       x = 1;
-
-  const string   name      =      argv[x++];
-  const uint32_t size_queue          = atoi(argv[x++]);
-  const uint32_t nb_context          = atoi(argv[x++]);
-  const uint32_t nb_front_end        = atoi(argv[x++]);
-  const uint32_t nb_ooo_engine       = atoi(argv[x++]);
-  const uint32_t nb_packet           = atoi(argv[x++]);
-  const uint32_t size_general_data   = atoi(argv[x++]);
-  const uint32_t size_special_data   = atoi(argv[x++]);
+  int _return = EXIT_SUCCESS;
 
   try 
     {
-      morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::execute_queue::Parameters * param = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::execute_queue::Parameters
-	(size_queue         ,
-	 nb_context         ,
-	 nb_front_end       ,
-	 nb_ooo_engine      ,
-	 nb_packet          ,
-	 size_general_data  ,
-	 size_special_data  ,
-         true // is_toplevel
-         );
-      
-      msg(_("%s"),param->print(1).c_str());
-      
-      test (name,param);
+      top * my_top = new top ("my_top",argc,argv);
+
+      my_top->test();
+
+      delete my_top;
     }
   catch (morpheo::ErrorMorpheo & error)
     {
-      msg (_("<%s> : %s.\n"),name.c_str(), error.what ());
-      exit (EXIT_FAILURE);
+      msgError(_("%s\n"),error.what ());
+      _return = EXIT_FAILURE;
     }
-  catch (...)
+  
+  try 
     {
-      err (_("<%s> : This test must generate a error.\n"),name.c_str());
-      exit (EXIT_FAILURE);
+      if (_return == EXIT_SUCCESS)
+	TEST_OK("Execute_queue : no error");
+      else
+	TEST_KO("Execute_queue : a lot of error");
+    }
+  catch (morpheo::ErrorMorpheo & error)
+    {
+//    msgError(_("<%s> :\n%s"),name.c_str(), error.what ());
+      _return = EXIT_FAILURE;
     }
 
-  return (EXIT_SUCCESS);
+  return _return;
 }
-
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/SelfTest/src/top.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/SelfTest/src/top.cpp	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/SelfTest/src/top.cpp	(revision 113)
@@ -0,0 +1,79 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/SelfTest/include/top.h"
+#include "Behavioural/include/Selftest.h"
+
+#define NB_PARAMS 7
+
+#ifdef MTI_SYSTEMC
+SC_MODULE_EXPORT(top);
+#endif
+
+#ifdef MTI_SYSTEMC
+SC_CTOR(top::top)
+#else
+top::top (sc_module_name module_name, int argc, char * argv[])
+#endif
+{
+#ifdef MTI_SYSTEMC
+  // accessing command-line arguments with modelsim
+  int argc;
+  const char * const * argv;
+
+  argc = sc_argc ();
+  argv = sc_argv ();
+#endif
+
+  if (argc != 2+NB_PARAMS)
+    usage (argc, argv);
+
+  uint32_t x=1;
+
+  uint32_t size_queue       ;
+  uint32_t nb_context       ;
+  uint32_t nb_front_end     ;
+  uint32_t nb_ooo_engine    ;
+  uint32_t nb_packet        ;
+  uint32_t size_general_data;
+  uint32_t size_special_data;
+
+  SELFTEST0(name,string,argv,x);
+  SELFTEST0(size_queue       ,uint32_t,argv,x);
+  SELFTEST0(nb_context       ,uint32_t,argv,x);
+  SELFTEST0(nb_front_end     ,uint32_t,argv,x);
+  SELFTEST0(nb_ooo_engine    ,uint32_t,argv,x);
+  SELFTEST0(nb_packet        ,uint32_t,argv,x);
+  SELFTEST0(size_general_data,uint32_t,argv,x);
+  SELFTEST0(size_special_data,uint32_t,argv,x);
+
+  _param = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::execute_queue::Parameters
+    (size_queue         ,
+     nb_context         ,
+     nb_front_end       ,
+     nb_ooo_engine      ,
+     nb_packet          ,
+     size_general_data  ,
+     size_special_data  ,
+     true
+     );
+  
+  // msg(_("%s"),_param.print(0).c_str());
+  
+  // Allocation component
+  allocation ();
+  
+#ifdef MTI_SYSTEMC
+  SC_THREAD(test);
+#endif
+}
+
+top::~top (void)
+{
+  deallocation ();
+  delete _param;
+}
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/SelfTest/src/top_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/SelfTest/src/top_allocation.cpp	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/SelfTest/src/top_allocation.cpp	(revision 113)
@@ -0,0 +1,140 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ * Test
+ */
+
+#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/SelfTest/include/top.h"
+#include "Behavioural/include/Allocation.h"
+
+void top::allocation (void)
+{
+  if (setlocale (LC_ALL, "") == NULL)
+    msgWarning(_("setlocale ko.\n"));
+
+  try 
+    {
+      _param->test();
+    }
+  catch (morpheo::ErrorMorpheo & error)
+    {
+      msgError(_("<%s> : %s"),name.c_str(),error.what());
+      return;
+    }
+  catch (...)
+    {
+      msgError(_("<%s> : This test must generate a error"),name.c_str());
+      exit (EXIT_FAILURE);
+    }
+
+  _usage = USE_ALL;
+//   _usage = usage_unset(_usage,USE_SYSTEMC              );
+//   _usage = usage_unset(_usage,USE_VHDL                 );
+//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
+//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
+//   _usage = usage_unset(_usage,USE_POSITION             );
+//   _usage = usage_unset(_usage,USE_STATISTICS           );
+//   _usage = usage_unset(_usage,USE_INFORMATION          );
+
+#ifdef STATISTICS
+  if (usage_is_set(_usage,USE_STATISTICS))
+  _param_stat = new morpheo::behavioural::Parameters_Statistics (5,CYCLE_MAX);
+#endif
+
+  component = new Execute_queue 
+    (name.c_str(),
+#ifdef STATISTICS
+     _param_stat,
+#endif
+     _param,
+     _usage
+     );
+  
+#ifdef SYSTEMC
+  if (usage_is_set(_usage,USE_SYSTEMC))
+    {
+  /*********************************************************************
+   * Déclarations des signaux
+   *********************************************************************/
+  msgInformation(_("<%s> : Create signal.\n"),name.c_str());
+
+  in_CLOCK  = new sc_clock ("clock", TIME_PERIOD, TIME_UNIT, 0.5); //name,period,time_unit,duty_cycle
+
+  ALLOC0_SC_SIGNAL( in_NRESET        ," in_NRESET        ",Tcontrol_t);
+
+  ALLOC0_SC_SIGNAL( in_EXECUTE_QUEUE_IN_VAL           ," in_EXECUTE_QUEUE_IN_VAL"           , Tcontrol_t        );
+  ALLOC0_SC_SIGNAL(out_EXECUTE_QUEUE_IN_ACK           ,"out_EXECUTE_QUEUE_IN_ACK"           , Tcontrol_t        );
+  ALLOC0_SC_SIGNAL( in_EXECUTE_QUEUE_IN_CONTEXT_ID    ," in_EXECUTE_QUEUE_IN_CONTEXT_ID"    , Tcontext_t        );
+  ALLOC0_SC_SIGNAL( in_EXECUTE_QUEUE_IN_FRONT_END_ID  ," in_EXECUTE_QUEUE_IN_FRONT_END_ID"  , Tcontext_t        );
+  ALLOC0_SC_SIGNAL( in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID ," in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID" , Tcontext_t        );
+  ALLOC0_SC_SIGNAL( in_EXECUTE_QUEUE_IN_PACKET_ID     ," in_EXECUTE_QUEUE_IN_PACKET_ID"     , Tpacket_t         );
+//ALLOC0_SC_SIGNAL( in_EXECUTE_QUEUE_IN_OPERATION     ," in_EXECUTE_QUEUE_IN_OPERATION"     , Toperation_t      );
+//ALLOC0_SC_SIGNAL( in_EXECUTE_QUEUE_IN_TYPE          ," in_EXECUTE_QUEUE_IN_TYPE"          , Ttype_t           );
+  ALLOC0_SC_SIGNAL( in_EXECUTE_QUEUE_IN_FLAGS         ," in_EXECUTE_QUEUE_IN_FLAGS"         , Tspecial_data_t   );
+  ALLOC0_SC_SIGNAL( in_EXECUTE_QUEUE_IN_EXCEPTION     ," in_EXECUTE_QUEUE_IN_EXCEPTION"     , Texception_t      );
+  ALLOC0_SC_SIGNAL( in_EXECUTE_QUEUE_IN_NO_SEQUENCE   ," in_EXECUTE_QUEUE_IN_NO_SEQUENCE"   , Tcontrol_t        );
+  ALLOC0_SC_SIGNAL( in_EXECUTE_QUEUE_IN_ADDRESS       ," in_EXECUTE_QUEUE_IN_ADDRESS"       , Taddress_t        );
+  ALLOC0_SC_SIGNAL( in_EXECUTE_QUEUE_IN_DATA          ," in_EXECUTE_QUEUE_IN_DATA"          , Tgeneral_data_t   );
+  ALLOC0_SC_SIGNAL(out_EXECUTE_QUEUE_OUT_VAL          ,"out_EXECUTE_QUEUE_OUT_VAL"          , Tcontrol_t        );
+  ALLOC0_SC_SIGNAL( in_EXECUTE_QUEUE_OUT_ACK          ," in_EXECUTE_QUEUE_OUT_ACK"          , Tcontrol_t        );
+  ALLOC0_SC_SIGNAL(out_EXECUTE_QUEUE_OUT_CONTEXT_ID   ,"out_EXECUTE_QUEUE_OUT_CONTEXT_ID"   , Tcontext_t        );
+  ALLOC0_SC_SIGNAL(out_EXECUTE_QUEUE_OUT_FRONT_END_ID ,"out_EXECUTE_QUEUE_OUT_FRONT_END_ID" , Tcontext_t        );
+  ALLOC0_SC_SIGNAL(out_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID,"out_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID", Tcontext_t        );
+  ALLOC0_SC_SIGNAL(out_EXECUTE_QUEUE_OUT_PACKET_ID    ,"out_EXECUTE_QUEUE_OUT_PACKET_ID"    , Tpacket_t         );
+//ALLOC0_SC_SIGNAL(out_EXECUTE_QUEUE_OUT_OPERATION    ,"out_EXECUTE_QUEUE_OUT_OPERATION"    , Toperation_t      );
+//ALLOC0_SC_SIGNAL(out_EXECUTE_QUEUE_OUT_TYPE         ,"out_EXECUTE_QUEUE_OUT_TYPE"         , Ttype_t           );
+  ALLOC0_SC_SIGNAL(out_EXECUTE_QUEUE_OUT_FLAGS        ,"out_EXECUTE_QUEUE_OUT_FLAGS"        , Tspecial_data_t   );
+  ALLOC0_SC_SIGNAL(out_EXECUTE_QUEUE_OUT_EXCEPTION    ,"out_EXECUTE_QUEUE_OUT_EXCEPTION"    , Texception_t      );
+  ALLOC0_SC_SIGNAL(out_EXECUTE_QUEUE_OUT_NO_SEQUENCE  ,"out_EXECUTE_QUEUE_OUT_NO_SEQUENCE"  , Tcontrol_t        );
+  ALLOC0_SC_SIGNAL(out_EXECUTE_QUEUE_OUT_ADDRESS      ,"out_EXECUTE_QUEUE_OUT_ADDRESS"      , Taddress_t        );
+  ALLOC0_SC_SIGNAL(out_EXECUTE_QUEUE_OUT_DATA         ,"out_EXECUTE_QUEUE_OUT_DATA"         , Tgeneral_data_t   );
+  
+  /********************************************************
+   * Instanciation
+   ********************************************************/
+  
+  msgInformation(_("<%s> : Instanciation of _Execute_queue.\n"),name.c_str());
+
+  INSTANCE0_SC_SIGNAL(component, in_CLOCK         );
+  INSTANCE0_SC_SIGNAL(component, in_NRESET        );
+
+  INSTANCE0_SC_SIGNAL(component,  in_EXECUTE_QUEUE_IN_VAL           );
+  INSTANCE0_SC_SIGNAL(component, out_EXECUTE_QUEUE_IN_ACK           );
+  if (_param->_have_port_context_id)
+  INSTANCE0_SC_SIGNAL(component,  in_EXECUTE_QUEUE_IN_CONTEXT_ID    );
+  if (_param->_have_port_front_end_id)
+  INSTANCE0_SC_SIGNAL(component,  in_EXECUTE_QUEUE_IN_FRONT_END_ID  );
+  if (_param->_have_port_ooo_engine_id)
+  INSTANCE0_SC_SIGNAL(component,  in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID );
+  if (_param->_have_port_rob_ptr)
+  INSTANCE0_SC_SIGNAL(component,  in_EXECUTE_QUEUE_IN_PACKET_ID     );
+//INSTANCE0_SC_SIGNAL(component,  in_EXECUTE_QUEUE_IN_OPERATION     );
+//INSTANCE0_SC_SIGNAL(component,  in_EXECUTE_QUEUE_IN_TYPE          );
+  INSTANCE0_SC_SIGNAL(component,  in_EXECUTE_QUEUE_IN_FLAGS         );
+  INSTANCE0_SC_SIGNAL(component,  in_EXECUTE_QUEUE_IN_EXCEPTION     );
+  INSTANCE0_SC_SIGNAL(component,  in_EXECUTE_QUEUE_IN_NO_SEQUENCE   );
+  INSTANCE0_SC_SIGNAL(component,  in_EXECUTE_QUEUE_IN_ADDRESS       );
+  INSTANCE0_SC_SIGNAL(component,  in_EXECUTE_QUEUE_IN_DATA          );
+
+  INSTANCE0_SC_SIGNAL(component, out_EXECUTE_QUEUE_OUT_VAL          );
+  INSTANCE0_SC_SIGNAL(component,  in_EXECUTE_QUEUE_OUT_ACK          );
+  if (_param->_have_port_context_id)
+  INSTANCE0_SC_SIGNAL(component, out_EXECUTE_QUEUE_OUT_CONTEXT_ID   );
+  if (_param->_have_port_front_end_id)
+  INSTANCE0_SC_SIGNAL(component, out_EXECUTE_QUEUE_OUT_FRONT_END_ID );
+  if (_param->_have_port_ooo_engine_id)
+  INSTANCE0_SC_SIGNAL(component, out_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID);
+  if (_param->_have_port_rob_ptr)
+  INSTANCE0_SC_SIGNAL(component, out_EXECUTE_QUEUE_OUT_PACKET_ID    );
+//INSTANCE0_SC_SIGNAL(component, out_EXECUTE_QUEUE_OUT_OPERATION    );
+//INSTANCE0_SC_SIGNAL(component, out_EXECUTE_QUEUE_OUT_TYPE         );
+  INSTANCE0_SC_SIGNAL(component, out_EXECUTE_QUEUE_OUT_FLAGS        );
+  INSTANCE0_SC_SIGNAL(component, out_EXECUTE_QUEUE_OUT_EXCEPTION    );
+  INSTANCE0_SC_SIGNAL(component, out_EXECUTE_QUEUE_OUT_NO_SEQUENCE  );
+  INSTANCE0_SC_SIGNAL(component, out_EXECUTE_QUEUE_OUT_ADDRESS      );
+  INSTANCE0_SC_SIGNAL(component, out_EXECUTE_QUEUE_OUT_DATA         );
+    }
+#endif
+}
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/SelfTest/src/top_deallocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/SelfTest/src/top_deallocation.cpp	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/SelfTest/src/top_deallocation.cpp	(revision 113)
@@ -0,0 +1,50 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ * Test
+ */
+#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/SelfTest/include/top.h"
+#include "Behavioural/include/Allocation.h"
+
+void top::deallocation (void)
+{
+#ifdef SYSTEMC
+  delete             in_CLOCK;
+  DELETE0_SC_SIGNAL( in_NRESET);
+
+  DELETE0_SC_SIGNAL( in_EXECUTE_QUEUE_IN_VAL           );
+  DELETE0_SC_SIGNAL(out_EXECUTE_QUEUE_IN_ACK           );
+  DELETE0_SC_SIGNAL( in_EXECUTE_QUEUE_IN_CONTEXT_ID    );
+  DELETE0_SC_SIGNAL( in_EXECUTE_QUEUE_IN_FRONT_END_ID  );
+  DELETE0_SC_SIGNAL( in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID );
+  DELETE0_SC_SIGNAL( in_EXECUTE_QUEUE_IN_PACKET_ID     );
+//DELETE0_SC_SIGNAL( in_EXECUTE_QUEUE_IN_OPERATION     );
+//DELETE0_SC_SIGNAL( in_EXECUTE_QUEUE_IN_TYPE          );
+  DELETE0_SC_SIGNAL( in_EXECUTE_QUEUE_IN_FLAGS         );
+  DELETE0_SC_SIGNAL( in_EXECUTE_QUEUE_IN_EXCEPTION     );
+  DELETE0_SC_SIGNAL( in_EXECUTE_QUEUE_IN_NO_SEQUENCE   );
+  DELETE0_SC_SIGNAL( in_EXECUTE_QUEUE_IN_ADDRESS       );
+  DELETE0_SC_SIGNAL( in_EXECUTE_QUEUE_IN_DATA          );
+
+  DELETE0_SC_SIGNAL(out_EXECUTE_QUEUE_OUT_VAL          );
+  DELETE0_SC_SIGNAL( in_EXECUTE_QUEUE_OUT_ACK          );
+  DELETE0_SC_SIGNAL(out_EXECUTE_QUEUE_OUT_CONTEXT_ID   );
+  DELETE0_SC_SIGNAL(out_EXECUTE_QUEUE_OUT_FRONT_END_ID );
+  DELETE0_SC_SIGNAL(out_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID);
+  DELETE0_SC_SIGNAL(out_EXECUTE_QUEUE_OUT_PACKET_ID    );
+//DELETE0_SC_SIGNAL(out_EXECUTE_QUEUE_OUT_OPERATION    );
+//DELETE0_SC_SIGNAL(out_EXECUTE_QUEUE_OUT_TYPE         );
+  DELETE0_SC_SIGNAL(out_EXECUTE_QUEUE_OUT_FLAGS        );
+  DELETE0_SC_SIGNAL(out_EXECUTE_QUEUE_OUT_EXCEPTION    );
+  DELETE0_SC_SIGNAL(out_EXECUTE_QUEUE_OUT_NO_SEQUENCE  );
+  DELETE0_SC_SIGNAL(out_EXECUTE_QUEUE_OUT_ADDRESS      );
+  DELETE0_SC_SIGNAL(out_EXECUTE_QUEUE_OUT_DATA         );
+#endif
+
+  delete component;
+#ifdef STATISTICS
+  delete _param_stat;
+#endif
+}
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/SelfTest/src/top_test.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/SelfTest/src/top_test.cpp	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/SelfTest/src/top_test.cpp	(revision 113)
@@ -0,0 +1,223 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ * Test
+ */
+
+#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/SelfTest/include/top.h"
+#include "Behavioural/include/Allocation.h"
+#include "Common/include/BitManipulation.h"
+
+  class entry_t
+  {
+  public  : Tcontext_t         _context_id   ;
+  public  : Tcontext_t         _front_end_id ;
+  public  : Tcontext_t         _ooo_engine_id;
+  public  : Tpacket_t          _packet_id    ;
+//public  : Toperation_t       _operation    ;
+//public  : Ttype_t            _type         ;
+  public  : Tspecial_data_t    _flags        ;
+  public  : Texception_t       _exception    ;
+  public  : Tcontrol_t         _no_sequence  ;
+  public  : Tgeneral_data_t    _address      ;
+  public  : Tgeneral_data_t    _data         ;
+    
+  public  : entry_t (Tcontext_t         context_id   ,
+		     Tcontext_t         front_end_id ,
+		     Tcontext_t         ooo_engine_id,
+		     Tpacket_t          packet_id    ,
+		     //Toperation_t       operation    ,
+		     //Ttype_t            type         ,
+		     Tspecial_data_t    flags        ,
+		     Texception_t       exception    ,
+		     Tcontrol_t         no_sequence  ,
+		     Tgeneral_data_t    address      ,
+		     Tgeneral_data_t    data         )
+    {
+      _context_id    = context_id   ;
+      _front_end_id  = front_end_id ;
+      _ooo_engine_id = ooo_engine_id;
+      _packet_id     = packet_id    ;
+    //_operation     = operation    ;
+    //_type          = type         ;
+      _flags         = flags        ;
+      _exception     = exception    ;
+      _no_sequence   = no_sequence  ;
+      _address       = address      ;
+      _data          = data         ;
+    };
+
+    friend std::ostream& operator<< (std::ostream& output_stream,
+				     entry_t & x)
+    {
+      output_stream << " * _context_id    : " << toString(x._context_id   ) << std::endl
+		    << " * _front_end_id  : " << toString(x._front_end_id ) << std::endl
+		    << " * _ooo_engine_id : " << toString(x._ooo_engine_id) << std::endl
+		    << " * _packet_id     : " << toString(x._packet_id    ) << std::endl
+		  //<< " * _operation     : " << toString(x._operation    ) << std::endl
+		  //<< " * _type          : " << toString(x._type         ) << std::endl
+		    << " * _flags         : " << toString(x._flags        ) << std::endl
+		    << " * _exception     : " << toString(x._exception    ) << std::endl
+		    << " * _no_sequence   : " << toString(x._no_sequence  ) << std::endl
+		    << " * _address       : " << toString(x._address      ) << std::endl
+		    << " * _data          : " << toString(x._data         ) << std::endl;
+
+      return output_stream;
+    }
+  };
+
+void top::test (void)
+{
+#ifdef SYSTEMC
+  if (usage_is_set(_usage,USE_SYSTEMC))
+    {
+      msgInformation(_("<%s> : Start Simulation ............\n"),name.c_str());
+      
+      Time * _time = new Time();
+      
+      /********************************************************
+       * Simulation - Begin
+       ********************************************************/
+      
+  // Initialisation
+
+  const uint32_t seed = 0;
+//const uint32_t seed = static_cast<uint32_t>(time(NULL));
+
+  const  int32_t percent_transaction_execute_queue_in  = 75;
+  const  int32_t percent_transaction_execute_queue_out = 75;
+
+  entry_t *      request [_param->_nb_packet];
+
+  for (uint32_t i=0; i<_param->_nb_packet; ++i)
+    request[i] = NULL;
+
+  srand(seed);
+
+  SC_CYCLE(0);
+  LABEL("Initialisation");
+
+  LABEL("Reset");
+  in_NRESET->write(0);
+  SC_CYCLE(5);
+  in_NRESET->write(1);  
+
+  LABEL("Loop of Test");
+
+  for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++)
+    {
+      LABEL("Iteration %d",iteration);
+
+      for (uint32_t i=0; i<_param->_nb_packet; i++)
+	{
+          if (request[i] != NULL)
+            delete request [i];
+
+	  request [i] = new entry_t (range<Tcontext_t        >(rand(),_param->_size_context_id      ),
+				     range<Tcontext_t        >(rand(),_param->_size_front_end_id    ),
+				     range<Tcontext_t        >(rand(),_param->_size_ooo_engine_id   ),
+				     i,
+				   //range<Toperation_t      >(rand(),_param->_size_operation       ),
+				   //range<Ttype_t           >(rand(),_param->_size_type            ),
+				     range<Tspecial_data_t   >(rand(),_param->_size_special_data    ),
+				     range<Texception_t      >(rand(),_param->_size_exception       ),
+				     range<Tcontrol_t        >(rand(),1                             ),
+				     range<Tgeneral_data_t   >(rand(),_param->_size_general_data    ),
+				     range<Tgeneral_data_t   >(rand(),_param->_size_general_data    ));
+	}
+
+      uint32_t nb_request_in  = 0;
+      uint32_t nb_request_out = 0;
+      
+      while (nb_request_out < _param->_nb_packet)
+      {
+	bool val = (((rand()%100)<percent_transaction_execute_queue_in) and
+		    (nb_request_in < _param->_nb_packet));
+	
+	in_EXECUTE_QUEUE_IN_VAL          ->write(val);
+	if (val)
+	  {
+	    in_EXECUTE_QUEUE_IN_CONTEXT_ID   ->write(request [nb_request_in]->_context_id   );
+	    in_EXECUTE_QUEUE_IN_FRONT_END_ID ->write(request [nb_request_in]->_front_end_id );
+	    in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID->write(request [nb_request_in]->_ooo_engine_id);
+	    in_EXECUTE_QUEUE_IN_PACKET_ID    ->write(request [nb_request_in]->_packet_id    );
+	  //in_EXECUTE_QUEUE_IN_OPERATION    ->write(request [nb_request_in]->_operation    );
+	  //in_EXECUTE_QUEUE_IN_TYPE         ->write(request [nb_request_in]->_type         );
+	    in_EXECUTE_QUEUE_IN_FLAGS        ->write(request [nb_request_in]->_flags        );
+	    in_EXECUTE_QUEUE_IN_EXCEPTION    ->write(request [nb_request_in]->_exception    );
+	    in_EXECUTE_QUEUE_IN_NO_SEQUENCE  ->write(request [nb_request_in]->_no_sequence  );
+	    in_EXECUTE_QUEUE_IN_ADDRESS      ->write(request [nb_request_in]->_address      );
+	    in_EXECUTE_QUEUE_IN_DATA         ->write(request [nb_request_in]->_data         );
+	  }
+	in_EXECUTE_QUEUE_OUT_ACK         ->write((rand()%100)<percent_transaction_execute_queue_out);
+	    
+	SC_CYCLE(0);
+
+	
+	// ======================================================================
+	// ======================================================================
+	// ======================================================================
+	if ( in_EXECUTE_QUEUE_IN_VAL->read() and
+	    out_EXECUTE_QUEUE_IN_ACK->read())
+	  {
+	    LABEL(" * Accepted EXECUTE_QUEUE_IN  [%d]",nb_request_in);
+// 	    std::cout << *request [nb_request_in] << std::endl;
+
+	    nb_request_in ++;
+	  }
+	
+	// ======================================================================
+	// ======================================================================
+	// ======================================================================
+	if (out_EXECUTE_QUEUE_OUT_VAL->read() and
+	     in_EXECUTE_QUEUE_OUT_ACK->read())
+	  {
+	    Tcontext_t packet;
+	    if (_param->_have_port_rob_ptr)
+	      packet = out_EXECUTE_QUEUE_OUT_PACKET_ID->read();
+	    else
+	      packet = 0;
+
+	    LABEL(" * Accepted EXECUTE_QUEUE_OUT [%d]",packet);
+// 	    std::cout << *request [packet] << std::endl;
+
+	    if (_param->_have_port_context_id)
+	    TEST(Tcontext_t     , out_EXECUTE_QUEUE_OUT_CONTEXT_ID   ->read(), request [packet]->_context_id   );
+	    if (_param->_have_port_front_end_id)
+	    TEST(Tcontext_t     , out_EXECUTE_QUEUE_OUT_FRONT_END_ID ->read(), request [packet]->_front_end_id );
+	    if (_param->_have_port_ooo_engine_id)
+	    TEST(Tcontext_t     , out_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID->read(), request [packet]->_ooo_engine_id);
+	  //TEST(Toperation_t   , out_EXECUTE_QUEUE_OUT_OPERATION    ->read(), request [packet]->_operation    );
+	  //TEST(Ttype_t        , out_EXECUTE_QUEUE_OUT_TYPE         ->read(), request [packet]->_type         );
+	    TEST(Tcontrol_t     , out_EXECUTE_QUEUE_OUT_FLAGS        ->read(), request [packet]->_flags        );
+	    TEST(Texception_t   , out_EXECUTE_QUEUE_OUT_EXCEPTION    ->read(), request [packet]->_exception    );
+	    TEST(Tcontrol_t     , out_EXECUTE_QUEUE_OUT_NO_SEQUENCE  ->read(), request [packet]->_no_sequence  );
+	    TEST(Tgeneral_data_t, out_EXECUTE_QUEUE_OUT_ADDRESS      ->read(), request [packet]->_address      );
+	    TEST(Tgeneral_data_t, out_EXECUTE_QUEUE_OUT_DATA         ->read(), request [packet]->_data         );
+
+	    nb_request_out ++;
+	  }
+
+	SC_CYCLE(1);
+      }
+    }
+
+  for (uint32_t i=0; i<_param->_nb_packet; i++)
+    if (request[i] != NULL)
+      delete request [i];
+  
+      /********************************************************
+       * Simulation - End
+       ********************************************************/
+      
+      TEST_OK ("");
+      
+      sc_stop();
+      delete _time;
+      
+      msgInformation(_("<%s> : ............ Stop Simulation\n"),name.c_str());
+    }
+#endif
+}
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/SelfTest/src/top_usage.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/SelfTest/src/top_usage.cpp	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/SelfTest/src/top_usage.cpp	(revision 113)
@@ -0,0 +1,30 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/SelfTest/include/top.h"
+
+void top::usage 
+(
+#ifdef MTI_SYSTEMC
+ int argc, const char * const * argv
+#else
+ int argc, char * argv[]
+#endif
+ )
+{
+  msgError (_("<Usage> %s name_instance list_params.\n"),argv[0]);
+  msgError (_("list_params is :\n"));
+  msgError (_(" * size_queue          (uint32_t)\n"));
+  msgError (_(" * nb_context          (uint32_t)\n"));
+  msgError (_(" * nb_front_end        (uint32_t)\n"));
+  msgError (_(" * nb_ooo_engine       (uint32_t)\n"));
+  msgError (_(" * nb_packet           (uint32_t)\n"));
+  msgError (_(" * size_general_data   (uint32_t)\n"));
+  msgError (_(" * size_special_data   (uint32_t)\n"));
+
+  exit (1);
+}
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Execute_queue.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Execute_queue.h	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Execute_queue.h	(revision 113)
@@ -18,4 +18,5 @@
 #include "Common/include/Debug.h"
 
+#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Wrapper_Execute_queue.h"
 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Parameters.h"
 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Types.h"
@@ -28,4 +29,7 @@
 #endif
 #include "Behavioural/include/Usage.h"
+#include "Behavioural/include/Simulation.h"
+
+#include "Behavioural/Generic/Queue/include/Queue.h"
 
 namespace morpheo {
@@ -47,5 +51,5 @@
   protected : const std::string  _name;
   protected : const Parameters * _param;
-  private   : const Tusage_t     _usage;
+  public    :       Tusage_t     _usage;
 
 #ifdef STATISTICS
@@ -95,6 +99,4 @@
   public    : SC_OUT(Taddress_t        )    * out_EXECUTE_QUEUE_OUT_ADDRESS      ;
   public    : SC_OUT(Tgeneral_data_t   )    * out_EXECUTE_QUEUE_OUT_DATA         ;
-
-    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
     
     // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
@@ -103,4 +105,15 @@
   private   : Tcontrol_t                       internal_EXECUTE_QUEUE_IN_ACK ;
   private   : Tcontrol_t                       internal_EXECUTE_QUEUE_OUT_VAL;
+
+    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
+# ifdef VHDL
+  private   : morpheo::behavioural::generic::queue::Parameters * _param_queue;
+  private   : morpheo::behavioural::generic::queue::Queue      * _component_queue;
+# endif
+#endif
+
+#ifdef MODELSIM_COSIMULATION
+    // ~~~~~[ Wrapper ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
+  private   : Wrapper_Execute_queue * _wrapper;
 #endif
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Parameters.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Parameters.h	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Parameters.h	(revision 113)
@@ -61,7 +61,9 @@
   public :        Parameters_test msg_error  (void);
 
-  public :        std::string   print      (uint32_t depth);
-  public : friend std::ostream& operator<< (std::ostream& output_stream,
-					    morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::execute_queue::Parameters & x);
+  public :        std::string     id         (void) const;
+
+  public :        std::string     print      (uint32_t depth);
+  public : friend std::ostream&   operator<< (std::ostream& output_stream,
+                                              morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::execute_queue::Parameters & x);
   };
 
@@ -72,5 +74,4 @@
 }; // end namespace multi_execute_loop
 }; // end namespace core
-
 }; // end namespace behavioural
 }; // end namespace morpheo              
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Wrapper_Execute_queue.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Wrapper_Execute_queue.h	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Wrapper_Execute_queue.h	(revision 113)
@@ -0,0 +1,157 @@
+#ifndef morpheo_behavioural_core_multi_execute_loop_execute_loop_multi_write_unit_write_unit_execute_queue_Wrapper_Execute_queue_h
+#define morpheo_behavioural_core_multi_execute_loop_execute_loop_multi_write_unit_write_unit_execute_queue_Wrapper_Execute_queue_h
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "systemc.h"
+#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Parameters.h"
+#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Types.h"
+#include "Behavioural/include/Allocation.h"
+#include "Common/include/Environment.h"
+
+#ifdef MODELSIM_COSIMULATION
+
+namespace morpheo {
+namespace behavioural {
+namespace core {
+namespace multi_execute_loop {
+namespace execute_loop {
+namespace multi_write_unit {
+namespace write_unit {
+namespace execute_queue {
+
+  class Wrapper_Execute_queue : public sc_foreign_module
+  {
+  protected : const Parameters * _param;
+
+    // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    // Interface
+  public    : SC_CLOCK             *  in_CLOCK ;
+  public    : SC_IN   (Tcontrol_t) *  in_NRESET;
+
+    // -----[ Interface "Execute_queue_in" ]------------------------------
+  public    : SC_IN (Tcontrol_t     ) *  in_EXECUTE_QUEUE_IN_VAL           ;
+  public    : SC_OUT(Tcontrol_t     ) * out_EXECUTE_QUEUE_IN_ACK           ;
+  public    : SC_IN (Tcontext_t     ) *  in_EXECUTE_QUEUE_IN_CONTEXT_ID    ;
+  public    : SC_IN (Tcontext_t     ) *  in_EXECUTE_QUEUE_IN_FRONT_END_ID  ;
+  public    : SC_IN (Tcontext_t     ) *  in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID ;
+  public    : SC_IN (Tpacket_t      ) *  in_EXECUTE_QUEUE_IN_PACKET_ID     ;
+//public    : SC_IN (Toperation_t   ) *  in_EXECUTE_QUEUE_IN_OPERATION     ;
+//public    : SC_IN (Ttype_t        ) *  in_EXECUTE_QUEUE_IN_TYPE          ;
+  public    : SC_IN (Tspecial_data_t) *  in_EXECUTE_QUEUE_IN_FLAGS         ;
+  public    : SC_IN (Texception_t   ) *  in_EXECUTE_QUEUE_IN_EXCEPTION     ;
+  public    : SC_IN (Tcontrol_t     ) *  in_EXECUTE_QUEUE_IN_NO_SEQUENCE   ;
+  public    : SC_IN (Taddress_t     ) *  in_EXECUTE_QUEUE_IN_ADDRESS       ;
+  public    : SC_IN (Tgeneral_data_t) *  in_EXECUTE_QUEUE_IN_DATA          ;
+
+    // -----[ Interface "Execute_queue_out" ]-----------------------------
+  public    : SC_OUT(Tcontrol_t     ) * out_EXECUTE_QUEUE_OUT_VAL          ;
+  public    : SC_IN (Tcontrol_t     ) *  in_EXECUTE_QUEUE_OUT_ACK          ;
+  public    : SC_OUT(Tcontext_t     ) * out_EXECUTE_QUEUE_OUT_CONTEXT_ID   ;
+  public    : SC_OUT(Tcontext_t     ) * out_EXECUTE_QUEUE_OUT_FRONT_END_ID ;
+  public    : SC_OUT(Tcontext_t     ) * out_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID;
+  public    : SC_OUT(Tpacket_t      ) * out_EXECUTE_QUEUE_OUT_PACKET_ID    ;
+//public    : SC_OUT(Toperation_t   ) * out_EXECUTE_QUEUE_OUT_OPERATION    ;
+//public    : SC_OUT(Ttype_t        ) * out_EXECUTE_QUEUE_OUT_TYPE         ;
+  public    : SC_OUT(Tspecial_data_t) * out_EXECUTE_QUEUE_OUT_FLAGS        ;
+  public    : SC_OUT(Texception_t   ) * out_EXECUTE_QUEUE_OUT_EXCEPTION    ;
+  public    : SC_OUT(Tcontrol_t     ) * out_EXECUTE_QUEUE_OUT_NO_SEQUENCE  ;
+  public    : SC_OUT(Taddress_t     ) * out_EXECUTE_QUEUE_OUT_ADDRESS      ;
+  public    : SC_OUT(Tgeneral_data_t) * out_EXECUTE_QUEUE_OUT_DATA         ;
+
+    // -----[ Methods ]---------------------------------------------------
+  public  :  Wrapper_Execute_queue             
+  (sc_module_name name_entity,
+   std::string    name_architecture,
+   std::string    name_library,
+   const Parameters *   param
+   ) :
+    sc_foreign_module (name_entity, (toString(name_library+"."+toString(name_entity)+"("+name_architecture+")").c_str())),
+    _param (param)
+    {
+      // caller affect interface signal
+
+      ALLOC0_FOREIGN_SIGNAL_IN ( in_CLOCK                          ,""                 ,"clock"        ,Tcontrol_t        ,1                              );
+      ALLOC0_FOREIGN_SIGNAL_IN ( in_NRESET                         ,""                 ,"nreset"       ,Tcontrol_t        ,1                              );
+
+      ALLOC0_FOREIGN_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_VAL           ,"execute_queue_in" ,"val"          ,Tcontrol_t        ,1                              );         
+      ALLOC0_FOREIGN_SIGNAL_OUT(out_EXECUTE_QUEUE_IN_ACK           ,"execute_queue_in" ,"ack"          ,Tcontrol_t        ,1                              );
+      ALLOC0_FOREIGN_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_CONTEXT_ID    ,"execute_queue_in" ,"context_id"   ,Tcontext_t        ,_param->_size_context_id       );
+      ALLOC0_FOREIGN_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_FRONT_END_ID  ,"execute_queue_in" ,"front_end_id" ,Tcontext_t        ,_param->_size_front_end_id     );
+      ALLOC0_FOREIGN_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID ,"execute_queue_in" ,"ooo_engine_id",Tcontext_t        ,_param->_size_ooo_engine_id    );
+      ALLOC0_FOREIGN_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_PACKET_ID     ,"execute_queue_in" ,"packet_id"    ,Tpacket_t         ,_param->_size_rob_ptr        );
+//    ALLOC0_FOREIGN_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_OPERATION     ,"execute_queue_in" ,"operation"    ,Toperation_t      ,_param->_size_operation        );
+//    ALLOC0_FOREIGN_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_TYPE          ,"execute_queue_in" ,"type"         ,Ttype_t           ,_param->_size_type             );
+      ALLOC0_FOREIGN_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_FLAGS         ,"execute_queue_in" ,"flags"        ,Tspecial_data_t   ,_param->_size_special_data     );
+      ALLOC0_FOREIGN_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_EXCEPTION     ,"execute_queue_in" ,"exception"    ,Texception_t      ,_param->_size_exception        );
+      ALLOC0_FOREIGN_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_NO_SEQUENCE   ,"execute_queue_in" ,"no_sequence"  ,Tcontrol_t        ,1                              );
+      ALLOC0_FOREIGN_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_ADDRESS       ,"execute_queue_in" ,"address"      ,Taddress_t        ,_param->_size_instruction_address);
+      ALLOC0_FOREIGN_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_DATA          ,"execute_queue_in" ,"data"         ,Tgeneral_data_t   ,_param->_size_general_data     );
+
+      ALLOC0_FOREIGN_SIGNAL_OUT(out_EXECUTE_QUEUE_OUT_VAL          ,"execute_queue_out","val"          ,Tcontrol_t        ,1                              );         
+      ALLOC0_FOREIGN_SIGNAL_IN ( in_EXECUTE_QUEUE_OUT_ACK          ,"execute_queue_out","ack"          ,Tcontrol_t        ,1                              );         
+      ALLOC0_FOREIGN_SIGNAL_OUT(out_EXECUTE_QUEUE_OUT_CONTEXT_ID   ,"execute_queue_out","context_id"   ,Tcontext_t        ,_param->_size_context_id   );
+      ALLOC0_FOREIGN_SIGNAL_OUT(out_EXECUTE_QUEUE_OUT_FRONT_END_ID ,"execute_queue_out","front_end_id" ,Tcontext_t        ,_param->_size_front_end_id );
+      ALLOC0_FOREIGN_SIGNAL_OUT(out_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID,"execute_queue_out","ooo_engine_id",Tcontext_t        ,_param->_size_ooo_engine_id);
+      ALLOC0_FOREIGN_SIGNAL_OUT(out_EXECUTE_QUEUE_OUT_PACKET_ID    ,"execute_queue_out","packet_id"    ,Tpacket_t         ,_param->_size_rob_ptr    );
+//    ALLOC0_FOREIGN_SIGNAL_OUT(out_EXECUTE_QUEUE_OUT_OPERATION    ,"execute_queue_out","operation"    ,Toperation_t      ,_param->_size_operation    );
+//    ALLOC0_FOREIGN_SIGNAL_OUT(out_EXECUTE_QUEUE_OUT_TYPE         ,"execute_queue_out","type"         ,Ttype_t           ,_param->_size_type         );
+      ALLOC0_FOREIGN_SIGNAL_OUT(out_EXECUTE_QUEUE_OUT_FLAGS        ,"execute_queue_out","flags"        ,Tspecial_data_t   ,_param->_size_special_data );
+      ALLOC0_FOREIGN_SIGNAL_OUT(out_EXECUTE_QUEUE_OUT_EXCEPTION    ,"execute_queue_out","exception"    ,Texception_t      ,_param->_size_exception    );
+      ALLOC0_FOREIGN_SIGNAL_OUT(out_EXECUTE_QUEUE_OUT_NO_SEQUENCE  ,"execute_queue_out","no_sequence"  ,Tcontrol_t        ,1                          );
+      ALLOC0_FOREIGN_SIGNAL_OUT(out_EXECUTE_QUEUE_OUT_ADDRESS      ,"execute_queue_out","address"      ,Taddress_t        ,_param->_size_instruction_address);
+      ALLOC0_FOREIGN_SIGNAL_OUT(out_EXECUTE_QUEUE_OUT_DATA         ,"execute_queue_out","data"         ,Tgeneral_data_t   ,_param->_size_general_data );
+
+      elaborate_foreign_module((toString(name_library+"."+toString(name_entity)+"("+name_architecture+")").c_str()));
+    }
+
+  public  : ~Wrapper_Execute_queue (void)
+    {
+      DELETE0_FOREIGN_SIGNAL( in_CLOCK                          ,1                              );
+      DELETE0_FOREIGN_SIGNAL( in_NRESET                         ,1                              );
+
+      DELETE0_FOREIGN_SIGNAL( in_EXECUTE_QUEUE_IN_VAL           ,1                              );         
+      DELETE0_FOREIGN_SIGNAL(out_EXECUTE_QUEUE_IN_ACK           ,1                              );
+      DELETE0_FOREIGN_SIGNAL( in_EXECUTE_QUEUE_IN_CONTEXT_ID    ,_param->_size_context_id       );
+      DELETE0_FOREIGN_SIGNAL( in_EXECUTE_QUEUE_IN_FRONT_END_ID  ,_param->_size_front_end_id     );
+      DELETE0_FOREIGN_SIGNAL( in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID ,_param->_size_ooo_engine_id    );
+      DELETE0_FOREIGN_SIGNAL( in_EXECUTE_QUEUE_IN_PACKET_ID     ,_param->_size_rob_ptr        );
+//    DELETE0_FOREIGN_SIGNAL( in_EXECUTE_QUEUE_IN_OPERATION     ,_param->_size_operation        );
+//    DELETE0_FOREIGN_SIGNAL( in_EXECUTE_QUEUE_IN_TYPE          ,_param->_size_type             );
+      DELETE0_FOREIGN_SIGNAL( in_EXECUTE_QUEUE_IN_FLAGS         ,_param->_size_special_data     );
+      DELETE0_FOREIGN_SIGNAL( in_EXECUTE_QUEUE_IN_EXCEPTION     ,_param->_size_exception        );
+      DELETE0_FOREIGN_SIGNAL( in_EXECUTE_QUEUE_IN_NO_SEQUENCE   ,1                              );
+      DELETE0_FOREIGN_SIGNAL( in_EXECUTE_QUEUE_IN_ADDRESS       ,_param->_size_instruction_address);
+      DELETE0_FOREIGN_SIGNAL( in_EXECUTE_QUEUE_IN_DATA          ,_param->_size_general_data     );
+
+      DELETE0_FOREIGN_SIGNAL(out_EXECUTE_QUEUE_OUT_VAL          ,1                              );         
+      DELETE0_FOREIGN_SIGNAL( in_EXECUTE_QUEUE_OUT_ACK          ,1                              );         
+      DELETE0_FOREIGN_SIGNAL(out_EXECUTE_QUEUE_OUT_CONTEXT_ID   ,_param->_size_context_id   );
+      DELETE0_FOREIGN_SIGNAL(out_EXECUTE_QUEUE_OUT_FRONT_END_ID ,_param->_size_front_end_id );
+      DELETE0_FOREIGN_SIGNAL(out_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID,_param->_size_ooo_engine_id);
+      DELETE0_FOREIGN_SIGNAL(out_EXECUTE_QUEUE_OUT_PACKET_ID    ,_param->_size_rob_ptr    );
+//    DELETE0_FOREIGN_SIGNAL(out_EXECUTE_QUEUE_OUT_OPERATION    ,_param->_size_operation    );
+//    DELETE0_FOREIGN_SIGNAL(out_EXECUTE_QUEUE_OUT_TYPE         ,_param->_size_type         );
+      DELETE0_FOREIGN_SIGNAL(out_EXECUTE_QUEUE_OUT_FLAGS        ,_param->_size_special_data );
+      DELETE0_FOREIGN_SIGNAL(out_EXECUTE_QUEUE_OUT_EXCEPTION    ,_param->_size_exception    );
+      DELETE0_FOREIGN_SIGNAL(out_EXECUTE_QUEUE_OUT_NO_SEQUENCE  ,1                          );
+      DELETE0_FOREIGN_SIGNAL(out_EXECUTE_QUEUE_OUT_ADDRESS      ,_param->_size_instruction_address);
+      DELETE0_FOREIGN_SIGNAL(out_EXECUTE_QUEUE_OUT_DATA         ,_param->_size_general_data );
+    }
+  };
+
+}; // end namespace execute_queue
+}; // end namespace write_unit
+}; // end namespace multi_write_unit
+}; // end namespace execute_loop
+}; // end namespace multi_execute_loop
+}; // end namespace core
+}; // end namespace behavioural
+}; // end namespace morpheo              
+
+#endif
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue.cpp	(revision 113)
@@ -35,15 +35,42 @@
     _name              (name)
     ,_param            (param)
-    ,_usage            (usage)
   {
-    log_printf(FUNC,Execute_queue,FUNCTION,"Begin");
+    log_begin(Execute_queue,FUNCTION);
 
-#if DEBUG_Execute_queue == true
-    log_printf(INFO,Execute_queue,FUNCTION,_("<%s> Parameters"),_name.c_str());
+    _usage = usage_environment(usage);
 
-    std::cout << *param << std::endl;
-#endif    
+// #if DEBUG_Execute_queue == true
+//     log_printf(INFO,Execute_queue,FUNCTION,_("<%s> Parameters"),_name.c_str());
 
-    log_printf(INFO,Execute_queue,FUNCTION,"Allocation");
+//     std::cout << *param << std::endl;
+// #endif    
+
+#ifdef MODELSIM_COSIMULATION
+    {
+      std::string param_id = param->id();
+      
+      if ((_model.get_type(_param->_type) == MODEL_VHDL) and
+          (param_id != "")
+          )
+        {
+          std::string vhdl_id = vhdl_get_id(_name);
+          
+          if (vhdl_id == param_id)
+            {
+              msgInformation(_("<%s> Use VHDL model\n"),_name.c_str());
+              _usage = usage_cosimulation(_usage);
+            }
+          else
+            {
+              log_printf(TRACE,Execute_queue,FUNCTION,"get_id : %s",vhdl_id.c_str());
+              log_printf(TRACE,Execute_queue,FUNCTION,"id     : %s",param_id.c_str());
+            
+              msgWarning(_("<%s> Can't load VHDL model, continue with SystemC model\n"),_name.c_str());
+            }
+        }
+    }
+#endif
+
+    log_printf(INFO,Execute_queue,FUNCTION,_("<%s> Allocation"),_name.c_str());
     allocation ();
 
@@ -51,5 +78,5 @@
     if (usage_is_set(_usage,USE_STATISTICS))
       {	
-	log_printf(INFO,Execute_queue,FUNCTION,"Allocation of statistics");
+	log_printf(INFO,Execute_queue,FUNCTION,("<%s> Allocation of statistics"),_name.c_str());
 
 	statistics_declaration(param_statistics);
@@ -61,5 +88,5 @@
       {
 	// generate the vhdl
-	log_printf(INFO,Execute_queue,FUNCTION,"Generate the vhdl");
+	log_printf(INFO,Execute_queue,FUNCTION,_("<%s> Generate the vhdl"),_name.c_str());
 	
 	vhdl();
@@ -68,7 +95,7 @@
 
 #ifdef SYSTEMC
-    if (usage_is_set(_usage,USE_SYSTEMC))
+    if (usage_is_set(_usage,USE_SYSTEMC_BODY))
       {
-	log_printf(INFO,Execute_queue,FUNCTION,"Method - transition");
+	log_printf(INFO,Execute_queue,FUNCTION,_("<%s> Method - transition"),_name.c_str());
 
 	SC_METHOD (transition);
@@ -80,5 +107,5 @@
 # endif    
 
-	log_printf(INFO,Execute_queue,FUNCTION,"Method - genMoore");
+	log_printf(INFO,Execute_queue,FUNCTION,_("<%s> Method - genMoore"),_name.c_str());
 
 	SC_METHOD (genMoore);
@@ -89,8 +116,7 @@
 	// List dependency information
 # endif    
-	
+      }
 #endif
-      }
-    log_printf(FUNC,Execute_queue,FUNCTION,"End");
+    log_end(Execute_queue,FUNCTION);
   };
     
@@ -99,10 +125,10 @@
   Execute_queue::~Execute_queue (void)
   {
-    log_printf(FUNC,Execute_queue,FUNCTION,"Begin");
+    log_begin(Execute_queue,FUNCTION);
 
 #ifdef STATISTICS
     if (usage_is_set(_usage,USE_STATISTICS))
       {
-	log_printf(INFO,Execute_queue,FUNCTION,"Generate Statistics file");
+	log_printf(INFO,Execute_queue,FUNCTION,_("<%s> Generate Statistics file"),_name.c_str());
 	
 	delete _stat;
@@ -110,8 +136,8 @@
 #endif
 
-    log_printf(INFO,Execute_queue,FUNCTION,"Deallocation");
+    log_printf(INFO,Execute_queue,FUNCTION,_("<%s> Deallocation"),_name.c_str());
     deallocation ();
 
-    log_printf(FUNC,Execute_queue,FUNCTION,"End");
+    log_end(Execute_queue,FUNCTION);
   };
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue_allocation.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue_allocation.cpp	(revision 113)
@@ -2,8 +2,9 @@
  * $Id$
  *
- * [ Description ]
+ * [ Description ]
  * 
  */
 
+#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Wrapper_Execute_queue.h"
 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Execute_queue.h"
 #include "Behavioural/include/Allocation.h"
@@ -27,5 +28,5 @@
 
     Entity * entity = _component->set_entity (_name       
-					      ,"Execute_queue"
+					      ,_param->_type
 #ifdef POSITION
 					      ,COMBINATORY 
@@ -35,5 +36,5 @@
     _interfaces = entity->set_interfaces();
 
-    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
       Interface * interface = _interfaces->set_interface(""
@@ -54,15 +55,15 @@
        ALLOC0_VALACK_IN ( in_EXECUTE_QUEUE_IN_VAL,VAL);
        ALLOC0_VALACK_OUT(out_EXECUTE_QUEUE_IN_ACK,ACK);
-       ALLOC0_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_CONTEXT_ID   ,"context_id"   ,Tcontext_t        ,_param->_size_context_id       );
-       ALLOC0_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_FRONT_END_ID ,"front_end_id" ,Tcontext_t        ,_param->_size_front_end_id     );
-       ALLOC0_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID,"ooo_engine_id",Tcontext_t        ,_param->_size_ooo_engine_id    );
-       ALLOC0_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_PACKET_ID    ,"packet_id"    ,Tpacket_t         ,_param->_size_rob_ptr        );
-//     ALLOC0_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_OPERATION    ,"operation"    ,Toperation_t      ,_param->_size_operation        );
-//     ALLOC0_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_TYPE         ,"type"         ,Ttype_t           ,_param->_size_type             );
-       ALLOC0_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_FLAGS        ,"flags"        ,Tspecial_data_t   ,_param->_size_special_data     );
-       ALLOC0_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_EXCEPTION    ,"exception"    ,Texception_t      ,_param->_size_exception        );
-       ALLOC0_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_NO_SEQUENCE  ,"no_sequence"  ,Tcontrol_t        ,1                              );
+       ALLOC0_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_CONTEXT_ID   ,"context_id"   ,Tcontext_t        ,_param->_size_context_id         );
+       ALLOC0_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_FRONT_END_ID ,"front_end_id" ,Tcontext_t        ,_param->_size_front_end_id       );
+       ALLOC0_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID,"ooo_engine_id",Tcontext_t        ,_param->_size_ooo_engine_id      );
+       ALLOC0_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_PACKET_ID    ,"packet_id"    ,Tpacket_t         ,_param->_size_rob_ptr            );
+//     ALLOC0_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_OPERATION    ,"operation"    ,Toperation_t      ,_param->_size_operation          );
+//     ALLOC0_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_TYPE         ,"type"         ,Ttype_t           ,_param->_size_type               );
+       ALLOC0_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_FLAGS        ,"flags"        ,Tspecial_data_t   ,_param->_size_special_data       );
+       ALLOC0_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_EXCEPTION    ,"exception"    ,Texception_t      ,_param->_size_exception          );
+       ALLOC0_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_NO_SEQUENCE  ,"no_sequence"  ,Tcontrol_t        ,1                                );
        ALLOC0_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_ADDRESS      ,"address"      ,Taddress_t        ,_param->_size_instruction_address);
-       ALLOC0_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_DATA         ,"data"         ,Tgeneral_data_t   ,_param->_size_general_data     );
+       ALLOC0_SIGNAL_IN ( in_EXECUTE_QUEUE_IN_DATA         ,"data"         ,Tgeneral_data_t   ,_param->_size_general_data       );
 
        ALLOC0_INTERFACE_END();
@@ -90,13 +91,121 @@
      }
 
-    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
-
-     _queue = new std::list<execute_queue_entry_t *>;
+     // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
+     if (usage_is_set(_usage,USE_SYSTEMC_BODY))
+       {
+         _queue = new std::list<execute_queue_entry_t *>;
+       }
+
+     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
+#ifdef VHDL
+    if (usage_is_set(_usage,USE_VHDL))
+      {
+        _param_queue = new morpheo::behavioural::generic::queue::Parameters
+          (_param->_size_queue,
+           _param->_size_internal_queue,
+           0,
+           false,
+           false
+           );
+        
+        std::string queue_name = _name + "_queue";
+        _component_queue = new morpheo::behavioural::generic::queue::Queue
+          (queue_name.c_str()
+# ifdef STATISTICS
+           ,NULL
+# endif
+           ,_param_queue
+           ,USE_VHDL);
+        
+        _component->set_component(_component_queue->_component
+# ifdef POSITION
+                                  , 0, 0, 0, 0
+# endif
+                                  , INSTANCE_LIBRARY
+                                  );
+      }
+#endif
 
 #ifdef POSITION
-     if (usage_is_set(_usage,USE_POSITION))
-       _component->generate_file();
-#endif
-
+    if (usage_is_set(_usage,USE_POSITION))
+      _component->generate_file();
+#endif
+  
+#ifdef MODELSIM_COSIMULATION
+    if (usage_is_set(_usage,USE_COSIMULATION))
+      {
+        log_printf(INFO,Execute_queue,FUNCTION,_("<%s> : Create Wrapper"),_name.c_str());
+
+        _wrapper = new Wrapper_Execute_queue(_name.c_str(),"morpheo_behavioural","/dsk/l1/misc/Morpheo/work",_param);
+//      _wrapper = new Wrapper_Execute_queue(_name.c_str(),"morpheo_behavioural","work");
+
+        log_printf(INFO,Execute_queue,FUNCTION,_("<%s> : Wrapper Instanciation"),_name.c_str());
+
+//         INSTANCE0_FOREIGN_SIGNAL_CLOCK(_wrapper, in_CLOCK                                              , "in_CLOCK"                           ,1);
+//         INSTANCE0_FOREIGN_SIGNAL_IN   (_wrapper, in_NRESET                          ,Tcontrol_t        , "in_NRESET"                          ,1);
+                                                                                                                     
+//         INSTANCE0_FOREIGN_SIGNAL_IN   (_wrapper, in_EXECUTE_QUEUE_IN_VAL            ,Tcontrol_t        , "in_EXECUTE_QUEUE_IN_VAL"            ,1                                );
+//         INSTANCE0_FOREIGN_SIGNAL_OUT  (_wrapper,out_EXECUTE_QUEUE_IN_ACK            ,Tcontrol_t        ,"out_EXECUTE_QUEUE_IN_ACK"            ,1                                );
+//         INSTANCE0_FOREIGN_SIGNAL_IN   (_wrapper, in_EXECUTE_QUEUE_IN_CONTEXT_ID     ,Tcontext_t        , "in_EXECUTE_QUEUE_IN_CONTEXT_ID"     ,_param->_size_context_id         );
+//         INSTANCE0_FOREIGN_SIGNAL_IN   (_wrapper, in_EXECUTE_QUEUE_IN_FRONT_END_ID   ,Tcontext_t        , "in_EXECUTE_QUEUE_IN_FRONT_END_ID"   ,_param->_size_front_end_id       );
+//         INSTANCE0_FOREIGN_SIGNAL_IN   (_wrapper, in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID  ,Tcontext_t        , "in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID"  ,_param->_size_ooo_engine_id      );
+//         INSTANCE0_FOREIGN_SIGNAL_IN   (_wrapper, in_EXECUTE_QUEUE_IN_PACKET_ID      ,Tpacket_t         , "in_EXECUTE_QUEUE_IN_PACKET_ID"      ,_param->_size_rob_ptr            );
+// //      INSTANCE0_FOREIGN_SIGNAL_IN   (_wrapper, in_EXECUTE_QUEUE_IN_OPERATION      ,Toperation_t      , "in_EXECUTE_QUEUE_IN_OPERATION"      ,_param->_size_operation          );
+// //      INSTANCE0_FOREIGN_SIGNAL_IN   (_wrapper, in_EXECUTE_QUEUE_IN_TYPE           ,Ttype_t           , "in_EXECUTE_QUEUE_IN_TYPE"           ,_param->_size_type               );
+//         INSTANCE0_FOREIGN_SIGNAL_IN   (_wrapper, in_EXECUTE_QUEUE_IN_FLAGS          ,Tspecial_data_t   , "in_EXECUTE_QUEUE_IN_FLAGS"          ,_param->_size_special_data       );
+//         INSTANCE0_FOREIGN_SIGNAL_IN   (_wrapper, in_EXECUTE_QUEUE_IN_EXCEPTION      ,Texception_t      , "in_EXECUTE_QUEUE_IN_EXCEPTION"      ,_param->_size_exception          );
+//         INSTANCE0_FOREIGN_SIGNAL_IN   (_wrapper, in_EXECUTE_QUEUE_IN_NO_SEQUENCE    ,Tcontrol_t        , "in_EXECUTE_QUEUE_IN_NO_SEQUENCE"    ,1                                );
+//         INSTANCE0_FOREIGN_SIGNAL_IN   (_wrapper, in_EXECUTE_QUEUE_IN_ADDRESS        ,Taddress_t        , "in_EXECUTE_QUEUE_IN_ADDRESS"        ,_param->_size_instruction_address);
+//         INSTANCE0_FOREIGN_SIGNAL_IN   (_wrapper, in_EXECUTE_QUEUE_IN_DATA           ,Tgeneral_data_t   , "in_EXECUTE_QUEUE_IN_DATA"           ,_param->_size_general_data       );
+                                                                                                                     
+//         INSTANCE0_FOREIGN_SIGNAL_OUT  (_wrapper,out_EXECUTE_QUEUE_OUT_VAL           ,Tcontrol_t        ,"out_EXECUTE_QUEUE_OUT_VAL"           ,1                                );
+//         INSTANCE0_FOREIGN_SIGNAL_IN   (_wrapper, in_EXECUTE_QUEUE_OUT_ACK           ,Tcontrol_t        , "in_EXECUTE_QUEUE_OUT_ACK"           ,1                                );
+//         INSTANCE0_FOREIGN_SIGNAL_OUT  (_wrapper,out_EXECUTE_QUEUE_OUT_CONTEXT_ID    ,Tcontext_t        ,"out_EXECUTE_QUEUE_OUT_CONTEXT_ID"    ,_param->_size_context_id         );
+//         INSTANCE0_FOREIGN_SIGNAL_OUT  (_wrapper,out_EXECUTE_QUEUE_OUT_FRONT_END_ID  ,Tcontext_t        ,"out_EXECUTE_QUEUE_OUT_FRONT_END_ID"  ,_param->_size_front_end_id       );
+//         INSTANCE0_FOREIGN_SIGNAL_OUT  (_wrapper,out_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID ,Tcontext_t        ,"out_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID" ,_param->_size_ooo_engine_id      );
+//         INSTANCE0_FOREIGN_SIGNAL_OUT  (_wrapper,out_EXECUTE_QUEUE_OUT_PACKET_ID     ,Tpacket_t         ,"out_EXECUTE_QUEUE_OUT_PACKET_ID"     ,_param->_size_rob_ptr            );
+// //      INSTANCE0_FOREIGN_SIGNAL_OUT  (_wrapper,out_EXECUTE_QUEUE_OUT_OPERATION     ,Toperation_t      ,"out_EXECUTE_QUEUE_OUT_OPERATION"     ,_param->_size_operation          );
+// //      INSTANCE0_FOREIGN_SIGNAL_OUT  (_wrapper,out_EXECUTE_QUEUE_OUT_TYPE          ,Ttype_t           ,"out_EXECUTE_QUEUE_OUT_TYPE"          ,_param->_size_type               );
+//         INSTANCE0_FOREIGN_SIGNAL_OUT  (_wrapper,out_EXECUTE_QUEUE_OUT_FLAGS         ,Tspecial_data_t   ,"out_EXECUTE_QUEUE_OUT_FLAGS"         ,_param->_size_special_data       );
+//         INSTANCE0_FOREIGN_SIGNAL_OUT  (_wrapper,out_EXECUTE_QUEUE_OUT_EXCEPTION     ,Texception_t      ,"out_EXECUTE_QUEUE_OUT_EXCEPTION"     ,_param->_size_exception          );
+//         INSTANCE0_FOREIGN_SIGNAL_OUT  (_wrapper,out_EXECUTE_QUEUE_OUT_NO_SEQUENCE   ,Tcontrol_t        ,"out_EXECUTE_QUEUE_OUT_NO_SEQUENCE"   ,1                                );
+//         INSTANCE0_FOREIGN_SIGNAL_OUT  (_wrapper,out_EXECUTE_QUEUE_OUT_ADDRESS       ,Taddress_t        ,"out_EXECUTE_QUEUE_OUT_ADDRESS"       ,_param->_size_instruction_address);
+//         INSTANCE0_FOREIGN_SIGNAL_OUT  (_wrapper,out_EXECUTE_QUEUE_OUT_DATA          ,Tgeneral_data_t   ,"out_EXECUTE_QUEUE_OUT_DATA"          ,_param->_size_general_data       );
+
+        INSTANCE0_FOREIGN_SIGNAL(_wrapper, in_CLOCK                           ,Tcontrol_t     , "in_CLOCK"                           ,1);
+        INSTANCE0_FOREIGN_SIGNAL(_wrapper, in_NRESET                          ,Tcontrol_t     , "in_NRESET"                          ,1);
+                                                                                            
+        INSTANCE0_FOREIGN_SIGNAL(_wrapper, in_EXECUTE_QUEUE_IN_VAL            ,Tcontrol_t     , "in_EXECUTE_QUEUE_IN_VAL"            ,1                                );
+        INSTANCE0_FOREIGN_SIGNAL(_wrapper,out_EXECUTE_QUEUE_IN_ACK            ,Tcontrol_t     ,"out_EXECUTE_QUEUE_IN_ACK"            ,1                                );
+        INSTANCE0_FOREIGN_SIGNAL(_wrapper, in_EXECUTE_QUEUE_IN_CONTEXT_ID     ,Tcontext_t     , "in_EXECUTE_QUEUE_IN_CONTEXT_ID"     ,_param->_size_context_id         );
+        INSTANCE0_FOREIGN_SIGNAL(_wrapper, in_EXECUTE_QUEUE_IN_FRONT_END_ID   ,Tcontext_t     , "in_EXECUTE_QUEUE_IN_FRONT_END_ID"   ,_param->_size_front_end_id       );
+        INSTANCE0_FOREIGN_SIGNAL(_wrapper, in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID  ,Tcontext_t     , "in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID"  ,_param->_size_ooo_engine_id      );
+        INSTANCE0_FOREIGN_SIGNAL(_wrapper, in_EXECUTE_QUEUE_IN_PACKET_ID      ,Tpacket_t      , "in_EXECUTE_QUEUE_IN_PACKET_ID"      ,_param->_size_rob_ptr            );
+//      INSTANCE0_FOREIGN_SIGNAL(_wrapper, in_EXECUTE_QUEUE_IN_OPERATION      ,Toperation_t   , "in_EXECUTE_QUEUE_IN_OPERATION"      ,_param->_size_operation          );
+//      INSTANCE0_FOREIGN_SIGNAL(_wrapper, in_EXECUTE_QUEUE_IN_TYPE           ,Ttype_t        , "in_EXECUTE_QUEUE_IN_TYPE"           ,_param->_size_type               );
+        INSTANCE0_FOREIGN_SIGNAL(_wrapper, in_EXECUTE_QUEUE_IN_FLAGS          ,Tspecial_data_t, "in_EXECUTE_QUEUE_IN_FLAGS"          ,_param->_size_special_data       );
+        INSTANCE0_FOREIGN_SIGNAL(_wrapper, in_EXECUTE_QUEUE_IN_EXCEPTION      ,Texception_t   , "in_EXECUTE_QUEUE_IN_EXCEPTION"      ,_param->_size_exception          );
+        INSTANCE0_FOREIGN_SIGNAL(_wrapper, in_EXECUTE_QUEUE_IN_NO_SEQUENCE    ,Tcontrol_t     , "in_EXECUTE_QUEUE_IN_NO_SEQUENCE"    ,1                                );
+        INSTANCE0_FOREIGN_SIGNAL(_wrapper, in_EXECUTE_QUEUE_IN_ADDRESS        ,Taddress_t     , "in_EXECUTE_QUEUE_IN_ADDRESS"        ,_param->_size_instruction_address);
+        INSTANCE0_FOREIGN_SIGNAL(_wrapper, in_EXECUTE_QUEUE_IN_DATA           ,Tgeneral_data_t, "in_EXECUTE_QUEUE_IN_DATA"           ,_param->_size_general_data       );
+                                                                                            
+        INSTANCE0_FOREIGN_SIGNAL(_wrapper,out_EXECUTE_QUEUE_OUT_VAL           ,Tcontrol_t     ,"out_EXECUTE_QUEUE_OUT_VAL"           ,1                                );
+        INSTANCE0_FOREIGN_SIGNAL(_wrapper, in_EXECUTE_QUEUE_OUT_ACK           ,Tcontrol_t     , "in_EXECUTE_QUEUE_OUT_ACK"           ,1                                );
+        INSTANCE0_FOREIGN_SIGNAL(_wrapper,out_EXECUTE_QUEUE_OUT_CONTEXT_ID    ,Tcontext_t     ,"out_EXECUTE_QUEUE_OUT_CONTEXT_ID"    ,_param->_size_context_id         );
+        INSTANCE0_FOREIGN_SIGNAL(_wrapper,out_EXECUTE_QUEUE_OUT_FRONT_END_ID  ,Tcontext_t     ,"out_EXECUTE_QUEUE_OUT_FRONT_END_ID"  ,_param->_size_front_end_id       );
+        INSTANCE0_FOREIGN_SIGNAL(_wrapper,out_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID ,Tcontext_t     ,"out_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID" ,_param->_size_ooo_engine_id      );
+        INSTANCE0_FOREIGN_SIGNAL(_wrapper,out_EXECUTE_QUEUE_OUT_PACKET_ID     ,Tpacket_t      ,"out_EXECUTE_QUEUE_OUT_PACKET_ID"     ,_param->_size_rob_ptr            );
+//      INSTANCE0_FOREIGN_SIGNAL(_wrapper,out_EXECUTE_QUEUE_OUT_OPERATION     ,Toperation_t   ,"out_EXECUTE_QUEUE_OUT_OPERATION"     ,_param->_size_operation          );
+//      INSTANCE0_FOREIGN_SIGNAL(_wrapper,out_EXECUTE_QUEUE_OUT_TYPE          ,Ttype_t        ,"out_EXECUTE_QUEUE_OUT_TYPE"          ,_param->_size_type               );
+        INSTANCE0_FOREIGN_SIGNAL(_wrapper,out_EXECUTE_QUEUE_OUT_FLAGS         ,Tspecial_data_t,"out_EXECUTE_QUEUE_OUT_FLAGS"         ,_param->_size_special_data       );
+        INSTANCE0_FOREIGN_SIGNAL(_wrapper,out_EXECUTE_QUEUE_OUT_EXCEPTION     ,Texception_t   ,"out_EXECUTE_QUEUE_OUT_EXCEPTION"     ,_param->_size_exception          );
+        INSTANCE0_FOREIGN_SIGNAL(_wrapper,out_EXECUTE_QUEUE_OUT_NO_SEQUENCE   ,Tcontrol_t     ,"out_EXECUTE_QUEUE_OUT_NO_SEQUENCE"   ,1                                );
+        INSTANCE0_FOREIGN_SIGNAL(_wrapper,out_EXECUTE_QUEUE_OUT_ADDRESS       ,Taddress_t     ,"out_EXECUTE_QUEUE_OUT_ADDRESS"       ,_param->_size_instruction_address);
+        INSTANCE0_FOREIGN_SIGNAL(_wrapper,out_EXECUTE_QUEUE_OUT_DATA          ,Tgeneral_data_t,"out_EXECUTE_QUEUE_OUT_DATA"          ,_param->_size_general_data       );
+
+        log_printf(INFO,Execute_queue,FUNCTION,_("<%s> : Wrapper Instanciation end"),_name.c_str());
+      }
+#endif
+      
     log_printf(FUNC,Execute_queue,FUNCTION,"End");
   };
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue_deallocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue_deallocation.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue_deallocation.cpp	(revision 113)
@@ -25,5 +25,5 @@
     log_printf(FUNC,Execute_queue,FUNCTION,"Begin");
 
-    if (usage_is_set(_usage,USE_SYSTEMC))
+    if (usage_is_set(_usage,USE_SYSTEMC_INTERFACE))
       {
 	delete    in_CLOCK ;
@@ -60,12 +60,30 @@
 
     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
-    while (not _queue->empty())
+    if (usage_is_set(_usage,USE_SYSTEMC_BODY))
       {
-	delete _queue->front();
-	_queue->pop_front();
+        while (not _queue->empty())
+          {
+            delete _queue->front();
+            _queue->pop_front();
+          }
+        delete _queue;
       }
-    delete _queue;
 
     delete _component;
+
+#ifdef VHDL
+    if (usage_is_set(_usage,USE_VHDL))
+      {
+        delete _component_queue;
+        delete _param_queue;
+      }
+#endif
+
+#ifdef MODELSIM_COSIMULATION
+    if (usage_is_set(_usage,USE_COSIMULATION))
+      {
+        delete _wrapper;
+      }
+#endif
 
     log_printf(FUNC,Execute_queue,FUNCTION,"End");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue_statistics_declaration.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue_statistics_declaration.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue_statistics_declaration.cpp	(revision 113)
@@ -26,5 +26,5 @@
 
     _stat = new Stat (static_cast<std::string>(_name),
-		      "Execute_queue",
+		      _param->_type,
 		      param_statistics);
     
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue_vhdl.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue_vhdl.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue_vhdl.cpp	(revision 113)
@@ -9,5 +9,4 @@
 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Execute_queue.h"
 #include "Behavioural/include/Vhdl.h"
-#include "Behavioural/Generic/Queue/include/Queue.h"
 
 namespace morpheo                    {
@@ -23,38 +22,9 @@
 #undef  FUNCTION
 #define FUNCTION "Execute_queue::vhdl"
-  void Execute_queue::vhdl (void)
+  void Execute_queue::vhdl (void) 
   {
     log_printf(FUNC,Execute_queue,FUNCTION,"Begin");
 
-    //----- Queue -----
-   
-    morpheo::behavioural::generic::queue::Parameters * param_queue;
-    morpheo::behavioural::generic::queue::Queue      * queue;
-    
-    param_queue = new morpheo::behavioural::generic::queue::Parameters
-      (_param->_size_queue,
-       _param->_size_internal_queue,
-       0,
-       false,
-       false
-       );
-    
-    std::string queue_name = _name + "_queue";
-    queue = new morpheo::behavioural::generic::queue::Queue
-      (queue_name.c_str()
-#ifdef STATISTICS
-       ,NULL
-#endif
-       ,param_queue
-       ,USE_VHDL);
-    
-    _component->set_component(queue->_component
-#ifdef POSITION
-                              , 0, 0, 0, 0
-#endif
-                              , INSTANCE_LIBRARY
-                              );
-
-    Vhdl * vhdl = new Vhdl (_name);
+    Vhdl * vhdl = new Vhdl (_name,_param->id());
 
     _interfaces->set_port(vhdl);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue_vhdl_body.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue_vhdl_body.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Execute_queue_vhdl_body.cpp	(revision 113)
@@ -57,5 +57,5 @@
     size = _param->_size_context_id;
     max = min-1+size;
-    vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_CONTEXT_ID;");
+    vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_CONTEXT_ID "+std_logic_range(size)+";");
     min = max+1;
       }
@@ -64,5 +64,5 @@
     size = _param->_size_front_end_id;
     max = min-1+size;
-    vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_FRONT_END_ID;");
+    vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_FRONT_END_ID"+std_logic_range(size)+";");
     min = max+1;
       }
@@ -71,5 +71,5 @@
     size = _param->_size_ooo_engine_id;
     max = min-1+size;
-    vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID;");
+    vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID"+std_logic_range(size)+";");
     min = max+1;
       }
@@ -78,5 +78,5 @@
     size = _param->_size_rob_ptr;
     max = min-1+size;
-    vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_PACKET_ID;");
+    vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_PACKET_ID"+std_logic_range(size)+";");
     min = max+1;
       }
@@ -84,35 +84,35 @@
 //  size = _param->_size_operation;
 //  max = min-1+size;
-//  vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_OPERATION;");
+//  vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_OPERATION"+std_logic_range(size)+";");
 //  min = max+1;
 //
 //  size = _param->_size_type;
 //  max = min-1+size;
-//  vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_TYPE;");
+//  vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_TYPE"+std_logic_range(size)+";");
 //  min = max+1;
 
     size = _param->_size_special_data;
     max = min-1+size;
-    vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_FLAGS;");
+    vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_FLAGS"+std_logic_range(size)+";");
     min = max+1;
 
     size = _param->_size_exception;    
     max = min-1+size;
-    vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_EXCEPTION;");
+    vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_EXCEPTION"+std_logic_range(size)+";");
     min = max+1;
 
     size = 1;
     max = min-1+size;
-    vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_NO_SEQUENCE;");
+    vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_NO_SEQUENCE"+std_logic_range(size)+";");
     min = max+1;
 
     size = _param->_size_instruction_address;
     max = min-1+size;
-    vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_ADDRESS;");
+    vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_ADDRESS"+std_logic_range(size)+";");
     min = max+1;
 
     size = _param->_size_general_data;
     max = min-1+size;
-    vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_DATA;");
+    vhdl->set_body   (0,"internal_QUEUE_INSERT_DATA "+std_logic_range(_param->_size_internal_queue,max,min)+" <= in_EXECUTE_QUEUE_IN_DATA"+std_logic_range(size)+";");
     min = max+1;
     }
@@ -125,224 +125,25 @@
 
     if(_param->_have_port_context_id)
-    vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_CONTEXT_ID    <= internal_EXECUTE_QUEUE_OUT_CONTEXT_ID   ;");
+    vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_CONTEXT_ID    "+std_logic_range(_param->_size_context_id         )+" <= internal_EXECUTE_QUEUE_OUT_CONTEXT_ID   ;");
     if(_param->_have_port_front_end_id)
-    vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_FRONT_END_ID  <= internal_EXECUTE_QUEUE_OUT_FRONT_END_ID ;");
+    vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_FRONT_END_ID  "+std_logic_range(_param->_size_front_end_id       )+" <= internal_EXECUTE_QUEUE_OUT_FRONT_END_ID ;");
     if(_param->_have_port_ooo_engine_id)
-    vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID <= internal_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID;");
+    vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID "+std_logic_range(_param->_size_ooo_engine_id      )+" <= internal_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID;");
     if(_param->_have_port_rob_ptr)
-    vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_PACKET_ID     <= internal_EXECUTE_QUEUE_OUT_PACKET_ID    ;");
-//  vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_OPERATION     <= internal_EXECUTE_QUEUE_OUT_OPERATION    ;");
-//  vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_TYPE          <= internal_EXECUTE_QUEUE_OUT_TYPE         ;");
-    vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_FLAGS         <= internal_EXECUTE_QUEUE_OUT_FLAGS        ;");
-    vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_EXCEPTION     <= internal_EXECUTE_QUEUE_OUT_EXCEPTION    ;");
-    vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_NO_SEQUENCE   <= internal_EXECUTE_QUEUE_OUT_NO_SEQUENCE  ;");
-    vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_ADDRESS       <= internal_EXECUTE_QUEUE_OUT_ADDRESS      ;");
-    vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_DATA          <= internal_EXECUTE_QUEUE_OUT_DATA         ;");
+    vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_PACKET_ID     "+std_logic_range(_param->_size_rob_ptr            )+" <= internal_EXECUTE_QUEUE_OUT_PACKET_ID    ;");
+//  vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_OPERATION     "+std_logic_range(_param->_size_operation          )+" <= internal_EXECUTE_QUEUE_OUT_OPERATION    ;");
+//  vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_TYPE          "+std_logic_range(_param->_size_type               )+" <= internal_EXECUTE_QUEUE_OUT_TYPE         ;");
+    vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_FLAGS         "+std_logic_range(_param->_size_special_data       )+" <= internal_EXECUTE_QUEUE_OUT_FLAGS        ;");
+    vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_EXCEPTION     "+std_logic_range(_param->_size_exception          )+" <= internal_EXECUTE_QUEUE_OUT_EXCEPTION    ;");
+    vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_NO_SEQUENCE   "+std_logic_range(1                                )+" <= internal_EXECUTE_QUEUE_OUT_NO_SEQUENCE  ;");
+    vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_ADDRESS       "+std_logic_range(_param->_size_instruction_address)+" <= internal_EXECUTE_QUEUE_OUT_ADDRESS      ;");
+    vhdl->set_body   (0,"out_EXECUTE_QUEUE_OUT_DATA          "+std_logic_range(_param->_size_general_data       )+" <= internal_EXECUTE_QUEUE_OUT_DATA         ;");
 
-
-//     vhdl->set_body (0,"");
-//     vhdl->set_body (0,"process (in_CLOCK)");
-//     vhdl->set_body (0,"begin");
-//     vhdl->set_body (1,"if in_CLOCK'event and in_CLOCK = '1' then");
-// //     vhdl->set_body (2,"if in_NRESET = '0' then");
-// //     vhdl->set_body (3,"reg_CURRENT_STATE <= STATE_0;");
-// //     vhdl->set_body (2,"else");
-//     vhdl->set_body (3,"reg_CURRENT_STATE <= sig_NEXT_STATE;");
-// //     vhdl->set_body (2,"end if;");
-
-//     for (uint32_t i = 0; i <_param->_size_queue - 1; i++)
-//       {
-//      vhdl->set_body (2,"if sig_WEN_"+toString(i)+" = '1' then");
-//      vhdl->set_body (3,"if sig_SEL_"+toString(i)+" = '0' then");
-//      if (_param->_have_port_context_id)
-//      vhdl->set_body (4,"reg_CONTEXT_ID_"+toString(i)+"    <= in_EXECUTE_QUEUE_IN_CONTEXT_ID;");
-//      if (_param->_have_port_front_end_id)
-//      vhdl->set_body (4,"reg_FRONT_END_ID_"+toString(i)+"  <= in_EXECUTE_QUEUE_IN_FRONT_END_ID;");
-//      if (_param->_have_port_ooo_engine_id)
-//      vhdl->set_body (4,"reg_OOO_ENGINE_ID_"+toString(i)+" <= in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID;");
-//      if (_param->_have_port_rob_ptr)
-//         vhdl->set_body (4,"reg_PACKET_ID_"+toString(i)+"     <= in_EXECUTE_QUEUE_IN_PACKET_ID;");
-//      vhdl->set_body (4, "reg_FLAGS_"+toString(i)+"        <= in_EXECUTE_QUEUE_IN_FLAGS;");
-//      vhdl->set_body (4, "reg_EXCEPTION_"+toString(i)+"    <= in_EXECUTE_QUEUE_IN_EXCEPTION;");
-//      vhdl->set_body (4, "reg_NO_SEQUENCE_"+toString(i)+"  <= in_EXECUTE_QUEUE_IN_NO_SEQUENCE;");
-//      vhdl->set_body (4, "reg_ADDRESS_"+toString(i)+"      <= in_EXECUTE_QUEUE_IN_ADDRESS;");
-//      vhdl->set_body (4, "reg_DATA_"+toString(i)+"         <= in_EXECUTE_QUEUE_IN_DATA;");
-
-//      vhdl->set_body (3, "else");
-//      if (_param->_have_port_context_id)
-//      vhdl->set_body (4,"reg_CONTEXT_ID_"+toString(i)+"    <= reg_CONTEXT_ID_"+toString(i+1)+";");
-//      if (_param->_have_port_front_end_id)
-//      vhdl->set_body (4,"reg_FRONT_END_ID_"+toString(i)+"  <= reg_FRONT_END_ID_"+toString(i+1)+";");
-//      if (_param->_have_port_ooo_engine_id)
-//      vhdl->set_body (4,"reg_OOO_ENGINE_ID_"+toString(i)+" <= reg_OOO_ENGINE_ID_"+toString(i+1)+";");
-//      if (_param->_have_port_rob_ptr)
-//         vhdl->set_body (4,"reg_PACKET_ID_"+toString(i)+"     <= reg_PACKET_ID_"+toString(i+1)+";");
-//      vhdl->set_body (4, "reg_FLAGS_"+toString(i)+"        <= reg_FLAGS_"+toString(i+1)+";");
-//      vhdl->set_body (4, "reg_EXCEPTION_"+toString(i)+"    <= reg_EXCEPTION_"+toString(i+1)+";");
-//      vhdl->set_body (4, "reg_NO_SEQUENCE_"+toString(i)+"  <= reg_NO_SEQUENCE_"+toString(i+1)+";");
-//      vhdl->set_body (4, "reg_ADDRESS_"+toString(i)+"      <= reg_ADDRESS_"+toString(i+1)+";");
-//      vhdl->set_body (4, "reg_DATA_"+toString(i)+"         <= reg_DATA_"+toString(i+1)+";");
-        
-//      vhdl->set_body (3,"end if;");
-
-//      vhdl->set_body (2,"end if;");
-//       }
-
-//     vhdl->set_body (2,"if sig_WEN_"+toString(_param->_size_queue-1)+" = '1' then");
-//     if (_param->_have_port_context_id)
-//       vhdl->set_body (3,"reg_CONTEXT_ID_"+toString(_param->_size_queue-1)+"    <= in_EXECUTE_QUEUE_IN_CONTEXT_ID;");
-//     if (_param->_have_port_front_end_id)
-//       vhdl->set_body (3,"reg_FRONT_END_ID_"+toString(_param->_size_queue-1)+"  <= in_EXECUTE_QUEUE_IN_FRONT_END_ID;");
-//     if (_param->_have_port_ooo_engine_id)
-//       vhdl->set_body (3,"reg_OOO_ENGINE_ID_"+toString(_param->_size_queue-1)+" <= in_EXECUTE_QUEUE_IN_OOO_ENGINE_ID;");
-//     if (_param->_have_port_rob_ptr)
-//       vhdl->set_body (3,"reg_PACKET_ID_"+toString(_param->_size_queue-1)+"     <= in_EXECUTE_QUEUE_IN_PACKET_ID;");
-//     vhdl->set_body (3, "reg_FLAGS_"+toString(_param->_size_queue-1)+"        <= in_EXECUTE_QUEUE_IN_FLAGS;");
-//     vhdl->set_body (3, "reg_EXCEPTION_"+toString(_param->_size_queue-1)+"    <= in_EXECUTE_QUEUE_IN_EXCEPTION;");
-//     vhdl->set_body (3, "reg_NO_SEQUENCE_"+toString(_param->_size_queue-1)+"  <= in_EXECUTE_QUEUE_IN_NO_SEQUENCE;");
-//     vhdl->set_body (3, "reg_ADDRESS_"+toString(_param->_size_queue-1)+"      <= in_EXECUTE_QUEUE_IN_ADDRESS;");
-//     vhdl->set_body (3, "reg_DATA_"+toString(_param->_size_queue-1)+"         <= in_EXECUTE_QUEUE_IN_DATA;");
-//     vhdl->set_body (2,"end if;");
-
-
-//     vhdl->set_body (1,"end if;");
-//     vhdl->set_body (0,"end process;");
-
-
-//     vhdl->set_body (0,"");
-//     vhdl->set_body (0,"");
-//     vhdl->set_body (0,"");
-
-//     vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_VAL <= sig_OUT_VAL;");
-//     vhdl->set_body (0,"out_EXECUTE_QUEUE_IN_ACK <= sig_IN_ACK;");
-//     if (_param->_have_port_context_id)
-//     vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_CONTEXT_ID <= reg_CONTEXT_ID_0;");
-//     if (_param->_have_port_front_end_id)
-//     vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_FRONT_END_ID <= reg_FRONT_END_ID_0;");
-//     if (_param->_have_port_ooo_engine_id)
-//     vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_OOO_ENGINE_ID <= reg_OOO_ENGINE_ID_0;");
-//     if (_param->_have_port_rob_ptr)
-//     vhdl->set_body (0,"out_EXECUTE_QUEUE_OUT_PACKET_ID <= reg_PACKET_ID_0;");
-//     vhdl->set_body (0, "out_EXECUTE_QUEUE_OUT_FLAGS <= reg_FLAGS_0;");
-//     vhdl->set_body (0, "out_EXECUTE_QUEUE_OUT_EXCEPTION <= reg_EXCEPTION_0;");
-//     vhdl->set_body (0, "out_EXECUTE_QUEUE_OUT_NO_SEQUENCE <= reg_NO_SEQUENCE_0;");
-//     vhdl->set_body (0, "out_EXECUTE_QUEUE_OUT_ADDRESS <= reg_ADDRESS_0;");
-//     vhdl->set_body (0, "out_EXECUTE_QUEUE_OUT_DATA <= reg_DATA_0;");
-
-
-//     vhdl->set_body (0,"");
-
-//     vhdl->set_body (0,"process (reg_CURRENT_STATE, in_EXECUTE_QUEUE_OUT_ACK, in_EXECUTE_QUEUE_IN_VAL, in_NRESET)");
-//     vhdl->set_body (0,"begin");
-//     vhdl->set_body (1,"if in_NRESET = '0' then");
-//     vhdl->set_body (2,"sig_NEXT_STATE <= STATE_0;");
-//     vhdl->set_body (1,"else");
-//     vhdl->set_body (2,"case reg_CURRENT_STATE is");
-//     for (uint32_t i = 0; i <_param->_size_queue + 1; i++)
-//       {
-//      vhdl->set_body (3,"when STATE_"+toString(i)+" =>");
-//      if (i == 0)
-//        {
-//          vhdl->set_body (4,"if in_EXECUTE_QUEUE_IN_VAL = '1' then");
-//          vhdl->set_body (5,"sig_NEXT_STATE <= reg_CURRENT_STATE ("+toString(_param->_size_queue-1)+" downto 0) & '0';");
-//          vhdl->set_body (4,"else");
-//          vhdl->set_body (5,"sig_NEXT_STATE <= reg_CURRENT_STATE;");
-//          vhdl->set_body (4,"end if;");
-//          continue;
-//        }
-//      if (i == (_param->_size_queue))
-//        {
-//          vhdl->set_body (4,"if in_EXECUTE_QUEUE_OUT_ACK = '1' then");
-//          vhdl->set_body (5,"sig_NEXT_STATE <= '0' & reg_CURRENT_STATE ("+toString(_param->_size_queue)+" downto 1);");
-//          vhdl->set_body (4,"else");
-//          vhdl->set_body (5,"sig_NEXT_STATE <= reg_CURRENT_STATE;");
-//          vhdl->set_body (4,"end if;");
-//          continue;
-//        }
-//      vhdl->set_body (4,"if in_EXECUTE_QUEUE_IN_VAL = '1' and in_EXECUTE_QUEUE_OUT_ACK = '0' then");
-//      vhdl->set_body (5,"sig_NEXT_STATE <= reg_CURRENT_STATE ("+toString(_param->_size_queue-1)+" downto 0) & '0';");
-//      vhdl->set_body (4,"elsif in_EXECUTE_QUEUE_IN_VAL = '0' and in_EXECUTE_QUEUE_OUT_ACK = '1' then");
-//      vhdl->set_body (5,"sig_NEXT_STATE <= '0' & reg_CURRENT_STATE ("+toString(_param->_size_queue)+" downto 1);");
-//      vhdl->set_body (4,"else");
-//      vhdl->set_body (5,"sig_NEXT_STATE <= reg_CURRENT_STATE;");
-//      vhdl->set_body (4,"end if;");
-//       }
-//     vhdl->set_body (3,"when others => assert false report \"wrong state\" severity failure;");
-//     vhdl->set_body (2,"end case;");
-//     vhdl->set_body (1,"end if;");
-
-//     vhdl->set_body (2,"case reg_CURRENT_STATE is");
-//     for (uint32_t i = 0; i <_param->_size_queue + 1; i++)
-//       {
-//      vhdl->set_body (3,"when STATE_"+toString(i)+" =>");
-//      if (i == 0)
-//        {
-//          vhdl->set_body (4,"sig_OUT_VAL <= '0';");
-//          vhdl->set_body (4,"sig_IN_ACK <= '1';");
-//          for (uint32_t j = 0; j <_param->_size_queue; j++)
-//            {
-//              if (i == j)
-//                {
-//                  vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= '0';");
-//                  vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= in_EXECUTE_QUEUE_IN_VAL;");
-//                }
-//              else
-//                {
-//                  if (j < (_param->_size_queue - 1))
-//                    vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= '0';");
-//                  vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= '0';");
-//                }
-//            }
-//          continue;
-//        }
-//      if (i == (_param->_size_queue))
-//        {
-//          vhdl->set_body (4,"sig_OUT_VAL <= '1';");
-//          vhdl->set_body (4,"sig_IN_ACK <= '0';");
-//          for (uint32_t j = 0; j <_param->_size_queue; j++)
-//            {
-//              if (j == (i - 1))
-//                {
-//                  vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= '0';");
-//                }
-//              else
-//                {
-//                  vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= in_EXECUTE_QUEUE_OUT_ACK;");
-//                  vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= in_EXECUTE_QUEUE_OUT_ACK;");
-//                }
-//            }
-//          continue;
-//        }
-//      vhdl->set_body (4,"sig_OUT_VAL <= '1';");
-//      vhdl->set_body (4,"sig_IN_ACK <= '1';");
-//      for (uint32_t j = 0; j <_param->_size_queue; j++)
-//        {
-//          if (j < (i - 1))
-//            {
-//              vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= in_EXECUTE_QUEUE_OUT_ACK;");
-//              vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= in_EXECUTE_QUEUE_OUT_ACK;");
-//            }
-//          if (j == (i - 1))
-//            {
-//              vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= '0';");
-//              vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= in_EXECUTE_QUEUE_OUT_ACK and in_EXECUTE_QUEUE_IN_VAL;");
-//            }
-//          if (j == i)
-//            {
-//              if (j < (_param->_size_queue - 1))
-//                vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= '0';");
-//              vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= in_EXECUTE_QUEUE_IN_VAL and not in_EXECUTE_QUEUE_OUT_ACK;");
-//            }
-//          if (j > i)
-//            {
-//              if (j < (_param->_size_queue - 1))
-//                vhdl->set_body (4,"sig_SEL_"+toString(j)+" <= '0';");
-//              vhdl->set_body (4,"sig_WEN_"+toString(j)+" <= '0';");
-//            }
-//        }
-//       }
-//     vhdl->set_body (3,"when others =>");
-//     vhdl->set_body (2,"end case;");
-//     vhdl->set_body (0,"end process;");
+    vhdl->set_debug  ("in_CLOCK = 'U'","GLOP1: Clock = 'U'");
+    vhdl->set_debug  ("in_CLOCK = 'X'","GLOP2: Clock = 'X'");
+    vhdl->set_debug  ("in_CLOCK = 'Z'","GLOP3: Clock = 'Z'");
+    vhdl->set_debug  ("in_CLOCK = 'W'","GLOP4: Clock = 'W'");
+    vhdl->set_debug  ("in_CLOCK = '1'","KANE : Clock = '1'");
+    vhdl->set_debug  ("in_CLOCK = '0'","SETH : Clock = '0'");
 
     log_printf(FUNC,Execute_queue,FUNCTION,"End");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Parameters.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Parameters.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Parameters.cpp	(revision 113)
@@ -27,5 +27,6 @@
 			  uint32_t size_general_data  ,
 			  uint32_t size_special_data  ,
-                          bool     is_toplevel        )
+                          bool     is_toplevel        ):
+    behavioural::Parameters("Execute_queue")
   {
     log_printf(FUNC,Execute_queue,FUNCTION,"Begin");
@@ -57,18 +58,4 @@
         copy();
       }
-
-    _size_internal_queue = 
-      (_size_context_id          +
-       _size_front_end_id        +
-       _size_ooo_engine_id       +
-       _size_rob_ptr             +      
-//     _size_operation           +
-//     _size_type                +
-       _size_special_data        +
-       _size_exception           +
-       1                         +
-       _size_general_data        +
-       _size_general_data 
-       );
 
     log_printf(FUNC,Execute_queue,FUNCTION,"End");
@@ -114,4 +101,19 @@
   {
     log_printf(FUNC,Execute_queue,FUNCTION,"Begin");
+
+    _size_internal_queue = 
+      (_size_context_id          +
+       _size_front_end_id        +
+       _size_ooo_engine_id       +
+       _size_rob_ptr             +      
+//     _size_operation           +
+//     _size_type                +
+       _size_special_data        +
+       _size_exception           +
+       1                         +
+       _size_general_data        +
+       _size_general_data 
+       );
+
     log_printf(FUNC,Execute_queue,FUNCTION,"End");
   };
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Parameters_id.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Parameters_id.cpp	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/src/Parameters_id.cpp	(revision 113)
@@ -0,0 +1,46 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Parameters.h"
+
+namespace morpheo {
+namespace behavioural {
+namespace core {
+namespace multi_execute_loop {
+namespace execute_loop {
+namespace multi_write_unit {
+namespace write_unit {
+namespace execute_queue {
+
+#undef  FUNCTION
+#define FUNCTION "Parameters::get_id"
+  std::string Parameters::id (void) const
+  {
+    log_begin(Execute_queue,FUNCTION);
+
+    std::string _return = 
+      (toString(_size_queue       ) +"_"+
+       toString(_nb_context       ) +"_"+
+       toString(_nb_front_end     ) +"_"+
+       toString(_nb_ooo_engine    ) +"_"+
+       toString(_nb_packet        ) +"_"+
+       toString(_size_general_data) +"_"+
+       toString(_size_special_data) );
+
+    log_end(Execute_queue,FUNCTION);
+
+    return _return;
+  };
+
+}; // end namespace execute_queue
+}; // end namespace write_unit
+}; // end namespace multi_write_unit
+}; // end namespace execute_loop
+}; // end namespace multi_execute_loop
+}; // end namespace core
+}; // end namespace behavioural
+}; // end namespace morpheo              
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Write_unit
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/SelfTest/include/test.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/SelfTest/include/test.h	(revision 112)
+++ 	(revision )
@@ -1,31 +1,0 @@
-/*
- * $Id$
- *
- * [ Description ]
- * 
- * Test "RegisterFile"
- */
-
-#ifdef SYSTEMC
-#include "systemc.h"
-#endif
-
-#include <string>
-#include <iostream>
-#include <sys/time.h>
-
-#include "Common/include/Time.h"
-#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/include/Write_unit.h"
-
-using namespace std;
-using namespace morpheo;
-using namespace morpheo::behavioural;
-using namespace morpheo::behavioural::core;
-using namespace morpheo::behavioural::core::multi_execute_loop;
-using namespace morpheo::behavioural::core::multi_execute_loop::execute_loop;
-using namespace morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit;
-
-using namespace morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit;
-
-void test    (string name,
-	      morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::Parameters * param);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/SelfTest/include/top.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/SelfTest/include/top.h	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/SelfTest/include/top.h	(revision 113)
@@ -0,0 +1,115 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ * Test "Write_unit"
+ */
+
+#ifdef SYSTEMC
+#include "systemc.h"
+#endif
+
+#define NB_ITERATION  1
+#define CYCLE_MAX     (2048*NB_ITERATION)
+
+#include "Common/include/Test.h"
+#include "Common/include/Time.h"
+#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/include/Write_unit.h"
+
+using namespace std;
+using namespace morpheo;
+using namespace morpheo::behavioural;
+using namespace morpheo::behavioural::core;
+using namespace morpheo::behavioural::core::multi_execute_loop;
+using namespace morpheo::behavioural::core::multi_execute_loop::execute_loop;
+using namespace morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit;
+
+using namespace morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit;
+
+SC_MODULE(top)
+{
+#ifdef SYSTEMC
+ private: sc_clock               *  in_CLOCK ;
+ private: sc_signal<Tcontrol_t>  *  in_NRESET;
+
+  private: sc_signal<Tcontrol_t        >    *  in_WRITE_UNIT_IN_VAL          ;
+  private: sc_signal<Tcontrol_t        >    * out_WRITE_UNIT_IN_ACK          ;
+  private: sc_signal<Tcontext_t        >    *  in_WRITE_UNIT_IN_CONTEXT_ID   ;
+  private: sc_signal<Tcontext_t        >    *  in_WRITE_UNIT_IN_FRONT_END_ID ;
+  private: sc_signal<Tcontext_t        >    *  in_WRITE_UNIT_IN_OOO_ENGINE_ID;
+  private: sc_signal<Tpacket_t         >    *  in_WRITE_UNIT_IN_PACKET_ID    ;
+//private: sc_signal<Toperation_t      >    *  in_WRITE_UNIT_IN_OPERATION    ;
+//private: sc_signal<Ttype_t           >    *  in_WRITE_UNIT_IN_TYPE         ;
+  private: sc_signal<Tcontrol_t        >    *  in_WRITE_UNIT_IN_WRITE_RD     ;
+  private: sc_signal<Tgeneral_address_t>    *  in_WRITE_UNIT_IN_NUM_REG_RD   ;
+  private: sc_signal<Tgeneral_data_t   >    *  in_WRITE_UNIT_IN_DATA_RD      ;
+  private: sc_signal<Tcontrol_t        >    *  in_WRITE_UNIT_IN_WRITE_RE     ;
+  private: sc_signal<Tspecial_address_t>    *  in_WRITE_UNIT_IN_NUM_REG_RE   ;
+  private: sc_signal<Tspecial_data_t   >    *  in_WRITE_UNIT_IN_DATA_RE      ;
+  private: sc_signal<Texception_t      >    *  in_WRITE_UNIT_IN_EXCEPTION    ;
+  private: sc_signal<Tcontrol_t        >    *  in_WRITE_UNIT_IN_NO_SEQUENCE  ;
+  private: sc_signal<Taddress_t        >    *  in_WRITE_UNIT_IN_ADDRESS      ;
+
+  private: sc_signal<Tcontrol_t        >    * out_WRITE_UNIT_OUT_VAL          ;
+  private: sc_signal<Tcontrol_t        >    *  in_WRITE_UNIT_OUT_ACK          ;
+  private: sc_signal<Tcontext_t        >    * out_WRITE_UNIT_OUT_CONTEXT_ID   ;
+  private: sc_signal<Tcontext_t        >    * out_WRITE_UNIT_OUT_FRONT_END_ID ;
+  private: sc_signal<Tcontext_t        >    * out_WRITE_UNIT_OUT_OOO_ENGINE_ID;
+  private: sc_signal<Tpacket_t         >    * out_WRITE_UNIT_OUT_PACKET_ID    ;
+//private: sc_signal<Toperation_t      >    * out_WRITE_UNIT_OUT_OPERATION    ;
+//private: sc_signal<Ttype_t           >    * out_WRITE_UNIT_OUT_TYPE         ;
+  private: sc_signal<Tspecial_data_t   >    * out_WRITE_UNIT_OUT_FLAGS        ;
+  private: sc_signal<Texception_t      >    * out_WRITE_UNIT_OUT_EXCEPTION    ;
+  private: sc_signal<Tcontrol_t        >    * out_WRITE_UNIT_OUT_NO_SEQUENCE  ;
+  private: sc_signal<Taddress_t        >    * out_WRITE_UNIT_OUT_ADDRESS      ;
+  private: sc_signal<Tgeneral_data_t   >    * out_WRITE_UNIT_OUT_DATA         ;
+
+  private: sc_signal<Tcontrol_t        >   ** out_GPR_WRITE_VAL               ;
+  private: sc_signal<Tcontrol_t        >   **  in_GPR_WRITE_ACK               ;
+  private: sc_signal<Tcontext_t        >   ** out_GPR_WRITE_OOO_ENGINE_ID     ;
+  private: sc_signal<Tgeneral_address_t>   ** out_GPR_WRITE_NUM_REG           ;
+  private: sc_signal<Tgeneral_data_t   >   ** out_GPR_WRITE_DATA              ;
+
+  private: sc_signal<Tcontrol_t        >   ** out_SPR_WRITE_VAL               ;
+  private: sc_signal<Tcontrol_t        >   **  in_SPR_WRITE_ACK               ;
+  private: sc_signal<Tcontext_t        >   ** out_SPR_WRITE_OOO_ENGINE_ID     ;
+  private: sc_signal<Tspecial_address_t>   ** out_SPR_WRITE_NUM_REG           ;
+  private: sc_signal<Tspecial_data_t   >   ** out_SPR_WRITE_DATA              ;
+
+  private: sc_signal<Tcontext_t        >   ** out_BYPASS_WRITE_OOO_ENGINE_ID ;
+  private: sc_signal<Tcontrol_t        >   ** out_BYPASS_WRITE_GPR_VAL       ;
+  private: sc_signal<Tgeneral_address_t>   ** out_BYPASS_WRITE_GPR_NUM_REG   ; // RD
+  private: sc_signal<Tgeneral_data_t   >   ** out_BYPASS_WRITE_GPR_DATA      ;
+  private: sc_signal<Tcontrol_t        >   ** out_BYPASS_WRITE_SPR_VAL       ;
+  private: sc_signal<Tspecial_address_t>   ** out_BYPASS_WRITE_SPR_NUM_REG   ; // RE
+  private: sc_signal<Tspecial_data_t   >   ** out_BYPASS_WRITE_SPR_DATA      ;
+#endif
+
+ private: std::string name;
+ private: Tusage_t _usage;
+ private: morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::Parameters * _param;
+#ifdef STATISTICS
+ private: morpheo::behavioural::Parameters_Statistics * _param_stat;
+#endif
+ private: Write_unit * component;
+
+ private: void usage
+    (
+#ifdef MTI_SYSTEMC
+     int argc, const char * const * argv
+#else
+     int argc, char * argv[]
+#endif
+     );
+ private: void allocation   (void);
+ private: void deallocation (void);
+ public : void test         (void);
+
+#ifdef MTI_SYSTEMC
+  SC_CTOR(top::top);
+#else
+ public : top (sc_module_name module_name,int argc, char * argv[]);
+#endif
+ public : ~top(void);
+};
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/SelfTest/src/main.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/SelfTest/src/main.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/SelfTest/src/main.cpp	(revision 113)
@@ -6,84 +6,43 @@
  */
 
-#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/SelfTest/include/test.h"
+#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/SelfTest/include/top.h"
 
-#define NB_PARAMS 11
-
-void usage (int argc, char * argv[])
+#ifndef MTI_SYSTEMC
+# ifndef SYSTEMC
+int main    (int argc, char * argv[])
+# else
+int sc_main (int argc, char * argv[])
+# endif
 {
-  err (_("<Usage> %s name_instance list_params.\n"),argv[0]);
-  err (_("list_params is :\n"));
-  err (_(" * size_write_queue    (uint32_t)\n"));
-  err (_(" * size_execute_queue  (uint32_t)\n"));
-  err (_(" * nb_context          (uint32_t)\n"));
-  err (_(" * nb_front_end        (uint32_t)\n"));
-  err (_(" * nb_ooo_engine       (uint32_t)\n"));
-  err (_(" * nb_packet           (uint32_t)\n"));
-  err (_(" * size_general_data   (uint32_t)\n"));
-  err (_(" * nb_general_register (uint32_t)\n"));
-  err (_(" * size_special_data   (uint32_t)\n"));
-  err (_(" * nb_special_register (uint32_t)\n"));
-  err (_(" * nb_bypass_write     (uint32_t)\n"));
-
-  exit (1);
-}
-
-#ifndef SYSTEMC
-int main    (int argc, char * argv[])
-#else
-int sc_main (int argc, char * argv[])
-#endif
-{
-  if (argc != 2+NB_PARAMS)
-    usage (argc, argv);
-
-  uint32_t       x = 1;
-
-  const string   name                =      argv[x++];
-  const uint32_t size_write_queue    = atoi(argv[x++]);
-  const uint32_t size_execute_queue  = atoi(argv[x++]);
-  const uint32_t nb_context          = atoi(argv[x++]);
-  const uint32_t nb_front_end        = atoi(argv[x++]);
-  const uint32_t nb_ooo_engine       = atoi(argv[x++]);
-  const uint32_t nb_packet           = atoi(argv[x++]);
-  const uint32_t size_general_data   = atoi(argv[x++]);
-  const uint32_t nb_general_register = atoi(argv[x++]);
-  const uint32_t size_special_data   = atoi(argv[x++]);
-  const uint32_t nb_special_register = atoi(argv[x++]);
-  const uint32_t nb_bypass_write     = atoi(argv[x++]);
+  int _return = EXIT_SUCCESS;
 
   try 
     {
-      morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::Parameters * param = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::Parameters
-	(size_write_queue   ,
-	 size_execute_queue ,
-	 nb_context         ,
-	 nb_front_end       ,
-	 nb_ooo_engine      ,
-	 nb_packet          ,
-	 size_general_data  ,
-	 nb_general_register,
-	 size_special_data  ,
-	 nb_special_register,
-	 nb_bypass_write    ,
-         true // is_toplevel
-         );
-      
-      msg(_("%s"),param->print(1).c_str());
-      
-      test (name,param);
+      top * my_top = new top ("my_top",argc,argv);
+
+      my_top->test();
+
+      delete my_top;
     }
   catch (morpheo::ErrorMorpheo & error)
     {
-      msg (_("<%s> : %s.\n"),name.c_str(), error.what ());
-      exit (EXIT_FAILURE);
+      msgError(_("%s\n"),error.what ());
+      _return = EXIT_FAILURE;
     }
-  catch (...)
+  
+  try 
     {
-      err (_("<%s> : This test must generate a error.\n"),name.c_str());
-      exit (EXIT_FAILURE);
+      if (_return == EXIT_SUCCESS)
+	TEST_OK("Write_unit : no error");
+      else
+	TEST_KO("Write_unit : a lot of error");
+    }
+  catch (morpheo::ErrorMorpheo & error)
+    {
+//    msgError(_("<%s> :\n%s"),name.c_str(), error.what ());
+      _return = EXIT_FAILURE;
     }
 
-  return (EXIT_SUCCESS);
+  return _return;
 }
-
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/SelfTest/src/top.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/SelfTest/src/top.cpp	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/SelfTest/src/top.cpp	(revision 113)
@@ -0,0 +1,91 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/SelfTest/include/top.h"
+#include "Behavioural/include/Selftest.h"
+
+#define NB_PARAMS 11
+
+#ifdef MTI_SYSTEMC
+SC_MODULE_EXPORT(top);
+#endif
+
+#ifdef MTI_SYSTEMC
+SC_CTOR(top::top)
+#else
+top::top (sc_module_name module_name, int argc, char * argv[])
+#endif
+{
+#ifdef MTI_SYSTEMC
+  // accessing command-line arguments with modelsim
+  int argc;
+  const char * const * argv;
+
+  argc = sc_argc ();
+  argv = sc_argv ();
+#endif
+
+  if (argc != 2+NB_PARAMS)
+    usage (argc, argv);
+
+  uint32_t x=1;
+
+  uint32_t size_write_queue    ;
+  uint32_t size_execute_queue  ;
+  uint32_t nb_context          ;
+  uint32_t nb_front_end        ;
+  uint32_t nb_ooo_engine       ;
+  uint32_t nb_packet           ;
+  uint32_t size_general_data   ;
+  uint32_t nb_general_register ;
+  uint32_t size_special_data   ;
+  uint32_t nb_special_register ;
+  uint32_t nb_bypass_write     ;
+
+  SELFTEST0(name,string,argv,x);
+  SELFTEST0(size_write_queue    ,uint32_t,argv,x);
+  SELFTEST0(size_execute_queue  ,uint32_t,argv,x);
+  SELFTEST0(nb_context          ,uint32_t,argv,x);
+  SELFTEST0(nb_front_end        ,uint32_t,argv,x);
+  SELFTEST0(nb_ooo_engine       ,uint32_t,argv,x);
+  SELFTEST0(nb_packet           ,uint32_t,argv,x);
+  SELFTEST0(size_general_data   ,uint32_t,argv,x);
+  SELFTEST0(nb_general_register ,uint32_t,argv,x);
+  SELFTEST0(size_special_data   ,uint32_t,argv,x);
+  SELFTEST0(nb_special_register ,uint32_t,argv,x);
+  SELFTEST0(nb_bypass_write     ,uint32_t,argv,x);
+
+  _param = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::Parameters
+    (size_write_queue   ,
+     size_execute_queue ,
+     nb_context         ,
+     nb_front_end       ,
+     nb_ooo_engine      ,
+     nb_packet          ,
+     size_general_data  ,
+     nb_general_register,
+     size_special_data  ,
+     nb_special_register,
+     nb_bypass_write    ,
+     true
+     );
+  
+  // msg(_("%s"),_param.print(0).c_str());
+  
+  // Allocation component
+  allocation ();
+  
+#ifdef MTI_SYSTEMC
+  SC_THREAD(test);
+#endif
+}
+
+top::~top (void)
+{
+  deallocation ();
+  delete _param;
+}
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/SelfTest/src/top_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/SelfTest/src/top_allocation.cpp	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/SelfTest/src/top_allocation.cpp	(revision 113)
@@ -0,0 +1,198 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ * Test
+ */
+
+#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/SelfTest/include/top.h"
+#include "Behavioural/include/Allocation.h"
+#include "Behavioural/include/Simulation.h"
+
+void top::allocation (void)
+{
+  if (setlocale (LC_ALL, "") == NULL)
+    msgWarning(_("setlocale ko.\n"));
+
+  try 
+    {
+      _param->test();
+    }
+  catch (morpheo::ErrorMorpheo & error)
+    {
+      msgError(_("<%s> : %s"),name.c_str(),error.what());
+      return;
+    }
+  catch (...)
+    {
+      msgError(_("<%s> : This test must generate a error"),name.c_str());
+      exit (EXIT_FAILURE);
+    }
+
+  _usage = USE_ALL;
+//   _usage = usage_unset(_usage,USE_SYSTEMC              );
+//   _usage = usage_unset(_usage,USE_VHDL                 );
+//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
+//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
+//   _usage = usage_unset(_usage,USE_POSITION             );
+//   _usage = usage_unset(_usage,USE_STATISTICS           );
+//   _usage = usage_unset(_usage,USE_INFORMATION          );
+
+  _model.set_model("Write_unit"   ,MODEL_SYSTEMC, DEBUG_NONE);
+  _model.set_model("Write_queue"  ,MODEL_SYSTEMC, DEBUG_NONE);
+  _model.set_model("Execute_queue",MODEL_VHDL   , DEBUG_NONE);
+  _model.print();
+
+#ifdef STATISTICS
+  if (usage_is_set(_usage,USE_STATISTICS))
+  _param_stat = new morpheo::behavioural::Parameters_Statistics (5,CYCLE_MAX);
+#endif
+
+  try 
+    {
+      component = new Write_unit 
+        (name.c_str(),
+#ifdef STATISTICS
+         _param_stat,
+#endif
+         _param,
+         _usage
+         );
+    }
+  catch (morpheo::ErrorMorpheo & error)
+    {
+      msgError(_("<%s> : %s"),name.c_str(),error.what());
+      throw error;
+    }
+  
+#ifdef SYSTEMC
+  if (usage_is_set(_usage,USE_SYSTEMC))
+    {
+  /*********************************************************************
+   * Déclarations des signaux
+   *********************************************************************/
+  msgInformation(_("<%s> : Create signal.\n"),name.c_str());
+
+  in_CLOCK  = new sc_clock ("clock", TIME_PERIOD, TIME_UNIT, 0.5); //name,period,time_unit,duty_cycle
+
+  ALLOC0_SC_SIGNAL( in_NRESET        ," in_NRESET        ",Tcontrol_t);
+
+  ALLOC0_SC_SIGNAL( in_WRITE_UNIT_IN_VAL           ," in_WRITE_UNIT_IN_VAL"           , Tcontrol_t        );
+  ALLOC0_SC_SIGNAL(out_WRITE_UNIT_IN_ACK           ,"out_WRITE_UNIT_IN_ACK"           , Tcontrol_t        );
+  ALLOC0_SC_SIGNAL( in_WRITE_UNIT_IN_CONTEXT_ID    ," in_WRITE_UNIT_IN_CONTEXT_ID"    , Tcontext_t        );
+  ALLOC0_SC_SIGNAL( in_WRITE_UNIT_IN_FRONT_END_ID  ," in_WRITE_UNIT_IN_FRONT_END_ID"  , Tcontext_t        );
+  ALLOC0_SC_SIGNAL( in_WRITE_UNIT_IN_OOO_ENGINE_ID ," in_WRITE_UNIT_IN_OOO_ENGINE_ID" , Tcontext_t        );
+  ALLOC0_SC_SIGNAL( in_WRITE_UNIT_IN_PACKET_ID     ," in_WRITE_UNIT_IN_PACKET_ID"     , Tpacket_t         );
+//ALLOC0_SC_SIGNAL( in_WRITE_UNIT_IN_OPERATION     ," in_WRITE_UNIT_IN_OPERATION"     , Toperation_t      );
+//ALLOC0_SC_SIGNAL( in_WRITE_UNIT_IN_TYPE          ," in_WRITE_UNIT_IN_TYPE"          , Ttype_t           );
+  ALLOC0_SC_SIGNAL( in_WRITE_UNIT_IN_WRITE_RD      ," in_WRITE_UNIT_IN_WRITE_RD"      , Tcontrol_t        );
+  ALLOC0_SC_SIGNAL( in_WRITE_UNIT_IN_NUM_REG_RD    ," in_WRITE_UNIT_IN_NUM_REG_RD"    , Tgeneral_address_t);
+  ALLOC0_SC_SIGNAL( in_WRITE_UNIT_IN_DATA_RD       ," in_WRITE_UNIT_IN_DATA_RD"       , Tgeneral_data_t   );
+  ALLOC0_SC_SIGNAL( in_WRITE_UNIT_IN_WRITE_RE      ," in_WRITE_UNIT_IN_WRITE_RE"      , Tcontrol_t        );
+  ALLOC0_SC_SIGNAL( in_WRITE_UNIT_IN_NUM_REG_RE    ," in_WRITE_UNIT_IN_NUM_REG_RE"    , Tspecial_address_t);
+  ALLOC0_SC_SIGNAL( in_WRITE_UNIT_IN_DATA_RE       ," in_WRITE_UNIT_IN_DATA_RE"       , Tspecial_data_t   );
+  ALLOC0_SC_SIGNAL( in_WRITE_UNIT_IN_EXCEPTION     ," in_WRITE_UNIT_IN_EXCEPTION"     , Texception_t      );
+  ALLOC0_SC_SIGNAL( in_WRITE_UNIT_IN_NO_SEQUENCE   ," in_WRITE_UNIT_IN_NO_SEQUENCE"   , Tcontrol_t        );
+  ALLOC0_SC_SIGNAL( in_WRITE_UNIT_IN_ADDRESS       ," in_WRITE_UNIT_IN_ADDRESS"       , Taddress_t        );
+  ALLOC0_SC_SIGNAL(out_WRITE_UNIT_OUT_VAL          ,"out_WRITE_UNIT_OUT_VAL"          , Tcontrol_t        );
+  ALLOC0_SC_SIGNAL( in_WRITE_UNIT_OUT_ACK          ," in_WRITE_UNIT_OUT_ACK"          , Tcontrol_t        );
+  ALLOC0_SC_SIGNAL(out_WRITE_UNIT_OUT_CONTEXT_ID   ,"out_WRITE_UNIT_OUT_CONTEXT_ID"   , Tcontext_t        );
+  ALLOC0_SC_SIGNAL(out_WRITE_UNIT_OUT_FRONT_END_ID ,"out_WRITE_UNIT_OUT_FRONT_END_ID" , Tcontext_t        );
+  ALLOC0_SC_SIGNAL(out_WRITE_UNIT_OUT_OOO_ENGINE_ID,"out_WRITE_UNIT_OUT_OOO_ENGINE_ID", Tcontext_t        );
+  ALLOC0_SC_SIGNAL(out_WRITE_UNIT_OUT_PACKET_ID    ,"out_WRITE_UNIT_OUT_PACKET_ID"    , Tpacket_t         );
+//ALLOC0_SC_SIGNAL(out_WRITE_UNIT_OUT_OPERATION    ,"out_WRITE_UNIT_OUT_OPERATION"    , Toperation_t      );
+//ALLOC0_SC_SIGNAL(out_WRITE_UNIT_OUT_TYPE         ,"out_WRITE_UNIT_OUT_TYPE"         , Ttype_t           );
+  ALLOC0_SC_SIGNAL(out_WRITE_UNIT_OUT_FLAGS        ,"out_WRITE_UNIT_OUT_FLAGS"        , Tspecial_data_t   );
+  ALLOC0_SC_SIGNAL(out_WRITE_UNIT_OUT_EXCEPTION    ,"out_WRITE_UNIT_OUT_EXCEPTION"    , Texception_t      );
+  ALLOC0_SC_SIGNAL(out_WRITE_UNIT_OUT_NO_SEQUENCE  ,"out_WRITE_UNIT_OUT_NO_SEQUENCE"  , Tcontrol_t        );
+  ALLOC0_SC_SIGNAL(out_WRITE_UNIT_OUT_ADDRESS      ,"out_WRITE_UNIT_OUT_ADDRESS"      , Taddress_t        );
+  ALLOC0_SC_SIGNAL(out_WRITE_UNIT_OUT_DATA         ,"out_WRITE_UNIT_OUT_DATA"         , Tgeneral_data_t   );
+  ALLOC1_SC_SIGNAL(out_GPR_WRITE_VAL                ,"out_GPR_WRITE_VAL"                , Tcontrol_t        , _param->_nb_gpr_write);
+  ALLOC1_SC_SIGNAL( in_GPR_WRITE_ACK                ," in_GPR_WRITE_ACK"                , Tcontrol_t        , _param->_nb_gpr_write);
+  ALLOC1_SC_SIGNAL(out_GPR_WRITE_OOO_ENGINE_ID      ,"out_GPR_WRITE_OOO_ENGINE_ID"      , Tcontext_t        , _param->_nb_gpr_write);
+  ALLOC1_SC_SIGNAL(out_GPR_WRITE_NUM_REG            ,"out_GPR_WRITE_NUM_REG"            , Tgeneral_address_t, _param->_nb_gpr_write);
+  ALLOC1_SC_SIGNAL(out_GPR_WRITE_DATA               ,"out_GPR_WRITE_DATA"               , Tgeneral_data_t   , _param->_nb_gpr_write);
+  ALLOC1_SC_SIGNAL(out_SPR_WRITE_VAL                ,"out_SPR_WRITE_VAL"                , Tcontrol_t        , _param->_nb_spr_write);
+  ALLOC1_SC_SIGNAL( in_SPR_WRITE_ACK                ," in_SPR_WRITE_ACK"                , Tcontrol_t        , _param->_nb_spr_write);
+  ALLOC1_SC_SIGNAL(out_SPR_WRITE_OOO_ENGINE_ID      ,"out_SPR_WRITE_OOO_ENGINE_ID"      , Tcontext_t        , _param->_nb_spr_write);
+  ALLOC1_SC_SIGNAL(out_SPR_WRITE_NUM_REG            ,"out_SPR_WRITE_NUM_REG"            , Tspecial_address_t, _param->_nb_spr_write);
+  ALLOC1_SC_SIGNAL(out_SPR_WRITE_DATA               ,"out_SPR_WRITE_DATA"               , Tspecial_data_t   , _param->_nb_spr_write);
+  ALLOC1_SC_SIGNAL(out_BYPASS_WRITE_OOO_ENGINE_ID   ,"out_BYPASS_WRITE_OOO_ENGINE_ID"   , Tcontext_t        , _param->_nb_bypass_write);
+  ALLOC1_SC_SIGNAL(out_BYPASS_WRITE_GPR_VAL         ,"out_BYPASS_WRITE_GPR_VAL"         , Tcontrol_t        , _param->_nb_bypass_write);
+  ALLOC1_SC_SIGNAL(out_BYPASS_WRITE_GPR_NUM_REG     ,"out_BYPASS_WRITE_GPR_NUM_REG"     , Tgeneral_address_t, _param->_nb_bypass_write);
+  ALLOC1_SC_SIGNAL(out_BYPASS_WRITE_GPR_DATA        ,"out_BYPASS_WRITE_GPR_DATA"        , Tgeneral_data_t   , _param->_nb_bypass_write);
+  ALLOC1_SC_SIGNAL(out_BYPASS_WRITE_SPR_VAL         ,"out_BYPASS_WRITE_SPR_VAL"         , Tcontrol_t        , _param->_nb_bypass_write);
+  ALLOC1_SC_SIGNAL(out_BYPASS_WRITE_SPR_NUM_REG     ,"out_BYPASS_WRITE_SPR_NUM_REG"     , Tspecial_address_t, _param->_nb_bypass_write);
+  ALLOC1_SC_SIGNAL(out_BYPASS_WRITE_SPR_DATA        ,"out_BYPASS_WRITE_SPR_DATA"        , Tspecial_data_t   , _param->_nb_bypass_write);
+  
+  /********************************************************
+   * Instanciation
+   ********************************************************/
+  
+  msgInformation(_("<%s> : Instanciation of _Write_unit.\n"),name.c_str());
+
+  INSTANCE0_SC_SIGNAL(component, in_CLOCK         );
+  INSTANCE0_SC_SIGNAL(component, in_NRESET        );
+
+  INSTANCE0_SC_SIGNAL(component,  in_WRITE_UNIT_IN_VAL           );
+  INSTANCE0_SC_SIGNAL(component, out_WRITE_UNIT_IN_ACK           );
+  if (_param->_have_port_context_id)
+  INSTANCE0_SC_SIGNAL(component,  in_WRITE_UNIT_IN_CONTEXT_ID    );
+  if (_param->_have_port_front_end_id)
+  INSTANCE0_SC_SIGNAL(component,  in_WRITE_UNIT_IN_FRONT_END_ID  );
+  if (_param->_have_port_ooo_engine_id)
+  INSTANCE0_SC_SIGNAL(component,  in_WRITE_UNIT_IN_OOO_ENGINE_ID );
+  if (_param->_have_port_rob_ptr)
+  INSTANCE0_SC_SIGNAL(component,  in_WRITE_UNIT_IN_PACKET_ID     );
+//INSTANCE0_SC_SIGNAL(component,  in_WRITE_UNIT_IN_OPERATION     );
+//INSTANCE0_SC_SIGNAL(component,  in_WRITE_UNIT_IN_TYPE          );
+  INSTANCE0_SC_SIGNAL(component,  in_WRITE_UNIT_IN_WRITE_RD      );
+  INSTANCE0_SC_SIGNAL(component,  in_WRITE_UNIT_IN_NUM_REG_RD    );
+  INSTANCE0_SC_SIGNAL(component,  in_WRITE_UNIT_IN_DATA_RD       );
+  INSTANCE0_SC_SIGNAL(component,  in_WRITE_UNIT_IN_WRITE_RE      );
+  INSTANCE0_SC_SIGNAL(component,  in_WRITE_UNIT_IN_NUM_REG_RE    );
+  INSTANCE0_SC_SIGNAL(component,  in_WRITE_UNIT_IN_DATA_RE       );
+  INSTANCE0_SC_SIGNAL(component,  in_WRITE_UNIT_IN_EXCEPTION     );
+  INSTANCE0_SC_SIGNAL(component,  in_WRITE_UNIT_IN_NO_SEQUENCE   );
+  INSTANCE0_SC_SIGNAL(component,  in_WRITE_UNIT_IN_ADDRESS       );
+  INSTANCE0_SC_SIGNAL(component, out_WRITE_UNIT_OUT_VAL          );
+  INSTANCE0_SC_SIGNAL(component,  in_WRITE_UNIT_OUT_ACK          );
+  if (_param->_have_port_context_id)
+  INSTANCE0_SC_SIGNAL(component, out_WRITE_UNIT_OUT_CONTEXT_ID   );
+  if (_param->_have_port_front_end_id)
+  INSTANCE0_SC_SIGNAL(component, out_WRITE_UNIT_OUT_FRONT_END_ID );
+  if (_param->_have_port_ooo_engine_id)
+  INSTANCE0_SC_SIGNAL(component, out_WRITE_UNIT_OUT_OOO_ENGINE_ID);
+  if (_param->_have_port_rob_ptr)
+  INSTANCE0_SC_SIGNAL(component, out_WRITE_UNIT_OUT_PACKET_ID    );
+//INSTANCE0_SC_SIGNAL(component, out_WRITE_UNIT_OUT_OPERATION    );
+//INSTANCE0_SC_SIGNAL(component, out_WRITE_UNIT_OUT_TYPE         );
+  INSTANCE0_SC_SIGNAL(component, out_WRITE_UNIT_OUT_FLAGS        );
+  INSTANCE0_SC_SIGNAL(component, out_WRITE_UNIT_OUT_EXCEPTION    );
+  INSTANCE0_SC_SIGNAL(component, out_WRITE_UNIT_OUT_NO_SEQUENCE  );
+  INSTANCE0_SC_SIGNAL(component, out_WRITE_UNIT_OUT_ADDRESS      );
+  INSTANCE0_SC_SIGNAL(component, out_WRITE_UNIT_OUT_DATA         );
+  INSTANCE1_SC_SIGNAL(component, out_GPR_WRITE_VAL                , _param->_nb_gpr_write);
+  INSTANCE1_SC_SIGNAL(component,  in_GPR_WRITE_ACK                , _param->_nb_gpr_write);
+  if (_param->_have_port_ooo_engine_id)
+  INSTANCE1_SC_SIGNAL(component, out_GPR_WRITE_OOO_ENGINE_ID      , _param->_nb_gpr_write);
+  INSTANCE1_SC_SIGNAL(component, out_GPR_WRITE_NUM_REG            , _param->_nb_gpr_write);
+  INSTANCE1_SC_SIGNAL(component, out_GPR_WRITE_DATA               , _param->_nb_gpr_write);
+  INSTANCE1_SC_SIGNAL(component, out_SPR_WRITE_VAL                , _param->_nb_spr_write);
+  INSTANCE1_SC_SIGNAL(component,  in_SPR_WRITE_ACK                , _param->_nb_spr_write);
+  if (_param->_have_port_ooo_engine_id)
+  INSTANCE1_SC_SIGNAL(component, out_SPR_WRITE_OOO_ENGINE_ID      , _param->_nb_spr_write);
+  INSTANCE1_SC_SIGNAL(component, out_SPR_WRITE_NUM_REG            , _param->_nb_spr_write);
+  INSTANCE1_SC_SIGNAL(component, out_SPR_WRITE_DATA               , _param->_nb_spr_write);
+  if (_param->_have_port_ooo_engine_id)
+  INSTANCE1_SC_SIGNAL(component, out_BYPASS_WRITE_OOO_ENGINE_ID   , _param->_nb_bypass_write);
+  INSTANCE1_SC_SIGNAL(component, out_BYPASS_WRITE_GPR_VAL         , _param->_nb_bypass_write);
+  INSTANCE1_SC_SIGNAL(component, out_BYPASS_WRITE_GPR_NUM_REG     , _param->_nb_bypass_write);
+  INSTANCE1_SC_SIGNAL(component, out_BYPASS_WRITE_GPR_DATA        , _param->_nb_bypass_write);
+  INSTANCE1_SC_SIGNAL(component, out_BYPASS_WRITE_SPR_VAL         , _param->_nb_bypass_write);
+  INSTANCE1_SC_SIGNAL(component, out_BYPASS_WRITE_SPR_NUM_REG     , _param->_nb_bypass_write);
+  INSTANCE1_SC_SIGNAL(component, out_BYPASS_WRITE_SPR_DATA        , _param->_nb_bypass_write);
+    }
+#endif
+}
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/SelfTest/src/top_deallocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/SelfTest/src/top_deallocation.cpp	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/SelfTest/src/top_deallocation.cpp	(revision 113)
@@ -0,0 +1,70 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ * Test
+ */
+#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/SelfTest/include/top.h"
+#include "Behavioural/include/Allocation.h"
+
+void top::deallocation (void)
+{
+#ifdef SYSTEMC
+  delete             in_CLOCK;
+  DELETE0_SC_SIGNAL( in_NRESET);
+
+  DELETE0_SC_SIGNAL( in_WRITE_UNIT_IN_VAL           );
+  DELETE0_SC_SIGNAL(out_WRITE_UNIT_IN_ACK           );
+  DELETE0_SC_SIGNAL( in_WRITE_UNIT_IN_CONTEXT_ID    );
+  DELETE0_SC_SIGNAL( in_WRITE_UNIT_IN_FRONT_END_ID  );
+  DELETE0_SC_SIGNAL( in_WRITE_UNIT_IN_OOO_ENGINE_ID );
+  DELETE0_SC_SIGNAL( in_WRITE_UNIT_IN_PACKET_ID     );
+//DELETE0_SC_SIGNAL( in_WRITE_UNIT_IN_OPERATION     );
+//DELETE0_SC_SIGNAL( in_WRITE_UNIT_IN_TYPE          );
+  DELETE0_SC_SIGNAL( in_WRITE_UNIT_IN_WRITE_RD      );
+  DELETE0_SC_SIGNAL( in_WRITE_UNIT_IN_NUM_REG_RD    );
+  DELETE0_SC_SIGNAL( in_WRITE_UNIT_IN_DATA_RD       );
+  DELETE0_SC_SIGNAL( in_WRITE_UNIT_IN_WRITE_RE      );
+  DELETE0_SC_SIGNAL( in_WRITE_UNIT_IN_NUM_REG_RE    );
+  DELETE0_SC_SIGNAL( in_WRITE_UNIT_IN_DATA_RE       );
+  DELETE0_SC_SIGNAL( in_WRITE_UNIT_IN_EXCEPTION     );
+  DELETE0_SC_SIGNAL( in_WRITE_UNIT_IN_NO_SEQUENCE   );
+  DELETE0_SC_SIGNAL( in_WRITE_UNIT_IN_ADDRESS       );
+  DELETE0_SC_SIGNAL(out_WRITE_UNIT_OUT_VAL          );
+  DELETE0_SC_SIGNAL( in_WRITE_UNIT_OUT_ACK          );
+  DELETE0_SC_SIGNAL(out_WRITE_UNIT_OUT_CONTEXT_ID   );
+  DELETE0_SC_SIGNAL(out_WRITE_UNIT_OUT_FRONT_END_ID );
+  DELETE0_SC_SIGNAL(out_WRITE_UNIT_OUT_OOO_ENGINE_ID);
+  DELETE0_SC_SIGNAL(out_WRITE_UNIT_OUT_PACKET_ID    );
+//DELETE0_SC_SIGNAL(out_WRITE_UNIT_OUT_OPERATION    );
+//DELETE0_SC_SIGNAL(out_WRITE_UNIT_OUT_TYPE         );
+  DELETE0_SC_SIGNAL(out_WRITE_UNIT_OUT_FLAGS        );
+  DELETE0_SC_SIGNAL(out_WRITE_UNIT_OUT_EXCEPTION    );
+  DELETE0_SC_SIGNAL(out_WRITE_UNIT_OUT_NO_SEQUENCE  );
+  DELETE0_SC_SIGNAL(out_WRITE_UNIT_OUT_ADDRESS      );
+  DELETE0_SC_SIGNAL(out_WRITE_UNIT_OUT_DATA         );
+  DELETE1_SC_SIGNAL(out_GPR_WRITE_VAL               , _param->_nb_gpr_write);
+  DELETE1_SC_SIGNAL( in_GPR_WRITE_ACK               , _param->_nb_gpr_write);
+  DELETE1_SC_SIGNAL(out_GPR_WRITE_OOO_ENGINE_ID     , _param->_nb_gpr_write);
+  DELETE1_SC_SIGNAL(out_GPR_WRITE_NUM_REG           , _param->_nb_gpr_write);
+  DELETE1_SC_SIGNAL(out_GPR_WRITE_DATA              , _param->_nb_gpr_write);
+  DELETE1_SC_SIGNAL(out_SPR_WRITE_VAL               , _param->_nb_spr_write);
+  DELETE1_SC_SIGNAL( in_SPR_WRITE_ACK               , _param->_nb_spr_write);
+  DELETE1_SC_SIGNAL(out_SPR_WRITE_OOO_ENGINE_ID     , _param->_nb_spr_write);
+  DELETE1_SC_SIGNAL(out_SPR_WRITE_NUM_REG           , _param->_nb_spr_write);
+  DELETE1_SC_SIGNAL(out_SPR_WRITE_DATA              , _param->_nb_spr_write);
+  DELETE1_SC_SIGNAL(out_BYPASS_WRITE_OOO_ENGINE_ID  , _param->_nb_bypass_write);
+  DELETE1_SC_SIGNAL(out_BYPASS_WRITE_GPR_VAL        , _param->_nb_bypass_write);
+  DELETE1_SC_SIGNAL(out_BYPASS_WRITE_GPR_NUM_REG    , _param->_nb_bypass_write);
+  DELETE1_SC_SIGNAL(out_BYPASS_WRITE_GPR_DATA       , _param->_nb_bypass_write);
+  DELETE1_SC_SIGNAL(out_BYPASS_WRITE_SPR_VAL        , _param->_nb_bypass_write);
+  DELETE1_SC_SIGNAL(out_BYPASS_WRITE_SPR_NUM_REG    , _param->_nb_bypass_write);
+  DELETE1_SC_SIGNAL(out_BYPASS_WRITE_SPR_DATA       , _param->_nb_bypass_write);
+#endif
+
+  delete component;
+#ifdef STATISTICS
+  delete _param_stat;
+#endif
+}
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/SelfTest/src/top_test.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/SelfTest/src/top_test.cpp	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/SelfTest/src/top_test.cpp	(revision 113)
@@ -0,0 +1,371 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ * Test
+ */
+
+#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/SelfTest/include/top.h"
+#include "Behavioural/include/Allocation.h"
+#include "Common/include/BitManipulation.h"
+
+  class entry_t
+  {
+  public  : Tcontext_t         _context_id   ;
+  public  : Tcontext_t         _front_end_id ;
+  public  : Tcontext_t         _ooo_engine_id;
+  public  : Tpacket_t          _packet_id    ;
+//public  : Toperation_t       _operation    ;
+//public  : Ttype_t            _type         ;
+  public  : Tcontrol_t         _write_rd     ;
+  public  : Tgeneral_address_t _num_reg_rd   ;
+  public  : Tgeneral_data_t    _data_rd      ;
+  public  : Tcontrol_t         _write_re     ;
+  public  : Tspecial_address_t _num_reg_re   ;
+  public  : Tspecial_data_t    _data_re      ;
+  public  : Texception_t       _exception    ;
+  public  : Tcontrol_t         _no_sequence  ;
+  public  : Tgeneral_data_t    _address      ;
+    
+  public  : entry_t (Tcontext_t         context_id   ,
+		     Tcontext_t         front_end_id ,
+		     Tcontext_t         ooo_engine_id,
+		     Tpacket_t          packet_id    ,
+// 		     Toperation_t       operation    ,
+// 		     Ttype_t            type         ,
+		     Tcontrol_t         write_rd     ,
+		     Tgeneral_address_t num_reg_rd   ,
+		     Tgeneral_data_t    data_rd      ,
+		     Tcontrol_t         write_re     ,
+		     Tspecial_address_t num_reg_re   ,
+		     Tspecial_data_t    data_re      ,
+		     Texception_t       exception    ,
+		     Tcontrol_t         no_sequence  ,
+		     Tgeneral_data_t    address      )
+    {
+      _context_id    = context_id   ;
+      _front_end_id  = front_end_id ;
+      _ooo_engine_id = ooo_engine_id;
+      _packet_id     = packet_id    ;
+//    _operation     = operation    ;
+//    _type          = type         ;
+      _write_rd      = write_rd     ;
+      _num_reg_rd    = num_reg_rd   ;
+      _data_rd       = data_rd      ;
+      _write_re      = write_re     ;
+      _num_reg_re    = num_reg_re   ;
+      _data_re       = data_re      ;
+      _exception     = exception    ;
+      _no_sequence   = no_sequence  ;
+      _address       = address      ;
+    };
+
+    friend std::ostream& operator<< (std::ostream& output_stream,
+				     entry_t & x)
+    {
+      output_stream << " * _context_id    : " << toString(x._context_id   ) << std::endl
+		    << " * _front_end_id  : " << toString(x._front_end_id ) << std::endl
+		    << " * _ooo_engine_id : " << toString(x._ooo_engine_id) << std::endl
+		    << " * _packet_id     : " << toString(x._packet_id    ) << std::endl
+		  //<< " * _operation     : " << toString(x._operation    ) << std::endl
+		  //<< " * _type          : " << toString(x._type         ) << std::endl
+		    << " * _write_rd      : " << toString(x._write_rd     ) << std::endl
+		    << " * _num_reg_rd    : " << toString(x._num_reg_rd   ) << std::endl
+		    << " * _data_rd       : " << toString(x._data_rd      ) << std::endl
+		    << " * _write_re      : " << toString(x._write_re     ) << std::endl
+		    << " * _num_reg_re    : " << toString(x._num_reg_re   ) << std::endl
+		    << " * _data_re       : " << toString(x._data_re      ) << std::endl
+		    << " * _exception     : " << toString(x._exception    ) << std::endl
+		    << " * _no_sequence   : " << toString(x._no_sequence  ) << std::endl
+		    << " * _address       : " << toString(x._address      ) << std::endl;
+
+      return output_stream;
+    }
+  };
+
+void top::test (void)
+{
+#ifdef SYSTEMC
+  if (usage_is_set(_usage,USE_SYSTEMC))
+    {
+      msgInformation(_("<%s> : Start Simulation ............\n"),name.c_str());
+      
+      Time * _time = new Time();
+      
+      /********************************************************
+       * Simulation - Begin
+       ********************************************************/
+      
+  // Initialisation
+
+  const uint32_t seed = 0;
+//const uint32_t seed = static_cast<uint32_t>(time(NULL));
+
+  srand(seed);
+  
+  const  int32_t percent_transaction_write_unit_in  = 75;
+  const  int32_t percent_transaction_write_unit_out = 75;
+  const  int32_t percent_transaction_gpr             = 75;
+  const  int32_t percent_transaction_spr             = 75;
+
+  bool            gpr_val [_param->_nb_ooo_engine][_param->_nb_general_register];
+  bool            gpr_use [_param->_nb_ooo_engine][_param->_nb_general_register];
+  Tgeneral_data_t gpr     [_param->_nb_ooo_engine][_param->_nb_general_register];
+  bool            spr_val [_param->_nb_ooo_engine][_param->_nb_special_register];
+  bool            spr_use [_param->_nb_ooo_engine][_param->_nb_special_register];
+  Tgeneral_data_t spr     [_param->_nb_ooo_engine][_param->_nb_special_register];
+
+  entry_t *       request [_param->_nb_packet];
+
+  for (uint32_t i=0; i<_param->_nb_packet; ++i)
+    request [i] = NULL;
+  
+  SC_CYCLE(0);
+  LABEL("Initialisation");
+
+  LABEL("Reset");
+  in_NRESET->write(0);
+  SC_CYCLE(5);
+  in_NRESET->write(1);  
+
+  LABEL("Loop of Test");
+
+  for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++)
+    {
+      LABEL("Iteration %d",iteration);
+
+      for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
+	{
+	  for (uint32_t j=0; j<_param->_nb_general_register; j++)
+	    {
+	      gpr_val [i][j] = 0;
+	      gpr_use [i][j] = 0;
+	      gpr     [i][j] = rand();
+	    }
+	  for (uint32_t j=0; j<_param->_nb_special_register; j++)
+	    {
+	      spr_val [i][j] = 0;
+	      spr_use [i][j] = 0;
+	      spr     [i][j] = rand();
+	    }
+	}
+
+      for (uint32_t i=0; i<_param->_nb_packet; i++)
+	{
+          if (request [i] == NULL)
+            delete request [i];
+
+	  request [i] = new entry_t (range<Tcontext_t        >(rand(),_param->_size_context_id      ),
+				     range<Tcontext_t        >(rand(),_param->_size_front_end_id    ),
+				     range<Tcontext_t        >(rand(),_param->_size_ooo_engine_id   ),
+				     i,
+				   //range<Toperation_t      >(rand(),_param->_size_operation       ),
+				   //range<Ttype_t           >(rand(),_param->_size_type            ),
+				     range<Tcontrol_t        >(rand(),1                             ),
+				     range<Tgeneral_address_t>(rand(),_param->_size_general_register),
+				     range<Tgeneral_data_t   >(rand(),_param->_size_general_data    ),
+				     range<Tcontrol_t        >(rand(),1                             ),
+				     range<Tspecial_address_t>(rand(),_param->_size_special_register),
+				     range<Tspecial_data_t   >(rand(),_param->_size_special_data    ),
+				     range<Texception_t      >(rand(),0                             ),
+				     range<Tcontrol_t        >(rand(),1                             ),
+				     range<Tgeneral_data_t   >(rand(),_param->_size_general_data    ));
+	}
+
+      uint32_t nb_request_in  = 0;
+      uint32_t nb_request_out = 0;
+
+      while (nb_request_out < _param->_nb_packet)
+      {
+	bool val = (((rand()%100)<percent_transaction_write_unit_in) and
+		    (nb_request_in < _param->_nb_packet) and
+		    not (request [nb_request_in]->_write_rd and 
+			 gpr_use [request [nb_request_in]->_ooo_engine_id][request [nb_request_in]->_num_reg_rd]) and
+		    not (request [nb_request_in]->_write_re and 
+			 spr_use [request [nb_request_in]->_ooo_engine_id][request [nb_request_in]->_num_reg_re]));
+	
+	in_WRITE_UNIT_IN_VAL          ->write(val);
+	if (val)
+	  {
+	    in_WRITE_UNIT_IN_CONTEXT_ID   ->write(request [nb_request_in]->_context_id   );
+	    in_WRITE_UNIT_IN_FRONT_END_ID ->write(request [nb_request_in]->_front_end_id );
+	    in_WRITE_UNIT_IN_OOO_ENGINE_ID->write(request [nb_request_in]->_ooo_engine_id);
+	    in_WRITE_UNIT_IN_PACKET_ID    ->write(request [nb_request_in]->_packet_id    );
+	  //in_WRITE_UNIT_IN_OPERATION    ->write(request [nb_request_in]->_operation    );
+	  //in_WRITE_UNIT_IN_TYPE         ->write(request [nb_request_in]->_type         );
+	    in_WRITE_UNIT_IN_WRITE_RD     ->write(request [nb_request_in]->_write_rd     );
+	    in_WRITE_UNIT_IN_NUM_REG_RD   ->write(request [nb_request_in]->_num_reg_rd   );
+	    in_WRITE_UNIT_IN_DATA_RD      ->write(request [nb_request_in]->_data_rd      );
+	    in_WRITE_UNIT_IN_WRITE_RE     ->write(request [nb_request_in]->_write_re     );
+	    in_WRITE_UNIT_IN_NUM_REG_RE   ->write(request [nb_request_in]->_num_reg_re   );
+	    in_WRITE_UNIT_IN_DATA_RE      ->write(request [nb_request_in]->_data_re      );
+	    in_WRITE_UNIT_IN_EXCEPTION    ->write(request [nb_request_in]->_exception    );
+	    in_WRITE_UNIT_IN_NO_SEQUENCE  ->write(request [nb_request_in]->_no_sequence  );
+	    in_WRITE_UNIT_IN_ADDRESS      ->write(request [nb_request_in]->_address      );
+	  }
+	in_WRITE_UNIT_OUT_ACK         ->write((rand()%100)<percent_transaction_write_unit_out);
+	in_GPR_WRITE_ACK [0]           ->write((rand()%100)<percent_transaction_gpr);
+	in_SPR_WRITE_ACK [0]           ->write((rand()%100)<percent_transaction_spr);
+	    
+	SC_CYCLE(0);
+
+	// ======================================================================
+	// ======================================================================
+	// ======================================================================
+	if (out_GPR_WRITE_VAL [0]->read() and
+	     in_GPR_WRITE_ACK [0]->read())
+	  {
+	    Tcontext_t         ooo_engine_id = (_param->_have_port_ooo_engine_id)?out_GPR_WRITE_OOO_ENGINE_ID[0]->read():0;
+	    Tgeneral_address_t num_reg       = out_GPR_WRITE_NUM_REG      [0]->read();
+	    Tgeneral_data_t    data          = out_GPR_WRITE_DATA         [0]->read();
+	    
+	    LABEL(" * Accepted GPR_WRITE     in register [%d][%d]", ooo_engine_id,num_reg);
+
+	    TEST(bool           , gpr_val [ooo_engine_id][num_reg], 0);
+	    TEST(bool           , gpr_use [ooo_engine_id][num_reg], 1);
+	    TEST(Tgeneral_data_t, gpr     [ooo_engine_id][num_reg], data);
+	    
+	    gpr_val [ooo_engine_id][num_reg] = 1;
+	  }
+
+	// ======================================================================
+	// ======================================================================
+	// ======================================================================
+	if (out_SPR_WRITE_VAL [0]->read() and
+	     in_SPR_WRITE_ACK [0]->read())
+	  {
+	    Tcontext_t         ooo_engine_id = (_param->_have_port_ooo_engine_id)?out_SPR_WRITE_OOO_ENGINE_ID[0]->read():0;
+	    Tspecial_address_t num_reg       = out_SPR_WRITE_NUM_REG      [0]->read();
+	    Tspecial_data_t    data          = out_SPR_WRITE_DATA         [0]->read();
+	    
+	    LABEL(" * Accepted SPR_WRITE     in register [%d][%d]", ooo_engine_id,num_reg);
+
+	    TEST(bool           , spr_val [ooo_engine_id][num_reg], 0);
+	    TEST(bool           , spr_use [ooo_engine_id][num_reg], 1);
+	    TEST(Tgeneral_data_t, spr     [ooo_engine_id][num_reg], data);
+	    
+	    spr_val [ooo_engine_id][num_reg] = 1;
+	  }
+
+	// ======================================================================
+	// ======================================================================
+	// ======================================================================
+	for (uint32_t i=0; i<_param->_nb_bypass_write; i++)
+	  {
+	    Tcontext_t         ooo_engine_id  = (_param->_have_port_ooo_engine_id)?out_BYPASS_WRITE_OOO_ENGINE_ID[i]->read():0;
+	    
+	    if (out_BYPASS_WRITE_GPR_VAL      [i]->read())
+	      {
+		Tgeneral_address_t num_reg    = out_BYPASS_WRITE_GPR_NUM_REG  [i]->read(); // RD
+		Tgeneral_data_t    data       = out_BYPASS_WRITE_GPR_DATA     [i]->read();
+
+		LABEL(" * Accepted BYPASS_WRITE  in register [%d][%d] (GPR)", ooo_engine_id,num_reg);
+			    
+
+		TEST(bool           , gpr_use [ooo_engine_id][num_reg], 1);
+		TEST(Tgeneral_data_t, gpr     [ooo_engine_id][num_reg], data);
+	      }
+	    if (out_BYPASS_WRITE_SPR_VAL      [i]->read())
+	      {
+		Tspecial_address_t num_reg    = out_BYPASS_WRITE_SPR_NUM_REG  [i]->read(); // RE
+		Tspecial_data_t    data       = out_BYPASS_WRITE_SPR_DATA     [i]->read();
+
+		LABEL(" * Accepted BYPASS_WRITE  in register [%d][%d] (SPR)", ooo_engine_id,num_reg);
+
+		TEST(bool           , spr_use [ooo_engine_id][num_reg], 1);
+		TEST(Tspecial_data_t, spr     [ooo_engine_id][num_reg], data);
+	      }
+	  }
+	
+	// ======================================================================
+	// ======================================================================
+	// ======================================================================
+	if ( in_WRITE_UNIT_IN_VAL->read() and
+	    out_WRITE_UNIT_IN_ACK->read())
+	  {
+	    LABEL(" * Accepted WRITE_UNIT_IN  [%d]",nb_request_in);
+// 	    std::cout << *request [nb_request_in] << std::endl;
+
+	    if (request [nb_request_in]->_write_rd)
+	      {
+		gpr_val [request [nb_request_in]->_ooo_engine_id][request [nb_request_in]->_num_reg_rd] = 0;
+		gpr_use [request [nb_request_in]->_ooo_engine_id][request [nb_request_in]->_num_reg_rd] = 1;
+		gpr     [request [nb_request_in]->_ooo_engine_id][request [nb_request_in]->_num_reg_rd] = request [nb_request_in]->_data_rd;
+	      }
+	    if (request [nb_request_in]->_write_re)
+	      {
+		spr_val [request [nb_request_in]->_ooo_engine_id][request [nb_request_in]->_num_reg_re] = 0;
+		spr_use [request [nb_request_in]->_ooo_engine_id][request [nb_request_in]->_num_reg_re] = 1;
+		spr     [request [nb_request_in]->_ooo_engine_id][request [nb_request_in]->_num_reg_re] = request [nb_request_in]->_data_re;
+	      }
+	    nb_request_in ++;
+	  }
+	
+	// ======================================================================
+	// ======================================================================
+	// ======================================================================
+	if (out_WRITE_UNIT_OUT_VAL->read() and
+	     in_WRITE_UNIT_OUT_ACK->read())
+	  {
+	    Tcontext_t packet;
+	    if (_param->_have_port_rob_ptr)
+	      packet = out_WRITE_UNIT_OUT_PACKET_ID->read();
+	    else
+	      packet = 0;
+
+	    LABEL(" * Accepted WRITE_UNIT_OUT [%d]",packet);
+// 	    std::cout << *request [packet] << std::endl;
+
+	    if (request [packet]->_write_rd)
+	      {
+		TEST(bool, gpr_val [request [packet]->_ooo_engine_id][request [packet]->_num_reg_rd], 1);
+		TEST(bool, gpr_use [request [packet]->_ooo_engine_id][request [packet]->_num_reg_rd], 1);
+		gpr_use [request [packet]->_ooo_engine_id][request [packet]->_num_reg_rd] = 0;
+	      }
+	    if (request [packet]->_write_re)
+	      {
+		TEST(bool, spr_val [request [packet]->_ooo_engine_id][request [packet]->_num_reg_re], 1);
+		TEST(bool, spr_use [request [packet]->_ooo_engine_id][request [packet]->_num_reg_re], 1);
+		spr_use [request [packet]->_ooo_engine_id][request [packet]->_num_reg_re] = 0;
+	      }
+
+	    if (_param->_have_port_context_id)
+	    TEST(Tcontext_t     , out_WRITE_UNIT_OUT_CONTEXT_ID   ->read(), request [packet]->_context_id   );
+	    if (_param->_have_port_front_end_id)
+	    TEST(Tcontext_t     , out_WRITE_UNIT_OUT_FRONT_END_ID ->read(), request [packet]->_front_end_id );
+	    if (_param->_have_port_ooo_engine_id)
+	    TEST(Tcontext_t     , out_WRITE_UNIT_OUT_OOO_ENGINE_ID->read(), request [packet]->_ooo_engine_id);
+	    
+	  //TEST(Toperation_t   , out_WRITE_UNIT_OUT_OPERATION    ->read(), request [packet]->_operation    );
+	  //TEST(Ttype_t        , out_WRITE_UNIT_OUT_TYPE         ->read(), request [packet]->_type         );
+	    TEST(Tcontrol_t     , out_WRITE_UNIT_OUT_FLAGS        ->read(), request [packet]->_data_re      );
+	    TEST(Texception_t   , out_WRITE_UNIT_OUT_EXCEPTION    ->read(), request [packet]->_exception    );
+	    TEST(Tcontrol_t     , out_WRITE_UNIT_OUT_NO_SEQUENCE  ->read(), request [packet]->_no_sequence  );
+	    TEST(Tgeneral_data_t, out_WRITE_UNIT_OUT_ADDRESS      ->read(), request [packet]->_address      );
+	    TEST(Tgeneral_data_t, out_WRITE_UNIT_OUT_DATA         ->read(), request [packet]->_data_rd      );
+
+	    nb_request_out ++;
+	  }
+
+	SC_CYCLE(1);
+      }
+
+      for (uint32_t i=0; i<_param->_nb_packet; i++)
+        if (request [i] == NULL)
+          delete request [i];
+    }
+      
+      /********************************************************
+       * Simulation - End
+       ********************************************************/
+      
+      TEST_OK ("");
+      
+      sc_stop();
+      delete _time;
+      
+      msgInformation(_("<%s> : ............ Stop Simulation\n"),name.c_str());
+    }
+#endif
+}
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/SelfTest/src/top_usage.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/SelfTest/src/top_usage.cpp	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/SelfTest/src/top_usage.cpp	(revision 113)
@@ -0,0 +1,34 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/SelfTest/include/top.h"
+
+void top::usage 
+(
+#ifdef MTI_SYSTEMC
+ int argc, const char * const * argv
+#else
+ int argc, char * argv[]
+#endif
+ )
+{
+  msgError (_("<Usage> %s name_instance list_params.\n"),argv[0]);
+  msgError (_("list_params is :\n"));
+  msgError (_(" * size_write_queue    (uint32_t)\n"));
+  msgError (_(" * size_execute_queue  (uint32_t)\n"));
+  msgError (_(" * nb_context          (uint32_t)\n"));
+  msgError (_(" * nb_front_end        (uint32_t)\n"));
+  msgError (_(" * nb_ooo_engine       (uint32_t)\n"));
+  msgError (_(" * nb_packet           (uint32_t)\n"));
+  msgError (_(" * size_general_data   (uint32_t)\n"));
+  msgError (_(" * nb_general_register (uint32_t)\n"));
+  msgError (_(" * size_special_data   (uint32_t)\n"));
+  msgError (_(" * nb_special_register (uint32_t)\n"));
+  msgError (_(" * nb_bypass_write     (uint32_t)\n"));
+
+  exit (1);
+}
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Write_queue
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../../../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/SelfTest/include/test.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/SelfTest/include/test.h	(revision 112)
+++ 	(revision )
@@ -1,32 +1,0 @@
-/*
- * $Id$
- *
- * [ Description ]
- * 
- * Test "RegisterFile"
- */
-
-#ifdef SYSTEMC
-#include "systemc.h"
-#endif
-
-#include <string>
-#include <iostream>
-#include <sys/time.h>
-
-#include "Common/include/Time.h"
-#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/include/Write_queue.h"
-
-using namespace std;
-using namespace morpheo;
-using namespace morpheo::behavioural;
-using namespace morpheo::behavioural::core;
-using namespace morpheo::behavioural::core::multi_execute_loop;
-using namespace morpheo::behavioural::core::multi_execute_loop::execute_loop;
-using namespace morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit;
-using namespace morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit;
-
-using namespace morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::write_queue;
-
-void test    (string name,
-	      morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::write_queue::Parameters * param);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/SelfTest/include/top.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/SelfTest/include/top.h	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/SelfTest/include/top.h	(revision 113)
@@ -0,0 +1,115 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ * Test "Write_queue"
+ */
+
+#ifdef SYSTEMC
+#include "systemc.h"
+#endif
+
+#define NB_ITERATION  1
+#define CYCLE_MAX     (1024*NB_ITERATION)
+
+#include "Common/include/Test.h"
+#include "Common/include/Time.h"
+#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/include/Write_queue.h"
+
+using namespace std;
+using namespace morpheo;
+using namespace morpheo::behavioural;
+using namespace morpheo::behavioural::core;
+using namespace morpheo::behavioural::core::multi_execute_loop;
+using namespace morpheo::behavioural::core::multi_execute_loop::execute_loop;
+using namespace morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit;
+using namespace morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit;
+
+using namespace morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::write_queue;
+
+SC_MODULE(top)
+{
+#ifdef SYSTEMC
+ private: sc_clock               *  in_CLOCK ;
+ private: sc_signal<Tcontrol_t>  *  in_NRESET;
+
+  private: sc_signal<Tcontrol_t        >  *  in_WRITE_QUEUE_IN_VAL           ;
+  private: sc_signal<Tcontrol_t        >  * out_WRITE_QUEUE_IN_ACK           ;
+  private: sc_signal<Tcontext_t        >  *  in_WRITE_QUEUE_IN_CONTEXT_ID    ;
+  private: sc_signal<Tcontext_t        >  *  in_WRITE_QUEUE_IN_FRONT_END_ID  ;
+  private: sc_signal<Tcontext_t        >  *  in_WRITE_QUEUE_IN_OOO_ENGINE_ID ;
+  private: sc_signal<Tpacket_t         >  *  in_WRITE_QUEUE_IN_PACKET_ID     ;
+//private: sc_signal<Toperation_t      >  *  in_WRITE_QUEUE_IN_OPERATION     ;
+//private: sc_signal<Ttype_t           >  *  in_WRITE_QUEUE_IN_TYPE          ;
+  private: sc_signal<Tcontrol_t        >  *  in_WRITE_QUEUE_IN_WRITE_RD      ;
+  private: sc_signal<Tgeneral_address_t>  *  in_WRITE_QUEUE_IN_NUM_REG_RD    ;
+  private: sc_signal<Tgeneral_data_t   >  *  in_WRITE_QUEUE_IN_DATA_RD       ;
+  private: sc_signal<Tcontrol_t        >  *  in_WRITE_QUEUE_IN_WRITE_RE      ;
+  private: sc_signal<Tspecial_address_t>  *  in_WRITE_QUEUE_IN_NUM_REG_RE    ;
+  private: sc_signal<Tspecial_data_t   >  *  in_WRITE_QUEUE_IN_DATA_RE       ;
+  private: sc_signal<Texception_t      >  *  in_WRITE_QUEUE_IN_EXCEPTION     ;
+  private: sc_signal<Tcontrol_t        >  *  in_WRITE_QUEUE_IN_NO_SEQUENCE   ;
+  private: sc_signal<Taddress_t        >  *  in_WRITE_QUEUE_IN_ADDRESS       ;
+  private: sc_signal<Tcontrol_t        >  * out_WRITE_QUEUE_OUT_VAL          ;
+  private: sc_signal<Tcontrol_t        >  *  in_WRITE_QUEUE_OUT_ACK          ;
+  private: sc_signal<Tcontext_t        >  * out_WRITE_QUEUE_OUT_CONTEXT_ID   ;
+  private: sc_signal<Tcontext_t        >  * out_WRITE_QUEUE_OUT_FRONT_END_ID ;
+  private: sc_signal<Tcontext_t        >  * out_WRITE_QUEUE_OUT_OOO_ENGINE_ID;
+  private: sc_signal<Tpacket_t         >  * out_WRITE_QUEUE_OUT_PACKET_ID    ;
+//private: sc_signal<Toperation_t      >  * out_WRITE_QUEUE_OUT_OPERATION    ;
+//private: sc_signal<Ttype_t           >  * out_WRITE_QUEUE_OUT_TYPE         ;
+  private: sc_signal<Tspecial_data_t   >  * out_WRITE_QUEUE_OUT_FLAGS        ;
+  private: sc_signal<Texception_t      >  * out_WRITE_QUEUE_OUT_EXCEPTION    ;
+  private: sc_signal<Tcontrol_t        >  * out_WRITE_QUEUE_OUT_NO_SEQUENCE  ;
+  private: sc_signal<Tgeneral_data_t   >  * out_WRITE_QUEUE_OUT_ADDRESS      ;
+  private: sc_signal<Taddress_t        >  * out_WRITE_QUEUE_OUT_DATA         ;
+  private: sc_signal<Tcontrol_t        > ** out_GPR_WRITE_VAL                ;
+  private: sc_signal<Tcontrol_t        > **  in_GPR_WRITE_ACK                ;
+  private: sc_signal<Tcontext_t        > ** out_GPR_WRITE_OOO_ENGINE_ID      ;
+  private: sc_signal<Tgeneral_address_t> ** out_GPR_WRITE_NUM_REG            ;
+  private: sc_signal<Tgeneral_data_t   > ** out_GPR_WRITE_DATA               ;
+  private: sc_signal<Tcontrol_t        > ** out_SPR_WRITE_VAL                ;
+  private: sc_signal<Tcontrol_t        > **  in_SPR_WRITE_ACK                ;
+  private: sc_signal<Tcontext_t        > ** out_SPR_WRITE_OOO_ENGINE_ID      ;
+  private: sc_signal<Tspecial_address_t> ** out_SPR_WRITE_NUM_REG            ;
+  private: sc_signal<Tspecial_data_t   > ** out_SPR_WRITE_DATA               ;
+  private: sc_signal<Tcontext_t        > ** out_BYPASS_WRITE_OOO_ENGINE_ID   ;
+  private: sc_signal<Tcontrol_t        > ** out_BYPASS_WRITE_GPR_VAL         ;
+  private: sc_signal<Tgeneral_address_t> ** out_BYPASS_WRITE_GPR_NUM_REG     ;
+  private: sc_signal<Tgeneral_data_t   > ** out_BYPASS_WRITE_GPR_DATA        ;
+  private: sc_signal<Tcontrol_t        > ** out_BYPASS_WRITE_SPR_VAL         ;
+  private: sc_signal<Tspecial_address_t> ** out_BYPASS_WRITE_SPR_NUM_REG     ;
+  private: sc_signal<Tspecial_data_t   > ** out_BYPASS_WRITE_SPR_DATA        ;
+
+#endif
+
+ private: std::string name;
+ private: Tusage_t _usage;
+ private: morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::write_queue::Parameters * _param;
+#ifdef STATISTICS
+ private: morpheo::behavioural::Parameters_Statistics * _param_stat;
+#endif
+ private: Write_queue * component;
+
+ private: void usage
+    (
+#ifdef MTI_SYSTEMC
+     int argc, const char * const * argv
+#else
+     int argc, char * argv[]
+#endif
+     );
+ private: void allocation   (void);
+ private: void deallocation (void);
+ public : void test         (void);
+
+#ifdef MTI_SYSTEMC
+  SC_CTOR(top::top);
+#else
+ public : top (sc_module_name module_name,int argc, char * argv[]);
+#endif
+ public : ~top(void);
+};
+
+  
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/SelfTest/src/main.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/SelfTest/src/main.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/SelfTest/src/main.cpp	(revision 113)
@@ -2,85 +2,47 @@
  * $Id$
  *
- * [ Description ]
+ * [ Description ]
  * 
  */
 
-#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/SelfTest/include/test.h"
+#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/SelfTest/include/top.h"
 
-#define NB_PARAMS 10
-
-void usage (int argc, char * argv[])
+#ifndef MTI_SYSTEMC
+# ifndef SYSTEMC
+int main    (int argc, char * argv[])
+# else
+int sc_main (int argc, char * argv[])
+# endif
 {
-  err (_("<Usage> %s name_instance list_params.\n"),argv[0]);
-  err (_("list_params is :\n"));
-  err (_(" * size_queue          (uint32_t)\n"));
-  err (_(" * nb_context          (uint32_t)\n"));
-  err (_(" * nb_front_end        (uint32_t)\n"));
-  err (_(" * nb_ooo_engine       (uint32_t)\n"));
-  err (_(" * nb_packet           (uint32_t)\n"));
-  err (_(" * size_general_data   (uint32_t)\n"));
-  err (_(" * nb_general_register (uint32_t)\n"));
-  err (_(" * size_special_data   (uint32_t)\n"));
-  err (_(" * nb_special_register (uint32_t)\n"));
-  err (_(" * nb_bypass_write     (uint32_t)\n"));
-
-  exit (1);
-}
-
-#ifndef SYSTEMC
-int main    (int argc, char * argv[])
-#else
-int sc_main (int argc, char * argv[])
-#endif
-{
-  if (argc != 2+NB_PARAMS)
-    usage (argc, argv);
-
-  uint32_t       x = 1;
-
-  const string   name                =      argv[x++];
-  const uint32_t size_queue          = atoi(argv[x++]);
-  const uint32_t nb_context          = atoi(argv[x++]);
-  const uint32_t nb_front_end        = atoi(argv[x++]);
-  const uint32_t nb_ooo_engine       = atoi(argv[x++]);
-  const uint32_t nb_packet           = atoi(argv[x++]);
-  const uint32_t size_general_data   = atoi(argv[x++]);
-  const uint32_t nb_general_register = atoi(argv[x++]);
-  const uint32_t size_special_data   = atoi(argv[x++]);
-  const uint32_t nb_special_register = atoi(argv[x++]);
-  const uint32_t nb_bypass_write     = atoi(argv[x++]);
+  int _return = EXIT_SUCCESS;
 
   try 
     {
-      morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::write_queue::Parameters * param = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::write_queue::Parameters
-	(size_queue         ,
-	 nb_context         ,
-	 nb_front_end       ,
-	 nb_ooo_engine      ,
-	 nb_packet          ,
-	 size_general_data  ,
-	 nb_general_register,
-	 size_special_data  ,
-	 nb_special_register,
-	 nb_bypass_write    ,
-         true // is_toplevel
-         );
-      
-      msg(_("%s"),param->print(1).c_str());
-      
-      test (name,param);
+      top * my_top = new top ("my_top",argc,argv);
+
+      my_top->test();
+
+      delete my_top;
     }
   catch (morpheo::ErrorMorpheo & error)
     {
-      msg (_("<%s> : %s.\n"),name.c_str(), error.what ());
-      exit (EXIT_FAILURE);
+      msg(_("%s"),error.what ());
+      _return = EXIT_FAILURE;
     }
-  catch (...)
+  
+  try 
     {
-      err (_("<%s> : This test must generate a error.\n"),name.c_str());
-      exit (EXIT_FAILURE);
+      if (_return == EXIT_SUCCESS)
+	TEST_OK("Write_queue : no error");
+      else
+	TEST_KO("Write_queue : a lot of error");
+    }
+  catch (morpheo::ErrorMorpheo & error)
+    {
+//    msgError(_("<%s> :\n%s"),name.c_str(), error.what ());
+      _return = EXIT_FAILURE;
     }
 
-  return (EXIT_SUCCESS);
+  return _return;
 }
-
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/SelfTest/src/top.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/SelfTest/src/top.cpp	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/SelfTest/src/top.cpp	(revision 113)
@@ -0,0 +1,87 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/SelfTest/include/top.h"
+#include "Behavioural/include/Selftest.h"
+
+#define NB_PARAMS 10
+
+#ifdef MTI_SYSTEMC
+SC_MODULE_EXPORT(top);
+#endif
+
+#ifdef MTI_SYSTEMC
+SC_CTOR(top::top)
+#else
+top::top (sc_module_name module_name, int argc, char * argv[])
+#endif
+{
+#ifdef MTI_SYSTEMC
+  // accessing command-line arguments with modelsim
+  int argc;
+  const char * const * argv;
+
+  argc = sc_argc ();
+  argv = sc_argv ();
+#endif
+
+  if (argc != 2+NB_PARAMS)
+    usage (argc, argv);
+
+  uint32_t size_queue         ;
+  uint32_t nb_context         ;
+  uint32_t nb_front_end       ;
+  uint32_t nb_ooo_engine      ;
+  uint32_t nb_packet          ;
+  uint32_t size_general_data  ;
+  uint32_t nb_general_register;
+  uint32_t size_special_data  ;
+  uint32_t nb_special_register;
+  uint32_t nb_bypass_write    ;
+
+  uint32_t x=1;
+  SELFTEST0(name               ,string  ,argv,x);
+  SELFTEST0(size_queue         ,uint32_t,argv,x);
+  SELFTEST0(nb_context         ,uint32_t,argv,x);
+  SELFTEST0(nb_front_end       ,uint32_t,argv,x);
+  SELFTEST0(nb_ooo_engine      ,uint32_t,argv,x);
+  SELFTEST0(nb_packet          ,uint32_t,argv,x);
+  SELFTEST0(size_general_data  ,uint32_t,argv,x);
+  SELFTEST0(nb_general_register,uint32_t,argv,x);
+  SELFTEST0(size_special_data  ,uint32_t,argv,x);
+  SELFTEST0(nb_special_register,uint32_t,argv,x);
+  SELFTEST0(nb_bypass_write    ,uint32_t,argv,x);
+
+  _param = new morpheo::behavioural::core::multi_execute_loop::execute_loop::multi_write_unit::write_unit::write_queue::Parameters
+    (size_queue         ,
+     nb_context         ,
+     nb_front_end       ,
+     nb_ooo_engine      ,
+     nb_packet          ,
+     size_general_data  ,
+     nb_general_register,
+     size_special_data  ,
+     nb_special_register,
+     nb_bypass_write    ,
+     true
+     );
+  
+  // msg(_("%s"),_param.print(0).c_str());
+  
+  // Allocation component
+  allocation ();
+  
+#ifdef MTI_SYSTEMC
+  SC_THREAD(test);
+#endif
+}
+
+top::~top (void)
+{
+  deallocation ();
+  delete _param;
+}
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/SelfTest/src/top_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/SelfTest/src/top_allocation.cpp	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/SelfTest/src/top_allocation.cpp	(revision 113)
@@ -0,0 +1,184 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ * Test
+ */
+
+#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/SelfTest/include/top.h"
+#include "Behavioural/include/Allocation.h"
+
+void top::allocation (void)
+{
+  if (setlocale (LC_ALL, "") == NULL)
+    msgWarning(_("setlocale ko.\n"));
+
+  try 
+    {
+      _param->test();
+    }
+  catch (morpheo::ErrorMorpheo & error)
+    {
+      msgError(_("<%s> : %s"),name.c_str(),error.what());
+      return;
+    }
+  catch (...)
+    {
+      msgError(_("<%s> : This test must generate a error"),name.c_str());
+      exit (EXIT_FAILURE);
+    }
+
+  _usage = USE_ALL;
+//   _usage = usage_unset(_usage,USE_SYSTEMC              );
+//   _usage = usage_unset(_usage,USE_VHDL                 );
+//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
+//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
+//   _usage = usage_unset(_usage,USE_POSITION             );
+//   _usage = usage_unset(_usage,USE_STATISTICS           );
+//   _usage = usage_unset(_usage,USE_INFORMATION          );
+
+#ifdef STATISTICS
+  if (usage_is_set(_usage,USE_STATISTICS))
+  _param_stat = new morpheo::behavioural::Parameters_Statistics (5,CYCLE_MAX);
+#endif
+
+  component = new Write_queue 
+    (name.c_str(),
+#ifdef STATISTICS
+     _param_stat,
+#endif
+     _param,
+     _usage
+     );
+  
+#ifdef SYSTEMC
+  if (usage_is_set(_usage,USE_SYSTEMC))
+    {
+  /*********************************************************************
+   * Déclarations des signaux
+   *********************************************************************/
+  msgInformation(_("<%s> : Create signal.\n"),name.c_str());
+
+  in_CLOCK  = new sc_clock ("clock", TIME_PERIOD, TIME_UNIT, 0.5); //name,period,time_unit,duty_cycle
+
+  ALLOC0_SC_SIGNAL( in_NRESET        ," in_NRESET        ",Tcontrol_t);
+
+  ALLOC0_SC_SIGNAL( in_WRITE_QUEUE_IN_VAL           ," in_WRITE_QUEUE_IN_VAL"           , Tcontrol_t        );
+  ALLOC0_SC_SIGNAL(out_WRITE_QUEUE_IN_ACK           ,"out_WRITE_QUEUE_IN_ACK"           , Tcontrol_t        );
+  ALLOC0_SC_SIGNAL( in_WRITE_QUEUE_IN_CONTEXT_ID    ," in_WRITE_QUEUE_IN_CONTEXT_ID"    , Tcontext_t        );
+  ALLOC0_SC_SIGNAL( in_WRITE_QUEUE_IN_FRONT_END_ID  ," in_WRITE_QUEUE_IN_FRONT_END_ID"  , Tcontext_t        );
+  ALLOC0_SC_SIGNAL( in_WRITE_QUEUE_IN_OOO_ENGINE_ID ," in_WRITE_QUEUE_IN_OOO_ENGINE_ID" , Tcontext_t        );
+  ALLOC0_SC_SIGNAL( in_WRITE_QUEUE_IN_PACKET_ID     ," in_WRITE_QUEUE_IN_PACKET_ID"     , Tpacket_t         );
+//ALLOC0_SC_SIGNAL( in_WRITE_QUEUE_IN_OPERATION     ," in_WRITE_QUEUE_IN_OPERATION"     , Toperation_t      );
+//ALLOC0_SC_SIGNAL( in_WRITE_QUEUE_IN_TYPE          ," in_WRITE_QUEUE_IN_TYPE"          , Ttype_t           );
+  ALLOC0_SC_SIGNAL( in_WRITE_QUEUE_IN_WRITE_RD      ," in_WRITE_QUEUE_IN_WRITE_RD"      , Tcontrol_t        );
+  ALLOC0_SC_SIGNAL( in_WRITE_QUEUE_IN_NUM_REG_RD    ," in_WRITE_QUEUE_IN_NUM_REG_RD"    , Tgeneral_address_t);
+  ALLOC0_SC_SIGNAL( in_WRITE_QUEUE_IN_DATA_RD       ," in_WRITE_QUEUE_IN_DATA_RD"       , Tgeneral_data_t   );
+  ALLOC0_SC_SIGNAL( in_WRITE_QUEUE_IN_WRITE_RE      ," in_WRITE_QUEUE_IN_WRITE_RE"      , Tcontrol_t        );
+  ALLOC0_SC_SIGNAL( in_WRITE_QUEUE_IN_NUM_REG_RE    ," in_WRITE_QUEUE_IN_NUM_REG_RE"    , Tspecial_address_t);
+  ALLOC0_SC_SIGNAL( in_WRITE_QUEUE_IN_DATA_RE       ," in_WRITE_QUEUE_IN_DATA_RE"       , Tspecial_data_t   );
+  ALLOC0_SC_SIGNAL( in_WRITE_QUEUE_IN_EXCEPTION     ," in_WRITE_QUEUE_IN_EXCEPTION"     , Texception_t      );
+  ALLOC0_SC_SIGNAL( in_WRITE_QUEUE_IN_NO_SEQUENCE   ," in_WRITE_QUEUE_IN_NO_SEQUENCE"   , Tcontrol_t        );
+  ALLOC0_SC_SIGNAL( in_WRITE_QUEUE_IN_ADDRESS       ," in_WRITE_QUEUE_IN_ADDRESS"       , Taddress_t        );
+  ALLOC0_SC_SIGNAL(out_WRITE_QUEUE_OUT_VAL          ,"out_WRITE_QUEUE_OUT_VAL"          , Tcontrol_t        );
+  ALLOC0_SC_SIGNAL( in_WRITE_QUEUE_OUT_ACK          ," in_WRITE_QUEUE_OUT_ACK"          , Tcontrol_t        );
+  ALLOC0_SC_SIGNAL(out_WRITE_QUEUE_OUT_CONTEXT_ID   ,"out_WRITE_QUEUE_OUT_CONTEXT_ID"   , Tcontext_t        );
+  ALLOC0_SC_SIGNAL(out_WRITE_QUEUE_OUT_FRONT_END_ID ,"out_WRITE_QUEUE_OUT_FRONT_END_ID" , Tcontext_t        );
+  ALLOC0_SC_SIGNAL(out_WRITE_QUEUE_OUT_OOO_ENGINE_ID,"out_WRITE_QUEUE_OUT_OOO_ENGINE_ID", Tcontext_t        );
+  ALLOC0_SC_SIGNAL(out_WRITE_QUEUE_OUT_PACKET_ID    ,"out_WRITE_QUEUE_OUT_PACKET_ID"    , Tpacket_t         );
+//ALLOC0_SC_SIGNAL(out_WRITE_QUEUE_OUT_OPERATION    ,"out_WRITE_QUEUE_OUT_OPERATION"    , Toperation_t      );
+//ALLOC0_SC_SIGNAL(out_WRITE_QUEUE_OUT_TYPE         ,"out_WRITE_QUEUE_OUT_TYPE"         , Ttype_t           );
+  ALLOC0_SC_SIGNAL(out_WRITE_QUEUE_OUT_FLAGS        ,"out_WRITE_QUEUE_OUT_FLAGS"        , Tspecial_data_t   );
+  ALLOC0_SC_SIGNAL(out_WRITE_QUEUE_OUT_EXCEPTION    ,"out_WRITE_QUEUE_OUT_EXCEPTION"    , Texception_t      );
+  ALLOC0_SC_SIGNAL(out_WRITE_QUEUE_OUT_NO_SEQUENCE  ,"out_WRITE_QUEUE_OUT_NO_SEQUENCE"  , Tcontrol_t        );
+  ALLOC0_SC_SIGNAL(out_WRITE_QUEUE_OUT_ADDRESS      ,"out_WRITE_QUEUE_OUT_ADDRESS"      , Tgeneral_data_t   );
+  ALLOC0_SC_SIGNAL(out_WRITE_QUEUE_OUT_DATA         ,"out_WRITE_QUEUE_OUT_DATA"         , Taddress_t        );
+  ALLOC1_SC_SIGNAL(out_GPR_WRITE_VAL                ,"out_GPR_WRITE_VAL"                , Tcontrol_t        , _param->_nb_gpr_write);
+  ALLOC1_SC_SIGNAL( in_GPR_WRITE_ACK                ," in_GPR_WRITE_ACK"                , Tcontrol_t        , _param->_nb_gpr_write);
+  ALLOC1_SC_SIGNAL(out_GPR_WRITE_OOO_ENGINE_ID      ,"out_GPR_WRITE_OOO_ENGINE_ID"      , Tcontext_t        , _param->_nb_gpr_write);
+  ALLOC1_SC_SIGNAL(out_GPR_WRITE_NUM_REG            ,"out_GPR_WRITE_NUM_REG"            , Tgeneral_address_t, _param->_nb_gpr_write);
+  ALLOC1_SC_SIGNAL(out_GPR_WRITE_DATA               ,"out_GPR_WRITE_DATA"               , Tgeneral_data_t   , _param->_nb_gpr_write);
+  ALLOC1_SC_SIGNAL(out_SPR_WRITE_VAL                ,"out_SPR_WRITE_VAL"                , Tcontrol_t        , _param->_nb_spr_write);
+  ALLOC1_SC_SIGNAL( in_SPR_WRITE_ACK                ," in_SPR_WRITE_ACK"                , Tcontrol_t        , _param->_nb_spr_write);
+  ALLOC1_SC_SIGNAL(out_SPR_WRITE_OOO_ENGINE_ID      ,"out_SPR_WRITE_OOO_ENGINE_ID"      , Tcontext_t        , _param->_nb_spr_write);
+  ALLOC1_SC_SIGNAL(out_SPR_WRITE_NUM_REG            ,"out_SPR_WRITE_NUM_REG"            , Tspecial_address_t, _param->_nb_spr_write);
+  ALLOC1_SC_SIGNAL(out_SPR_WRITE_DATA               ,"out_SPR_WRITE_DATA"               , Tspecial_data_t   , _param->_nb_spr_write);
+  ALLOC1_SC_SIGNAL(out_BYPASS_WRITE_OOO_ENGINE_ID   ,"out_BYPASS_WRITE_OOO_ENGINE_ID"   , Tcontext_t        , _param->_nb_bypass_write);
+  ALLOC1_SC_SIGNAL(out_BYPASS_WRITE_GPR_VAL         ,"out_BYPASS_WRITE_GPR_VAL"         , Tcontrol_t        , _param->_nb_bypass_write);
+  ALLOC1_SC_SIGNAL(out_BYPASS_WRITE_GPR_NUM_REG     ,"out_BYPASS_WRITE_GPR_NUM_REG"     , Tgeneral_address_t, _param->_nb_bypass_write);
+  ALLOC1_SC_SIGNAL(out_BYPASS_WRITE_GPR_DATA        ,"out_BYPASS_WRITE_GPR_DATA"        , Tgeneral_data_t   , _param->_nb_bypass_write);
+  ALLOC1_SC_SIGNAL(out_BYPASS_WRITE_SPR_VAL         ,"out_BYPASS_WRITE_SPR_VAL"         , Tcontrol_t        , _param->_nb_bypass_write);
+  ALLOC1_SC_SIGNAL(out_BYPASS_WRITE_SPR_NUM_REG     ,"out_BYPASS_WRITE_SPR_NUM_REG"     , Tspecial_address_t, _param->_nb_bypass_write);
+  ALLOC1_SC_SIGNAL(out_BYPASS_WRITE_SPR_DATA        ,"out_BYPASS_WRITE_SPR_DATA"        , Tspecial_data_t   , _param->_nb_bypass_write);
+  
+  /********************************************************
+   * Instanciation
+   ********************************************************/
+  
+  msgInformation(_("<%s> : Instanciation of _Write_queue.\n"),name.c_str());
+
+  INSTANCE0_SC_SIGNAL(component, in_CLOCK         );
+  INSTANCE0_SC_SIGNAL(component, in_NRESET        );
+
+  INSTANCE0_SC_SIGNAL(component,  in_WRITE_QUEUE_IN_VAL           );
+  INSTANCE0_SC_SIGNAL(component, out_WRITE_QUEUE_IN_ACK           );
+  if (_param->_have_port_context_id)
+  INSTANCE0_SC_SIGNAL(component,  in_WRITE_QUEUE_IN_CONTEXT_ID    );
+  if (_param->_have_port_front_end_id)
+  INSTANCE0_SC_SIGNAL(component,  in_WRITE_QUEUE_IN_FRONT_END_ID  );
+  if (_param->_have_port_ooo_engine_id)
+  INSTANCE0_SC_SIGNAL(component,  in_WRITE_QUEUE_IN_OOO_ENGINE_ID );
+  if (_param->_have_port_rob_ptr  )
+  INSTANCE0_SC_SIGNAL(component,  in_WRITE_QUEUE_IN_PACKET_ID     );
+//INSTANCE0_SC_SIGNAL(component,  in_WRITE_QUEUE_IN_OPERATION     );
+//INSTANCE0_SC_SIGNAL(component,  in_WRITE_QUEUE_IN_TYPE          );
+  INSTANCE0_SC_SIGNAL(component,  in_WRITE_QUEUE_IN_WRITE_RD      );
+  INSTANCE0_SC_SIGNAL(component,  in_WRITE_QUEUE_IN_NUM_REG_RD    );
+  INSTANCE0_SC_SIGNAL(component,  in_WRITE_QUEUE_IN_DATA_RD       );
+  INSTANCE0_SC_SIGNAL(component,  in_WRITE_QUEUE_IN_WRITE_RE      );
+  INSTANCE0_SC_SIGNAL(component,  in_WRITE_QUEUE_IN_NUM_REG_RE    );
+  INSTANCE0_SC_SIGNAL(component,  in_WRITE_QUEUE_IN_DATA_RE       );
+  INSTANCE0_SC_SIGNAL(component,  in_WRITE_QUEUE_IN_EXCEPTION     );
+  INSTANCE0_SC_SIGNAL(component,  in_WRITE_QUEUE_IN_NO_SEQUENCE   );
+  INSTANCE0_SC_SIGNAL(component,  in_WRITE_QUEUE_IN_ADDRESS       );
+  INSTANCE0_SC_SIGNAL(component, out_WRITE_QUEUE_OUT_VAL          );
+  INSTANCE0_SC_SIGNAL(component,  in_WRITE_QUEUE_OUT_ACK          );
+  if (_param->_have_port_context_id)
+  INSTANCE0_SC_SIGNAL(component, out_WRITE_QUEUE_OUT_CONTEXT_ID   );
+  if (_param->_have_port_front_end_id)
+  INSTANCE0_SC_SIGNAL(component, out_WRITE_QUEUE_OUT_FRONT_END_ID );
+  if (_param->_have_port_ooo_engine_id)
+  INSTANCE0_SC_SIGNAL(component, out_WRITE_QUEUE_OUT_OOO_ENGINE_ID);
+  if (_param->_have_port_rob_ptr  )
+  INSTANCE0_SC_SIGNAL(component, out_WRITE_QUEUE_OUT_PACKET_ID    );
+//INSTANCE0_SC_SIGNAL(component, out_WRITE_QUEUE_OUT_OPERATION    );
+//INSTANCE0_SC_SIGNAL(component, out_WRITE_QUEUE_OUT_TYPE         );
+  INSTANCE0_SC_SIGNAL(component, out_WRITE_QUEUE_OUT_FLAGS        );
+  INSTANCE0_SC_SIGNAL(component, out_WRITE_QUEUE_OUT_EXCEPTION    );
+  INSTANCE0_SC_SIGNAL(component, out_WRITE_QUEUE_OUT_NO_SEQUENCE  );
+  INSTANCE0_SC_SIGNAL(component, out_WRITE_QUEUE_OUT_ADDRESS      );
+  INSTANCE0_SC_SIGNAL(component, out_WRITE_QUEUE_OUT_DATA         );
+  INSTANCE1_SC_SIGNAL(component, out_GPR_WRITE_VAL                , _param->_nb_gpr_write);
+  INSTANCE1_SC_SIGNAL(component,  in_GPR_WRITE_ACK                , _param->_nb_gpr_write);
+  if (_param->_have_port_ooo_engine_id)
+  INSTANCE1_SC_SIGNAL(component, out_GPR_WRITE_OOO_ENGINE_ID      , _param->_nb_gpr_write);
+  INSTANCE1_SC_SIGNAL(component, out_GPR_WRITE_NUM_REG            , _param->_nb_gpr_write);
+  INSTANCE1_SC_SIGNAL(component, out_GPR_WRITE_DATA               , _param->_nb_gpr_write);
+  INSTANCE1_SC_SIGNAL(component, out_SPR_WRITE_VAL                , _param->_nb_spr_write);
+  INSTANCE1_SC_SIGNAL(component,  in_SPR_WRITE_ACK                , _param->_nb_spr_write);
+  if (_param->_have_port_ooo_engine_id)
+  INSTANCE1_SC_SIGNAL(component, out_SPR_WRITE_OOO_ENGINE_ID      , _param->_nb_spr_write);
+  INSTANCE1_SC_SIGNAL(component, out_SPR_WRITE_NUM_REG            , _param->_nb_spr_write);
+  INSTANCE1_SC_SIGNAL(component, out_SPR_WRITE_DATA               , _param->_nb_spr_write);
+  if (_param->_have_port_ooo_engine_id)
+  INSTANCE1_SC_SIGNAL(component, out_BYPASS_WRITE_OOO_ENGINE_ID   , _param->_nb_bypass_write);
+  INSTANCE1_SC_SIGNAL(component, out_BYPASS_WRITE_GPR_VAL         , _param->_nb_bypass_write);
+  INSTANCE1_SC_SIGNAL(component, out_BYPASS_WRITE_GPR_NUM_REG     , _param->_nb_bypass_write);
+  INSTANCE1_SC_SIGNAL(component, out_BYPASS_WRITE_GPR_DATA        , _param->_nb_bypass_write);
+  INSTANCE1_SC_SIGNAL(component, out_BYPASS_WRITE_SPR_VAL         , _param->_nb_bypass_write);
+  INSTANCE1_SC_SIGNAL(component, out_BYPASS_WRITE_SPR_NUM_REG     , _param->_nb_bypass_write);
+  INSTANCE1_SC_SIGNAL(component, out_BYPASS_WRITE_SPR_DATA        , _param->_nb_bypass_write);
+    }
+#endif
+}
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/SelfTest/src/top_deallocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/SelfTest/src/top_deallocation.cpp	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/SelfTest/src/top_deallocation.cpp	(revision 113)
@@ -0,0 +1,69 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ * Test
+ */
+#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/SelfTest/include/top.h"
+#include "Behavioural/include/Allocation.h"
+
+void top::deallocation (void)
+{
+#ifdef SYSTEMC
+  delete             in_CLOCK;
+  DELETE0_SC_SIGNAL( in_NRESET);
+  DELETE0_SC_SIGNAL( in_WRITE_QUEUE_IN_VAL           );
+  DELETE0_SC_SIGNAL(out_WRITE_QUEUE_IN_ACK           );
+  DELETE0_SC_SIGNAL( in_WRITE_QUEUE_IN_CONTEXT_ID    );
+  DELETE0_SC_SIGNAL( in_WRITE_QUEUE_IN_FRONT_END_ID  );
+  DELETE0_SC_SIGNAL( in_WRITE_QUEUE_IN_OOO_ENGINE_ID );
+  DELETE0_SC_SIGNAL( in_WRITE_QUEUE_IN_PACKET_ID     );
+//DELETE0_SC_SIGNAL( in_WRITE_QUEUE_IN_OPERATION     );
+//DELETE0_SC_SIGNAL( in_WRITE_QUEUE_IN_TYPE          );
+  DELETE0_SC_SIGNAL( in_WRITE_QUEUE_IN_WRITE_RD      );
+  DELETE0_SC_SIGNAL( in_WRITE_QUEUE_IN_NUM_REG_RD    );
+  DELETE0_SC_SIGNAL( in_WRITE_QUEUE_IN_DATA_RD       );
+  DELETE0_SC_SIGNAL( in_WRITE_QUEUE_IN_WRITE_RE      );
+  DELETE0_SC_SIGNAL( in_WRITE_QUEUE_IN_NUM_REG_RE    );
+  DELETE0_SC_SIGNAL( in_WRITE_QUEUE_IN_DATA_RE       );
+  DELETE0_SC_SIGNAL( in_WRITE_QUEUE_IN_EXCEPTION     );
+  DELETE0_SC_SIGNAL( in_WRITE_QUEUE_IN_NO_SEQUENCE   );
+  DELETE0_SC_SIGNAL( in_WRITE_QUEUE_IN_ADDRESS       );
+  DELETE0_SC_SIGNAL(out_WRITE_QUEUE_OUT_VAL          );
+  DELETE0_SC_SIGNAL( in_WRITE_QUEUE_OUT_ACK          );
+  DELETE0_SC_SIGNAL(out_WRITE_QUEUE_OUT_CONTEXT_ID   );
+  DELETE0_SC_SIGNAL(out_WRITE_QUEUE_OUT_FRONT_END_ID );
+  DELETE0_SC_SIGNAL(out_WRITE_QUEUE_OUT_OOO_ENGINE_ID);
+  DELETE0_SC_SIGNAL(out_WRITE_QUEUE_OUT_PACKET_ID    );
+//DELETE0_SC_SIGNAL(out_WRITE_QUEUE_OUT_OPERATION    );
+//DELETE0_SC_SIGNAL(out_WRITE_QUEUE_OUT_TYPE         );
+  DELETE0_SC_SIGNAL(out_WRITE_QUEUE_OUT_FLAGS        );
+  DELETE0_SC_SIGNAL(out_WRITE_QUEUE_OUT_EXCEPTION    );
+  DELETE0_SC_SIGNAL(out_WRITE_QUEUE_OUT_NO_SEQUENCE  );
+  DELETE0_SC_SIGNAL(out_WRITE_QUEUE_OUT_ADDRESS      );
+  DELETE0_SC_SIGNAL(out_WRITE_QUEUE_OUT_DATA         );
+  DELETE1_SC_SIGNAL(out_GPR_WRITE_VAL                , _param->_nb_gpr_write);
+  DELETE1_SC_SIGNAL( in_GPR_WRITE_ACK                , _param->_nb_gpr_write);
+  DELETE1_SC_SIGNAL(out_GPR_WRITE_OOO_ENGINE_ID      , _param->_nb_gpr_write);
+  DELETE1_SC_SIGNAL(out_GPR_WRITE_NUM_REG            , _param->_nb_gpr_write);
+  DELETE1_SC_SIGNAL(out_GPR_WRITE_DATA               , _param->_nb_gpr_write);
+  DELETE1_SC_SIGNAL(out_SPR_WRITE_VAL                , _param->_nb_spr_write);
+  DELETE1_SC_SIGNAL( in_SPR_WRITE_ACK                , _param->_nb_spr_write);
+  DELETE1_SC_SIGNAL(out_SPR_WRITE_OOO_ENGINE_ID      , _param->_nb_spr_write);
+  DELETE1_SC_SIGNAL(out_SPR_WRITE_NUM_REG            , _param->_nb_spr_write);
+  DELETE1_SC_SIGNAL(out_SPR_WRITE_DATA               , _param->_nb_spr_write);
+  DELETE1_SC_SIGNAL(out_BYPASS_WRITE_OOO_ENGINE_ID   , _param->_nb_bypass_write);
+  DELETE1_SC_SIGNAL(out_BYPASS_WRITE_GPR_VAL         , _param->_nb_bypass_write);
+  DELETE1_SC_SIGNAL(out_BYPASS_WRITE_GPR_NUM_REG     , _param->_nb_bypass_write);
+  DELETE1_SC_SIGNAL(out_BYPASS_WRITE_GPR_DATA        , _param->_nb_bypass_write);
+  DELETE1_SC_SIGNAL(out_BYPASS_WRITE_SPR_VAL         , _param->_nb_bypass_write);
+  DELETE1_SC_SIGNAL(out_BYPASS_WRITE_SPR_NUM_REG     , _param->_nb_bypass_write);
+  DELETE1_SC_SIGNAL(out_BYPASS_WRITE_SPR_DATA        , _param->_nb_bypass_write);
+#endif
+
+  delete component;
+#ifdef STATISTICS
+  delete _param_stat;
+#endif
+}
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/SelfTest/src/top_test.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/SelfTest/src/top_test.cpp	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/SelfTest/src/top_test.cpp	(revision 113)
@@ -0,0 +1,365 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ * Test
+ */
+
+#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/SelfTest/include/top.h"
+#include "Behavioural/include/Allocation.h"
+#include "Common/include/BitManipulation.h"
+
+  class entry_t
+  {
+  public  : Tcontext_t         _context_id   ;
+  public  : Tcontext_t         _front_end_id ;
+  public  : Tcontext_t         _ooo_engine_id;
+  public  : Tpacket_t          _packet_id    ;
+//public  : Toperation_t       _operation    ;
+//public  : Ttype_t            _type         ;
+  public  : Tcontrol_t         _write_rd     ;
+  public  : Tgeneral_address_t _num_reg_rd   ;
+  public  : Tgeneral_data_t    _data_rd      ;
+  public  : Tcontrol_t         _write_re     ;
+  public  : Tspecial_address_t _num_reg_re   ;
+  public  : Tspecial_data_t    _data_re      ;
+  public  : Texception_t       _exception    ;
+  public  : Tcontrol_t         _no_sequence  ;
+  public  : Tgeneral_data_t    _address      ;
+    
+  public  : entry_t (Tcontext_t         context_id   ,
+		     Tcontext_t         front_end_id ,
+		     Tcontext_t         ooo_engine_id,
+		     Tpacket_t          packet_id    ,
+// 		     Toperation_t       operation    ,
+// 		     Ttype_t            type         ,
+		     Tcontrol_t         write_rd     ,
+		     Tgeneral_address_t num_reg_rd   ,
+		     Tgeneral_data_t    data_rd      ,
+		     Tcontrol_t         write_re     ,
+		     Tspecial_address_t num_reg_re   ,
+		     Tspecial_data_t    data_re      ,
+		     Texception_t       exception    ,
+		     Tcontrol_t         no_sequence  ,
+		     Tgeneral_data_t    address      )
+    {
+      _context_id    = context_id   ;
+      _front_end_id  = front_end_id ;
+      _ooo_engine_id = ooo_engine_id;
+      _packet_id     = packet_id    ;
+    //_operation     = operation    ;
+    //_type          = type         ;
+      _write_rd      = write_rd     ;
+      _num_reg_rd    = num_reg_rd   ;
+      _data_rd       = data_rd      ;
+      _write_re      = write_re     ;
+      _num_reg_re    = num_reg_re   ;
+      _data_re       = data_re      ;
+      _exception     = exception    ;
+      _no_sequence   = no_sequence  ;
+      _address       = address      ;
+    };
+
+    friend std::ostream& operator<< (std::ostream& output_stream,
+				     entry_t & x)
+    {
+      output_stream << " * _context_id    : " << toString(x._context_id   ) << std::endl
+		    << " * _front_end_id  : " << toString(x._front_end_id ) << std::endl
+		    << " * _ooo_engine_id : " << toString(x._ooo_engine_id) << std::endl
+		    << " * _packet_id     : " << toString(x._packet_id    ) << std::endl
+		  //<< " * _operation     : " << toString(x._operation    ) << std::endl
+		  //<< " * _type          : " << toString(x._type         ) << std::endl
+		    << " * _write_rd      : " << toString(x._write_rd     ) << std::endl
+		    << " * _num_reg_rd    : " << toString(x._num_reg_rd   ) << std::endl
+		    << " * _data_rd       : " << toString(x._data_rd      ) << std::endl
+		    << " * _write_re      : " << toString(x._write_re     ) << std::endl
+		    << " * _num_reg_re    : " << toString(x._num_reg_re   ) << std::endl
+		    << " * _data_re       : " << toString(x._data_re      ) << std::endl
+		    << " * _exception     : " << toString(x._exception    ) << std::endl
+		    << " * _no_sequence   : " << toString(x._no_sequence  ) << std::endl
+		    << " * _address       : " << toString(x._address      ) << std::endl;
+
+      return output_stream;
+    }
+  };
+
+void top::test (void)
+{
+#ifdef SYSTEMC
+  if (usage_is_set(_usage,USE_SYSTEMC))
+    {
+      msgInformation(_("<%s> : Start Simulation ............\n"),name.c_str());
+      
+      Time * _time = new Time();
+      
+      /********************************************************
+       * Simulation - Begin
+       ********************************************************/
+
+  // Initialisation
+
+  const uint32_t seed = 0;
+//const uint32_t seed = static_cast<uint32_t>(time(NULL));
+
+  srand(seed);
+  
+  const  int32_t percent_transaction_write_queue_in  = 75;
+  const  int32_t percent_transaction_write_queue_out = 75;
+  const  int32_t percent_transaction_gpr             = 75;
+  const  int32_t percent_transaction_spr             = 75;
+
+  bool            gpr_val [_param->_nb_ooo_engine][_param->_nb_general_register];
+  bool            gpr_use [_param->_nb_ooo_engine][_param->_nb_general_register];
+  Tgeneral_data_t gpr     [_param->_nb_ooo_engine][_param->_nb_general_register];
+  bool            spr_val [_param->_nb_ooo_engine][_param->_nb_special_register];
+  bool            spr_use [_param->_nb_ooo_engine][_param->_nb_special_register];
+  Tgeneral_data_t spr     [_param->_nb_ooo_engine][_param->_nb_special_register];
+
+  entry_t *       request [_param->_nb_packet];
+  
+  SC_CYCLE(0);
+  LABEL("Initialisation");
+
+  LABEL("Reset");
+  in_NRESET->write(0);
+  SC_CYCLE(5);
+  in_NRESET->write(1);  
+
+  LABEL("Loop of Test");
+
+  for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++)
+    {
+      LABEL("Iteration %d",iteration);
+
+      for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
+	{
+	  for (uint32_t j=0; j<_param->_nb_general_register; j++)
+	    {
+	      gpr_val [i][j] = 0;
+	      gpr_use [i][j] = 0;
+	      gpr     [i][j] = rand();
+	    }
+	  for (uint32_t j=0; j<_param->_nb_special_register; j++)
+	    {
+	      spr_val [i][j] = 0;
+	      spr_use [i][j] = 0;
+	      spr     [i][j] = rand();
+	    }
+	}
+
+      for (uint32_t i=0; i<_param->_nb_packet; i++)
+	{
+	  request [i] = new entry_t (range<Tcontext_t        >(rand(),_param->_size_context_id      ),
+				     range<Tcontext_t        >(rand(),_param->_size_front_end_id    ),
+				     range<Tcontext_t        >(rand(),_param->_size_ooo_engine_id   ),
+				     i,
+				   //range<Toperation_t      >(rand(),_param->_size_operation       ),
+				   //range<Ttype_t           >(rand(),_param->_size_type            ),
+				     range<Tcontrol_t        >(rand(),1                             ),
+				     range<Tgeneral_address_t>(rand(),_param->_size_general_register),
+				     range<Tgeneral_data_t   >(rand(),_param->_size_general_data    ),
+				     range<Tcontrol_t        >(rand(),1                             ),
+				     range<Tspecial_address_t>(rand(),_param->_size_special_register),
+				     range<Tspecial_data_t   >(rand(),_param->_size_special_data    ),
+				     range<Texception_t      >(rand(),0                             ),
+				     range<Tcontrol_t        >(rand(),1                             ),
+				     range<Tgeneral_data_t   >(rand(),_param->_size_general_data    ));
+	}
+
+      uint32_t nb_request_in  = 0;
+      uint32_t nb_request_out = 0;
+
+      while (nb_request_out < _param->_nb_packet)
+      {
+	bool val = (((rand()%100)<percent_transaction_write_queue_in) and
+		    (nb_request_in < _param->_nb_packet) and
+		    not (request [nb_request_in]->_write_rd and 
+			 gpr_use [request [nb_request_in]->_ooo_engine_id][request [nb_request_in]->_num_reg_rd]) and
+		    not (request [nb_request_in]->_write_re and 
+			 spr_use [request [nb_request_in]->_ooo_engine_id][request [nb_request_in]->_num_reg_re]));
+	
+	in_WRITE_QUEUE_IN_VAL          ->write(val);
+	if (val)
+	  {
+	    in_WRITE_QUEUE_IN_CONTEXT_ID   ->write(request [nb_request_in]->_context_id   );
+	    in_WRITE_QUEUE_IN_FRONT_END_ID ->write(request [nb_request_in]->_front_end_id );
+	    in_WRITE_QUEUE_IN_OOO_ENGINE_ID->write(request [nb_request_in]->_ooo_engine_id);
+	    in_WRITE_QUEUE_IN_PACKET_ID    ->write(request [nb_request_in]->_packet_id    );
+	  //in_WRITE_QUEUE_IN_OPERATION    ->write(request [nb_request_in]->_operation    );
+	  //in_WRITE_QUEUE_IN_TYPE         ->write(request [nb_request_in]->_type         );
+	    in_WRITE_QUEUE_IN_WRITE_RD     ->write(request [nb_request_in]->_write_rd     );
+	    in_WRITE_QUEUE_IN_NUM_REG_RD   ->write(request [nb_request_in]->_num_reg_rd   );
+	    in_WRITE_QUEUE_IN_DATA_RD      ->write(request [nb_request_in]->_data_rd      );
+	    in_WRITE_QUEUE_IN_WRITE_RE     ->write(request [nb_request_in]->_write_re     );
+	    in_WRITE_QUEUE_IN_NUM_REG_RE   ->write(request [nb_request_in]->_num_reg_re   );
+	    in_WRITE_QUEUE_IN_DATA_RE      ->write(request [nb_request_in]->_data_re      );
+	    in_WRITE_QUEUE_IN_EXCEPTION    ->write(request [nb_request_in]->_exception    );
+	    in_WRITE_QUEUE_IN_NO_SEQUENCE  ->write(request [nb_request_in]->_no_sequence  );
+	    in_WRITE_QUEUE_IN_ADDRESS      ->write(request [nb_request_in]->_address      );
+	  }
+	in_WRITE_QUEUE_OUT_ACK         ->write((rand()%100)<percent_transaction_write_queue_out);
+	in_GPR_WRITE_ACK [0]           ->write((rand()%100)<percent_transaction_gpr);
+	in_SPR_WRITE_ACK [0]           ->write((rand()%100)<percent_transaction_spr);
+	    
+	SC_CYCLE(0);
+
+	// ======================================================================
+	// ======================================================================
+	// ======================================================================
+	if (out_GPR_WRITE_VAL [0]->read() and
+	     in_GPR_WRITE_ACK [0]->read())
+	  {
+	    Tcontext_t         ooo_engine_id = (_param->_have_port_ooo_engine_id)?out_GPR_WRITE_OOO_ENGINE_ID[0]->read():0;
+	    Tgeneral_address_t num_reg       = out_GPR_WRITE_NUM_REG      [0]->read();
+	    Tgeneral_data_t    data          = out_GPR_WRITE_DATA         [0]->read();
+	    
+	    LABEL(" * Accepted GPR_WRITE     in register [%d][%d]", ooo_engine_id,num_reg);
+
+	    TEST(bool           , gpr_val [ooo_engine_id][num_reg], 0);
+	    TEST(bool           , gpr_use [ooo_engine_id][num_reg], 1);
+	    TEST(Tgeneral_data_t, gpr     [ooo_engine_id][num_reg], data);
+	    
+	    gpr_val [ooo_engine_id][num_reg] = 1;
+	  }
+
+	// ======================================================================
+	// ======================================================================
+	// ======================================================================
+	if (out_SPR_WRITE_VAL [0]->read() and
+	     in_SPR_WRITE_ACK [0]->read())
+	  {
+	    Tcontext_t         ooo_engine_id = (_param->_have_port_ooo_engine_id)?out_SPR_WRITE_OOO_ENGINE_ID[0]->read():0;
+	    Tspecial_address_t num_reg       = out_SPR_WRITE_NUM_REG      [0]->read();
+	    Tspecial_data_t    data          = out_SPR_WRITE_DATA         [0]->read();
+	    
+	    LABEL(" * Accepted SPR_WRITE     in register [%d][%d]", ooo_engine_id,num_reg);
+
+	    TEST(bool           , spr_val [ooo_engine_id][num_reg], 0);
+	    TEST(bool           , spr_use [ooo_engine_id][num_reg], 1);
+	    TEST(Tgeneral_data_t, spr     [ooo_engine_id][num_reg], data);
+	    
+	    spr_val [ooo_engine_id][num_reg] = 1;
+	  }
+
+	// ======================================================================
+	// ======================================================================
+	// ======================================================================
+	for (uint32_t i=0; i<_param->_nb_bypass_write; i++)
+	  {
+	    Tcontext_t         ooo_engine_id  = (_param->_have_port_ooo_engine_id)?out_BYPASS_WRITE_OOO_ENGINE_ID[i]->read():0;
+	    
+	    if (out_BYPASS_WRITE_GPR_VAL      [i]->read())
+	      {
+		Tgeneral_address_t num_reg    = out_BYPASS_WRITE_GPR_NUM_REG  [i]->read(); // RD
+		Tgeneral_data_t    data       = out_BYPASS_WRITE_GPR_DATA     [i]->read();
+
+		LABEL(" * Accepted BYPASS_WRITE  in register [%d][%d] (GPR)", ooo_engine_id,num_reg);
+			    
+
+		TEST(bool           , gpr_use [ooo_engine_id][num_reg], 1);
+		TEST(Tgeneral_data_t, gpr     [ooo_engine_id][num_reg], data);
+	      }
+	    if (out_BYPASS_WRITE_SPR_VAL      [i]->read())
+	      {
+		Tspecial_address_t num_reg    = out_BYPASS_WRITE_SPR_NUM_REG  [i]->read(); // RE
+		Tspecial_data_t    data       = out_BYPASS_WRITE_SPR_DATA     [i]->read();
+
+		LABEL(" * Accepted BYPASS_WRITE  in register [%d][%d] (SPR)", ooo_engine_id,num_reg);
+
+		TEST(bool           , spr_use [ooo_engine_id][num_reg], 1);
+		TEST(Tspecial_data_t, spr     [ooo_engine_id][num_reg], data);
+	      }
+	  }
+	
+	// ======================================================================
+	// ======================================================================
+	// ======================================================================
+	if ( in_WRITE_QUEUE_IN_VAL->read() and
+	    out_WRITE_QUEUE_IN_ACK->read())
+	  {
+	    LABEL(" * Accepted WRITE_QUEUE_IN  [%d]",nb_request_in);
+// 	    std::cout << *request [nb_request_in] << std::endl;
+
+	    if (request [nb_request_in]->_write_rd)
+	      {
+		gpr_val [request [nb_request_in]->_ooo_engine_id][request [nb_request_in]->_num_reg_rd] = 0;
+		gpr_use [request [nb_request_in]->_ooo_engine_id][request [nb_request_in]->_num_reg_rd] = 1;
+		gpr     [request [nb_request_in]->_ooo_engine_id][request [nb_request_in]->_num_reg_rd] = request [nb_request_in]->_data_rd;
+	      }
+	    if (request [nb_request_in]->_write_re)
+	      {
+		spr_val [request [nb_request_in]->_ooo_engine_id][request [nb_request_in]->_num_reg_re] = 0;
+		spr_use [request [nb_request_in]->_ooo_engine_id][request [nb_request_in]->_num_reg_re] = 1;
+		spr     [request [nb_request_in]->_ooo_engine_id][request [nb_request_in]->_num_reg_re] = request [nb_request_in]->_data_re;
+	      }
+	    nb_request_in ++;
+	  }
+	
+	// ======================================================================
+	// ======================================================================
+	// ======================================================================
+	if (out_WRITE_QUEUE_OUT_VAL->read() and
+	     in_WRITE_QUEUE_OUT_ACK->read())
+	  {
+	    Tcontext_t packet;
+	    if (_param->_have_port_rob_ptr)
+	      packet = out_WRITE_QUEUE_OUT_PACKET_ID->read();
+	    else
+	      packet = 0;
+
+	    LABEL(" * Accepted WRITE_QUEUE_OUT [%d]",packet);
+// 	    std::cout << *request [packet] << std::endl;
+
+	    if (request [packet]->_write_rd)
+	      {
+		TEST(bool, gpr_val [request [packet]->_ooo_engine_id][request [packet]->_num_reg_rd], 1);
+		TEST(bool, gpr_use [request [packet]->_ooo_engine_id][request [packet]->_num_reg_rd], 1);
+		gpr_use [request [packet]->_ooo_engine_id][request [packet]->_num_reg_rd] = 0;
+	      }
+	    if (request [packet]->_write_re)
+	      {
+		TEST(bool, spr_val [request [packet]->_ooo_engine_id][request [packet]->_num_reg_re], 1);
+		TEST(bool, spr_use [request [packet]->_ooo_engine_id][request [packet]->_num_reg_re], 1);
+		spr_use [request [packet]->_ooo_engine_id][request [packet]->_num_reg_re] = 0;
+	      }
+
+	    if (_param->_have_port_context_id)
+	    TEST(Tcontext_t     , out_WRITE_QUEUE_OUT_CONTEXT_ID   ->read(), request [packet]->_context_id   );
+	    if (_param->_have_port_front_end_id)
+	    TEST(Tcontext_t     , out_WRITE_QUEUE_OUT_FRONT_END_ID ->read(), request [packet]->_front_end_id );
+	    if (_param->_have_port_ooo_engine_id)
+	    TEST(Tcontext_t     , out_WRITE_QUEUE_OUT_OOO_ENGINE_ID->read(), request [packet]->_ooo_engine_id);
+	    
+	  //TEST(Toperation_t   , out_WRITE_QUEUE_OUT_OPERATION    ->read(), request [packet]->_operation    );
+	  //TEST(Ttype_t        , out_WRITE_QUEUE_OUT_TYPE         ->read(), request [packet]->_type         );
+	    TEST(Tcontrol_t     , out_WRITE_QUEUE_OUT_FLAGS        ->read(), request [packet]->_data_re      );
+	    TEST(Texception_t   , out_WRITE_QUEUE_OUT_EXCEPTION    ->read(), request [packet]->_exception    );
+	    TEST(Tcontrol_t     , out_WRITE_QUEUE_OUT_NO_SEQUENCE  ->read(), request [packet]->_no_sequence  );
+	    TEST(Tgeneral_data_t, out_WRITE_QUEUE_OUT_ADDRESS      ->read(), request [packet]->_address      );
+	    TEST(Tgeneral_data_t, out_WRITE_QUEUE_OUT_DATA         ->read(), request [packet]->_data_rd      );
+
+	    nb_request_out ++;
+	  }
+
+	SC_CYCLE(1);
+      }
+
+      for (uint32_t i=0; i<_param->_nb_packet; i++)
+	delete request [i];
+
+    }
+      
+      /********************************************************
+       * Simulation - End
+       ********************************************************/
+      
+      TEST_OK ("");
+      
+      sc_stop();
+      delete _time;
+      
+      msgInformation(_("<%s> : ............ Stop Simulation\n"),name.c_str());
+    }
+#endif
+}
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/SelfTest/src/top_usage.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/SelfTest/src/top_usage.cpp	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/SelfTest/src/top_usage.cpp	(revision 113)
@@ -0,0 +1,33 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/SelfTest/include/top.h"
+
+void top::usage 
+(
+#ifdef MTI_SYSTEMC
+ int argc, const char * const * argv
+#else
+ int argc, char * argv[]
+#endif
+ )
+{
+  msgError (_("<Usage> %s name_instance list_params.\n"),argv[0]);
+  msgError (_("list_params is :\n"));
+  msgError (_(" * size_queue          (uint32_t)\n"));
+  msgError (_(" * nb_context          (uint32_t)\n"));
+  msgError (_(" * nb_front_end        (uint32_t)\n"));
+  msgError (_(" * nb_ooo_engine       (uint32_t)\n"));
+  msgError (_(" * nb_packet           (uint32_t)\n"));
+  msgError (_(" * size_general_data   (uint32_t)\n"));
+  msgError (_(" * nb_general_register (uint32_t)\n"));
+  msgError (_(" * size_special_data   (uint32_t)\n"));
+  msgError (_(" * nb_special_register (uint32_t)\n"));
+  msgError (_(" * nb_bypass_write     (uint32_t)\n"));
+
+  exit (1);
+}
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/include/Write_queue.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/include/Write_queue.h	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/include/Write_queue.h	(revision 113)
@@ -30,4 +30,6 @@
 #include "Behavioural/include/Usage.h"
 
+#include "Behavioural/Generic/Queue/include/Queue.h"
+
 namespace morpheo {
 namespace behavioural {
@@ -48,5 +50,5 @@
   protected : const std::string  _name;
   protected : const Parameters * _param;
-  private   : const Tusage_t     _usage;
+  public    :       Tusage_t     _usage;
 
 #ifdef STATISTICS
@@ -126,4 +128,6 @@
 
     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
+  private   : morpheo::behavioural::generic::queue::Parameters * _param_queue;
+  private   : morpheo::behavioural::generic::queue::Queue      * _component_queue;
 
     // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Parameters.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Parameters.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Parameters.cpp	(revision 113)
@@ -30,5 +30,6 @@
 			  uint32_t nb_special_register,
 			  uint32_t nb_bypass_write    ,
-                          bool     is_toplevel)
+                          bool     is_toplevel):
+    behavioural::Parameters ("Write_queue")
   {
     log_printf(FUNC,Write_queue,FUNCTION,"Begin");
@@ -67,20 +68,4 @@
         copy();
       }
-
-    _size_internal_queue = 
-      ( _size_context_id          +  
-        _size_front_end_id        +  
-        _size_ooo_engine_id       +  
-        _size_rob_ptr             + 
-        1                         +
-        _size_general_register    +
-        _size_general_data        +
-        1                         +
-        _size_special_register    +
-        _size_special_data        +
-        _size_exception           +
-        1                         +
-        _size_instruction_address
-       );
 
     log_printf(FUNC,Write_queue,FUNCTION,"End");
@@ -134,4 +119,21 @@
   {
     log_printf(FUNC,Write_queue,FUNCTION,"Begin");
+
+    _size_internal_queue = 
+      ( _size_context_id          +  
+        _size_front_end_id        +  
+        _size_ooo_engine_id       +  
+        _size_rob_ptr             + 
+        1                         +
+        _size_general_register    +
+        _size_general_data        +
+        1                         +
+        _size_special_register    +
+        _size_special_data        +
+        _size_exception           +
+        1                         +
+        _size_instruction_address
+       );
+
     log_printf(FUNC,Write_queue,FUNCTION,"End");
   };
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Parameters_msg_error.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Parameters_msg_error.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Parameters_msg_error.cpp	(revision 113)
@@ -26,8 +26,8 @@
     log_printf(FUNC,Write_queue,FUNCTION,"Begin");
 
-    Parameters_test test ("Write_queue");
+    Parameters_test test (_type);
 
     if (_nb_bypass_write > _size_queue)
-      test.error("The write_queue can't have more bypass_write than entry in the queue.");
+      test.error("The write_queue can't have more bypass_write than entry in the queue.\n");
 
     log_printf(FUNC,Write_queue,FUNCTION,"End");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue.cpp	(revision 113)
@@ -37,13 +37,13 @@
     ,_usage            (usage)
   {
-    log_printf(FUNC,Write_queue,FUNCTION,"Begin");
+    log_begin(Write_queue,FUNCTION);
 
-#if DEBUG_Write_queue == true
-    log_printf(INFO,Write_queue,FUNCTION,_("<%s> Parameters"),_name.c_str());
+// #if DEBUG_Write_queue == true
+//     log_printf(INFO,Write_queue,FUNCTION,_("<%s> Parameters"),_name.c_str());
 
-    std::cout << *param << std::endl;
-#endif    
+//     std::cout << *param << std::endl;
+// #endif    
 
-    log_printf(INFO,Write_queue,FUNCTION,"Allocation");
+    log_printf(INFO,Write_queue,FUNCTION,_("<%s> Allocation"),_name.c_str());
     allocation ();
 
@@ -51,5 +51,5 @@
     if (usage_is_set(_usage,USE_STATISTICS))
       {	
-	log_printf(INFO,Write_queue,FUNCTION,"Allocation of statistics");
+	log_printf(INFO,Write_queue,FUNCTION,_("<%s> Allocation of statistics"),_name.c_str());
 
 	statistics_declaration(param_statistics);
@@ -61,5 +61,5 @@
       {
 	// generate the vhdl
-	log_printf(INFO,Write_queue,FUNCTION,"Generate the vhdl");
+	log_printf(INFO,Write_queue,FUNCTION,_("<%s> Generate the vhdl"),_name.c_str());
 	
 	vhdl();
@@ -70,5 +70,5 @@
     if (usage_is_set(_usage,USE_SYSTEMC))
       {
-	log_printf(INFO,Write_queue,FUNCTION,"Method - transition");
+	log_printf(INFO,Write_queue,FUNCTION,_("<%s> Method - transition"),_name.c_str());
 
 	SC_METHOD (transition);
@@ -80,5 +80,5 @@
 # endif    
 
-	log_printf(INFO,Write_queue,FUNCTION,"Method - genMoore");
+	log_printf(INFO,Write_queue,FUNCTION,_("<%s> Method - genMoore"),_name.c_str());
 
 	SC_METHOD (genMoore);
@@ -92,5 +92,5 @@
 #endif
       }
-    log_printf(FUNC,Write_queue,FUNCTION,"End");
+    log_end(Write_queue,FUNCTION);
   };
     
@@ -99,10 +99,10 @@
   Write_queue::~Write_queue (void)
   {
-    log_printf(FUNC,Write_queue,FUNCTION,"Begin");
+    log_begin(Write_queue,FUNCTION);
 
 #ifdef STATISTICS
     if (usage_is_set(_usage,USE_STATISTICS))
       {
-	log_printf(INFO,Write_queue,FUNCTION,"Generate Statistics file");
+	log_printf(INFO,Write_queue,FUNCTION,_("<%s> Generate Statistics file"),_name.c_str());
 	
 	delete _stat;
@@ -110,8 +110,8 @@
 #endif
 
-    log_printf(INFO,Write_queue,FUNCTION,"Deallocation");
+    log_printf(INFO,Write_queue,FUNCTION,_("<%s> Deallocation"),_name.c_str());
     deallocation ();
 
-    log_printf(FUNC,Write_queue,FUNCTION,"End");
+    log_end(Write_queue,FUNCTION);
   };
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_allocation.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_allocation.cpp	(revision 113)
@@ -28,5 +28,5 @@
 
     Entity * entity = _component->set_entity (_name       
-					      ,"Write_queue"
+					      ,_param->_type
 #ifdef POSITION
 					      ,COMBINATORY 
@@ -136,7 +136,32 @@
      }
 
-    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
+    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
 
      _queue = new std::list<write_queue_entry_t *>;
+
+    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
+    _param_queue = new morpheo::behavioural::generic::queue::Parameters
+      (_param->_size_queue,
+       _param->_size_internal_queue,
+       _param->_nb_bypass_write,
+       false,
+       false
+       );
+
+    std::string queue_name = _name + "_queue";
+    _component_queue = new morpheo::behavioural::generic::queue::Queue
+      (queue_name.c_str()
+#ifdef STATISTICS
+       ,NULL
+#endif
+       ,_param_queue
+       ,USE_VHDL);
+    
+    _component->set_component(_component_queue->_component
+#ifdef POSITION
+                              , 50, 50, 50, 50
+#endif
+                              , INSTANCE_LIBRARY
+                              );
 
 #ifdef POSITION
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_deallocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_deallocation.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_deallocation.cpp	(revision 113)
@@ -92,4 +92,6 @@
 
     delete _component;
+    delete _component_queue;
+    delete _param_queue;
 
     log_printf(FUNC,Write_queue,FUNCTION,"End");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_statistics_declaration.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_statistics_declaration.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_statistics_declaration.cpp	(revision 113)
@@ -26,5 +26,5 @@
 
     _stat = new Stat (static_cast<std::string>(_name),
-		      "Write_queue",
+		      _param->_type,
 		      param_statistics);
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_vhdl.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_vhdl.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_vhdl.cpp	(revision 113)
@@ -9,5 +9,4 @@
 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/include/Write_queue.h"
 #include "Behavioural/include/Vhdl.h"
-#include "Behavioural/Generic/Queue/include/Queue.h"
 
 namespace morpheo                    {
@@ -26,35 +25,4 @@
   {
     log_printf(FUNC,Write_queue,FUNCTION,"Begin");
-
-    morpheo::behavioural::generic::queue::Parameters * param_queue;
-    morpheo::behavioural::generic::queue::Queue      * queue;
-    
-    param_queue = new morpheo::behavioural::generic::queue::Parameters
-      (_param->_size_queue,
-       _param->_size_internal_queue,
-       _param->_nb_bypass_write,
-       false,
-       false
-       );
-
-    std::cout << "size internal queue :" << _param->_size_internal_queue << "." << std::endl;
-
-    std::string queue_name = _name + "_queue";
-    queue = new morpheo::behavioural::generic::queue::Queue
-      (queue_name.c_str()
-#ifdef STATISTICS
-       ,NULL
-#endif
-       ,param_queue
-       ,USE_VHDL);
-    
-    _component->set_component(queue->_component
-#ifdef POSITION
-                              , 50, 50, 50, 50
-#endif
-                              , INSTANCE_LIBRARY
-                              );
-
-
 
     Vhdl * vhdl = new Vhdl (_name);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_vhdl_declaration.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_vhdl_declaration.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Write_queue/src/Write_queue_vhdl_declaration.cpp	(revision 113)
@@ -54,5 +54,5 @@
     uint32_t min = 0;
     uint32_t max, size;
-    uint32_t min_ooo, max_ooo;
+    uint32_t min_ooo, max_ooo = 0;
     uint32_t pos_write_rd, min_gpr_num_reg, max_gpr_num_reg, min_gpr_data, max_gpr_data;
     uint32_t pos_write_re, min_spr_num_reg, max_spr_num_reg, min_spr_data, max_spr_data;
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/include/Write_unit.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/include/Write_unit.h	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/include/Write_unit.h	(revision 113)
@@ -48,5 +48,5 @@
   protected : const std::string  _name;
   protected : const Parameters * _param;
-  private   : const Tusage_t     _usage;
+  public    :       Tusage_t     _usage;
 
 #ifdef STATISTICS
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/src/Parameters.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/src/Parameters.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/src/Parameters.cpp	(revision 113)
@@ -30,5 +30,6 @@
 			  uint32_t nb_special_register,
 			  uint32_t nb_bypass_write    ,
-                          bool     is_toplevel        )
+                          bool     is_toplevel        ):
+    behavioural::Parameters("Write_unit")
   {
     log_printf(FUNC,Write_unit,FUNCTION,"Begin");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/src/Write_unit.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/src/Write_unit.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/src/Write_unit.cpp	(revision 113)
@@ -36,13 +36,13 @@
     ,_usage            (usage)
   {
-    log_printf(FUNC,Write_unit,FUNCTION,"Begin");
+    log_begin(Write_unit,FUNCTION);
 
-#if DEBUG_Write_unit == true
-    log_printf(INFO,Write_unit,FUNCTION,_("<%s> Parameters"),_name.c_str());
+// #if DEBUG_Write_unit == true
+//     log_printf(INFO,Write_unit,FUNCTION,_("<%s> Parameters"),_name.c_str());
 
-    std::cout << *param << std::endl;
-#endif    
+//     std::cout << *param << std::endl;
+// #endif    
 
-    log_printf(INFO,Write_unit,FUNCTION,"Allocation");
+    log_printf(INFO,Write_unit,FUNCTION,_("<%s> Allocation"),_name.c_str());
 
     allocation (
@@ -55,5 +55,5 @@
     if (usage_is_set(_usage,USE_STATISTICS))
       {	
-	log_printf(INFO,Write_unit,FUNCTION,"Allocation of statistics");
+	log_printf(INFO,Write_unit,FUNCTION,_("<%s> Allocation of statistics"),_name.c_str());
 
 	statistics_declaration(param_statistics);
@@ -65,5 +65,5 @@
       {
 	// generate the vhdl
-	log_printf(INFO,Write_unit,FUNCTION,"Generate the vhdl");
+	log_printf(INFO,Write_unit,FUNCTION,_("<%s> Generate the vhdl"),_name.c_str());
 	
 	vhdl();
@@ -74,5 +74,5 @@
     if (usage_is_set(_usage,USE_SYSTEMC))
       {
-	log_printf(INFO,Write_unit,FUNCTION,"Method - transition");
+	log_printf(INFO,Write_unit,FUNCTION,_("<%s> Method - transition"),_name.c_str());
 
 	SC_METHOD (transition);
@@ -86,5 +86,5 @@
 #endif
       }
-    log_printf(FUNC,Write_unit,FUNCTION,"End");
+    log_end(Write_unit,FUNCTION);
   };
     
@@ -93,10 +93,10 @@
   Write_unit::~Write_unit (void)
   {
-    log_printf(FUNC,Write_unit,FUNCTION,"Begin");
+    log_begin(Write_unit,FUNCTION);
 
 #ifdef STATISTICS
     if (usage_is_set(_usage,USE_STATISTICS))
       {
-	log_printf(INFO,Write_unit,FUNCTION,"Generate Statistics file");
+	log_printf(INFO,Write_unit,FUNCTION,_("<%s> Generate Statistics file"),_name.c_str());
 
 	delete _stat;
@@ -104,8 +104,8 @@
 #endif
 
-    log_printf(INFO,Write_unit,FUNCTION,"Deallocation");
+    log_printf(INFO,Write_unit,FUNCTION,_("<%s> Deallocation"),_name.c_str());
     deallocation ();
 
-    log_printf(FUNC,Write_unit,FUNCTION,"End");
+    log_end(Write_unit,FUNCTION);
   };
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/src/Write_unit_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/src/Write_unit_allocation.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/src/Write_unit_allocation.cpp	(revision 113)
@@ -34,5 +34,5 @@
 
     Entity * entity = _component->set_entity (_name       
-                                              ,"Write_unit"
+                                              ,_param->_type
 #ifdef POSITION
                                               ,COMBINATORY 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/src/Write_unit_statistics_declaration.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/src/Write_unit_statistics_declaration.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/src/Write_unit_statistics_declaration.cpp	(revision 113)
@@ -25,9 +25,11 @@
 
     _stat       = new Stat (static_cast<std::string>(_name),
-			    "Write_unit",
+			    _param->_type,
 			    param_statistics);
 
-    _stat->add_stat(component_write_queue->_stat);
-    if (_param->_have_component_execute_queue)
+    if (usage_is_set(component_write_queue->_usage,USE_STATISTICS))
+      _stat->add_stat(component_write_queue->_stat);
+    
+    if (_param->_have_component_execute_queue and (usage_is_set(component_execute_queue->_usage,USE_STATISTICS)))
       _stat->add_stat(component_execute_queue->_stat);
 	
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Execution_unit_to_Write_unit/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Execution_unit_to_Write_unit/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Execution_unit_to_Write_unit/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Execute_unit_to_Write_unit
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Read_unit_to_Execution_unit/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Read_unit_to_Execution_unit/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Network/Read_unit_to_Execution_unit/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Read_unit_to_Execution_unit
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Makefile.defs	(revision 113)
@@ -2,10 +2,12 @@
 # $Id$
 # 
-# [ Description ]
+# [ Description ]
 # 
 # Makefile
 # 
 
-#-----[ Directory ]----------------------------------------
+ENTITY                          = Register_unit
+
+#-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../../..
 DIR_MORPHEO			= $(DIR_COMPONENT)/$(DIR_COMPONENT_MORPHEO)
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/Makefile.defs	(revision 113)
@@ -2,10 +2,12 @@
 # $Id$
 # 
-# [ Description ]
+# [ Description ]
 # 
 # Makefile
 # 
 
-#-----[ Directory ]----------------------------------------
+ENTITY                          = Register_unit_Glue
+
+#-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../../../..
 DIR_MORPHEO			= $(DIR_COMPONENT)/$(DIR_COMPONENT_MORPHEO)
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Context_State
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/Instruction/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/Instruction/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/Instruction/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Instruction
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../../../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Decod
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/SelfTest/src/test.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/SelfTest/src/test.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/SelfTest/src/test.cpp	(revision 113)
@@ -51,4 +51,62 @@
   sc_clock              *  in_CLOCK  = new sc_clock ("clock", 1.0, 0.5);	 
   sc_signal<Tcontrol_t> *  in_NRESET = new sc_signal<Tcontrol_t> ("NRESET");
+
+  sc_signal<Tcontrol_t         > ***  in_IFETCH_VAL                         ;//[nb_context][nb_inst_fetch]
+  sc_signal<Tcontrol_t         > *** out_IFETCH_ACK                         ;//[nb_context][nb_inst_fetch]
+  sc_signal<Tinstruction_t     > ***  in_IFETCH_INSTRUCTION                 ;//[nb_context][nb_inst_fetch]
+  sc_signal<Tcontext_t         >  **  in_IFETCH_CONTEXT_ID                  ;//[nb_context]
+  sc_signal<Tgeneral_address_t >  **  in_IFETCH_ADDRESS                     ;//[nb_context]
+//sc_signal<Tgeneral_address_t >  **  in_IFETCH_ADDRESS_NEXT                ;//[nb_context]
+  sc_signal<Tinst_ifetch_ptr_t >  **  in_IFETCH_INST_IFETCH_PTR             ;//[nb_context]
+  sc_signal<Tbranch_state_t    >  **  in_IFETCH_BRANCH_STATE                ;//[nb_context]
+  sc_signal<Tprediction_ptr_t  >  **  in_IFETCH_BRANCH_UPDATE_PREDICTION_ID ;//[nb_context]
+  sc_signal<Texception_t       >  **  in_IFETCH_EXCEPTION                   ;//[nb_context]
+  sc_signal<Tcontrol_t         >  ** out_DECOD_VAL                          ;//[nb_inst_decod]
+  sc_signal<Tcontrol_t         >  **  in_DECOD_ACK                          ;//[nb_inst_decod]
+  sc_signal<Tcontext_t         >  ** out_DECOD_CONTEXT_ID                   ;//[nb_inst_decod]
+  sc_signal<Tdepth_t           >  ** out_DECOD_DEPTH                        ;//[nb_inst_decod]
+  sc_signal<Ttype_t            >  ** out_DECOD_TYPE                         ;//[nb_inst_decod]
+  sc_signal<Toperation_t       >  ** out_DECOD_OPERATION                    ;//[nb_inst_decod]
+  sc_signal<Tcontrol_t         >  ** out_DECOD_NO_EXECUTE                   ;//[nb_inst_decod]
+  sc_signal<Tcontrol_t         >  ** out_DECOD_IS_DELAY_SLOT                ;//[nb_inst_decod]
+  sc_signal<Tgeneral_data_t    >  ** out_DECOD_ADDRESS                      ;//[nb_inst_decod]
+  sc_signal<Tgeneral_data_t    >  ** out_DECOD_ADDRESS_NEXT                 ;//[nb_inst_decod]
+  sc_signal<Tcontrol_t         >  ** out_DECOD_HAS_IMMEDIAT                 ;//[nb_inst_decod]
+  sc_signal<Tgeneral_data_t    >  ** out_DECOD_IMMEDIAT                     ;//[nb_inst_decod]
+  sc_signal<Tcontrol_t         >  ** out_DECOD_READ_RA                      ;//[nb_inst_decod]
+  sc_signal<Tgeneral_address_t >  ** out_DECOD_NUM_REG_RA                   ;//[nb_inst_decod]
+  sc_signal<Tcontrol_t         >  ** out_DECOD_READ_RB                      ;//[nb_inst_decod]
+  sc_signal<Tgeneral_address_t >  ** out_DECOD_NUM_REG_RB                   ;//[nb_inst_decod]
+  sc_signal<Tcontrol_t         >  ** out_DECOD_READ_RC                      ;//[nb_inst_decod]
+  sc_signal<Tspecial_address_t >  ** out_DECOD_NUM_REG_RC                   ;//[nb_inst_decod]
+  sc_signal<Tcontrol_t         >  ** out_DECOD_WRITE_RD                     ;//[nb_inst_decod]
+  sc_signal<Tgeneral_address_t >  ** out_DECOD_NUM_REG_RD                   ;//[nb_inst_decod]
+  sc_signal<Tcontrol_t         >  ** out_DECOD_WRITE_RE                     ;//[nb_inst_decod]
+  sc_signal<Tspecial_address_t >  ** out_DECOD_NUM_REG_RE                   ;//[nb_inst_decod]
+  sc_signal<Texception_t       >  ** out_DECOD_EXCEPTION_USE                ;//[nb_inst_decod]
+  sc_signal<Texception_t       >  ** out_DECOD_EXCEPTION                    ;//[nb_inst_decod]
+  sc_signal<Tcontrol_t         >  ** out_PREDICT_VAL                        ;//[nb_inst_decod]
+  sc_signal<Tcontrol_t         >  **  in_PREDICT_ACK                        ;//[nb_inst_decod]
+  sc_signal<Tcontext_t         >  ** out_PREDICT_CONTEXT_ID                 ;//[nb_inst_decod]
+  sc_signal<Tcontrol_t         >  ** out_PREDICT_MATCH_INST_IFETCH_PTR      ;//[nb_inst_decod]
+  sc_signal<Tbranch_state_t    >  ** out_PREDICT_BRANCH_STATE               ;//[nb_inst_decod]
+  sc_signal<Tprediction_ptr_t  >  ** out_PREDICT_BRANCH_UPDATE_PREDICTION_ID;//[nb_inst_decod]
+  sc_signal<Tbranch_condition_t>  ** out_PREDICT_BRANCH_CONDITION           ;//[nb_inst_decod]
+//sc_signal<Tcontrol_t         >  ** out_PREDICT_BRANCH_STACK_WRITE         ;//[nb_inst_decod]
+  sc_signal<Tcontrol_t         >  ** out_PREDICT_BRANCH_DIRECTION           ;//[nb_inst_decod]
+  sc_signal<Tgeneral_data_t    >  ** out_PREDICT_ADDRESS_SRC                ;//[nb_inst_decod]
+  sc_signal<Tgeneral_data_t    >  ** out_PREDICT_ADDRESS_DEST               ;//[nb_inst_decod]
+  sc_signal<Tcontrol_t         >  **  in_PREDICT_CAN_CONTINUE               ;//[nb_inst_decod]
+  sc_signal<Tcontrol_t         >  **  in_CONTEXT_DECOD_ENABLE               ;//[nb_context]
+  sc_signal<Tcontrol_t         >  **  in_CONTEXT_DEPTH_VAL                  ;//[nb_context]
+  sc_signal<Tdepth_t           >  **  in_CONTEXT_DEPTH                      ;//[nb_context]
+  sc_signal<Tcontrol_t         >   * out_CONTEXT_EVENT_VAL                  ;
+  sc_signal<Tcontrol_t         >   *  in_CONTEXT_EVENT_ACK                  ;
+  sc_signal<Tcontext_t         >   * out_CONTEXT_EVENT_CONTEXT_ID           ;
+  sc_signal<Tdepth_t           >   * out_CONTEXT_EVENT_DEPTH                ;
+  sc_signal<Tevent_type_t      >   * out_CONTEXT_EVENT_TYPE                 ;
+  sc_signal<Tcontrol_t         >   * out_CONTEXT_EVENT_IS_DELAY_SLOT        ;
+  sc_signal<Tgeneral_data_t    >   * out_CONTEXT_EVENT_ADDRESS              ;
+  sc_signal<Tgeneral_data_t    >   * out_CONTEXT_EVENT_ADDRESS_EPCR         ;
 
   ALLOC2_SC_SIGNAL( in_IFETCH_VAL                         ," in_IFETCH_VAL                         ",Tcontrol_t         ,_param->_nb_context,_param->_nb_inst_fetch[it1]);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Decod_queue
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/SelfTest/src/test.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/SelfTest/src/test.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/SelfTest/src/test.cpp	(revision 113)
@@ -51,4 +51,57 @@
   sc_clock              *  in_CLOCK  = new sc_clock ("clock", 1.0, 0.5);	 
   sc_signal<Tcontrol_t> *  in_NRESET = new sc_signal<Tcontrol_t> ("NRESET");
+
+  sc_signal<Tcontrol_t         >  **  in_DECOD_IN_VAL            ;//[nb_inst_decod]
+  sc_signal<Tcontrol_t         >  ** out_DECOD_IN_ACK            ;//[nb_inst_decod]
+  sc_signal<Tcontext_t         >  **  in_DECOD_IN_CONTEXT_ID     ;//[nb_inst_decod]
+  sc_signal<Tdepth_t           >  **  in_DECOD_IN_DEPTH          ;//[nb_inst_decod]
+  sc_signal<Ttype_t            >  **  in_DECOD_IN_TYPE           ;//[nb_inst_decod]
+  sc_signal<Toperation_t       >  **  in_DECOD_IN_OPERATION      ;//[nb_inst_decod]
+  sc_signal<Tcontrol_t         >  **  in_DECOD_IN_NO_EXECUTE     ;//[nb_inst_decod]
+  sc_signal<Tcontrol_t         >  **  in_DECOD_IN_IS_DELAY_SLOT  ;//[nb_inst_decod]
+  sc_signal<Tgeneral_data_t    >  **  in_DECOD_IN_ADDRESS        ;//[nb_inst_decod]
+  sc_signal<Tgeneral_data_t    >  **  in_DECOD_IN_ADDRESS_NEXT   ;//[nb_inst_decod]
+  sc_signal<Tcontrol_t         >  **  in_DECOD_IN_HAS_IMMEDIAT   ;//[nb_inst_decod]
+  sc_signal<Tgeneral_data_t    >  **  in_DECOD_IN_IMMEDIAT       ;//[nb_inst_decod]
+  sc_signal<Tcontrol_t         >  **  in_DECOD_IN_READ_RA        ;//[nb_inst_decod]
+  sc_signal<Tgeneral_address_t >  **  in_DECOD_IN_NUM_REG_RA     ;//[nb_inst_decod]
+  sc_signal<Tcontrol_t         >  **  in_DECOD_IN_READ_RB        ;//[nb_inst_decod]
+  sc_signal<Tgeneral_address_t >  **  in_DECOD_IN_NUM_REG_RB     ;//[nb_inst_decod]
+  sc_signal<Tcontrol_t         >  **  in_DECOD_IN_READ_RC        ;//[nb_inst_decod]
+  sc_signal<Tspecial_address_t >  **  in_DECOD_IN_NUM_REG_RC     ;//[nb_inst_decod]
+  sc_signal<Tcontrol_t         >  **  in_DECOD_IN_WRITE_RD       ;//[nb_inst_decod]
+  sc_signal<Tgeneral_address_t >  **  in_DECOD_IN_NUM_REG_RD     ;//[nb_inst_decod]
+  sc_signal<Tcontrol_t         >  **  in_DECOD_IN_WRITE_RE       ;//[nb_inst_decod]
+  sc_signal<Tspecial_address_t >  **  in_DECOD_IN_NUM_REG_RE     ;//[nb_inst_decod]
+  sc_signal<Texception_t       >  **  in_DECOD_IN_EXCEPTION_USE  ;//[nb_inst_decod]
+  sc_signal<Texception_t       >  **  in_DECOD_IN_EXCEPTION      ;//[nb_inst_decod]
+  sc_signal<Tcontrol_t         >  ** out_DECOD_OUT_VAL           ;//[nb_inst_decod]
+  sc_signal<Tcontrol_t         >  **  in_DECOD_OUT_ACK           ;//[nb_inst_decod]
+  sc_signal<Tcontext_t         >  ** out_DECOD_OUT_CONTEXT_ID    ;//[nb_inst_decod]
+  sc_signal<Tdepth_t           >  ** out_DECOD_OUT_DEPTH         ;//[nb_inst_decod]
+  sc_signal<Ttype_t            >  ** out_DECOD_OUT_TYPE          ;//[nb_inst_decod]
+  sc_signal<Toperation_t       >  ** out_DECOD_OUT_OPERATION     ;//[nb_inst_decod]
+  sc_signal<Tcontrol_t         >  ** out_DECOD_OUT_NO_EXECUTE    ;//[nb_inst_decod]
+  sc_signal<Tcontrol_t         >  ** out_DECOD_OUT_IS_DELAY_SLOT ;//[nb_inst_decod]
+  sc_signal<Tgeneral_data_t    >  ** out_DECOD_OUT_ADDRESS       ;//[nb_inst_decod]
+  sc_signal<Tgeneral_data_t    >  ** out_DECOD_OUT_ADDRESS_NEXT  ;//[nb_inst_decod]
+  sc_signal<Tcontrol_t         >  ** out_DECOD_OUT_HAS_IMMEDIAT  ;//[nb_inst_decod]
+  sc_signal<Tgeneral_data_t    >  ** out_DECOD_OUT_IMMEDIAT      ;//[nb_inst_decod]
+  sc_signal<Tcontrol_t         >  ** out_DECOD_OUT_READ_RA       ;//[nb_inst_decod]
+  sc_signal<Tgeneral_address_t >  ** out_DECOD_OUT_NUM_REG_RA    ;//[nb_inst_decod]
+  sc_signal<Tcontrol_t         >  ** out_DECOD_OUT_READ_RB       ;//[nb_inst_decod]
+  sc_signal<Tgeneral_address_t >  ** out_DECOD_OUT_NUM_REG_RB    ;//[nb_inst_decod]
+  sc_signal<Tcontrol_t         >  ** out_DECOD_OUT_READ_RC       ;//[nb_inst_decod]
+  sc_signal<Tspecial_address_t >  ** out_DECOD_OUT_NUM_REG_RC    ;//[nb_inst_decod]
+  sc_signal<Tcontrol_t         >  ** out_DECOD_OUT_WRITE_RD      ;//[nb_inst_decod]
+  sc_signal<Tgeneral_address_t >  ** out_DECOD_OUT_NUM_REG_RD    ;//[nb_inst_decod]
+  sc_signal<Tcontrol_t         >  ** out_DECOD_OUT_WRITE_RE      ;//[nb_inst_decod]
+  sc_signal<Tspecial_address_t >  ** out_DECOD_OUT_NUM_REG_RE    ;//[nb_inst_decod]
+  sc_signal<Texception_t       >  ** out_DECOD_OUT_EXCEPTION_USE ;//[nb_inst_decod]
+  sc_signal<Texception_t       >  ** out_DECOD_OUT_EXCEPTION     ;//[nb_inst_decod]
+  sc_signal<Tdepth_t           >  **  in_DEPTH_MIN               ;//[nb_context]
+  sc_signal<Tdepth_t           >  **  in_DEPTH_MAX               ;//[nb_context]
+  sc_signal<Tcontrol_t         >  **  in_DEPTH_FULL              ;//[nb_context]
+  sc_signal<Tcounter_t         >  ** out_NB_INST_ALL             ;//[nb_context]
 
   ALLOC1_SC_SIGNAL( in_DECOD_IN_VAL            ," in_DECOD_IN_VAL           ",Tcontrol_t         ,_param->_nb_inst_decod);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Decod_unit
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Front_end_Glue/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Front_end_Glue
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Address_management
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/SelfTest/src/test.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/SelfTest/src/test.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Address_management/SelfTest/src/test.cpp	(revision 113)
@@ -50,4 +50,30 @@
   sc_clock              *  in_CLOCK  = new sc_clock ("clock", 1.0, 0.5);	 
   sc_signal<Tcontrol_t> *  in_NRESET = new sc_signal<Tcontrol_t> ("NRESET");
+
+  sc_signal<Tcontrol_t        >    * out_ADDRESS_VAL                         ;
+  sc_signal<Tcontrol_t        >    *  in_ADDRESS_ACK                         ; //icache_req_ack and ifetch_queue_ack
+  sc_signal<Tgeneral_address_t>    * out_ADDRESS_INSTRUCTION_ADDRESS         ;
+  sc_signal<Tcontrol_t        >   ** out_ADDRESS_INSTRUCTION_ENABLE          ; //[nb_instruction]
+  sc_signal<Tinst_ifetch_ptr_t>    * out_ADDRESS_INST_IFETCH_PTR             ;
+  sc_signal<Tbranch_state_t   >    * out_ADDRESS_BRANCH_STATE                ;
+  sc_signal<Tprediction_ptr_t >    * out_ADDRESS_BRANCH_UPDATE_PREDICTION_ID ;
+  sc_signal<Tcontrol_t        >    * out_PREDICT_VAL                         ;
+  sc_signal<Tcontrol_t        >    *  in_PREDICT_ACK                         ;
+  sc_signal<Tgeneral_address_t>    * out_PREDICT_PC_PREVIOUS                 ;
+  sc_signal<Tgeneral_address_t>    * out_PREDICT_PC_CURRENT                  ;
+  sc_signal<Tcontrol_t        >    * out_PREDICT_PC_CURRENT_IS_DS_TAKE       ;
+  sc_signal<Tgeneral_address_t>    *  in_PREDICT_PC_NEXT                     ;
+  sc_signal<Tcontrol_t        >    *  in_PREDICT_PC_NEXT_IS_DS_TAKE          ;
+  sc_signal<Tcontrol_t        >   **  in_PREDICT_INSTRUCTION_ENABLE          ; //[nb_instruction]
+//sc_signal<Tcontrol_t        >    *  in_PREDICT_BRANCH_IS_CURRENT           ;
+  sc_signal<Tbranch_state_t   >    *  in_PREDICT_BRANCH_STATE                ;
+  sc_signal<Tprediction_ptr_t >    *  in_PREDICT_BRANCH_UPDATE_PREDICTION_ID ;
+  sc_signal<Tinst_ifetch_ptr_t>    *  in_PREDICT_INST_IFETCH_PTR             ;
+  sc_signal<Tcontrol_t        >    *  in_EVENT_VAL                           ;
+  sc_signal<Tcontrol_t        >    * out_EVENT_ACK                           ;
+  sc_signal<Tgeneral_address_t>    *  in_EVENT_ADDRESS                       ;
+  sc_signal<Tgeneral_address_t>    *  in_EVENT_ADDRESS_NEXT                  ;
+  sc_signal<Tcontrol_t        >    *  in_EVENT_ADDRESS_NEXT_VAL              ;
+  sc_signal<Tcontrol_t        >    *  in_EVENT_IS_DS_TAKE                    ;
 
   ALLOC0_SC_SIGNAL (out_ADDRESS_VAL                        ,"out_ADDRESS_VAL                        ",Tcontrol_t        );
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Ifetch_queue
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/SelfTest/src/main.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/SelfTest/src/main.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/SelfTest/src/main.cpp	(revision 113)
@@ -7,5 +7,5 @@
 
 #include "Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/SelfTest/include/test.h"
-
+#include "Behavioural/include/Selftest.h"
 #define NB_PARAMS 4
 
@@ -33,10 +33,15 @@
   uint32_t x = 1;
 
-  string name = argv[x++];
-  
-  uint32_t _size_queue                    = fromString<uint32_t>(argv[x++]);
-  uint32_t _nb_instruction                = fromString<uint32_t>(argv[x++]);
-  uint32_t _size_branch_update_prediction = fromString<uint32_t>(argv[x++]);
-  uint32_t _size_general_data             = fromString<uint32_t>(argv[x++]);
+  string   name;
+  uint32_t _size_queue                   ;
+  uint32_t _nb_instruction               ;
+  uint32_t _size_branch_update_prediction;
+  uint32_t _size_general_data            ;
+
+  SELFTEST0( name                         ,string ,argv,x);
+  SELFTEST0(_size_queue                   ,uint32_t,argv,x);
+  SELFTEST0(_nb_instruction               ,uint32_t,argv,x);
+  SELFTEST0(_size_branch_update_prediction,uint32_t,argv,x);
+  SELFTEST0(_size_general_data            ,uint32_t,argv,x);
 
   int _return = EXIT_SUCCESS;
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/SelfTest/src/test.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/SelfTest/src/test.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/SelfTest/src/test.cpp	(revision 113)
@@ -67,4 +67,28 @@
   sc_clock              *  in_CLOCK  = new sc_clock ("clock", 1.0, 0.5);	 
   sc_signal<Tcontrol_t> *  in_NRESET = new sc_signal<Tcontrol_t> ("NRESET");
+
+  sc_signal<Tcontrol_t            >  *  in_ADDRESS_VAL                         ;
+  sc_signal<Tcontrol_t            >  * out_ADDRESS_ACK                         ;
+  sc_signal<Tifetch_queue_ptr_t   >  * out_ADDRESS_IFETCH_QUEUE_ID             ;
+  sc_signal<Tcontrol_t            > **  in_ADDRESS_INSTRUCTION_ENABLE          ;//[nb_instruction]
+  sc_signal<Tgeneral_address_t    >  *  in_ADDRESS_INSTRUCTION_ADDRESS         ;
+  sc_signal<Tinst_ifetch_ptr_t    >  *  in_ADDRESS_INST_IFETCH_PTR             ;
+  sc_signal<Tbranch_state_t       >  *  in_ADDRESS_BRANCH_STATE                ;
+  sc_signal<Tprediction_ptr_t     >  *  in_ADDRESS_BRANCH_UPDATE_PREDICTION_ID ;
+  sc_signal<Tcontrol_t            > ** out_DECOD_VAL                           ;//[nb_instruction]
+  sc_signal<Tcontrol_t            > **  in_DECOD_ACK                           ;//[nb_instruction]
+  sc_signal<Tinstruction_t        > ** out_DECOD_INSTRUCTION                   ;//[nb_instruction]
+  sc_signal<Tgeneral_address_t    >  * out_DECOD_ADDRESS                       ;
+  sc_signal<Tinst_ifetch_ptr_t    >  * out_DECOD_INST_IFETCH_PTR               ;
+  sc_signal<Tbranch_state_t       >  * out_DECOD_BRANCH_STATE                  ;
+  sc_signal<Tprediction_ptr_t     >  * out_DECOD_BRANCH_UPDATE_PREDICTION_ID   ;
+  sc_signal<Texception_t          >  * out_DECOD_EXCEPTION                     ;
+  sc_signal<Tcontrol_t            >  *  in_ICACHE_RSP_VAL                      ;
+  sc_signal<Tcontrol_t            >  * out_ICACHE_RSP_ACK                      ;
+  sc_signal<Tpacket_t             >  *  in_ICACHE_RSP_PACKET_ID                ;
+  sc_signal<Ticache_instruction_t > **  in_ICACHE_RSP_INSTRUCTION              ;//[nb_instruction]
+  sc_signal<Ticache_error_t       >  *  in_ICACHE_RSP_ERROR                    ;
+  sc_signal<Tcontrol_t            >  *  in_EVENT_RESET_VAL                     ;// val if : miss_speculation, exception, synchronization
+  sc_signal<Tcontrol_t            >  * out_EVENT_RESET_ACK                     ;
 
   ALLOC0_SC_SIGNAL( in_ADDRESS_VAL                        ," in_ADDRESS_VAL                        ",Tcontrol_t           );
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/src/Parameters_msg_error.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/src/Parameters_msg_error.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/src/Parameters_msg_error.cpp	(revision 113)
@@ -18,5 +18,4 @@
 namespace ifetch_queue {
 
-
 #undef  FUNCTION
 #define FUNCTION "Ifetch_queue::msg_error"
@@ -28,8 +27,8 @@
 
     if (not is_multiple (_nb_instruction_in_queue,_nb_instruction))
-      test.error("Size of ifetch queue must be a multiple of nb_instruction.\n");
+      test.error(_("Size of ifetch queue must be a multiple of nb_instruction.\n"));
 
     if (_size_queue == 1)
-      test.warning("To best perfomance, size_queue must be > 1.\n");
+      test.warning(_("To best perfomance, size_queue must be > 1.\n"));
     
     log_printf(FUNC,Ifetch_queue,FUNCTION,"End");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_unit_Glue/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_unit_Glue/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_unit_Glue/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Ifetch_unit_Glue
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Ifetch_unit
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Front_end
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Branch_Target_Buffer_Glue
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../../../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Branch_Target_Buffer_Register
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../../../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/include/Branch_Target_Buffer_Register.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/include/Branch_Target_Buffer_Register.h	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/include/Branch_Target_Buffer_Register.h	(revision 113)
@@ -137,4 +137,5 @@
    morpheo::behavioural::Tusage_t                usage
    );
+
   public  :          ~Branch_Target_Buffer_Register             (void);
 					       
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register.cpp	(revision 113)
@@ -8,5 +8,5 @@
 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/include/Branch_Target_Buffer_Register.h"
 
-namespace morpheo                    {
+namespace morpheo {
 namespace behavioural {
 namespace core {
@@ -16,5 +16,4 @@
 namespace branch_target_buffer {
 namespace branch_target_buffer_register {
-
 
 #undef  FUNCTION
@@ -33,7 +32,7 @@
    morpheo::behavioural::Tusage_t usage
    ):
-    _name              (name)
-    ,_param            (param)
-    ,_usage            (usage)
+    _name  (name)
+   ,_param (param)
+   ,_usage (usage)
   {
     log_printf(FUNC,Branch_Target_Buffer_Register,FUNCTION,"Begin");
@@ -160,20 +159,20 @@
 	  }
 
-# ifdef SYSTEMCASS_SPECIFIC
-	// List dependency information
-	for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
-	  {
-	    (*(out_DECOD_HIT [i])) (*(in_DECOD_VAL         [i]));
-	    (*(out_DECOD_HIT [i])) (*(in_DECOD_ADDRESS_SRC [i]));
-	    if (_param->_have_port_context_id)
-	    (*(out_DECOD_HIT [i])) (*(in_DECOD_CONTEXT_ID  [i]));
-
-	    (*(out_DECOD_HIT_INDEX [i])) (*(in_DECOD_VAL         [i]));
-	    (*(out_DECOD_HIT_INDEX [i])) (*(in_DECOD_ADDRESS_SRC [i]));
-	    if (_param->_have_port_context_id)
-	    (*(out_DECOD_HIT_INDEX [i])) (*(in_DECOD_CONTEXT_ID  [i]));
-	  }
-	  }
-#endif
+// # ifdef SYSTEMCASS_SPECIFIC
+// 	// List dependency information
+// 	for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
+// 	  {
+// 	    (*(out_DECOD_HIT [i])) (*(in_DECOD_VAL         [i]));
+// 	    (*(out_DECOD_HIT [i])) (*(in_DECOD_ADDRESS_SRC [i]));
+// 	    if (_param->_have_port_context_id)
+// 	    (*(out_DECOD_HIT [i])) (*(in_DECOD_CONTEXT_ID  [i]));
+
+// 	    (*(out_DECOD_HIT_INDEX [i])) (*(in_DECOD_VAL         [i]));
+// 	    (*(out_DECOD_HIT_INDEX [i])) (*(in_DECOD_ADDRESS_SRC [i]));
+// 	    if (_param->_have_port_context_id)
+// 	    (*(out_DECOD_HIT_INDEX [i])) (*(in_DECOD_CONTEXT_ID  [i]));
+// 	  }
+// #endif
+ 	  }
 
 	if (_param->_have_port_victim)
@@ -192,20 +191,20 @@
 	  }
 
-# ifdef SYSTEMCASS_SPECIFIC
-	// List dependency information
-	for (uint32_t i=0; i<_param->_nb_inst_update; i++)
-	  {
-	    (*(out_UPDATE_HIT [i])) (*(in_UPDATE_VAL         [i]));
-	    (*(out_UPDATE_HIT [i])) (*(in_UPDATE_ADDRESS_SRC [i]));
-	    if (_param->_have_port_context_id)
-	    (*(out_UPDATE_HIT [i])) (*(in_UPDATE_CONTEXT_ID  [i]));
-
-	    (*(out_UPDATE_HIT_INDEX [i])) (*(in_UPDATE_VAL         [i]));
-	    (*(out_UPDATE_HIT_INDEX [i])) (*(in_UPDATE_ADDRESS_SRC [i]));
-	    if (_param->_have_port_context_id)
-	    (*(out_UPDATE_HIT_INDEX [i])) (*(in_UPDATE_CONTEXT_ID  [i]));
-	  }
-	  }
-# endif
+// # ifdef SYSTEMCASS_SPECIFIC
+// 	// List dependency information
+// 	for (uint32_t i=0; i<_param->_nb_inst_update; i++)
+// 	  {
+// 	    (*(out_UPDATE_HIT [i])) (*(in_UPDATE_VAL         [i]));
+// 	    (*(out_UPDATE_HIT [i])) (*(in_UPDATE_ADDRESS_SRC [i]));
+// 	    if (_param->_have_port_context_id)
+// 	    (*(out_UPDATE_HIT [i])) (*(in_UPDATE_CONTEXT_ID  [i]));
+
+// 	    (*(out_UPDATE_HIT_INDEX [i])) (*(in_UPDATE_VAL         [i]));
+// 	    (*(out_UPDATE_HIT_INDEX [i])) (*(in_UPDATE_ADDRESS_SRC [i]));
+// 	    if (_param->_have_port_context_id)
+// 	    (*(out_UPDATE_HIT_INDEX [i])) (*(in_UPDATE_CONTEXT_ID  [i]));
+// 	  }
+// # endif
+ 	  }
 #endif
 
@@ -229,5 +228,4 @@
     log_printf(INFO,Branch_Target_Buffer_Register,FUNCTION,"Deallocation");
     deallocation ();
-
     log_printf(FUNC,Branch_Target_Buffer_Register,FUNCTION,"End");
   };
@@ -239,5 +237,4 @@
 }; // end namespace multi_front_end
 }; // end namespace core
-
 }; // end namespace behavioural
-}; // end namespace morpheo              
+}; // end namespace morpheo
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Branch_Target_Buffer
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Direction_Glue
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../../../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Direction
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Meta_Predictor
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../../../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Meta_Predictor_Glue
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../../../../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Two_Level_Branch_Predictor
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../../../../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Prediction_unit
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Prediction_unit_Glue
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Return_Address_Stack
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Update_Prediction_Table
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/SelfTest/src/test.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/SelfTest/src/test.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/SelfTest/src/test.cpp	(revision 113)
@@ -1276,7 +1276,4 @@
 //                    TEST(Tcontrol_t         ,out_UPDATE_RAS_FLUSH             [port]->read(),0);
                       TEST(Tcontrol_t         ,out_UPDATE_RAS_PUSH              [port]->read(),push_ras  (it_ufpt->condition));
-                      LABEL("KANE : out_UPDATE_RAS_ADDRESS [port]->read() : %.8x",out_UPDATE_RAS_ADDRESS [port]->read());
-                      LABEL("KANE : it_ufpt->ras_address                  : %.8x",it_ufpt->ras_address);
-
                       TEST(Taddress_t         ,out_UPDATE_RAS_ADDRESS           [port]->read(),it_ufpt->ras_address);
                       TEST(Tptr_t             ,out_UPDATE_RAS_INDEX             [port]->read(),it_ufpt->ras_index);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_transition.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_transition.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_transition.cpp	(revision 113)
@@ -117,5 +117,5 @@
                         << std::dec
                         <<         reg_UPDATE_PREDICTION_TABLE [i][bottom]._good_take         << " - "
-                        << "["  << sc_simulation_time() << "] " << " "
+                        << "["  << simulation_cycle() << "] " << " "
                         <<         reg_UPDATE_PREDICTION_TABLE [i][bottom]._miss_prediction   << " "
                         <<         reg_UPDATE_PREDICTION_TABLE [i][bottom]._ifetch_prediction << " "
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Commit_unit
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_transition.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_transition.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_transition.cpp	(revision 113)
@@ -175,6 +175,6 @@
 		  entry->address_next            = PORT_READ(in_INSERT_ADDRESS_NEXT          [x][y]);
 #ifdef DEBUG
-                  entry->cycle_rob_in            = sc_simulation_time();
-                  entry->cycle_commit            = sc_simulation_time();
+                  entry->cycle_rob_in            = simulation_cycle();
+                  entry->cycle_commit            = simulation_cycle();
 #endif
 
@@ -352,5 +352,5 @@
 
 #ifdef DEBUG
-                  entry->cycle_commit            = sc_simulation_time();
+                  entry->cycle_commit            = simulation_cycle();
 #endif
 		  }
@@ -426,5 +426,5 @@
                 // log file
                 instruction_log_file [num_thread] 
-                  << "[" << sc_simulation_time() << "] "
+                  << "[" << simulation_cycle() << "] "
                   << "{" << ((retire_ok)?" OK ":"!KO!") << "} "
                   << std::hex
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Issue_queue
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = OOO_Engine
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/OOO_Engine_Glue/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/OOO_Engine_Glue/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/OOO_Engine_Glue/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = OOO_Engine_Glue
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Reexecute_unit/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Reexecute_unit/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Reexecute_unit/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Reexecute_unit
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Load_Store_pointer_unit
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Rename_unit
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Dependency_checking_unit/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Dependency_checking_unit/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Dependency_checking_unit/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Dependency_checking_unit
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../../../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Free_List_unit
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../../../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/SelfTest/src/test.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/SelfTest/src/test.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Free_List_unit/SelfTest/src/test.cpp	(revision 113)
@@ -49,4 +49,17 @@
   sc_clock              *  in_CLOCK  = new sc_clock ("clock", 1.0, 0.5);	 
   sc_signal<Tcontrol_t> *  in_NRESET = new sc_signal<Tcontrol_t> ("NRESET");
+
+  sc_signal<Tcontrol_t        > **  in_POP_VAL        ;
+  sc_signal<Tcontrol_t        > ** out_POP_ACK        ;
+  sc_signal<Tcontrol_t        > **  in_POP_GPR_VAL    ; // write_rd
+  sc_signal<Tgeneral_address_t> ** out_POP_GPR_NUM_REG; // num_reg_rd
+  sc_signal<Tcontrol_t        > **  in_POP_SPR_VAL    ; // write_re
+  sc_signal<Tspecial_address_t> ** out_POP_SPR_NUM_REG; // num_reg_re
+  sc_signal<Tcontrol_t        > **  in_PUSH_GPR_VAL    ; // gpr_free (cf stat_list)
+  sc_signal<Tcontrol_t        > ** out_PUSH_GPR_ACK    ;
+  sc_signal<Tgeneral_address_t> **  in_PUSH_GPR_NUM_REG;
+  sc_signal<Tcontrol_t        > **  in_PUSH_SPR_VAL    ; // spr_free (cf stat_list)
+  sc_signal<Tcontrol_t        > ** out_PUSH_SPR_ACK    ;
+  sc_signal<Tspecial_address_t> **  in_PUSH_SPR_NUM_REG;
 
   ALLOC1_SC_SIGNAL( in_POP_VAL         ," in_POP_VAL         ",Tcontrol_t        ,_param->_nb_pop );
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Register_translation_unit
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Register_Address_Translation_unit
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../../../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_translation_unit_Glue/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_translation_unit_Glue/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_translation_unit_Glue/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Register_translation_unit_Glue
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../../../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Stat_List_unit
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../../../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/SelfTest/src/test.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/SelfTest/src/test.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/SelfTest/src/test.cpp	(revision 113)
@@ -60,4 +60,40 @@
   sc_clock              *  in_CLOCK  = new sc_clock ("clock", 1.0, 0.5);	 
   sc_signal<Tcontrol_t> *  in_NRESET = new sc_signal<Tcontrol_t> ("NRESET");
+
+  sc_signal<Tcontrol_t        >   **  in_INSERT_VAL               ;//[nb_inst_insert]
+  sc_signal<Tcontrol_t        >   ** out_INSERT_ACK               ;//[nb_inst_insert]
+  sc_signal<Tcontrol_t        >   **  in_INSERT_READ_RA           ;//[nb_inst_insert]
+  sc_signal<Tgeneral_address_t>   **  in_INSERT_NUM_REG_RA_PHY    ;//[nb_inst_insert]
+  sc_signal<Tcontrol_t        >   **  in_INSERT_READ_RB           ;//[nb_inst_insert]
+  sc_signal<Tgeneral_address_t>   **  in_INSERT_NUM_REG_RB_PHY    ;//[nb_inst_insert]
+  sc_signal<Tcontrol_t        >   **  in_INSERT_READ_RC           ;//[nb_inst_insert]
+  sc_signal<Tspecial_address_t>   **  in_INSERT_NUM_REG_RC_PHY    ;//[nb_inst_insert]
+  sc_signal<Tcontrol_t        >   **  in_INSERT_WRITE_RD          ;//[nb_inst_insert]
+  sc_signal<Tgeneral_address_t>   **  in_INSERT_NUM_REG_RD_PHY_NEW;//[nb_inst_insert]
+  sc_signal<Tcontrol_t        >   **  in_INSERT_WRITE_RE          ;//[nb_inst_insert]
+  sc_signal<Tspecial_address_t>   **  in_INSERT_NUM_REG_RE_PHY_NEW;//[nb_inst_insert]
+  sc_signal<Tcontrol_t        >   **  in_RETIRE_VAL               ;//[nb_inst_retire]
+  sc_signal<Tcontrol_t        >   ** out_RETIRE_ACK               ;//[nb_inst_retire]
+  sc_signal<Tcontrol_t        >   **  in_RETIRE_RESTORE           ;//[nb_inst_retire]
+  sc_signal<Tcontrol_t        >   **  in_RETIRE_READ_RA           ;//[nb_inst_retire]
+  sc_signal<Tgeneral_address_t>   **  in_RETIRE_NUM_REG_RA_PHY    ;//[nb_inst_retire]
+  sc_signal<Tcontrol_t        >   **  in_RETIRE_READ_RB           ;//[nb_inst_retire]
+  sc_signal<Tgeneral_address_t>   **  in_RETIRE_NUM_REG_RB_PHY    ;//[nb_inst_retire]
+  sc_signal<Tcontrol_t        >   **  in_RETIRE_READ_RC           ;//[nb_inst_retire]
+  sc_signal<Tspecial_address_t>   **  in_RETIRE_NUM_REG_RC_PHY    ;//[nb_inst_retire]
+  sc_signal<Tcontrol_t        >   **  in_RETIRE_WRITE_RD          ;//[nb_inst_retire]
+  sc_signal<Tcontrol_t        >   **  in_RETIRE_RESTORE_RD_PHY_OLD;//[nb_inst_retire]
+  sc_signal<Tgeneral_address_t>   **  in_RETIRE_NUM_REG_RD_PHY_OLD;//[nb_inst_retire]
+  sc_signal<Tgeneral_address_t>   **  in_RETIRE_NUM_REG_RD_PHY_NEW;//[nb_inst_retire]
+  sc_signal<Tcontrol_t        >   **  in_RETIRE_WRITE_RE          ;//[nb_inst_retire]
+  sc_signal<Tcontrol_t        >   **  in_RETIRE_RESTORE_RE_PHY_OLD;//[nb_inst_retire]
+  sc_signal<Tspecial_address_t>   **  in_RETIRE_NUM_REG_RE_PHY_OLD;//[nb_inst_retire]
+  sc_signal<Tspecial_address_t>   **  in_RETIRE_NUM_REG_RE_PHY_NEW;//[nb_inst_retire]
+  sc_signal<Tcontrol_t        >   ** out_PUSH_GPR_VAL             ;//[nb_reg_free]
+  sc_signal<Tcontrol_t        >   **  in_PUSH_GPR_ACK             ;//[nb_reg_free]
+  sc_signal<Tgeneral_address_t>   ** out_PUSH_GPR_NUM_REG         ;//[nb_reg_free]
+  sc_signal<Tcontrol_t        >   ** out_PUSH_SPR_VAL             ;//[nb_reg_free]
+  sc_signal<Tcontrol_t        >   **  in_PUSH_SPR_ACK             ;//[nb_reg_free]
+  sc_signal<Tspecial_address_t>   ** out_PUSH_SPR_NUM_REG         ;//[nb_reg_free]
 
   ALLOC1_SC_SIGNAL( in_INSERT_VAL               ," in_INSERT_VAL               ",Tcontrol_t        ,_param->_nb_inst_insert);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Rename_select
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_unit_Glue/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_unit_Glue/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_unit_Glue/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Rename_unit_Glue
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Special_Register_unit/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Special_Register_unit/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Special_Register_unit/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Special_Register_unit
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Custom/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Custom/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Custom/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Custom
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Comparator
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/SelfTest/include/test.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/SelfTest/include/test.h	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/SelfTest/include/test.h	(revision 113)
@@ -11,5 +11,5 @@
 #endif
 
-#define NB_ITERATION  1
+#define NB_ITERATION  1024
 #define CYCLE_MAX     (1024*NB_ITERATION)
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/SelfTest/src/main.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/SelfTest/src/main.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/SelfTest/src/main.cpp	(revision 113)
@@ -19,5 +19,4 @@
   err (_(" * type      (Tcomparator_scheme_t)\n"));
 
-
   exit (1);
 }
@@ -34,4 +33,5 @@
   uint32_t x = 1;
 
+  string name = argv[x++];
   uint32_t             _size_data;
   bool                 _is_signed;
@@ -41,6 +41,4 @@
   SELFTEST0(_is_signed,bool                ,argv,x);
   SELFTEST0(_type     ,Tcomparator_scheme_t,argv,x);
-
-  string name = argv[x++];
 
   int _return = EXIT_SUCCESS;
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/SelfTest/src/test.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/SelfTest/src/test.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/SelfTest/src/test.cpp	(revision 113)
@@ -9,4 +9,5 @@
 #include "Behavioural/Generic/Comparator/SelfTest/include/test.h"
 #include "Behavioural/include/Allocation.h"
+#include "Common/include/BitManipulation.h"
 
 void test (string name,
@@ -50,4 +51,12 @@
   sc_clock              *  in_CLOCK  = new sc_clock ("clock", 1.0, 0.5);	 
   sc_signal<Tcontrol_t> *  in_NRESET = new sc_signal<Tcontrol_t> ("NRESET");
+
+  sc_signal<Tdata_t   > *  in_COMPARE_DATA_0;
+  sc_signal<Tdata_t   > *  in_COMPARE_DATA_1;
+  sc_signal<Tcontrol_t> * out_COMPARE_TEST  ;
+
+  ALLOC0_SC_SIGNAL( in_COMPARE_DATA_0," in_COMPARE_DATA_0",Tdata_t   );
+  ALLOC0_SC_SIGNAL( in_COMPARE_DATA_1," in_COMPARE_DATA_1",Tdata_t   );
+  ALLOC0_SC_SIGNAL(out_COMPARE_TEST  ,"out_COMPARE_TEST  ",Tcontrol_t);
   
   /********************************************************
@@ -60,5 +69,8 @@
   (*(_Comparator->in_NRESET))       (*(in_NRESET));
 
-
+  INSTANCE0_SC_SIGNAL(_Comparator, in_COMPARE_DATA_0);
+  INSTANCE0_SC_SIGNAL(_Comparator, in_COMPARE_DATA_1);
+  INSTANCE0_SC_SIGNAL(_Comparator,out_COMPARE_TEST  );
+  
   msg(_("<%s> : Start Simulation ............\n"),name.c_str());
     
@@ -90,4 +102,119 @@
       LABEL("Iteration %d",iteration);
 
+      uint64_t data0 = range<uint64_t>(rand(),_param->_size_data);
+      uint64_t data1 = range<uint64_t>(rand(),_param->_size_data);
+
+      in_COMPARE_DATA_0->write(static_cast<Tdata_t>(data0));
+      in_COMPARE_DATA_1->write(static_cast<Tdata_t>(data1));
+      
+      SC_START(0);
+      
+      Tcontrol_t test = false;
+      switch (_param->_size_data)
+        {
+        case 8 :
+          {
+            if (_param->_is_signed)
+              switch (_param->_type)
+                {
+                case COMPARATOR_EQUAL            : test = static_cast< int8_t>(data0) == static_cast< int8_t>(data1); break;
+                case COMPARATOR_NOT_EQUAL        : test = static_cast< int8_t>(data0) != static_cast< int8_t>(data1); break;
+                case COMPARATOR_GREATER          : test = static_cast< int8_t>(data0) >  static_cast< int8_t>(data1); break;
+                case COMPARATOR_GREATER_OR_EQUAL : test = static_cast< int8_t>(data0) >= static_cast< int8_t>(data1); break;
+                case COMPARATOR_LESS             : test = static_cast< int8_t>(data0) <  static_cast< int8_t>(data1); break;
+                case COMPARATOR_LESS_OR_EQUAL    : test = static_cast< int8_t>(data0) <= static_cast< int8_t>(data1); break;
+                }
+            else
+              switch (_param->_type)
+                {
+                case COMPARATOR_EQUAL            : test = static_cast<uint8_t>(data0) == static_cast<uint8_t>(data1); break;
+                case COMPARATOR_NOT_EQUAL        : test = static_cast<uint8_t>(data0) != static_cast<uint8_t>(data1); break;
+                case COMPARATOR_GREATER          : test = static_cast<uint8_t>(data0) >  static_cast<uint8_t>(data1); break;
+                case COMPARATOR_GREATER_OR_EQUAL : test = static_cast<uint8_t>(data0) >= static_cast<uint8_t>(data1); break;
+                case COMPARATOR_LESS             : test = static_cast<uint8_t>(data0) <  static_cast<uint8_t>(data1); break;
+                case COMPARATOR_LESS_OR_EQUAL    : test = static_cast<uint8_t>(data0) <= static_cast<uint8_t>(data1); break;
+                }
+            break;
+          }
+        case 16 :
+          {
+            if (_param->_is_signed)
+              switch (_param->_type)
+                {
+                case COMPARATOR_EQUAL            : test = static_cast< int16_t>(data0) == static_cast< int16_t>(data1); break;
+                case COMPARATOR_NOT_EQUAL        : test = static_cast< int16_t>(data0) != static_cast< int16_t>(data1); break;
+                case COMPARATOR_GREATER          : test = static_cast< int16_t>(data0) >  static_cast< int16_t>(data1); break;
+                case COMPARATOR_GREATER_OR_EQUAL : test = static_cast< int16_t>(data0) >= static_cast< int16_t>(data1); break;
+                case COMPARATOR_LESS             : test = static_cast< int16_t>(data0) <  static_cast< int16_t>(data1); break;
+                case COMPARATOR_LESS_OR_EQUAL    : test = static_cast< int16_t>(data0) <= static_cast< int16_t>(data1); break;
+                }
+            else
+              switch (_param->_type)
+                {
+                case COMPARATOR_EQUAL            : test = static_cast<uint16_t>(data0) == static_cast<uint16_t>(data1); break;
+                case COMPARATOR_NOT_EQUAL        : test = static_cast<uint16_t>(data0) != static_cast<uint16_t>(data1); break;
+                case COMPARATOR_GREATER          : test = static_cast<uint16_t>(data0) >  static_cast<uint16_t>(data1); break;
+                case COMPARATOR_GREATER_OR_EQUAL : test = static_cast<uint16_t>(data0) >= static_cast<uint16_t>(data1); break;
+                case COMPARATOR_LESS             : test = static_cast<uint16_t>(data0) <  static_cast<uint16_t>(data1); break;
+                case COMPARATOR_LESS_OR_EQUAL    : test = static_cast<uint16_t>(data0) <= static_cast<uint16_t>(data1); break;
+                }
+            break;
+          }
+        case 32 :
+          {
+            if (_param->_is_signed)
+              switch (_param->_type)
+                {
+                case COMPARATOR_EQUAL            : test = static_cast< int32_t>(data0) == static_cast< int32_t>(data1); break;
+                case COMPARATOR_NOT_EQUAL        : test = static_cast< int32_t>(data0) != static_cast< int32_t>(data1); break;
+                case COMPARATOR_GREATER          : test = static_cast< int32_t>(data0) >  static_cast< int32_t>(data1); break;
+                case COMPARATOR_GREATER_OR_EQUAL : test = static_cast< int32_t>(data0) >= static_cast< int32_t>(data1); break;
+                case COMPARATOR_LESS             : test = static_cast< int32_t>(data0) <  static_cast< int32_t>(data1); break;
+                case COMPARATOR_LESS_OR_EQUAL    : test = static_cast< int32_t>(data0) <= static_cast< int32_t>(data1); break;
+                }
+            else
+              switch (_param->_type)
+                {
+                case COMPARATOR_EQUAL            : test = static_cast<uint32_t>(data0) == static_cast<uint32_t>(data1); break;
+                case COMPARATOR_NOT_EQUAL        : test = static_cast<uint32_t>(data0) != static_cast<uint32_t>(data1); break;
+                case COMPARATOR_GREATER          : test = static_cast<uint32_t>(data0) >  static_cast<uint32_t>(data1); break;
+                case COMPARATOR_GREATER_OR_EQUAL : test = static_cast<uint32_t>(data0) >= static_cast<uint32_t>(data1); break;
+                case COMPARATOR_LESS             : test = static_cast<uint32_t>(data0) <  static_cast<uint32_t>(data1); break;
+                case COMPARATOR_LESS_OR_EQUAL    : test = static_cast<uint32_t>(data0) <= static_cast<uint32_t>(data1); break;
+                }
+            break;
+          }
+        case 64 :
+          {
+            if (_param->_is_signed)
+              switch (_param->_type)
+                {
+                case COMPARATOR_EQUAL            : test = static_cast< int64_t>(data0) == static_cast< int64_t>(data1); break;
+                case COMPARATOR_NOT_EQUAL        : test = static_cast< int64_t>(data0) != static_cast< int64_t>(data1); break;
+                case COMPARATOR_GREATER          : test = static_cast< int64_t>(data0) >  static_cast< int64_t>(data1); break;
+                case COMPARATOR_GREATER_OR_EQUAL : test = static_cast< int64_t>(data0) >= static_cast< int64_t>(data1); break;
+                case COMPARATOR_LESS             : test = static_cast< int64_t>(data0) <  static_cast< int64_t>(data1); break;
+                case COMPARATOR_LESS_OR_EQUAL    : test = static_cast< int64_t>(data0) <= static_cast< int64_t>(data1); break;
+                }
+            else
+              switch (_param->_type)
+                {
+                case COMPARATOR_EQUAL            : test = static_cast<uint64_t>(data0) == static_cast<uint64_t>(data1); break;
+                case COMPARATOR_NOT_EQUAL        : test = static_cast<uint64_t>(data0) != static_cast<uint64_t>(data1); break;
+                case COMPARATOR_GREATER          : test = static_cast<uint64_t>(data0) >  static_cast<uint64_t>(data1); break;
+                case COMPARATOR_GREATER_OR_EQUAL : test = static_cast<uint64_t>(data0) >= static_cast<uint64_t>(data1); break;
+                case COMPARATOR_LESS             : test = static_cast<uint64_t>(data0) <  static_cast<uint64_t>(data1); break;
+                case COMPARATOR_LESS_OR_EQUAL    : test = static_cast<uint64_t>(data0) <= static_cast<uint64_t>(data1); break;
+                }
+            break;
+          }
+        default :
+          {
+            TEST_KO("Invalid size for the test.");
+          }
+        }
+
+      TEST(Tcontrol_t,out_COMPARE_TEST->read(),test);
+
       SC_START(1);
     }
@@ -104,4 +231,7 @@
   delete in_CLOCK;
   delete in_NRESET;
+  DELETE0_SC_SIGNAL( in_COMPARE_DATA_0);
+  DELETE0_SC_SIGNAL( in_COMPARE_DATA_1);
+  DELETE0_SC_SIGNAL(out_COMPARE_TEST  );
     }
 #endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/include/Comparator.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/include/Comparator.h	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/include/Comparator.h	(revision 113)
@@ -64,6 +64,5 @@
   public    : SC_IN (Tdata_t   )            *  in_COMPARE_DATA_0;
   public    : SC_IN (Tdata_t   )            *  in_COMPARE_DATA_1;
-  public    : SC_OUT(Tcontrol_t)            *  in_COMPARE_TEST  ;
-    
+  public    : SC_OUT(Tcontrol_t)            * out_COMPARE_TEST  ;
 
     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
@@ -105,5 +104,5 @@
 #ifdef SYSTEMC				       
   public  : void        transition                (void);
-//public  : void        genMoore                  (void);
+  public  : void        genMealy                  (void);
 #endif					       
 
@@ -112,4 +111,7 @@
   private : void        vhdl_declaration          (Vhdl * & vhdl);
   private : void        vhdl_body                 (Vhdl * & vhdl);
+
+  private : void        vhdl_xilinx_declaration   (Vhdl * & vhdl);
+  private : void        vhdl_xilinx_body          (Vhdl * & vhdl);
 #endif					       
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/include/Parameters.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/include/Parameters.h	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/include/Parameters.h	(revision 113)
@@ -26,4 +26,7 @@
   public : Tcomparator_scheme_t _type;
 
+  public : int64_t              _extends;
+  public : int64_t              _mask_sign;
+
     //-----[ methods ]-----------------------------------------------------------
   public : Parameters  (uint32_t             size_data,
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/src/Comparator.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/src/Comparator.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/src/Comparator.cpp	(revision 113)
@@ -77,13 +77,15 @@
 # endif    
 
-// 	log_printf(INFO,Comparator,FUNCTION,_("<%s> : Method - genMoore"),_name.c_str());
+	log_printf(INFO,Comparator,FUNCTION,_("<%s> : Method - genMealy"),_name.c_str());
 
-// 	SC_METHOD (genMoore);
-// 	dont_initialize ();
-// 	sensitive << (*(in_CLOCK)).neg(); // need internal register
+	SC_METHOD (genMealy);
+	dont_initialize ();
+// 	sensitive << (*(in_CLOCK)).neg(); // don't need internal register
+        sensitive << (*(in_COMPARE_DATA_0))
+                  << (*(in_COMPARE_DATA_1));
 	
-// # ifdef SYSTEMCASS_SPECIFIC
-// 	// List dependency information
-// # endif    
+# ifdef SYSTEMCASS_SPECIFIC
+	// List dependency information
+# endif    
 	
 #endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/src/Comparator_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/src/Comparator_allocation.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/src/Comparator_allocation.cpp	(revision 113)
@@ -53,4 +53,16 @@
       in_NRESET       = interface->set_signal_in  <Tcontrol_t> ("nreset",1, RESET_VHDL_YES);
     }
+
+    // ~~~~~[ Interface : "compare" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    {
+      ALLOC0_INTERFACE_BEGIN("compare",IN,SOUTH,_("Compare interface"));
+
+      ALLOC0_SIGNAL_IN ( in_COMPARE_DATA_0,"DATA_0",Tdata_t   ,_param->_size_data);
+      ALLOC0_SIGNAL_IN ( in_COMPARE_DATA_1,"DATA_1",Tdata_t   ,_param->_size_data);
+      ALLOC0_SIGNAL_OUT(out_COMPARE_TEST  ,"TEST"  ,Tcontrol_t,1);
+
+      ALLOC0_INTERFACE_END();
+    }
+
     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/src/Comparator_deallocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/src/Comparator_deallocation.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/src/Comparator_deallocation.cpp	(revision 113)
@@ -25,4 +25,8 @@
 	delete    in_CLOCK ;
 	delete    in_NRESET;
+
+        DELETE0_SIGNAL( in_COMPARE_DATA_0,_param->_size_data);
+        DELETE0_SIGNAL( in_COMPARE_DATA_1,_param->_size_data);
+        DELETE0_SIGNAL(out_COMPARE_TEST  ,1);
       }
     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/src/Comparator_genMealy.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/src/Comparator_genMealy.cpp	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/src/Comparator_genMealy.cpp	(revision 113)
@@ -0,0 +1,82 @@
+#ifdef SYSTEMC
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Generic/Comparator/include/Comparator.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace generic {
+namespace comparator {
+
+
+#undef  FUNCTION
+#define FUNCTION "Comparator::genMealy"
+  void Comparator::genMealy (void)
+  {
+    log_begin(Comparator,FUNCTION);
+
+    Tcontrol_t test;
+    Tdata_t data_0 = PORT_READ(in_COMPARE_DATA_0);
+    Tdata_t data_1 = PORT_READ(in_COMPARE_DATA_1);
+    
+    if (_param->_is_signed)
+      {
+        int64_t data0 = static_cast<int64_t>(data_0);
+        int64_t data1 = static_cast<int64_t>(data_1);
+
+        data0 = ((data0 & _param->_mask_sign) != 0)?(_param->_extends|data0):(~_param->_extends & data0);
+        data1 = ((data1 & _param->_mask_sign) != 0)?(_param->_extends|data1):(~_param->_extends & data1);
+
+        switch (_param->_type)
+          {
+          case COMPARATOR_EQUAL            : test = (data0 == data1); break;
+          case COMPARATOR_NOT_EQUAL        : test = (data0 != data1); break;
+          case COMPARATOR_GREATER          : test = (data0 >  data1); break;
+          case COMPARATOR_GREATER_OR_EQUAL : test = (data0 >= data1); break;
+          case COMPARATOR_LESS             : test = (data0 <  data1); break;
+          case COMPARATOR_LESS_OR_EQUAL    : test = (data0 <= data1); break;
+          }
+      }
+    else
+      {
+        uint64_t data0 = ~_param->_extends & static_cast<uint64_t>(data_0);
+        uint64_t data1 = ~_param->_extends & static_cast<uint64_t>(data_1);
+
+        switch (_param->_type)
+          {
+          case COMPARATOR_EQUAL            : test = (data0 == data1); break;
+          case COMPARATOR_NOT_EQUAL        : test = (data0 != data1); break;
+          case COMPARATOR_GREATER          : test = (data0 >  data1); break;
+          case COMPARATOR_GREATER_OR_EQUAL : test = (data0 >= data1); break;
+          case COMPARATOR_LESS             : test = (data0 <  data1); break;
+          case COMPARATOR_LESS_OR_EQUAL    : test = (data0 <= data1); break;
+          }
+      }
+
+    log_printf(TRACE,Comparator,FUNCTION,"  * size_data : %d",_param->_size_data);
+    log_printf(TRACE,Comparator,FUNCTION,"  * extends   : %llx",_param->_extends  );
+
+
+    log_printf(TRACE,Comparator,FUNCTION,"  * %.x %s (%d) %x = %d"
+               ,data_0
+               ,toString(_param->_type).c_str()
+               ,_param->_is_signed
+               ,data_1
+               ,test);
+
+    PORT_WRITE(out_COMPARE_TEST,test);
+
+    log_end(Comparator,FUNCTION);
+  };
+
+}; // end namespace comparator
+}; // end namespace generic
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/src/Comparator_vhdl.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/src/Comparator_vhdl.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/src/Comparator_vhdl.cpp	(revision 113)
@@ -27,6 +27,12 @@
     _component->vhdl_instance(vhdl);
 
+    // default architecture
     vhdl_declaration (vhdl);
     vhdl_body        (vhdl);
+
+    // Xilinx architecture
+    vhdl->set_architecture("xilinx");
+    vhdl_xilinx_declaration (vhdl);
+    vhdl_xilinx_body        (vhdl);
 
     vhdl->generate_file();
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/src/Comparator_vhdl_xilinx_body.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/src/Comparator_vhdl_xilinx_body.cpp	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/src/Comparator_vhdl_xilinx_body.cpp	(revision 113)
@@ -0,0 +1,31 @@
+#ifdef VHDL
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Generic/Comparator/include/Comparator.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace generic {
+namespace comparator {
+
+
+#undef  FUNCTION
+#define FUNCTION "Comparator::vhdl_xilinx_body"
+  void Comparator::vhdl_xilinx_body (Vhdl * & vhdl)
+  {
+    log_begin(Comparator,FUNCTION);
+    vhdl->set_body ("");
+    log_end(Comparator,FUNCTION);
+  };
+
+}; // end namespace comparator
+}; // end namespace generic
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/src/Comparator_vhdl_xilinx_declaration.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/src/Comparator_vhdl_xilinx_declaration.cpp	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/src/Comparator_vhdl_xilinx_declaration.cpp	(revision 113)
@@ -0,0 +1,33 @@
+#ifdef VHDL
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Generic/Comparator/include/Comparator.h"
+
+namespace morpheo {
+namespace behavioural {
+namespace generic {
+namespace comparator {
+
+
+#undef  FUNCTION
+#define FUNCTION "Comparator::vhdl_xilinx_declaration"
+  void Comparator::vhdl_xilinx_declaration (Vhdl * & vhdl)
+  {
+    log_begin(Comparator,FUNCTION);
+
+    vhdl->set_library("XilinxCoreLib","c_compare_v9_0_comp","all");
+
+    log_end(Comparator,FUNCTION);
+  };
+
+}; // end namespace comparator
+}; // end namespace generic
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/src/Parameters.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/src/Parameters.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/src/Parameters.cpp	(revision 113)
@@ -7,4 +7,5 @@
 
 #include "Behavioural/Generic/Comparator/include/Parameters.h"
+#include "Common/include/BitManipulation.h"
 
 namespace morpheo {
@@ -12,5 +13,4 @@
 namespace generic {
 namespace comparator {
-
 
 #undef  FUNCTION
@@ -28,4 +28,7 @@
 
     test();
+
+    _extends   = gen_mask_not<int64_t>(_size_data);
+    _mask_sign = (1<<(_size_data-1));
 
     if (is_toplevel)
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/src/Parameters_msg_error.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/src/Parameters_msg_error.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Comparator/src/Parameters_msg_error.cpp	(revision 113)
@@ -24,4 +24,7 @@
     Parameters_test test ("Comparator");
 
+    if (_size_data > 64)
+      test.error(_("Max size is 64 bits.\n"));
+
     log_end(Comparator,FUNCTION);
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/Makefile.defs	(revision 113)
@@ -2,10 +2,12 @@
 # $Id$
 # 
-# [ Description ]
+# [ Description ]
 # 
 # Makefile
 # 
 
-#-----[ Directory ]----------------------------------------
+ENTITY                          = Counter
+
+#-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../..
 DIR_MORPHEO			= $(DIR_COMPONENT)/$(DIR_COMPONENT_MORPHEO)
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/SelfTest/include/test.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/SelfTest/include/test.h	(revision 112)
+++ 	(revision )
@@ -1,27 +1,0 @@
-/*
- * $Id$
- *
- * [ Description ]
- * 
- * Test "RegisterFile"
- */
-
-#ifdef SYSTEMC
-#include "systemc.h"
-#endif
-
-#include <string>
-#include <iostream>
-
-#include "Common/include/Time.h"
-#include "Behavioural/Generic/Counter/include/Counter.h"
-
-using namespace std;
-using namespace morpheo;
-using namespace morpheo::behavioural;
-using namespace morpheo::behavioural::generic;
-
-using namespace morpheo::behavioural::generic::counter;
-
-void test   (string name,
-	     morpheo::behavioural::generic::counter::Parameters param);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/SelfTest/include/top.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/SelfTest/include/top.h	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/SelfTest/include/top.h	(revision 113)
@@ -0,0 +1,54 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ * Test "Counter"
+ */
+
+#ifdef SYSTEMC
+#include "systemc.h"
+#endif
+
+#define NB_ITERATION  1024
+#define CYCLE_MAX     (1024*NB_ITERATION)
+
+#include "Common/include/Test.h"
+#include "Common/include/Time.h"
+#include "Behavioural/Generic/Counter/include/Counter.h"
+
+using namespace std;
+using namespace morpheo;
+using namespace morpheo::behavioural;
+using namespace morpheo::behavioural::generic;
+using namespace morpheo::behavioural::generic::counter;
+
+SC_MODULE(top)
+{
+#ifdef SYSTEMC
+ private: sc_clock               *  in_CLOCK ;
+ private: sc_signal<Tcontrol_t>  *  in_NRESET;
+ private: sc_signal<Tdata_t>    **  in_COUNTER_DATA  ;// [param->_nb_port]
+ private: sc_signal<Tcontrol_t> **  in_COUNTER_ADDSUB;// [param->_nb_port]
+ private: sc_signal<Tdata_t>    ** out_COUNTER_DATA  ;// [param->_nb_port]
+#endif
+
+ private: std::string                                          name ;
+ private: morpheo::behavioural::generic::counter::Parameters * param;
+#ifdef STATISTICS
+ private: morpheo::behavioural::Parameters_Statistics        * param_stat;
+#endif
+ private: Counter                                            * component;
+
+ private: void usage        (string exec);
+ private: void allocation   (void);
+ private: void deallocation (void);
+ public : void test         (void);
+
+#ifdef MTI_SYSTEMC
+  SC_CTOR(top::top);
+#else
+ public : top (sc_module_name module_name,int argc, char * argv[]);
+#endif
+ public : ~top(void);
+};
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/SelfTest/src/main.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/SelfTest/src/main.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/SelfTest/src/main.cpp	(revision 113)
@@ -2,43 +2,47 @@
  * $Id$
  *
- * [ Description ]
+ * [ Description ]
  * 
  */
 
-#include "Behavioural/Generic/Counter/SelfTest/include/test.h"
+#include "Behavioural/Generic/Counter/SelfTest/include/top.h"
 
-#define NB_PARAMS 2
+#ifndef MTI_SYSTEMC
+# ifndef SYSTEMC
+int main    (int argc, char * argv[])
+# else
+int sc_main (int argc, char * argv[])
+# endif
+{
+  int _return = EXIT_SUCCESS;
 
-void usage (string exec)
-{
-  cerr << "<Usage> " << exec << " name_instance list_params" << endl
-       << "list_params is :" << endl
-       << " - size_data     (unsigned int)" << endl
-       << " - nb_port       (unsigned int)" << endl;
+  try 
+    {
+      top * my_top = new top ("my_top",argc,argv);
 
-  exit (1);
+      my_top->test();
+
+      delete my_top;
+    }
+  catch (morpheo::ErrorMorpheo & error)
+    {
+      msg (_("%s\n"),error.what ());
+      _return = EXIT_FAILURE;
+    }
+  
+  try 
+    {
+      if (_return == EXIT_SUCCESS)
+	TEST_OK("Counter : no error");
+      else
+	TEST_KO("Counter : a lot of error");
+    }
+  catch (morpheo::ErrorMorpheo & error)
+    {
+//       msg (_("<%s> :\n%s"),name.c_str(), error.what ());
+      _return = EXIT_FAILURE;
+    }
+
+  return _return;
 }
-
-#ifndef SYSTEMC
-int main    (int argc, char * argv[])
-#else
-int sc_main (int argc, char * argv[])
 #endif
-{
-  if (argc != 2+NB_PARAMS)
-    usage (argv[0]);
-
-  cout << "<test0> : Classic usage" << endl;
-  cout << "<test0> : Typical parameters" << endl;
-  const string   name      = argv[1];
-  const uint32_t size_data = atoi(argv[2]);
-  const uint32_t nb_port   = atoi(argv[3]);
-
-  morpheo::behavioural::generic::counter::Parameters param (size_data,
-							    nb_port  );
-
-  test (name,param);
-
-  return (EXIT_SUCCESS);
-}
-
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/SelfTest/src/test.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/SelfTest/src/test.cpp	(revision 112)
+++ 	(revision )
@@ -1,162 +1,0 @@
-/*
- * $Id$
- *
- * [ Description ]
- * 
- * Test
- */
-
-#define NB_ITERATION 1024
-#define CYCLE_MAX    1024*NB_ITERATION
-
-#include "Behavioural/Generic/Counter/SelfTest/include/test.h"
-#include "Common/include/Test.h"
-
-void test (string name,
-	   morpheo::behavioural::generic::counter::Parameters param)
-{
-  cout << "<" << name << "> : Simulation SystemC" << endl;
-
-  try 
-    {
-      cout << param.print(1);
-      param.test();
-    }
-  catch (morpheo::ErrorMorpheo & error)
-    {
-      cout << "<" << name << "> : " <<  error.what ();
-      return;
-    }
-  catch (...)
-    {
-      cerr << "<" << name << "> : This test must generate a error" << endl;
-      exit (EXIT_FAILURE);
-    }
-#ifdef STATISTICS
-  morpheo::behavioural::Parameters_Statistics * param_stat = new morpheo::behavioural::Parameters_Statistics (5,50);
-#endif
-
-  Tusage_t _usage = USE_ALL;
-
-//   _usage = usage_unset(_usage,USE_SYSTEMC              );
-//   _usage = usage_unset(_usage,USE_VHDL                 );
-//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
-//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
-//   _usage = usage_unset(_usage,USE_POSITION             );
-//   _usage = usage_unset(_usage,USE_STATISTICS           );
-//   _usage = usage_unset(_usage,USE_INFORMATION          );
-
-  Counter * _Counter = new Counter (name.c_str(),
-#ifdef STATISTICS
-				    param_stat,
-#endif
-				    param,
-				    _usage);
-  
-#ifdef SYSTEMC
-  /*********************************************************************
-   * Déclarations des signaux
-   *********************************************************************/
-  sc_clock                                 CLOCK ("clock", 1.0, 0.5);
-  sc_signal<Tcontrol_t>                    RESET;
-  sc_signal<Tdata_t>                       DATA_IN  [param._nb_port];
-  sc_signal<Tcontrol_t>                    ADDSUB   [param._nb_port];
-  sc_signal<Tdata_t>                       DATA_OUT [param._nb_port];
-
-  /********************************************************
-   * Instanciation
-   ********************************************************/
-  
-  cout << "<" << name << "> Instanciation of _Counter" << endl;
- 
-  (*(_Counter->in_CLOCK))        (CLOCK);
-  (*(_Counter->in_NRESET))       (RESET);
-
-  for (uint32_t i=0; i<param._nb_port; i++)
-    {
-      (*(_Counter-> in_COUNTER_DATA  [i]))        (DATA_IN  [i]);
-      (*(_Counter-> in_COUNTER_ADDSUB[i]))        (ADDSUB   [i]);
-      (*(_Counter->out_COUNTER_DATA  [i]))        (DATA_OUT [i]);
-    }
-
-  Time * _time = new Time();
-
-  /********************************************************
-   * Simulation - Begin
-   ********************************************************/
-
-  cout << "<" << name << "> Start Simulation ............" << endl;
-  // Initialisation
-
-  srand(0);
-  //srand(TIME(NULL));
-
-  Tdata_t    data_in  [param._nb_port];
-  Tdata_t    data_out [param._nb_port];
-  Tcontrol_t addsub   [param._nb_port];
-
-  sc_start(0);
-
-  RESET.write(1);
-
-  cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Initialisation" << endl;
-
-  cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Loop of Test" << endl;
-
-  for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++)
-    {
-      cout << "{" << static_cast<uint32_t>(sc_simulation_time()) << "} Itération " << iteration << endl;
-      for (uint32_t i=0; i<param._nb_port; i++)
-	{
-	  Tdata_t data = rand()%param._data_max;
-	  data_in  [i] = data;
-	  addsub   [i] = (rand()%2)==1; 
-	  
-	  DATA_IN  [i].write(data      );
-	  ADDSUB   [i].write(addsub [i]);
-
-	  data_out [i] = (addsub[i]==1)?((data<param._data_max)?data+1:data):((data>0)?data-1:data);
-	}
-
-      sc_start(0);
-      
-      for (uint32_t i=0; i<param._nb_port; i++)
-	{
-	  cout << hex 
-	       << "    [" << i << "] "
-	       << data_in [i];
-
-	  if (addsub[i] == 1)
-	    cout << " ++";
-	  else
-	    cout << " --";
-
-	  cout << " = " 
-	       << DATA_OUT [i].read();
-
-	  TEST(Tdata_t,DATA_OUT [i].read(),data_out [i]);
-	   
-	  cout << std::dec << endl;
-	}
-      
-      sc_start(1);
-    }
-
-  sc_start(1);
-
-  /********************************************************
-   * Simulation - End
-   ********************************************************/
-
-  delete _time;
-
-  cout << "<" << name << "> ............ Stop Simulation" << endl;
-
-#endif
-
-  delete _Counter;
-#ifdef STATISTICS
-  delete param_stat;
-#endif
-
-}
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/SelfTest/src/top.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/SelfTest/src/top.cpp	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/SelfTest/src/top.cpp	(revision 113)
@@ -0,0 +1,58 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Generic/Counter/SelfTest/include/top.h"
+
+#define NB_PARAMS 2
+
+#ifdef MTI_SYSTEMC
+SC_MODULE_EXPORT(top);
+#endif
+
+#ifdef MTI_SYSTEMC
+SC_CTOR(top::top)
+#else
+top::top (sc_module_name module_name,int argc, char * argv[])
+#endif
+{
+#ifdef MTI_SYSTEMC
+  // accessing command-line arguments with modelsim
+  int argc;
+  const char * const * argv;
+
+  argc = sc_argc ();
+  argv = sc_argv ();
+#endif
+
+  if (argc != 2+NB_PARAMS)
+    usage (argv[0]);
+
+           name      = argv[1];
+  uint32_t size_data = fromString<uint32_t>(argv[2]);
+  uint32_t nb_port   = fromString<uint32_t>(argv[3]);
+
+  param = new morpheo::behavioural::generic::counter::Parameters
+    (size_data,
+     nb_port  );
+  
+  // msg(_("%s"),param.print(0).c_str());
+  
+  // Allocation component
+  allocation ();
+  
+#ifdef MTI_SYSTEMC
+  SC_THREAD(test);
+#endif
+}
+
+top::~top (void)
+{
+  cout << "<" << name << "> : destructior" << endl;
+
+  deallocation ();
+  delete param;
+}
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/SelfTest/src/top_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/SelfTest/src/top_allocation.cpp	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/SelfTest/src/top_allocation.cpp	(revision 113)
@@ -0,0 +1,79 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ * Test
+ */
+
+#include "Behavioural/Generic/Counter/SelfTest/include/top.h"
+#include "Behavioural/include/Allocation.h"
+
+void top::allocation (void)
+{
+  cout << "<" << name << "> : Construction of component" << endl;
+  
+  try 
+    {
+      param->test();
+    }
+  catch (morpheo::ErrorMorpheo & error)
+    {
+      cout << "<" << name << "> : " <<  error.what ();
+      return;
+    }
+  catch (...)
+    {
+      cerr << "<" << name << "> : This test must generate a error" << endl;
+      exit (EXIT_FAILURE);
+    }
+#ifdef STATISTICS
+  param_stat = new morpheo::behavioural::Parameters_Statistics (5,50);
+#endif
+
+  Tusage_t _usage = USE_ALL;
+
+//_usage = usage_unset(_usage,USE_SYSTEMC              );
+//_usage = usage_unset(_usage,USE_VHDL                 );
+//_usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
+//_usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
+//_usage = usage_unset(_usage,USE_POSITION             );
+//_usage = usage_unset(_usage,USE_STATISTICS           );
+//_usage = usage_unset(_usage,USE_INFORMATION          );
+
+  cout << "<" << name << "> Create component" << endl;
+
+  component = new Counter 
+    (name.c_str(),
+#ifdef STATISTICS
+     param_stat,
+#endif
+     param,
+     _usage);
+
+#ifdef SYSTEMC
+  /*********************************************************************
+   * Déclarations des signaux
+   *********************************************************************/
+  cout << "<" << name << "> Create signal" << endl;
+
+  in_CLOCK  = new sc_clock ("clock", TIME_PERIOD, TIME_UNIT, 0.5); //name,period,time_unit,duty_cycle
+
+  ALLOC0_SC_SIGNAL( in_NRESET        ," in_NRESET        ",Tcontrol_t);
+  ALLOC1_SC_SIGNAL( in_COUNTER_DATA  ," in_COUNTER_DATA  ",Tdata_t   ,param->_nb_port);
+  ALLOC1_SC_SIGNAL( in_COUNTER_ADDSUB," in_COUNTER_ADDSUB",Tcontrol_t,param->_nb_port);
+  ALLOC1_SC_SIGNAL(out_COUNTER_DATA  ,"out_COUNTER_DATA  ",Tdata_t   ,param->_nb_port);
+
+  /********************************************************
+   * Instanciation
+   ********************************************************/
+  
+  cout << "<" << name << "> Instanciation of component" << endl;
+ 
+  INSTANCE0_SC_SIGNAL(component, in_CLOCK         );
+  INSTANCE0_SC_SIGNAL(component, in_NRESET        );
+  INSTANCE1_SC_SIGNAL(component, in_COUNTER_DATA  ,param->_nb_port);
+  INSTANCE1_SC_SIGNAL(component, in_COUNTER_ADDSUB,param->_nb_port);
+  INSTANCE1_SC_SIGNAL(component,out_COUNTER_DATA  ,param->_nb_port);
+#endif
+}
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/SelfTest/src/top_deallocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/SelfTest/src/top_deallocation.cpp	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/SelfTest/src/top_deallocation.cpp	(revision 113)
@@ -0,0 +1,28 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ * Test
+ */
+
+#include "Behavioural/Generic/Counter/SelfTest/include/top.h"
+#include "Behavioural/include/Allocation.h"
+
+void top::deallocation (void)
+{
+  cout << "<" << name << "> : Destruction of component" << endl;
+
+#ifdef SYSTEMC
+  delete             in_CLOCK;
+  DELETE0_SC_SIGNAL( in_NRESET);
+  DELETE1_SC_SIGNAL( in_COUNTER_DATA  ,param->_nb_port);
+  DELETE1_SC_SIGNAL( in_COUNTER_ADDSUB,param->_nb_port);
+  DELETE1_SC_SIGNAL(out_COUNTER_DATA  ,param->_nb_port);
+#endif
+
+  delete component;
+#ifdef STATISTICS
+  delete param_stat;
+#endif
+}
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/SelfTest/src/top_test.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/SelfTest/src/top_test.cpp	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/SelfTest/src/top_test.cpp	(revision 113)
@@ -0,0 +1,82 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ * Test
+ */
+
+#include "Behavioural/Generic/Counter/SelfTest/include/top.h"
+
+void top::test (void)
+{
+#ifdef SYSTEMC
+  Time * _time = new Time();
+
+  /********************************************************
+   * Simulation - Begin
+   ********************************************************/
+
+  cout << "<" << name << "> Start Simulation ............" << endl;
+  // Initialisation
+
+  srand(0);
+  //srand(TIME(NULL));
+
+  Tdata_t    data_in  [param->_nb_port];
+  Tdata_t    data_out [param->_nb_port];
+  Tcontrol_t addsub   [param->_nb_port];
+
+  SC_CYCLE(0);
+
+  in_NRESET->write(1);
+
+  LABEL("Initialisation");
+
+  LABEL("Loop of Test");
+
+  for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++)
+    {
+      LABEL("Iteration %d",iteration);
+
+      for (uint32_t i=0; i<param->_nb_port; i++)
+	{
+	  Tdata_t data = rand()%param->_data_max;
+	  data_in  [i] = data;
+	  addsub   [i] = (rand()%2)==1; 
+	  
+          LABEL("in_COUNTER_DATA   [%d] = %d",i,data      );
+          LABEL("in_COUNTER_ADDSUB [%d] = %d"  ,i,addsub [i]);
+
+	  in_COUNTER_DATA   [i]->write(data      );
+	  in_COUNTER_ADDSUB [i]->write(addsub [i]);
+
+	  data_out [i] = (addsub[i]==1)?((data<param->_data_max)?data+1:data):((data>0)?data-1:data);
+	}
+
+      SC_CYCLE(0);
+
+      for (uint32_t i=0; i<param->_nb_port; i++)
+	{
+          string op = (addsub[i] == 1)?"++":"--";
+          LABEL("0x%d %s = 0x%d",i,op.c_str(),out_COUNTER_DATA [i]->read());
+
+	  TEST(Tdata_t,out_COUNTER_DATA [i]->read(),data_out [i]);
+	}
+      
+      SC_CYCLE(1);
+    }
+
+  SC_CYCLE(1);
+
+  /********************************************************
+   * Simulation - End
+   ********************************************************/
+
+  sc_stop();
+
+  delete _time;
+
+  cout << "<" << name << "> ............ Stop Simulation" << endl;
+#endif
+}
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/SelfTest/src/top_usage.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/SelfTest/src/top_usage.cpp	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/SelfTest/src/top_usage.cpp	(revision 113)
@@ -0,0 +1,18 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Generic/Counter/SelfTest/include/top.h"
+
+void top::usage (string exec)
+{
+  cerr << "<Usage> " << exec << " name_instance list_params" << endl
+       << "list_params is :" << endl
+       << " - size_data     (unsigned int)" << endl
+       << " - nb_port       (unsigned int)" << endl;
+
+  exit (1);
+}
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/include/Counter.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/include/Counter.h	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/include/Counter.h	(revision 113)
@@ -40,7 +40,7 @@
     // -----[ fields ]----------------------------------------------------
     // Parameters
-  protected : const std::string _name;
-  protected : const Parameters  _param;
-  private   : const Tusage_t    _usage;
+  protected : const std::string   _name;
+  protected : const Parameters  * _param;
+  private   : const Tusage_t      _usage;
 
 #ifdef STATISTICS
@@ -79,8 +79,8 @@
 					   morpheo::behavioural::Parameters_Statistics * param_statistics,
 #endif
-					   Parameters param,
-					   Tusage_t   usage);
+					   Parameters * param,
+					   Tusage_t     usage);
 					       
-  public  :          Counter              (Parameters param );
+// public  :          Counter              (Parameters param );
   public  :          ~Counter             (void);
 					       
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter.cpp	(revision 113)
@@ -13,5 +13,6 @@
 namespace counter {
 
-
+#undef FUNCTION
+#define FUNCTION "Counter::Counter"
   Counter::Counter 
   (
@@ -24,5 +25,5 @@
   morpheo::behavioural::Parameters_Statistics * param_statistics,
 #endif
-  morpheo::behavioural::generic::counter::Parameters param,
+  morpheo::behavioural::generic::counter::Parameters * param,
    Tusage_t usage):
     _name  (name),
@@ -30,11 +31,11 @@
     _usage (usage)
   {
-    log_printf(FUNC,Counter,"Counter","Begin");
+    log_begin(Counter,FUNCTION);
 
-#if DEBUG_Counter == true
-    log_printf(INFO,Counter,FUNCTION,_("<%s> Parameters"),_name.c_str());
+// #if DEBUG_Counter == true
+//     log_printf(INFO,Counter,FUNCTION,_("<%s> Parameters"),_name.c_str());
 
-    std::cout << param << std::endl;
-#endif    
+//     std::cout << *param << std::endl;
+// #endif    
 
     log_printf(INFO,Core,FUNCTION,_("<%s> Allocation"),_name.c_str());
@@ -76,5 +77,5 @@
         SC_METHOD (genMealy);
         dont_initialize ();
-        for (uint32_t i=0; i<_param._nb_port; i++)
+        for (uint32_t i=0; i<_param->_nb_port; i++)
           sensitive << *(in_COUNTER_DATA   [i])
                     << *(in_COUNTER_ADDSUB [i]);
@@ -82,5 +83,5 @@
 #ifdef SYSTEMCASS_SPECIFIC
         // List dependency information
-        for (uint32_t i=0; i<_param._nb_port; i++)
+        for (uint32_t i=0; i<_param->_nb_port; i++)
           {
             (*(out_COUNTER_DATA [i])) (*(in_COUNTER_DATA   [i]));
@@ -91,10 +92,12 @@
 
 #endif
-    log_printf(FUNC,Counter,"Counter","End");
+    log_end(Counter,FUNCTION);
   };
   
+#undef FUNCTION
+#define FUNCTION "Counter::~Counter"
   Counter::~Counter (void)
   {
-    log_printf(FUNC,Counter,"~Counter","Begin");
+    log_begin(Counter,FUNCTION);
 
 #ifdef STATISTICS
@@ -108,5 +111,5 @@
     deallocation ();
 
-    log_printf(FUNC,Counter,"~Counter","End");
+    log_end(Counter,FUNCTION);
   };
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_allocation.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_allocation.cpp	(revision 113)
@@ -21,5 +21,5 @@
 
     Entity * entity = _component->set_entity (_name     
-					     ,"Counter"  
+					     ,_param->_type
 #ifdef POSITION
 					     ,COMBINATORY
@@ -45,11 +45,11 @@
     // ~~~~~[ Interface : "counter" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     {
-      ALLOC1_INTERFACE_BEGIN("counter", IN, SOUTH, _("Counter interface"), _param._nb_port);
+      ALLOC1_INTERFACE_BEGIN("counter", IN, SOUTH, _("Counter interface"), _param->_nb_port);
 	   
-      ALLOC1_SIGNAL_IN ( in_COUNTER_DATA  ,"data"  ,Tdata_t   ,_param._size_data);
+      ALLOC1_SIGNAL_IN ( in_COUNTER_DATA  ,"data"  ,Tdata_t   ,_param->_size_data);
       ALLOC1_SIGNAL_IN ( in_COUNTER_ADDSUB,"addsub",Tcontrol_t,1                );
-      ALLOC1_SIGNAL_OUT(out_COUNTER_DATA  ,"data"  ,Tdata_t   ,_param._size_data);
+      ALLOC1_SIGNAL_OUT(out_COUNTER_DATA  ,"data"  ,Tdata_t   ,_param->_size_data);
 
-      ALLOC1_INTERFACE_END(_param._nb_port);
+      ALLOC1_INTERFACE_END(_param->_nb_port);
     }
     
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_deallocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_deallocation.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_deallocation.cpp	(revision 113)
@@ -24,7 +24,7 @@
         delete     in_NRESET;
         
-        DELETE1_SIGNAL( in_COUNTER_DATA  , _param._nb_port,_param._size_data);
-        DELETE1_SIGNAL( in_COUNTER_ADDSUB, _param._nb_port,1                );
-        DELETE1_SIGNAL(out_COUNTER_DATA  , _param._nb_port,_param._size_data);
+        DELETE1_SIGNAL( in_COUNTER_DATA  , _param->_nb_port,_param->_size_data);
+        DELETE1_SIGNAL( in_COUNTER_ADDSUB, _param->_nb_port,1                );
+        DELETE1_SIGNAL(out_COUNTER_DATA  , _param->_nb_port,_param->_size_data);
       }
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_genMealy.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_genMealy.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_genMealy.cpp	(revision 113)
@@ -18,5 +18,5 @@
     log_printf(FUNC,Counter,"genMealy","Begin");
 
-    for (uint32_t i=0; i<_param._nb_port; i++)
+    for (uint32_t i=0; i<_param->_nb_port; i++)
       {
 	Tcontrol_t addsub  = PORT_READ(in_COUNTER_ADDSUB [i]);
@@ -28,5 +28,5 @@
 	if (addsub == 1)
 	  {
-	    if (data_out < _param._data_max)
+	    if (data_out < _param->_data_max)
 	      data_out++;
 	  }
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_statistics_declaration.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_statistics_declaration.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_statistics_declaration.cpp	(revision 113)
@@ -21,5 +21,5 @@
 
     _stat = new Stat (static_cast<std::string>(_name),
-		      "Counter",
+		      _param->_type,
 		      param_statistics);
     
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_vhdl_body.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_vhdl_body.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_vhdl_body.cpp	(revision 113)
@@ -19,9 +19,9 @@
     vhdl->set_body ("");
     
-    for (uint32_t i=0; i<_param._nb_port; i++)
+    for (uint32_t i=0; i<_param->_nb_port; i++)
       {
 	std::string counter_inc, counter_dec;
 
-	if (_param._size_data > 1)
+	if (_param->_size_data > 1)
 	  {
 	    counter_inc = "in_COUNTER_"+toString(i)+"_DATA+1";
@@ -35,5 +35,5 @@
 
 	vhdl->set_body ("out_COUNTER_"+toString(i)+"_DATA <=");
-	if (_param._size_data > 1)
+	if (_param->_size_data > 1)
 	  {
 	    vhdl->set_body ("\tin_COUNTER_"+toString(i)+"_DATA+1 when in_COUNTER_"+toString(i)+"_ADDSUB = '1' and in_COUNTER_"+toString(i)+"_DATA < cst_max else");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_vhdl_declaration.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_vhdl_declaration.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_vhdl_declaration.cpp	(revision 113)
@@ -19,8 +19,8 @@
     log_printf(FUNC,Counter,"vhdl_declaration","Begin");
     
-    if (_param._size_data > 1)
+    if (_param->_size_data > 1)
       {
-	vhdl->set_constant ("cst_min",_param._size_data,std_logic_others(_param._size_data,0));
-	vhdl->set_constant ("cst_max",_param._size_data,std_logic_others(_param._size_data,1));
+	vhdl->set_constant ("cst_min",_param->_size_data,std_logic_others(_param->_size_data,0));
+	vhdl->set_constant ("cst_max",_param->_size_data,std_logic_others(_param->_size_data,1));
       }
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Parameters.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Parameters.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Parameters.cpp	(revision 113)
@@ -16,4 +16,5 @@
   Parameters::Parameters (uint32_t size_data,
 			  uint32_t nb_port  ):
+    behavioural::Parameters("Counter"),
     _size_data(size_data),
     _nb_port  (nb_port  ),
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Divider/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Divider/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Divider/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Divider
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Multiplier/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Multiplier/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Multiplier/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Multiplier
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Priority/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Priority/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Priority/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Priority
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/Makefile.defs	(revision 113)
@@ -2,10 +2,12 @@
 # $Id$
 # 
-# [ Description ]
+# [ Description ]
 # 
 # Makefile
 # 
 
-#-----[ Directory ]----------------------------------------
+ENTITY				= Queue
+
+#-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../..
 DIR_MORPHEO			= $(DIR_COMPONENT)/$(DIR_COMPONENT_MORPHEO)
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/SelfTest/include/test.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/SelfTest/include/test.h	(revision 112)
+++ 	(revision )
@@ -1,28 +1,0 @@
-/*
- * $Id$
- *
- * [ Description ]
- * 
- * Test "RegisterFile"
- */
-
-#ifdef SYSTEMC
-#include "systemc.h"
-#endif
-
-#include <string>
-#include <iostream>
-#include <sys/time.h>
-
-#include "Behavioural/Generic/Queue/include/Queue.h"
-#include "Common/include/Time.h"
-
-using namespace std;
-using namespace morpheo;
-using namespace morpheo::behavioural;
-using namespace morpheo::behavioural::generic;
-
-using namespace morpheo::behavioural::generic::queue;
-
-void test    (string name,
-	      morpheo::behavioural::generic::queue::Parameters * param);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/SelfTest/include/top.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/SelfTest/include/top.h	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/SelfTest/include/top.h	(revision 113)
@@ -0,0 +1,77 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ * Test "Queue"
+ */
+
+#ifdef SYSTEMC
+#include "systemc.h"
+#endif
+
+#define NB_ITERATION  1
+#define CYCLE_MAX     (2048*NB_ITERATION)
+
+#include "Common/include/Test.h"
+#include "Common/include/Time.h"
+#include "Behavioural/Generic/Queue/include/Queue.h"
+
+using namespace std;
+using namespace morpheo;
+using namespace morpheo::behavioural;
+using namespace morpheo::behavioural::generic;
+
+using namespace morpheo::behavioural::generic::queue;
+
+void test    (string name,
+	      morpheo::behavioural::generic::queue::Parameters * param);
+
+SC_MODULE(top)
+{
+#ifdef SYSTEMC
+ private: sc_clock               *  in_CLOCK ;
+ private: sc_signal<Tcontrol_t>  *  in_NRESET;
+
+ private: sc_signal<Tcontrol_t>  *  in_INSERT_VAL;
+ private: sc_signal<Tcontrol_t>  * out_INSERT_ACK;
+ private: sc_signal<Tdata_t   >  *  in_INSERT_DATA;
+
+ private: sc_signal<Tcontrol_t>  * out_RETIRE_VAL;
+ private: sc_signal<Tcontrol_t>  *  in_RETIRE_ACK;
+ private: sc_signal<Tdata_t   >  * out_RETIRE_DATA;
+
+ private: sc_signal<Tcontrol_t> ** out_SLOT_VAL ; //[nb_port_slot]
+ private: sc_signal<Tdata_t   > ** out_SLOT_DATA; //[nb_port_slot]
+
+ private: sc_signal<Tptr_t    >  * out_PTR_WRITE;
+ private: sc_signal<Tptr_t    >  * out_PTR_READ ;
+#endif
+
+ private: std::string name;
+ private: Tusage_t _usage;
+ private: morpheo::behavioural::generic::queue::Parameters * _param;
+#ifdef STATISTICS
+ private: morpheo::behavioural::Parameters_Statistics * _param_stat;
+#endif
+ private: Queue * component;
+
+ private: void usage
+    (
+#ifdef MTI_SYSTEMC
+     int argc, const char * const * argv
+#else
+     int argc, char * argv[]
+#endif
+     );
+ private: void allocation   (void);
+ private: void deallocation (void);
+ public : void test         (void);
+
+#ifdef MTI_SYSTEMC
+  SC_CTOR(top::top);
+#else
+ public : top (sc_module_name module_name,int argc, char * argv[]);
+#endif
+ public : ~top(void);
+};
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/SelfTest/src/main.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/SelfTest/src/main.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/SelfTest/src/main.cpp	(revision 113)
@@ -2,73 +2,47 @@
  * $Id$
  *
- * [ Description ]
+ * [ Description ]
  * 
  */
 
-#include "Behavioural/Generic/Queue/SelfTest/include/test.h"
+#include "Behavioural/Generic/Queue/SelfTest/include/top.h"
 
-#define NB_PARAMS 5
+#ifndef MTI_SYSTEMC
+# ifndef SYSTEMC
+int main    (int argc, char * argv[])
+# else
+int sc_main (int argc, char * argv[])
+# endif
+{
+  int _return = EXIT_SUCCESS;
 
-void usage (int argc, char * argv[])
-{
-  cerr << "<Usage> " << argv[0] << " name_instance list_params" << endl
-       << "list_params is :" << endl
-       << " - size_queue      (uint32_t)" << endl
-       << " - size_data       (uint32_t)" << endl
-       << " - nb_port_slot    (uint32_t)" << endl
-       << " - have_port_write (bool    )" << endl
-       << " - have_port_read  (bool    )" << endl
-       << "" << endl;
-
-  for (int i=0; i<argc; i++)
-    cerr << argv[i] << " ";
-  cerr << endl;
-
-  exit (1);
-}
-
-#ifndef SYSTEMC
-int main    (int argc, char * argv[])
-#else
-int sc_main (int argc, char * argv[])
-#endif
-{
-  if (argc != 2+NB_PARAMS)
-    usage (argc, argv);
-
-  uint32_t       x = 1;
-  
-  const string   name            =      argv[x++];
-  const uint32_t size_queue      = fromString<uint32_t>(argv[x++]);
-  const uint32_t size_data       = fromString<uint32_t>(argv[x++]);
-  const uint32_t nb_port_slot    = fromString<uint32_t>(argv[x++]);
-  const bool     have_port_write = fromString<bool>(argv[x++]);
-  const bool     have_port_read  = fromString<bool>(argv[x++]);
   try 
     {
-      morpheo::behavioural::generic::queue::Parameters * param = new morpheo::behavioural::generic::queue::Parameters
-	(size_queue,
-	 size_data ,
-         nb_port_slot,
-         have_port_write,
-         have_port_read 
-        );
-      
-      cout << param->print(1);
-      
-      test (name,param);
+      top * my_top = new top ("my_top",argc,argv);
+
+      my_top->test();
+
+      delete my_top;
     }
   catch (morpheo::ErrorMorpheo & error)
     {
-      cout << "<" << name << "> : " <<  error.what ();
-      exit (EXIT_FAILURE);
+      msgError(_("%s\n"),error.what ());
+      _return = EXIT_FAILURE;
     }
-  catch (...)
+  
+  try 
     {
-      cerr << "<" << name << "> : This test must generate a error" << endl;
-      exit (EXIT_FAILURE);
+      if (_return == EXIT_SUCCESS)
+	TEST_OK("Queue : no error");
+      else
+	TEST_KO("Queue : a lot of error");
+    }
+  catch (morpheo::ErrorMorpheo & error)
+    {
+//    msgError(_("<%s> :\n%s"),name.c_str(), error.what ());
+      _return = EXIT_FAILURE;
     }
 
-  return (EXIT_SUCCESS);
+  return _return;
 }
-
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/SelfTest/src/test.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/SelfTest/src/test.cpp	(revision 112)
+++ 	(revision )
@@ -1,184 +1,0 @@
-/*
- * $Id$
- *
- * [ Description ]
- * 
- * Test
- */
-
-#define NB_ITERATION  1
-#define CYCLE_MAX     (2048*NB_ITERATION)
-
-#include "Behavioural/Generic/Queue/SelfTest/include/test.h"
-#include "Behavioural/include/Allocation.h"
-#include "Common/include/Test.h"
-
-void test (string name,
-	   morpheo::behavioural::generic::queue::Parameters * _param)
-{
-  cout << "<" << name << "> : Simulation SystemC" << endl;
-
-#ifdef STATISTICS
-  morpheo::behavioural::Parameters_Statistics * _parameters_statistics = new morpheo::behavioural::Parameters_Statistics (5,50);
-#endif
-
-  Tusage_t _usage = USE_ALL;
-
-//   _usage = usage_unset(_usage,USE_SYSTEMC              );
-//   _usage = usage_unset(_usage,USE_VHDL                 );
-//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
-//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
-//   _usage = usage_unset(_usage,USE_POSITION             );
-//   _usage = usage_unset(_usage,USE_STATISTICS           );
-//   _usage = usage_unset(_usage,USE_INFORMATION          );
-
-  Queue * _Queue = new Queue 
-    (name.c_str(),
-#ifdef STATISTICS
-     _parameters_statistics,
-#endif
-     _param,
-     _usage);
-  
-#ifdef SYSTEMC
-  /*********************************************************************
-   * Déclarations des signaux
-   *********************************************************************/
-  string rename;
-
-  sc_clock              *  in_CLOCK  = new sc_clock ("clock", 1.0, 0.5);	 
-  sc_signal<Tcontrol_t> *  in_NRESET = new sc_signal<Tcontrol_t> ("NRESET");
-
-  ALLOC0_SC_SIGNAL( in_INSERT_VAL , "in_INSERT_VAL" ,Tcontrol_t);
-  ALLOC0_SC_SIGNAL(out_INSERT_ACK ,"out_INSERT_ACK" ,Tcontrol_t);
-  ALLOC0_SC_SIGNAL( in_INSERT_DATA, "in_INSERT_DATA",Tdata_t   );
-  ALLOC0_SC_SIGNAL(out_RETIRE_VAL ,"out_RETIRE_VAL" ,Tcontrol_t);
-  ALLOC0_SC_SIGNAL( in_RETIRE_ACK , "in_RETIRE_ACK" ,Tcontrol_t);
-  ALLOC0_SC_SIGNAL(out_RETIRE_DATA,"out_RETIRE_DATA",Tdata_t   );
-  ALLOC1_SC_SIGNAL(out_SLOT_VAL   ,"out_SLOT_VAL"   ,Tcontrol_t,_param->_nb_port_slot);
-  ALLOC1_SC_SIGNAL(out_SLOT_DATA  ,"out_SLOT_DATA"  ,Tdata_t   ,_param->_nb_port_slot);
-  ALLOC0_SC_SIGNAL(out_PTR_WRITE  ,"out_PTR_WRITE"  ,Tptr_t    );
-  ALLOC0_SC_SIGNAL(out_PTR_READ   ,"out_PTR_READ"   ,Tptr_t    );
-  
-  /********************************************************
-   * Instanciation
-   ********************************************************/
-  
-  cout << "<" << name << "> Instanciation of _Queue" << endl;
-  
-  (*(_Queue->in_CLOCK))        (*(in_CLOCK));
-  (*(_Queue->in_NRESET))       (*(in_NRESET));
-
-  INSTANCE0_SC_SIGNAL(_Queue, in_INSERT_VAL );
-  INSTANCE0_SC_SIGNAL(_Queue,out_INSERT_ACK );
-  INSTANCE0_SC_SIGNAL(_Queue, in_INSERT_DATA);
-  INSTANCE0_SC_SIGNAL(_Queue,out_RETIRE_VAL );
-  INSTANCE0_SC_SIGNAL(_Queue, in_RETIRE_ACK );
-  INSTANCE0_SC_SIGNAL(_Queue,out_RETIRE_DATA);
-  INSTANCE1_SC_SIGNAL(_Queue,out_SLOT_VAL   ,_param->_nb_port_slot);
-  INSTANCE1_SC_SIGNAL(_Queue,out_SLOT_DATA  ,_param->_nb_port_slot);
-  if (_param->_have_port_ptr_write)
-  INSTANCE0_SC_SIGNAL(_Queue,out_PTR_WRITE  );
-  if (_param->_have_port_ptr_read )
-  INSTANCE0_SC_SIGNAL(_Queue,out_PTR_READ   );
-
-  cout << "<" << name << "> Start Simulation ............" << endl;
-  Time * _time = new Time();
-
-  /********************************************************
-   * Simulation - Begin
-   ********************************************************/
-
-  // Initialisation
-  const  int32_t percent_insert_transaction = 75;
-  const  int32_t percent_retire_transaction = 75;
-  const uint32_t nb_request = 3*_param->_size_queue;
-
-  const uint32_t seed = 0;
-//const uint32_t seed = static_cast<uint32_t>(time(NULL));
-
-  srand(seed);
-
-  SC_START(0);
-  LABEL("Initialisation");
-
-  in_INSERT_VAL -> write(0);
-  in_RETIRE_ACK -> write(0);
-
-  LABEL("Reset");
-  in_NRESET->write(0);
-  SC_START(5);
-  in_NRESET->write(1);  
-
-  LABEL("Loop of Test");
-
-  uint32_t data_in  = 0;
-  uint32_t data_out = 0;
-  uint32_t nb_elt   = 0;
-
-  for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++)
-    {
-      LABEL("Iteration %d",iteration);
-
-      while (data_out <= nb_request)
-	{
-	  in_INSERT_VAL  -> write((rand()%100)<percent_insert_transaction);
-	  in_INSERT_DATA -> write(data_in);
-	  in_RETIRE_ACK  -> write((rand()%100)<percent_retire_transaction);
-
-	  SC_START(0); // genMoore
-
-          for (uint32_t i=0; i<_param->_nb_port_slot; ++i)
-            {
-              TEST(Tcontrol_t, out_SLOT_VAL [i]->read(), (i<nb_elt));
-              if (i<nb_elt)
-              TEST(Tdata_t   , out_SLOT_DATA[i]->read(), data_out+i);
-                
-            }
-
-	  if ( in_INSERT_VAL->read() and out_INSERT_ACK->read())
-	    {
-	      LABEL ("Transaction with interface : INSERT");
-	      data_in ++;
-              nb_elt ++;
-	    }
-	  if (out_RETIRE_VAL->read() and  in_RETIRE_ACK->read())
-	    {
-	      LABEL ("Transaction with interface : RETIRE");
-	      TEST(Tdata_t, out_RETIRE_DATA->read(), data_out);
-	      data_out++;
-              nb_elt --;
-	    }
-
-	  SC_START(1);
-	}
-    }
-
-  /********************************************************
-   * Simulation - End
-   ********************************************************/
-
-  TEST_OK ("End of Simulation");
-  delete _time;
-  cout << "<" << name << "> ............ Stop Simulation" << endl;
-
-  delete in_CLOCK;
-  delete in_NRESET;
-
-  DELETE0_SC_SIGNAL( in_INSERT_VAL );
-  DELETE0_SC_SIGNAL(out_INSERT_ACK );
-  DELETE0_SC_SIGNAL( in_INSERT_DATA);
-  DELETE0_SC_SIGNAL(out_RETIRE_VAL );
-  DELETE0_SC_SIGNAL( in_RETIRE_ACK );
-  DELETE0_SC_SIGNAL(out_RETIRE_DATA);
-  DELETE1_SC_SIGNAL(out_SLOT_VAL   ,_param->_nb_port_slot);
-  DELETE1_SC_SIGNAL(out_SLOT_DATA  ,_param->_nb_port_slot);
-  DELETE0_SC_SIGNAL(out_PTR_WRITE  );
-  DELETE0_SC_SIGNAL(out_PTR_READ   );
-#endif
-
-  delete _Queue;
-#ifdef STATISTICS
-  delete _parameters_statistics;
-#endif
-}
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/SelfTest/src/top.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/SelfTest/src/top.cpp	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/SelfTest/src/top.cpp	(revision 113)
@@ -0,0 +1,74 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Generic/Queue/SelfTest/include/top.h"
+#include "Behavioural/include/Selftest.h"
+
+#define NB_PARAMS 5
+
+#ifdef MTI_SYSTEMC
+SC_MODULE_EXPORT(top);
+#endif
+
+#ifdef MTI_SYSTEMC
+SC_CTOR(top::top)
+#else
+top::top (sc_module_name module_name, int argc, char * argv[])
+#endif
+{
+#ifdef MTI_SYSTEMC
+  // accessing command-line arguments with modelsim
+  int argc;
+  const char * const * argv;
+
+  argc = sc_argc ();
+  argv = sc_argv ();
+#endif
+
+  if (argc != 2+NB_PARAMS)
+    usage (argc, argv);
+
+  uint32_t size_queue     ;
+  uint32_t size_data      ;
+  uint32_t nb_port_slot   ;
+  bool     have_port_write;
+  bool     have_port_read ;
+
+  uint32_t x=1;
+
+  SELFTEST0(name           ,string  ,argv,x);
+  SELFTEST0(size_queue     ,uint32_t,argv,x);
+  SELFTEST0(size_data      ,uint32_t,argv,x);
+  SELFTEST0(nb_port_slot   ,uint32_t,argv,x);
+  SELFTEST0(have_port_write,bool    ,argv,x);
+  SELFTEST0(have_port_read ,bool    ,argv,x);
+
+  _param = new morpheo::behavioural::generic::queue::Parameters
+    (
+      size_queue
+     ,size_data 
+     ,nb_port_slot
+     ,have_port_write
+     ,have_port_read
+//   ,true
+     );
+  
+  // msg(_("%s"),_param.print(0).c_str());
+  
+  // Allocation component
+  allocation ();
+  
+#ifdef MTI_SYSTEMC
+  SC_THREAD(test);
+#endif
+}
+
+top::~top (void)
+{
+  deallocation ();
+  delete _param;
+}
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/SelfTest/src/top_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/SelfTest/src/top_allocation.cpp	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/SelfTest/src/top_allocation.cpp	(revision 113)
@@ -0,0 +1,101 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ * Test
+ */
+
+#include "Behavioural/Generic/Queue/SelfTest/include/top.h"
+#include "Behavioural/include/Allocation.h"
+
+void top::allocation (void)
+{
+  if (setlocale (LC_ALL, "") == NULL)
+    msgWarning(_("setlocale ko.\n"));
+
+  try 
+    {
+      _param->test();
+    }
+  catch (morpheo::ErrorMorpheo & error)
+    {
+      msgError(_("<%s> : %s"),name.c_str(),error.what());
+      return;
+    }
+  catch (...)
+    {
+      msgError(_("<%s> : This test must generate a error"),name.c_str());
+      exit (EXIT_FAILURE);
+    }
+
+  _usage = USE_ALL;
+//   _usage = usage_unset(_usage,USE_SYSTEMC              );
+//   _usage = usage_unset(_usage,USE_VHDL                 );
+//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
+//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
+//   _usage = usage_unset(_usage,USE_POSITION             );
+//   _usage = usage_unset(_usage,USE_STATISTICS           );
+//   _usage = usage_unset(_usage,USE_INFORMATION          );
+
+#ifdef STATISTICS
+  if (usage_is_set(_usage,USE_STATISTICS))
+  _param_stat = new morpheo::behavioural::Parameters_Statistics (5,CYCLE_MAX);
+#endif
+
+  component = new Queue 
+    (name.c_str(),
+#ifdef STATISTICS
+     _param_stat,
+#endif
+     _param,
+     _usage
+     );
+  
+#ifdef SYSTEMC
+  if (usage_is_set(_usage,USE_SYSTEMC))
+    {
+  /*********************************************************************
+   * Déclarations des signaux
+   *********************************************************************/
+  msgInformation(_("<%s> : Create signal.\n"),name.c_str());
+
+  in_CLOCK  = new sc_clock ("clock", TIME_PERIOD, TIME_UNIT, 0.5); //name,period,time_unit,duty_cycle
+
+  ALLOC0_SC_SIGNAL( in_NRESET     ," in_NRESET"     ,Tcontrol_t);
+
+  ALLOC0_SC_SIGNAL( in_INSERT_VAL , "in_INSERT_VAL" ,Tcontrol_t);
+  ALLOC0_SC_SIGNAL(out_INSERT_ACK ,"out_INSERT_ACK" ,Tcontrol_t);
+  ALLOC0_SC_SIGNAL( in_INSERT_DATA, "in_INSERT_DATA",Tdata_t   );
+  ALLOC0_SC_SIGNAL(out_RETIRE_VAL ,"out_RETIRE_VAL" ,Tcontrol_t);
+  ALLOC0_SC_SIGNAL( in_RETIRE_ACK , "in_RETIRE_ACK" ,Tcontrol_t);
+  ALLOC0_SC_SIGNAL(out_RETIRE_DATA,"out_RETIRE_DATA",Tdata_t   );
+  ALLOC1_SC_SIGNAL(out_SLOT_VAL   ,"out_SLOT_VAL"   ,Tcontrol_t,_param->_nb_port_slot);
+  ALLOC1_SC_SIGNAL(out_SLOT_DATA  ,"out_SLOT_DATA"  ,Tdata_t   ,_param->_nb_port_slot);
+  ALLOC0_SC_SIGNAL(out_PTR_WRITE  ,"out_PTR_WRITE"  ,Tptr_t    );
+  ALLOC0_SC_SIGNAL(out_PTR_READ   ,"out_PTR_READ"   ,Tptr_t    );
+  
+  /********************************************************
+   * Instanciation
+   ********************************************************/
+  
+  msgInformation(_("<%s> : Instanciation of _Queue.\n"),name.c_str());
+
+  INSTANCE0_SC_SIGNAL(component, in_CLOCK);
+  INSTANCE0_SC_SIGNAL(component, in_NRESET);
+
+  INSTANCE0_SC_SIGNAL(component, in_INSERT_VAL );
+  INSTANCE0_SC_SIGNAL(component,out_INSERT_ACK );
+  INSTANCE0_SC_SIGNAL(component, in_INSERT_DATA);
+  INSTANCE0_SC_SIGNAL(component,out_RETIRE_VAL );
+  INSTANCE0_SC_SIGNAL(component, in_RETIRE_ACK );
+  INSTANCE0_SC_SIGNAL(component,out_RETIRE_DATA);
+  INSTANCE1_SC_SIGNAL(component,out_SLOT_VAL   ,_param->_nb_port_slot);
+  INSTANCE1_SC_SIGNAL(component,out_SLOT_DATA  ,_param->_nb_port_slot);
+  if (_param->_have_port_ptr_write)
+  INSTANCE0_SC_SIGNAL(component,out_PTR_WRITE  );
+  if (_param->_have_port_ptr_read )
+  INSTANCE0_SC_SIGNAL(component,out_PTR_READ   );
+    }
+#endif
+}
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/SelfTest/src/top_deallocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/SelfTest/src/top_deallocation.cpp	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/SelfTest/src/top_deallocation.cpp	(revision 113)
@@ -0,0 +1,33 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ * Test
+ */
+#include "Behavioural/Generic/Queue/SelfTest/include/top.h"
+#include "Behavioural/include/Allocation.h"
+
+void top::deallocation (void)
+{
+#ifdef SYSTEMC
+  delete             in_CLOCK;
+  DELETE0_SC_SIGNAL( in_NRESET);
+
+  DELETE0_SC_SIGNAL( in_INSERT_VAL );
+  DELETE0_SC_SIGNAL(out_INSERT_ACK );
+  DELETE0_SC_SIGNAL( in_INSERT_DATA);
+  DELETE0_SC_SIGNAL(out_RETIRE_VAL );
+  DELETE0_SC_SIGNAL( in_RETIRE_ACK );
+  DELETE0_SC_SIGNAL(out_RETIRE_DATA);
+  DELETE1_SC_SIGNAL(out_SLOT_VAL   ,_param->_nb_port_slot);
+  DELETE1_SC_SIGNAL(out_SLOT_DATA  ,_param->_nb_port_slot);
+  DELETE0_SC_SIGNAL(out_PTR_WRITE  );
+  DELETE0_SC_SIGNAL(out_PTR_READ   );
+#endif
+
+  delete component;
+#ifdef STATISTICS
+  delete _param_stat;
+#endif
+}
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/SelfTest/src/top_test.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/SelfTest/src/top_test.cpp	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/SelfTest/src/top_test.cpp	(revision 113)
@@ -0,0 +1,102 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ * Test
+ */
+
+#include "Behavioural/Generic/Queue/SelfTest/include/top.h"
+#include "Behavioural/include/Allocation.h"
+
+void top::test (void)
+{
+#ifdef SYSTEMC
+  if (usage_is_set(_usage,USE_SYSTEMC))
+    {
+      msgInformation(_("<%s> : Start Simulation ............\n"),name.c_str());
+      
+      Time * _time = new Time();
+      
+      /********************************************************
+       * Simulation - Begin
+       ********************************************************/
+      
+      // Initialisation
+      const  int32_t percent_insert_transaction = 75;
+      const  int32_t percent_retire_transaction = 75;
+      const uint32_t nb_request = 3*_param->_size_queue;
+      
+      const uint32_t seed = 0;
+      //const uint32_t seed = static_cast<uint32_t>(time(NULL));
+      
+      srand(seed);
+      
+      SC_CYCLE(0);
+      LABEL("Initialisation");
+      
+      in_INSERT_VAL -> write(0);
+      in_RETIRE_ACK -> write(0);
+      
+      LABEL("Reset");
+      in_NRESET->write(0);
+      SC_CYCLE(5);
+      in_NRESET->write(1);  
+      
+      LABEL("Loop of Test");
+      
+      uint32_t data_in  = 0;
+      uint32_t data_out = 0;
+      uint32_t nb_elt   = 0;
+      
+      for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++)
+        {
+          LABEL("Iteration %d",iteration);
+          
+          while (data_out <= nb_request)
+            {
+              in_INSERT_VAL  -> write((rand()%100)<percent_insert_transaction);
+              in_INSERT_DATA -> write(data_in);
+              in_RETIRE_ACK  -> write((rand()%100)<percent_retire_transaction);
+              
+              SC_CYCLE(0); // genMoore
+              
+              for (uint32_t i=0; i<_param->_nb_port_slot; ++i)
+                {
+                  TEST(Tcontrol_t, out_SLOT_VAL [i]->read(), (i<nb_elt));
+                  if (i<nb_elt)
+                    TEST(Tdata_t   , out_SLOT_DATA[i]->read(), data_out+i);
+                  
+                }
+              
+              if ( in_INSERT_VAL->read() and out_INSERT_ACK->read())
+                {
+                  LABEL ("Transaction with interface : INSERT");
+                  data_in ++;
+                  nb_elt ++;
+                }
+              if (out_RETIRE_VAL->read() and  in_RETIRE_ACK->read())
+                {
+                  LABEL ("Transaction with interface : RETIRE");
+                  TEST(Tdata_t, out_RETIRE_DATA->read(), data_out);
+                  data_out++;
+                  nb_elt --;
+                }
+              
+              SC_CYCLE(1);
+            }
+        }
+      
+      /********************************************************
+       * Simulation - End
+       ********************************************************/
+      
+      TEST_OK ("");
+      
+      sc_stop();
+      delete _time;
+      
+      msgInformation(_("<%s> : ............ Stop Simulation\n"),name.c_str());
+    }
+#endif
+}
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/SelfTest/src/top_usage.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/SelfTest/src/top_usage.cpp	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/SelfTest/src/top_usage.cpp	(revision 113)
@@ -0,0 +1,28 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Generic/Queue/SelfTest/include/top.h"
+
+void top::usage 
+(
+#ifdef MTI_SYSTEMC
+ int argc, const char * const * argv
+#else
+ int argc, char * argv[]
+#endif
+ )
+{
+  msgError (_("<Usage> %s name_instance list_params.\n"),argv[0]);
+  msgError (_("list_params is :\n"));
+  msgError (_(" * size_queue      (uint32_t)\n"));
+  msgError (_(" * size_data       (uint32_t)\n"));
+  msgError (_(" * nb_port_slot    (uint32_t)\n"));
+  msgError (_(" * have_port_write (bool    )\n"));
+  msgError (_(" * have_port_read  (bool    )\n"));
+
+  exit (1);
+}
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Parameters.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Parameters.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Parameters.cpp	(revision 113)
@@ -21,4 +21,5 @@
                           bool     have_port_ptr_write,
                           bool     have_port_ptr_read ):
+    behavioural::Parameters("Queue"),
     _size_queue          (size_queue),
     _size_data           (size_data ),
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Queue.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Queue.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Queue.cpp	(revision 113)
@@ -33,13 +33,13 @@
     ,_usage            (usage)
   {
-    log_printf(FUNC,Queue,FUNCTION,"Begin");
+    log_begin(Queue,FUNCTION);
+    
+// #if DEBUG_Core == true
+//     log_printf(INFO,Core,FUNCTION,_("<%s> Parameters"),_name.c_str());
 
-#if DEBUG_Core == true
-    log_printf(INFO,Core,FUNCTION,_("<%s> Parameters"),_name.c_str());
+//     std::cout << *param << std::endl;
+// #endif    
 
-    std::cout << *param << std::endl;
-#endif    
-
-    log_printf(INFO,Queue,FUNCTION,"Allocation");
+    log_printf(INFO,Queue,FUNCTION,_("<%s> Allocation"),_name.c_str());
     allocation ();
 
@@ -47,5 +47,5 @@
     if (usage_is_set(_usage,USE_STATISTICS))
       {	
-	log_printf(INFO,Queue,FUNCTION,"Allocation of statistics");
+	log_printf(INFO,Queue,FUNCTION,_("<%s> Allocation of statistics"),_name.c_str());
 	
 	statistics_declaration(param_statistics);
@@ -57,5 +57,5 @@
       {
 	// generate the vhdl
-	log_printf(INFO,Queue,FUNCTION,"Generate the vhdl");
+	log_printf(INFO,Queue,FUNCTION,_("<%s> Generate the vhdl"),_name.c_str());
 	
 	vhdl();
@@ -66,5 +66,5 @@
     if (usage_is_set(_usage,USE_SYSTEMC))
       {
-	log_printf(INFO,Queue,FUNCTION,"Method - transition");
+	log_printf(INFO,Queue,FUNCTION,_("<%s> Method - transition"),_name.c_str());
 	
 	SC_METHOD (transition);
@@ -76,5 +76,5 @@
 # endif    
 	
-	log_printf(INFO,Queue,FUNCTION,"Method - genMoore");
+	log_printf(INFO,Queue,FUNCTION,_("<%s> Method - genMoore"),_name.c_str());
 	
 	SC_METHOD (genMoore);
@@ -88,5 +88,5 @@
 #endif
       }
-    log_printf(FUNC,Queue,FUNCTION,"End");
+    log_end(Queue,FUNCTION);
   };
   
@@ -95,10 +95,10 @@
   Queue::~Queue (void)
   {
-    log_printf(FUNC,Queue,FUNCTION,"Begin");
+    log_begin(Queue,FUNCTION);
 
 #ifdef STATISTICS
     if (usage_is_set(_usage,USE_STATISTICS))
       {
-	log_printf(INFO,Queue,FUNCTION,"Generate Statistics file");
+	log_printf(INFO,Queue,FUNCTION,_("<%s> Generate Statistics file"),_name.c_str());
 	
 	delete _stat;
@@ -106,8 +106,8 @@
 #endif
 
-    log_printf(INFO,Queue,FUNCTION,"Deallocation");
+    log_printf(INFO,Queue,FUNCTION,_("<%s> Deallocation"),_name.c_str());
     deallocation ();
 
-    log_printf(FUNC,Queue,FUNCTION,"End");
+    log_end(Queue,FUNCTION);
   };
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Queue_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Queue_allocation.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Queue_allocation.cpp	(revision 113)
@@ -9,10 +9,8 @@
 #include "Behavioural/include/Allocation.h"
 
-namespace morpheo                    {
+namespace morpheo {
 namespace behavioural {
 namespace generic {
 namespace queue {
-
-
 
 #undef  FUNCTION
@@ -25,5 +23,5 @@
 
     Entity * entity = _component->set_entity (_name       
-					      ,"Queue"
+					      ,_param->_type
 #ifdef POSITION
 					      ,COMBINATORY 
@@ -111,5 +109,4 @@
 }; // end namespace queue
 }; // end namespace generic
-
 }; // end namespace behavioural
 }; // end namespace morpheo              
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Queue_deallocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Queue_deallocation.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Queue_deallocation.cpp	(revision 113)
@@ -21,8 +21,8 @@
     log_printf(FUNC,Queue,FUNCTION,"Begin");
 
-    if (usage_is_set(_usage,USE_SYSTEMC))
+//     if (usage_is_set(_usage,USE_SYSTEMC))
       { 
-	delete    in_CLOCK ;
-	delete    in_NRESET;
+        DELETE0_SIGNAL( in_CLOCK ,1);
+        DELETE0_SIGNAL( in_NRESET,1);
 
         DELETE0_SIGNAL( in_INSERT_VAL                        ,1);
@@ -41,6 +41,9 @@
         if (_param->_have_port_ptr_read )
         DELETE0_SIGNAL(out_PTR_READ    ,_param->_size_ptr);
+      }
 	
-        // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
+      if (usage_is_set(_usage,USE_SYSTEMC))
+      { 
+        // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
         delete _queue_control;
         delete _queue_data;
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Queue_statistics_declaration.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Queue_statistics_declaration.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue/src/Queue_statistics_declaration.cpp	(revision 113)
@@ -21,5 +21,5 @@
 
     _stat = new Stat (static_cast<std::string>(_name),
-                      "Queue",
+                      _param->_type,
                       param_statistics);
     
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue_Control/Makefile
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue_Control/Makefile	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue_Control/Makefile	(revision 113)
@@ -8,12 +8,14 @@
 
 #-----[ Directory ]----------------------------------------
-DIR_MORPHEO			= ../../..
+DIR_COMPONENT			= ./
+include				$(DIR_COMPONENT)/Makefile.defs
 
 #-----[ Library ]------------------------------------------
 LIBRARY				= $(DIR_LIB)/libQueue_Control.a
 
+
 #-----[ include ]------------------------------------------
 
-all				: $(LIBRARY_NEED)
+all				:
 				@$(MAKE) all_component
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue_Control/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue_Control/Makefile.defs	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue_Control/Makefile.defs	(revision 113)
@@ -0,0 +1,13 @@
+# 
+# $Id$
+# 
+# [ Description ]
+# 
+# Makefile
+# 
+
+ENTITY				= Queue_Control
+
+#-----[ Directory ]----------------------------------------
+DIR_COMPONENT_MORPHEO		= ../../..
+DIR_MORPHEO			= $(DIR_COMPONENT)/$(DIR_COMPONENT_MORPHEO)
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue_Control/Makefile.deps
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue_Control/Makefile.deps	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Queue_Control/Makefile.deps	(revision 113)
@@ -2,5 +2,5 @@
 # $Id$
 # 
-# [ Description ]
+# [ Description ]
 # 
 # Makefile
@@ -8,18 +8,28 @@
 # DIR_MORPHEO must be defined
 
-Queue_Control			= yes
+Queue_Control  	   		= yes
 
-#-----[ Library ]------------------------------------------
-Queue_Control_LIBRARY		= -lQueue_Control
+ifndef Behavioural
+include 			$(DIR_MORPHEO)/Behavioural/Makefile.deps
+endif
 
-Queue_Control_DIR_LIBRARY	= -L$(DIR_MORPHEO)/Behavioural/Generic/Queue_Control/lib
+#-----[ Library ]------------------------------------------
+Queue_Control_LIBRARY		= 	-lQueue_Control	\
+				$(Behavioural_LIBRARY)	
 
-#-----[ Rules ]--------------------------------------------
+Queue_Control_DIR_LIBRARY	=	-L$(DIR_MORPHEO)/Behavioural/Generic/Queue_Control/lib	\
+				$(Behavioural_DIR_LIBRARY)
+
+#-----[ Rules ]--------------------------------------------
+
+#.NOTPARALLEL			: Queue_Control_library Queue_Control_library_clean
 
 Queue_Control_library		:
 				@\
-				$(MAKE) --directory=$(DIR_MORPHEO)/Behavioural/Generic/Queue_Control --makefile=Makefile ;
-	
+				$(MAKE) Behavioural_library;\
+				$(MAKE) --directory=$(DIR_MORPHEO)/Behavioural/Generic/Queue_Control --makefile=Makefile;
+
 Queue_Control_library_clean	:
 				@\
+				$(MAKE) Behavioural_library_clean;\
 				$(MAKE) --directory=$(DIR_MORPHEO)/Behavioural/Generic/Queue_Control --makefile=Makefile clean;
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/Makefile.defs	(revision 113)
@@ -2,10 +2,12 @@
 # $Id$
 # 
-# [ Description ]
+# [ Description ]
 # 
 # Makefile
 # 
 
-#-----[ Directory ]----------------------------------------
+ENTITY                          = RegisterFile
+
+#-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../..
 DIR_MORPHEO			= $(DIR_COMPONENT)/$(DIR_COMPONENT_MORPHEO)
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/Makefile.defs	(revision 113)
@@ -2,10 +2,12 @@
 # $Id$
 # 
-# [ Description ]
+# [ Description ]
 # 
 # Makefile
 # 
 
-#-----[ Directory ]----------------------------------------
+ENTITY                          = RegisterFile_Monolithic
+
+#-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../..
 DIR_MORPHEO			= $(DIR_COMPONENT)/$(DIR_COMPONENT_MORPHEO)
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/SelfTest/src/test.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/SelfTest/src/test.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/SelfTest/src/test.cpp	(revision 113)
@@ -159,5 +159,5 @@
       while (nb_ack < _param->_nb_word)
 	{
-	  cout << "cycle : " << static_cast<uint32_t> (sc_simulation_time()) << endl;
+	  cout << "cycle : " << static_cast<uint32_t> (simulation_cycle()) << endl;
 
 	  for (uint32_t num_port=0; num_port < _param->_nb_port_write; num_port ++)
@@ -232,5 +232,5 @@
       while (nb_ack < _param->_nb_word)
 	{
-	  cout << "cycle : " << static_cast<uint32_t> (sc_simulation_time()) << endl;
+	  cout << "cycle : " << static_cast<uint32_t> (simulation_cycle()) << endl;
 	  
 	  for (uint32_t num_port=0; num_port < _param->_nb_port_read; num_port ++)
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/Makefile.defs	(revision 113)
@@ -2,10 +2,12 @@
 # $Id$
 # 
-# [ Description ]
+# [ Description ]
 # 
 # Makefile
 # 
 
-#-----[ Directory ]----------------------------------------
+ENTITY                          = RegisterFile_Multi_Banked
+
+#-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../..
 DIR_MORPHEO			= $(DIR_COMPONENT)/$(DIR_COMPONENT_MORPHEO)
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/SelfTest/src/test.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/SelfTest/src/test.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Multi_Banked/SelfTest/src/test.cpp	(revision 113)
@@ -136,5 +136,5 @@
       while (nb_ack < nb_request)
 	{
-	  cout << "cycle : " << static_cast<uint32_t> (sc_simulation_time()) << endl;
+	  cout << "cycle : " << static_cast<uint32_t> (simulation_cycle()) << endl;
 
 	  for (uint32_t num_port=0; num_port < _param->_nb_port_write; num_port ++)
@@ -183,5 +183,5 @@
 	while (nb_ack < nb_request)
 	  {
-	    cout << "cycle : " << static_cast<uint32_t> (sc_simulation_time()) << endl;
+	    cout << "cycle : " << static_cast<uint32_t> (simulation_cycle()) << endl;
 	    
 	    for (uint32_t num_port=0; num_port < _param->_nb_port_read; num_port ++)
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/SelfTest/src/test.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/SelfTest/src/test.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/SelfTest/src/test.cpp	(revision 113)
@@ -136,5 +136,5 @@
       while (nb_ack < nb_request)
 	{
-	  cout << "cycle : " << static_cast<uint32_t> (sc_simulation_time()) << endl;
+	  cout << "cycle : " << static_cast<uint32_t> (simulation_cycle()) << endl;
 
 	  for (uint32_t num_port=0; num_port < _param->_nb_port_write; num_port ++)
@@ -184,5 +184,5 @@
 	  while (nb_ack < nb_request)
 	    {
-	      cout << "cycle : " << static_cast<uint32_t> (sc_simulation_time()) << endl;
+	      cout << "cycle : " << static_cast<uint32_t> (simulation_cycle()) << endl;
 	      
 	      for (uint32_t num_port=0; num_port < _param->_nb_port_read; num_port ++)
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/Makefile.defs	(revision 113)
@@ -2,10 +2,12 @@
 # $Id$
 # 
-# [ Description ]
+# [ Description ]
 # 
 # Makefile
 # 
 
-#-----[ Directory ]----------------------------------------
+ENTITY                          = Select_Priority_Fixed
+
+#-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../..
 DIR_MORPHEO			= $(DIR_COMPONENT)/$(DIR_COMPONENT_MORPHEO)
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/SelfTest/src/test.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/SelfTest/src/test.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/SelfTest/src/test.cpp	(revision 113)
@@ -108,7 +108,7 @@
  
   sc_start(0);
-//cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Initialisation" << endl;
+//cout << "{"+toString(static_cast<uint32_t>(simulation_cycle()))+"} Initialisation" << endl;
 
-  cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Loop of Test" << endl;
+  cout << "{"+toString(static_cast<uint32_t>(simulation_cycle()))+"} Loop of Test" << endl;
 
   for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++)
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/Makefile.defs	(revision 113)
@@ -2,10 +2,12 @@
 # $Id$
 # 
-# [ Description ]
+# [ Description ]
 # 
 # Makefile
 # 
 
-#-----[ Directory ]----------------------------------------
+ENTITY                          = Shifter
+
+#-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../..
 DIR_MORPHEO			= $(DIR_COMPONENT)/$(DIR_COMPONENT_MORPHEO)
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/SelfTest/configuration.cfg
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/SelfTest/configuration.cfg	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/SelfTest/configuration.cfg	(revision 113)
@@ -0,0 +1,7 @@
+Shifter
+16	16	*4	# size_data  
+1	2	+1	# nb_port    
+0	2	+1	# shift_value
+0	0	+1	# rotate     
+0	2	+1	# direction  
+0	2	+1	# carry      
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/SelfTest/src/test.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/SelfTest/src/test.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Shifter/SelfTest/src/test.cpp	(revision 113)
@@ -147,5 +147,5 @@
 	  if (param._have_shift_logic_left)
 	    {
-	      cout << "{" << static_cast<uint32_t>(sc_simulation_time()) << "} Test    Shift   Left  Logic" << endl;
+	      cout << "{" << static_cast<uint32_t>(simulation_cycle()) << "} Test    Shift   Left  Logic" << endl;
 	      direction = _left ;
 	      type      = _shift;
@@ -156,5 +156,5 @@
 	  else
 	    {
-	      cout << "{" << static_cast<uint32_t>(sc_simulation_time()) << "} No Test Shift   Left  Logic" << endl;
+	      cout << "{" << static_cast<uint32_t>(simulation_cycle()) << "} No Test Shift   Left  Logic" << endl;
 	      continue;
 	    }
@@ -162,5 +162,5 @@
 	  if (param._have_shift_logic_right)
 	    {
-	      cout << "{" << static_cast<uint32_t>(sc_simulation_time()) << "} Test    Shift   Right Logic" << endl;
+	      cout << "{" << static_cast<uint32_t>(simulation_cycle()) << "} Test    Shift   Right Logic" << endl;
 	      direction = _right;
 	      type      = _shift;
@@ -171,5 +171,5 @@
 	  else
 	    {
-	      cout << "{" << static_cast<uint32_t>(sc_simulation_time()) << "} No Test Shift   Right Logic" << endl;
+	      cout << "{" << static_cast<uint32_t>(simulation_cycle()) << "} No Test Shift   Right Logic" << endl;
 	      continue;
 	    }
@@ -177,5 +177,5 @@
 	  if (param._have_shift_arithmetic_left)
 	    {
-	      cout << "{" << static_cast<uint32_t>(sc_simulation_time()) << "} Test    Shift   Left  Arithmetic" << endl;
+	      cout << "{" << static_cast<uint32_t>(simulation_cycle()) << "} Test    Shift   Left  Arithmetic" << endl;
 	      direction = _left      ;
 	      type      = _shift     ;
@@ -186,5 +186,5 @@
 	  else
 	    {
-	      cout << "{" << static_cast<uint32_t>(sc_simulation_time()) << "} No Test Shift   Left  Arithmetic" << endl;
+	      cout << "{" << static_cast<uint32_t>(simulation_cycle()) << "} No Test Shift   Left  Arithmetic" << endl;
 	      continue;
 	    }
@@ -192,5 +192,5 @@
 	  if (param._have_shift_arithmetic_right)
 	    {
-	      cout << "{" << static_cast<uint32_t>(sc_simulation_time()) << "} Test    Shift   Right Arithmetic" << endl;
+	      cout << "{" << static_cast<uint32_t>(simulation_cycle()) << "} Test    Shift   Right Arithmetic" << endl;
 	      direction = _right;
 	      type      = _shift;
@@ -201,5 +201,5 @@
 	  else
 	    {
-	      cout << "{" << static_cast<uint32_t>(sc_simulation_time()) << "} No Test Shift   Right Arithmetic" << endl;
+	      cout << "{" << static_cast<uint32_t>(simulation_cycle()) << "} No Test Shift   Right Arithmetic" << endl;
 	      continue;
 	    }
@@ -207,5 +207,5 @@
 	  if ( param._have_rotate_left)
 	    {
-	      cout << "{" << static_cast<uint32_t>(sc_simulation_time()) << "} Test    Rotate  Left" << endl;
+	      cout << "{" << static_cast<uint32_t>(simulation_cycle()) << "} Test    Rotate  Left" << endl;
 	      direction = _left  ;
 	      type      = _rotate;
@@ -216,5 +216,5 @@
 	  else
 	    {
-	      cout << "{" << static_cast<uint32_t>(sc_simulation_time()) << "} No Test Rotate  Left" << endl;
+	      cout << "{" << static_cast<uint32_t>(simulation_cycle()) << "} No Test Rotate  Left" << endl;
 	      continue;
 	    }
@@ -222,5 +222,5 @@
 	  if (param._have_rotate_right)
 	    {
-	      cout << "{" << static_cast<uint32_t>(sc_simulation_time()) << "} Test    Rotate  Right" << endl;
+	      cout << "{" << static_cast<uint32_t>(simulation_cycle()) << "} Test    Rotate  Right" << endl;
 	      direction = _right;
 	      type      = _rotate;
@@ -231,5 +231,5 @@
 	  else
 	    {
-	      cout << "{" << static_cast<uint32_t>(sc_simulation_time()) << "} No Test Rotate  Right" << endl;
+	      cout << "{" << static_cast<uint32_t>(simulation_cycle()) << "} No Test Rotate  Right" << endl;
 	      continue;
 	    }
@@ -283,5 +283,5 @@
 	      sc_start(0);
 	      
-	      cout << "{" << static_cast<uint32_t>(sc_simulation_time()) << "}" << endl;
+	      cout << "{" << static_cast<uint32_t>(simulation_cycle()) << "}" << endl;
 	      
 	      for (uint32_t i=0; i<param._nb_port; i++)
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Sort/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Sort/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Sort/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Sort
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = Victim
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../..
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/Makefile.defs	(revision 113)
@@ -2,10 +2,12 @@
 # $Id$
 # 
-# [ Description ]
+# [ Description ]
 # 
 # Makefile
 # 
 
-#-----[ Directory ]----------------------------------------
+ENTITY                          = Victim_Pseudo_LRU
+
+#-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ../../../..
 DIR_MORPHEO			= $(DIR_COMPONENT)/$(DIR_COMPONENT_MORPHEO)
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/SelfTest/src/test.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/SelfTest/src/test.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Victim/Victim_Pseudo_LRU/SelfTest/src/test.cpp	(revision 113)
@@ -119,5 +119,5 @@
     for (uint32_t k=0; k<param._nb_entity; k++)
       {
-	cout << "time : " << static_cast<uint32_t>(sc_simulation_time()) << endl;
+	cout << "time : " << static_cast<uint32_t>(simulation_cycle()) << endl;
 	for (uint32_t i=0; i<param._nb_access; i++)
 	  {
@@ -165,5 +165,5 @@
 	{
 	  
-	  cout << "time : " << static_cast<uint32_t>(sc_simulation_time()) << endl;
+	  cout << "time : " << static_cast<uint32_t>(simulation_cycle()) << endl;
 	  for (uint32_t i=0; i<param._nb_access; i++)
 	    {
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.Common
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.Common	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.Common	(revision 113)
@@ -22,4 +22,7 @@
 endif
 
+##-----[ Entity ]-------------------------------------------
+#ENTITY				= $$($(BASENAME) $$PWD)
+
 #-----[ Directory ]----------------------------------------
 #DIR_TMP                         = .
@@ -27,5 +30,6 @@
 DIR_INC				= include
 DIR_SRC				= src
-DIR_OBJ				= obj
+DIR_OBJ				= $(DIR_TMP)/obj
+DIR_LIB                         = $(DIR_TMP)/lib
 DIR_SCRIPT			= $(MORPHEO_SCRIPT)
 
@@ -35,11 +39,7 @@
 				  -I$(DIR_MORPHEO) 
 
-LIBDIR 				= $(DIR_LIBRARY)			\
+LIBDIR 				= -L$(DIR_LIB) \
 				  $(SYSTEMC_LIBDIR_$(SIMULATOR)) 	
 #				  $(OR1K_LIBDIR) 				
-
-LIBS		   		= $(LIBRARY) -lm $(SYSTEMC_LIBNAME_$(SIMULATOR))
-
-#                                 $(OR1K_LIBNAME) -lbfd  
 
 FLAGS_COMMON			= $(SYSTEMC_CFLAGS_$(SIMULATOR))	\
@@ -50,21 +50,23 @@
 
 #-----[ Variable ]-----------------------------------------
-ENTITY				= $$($(BASENAME) $$PWD)
-
-OBJECTS_COMMON			= $(patsubst $(DIR_SRC)/%.cpp,$(DIR_OBJ)/%.o,$(wildcard $(DIR_SRC)/*.cpp))
+#OBJECTS_COMMON			= $(patsubst $(DIR_SRC)/%.cpp,$(DIR_OBJ)/%.o,$(wildcard $(DIR_SRC)/*.cpp))
+SOURCES				= $(wildcard $(DIR_SRC)/*.cpp)
+OBJECTS_COMMON			= $(addprefix $(DIR_OBJ)/$(ENTITY)_, $(addsuffix .o, $(basename $(notdir $(SOURCES)))))
 
 HEADERS  			= $(wildcard $(DIR_INC)/*.h)
 
 #-----[ Rules ]--------------------------------------------
-.PRECIOUS			: $(DIR_OBJ)/%.o
+.PRECIOUS			: $(DIR_OBJ)/$(ENTITY)_%.o
 
 test_env			:
 				@$(ECHO) "-------------------| $(ENTITY)"
 
+test				:
+				@echo $(DIR_LIBRARY);
 
-$(DIR_OBJ)/%.o			: $(DIR_SRC)/%.cpp $(HEADERS)
+$(DIR_OBJ)/$(ENTITY)_%.o        : $(DIR_SRC)/%.cpp $(HEADERS)
 				@\
 				$(ECHO) "Compilation        : $*";\
-				$(CXX) $(CFLAGS) -c -o $@ $<;
+				$(SYSTEMC_CXX_$(SIMULATOR)) $(CFLAGS) -c -o $@ $<;
 
 $(DIR_OBJ)			:
@@ -76,11 +78,12 @@
 				@\
 				$(ECHO) "Delete     temporary files in directory $(PWD)";\
-				$(RM) 	$(DIR_OBJ) 	\
-					$(DIR_BIN) 	\
-					*~ 		\
-					$(DIR_SRC)/*~	\
+				$(RM) 	$(OBJECTS_COMMON)     \
+					*~ 		      \
+					$(DIR_SRC)/*~	      \
 					$(DIR_INC)/*~;
 
 common_clean_all                : common_clean
+				@\
+				$(RM) 	$(DIR_OBJ)
 
 common_help			:
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.Component
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.Component	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.Component	(revision 113)
@@ -2,5 +2,4 @@
 DIR_DOC				= doc
 DIR_TEST			= SelfTest
-DIR_LIB                         = lib
 
 #-----[ Variable ]-----------------------------------------
@@ -11,12 +10,24 @@
 #.NOTPARALLEL			: clean help
 
-all_component			: test_env $(DIR_OBJ) $(DIR_LIB) $(OBJECTS) $(HEADERS)
-				@$(MAKE) $(LIBRARY)
+all_component			: test_env $(DIR_OBJ) $(DIR_LIB)
+				@\
+				$(MAKE) $(LIBRARY);
 
-$(DIR_LIB)/%.a			: $(OBJECTS) $(HEADERS)
+# if simulator is modelsim, libComponent.a is a directory, else is normal library generated by g++
+
+$(DIR_LIB)/%.a			: $(SOURCES) $(HEADERS)
 				@\
-				$(ECHO) "Archive            : $*";\
-				$(AR)  -r $@ $(OBJECTS);\
-				$(RANLIB) $@;
+				case "${SIMULATOR}" in								\
+				    "modelsim")									\
+                                	$(MODELTECH_VLIB) $@;                                                   \
+					$(MODELTECH_SCCOM) $(CFLAGS) $(SOURCES) -work $@;                       \
+					;;									\
+				    *)										\
+					$(MAKE) $(OBJECTS);                                                     \
+					$(ECHO) "Archive            : $*";                                      \
+					$(AR)  -r $@ $(OBJECTS);                                                \
+					$(RANLIB) $@;                                                           \
+					;;									\
+				esac;
 
 $(DIR_LIB)			:
@@ -29,10 +40,9 @@
 
 component_clean			:
-				@$(RM) $(DIR_LIB)
-
+				@$(RM) $(LIBRARY)
 #				if $(TEST) -d $(DIR_DOC); then $(MAKE) --directory=$(DIR_DOC) --makefile=Makefile clean; fi;
 
 component_clean_all		: component_clean
-
+				@$(RM) $(DIR_LIB)
 #				if $(TEST) -d $(DIR_DOC); then $(MAKE) --directory=$(DIR_DOC) --makefile=Makefile clean_all; fi;
 				
@@ -46,5 +56,4 @@
 				$(ECHO) " * help                 : print this text";\
 				$(ECHO) "";
-				
 
 help				: 
@@ -58,5 +67,5 @@
 				$(MAKE) component_clean;
 
-clean_all				: 
+clean_all			: 
 				@\
 				$(MAKE) common_clean_all ;\
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.Selftest
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.Selftest	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.Selftest	(revision 113)
@@ -9,5 +9,4 @@
 #-----[ Directory ]----------------------------------------
 DIR_BIN				= $(DIR_TMP)/bin
-DIR_LIB                         = ../lib
 DIR_CFG_GEN			= $(DIR_TMP)/configuration_generated
 DIR_CFG_USER			= configuration
@@ -19,4 +18,10 @@
 
 OBJECTS      			= $(OBJECTS_COMMON)
+
+LIBS		   		= -lm $(SYSTEMC_LIBNAME_$(SIMULATOR))
+#                                 $(OR1K_LIBNAME) -lbfd  
+
+MODELTECH_LIBRARY               = $(addprefix -lib ,$(addsuffix .a, $(subst -l,$(DIR_LIB)/lib,$(LIBRARY))))
+#MODELTECH_LIBRARY               = $(LIBRARY)
 
 EXEC_PREFIX 			= 
@@ -152,5 +157,5 @@
 						x=$$i;											\
 						for j in $${ENUM_PARAM[*]}; do								\
-							declare -a RANGE_LOCAL=($${RANGE[$$j]});							\
+							declare -a RANGE_LOCAL=($${RANGE[$$j]});					\
 							DATA[$$j]="$${RANGE_LOCAL[$$((($$x % $${SIZE[$$j]})))]} ";			\
 							x=$$(($$x/$${SIZE[$$j]})); 							\
@@ -195,25 +200,30 @@
 				fi;
 
-$(DIR_BIN)/%.x			: $(OBJECTS) $(HEADERS) $(DIR_LIB)
+$(DIR_BIN)/%.x			: $(SOURCES) $(HEADERS) $(DIR_OBJ) $(DIR_BIN)
 				@\
 				$(ECHO) "Linkage            : $*";\
-				$(CXX) $(LFLAGS) -o $@ $(OBJECTS) $(LIBS);
-
-$(DIR_LIB)			:
-				@\
-				$(ECHO) "Create directory   : $@";\
-				$(MKDIR) $@;
-
-$(DIR_BIN)			:
-				@\
-				$(ECHO) "Create directory   : $@";\
-				$(MKDIR) $@;
-
-$(DIR_LOG)			:
-				@\
-				$(ECHO) "Create directory   : $@";\
-				$(MKDIR) $@;
-
-$(DIR_CFG_GEN)			:
+				case "${SIMULATOR}" in								\
+				    "modelsim")									\
+					$(MAKE) vhdl_package;							\
+					$(MAKE) vhdl_entity;							\
+					$(MODELTECH_SCCOM) -work $(DIR_WORK) $(CFLAGS) $(SOURCES);		\
+					$(MODELTECH_SCCOM) -work $(DIR_WORK) $(MODELTECH_LIBRARY) $(LFLAGS) $(LIBS) -link;\
+					$(ECHO) "#!$(SHELL)"                                              > $@;	\
+					$(ECHO) "cd $${PWD};"                                            >> $@;	\
+					$(ECHO) 'declare args;'                                          >> $@;	\
+					$(ECHO) 'for i in $${*}; do'                                     >> $@;	\
+					$(ECHO) '    args=$${args}" -sc_arg $${i}";'                     >> $@;	\
+					$(ECHO) 'done;'                                                  >> $@;	\
+					$(ECHO) "$(MODELTECH_VSIM) -novopt "'$${args}'" $(MODELTECH_LIBRARY) $(DIR_WORK).top;" >> $@; \
+					$(ECHO) "cd -;"                                                  >> $@;	\
+					$(CHMOD) +x $@;								\
+					;;									\
+				    *)										\
+					$(MAKE) $(OBJECTS);							\
+					$(SYSTEMC_CXX_$(SIMULATOR)) $(LFLAGS) -o $@ $(OBJECTS) $(LIBRARY) $(LIBS);\
+					;;									\
+				esac;
+
+$(DIR_BIN) $(DIR_LOG) $(DIR_CFG_GEN) :
 				@\
 				$(ECHO) "Create directory   : $@";\
@@ -223,4 +233,5 @@
 				@$(RM) 	$(DIR_LOG)		\
 					$(DIR_CFG_USER)/*~	\
+					$(DIR_BIN)/$(EXEC).x	\
 					*.vhdl			\
 					*.pos			\
@@ -234,5 +245,6 @@
 
 selftest_clean_all		: library_clean
-				
+				@\
+				$(RM) $(DIR_BIN)
 
 selftest_help			:
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.Synthesis
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.Synthesis	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.Synthesis	(revision 113)
@@ -10,5 +10,6 @@
 
 DIR_VHDL			= .
-DIR_WORK			= work
+WORK_NAME                       = work
+DIR_WORK                        = $(MORPHEO_TMP)/$(WORK_NAME)
 
 FPGA_CFG_FILE_LOCAL		= mkf.info
@@ -21,19 +22,50 @@
 FPGA_LOG_FILES			= $(patsubst $(DIR_CFG_GEN)/%.cfg,$(DIR_LOG)/%.fpga.log,$(wildcard $(DIR_CFG_GEN)/*.cfg))	\
 	  			  $(patsubst $(DIR_CFG_USER)/%.cfg,$(DIR_LOG)/%.fpga.log,$(wildcard $(DIR_CFG_USER)/*.cfg))
+
+
 #-----[ Rules ]--------------------------------------------
 .PRECIOUS			: $(DIR_LOG)/%.vhdl.log $(DIR_LOG)/%.sim.log
 
-vhdl				: execute $(DIR_WORK)
+vhdl				: $(EXEC_LOG)
+				@\
+				$(MAKE) vhdl_package; \
+				$(MAKE) vhdl_entity; \
+				$(MAKE) vhdl_testbench
+
+vhdl_package			: $(DIR_WORK)
 				@\
 				declare -a vhdl_files=($$($(LS) $(DIR_VHDL)/*_Pack.vhdl));						\
 				declare -a log_files=($${vhdl_files[*]/%.vhdl/.vhdl.log});						\
-				if $(TEST) $${#log_files[*]} -ne 0; then $(MAKE) $${log_files[*]/#$(DIR_VHDL)/$(DIR_LOG)}; fi;		\
+				if $(TEST) $${#log_files[*]} -ne 0; then $(MAKE) -k $${log_files[*]/#$(DIR_VHDL)/$(DIR_LOG)}; fi;
+
+vhdl_testbench			: $(DIR_WORK)
+				@\
+				declare -a vhdl_files=($$($(LS) $(DIR_VHDL)/*_Testbench.vhdl));						\
+				declare -a log_files=($${vhdl_files[*]/%.vhdl/.vhdl.log});						\
+				if $(TEST) $${#log_files[*]} -ne 0; then $(MAKE) -k $${log_files[*]/#$(DIR_VHDL)/$(DIR_LOG)}; fi;
+
+vhdl_entity			: $(DIR_WORK)
+				@\
 				declare -a vhdl_files=($$($(LS) $(DIR_VHDL)/*.vhdl|$(GREP_NOT) "(_Pack\.|_Testbench\.)"));		\
 				declare -a log_files=($${vhdl_files[*]/%.vhdl/.vhdl.log});						\
-				if $(TEST) $${#log_files[*]} -ne 0; then $(MAKE) $${log_files[*]/#$(DIR_VHDL)/$(DIR_LOG)}; fi;          \
-				declare -a vhdl_files=($$($(LS) $(DIR_VHDL)/*_Testbench.vhdl));						\
-				declare -a log_files=($${vhdl_files[*]/%.vhdl/.vhdl.log});						\
-				if $(TEST) $${#log_files[*]} -ne 0; then $(MAKE) $${log_files[*]/#$(DIR_VHDL)/$(DIR_LOG)}; fi;
+				if $(TEST) $${#log_files[*]} -ne 0; then $(MAKE) -k $${log_files[*]/#$(DIR_VHDL)/$(DIR_LOG)}; fi;       \
 
+#list				:
+#				@\
+#				declare -a vhdl_files=($$($(LS) $(DIR_VHDL)/*.vhdl|$(GREP_NOT) "(_Pack\.|_Testbench\.)"));		\
+#				for file1 in $${vhdl_files[*]}; do \
+#				    declare    x=$$(basename $${file1} .vhdl); \
+#				    declare -i count_x=$($(ECHO) $${x} | ${WC} -m); \
+#                                    for file2 in $${vhdl_files[*]}; do \
+#				        if $(TEST) "$${file1}" != "$${file2}"; then\
+#				           declare    y=$$(basename $${file2} .vhdl); \
+#				           declare -i count_y=$($(ECHO) $${y} | ${WC} -m); \
+#				           if $(TEST) $${count_x} -gt $${count_y}; then \
+#				              break; \
+#				           fi; \
+#				           $(ECHO) $${x}; \
+#				        fi; \
+#				    done; \
+#				done;
 
 sim				: vhdl
@@ -41,5 +73,5 @@
 				declare -a vhdl_files=($$($(LS) $(DIR_VHDL)/*_Testbench.vhdl));						\
 				declare -a log_files=($${vhdl_files[*]/%.vhdl/.sim.log});						\
-				if $(TEST) $${#log_files[*]} -ne 0; then $(MAKE) $${log_files[*]/#$(DIR_VHDL)/$(DIR_LOG)}; fi;
+				if $(TEST) $${#log_files[*]} -ne 0; then $(MAKE) -k $${log_files[*]/#$(DIR_VHDL)/$(DIR_LOG)}; fi;
 
 fpga				: sim
@@ -56,5 +88,5 @@
 				done;					\
 				($(XILINX_ENV); cd $(FPGA_CFG_FILE_GLOBAL_DIR); ./$(FPGA_CFG_FILE_GLOBAL));				\
-				$(MAKE) $(FPGA_LOG_FILES);
+				$(MAKE) -k $(FPGA_LOG_FILES);
 
 $(DIR_LOG)/%.fpga.log     	: 
@@ -65,7 +97,11 @@
 $(DIR_WORK)			:
 				@\
-				$(ECHO) "Create work-space  : $@"; \
-				$(MODELTECH_VLIB) $@; \
-				$(MODELTECH_VMAP) $(XILINX_CORELIB);
+				$(ECHO) "Create work-space  : $@";                                                      \
+				$(MODELTECH_VLIB) $@;                                                                   \
+                                $(MODELTECH_VMAP) $(XILINX_LIBNAME) $(XILINX_LIBDIR);                                   \
+                                if $(TEST) $${?} -ne 0; then                                                            \
+                                   $(ECHO) "Xilinx corelib must be compiled to simulation tools";                       \
+                                   $(ECHO) "Run manualy \"$(XILINX_COMPXLIB)\" with $(XILINX_CORELIB) directory";       \
+                                fi;                                  
 
 $(DIR_LOG)/%.sim.log		: $(DIR_VHDL)/%.vhdl $(DIR_LOG)/%.vhdl.log
@@ -82,10 +118,10 @@
 				@\
 				$(ECHO) "VHDL's Compilation : $*"; \
-				$(MODELTECH_VCOM) $< &> $@;
+				$(MODELTECH_VCOM) -work $(DIR_WORK) $< &> $@;
 
 synthesis_clean			:
 				@\
 				if $(TEST) -f Makefile.mkf; then $(MAKE) -f Makefile.mkf clean; fi; \
-				$(RM) $(DIR_WORK) transcript Makefile.mkf *.wlf;
+				$(RM) $(DIR_WORK) transcript Makefile.mkf *wlf* modelsim.ini;
 
 synthesis_clean_all		: synthesis_clean
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.defs	(revision 113)
@@ -2,8 +2,10 @@
 # $Id$
 # 
-# [ Description ]
+# [ Description ]
 # 
 
-#-----[ Directory ]----------------------------------------
+ENTITY                          = Behavioural
+
+#-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO           = ..
 DIR_MORPHEO                     = $(DIR_COMPONENT)/$(DIR_COMPONENT_MORPHEO)
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component.sh
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component.sh	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component.sh	(revision 113)
@@ -16,5 +16,5 @@
 {
     echo "";
-    echo "usage : $0 <directory> <name>";
+    echo "usage : $0 <directory> <name> <type>";
     echo " - <directory> : localisation of component";
     echo " - <name>      : name of component";
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = @COMPONENT
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= @DIR_MORPHEO
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/SelfTest/include/test.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/SelfTest/include/test.h	(revision 112)
+++ 	(revision )
@@ -1,27 +1,0 @@
-/*
- * $Id$
- *
- * [ Description ]
- * 
- * Test "RegisterFile"
- */
-
-#ifdef SYSTEMC
-#include "systemc.h"
-#endif
-
-#define NB_ITERATION  1
-#define CYCLE_MAX     (1024*NB_ITERATION)
-
-#include "Common/include/Test.h"
-#include "Common/include/Time.h"
-#include "Behavioural/@DIRECTORY/include/@COMPONENT.h"
-
-using namespace std;
-using namespace morpheo;
-using namespace morpheo::behavioural;
-@NAMESPACE_USING
-using namespace morpheo::behavioural::@NAMESPACE_USE;
-
-void test    (string name,
-	      morpheo::behavioural::@NAMESPACE_USE::Parameters * param);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/SelfTest/include/top.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/SelfTest/include/top.h	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/SelfTest/include/top.h	(revision 113)
@@ -0,0 +1,59 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ * Test "@COMPONENT"
+ */
+
+#ifdef SYSTEMC
+#include "systemc.h"
+#endif
+
+#define NB_ITERATION  1
+#define CYCLE_MAX     (1024*NB_ITERATION)
+
+#include "Common/include/Test.h"
+#include "Common/include/Time.h"
+#include "Behavioural/@DIRECTORY/include/@COMPONENT.h"
+
+using namespace std;
+using namespace morpheo;
+using namespace morpheo::behavioural;
+@NAMESPACE_USING
+using namespace morpheo::behavioural::@NAMESPACE_USE;
+
+SC_MODULE(top)
+{
+#ifdef SYSTEMC
+ private: sc_clock               *  in_CLOCK ;
+ private: sc_signal<Tcontrol_t>  *  in_NRESET;
+#endif
+
+ private: std::string name;
+ private: Tusage_t _usage;
+ private: morpheo::behavioural::@NAMESPACE_USE::Parameters * _param;
+#ifdef STATISTICS
+ private: morpheo::behavioural::Parameters_Statistics * _param_stat;
+#endif
+ private: @COMPONENT * component;
+
+ private: void usage
+    (
+#ifdef MTI_SYSTEMC
+     int argc, const char * const * argv
+#else
+     int argc, char * argv[]
+#endif
+     );
+ private: void allocation   (void);
+ private: void deallocation (void);
+ public : void test         (void);
+
+#ifdef MTI_SYSTEMC
+  SC_CTOR(top::top);
+#else
+ public : top (sc_module_name module_name,int argc, char * argv[]);
+#endif
+ public : ~top(void);
+};
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/SelfTest/src/main.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/SelfTest/src/main.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/SelfTest/src/main.cpp	(revision 113)
@@ -6,45 +6,26 @@
  */
 
-#include "Behavioural/@DIRECTORY/SelfTest/include/test.h"
+#include "Behavioural/@DIRECTORY/SelfTest/include/top.h"
 
-#define NB_PARAMS 0
+#ifndef MTI_SYSTEMC
+# ifndef SYSTEMC
+int main    (int argc, char * argv[])
+# else
+int sc_main (int argc, char * argv[])
+# endif
+{
+  int _return = EXIT_SUCCESS;
 
-void usage (int argc, char * argv[])
-{
-  err (_("<Usage> %s name_instance list_params.\n"),argv[0]);
-  err (_("list_params is :\n"));
-  err (_(" *  ()\n"));
-
-  exit (1);
-}
-
-#ifndef SYSTEMC
-int main    (int argc, char * argv[])
-#else
-int sc_main (int argc, char * argv[])
-#endif
-{
-  if (argc != static_cast<int>(2+NB_PARAMS))
-    usage (argc, argv);
-
-  uint32_t x = 1;
-
-  string name = argv[x++];
-
-  int _return = EXIT_SUCCESS;
   try 
     {
-      morpheo::behavioural::@NAMESPACE_USE::Parameters * param = new morpheo::behavioural::@NAMESPACE_USE::Parameters
-	(
-         true //is_toplevel
-        );
-      
-      msg(_("%s"),param->print(0).c_str());
-      
-      test (name,param);
+      top * my_top = new top ("my_top",argc,argv);
+
+      my_top->test();
+
+      delete my_top;
     }
   catch (morpheo::ErrorMorpheo & error)
     {
-      msg (_("<%s> :\n%s"),name.c_str(), error.what ());
+      msgError(_("%s\n"),error.what ());
       _return = EXIT_FAILURE;
     }
@@ -59,8 +40,9 @@
   catch (morpheo::ErrorMorpheo & error)
     {
-//       msg (_("<%s> :\n%s"),name.c_str(), error.what ());
+//    msgError(_("<%s> :\n%s"),name.c_str(), error.what ());
       _return = EXIT_FAILURE;
     }
 
-  return (_return);
+  return _return;
 }
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/SelfTest/src/test.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/SelfTest/src/test.cpp	(revision 112)
+++ 	(revision )
@@ -1,113 +1,0 @@
-/*
- * $Id$
- *
- * [ Description ]
- * 
- * Test
- */
-
-#include "Behavioural/@DIRECTORY/SelfTest/include/test.h"
-#include "Behavioural/include/Allocation.h"
-
-void test (string name,
-	   morpheo::behavioural::@NAMESPACE_USE::Parameters * _param)
-{
-  msg(_("<%s> : Simulation SystemC.\n"),name.c_str());
-
-  if (setlocale (LC_ALL, "") == NULL)
-    msg(_("setlocale ko.\n"));
-
-#ifdef STATISTICS
-  morpheo::behavioural::Parameters_Statistics * _parameters_statistics = new morpheo::behavioural::Parameters_Statistics (5,CYCLE_MAX);
-#endif
-
-  Tusage_t _usage = USE_ALL;
-
-//   _usage = usage_unset(_usage,USE_SYSTEMC              );
-//   _usage = usage_unset(_usage,USE_VHDL                 );
-//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
-//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
-//   _usage = usage_unset(_usage,USE_POSITION             );
-//   _usage = usage_unset(_usage,USE_STATISTICS           );
-//   _usage = usage_unset(_usage,USE_INFORMATION          );
-
-  @COMPONENT * _@COMPONENT = new @COMPONENT 
-    (name.c_str(),
-#ifdef STATISTICS
-     _parameters_statistics,
-#endif
-     _param,
-     _usage);
-  
-#ifdef SYSTEMC
-  if (usage_is_set(_usage,USE_SYSTEMC))
-    {
-  /*********************************************************************
-   * Déclarations des signaux
-   *********************************************************************/
-  string rename;
-
-  sc_clock              *  in_CLOCK  = new sc_clock ("clock", 1.0, 0.5);	 
-  sc_signal<Tcontrol_t> *  in_NRESET = new sc_signal<Tcontrol_t> ("NRESET");
-  
-  /********************************************************
-   * Instanciation
-   ********************************************************/
-  
-  msg(_("<%s> : Instanciation of _@COMPONENT.\n"),name.c_str());
-
-  (*(_@COMPONENT->in_CLOCK))        (*(in_CLOCK));
-  (*(_@COMPONENT->in_NRESET))       (*(in_NRESET));
-
-
-  msg(_("<%s> : Start Simulation ............\n"),name.c_str());
-    
-  Time * _time = new Time();
-
-  /********************************************************
-   * Simulation - Begin
-   ********************************************************/
-
-  // Initialisation
-
-  const uint32_t seed = 0;
-//const uint32_t seed = static_cast<uint32_t>(time(NULL));
-
-  srand(seed);
-
-  SC_START(0);
-  LABEL("Initialisation");
-
-  LABEL("Reset");
-  in_NRESET->write(0);
-  SC_START(5);
-  in_NRESET->write(1);  
-
-  LABEL("Loop of Test");
-
-  for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++)
-    {
-      LABEL("Iteration %d",iteration);
-
-      SC_START(1);
-    }
-
-  /********************************************************
-   * Simulation - End
-   ********************************************************/
-
-  TEST_OK ("End of Simulation");
-  delete _time;
-
-  msg(_("<%s> : ............ Stop Simulation\n"),name.c_str());
-
-  delete in_CLOCK;
-  delete in_NRESET;
-    }
-#endif
-
-  delete _@COMPONENT;
-#ifdef STATISTICS
-  delete _parameters_statistics;
-#endif
-}
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/SelfTest/src/top.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/SelfTest/src/top.cpp	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/SelfTest/src/top.cpp	(revision 113)
@@ -0,0 +1,57 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/@DIRECTORY/SelfTest/include/top.h"
+#include "Behavioural/include/Selftest.h"
+
+#define NB_PARAMS 0
+
+#ifdef MTI_SYSTEMC
+SC_MODULE_EXPORT(top);
+#endif
+
+#ifdef MTI_SYSTEMC
+SC_CTOR(top::top)
+#else
+top::top (sc_module_name module_name, int argc, char * argv[])
+#endif
+{
+#ifdef MTI_SYSTEMC
+  // accessing command-line arguments with modelsim
+  int argc;
+  const char * const * argv;
+
+  argc = sc_argc ();
+  argv = sc_argv ();
+#endif
+
+  if (argc != 2+NB_PARAMS)
+    usage (argc, argv);
+
+  uint32_t x=1;
+  SELFTEST0(name,string,argv,x);
+
+  _param = new morpheo::behavioural::@NAMESPACE_USE::Parameters
+    (
+     true
+     );
+  
+  // msg(_("%s"),_param.print(0).c_str());
+  
+  // Allocation component
+  allocation ();
+  
+#ifdef MTI_SYSTEMC
+  SC_THREAD(test);
+#endif
+}
+
+top::~top (void)
+{
+  deallocation ();
+  delete _param;
+}
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/SelfTest/src/top_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/SelfTest/src/top_allocation.cpp	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/SelfTest/src/top_allocation.cpp	(revision 113)
@@ -0,0 +1,77 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ * Test
+ */
+
+#include "Behavioural/@DIRECTORY/SelfTest/include/top.h"
+#include "Behavioural/include/Allocation.h"
+
+void top::allocation (void)
+{
+  if (setlocale (LC_ALL, "") == NULL)
+    msgWarning(_("setlocale ko.\n"));
+
+  try 
+    {
+      _param->test();
+    }
+  catch (morpheo::ErrorMorpheo & error)
+    {
+      msgError(_("<%s> : %s"),name.c_str(),error.what());
+      return;
+    }
+  catch (...)
+    {
+      msgError(_("<%s> : This test must generate a error"),name.c_str());
+      exit (EXIT_FAILURE);
+    }
+
+  _usage = USE_ALL;
+//   _usage = usage_unset(_usage,USE_SYSTEMC              );
+//   _usage = usage_unset(_usage,USE_VHDL                 );
+//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
+//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
+//   _usage = usage_unset(_usage,USE_POSITION             );
+//   _usage = usage_unset(_usage,USE_STATISTICS           );
+//   _usage = usage_unset(_usage,USE_INFORMATION          );
+
+#ifdef STATISTICS
+  if (usage_is_set(_usage,USE_STATISTICS))
+  _param_stat = new morpheo::behavioural::Parameters_Statistics (5,CYCLE_MAX);
+#endif
+
+  component = new @COMPONENT 
+    (name.c_str(),
+#ifdef STATISTICS
+     _param_stat,
+#endif
+     _param,
+     _usage
+     );
+  
+#ifdef SYSTEMC
+  if (usage_is_set(_usage,USE_SYSTEMC))
+    {
+  /*********************************************************************
+   * Déclarations des signaux
+   *********************************************************************/
+  msgInformation(_("<%s> : Create signal.\n"),name.c_str());
+
+  in_CLOCK  = new sc_clock ("clock", TIME_PERIOD, TIME_UNIT, 0.5); //name,period,time_unit,duty_cycle
+
+  ALLOC0_SC_SIGNAL( in_NRESET        ," in_NRESET        ",Tcontrol_t);
+  
+  /********************************************************
+   * Instanciation
+   ********************************************************/
+  
+  msgInformation(_("<%s> : Instanciation of _@COMPONENT.\n"),name.c_str());
+
+  INSTANCE0_SC_SIGNAL(component, in_CLOCK         );
+  INSTANCE0_SC_SIGNAL(component, in_NRESET        );
+    }
+#endif
+}
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/SelfTest/src/top_deallocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/SelfTest/src/top_deallocation.cpp	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/SelfTest/src/top_deallocation.cpp	(revision 113)
@@ -0,0 +1,22 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ * Test
+ */
+#include "Behavioural/@DIRECTORY/SelfTest/include/top.h"
+#include "Behavioural/include/Allocation.h"
+
+void top::deallocation (void)
+{
+#ifdef SYSTEMC
+  delete             in_CLOCK;
+  DELETE0_SC_SIGNAL( in_NRESET);
+#endif
+
+  delete component;
+#ifdef STATISTICS
+  delete _param_stat;
+#endif
+}
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/SelfTest/src/top_test.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/SelfTest/src/top_test.cpp	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/SelfTest/src/top_test.cpp	(revision 113)
@@ -0,0 +1,61 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ * Test
+ */
+
+#include "Behavioural/@DIRECTORY/SelfTest/include/top.h"
+#include "Behavioural/include/Allocation.h"
+
+void top::test (void)
+{
+#ifdef SYSTEMC
+  if (usage_is_set(_usage,USE_SYSTEMC))
+    {
+      msgInformation(_("<%s> : Start Simulation ............\n"),name.c_str());
+      
+      Time * _time = new Time();
+      
+      /********************************************************
+       * Simulation - Begin
+       ********************************************************/
+      
+      // Initialisation
+      
+      const uint32_t seed = 0;
+    //const uint32_t seed = static_cast<uint32_t>(time(NULL));
+      
+      srand(seed);
+      
+      SC_CYCLE(0);
+      LABEL("Initialisation");
+      
+      LABEL("Reset");
+      in_NRESET->write(0);
+      SC_CYCLE(5);
+      in_NRESET->write(1);  
+      
+      LABEL("Loop of Test");
+      
+      for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++)
+        {
+          LABEL("Iteration %d",iteration);
+          
+          SC_CYCLE(1);
+        }
+      
+      /********************************************************
+       * Simulation - End
+       ********************************************************/
+      
+      TEST_OK ("");
+      
+      sc_stop();
+      delete _time;
+      
+      msgInformation(_("<%s> : ............ Stop Simulation\n"),name.c_str());
+    }
+#endif
+}
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/SelfTest/src/top_usage.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/SelfTest/src/top_usage.cpp	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/SelfTest/src/top_usage.cpp	(revision 113)
@@ -0,0 +1,24 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/@DIRECTORY/SelfTest/include/top.h"
+
+void top::usage 
+(
+#ifdef MTI_SYSTEMC
+ int argc, const char * const * argv
+#else
+ int argc, char * argv[]
+#endif
+ )
+{
+  msgError (_("<Usage> %s name_instance list_params.\n"),argv[0]);
+  msgError (_("list_params is :\n"));
+  msgError (_(" *  ()\n"));
+
+  exit (1);
+}
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/include/New_Component.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/include/New_Component.h	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/include/New_Component.h	(revision 113)
@@ -13,5 +13,5 @@
 #endif
 
-
+#include "Behavioural/@DIRECTORY/include/Wrapper_@COMPONENT.h"
 #include "Behavioural/@DIRECTORY/include/Parameters.h"
 #include "Behavioural/@DIRECTORY/include/Types.h"
@@ -24,4 +24,5 @@
 #endif
 #include "Behavioural/include/Usage.h"
+#include "Behavioural/include/Simulation.h"
 
 #include "Common/include/ToString.h"
@@ -44,5 +45,5 @@
   protected : const std::string  _name;
   protected : const Parameters * _param;
-  private   : const Tusage_t     _usage;
+  public    :       Tusage_t     _usage;
 
 #ifdef STATISTICS
@@ -59,9 +60,14 @@
   public    : SC_IN (Tcontrol_t)            *  in_NRESET       ;
 
-    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
+    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
+    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
     // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#endif
+
+#ifdef MODELSIM_COSIMULATION
+    // ~~~~~[ Wrapper ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  private : Wrapper_@COMPONENT * _wrapper;
 #endif
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/include/Parameters.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/include/Parameters.h	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/include/Parameters.h	(revision 113)
@@ -29,4 +29,6 @@
   public :        Parameters_test msg_error  (void);
 
+  public :        std::string     id         (void);
+
   public :        std::string     print      (uint32_t depth);
   public : friend std::ostream&   operator<< (std::ostream& output_stream,
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/include/Wrapper_New_Component.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/include/Wrapper_New_Component.h	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/include/Wrapper_New_Component.h	(revision 113)
@@ -0,0 +1,50 @@
+#ifndef morpheo_behavioural_@DEFINE_Wrapper_@COMPONENT_h
+#define morpheo_behavioural_@DEFINE_Wrapper_@COMPONENT_h
+
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "systemc.h"
+#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Parameters.h"
+#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Write_unit/Write_unit/Execute_queue/include/Types.h"
+#include "Common/include/Environment.h"
+
+#ifdef MODELSIM_COSIMULATION
+
+namespace morpheo {
+namespace behavioural {
+@NAMESPACE_BEGIN
+
+  class Wrapper_@COMPONENT : public sc_foreign_module
+  {
+    // ~~~~~[ Interface ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  public    : SC_CLOCK                      *  in_CLOCK        ;
+  public    : SC_IN (Tcontrol_t)            *  in_NRESET       ;
+
+    // -----[ Methods ]---------------------------------------------------
+  public  :  Wrapper_@COMPONENT
+  (sc_module_name name_entity,
+   std::string    name_architecture,
+   std::string    name_library
+   ) :
+    sc_foreign_module (name_entity, name_library+"."+name_entity+"("+name_architecture+")")
+    {
+      // caller affect interface signal
+    }
+
+  public  : ~Wrapper_@COMPONENT (void)
+    {
+    }
+  };
+
+@NAMESPACE_END
+}; // end namespace behavioural
+}; // end namespace morpheo              
+
+#endif
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/New_Component.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/New_Component.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/New_Component.cpp	(revision 113)
@@ -29,9 +29,15 @@
     _name              (name)
     ,_param            (param)
-    ,_usage            (usage)
   {
     log_begin(@COMPONENT,FUNCTION);
 
-    usage_environment(_usage);
+    _usage = usage_environment(usage);
+
+#ifdef MODELSIM_COSIMULATION
+    if (_model.get_type(_param->_type) == MODEL_VHDL)
+      {
+        _usage = usage_cosimulation(_usage);
+      }
+#endif
 
     log_printf(INFO,@COMPONENT,FUNCTION,_("<%s> : Allocation"),_name.c_str());
@@ -63,5 +69,5 @@
 
 #ifdef SYSTEMC
-    if (usage_is_set(_usage,USE_SYSTEMC))
+    if (usage_is_set(_usage,USE_SYSTEMC_BODY))
       {
 	log_printf(INFO,@COMPONENT,FUNCTION,_("<%s> : Method - transition"),_name.c_str());
@@ -85,6 +91,7 @@
 // # endif    
 	
+      }
 #endif
-      }
+
     log_end(@COMPONENT,FUNCTION);
   };
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/New_Component_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/New_Component_allocation.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/New_Component_allocation.cpp	(revision 113)
@@ -10,5 +10,5 @@
 #include "Common/include/Max.h"
 
-namespace morpheo                    {
+namespace morpheo {
 namespace behavioural {
 @NAMESPACE_BEGIN
@@ -30,5 +30,5 @@
 
     Entity * entity = _component->set_entity (_name       
-					      ,"@COMPONENT"
+					      ,_param->_type
 #ifdef POSITION
 					      ,COMBINATORY 
@@ -58,4 +58,13 @@
 #endif
 
+#ifdef MODELSIM_COSIMULATION
+    if (usage_is_set(_usage,USE_COSIMULATION))
+      {
+        log_printf(INFO,Execute_queue,FUNCTION,_("<%s> : Create Wrapper"),_name.c_str());
+
+        _wrapper = new Wrapper_@COMPONENT (_name.c_str(),"morpheo_behavioural","work");
+      }
+#endif
+
     log_end(@COMPONENT,FUNCTION);
   };
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/New_Component_deallocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/New_Component_deallocation.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/New_Component_deallocation.cpp	(revision 113)
@@ -19,12 +19,19 @@
     log_begin(@COMPONENT,FUNCTION);
 
-    if (usage_is_set(_usage,USE_SYSTEMC))
-      {
-	delete    in_CLOCK ;
-	delete    in_NRESET;
+//    if (usage_is_set(_usage,USE_SYSTEMC_INTERFACE))
+      { 
+        DELETE0_SIGNAL( in_CLOCK ,1);
+        DELETE0_SIGNAL( in_NRESET,1);
       }
     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
 
     delete _component;
+
+#ifdef MODELSIM_COSIMULATION
+    if (usage_is_set(_usage,USE_COSIMULATION))
+      {
+        delete _wrapper;
+      }
+#endif
 
     log_end(@COMPONENT,FUNCTION);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/New_Component_statistics_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/New_Component_statistics_allocation.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/New_Component_statistics_allocation.cpp	(revision 113)
@@ -20,5 +20,5 @@
 
     _stat = new Stat (static_cast<std::string>(_name),
-		      "@COMPONENT",
+		      _param->_type,
 		      param_statistics);
     
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/Parameters.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/Parameters.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/Parameters.cpp	(revision 113)
@@ -14,5 +14,6 @@
 #undef  FUNCTION
 #define FUNCTION "@COMPONENT::Parameters"
-  Parameters::Parameters (bool is_toplevel)
+  Parameters::Parameters (bool is_toplevel):
+    behavioural::Parameters ("@COMPONENT")
   {
     log_begin(@COMPONENT,FUNCTION);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/Parameters_id.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/Parameters_id.cpp	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/Parameters_id.cpp	(revision 113)
@@ -0,0 +1,31 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/@DIRECTORY/include/Parameters.h"
+
+namespace morpheo                    {
+namespace behavioural {
+@NAMESPACE_BEGIN
+
+#undef  FUNCTION
+#define FUNCTION "@COMPONENT::id"
+  std::string Parameters::id (void)
+  {
+    log_begin(@COMPONENT,FUNCTION);
+
+    std::string id = 
+      (
+       );
+
+    log_end(@COMPONENT,FUNCTION);
+    
+    return id;
+  };
+
+@NAMESPACE_END
+}; // end namespace behavioural
+}; // end namespace morpheo              
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/Parameters_msg_error.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/Parameters_msg_error.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vbe/src/Parameters_msg_error.cpp	(revision 113)
@@ -20,5 +20,5 @@
     log_begin(@COMPONENT,FUNCTION);
 
-    Parameters_test test ("@COMPONENT");
+    Parameters_test test (_type);
 
     log_end(@COMPONENT,FUNCTION);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = @COMPONENT
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= @DIR_MORPHEO
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/SelfTest/include/test.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/SelfTest/include/test.h	(revision 112)
+++ 	(revision )
@@ -1,31 +1,0 @@
-/*
- * $Id$
- *
- * [ Description ]
- * 
- * Test "RegisterFile"
- */
-
-#ifdef SYSTEMC
-#include "systemc.h"
-#endif
-
-#define NB_ITERATION  1
-#define CYCLE_MAX     (1024*NB_ITERATION)
-
-#include "Common/include/Test.h"
-#include "Common/include/Time.h"
-#include "Behavioural/@DIRECTORY/include/@COMPONENT.h"
-
-#include <string>
-#include <iostream>
-#include <sys/time.h>
-
-using namespace std;
-using namespace morpheo;
-using namespace morpheo::behavioural;
-@NAMESPACE_USING
-using namespace morpheo::behavioural::@NAMESPACE_USE;
-
-void test    (string name,
-	      morpheo::behavioural::@NAMESPACE_USE::Parameters * param);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/SelfTest/include/top.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/SelfTest/include/top.h	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/SelfTest/include/top.h	(revision 113)
@@ -0,0 +1,59 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ * Test "@COMPONENT"
+ */
+
+#ifdef SYSTEMC
+#include "systemc.h"
+#endif
+
+#define NB_ITERATION  1
+#define CYCLE_MAX     (1024*NB_ITERATION)
+
+#include "Common/include/Test.h"
+#include "Common/include/Time.h"
+#include "Behavioural/@DIRECTORY/include/@COMPONENT.h"
+
+using namespace std;
+using namespace morpheo;
+using namespace morpheo::behavioural;
+@NAMESPACE_USING
+using namespace morpheo::behavioural::@NAMESPACE_USE;
+
+SC_MODULE(top)
+{
+#ifdef SYSTEMC
+ private: sc_clock               *  in_CLOCK ;
+ private: sc_signal<Tcontrol_t>  *  in_NRESET;
+#endif
+
+ private: std::string name;
+ private: Tusage_t _usage;
+ private: morpheo::behavioural::@NAMESPACE_USE::Parameters * _param;
+#ifdef STATISTICS
+ private: morpheo::behavioural::Parameters_Statistics * _param_stat;
+#endif
+ private: @COMPONENT * component;
+
+ private: void usage
+    (
+#ifdef MTI_SYSTEMC
+     int argc, const char * const * argv
+#else
+     int argc, char * argv[]
+#endif
+     );
+ private: void allocation   (void);
+ private: void deallocation (void);
+ public : void test         (void);
+
+#ifdef MTI_SYSTEMC
+  SC_CTOR(top::top);
+#else
+ public : top (sc_module_name module_name,int argc, char * argv[]);
+#endif
+ public : ~top(void);
+};
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/SelfTest/src/main.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/SelfTest/src/main.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/SelfTest/src/main.cpp	(revision 113)
@@ -6,48 +6,29 @@
  */
 
-#include "Behavioural/@DIRECTORY/SelfTest/include/test.h"
+#include "Behavioural/@DIRECTORY/SelfTest/include/top.h"
 
-#define NB_PARAMS 0
+#ifndef MTI_SYSTEMC
+# ifndef SYSTEMC
+int main    (int argc, char * argv[])
+# else
+int sc_main (int argc, char * argv[])
+# endif
+{
+  int _return = EXIT_SUCCESS;
 
-void usage (int argc, char * argv[])
-{
-  err (_("<Usage> %s name_instance list_params.\n"),argv[0]);
-  err (_("list_params is :\n"));
-  err (_(" *  ()\n"));
-
-  exit (1);
-}
-
-#ifndef SYSTEMC
-int main    (int argc, char * argv[])
-#else
-int sc_main (int argc, char * argv[])
-#endif
-{
-  if (argc != static_cast<int>(2+NB_PARAMS))
-    usage (argc, argv);
-
-  uint32_t x = 1;
-
-  string name = argv[x++];
-
-  int _return = EXIT_SUCCESS;
   try 
     {
-      morpheo::behavioural::@NAMESPACE_USE::Parameters * param = new morpheo::behavioural::@NAMESPACE_USE::Parameters
-	(
-         true // is_toplevel
-        );
-      
-      msg(_("%s"),param->print(0).c_str());
-      
-      test (name,param);
+      top * my_top = new top ("my_top",argc,argv);
+
+      my_top->test();
+
+      delete my_top;
     }
   catch (morpheo::ErrorMorpheo & error)
     {
-      msg (_("<%s> :\n%s"),name.c_str(), error.what ());
+      msgError(_("%s\n"),error.what ());
       _return = EXIT_FAILURE;
     }
-
+  
   try 
     {
@@ -59,8 +40,9 @@
   catch (morpheo::ErrorMorpheo & error)
     {
-//       msg (_("<%s> :\n%s"),name.c_str(), error.what ());
+//    msgError(_("<%s> :\n%s"),name.c_str(), error.what ());
       _return = EXIT_FAILURE;
     }
 
-  return (_return);
+  return _return;
 }
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/SelfTest/src/test.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/SelfTest/src/test.cpp	(revision 112)
+++ 	(revision )
@@ -1,113 +1,0 @@
-/*
- * $Id$
- *
- * [ Description ]
- * 
- * Test
- */
-
-#include "Behavioural/@DIRECTORY/SelfTest/include/test.h"
-#include "Behavioural/include/Allocation.h"
-
-void test (string name,
-	   morpheo::behavioural::@NAMESPACE_USE::Parameters * _param)
-{
-  msg(_("<%s> : Simulation SystemC.\n"),name.c_str());
-  
-  if (setlocale (LC_ALL, "") == NULL)
-    msg(_("setlocale ko.\n"));
-
-#ifdef STATISTICS
-  morpheo::behavioural::Parameters_Statistics * _parameters_statistics = new morpheo::behavioural::Parameters_Statistics (5,CYCLE_MAX);
-#endif
-
-  Tusage_t _usage = USE_ALL;
-
-//   _usage = usage_unset(_usage,USE_SYSTEMC              );
-//   _usage = usage_unset(_usage,USE_VHDL                 );
-//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
-//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
-//   _usage = usage_unset(_usage,USE_POSITION             );
-//   _usage = usage_unset(_usage,USE_STATISTICS           );
-//   _usage = usage_unset(_usage,USE_INFORMATION          );
-
-  @COMPONENT * _@COMPONENT = new @COMPONENT 
-    (name.c_str(),
-#ifdef STATISTICS
-     _parameters_statistics,
-#endif
-     _param,
-     _usage);
-  
-#ifdef SYSTEMC
-  if (usage_is_set(_usage,USE_SYSTEMC))
-    {
-  /*********************************************************************
-   * Déclarations des signaux
-   *********************************************************************/
-  string rename;
-
-  sc_clock              *  in_CLOCK  = new sc_clock ("clock", 1.0, 0.5);	 
-  sc_signal<Tcontrol_t> *  in_NRESET = new sc_signal<Tcontrol_t> ("NRESET");
-  
-  /********************************************************
-   * Instanciation
-   ********************************************************/
-  
-  msg(_("<%s> : Instanciation of _@COMPONENT.\n"),name.c_str());
-
-  (*(_@COMPONENT->in_CLOCK))        (*(in_CLOCK));
-  (*(_@COMPONENT->in_NRESET))       (*(in_NRESET));
-
-
-  msg(_("<%s> : Start Simulation ............\n"),name.c_str());
-    
-  Time * _time = new Time();
-
-  /********************************************************
-   * Simulation - Begin
-   ********************************************************/
-
-  // Initialisation
-
-  const uint32_t seed = 0;
-//const uint32_t seed = static_cast<uint32_t>(time(NULL));
-
-  srand(seed);
-
-  SC_START(0);
-  LABEL("Initialisation");
-
-  LABEL("Reset");
-  in_NRESET->write(0);
-  SC_START(5);
-  in_NRESET->write(1);  
-
-  LABEL("Loop of Test");
-
-  for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++)
-    {
-      LABEL("Iteration %d",iteration);
-
-      SC_START(1);
-    }
-
-  /********************************************************
-   * Simulation - End
-   ********************************************************/
-
-  TEST_OK ("End of Simulation");
-  delete _time;
-
-  msg(_("<%s> : ............ Stop Simulation\n"),name.c_str());
-
-  delete in_CLOCK;
-  delete in_NRESET;
-    }
-#endif
-
-  delete _@COMPONENT;
-#ifdef STATISTICS
-  delete _parameters_statistics;
-#endif
-}
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/SelfTest/src/top.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/SelfTest/src/top.cpp	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/SelfTest/src/top.cpp	(revision 113)
@@ -0,0 +1,57 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/@DIRECTORY/SelfTest/include/top.h"
+#include "Behavioural/include/Selftest.h"
+
+#define NB_PARAMS 0
+
+#ifdef MTI_SYSTEMC
+SC_MODULE_EXPORT(top);
+#endif
+
+#ifdef MTI_SYSTEMC
+SC_CTOR(top::top)
+#else
+top::top (sc_module_name module_name, int argc, char * argv[])
+#endif
+{
+#ifdef MTI_SYSTEMC
+  // accessing command-line arguments with modelsim
+  int argc;
+  const char * const * argv;
+
+  argc = sc_argc ();
+  argv = sc_argv ();
+#endif
+
+  if (argc != 2+NB_PARAMS)
+    usage (argc, argv);
+
+  uint32_t x=1;
+  SELFTEST0(name,string,argv,x);
+
+  _param = new morpheo::behavioural::@NAMESPACE_USE::Parameters
+    (
+     true
+     );
+  
+  // msg(_("%s"),_param.print(0).c_str());
+  
+  // Allocation component
+  allocation ();
+  
+#ifdef MTI_SYSTEMC
+  SC_THREAD(test);
+#endif
+}
+
+top::~top (void)
+{
+  deallocation ();
+  delete _param;
+}
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/SelfTest/src/top_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/SelfTest/src/top_allocation.cpp	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/SelfTest/src/top_allocation.cpp	(revision 113)
@@ -0,0 +1,77 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ * Test
+ */
+
+#include "Behavioural/@DIRECTORY/SelfTest/include/top.h"
+#include "Behavioural/include/Allocation.h"
+
+void top::allocation (void)
+{
+  if (setlocale (LC_ALL, "") == NULL)
+    msgWarning(_("setlocale ko.\n"));
+
+  try 
+    {
+      _param->test();
+    }
+  catch (morpheo::ErrorMorpheo & error)
+    {
+      msgError(_("<%s> : %s"),name.c_str(),error.what());
+      return;
+    }
+  catch (...)
+    {
+      msgError(_("<%s> : This test must generate a error"),name.c_str());
+      exit (EXIT_FAILURE);
+    }
+
+  _usage = USE_ALL;
+//   _usage = usage_unset(_usage,USE_SYSTEMC              );
+//   _usage = usage_unset(_usage,USE_VHDL                 );
+//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
+//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
+//   _usage = usage_unset(_usage,USE_POSITION             );
+//   _usage = usage_unset(_usage,USE_STATISTICS           );
+//   _usage = usage_unset(_usage,USE_INFORMATION          );
+
+#ifdef STATISTICS
+  if (usage_is_set(_usage,USE_STATISTICS))
+  _param_stat = new morpheo::behavioural::Parameters_Statistics (5,CYCLE_MAX);
+#endif
+
+  component = new @COMPONENT 
+    (name.c_str(),
+#ifdef STATISTICS
+     _param_stat,
+#endif
+     _param,
+     _usage
+     );
+  
+#ifdef SYSTEMC
+  if (usage_is_set(_usage,USE_SYSTEMC))
+    {
+  /*********************************************************************
+   * Déclarations des signaux
+   *********************************************************************/
+  msgInformation(_("<%s> : Create signal.\n"),name.c_str());
+
+  in_CLOCK  = new sc_clock ("clock", TIME_PERIOD, TIME_UNIT, 0.5); //name,period,time_unit,duty_cycle
+
+  ALLOC0_SC_SIGNAL( in_NRESET        ," in_NRESET        ",Tcontrol_t);
+  
+  /********************************************************
+   * Instanciation
+   ********************************************************/
+  
+  msgInformation(_("<%s> : Instanciation of _@COMPONENT.\n"),name.c_str());
+
+  INSTANCE0_SC_SIGNAL(component, in_CLOCK         );
+  INSTANCE0_SC_SIGNAL(component, in_NRESET        );
+    }
+#endif
+}
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/SelfTest/src/top_deallocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/SelfTest/src/top_deallocation.cpp	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/SelfTest/src/top_deallocation.cpp	(revision 113)
@@ -0,0 +1,22 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ * Test
+ */
+#include "Behavioural/@DIRECTORY/SelfTest/include/top.h"
+#include "Behavioural/include/Allocation.h"
+
+void top::deallocation (void)
+{
+#ifdef SYSTEMC
+  delete             in_CLOCK;
+  DELETE0_SC_SIGNAL( in_NRESET);
+#endif
+
+  delete component;
+#ifdef STATISTICS
+  delete _param_stat;
+#endif
+}
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/SelfTest/src/top_test.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/SelfTest/src/top_test.cpp	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/SelfTest/src/top_test.cpp	(revision 113)
@@ -0,0 +1,61 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ * Test
+ */
+
+#include "Behavioural/@DIRECTORY/SelfTest/include/top.h"
+#include "Behavioural/include/Allocation.h"
+
+void top::test (void)
+{
+#ifdef SYSTEMC
+  if (usage_is_set(_usage,USE_SYSTEMC))
+    {
+      msgInformation(_("<%s> : Start Simulation ............\n"),name.c_str());
+      
+      Time * _time = new Time();
+      
+      /********************************************************
+       * Simulation - Begin
+       ********************************************************/
+      
+      // Initialisation
+      
+      const uint32_t seed = 0;
+    //const uint32_t seed = static_cast<uint32_t>(time(NULL));
+      
+      srand(seed);
+      
+      SC_CYCLE(0);
+      LABEL("Initialisation");
+      
+      LABEL("Reset");
+      in_NRESET->write(0);
+      SC_CYCLE(5);
+      in_NRESET->write(1);  
+      
+      LABEL("Loop of Test");
+      
+      for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++)
+        {
+          LABEL("Iteration %d",iteration);
+          
+          SC_CYCLE(1);
+        }
+      
+      /********************************************************
+       * Simulation - End
+       ********************************************************/
+      
+      TEST_OK ("");
+      
+      sc_stop();
+      delete _time;
+      
+      msgInformation(_("<%s> : ............ Stop Simulation\n"),name.c_str());
+    }
+#endif
+}
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/SelfTest/src/top_usage.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/SelfTest/src/top_usage.cpp	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/SelfTest/src/top_usage.cpp	(revision 113)
@@ -0,0 +1,24 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/@DIRECTORY/SelfTest/include/top.h"
+
+void top::usage 
+(
+#ifdef MTI_SYSTEMC
+ int argc, const char * const * argv
+#else
+ int argc, char * argv[]
+#endif
+ )
+{
+  msgError (_("<Usage> %s name_instance list_params.\n"),argv[0]);
+  msgError (_("list_params is :\n"));
+  msgError (_(" *  ()\n"));
+
+  exit (1);
+}
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/src/New_Component_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/src/New_Component_allocation.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/src/New_Component_allocation.cpp	(revision 113)
@@ -30,5 +30,5 @@
 
     Entity * entity = _component->set_entity (_name       
-					      ,"@COMPONENT"
+					      ,_param->_type
 #ifdef POSITION
 					      ,COMBINATORY 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/src/New_Component_statistics_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/src/New_Component_statistics_allocation.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/src/New_Component_statistics_allocation.cpp	(revision 113)
@@ -20,5 +20,5 @@
 
     _stat = new Stat (static_cast<std::string>(_name),
-		      "@COMPONENT",
+		      _param->_type,
 		      param_statistics);
     
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/src/Parameters.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/src/Parameters.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component_vst/src/Parameters.cpp	(revision 113)
@@ -14,5 +14,6 @@
 #undef  FUNCTION
 #define FUNCTION "@COMPONENT::Parameters"
-  Parameters::Parameters (bool is_toplevel)
+  Parameters::Parameters (bool is_toplevel):
+    behavioural::Parameters ("@COMPONENT")
   {
     log_begin(@COMPONENT,FUNCTION);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Allocation.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Allocation.h	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Allocation.h	(revision 113)
@@ -101,4 +101,5 @@
 #define PRINT_SIZE_NUL(component,interface,signal) log_printf(TRACE,Allocation,FUNCTION,_("<%s> %s.%s.%s : size is nul."),_name.c_str(),component->get_name().c_str(),interface->get_name().c_str(),signal);
 #define TEST_SIGNAL(name,address) PRINT_SIGNAL_ADDRESS(name,address); TEST_PTR(address)
+#define INSTANCE_FOREIGN_PRINT(name) log_printf(TRACE,Allocation,FUNCTION,"<%s> : %s (%s, %d)",_name.c_str(),name,__FILE__,__LINE__);
 
 // ----------------------------------------------------------------------
@@ -106,6 +107,5 @@
 // ----------------------------------------------------------------------
 
-
-#define __ALLOC0_SIGNAL(sig, name, type)         \
+#define __ALLOC0_SIGNAL(sig, name, type)        \
   {                                             \
     sig = new type (name);                      \
@@ -113,9 +113,9 @@
 
 #ifdef POSITION
-#define ALLOC0_INTERFACE_BEGIN( name, direction, localisation, str)            \
+#define ALLOC0_INTERFACE_BEGIN( name, direction, localisation, str)     \
   INTERFACE_PRINT(name);                                                \
   morpheo::behavioural::Interface_fifo * interface = _interfaces->set_interface( name, direction, localisation, str);
 #else
-#define ALLOC0_INTERFACE_BEGIN( name, direction, localisation, str)            \
+#define ALLOC0_INTERFACE_BEGIN( name, direction, localisation, str)     \
   INTERFACE_PRINT(name);                                                \
   morpheo::behavioural::Interface_fifo * interface = _interfaces->set_interface( name);
@@ -124,13 +124,13 @@
 #define ALLOC0_INTERFACE_END()
 
-#define ALLOC0_VAL_ACK_IN(  sig, name, type)                             \
+#define ALLOC0_VAL_ACK_IN(  sig, name, type)                            \
   {                                                                     \
     sig = interface->set_signal_valack_in (name, type);                 \
   }                                                                     
-#define ALLOC0_VAL_ACK_OUT( sig, name, type)                             \
+#define ALLOC0_VAL_ACK_OUT( sig, name, type)                            \
   {                                                                     \
     sig = interface->set_signal_valack_out(name, type);                 \
   }                                                                     
-#define ALLOC0_VALACK_IN(     sig, type)                                 \
+#define ALLOC0_VALACK_IN(     sig, type)                                \
   {                                                                     \
     sig = interface->set_signal_valack_in (type);                       \
@@ -160,5 +160,5 @@
     }
 
-#define DELETE0_SIGNAL( sig, size)                                       \
+#define DELETE0_SIGNAL( sig, size)                                      \
   if (size > 0)                                                         \
     {                                                                   \
@@ -166,9 +166,35 @@
     }
 
-#define ALLOC0_SC_SIGNAL(  sig, name, type)                              \
-  sc_signal<type> * sig = new sc_signal<type> (name);                   \
+#define ALLOC0_FOREIGN_SIGNAL_IN(  sig, interface, name, type, size)    \
+  if (size > 0)                                                         \
+    {                                                                   \
+      std::string str = (toString("in")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(name)); \
+      sig = new SC_IN    (type) (str.c_str());                          \
+    }
+
+#define ALLOC0_FOREIGN_SIGNAL_OUT( sig, interface, name, type, size)    \
+  if (size > 0)                                                         \
+    {                                                                   \
+      std::string str = (toString("out")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(name)); \
+      sig = new SC_OUT   (type) (str.c_str());                          \
+    }
+
+#define DELETE0_FOREIGN_SIGNAL( sig, size) \
+  {                                        \
+    DELETE0_SIGNAL(sig,size);              \
+  }
+
+#define INSTANCE0_FOREIGN_SIGNAL(component, sig, type, name, size)      \
+  if (size > 0)                                                         \
+    {                                                                   \
+      INSTANCE_FOREIGN_PRINT(name);                                     \
+      _component->set_sc_signal<type>(_name,name,static_cast<void*>(component->sig)); \
+    }
+
+#define ALLOC0_SC_SIGNAL(  sig, name, type)                             \
+  sig = new sc_signal<type> (name);                                     \
   PRINT_SIGNAL_ADDRESS(name,sig);
 
-#define INSTANCE0_SC_SIGNAL(component, sig)                     \
+#define INSTANCE0_SC_SIGNAL(component, sig)                    \
   {                                                            \
     TEST_SIGNAL(component->sig->name(),component->sig);        \
@@ -177,5 +203,5 @@
   }
 
-#define _INSTANCE0_SC_SIGNAL(component, sig1,sig2)                       \
+#define _INSTANCE0_SC_SIGNAL(component, sig1,sig2)                      \
   {                                                                     \
     TEST_SIGNAL(component->sig1->name(),component->sig1);               \
@@ -185,6 +211,7 @@
 
 #define DELETE0_SC_SIGNAL( sig)                  \
-  {                                             \
-    delete sig;                                 \
+  {                                              \
+    PRINT_SIGNAL_ADDRESS("",sig);                \
+    delete sig;                                  \
   }
 
@@ -326,6 +353,33 @@
   }
 
+#define ALLOC1_FOREIGN_SIGNAL_IN(sig, interface, name, type, size,x1)   \
+  {                                                                     \
+    sig = new SC_IN (type) * [x1];                                   \
+    for (uint32_t it1=0; it1<x1; it1++)                                 \
+      if (size > 0)                                                     \
+        {                                                               \
+          std::string str = (toString("in")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(it1)+"_"+toString(name)); \
+          sig [it1] = new SC_IN (type) (str.c_str());                   \
+        }                                                               \
+  }
+
+#define ALLOC1_FOREIGN_SIGNAL_OUT(sig, interface, name, type, size,x1)  \
+  {                                                                     \
+    sig = new SC_OUT (type) * [x1];                                     \
+    for (uint32_t it1=0; it1<x1; it1++)                                 \
+      if (size > 0)                                                     \
+        {                                                               \
+          std::string str = (toString("out")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(it1)+"_"+toString(name)); \
+          sig [it1] = new SC_OUT (type) (str.c_str());                  \
+        }                                                               \
+  }
+
+#define DELETE1_FOREIGN_SIGNAL( sig, size,x1)            \
+  {                                                      \
+    DELETE1_SIGNAL(sig,x1,size);                         \
+  }
+
 #define ALLOC1_SC_SIGNAL( sig, name, type, x1)                          \
-  sc_signal<type> ** sig = new sc_signal<type> * [x1];                  \
+  sig = new sc_signal<type> * [x1];                                     \
   {                                                                     \
     std::string separator="_";                                          \
@@ -359,4 +413,5 @@
     for (uint32_t it1=0; it1<x1; it1++)                                 \
       {                                                                 \
+        PRINT_SIGNAL_ADDRESS("",sig[it1]);                         \
         delete sig[it1];                                                \
       }                                                                 \
@@ -530,6 +585,42 @@
   }
 
+
+#define ALLOC2_FOREIGN_SIGNAL_IN( sig, interface, name, type, size, x1, x2) \
+  {                                                                     \
+    sig = new SC_IN (type) ** [x1];                                     \
+    for (uint32_t it1=0; it1<x1; it1++)                                 \
+      {                                                                 \
+        sig [it1] = new SC_IN (type) * [x2];                            \
+        for (uint32_t it2=0; it2<x2; it2++)                             \
+          if (size > 0)                                                 \
+            {                                                           \
+              std::string str = (toString("in")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(it1)+"_"+toString(it2)+"_"+toString(name)); \
+              sig [it1][it2] = new SC_IN    (type) (str.c_str()); \
+            }                                                           \
+      }                                                                 \
+  }
+
+#define ALLOC2_FOREIGN_SIGNAL_OUT( sig, interface, name, type, size, x1, x2) \
+  {                                                                     \
+    sig = new SC_OUT (type) ** [x1];                                    \
+    for (uint32_t it1=0; it1<x1; it1++)                                 \
+      {                                                                 \
+        sig [it1] = new SC_OUT (type) * [x2];                           \
+        for (uint32_t it2=0; it2<x2; it2++)                             \
+          if (size > 0)                                                 \
+            {                                                           \
+              std::string str = (toString("out")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(it1)+"_"+toString(it2)+"_"+toString(name)); \
+              sig [it1][it2] = new SC_IN    (type) (str.c_str());       \
+            }                                                           \
+      }                                                                 \
+  }
+
+#define DELETE2_FOREIGN_SIGNAL( sig, size,x1,x2)            \
+  {                                                         \
+    DELETE2_SIGNAL(sig,x1,x2,size);                         \
+  }
+
 #define ALLOC2_SC_SIGNAL( sig, name, type, x1, x2)                      \
-  sc_signal<type> *** sig = new sc_signal<type> ** [x1];                \
+  sig = new sc_signal<type> ** [x1];                                    \
   {                                                                     \
     std::string separator="_";                                          \
@@ -571,4 +662,5 @@
         for (uint32_t it2=0; it2<x2; it2++)                             \
           {                                                             \
+            PRINT_SIGNAL_ADDRESS("",sig[it1][it2]);                     \
             delete sig[it1][it2];                                       \
           }                                                             \
@@ -758,6 +850,49 @@
   }
 
+#define ALLOC3_FOREIGN_SIGNAL_IN( sig, interface, name, type, size, x1, x2,x3)     \
+  {                                                                     \
+    sig = new SC_IN (type) *** [x1];                                    \
+    for (uint32_t it1=0; it1<x1; it1++)                                 \
+      {                                                                 \
+        sig [it1] = new SC_IN (type) ** [x2];                           \
+        for (uint32_t it2=0; it2<x2; it2++)                             \
+          {                                                             \
+            sig [it1][it2] = new SC_IN (type) * [x3];                   \
+            for (uint32_t it3=0; it3<x3; it3++)                         \
+              if (size > 0)                                             \
+                {                                                       \
+                  std::string str = (toString("in")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(it1)+"_"+toString(it2)+"_"+toString(it3)+"_"+toString(name)); \
+                  sig [it1][it2][it3] = new SC_IN (type) (str.c_str()); \
+                }                                                       \
+          }                                                             \
+      }                                                                 \
+  }
+
+#define ALLOC3_FOREIGN_SIGNAL_OUT( sig, interface, name, type, size, x1, x2,x3)    \
+  {                                                                     \
+    sig = new SC_OUT (type) *** [x1];                                   \
+    for (uint32_t it1=0; it1<x1; it1++)                                 \
+      {                                                                 \
+        sig [it1] = new SC_OUT (type) ** [x2];                          \
+        for (uint32_t it2=0; it2<x2; it2++)                             \
+          {                                                             \
+            sig [it1][it2] = new SC_OUT (type) * [x3];                  \
+            for (uint32_t it3=0; it3<x3; it3++)                         \
+              if (size > 0)                                             \
+                {                                                       \
+                  std::string str = (toString("out")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(it1)+"_"+toString(it2)+"_"+toString(it3)+"_"+toString(name)); \
+                  sig [it1][it2][it3] = new SC_OUT(type) (str.c_str()); \
+                }                                                       \
+          }                                                             \
+      }                                                                 \
+  }
+
+#define DELETE3_FOREIGN_SIGNAL( sig, size,x1,x2,x3)            \
+  {                                                            \
+    DELETE3_SIGNAL(sig,x1,x2,x3,size);                         \
+  }
+
 #define ALLOC3_SC_SIGNAL( sig, name, type, x1, x2, x3)                  \
-  sc_signal<type> **** sig = new sc_signal<type> *** [x1];              \
+  sig = new sc_signal<type> *** [x1];                                   \
   {                                                                     \
     std::string separator="_";                                          \
@@ -807,4 +942,5 @@
             for (uint32_t it3=0; it3<x3; it3++)                         \
               {                                                         \
+                PRINT_SIGNAL_ADDRESS("",sig[it1][it2][it3]);            \
                 delete sig[it1][it2][it3];                              \
               }                                                         \
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Component.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Component.h	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Component.h	(revision 113)
@@ -72,4 +72,5 @@
     public : Entity    * _entity   ;
     public : Tinstance_t _instance ;
+    public : std::string _architecture;
     } Tcomponent_t;    
   
@@ -102,4 +103,5 @@
 #endif
 						       ,Tinstance_t instance=INSTANCE_ALL 
+                                                       ,std::string architecture=""
 						       );
 
@@ -116,5 +118,7 @@
 
   private   : Signal *              signal_internal   (Entity * entity_productor,
-						       Signal * signal_productor);
+						       Signal * signal_productor,
+                                                       Entity * entity_consumer,
+						       Signal * signal_consumer);
 
   public    : void                  port_map          (std::string component_src ,
@@ -125,4 +129,10 @@
   public    : bool                  test_map          (bool recursive=true);
   private   : bool                  test_map          (uint32_t depth, bool recursive);
+
+  public    : void *                get_sc_signal     (std::string component,
+						       std::string port     );
+//   public    : void                  set_sc_signal     (std::string component,
+// 						       std::string port     ,
+//                                                        void *      sc_signal);
 
 //   public    : bool                  test_equi         (bool recursive=true);
@@ -141,4 +151,31 @@
   public    : friend std::ostream&  operator<<        (std::ostream& output_stream,
 						       morpheo::behavioural::Component & x);
+
+
+#undef  FUNCTION
+#define FUNCTION "Component::set_sc_signal"
+  public    : template <typename T>
+  void set_sc_signal (std::string component,
+                      std::string port     ,
+                      void *      sc_signal)
+    {
+      log_begin(Behavioural,FUNCTION);
+      
+      std::string name_entity = _entity->get_name();
+      
+      Entity * entity = find_entity(component);
+      
+      if (entity == NULL)
+        throw (ERRORMORPHEO (FUNCTION,"In component \""+name_entity+"\", the component \""+component+"\" is unknow.\n"));
+      
+      Signal * signal = entity->find_signal (port);
+      
+      if (signal == NULL)
+        throw (ERRORMORPHEO (FUNCTION,"In component \""+name_entity+"\", the component \""+component+"\" have not the signal \""+port+"\".\n"));
+      
+      signal->alloc<T>(sc_signal);
+      
+      log_end(Behavioural,FUNCTION);
+    };
   };
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Entity.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Entity.h	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Entity.h	(revision 113)
@@ -58,4 +58,5 @@
   public    : std::string           get_name          (void);
   public    : std::string           get_type          (void);
+  public    : Tusage_t              get_usage         (void);
 
 #ifdef POSITION
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interface.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interface.h	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interface.h	(revision 113)
@@ -91,9 +91,12 @@
 
 #ifdef SYSTEMC
+
+#undef  FUNCTION
+#define FUNCTION "Interface::set_signal_clk"
   public    : sc_in_clk *           set_signal_clk       (std::string     name     ,
 							  uint32_t        size     ,
 							  presence_port_t presence_port=CLOCK_VHDL_YES)
     {
-      log_printf(FUNC,Behavioural,"set_signal_clk","Begin");
+      log_begin(Behavioural,FUNCTION);
 
       if ((presence_port != CLOCK_VHDL_YES) and
@@ -101,8 +104,10 @@
 	throw ErrorMorpheo ("Signal \""+name+"\" is a clock, bad presence_port.");
 
+      LowerCase(name);
+
       Signal    * sig  = set_signal (name, IN , size, presence_port);
       sc_in_clk * port;
 
-      if (_usage & USE_SYSTEMC)
+      if (_usage & USE_SYSTEMC_INTERFACE)
 	{
 	  port = new sc_in_clk (sig->_name.c_str());
@@ -114,9 +119,11 @@
 	}
 
-      log_printf(FUNC,Behavioural,"set_signal_clk","End");
-
-      return port;
-    };
-
+      log_end(Behavioural,FUNCTION);
+
+      return port;
+    };
+
+#undef  FUNCTION
+#define FUNCTION "Interface::set_signal_in"
   public    : template <typename T>
               sc_in <T> *           set_signal_in       (std::string     name     ,
@@ -124,5 +131,5 @@
 							 presence_port_t presence_port=PORT_VHDL_YES_TESTBENCH_YES)
     {
-      log_printf(FUNC,Behavioural,"set_signal_in","Begin");
+      log_begin(Behavioural,FUNCTION);
 
       if ((presence_port == CLOCK_VHDL_YES) or 
@@ -130,8 +137,10 @@
 	throw ErrorMorpheo ("Signal \""+name+"\" is not a clock, bad presence_port.");
 
+      LowerCase(name);
+
       Signal    * sig  = set_signal (name, IN , size, presence_port);
       sc_in <T> * port;
 
-      if (_usage & USE_SYSTEMC)
+      if (_usage & USE_SYSTEMC_INTERFACE)
 	{
 	  port = new sc_in <T> (sig->_name.c_str());
@@ -143,9 +152,11 @@
 	}
 
-      log_printf(FUNC,Behavioural,"set_signal_in","End");
-
-      return port;
-    };
-
+      log_end(Behavioural,FUNCTION);
+
+      return port;
+    };
+
+#undef  FUNCTION
+#define FUNCTION "Interface::set_signal_out"
   public    : template <typename T>
               sc_out <T> *          set_signal_out      (std::string     name     ,
@@ -153,5 +164,7 @@
 							 presence_port_t presence_port=PORT_VHDL_YES_TESTBENCH_YES)
     {
-      log_printf(FUNC,Behavioural,"set_signal_out","Begin");
+      log_begin(Behavioural,FUNCTION);
+
+      LowerCase(name);
 
       if ((presence_port == CLOCK_VHDL_YES) or 
@@ -162,5 +175,5 @@
       sc_out <T> * port;
 
-      if (_usage & USE_SYSTEMC)
+      if (_usage & USE_SYSTEMC_INTERFACE)
 	{
 	  port = new sc_out <T> (sig->_name.c_str());
@@ -172,19 +185,23 @@
 	}
 
-      log_printf(FUNC,Behavioural,"set_signal_out","End");
-
-      return port;
-    };
-
+      log_end(Behavioural,FUNCTION);
+
+      return port;
+    };
+
+#undef  FUNCTION
+#define FUNCTION "Interface::set_signal_internal"
   public    : template <typename T>
               sc_signal <T> *       set_signal_internal (std::string   name,
 							 uint32_t size)
     {
-      log_printf(FUNC,Behavioural,"set_signal_internal","Begin");
+      log_begin(Behavioural,FUNCTION);
+
+      LowerCase(name);
 
       Signal * sig = set_signal (name, INTERNAL , size, PORT_VHDL_NO_TESTBENCH_NO);
       sc_signal <T> * port;
 
-      if (_usage & USE_SYSTEMC)
+      if (_usage & USE_SYSTEMC_INTERFACE)
 	{
 	  port = new sc_signal <T> (sig->_name.c_str());
@@ -196,5 +213,5 @@
 	}
 
-      log_printf(FUNC,Behavioural,"set_signal_internal","End");
+      log_end(Behavioural,FUNCTION);
 
       return port;
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Model.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Model.h	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Model.h	(revision 113)
@@ -40,7 +40,18 @@
   public  : model_type_t      get_type  (std::string component);
   public  : debug_verbosity_t get_debug (std::string component);
+  public  : void              print     (void);
   };
   
 }; // end namespace behavioural          
+
+  template<> inline std::string toString<morpheo::behavioural::model_type_t>(const morpheo::behavioural::model_type_t& x)
+  {
+    switch (x)
+      {
+      case morpheo::behavioural::MODEL_SYSTEMC : return "systemc" ; break;
+      case morpheo::behavioural::MODEL_VHDL    : return "vhdl"    ; break;
+      default : return ""; break;
+      }
+  };
 
   template<> inline morpheo::behavioural::model_type_t fromString<morpheo::behavioural::model_type_t>(const std::string& x)
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Parameters.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Parameters.h	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Parameters.h	(revision 113)
@@ -33,4 +33,6 @@
   class Parameters
   {
+  public   :        const std::string _type;
+
     // -----[ fields ]----------------------------------------------------
   public   : static const uint32_t   _size_instruction              = 32;
@@ -127,4 +129,5 @@
     // -----[ methods ]---------------------------------------------------
   public   :                            Parameters (void);
+  public   :                            Parameters (std::string type);
   public   : virtual                   ~Parameters ();
 	
@@ -132,4 +135,5 @@
   public   : virtual std::string        print       (uint32_t depth) = 0;
   public   : virtual Parameters_test    msg_error   (void) = 0;
+  public   : virtual std::string        id          (void) const {return "";}
 
     // methods to copy depends parameters
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Signal.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Signal.h	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Signal.h	(revision 113)
@@ -5,5 +5,5 @@
  * $Id$
  *
- * [ Description ]
+ * [ Description ]
  * 
  */
@@ -90,4 +90,6 @@
   public    : type_info_t       get_type_info           (void);
 
+  public    : void *            get_sc_signal           (void);
+
   public    : bool              presence_vhdl           (void);
   public    : bool              presence_testbench      (void);
@@ -174,5 +176,5 @@
       else
 	_type_info = UNKNOW;
-
+      
       log_printf(TRACE,Behavioural,FUNCTION, "Allocation of %s (%s, 0x%.8x)", _name.c_str(),toString(_type_info).c_str(), static_cast<uint32_t>(reinterpret_cast<uint64_t>(_sc_signal_map)));
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Usage.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Usage.h	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Usage.h	(revision 113)
@@ -2,4 +2,5 @@
 #define morpheo_behavioural_Usage_h
 
+#include "Common/include/Environment.h"
 #include <stdint.h>
 
@@ -7,25 +8,29 @@
 namespace behavioural {
 
-  typedef uint8_t Tusage_t;
+  typedef uint16_t Tusage_t;
 
-#  define USE_SYSTEMC               0x01
-#  define USE_VHDL                  0x02
-#  define USE_VHDL_TESTBENCH        0x04
-#  define USE_VHDL_TESTBENCH_ASSERT 0x08
-#  define USE_POSITION              0x10
-#  define USE_STATISTICS            0x20
-#  define USE_INFORMATION           0x40
-#  define USE_HEADER                0x80
-//#define USE_                      0x80
+#  define USE_SYSTEMC               0x003
+#  define USE_SYSTEMC_INTERFACE     0x001
+#  define USE_SYSTEMC_BODY          0x002
+#  define USE_VHDL                  0x004
+#  define USE_VHDL_TESTBENCH        0x008
+#  define USE_VHDL_TESTBENCH_ASSERT 0x010
+#  define USE_POSITION              0x020
+#  define USE_STATISTICS            0x040
+//#define USE_INFORMATION           0x080
+#  define USE_HEADER                0x100
+#  define USE_COSIMULATION          0x200
+//#define USE_                      0x400
 
 #  define USE_NONE                  0x00
-//#define USE_ALL                   0xff
 #  define USE_ALL                   usage_all()
 
-
+#ifdef MODELSIM_COSIMULATION
+  Tusage_t usage_cosimulation(Tusage_t usage);
+#endif
   Tusage_t usage_set         (Tusage_t usage, Tusage_t flag);
   Tusage_t usage_unset       (Tusage_t usage, Tusage_t flag);
   bool     usage_is_set      (Tusage_t usage, Tusage_t flag);
-  void     usage_environment (Tusage_t usage);
+  Tusage_t usage_environment (Tusage_t usage);
   Tusage_t usage_all         (void);
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Version.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Version.h	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Version.h	(revision 113)
@@ -10,9 +10,9 @@
 #define MORPHEO_MAJOR_VERSION "0"
 #define MORPHEO_MINOR_VERSION "2"
-#define MORPHEO_REVISION      "112"
+#define MORPHEO_REVISION      "113"
 #define MORPHEO_CODENAME      "Castor"
 
-#define MORPHEO_DATE_DAY      "18"  
-#define MORPHEO_DATE_MONTH    "03"
+#define MORPHEO_DATE_DAY      "14"  
+#define MORPHEO_DATE_MONTH    "04"
 #define MORPHEO_DATE_YEAR     "2009" 
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Vhdl.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Vhdl.h	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Vhdl.h	(revision 113)
@@ -7,5 +7,5 @@
  * $Id$
  *
- * [ Description ]
+ * [ Description ]
  * 
  */
@@ -14,4 +14,5 @@
 #include <iostream>
 #include <list>
+#include <map>
 #include "Common/include/Environment.h"
 #include "Behavioural/include/Direction.h"
@@ -23,4 +24,14 @@
   namespace behavioural          {
 
+#define VHDL_EXTENSION ".vhdl"
+
+    typedef enum 
+      {
+        VHDL_SEVERITY_NOTE   ,
+        VHDL_SEVERITY_WARNING,
+        VHDL_SEVERITY_ERROR  ,
+        VHDL_SEVERITY_FAILURE
+      } vhdl_severity_t;
+    
     std::string  std_logic        (uint32_t size);
     std::string  std_logic_conv   (uint32_t size, std::string   value);
@@ -37,16 +48,29 @@
     class Vhdl
     {
-      // -----[ fields ]----------------------------------------------------
-    private   : const std::string     _name                         ;
-
-    private   : std::list<std::string>     _list_library_work            ;
-    private   : std::list<std::string>     _list_signal                  ;
-    private   : std::list<std::string>     _list_type                    ;
-    private   : std::list<std::string>     _list_alias                   ;
-    private   : std::list<std::string>     _list_port                    ;
-    private   : std::list<std::string>     _list_body                    ;
-
-      // -----[ methods ]---------------------------------------------------
-    public    :                  Vhdl                        (std::string name);
+      typedef struct
+      {
+        std::list<std::string> _list_signal;
+        std::list<std::string> _list_type  ;
+        std::list<std::string> _list_alias ;
+        std::list<std::string> _list_body  ;
+        std::list<std::string> _list_debug ;
+      } vhdl_architecture_t;
+
+      // -----[ fields ]----------------------------------------------------
+    private   : const std::string                         _name;
+    private   : const std::string                         _id;
+
+    private   : std::list<std::string>                    _list_library;
+      // Entity
+//  private   : std::string                               _port_clock;
+    private   : std::list<std::string>                    _list_port;
+      // Architecture
+    public    : const std::string                         _name_architecture_default;
+    private   :       std::string                         _name_architecture;
+    private   : std::map<std::string,vhdl_architecture_t> _architecture;
+
+      // -----[ methods ]---------------------------------------------------
+    public    :                  Vhdl                        (std::string name,
+                                                              std::string id="");
     public    :                  ~Vhdl                       ();
 
@@ -64,13 +88,17 @@
     private   : std::string      get_model                   (uint32_t    depth                 ,
                                                               std::string filename              ,
-                                                              std::string entity_name           ,
-                                                              std::string architecture_name     );
+                                                              std::string entity_name           );
     private   : std::string      get_header                  (uint32_t    depth                 ,
                                                               std::string filename              );
     private   : std::string      get_entity                  (uint32_t    depth                 ,
                                                               std::string name                  );
+    private   : void             test_architecture           (void);
+    private   : std::string      test_architecture           (std::string name                  );
+    public    : std::string      set_architecture            (std::string name                  );
     private   : std::string      get_architecture            (uint32_t    depth                 , 
-                                                              std::string name                  ,
                                                               std::string entity_name           );
+    private   : std::string      get_configuration           (uint32_t    depth                 ,
+                                                              std::string entity_name           ,
+                                                              std::string configuration_name    );
     private   : std::string      get_component               (uint32_t    depth                 ,
                                                               std::string name                  );
@@ -83,4 +111,5 @@
 							      direction_t direction             ,
 							      uint32_t    size                  );
+//  public    : void             set_port_clock              (std::string name                  );
     private   : std::string      get_signal                  (uint32_t    depth                 );
     public    : void             set_signal                  (std::string name                  ,
@@ -136,4 +165,6 @@
     public    : void             set_body_component          (std::string  name_instance        ,
                                                               std::string  name_component       ,
+                                                              std::string  name_architecture    ,
+                                                              std::string  name_package         ,
                                                               std::list<std::string>   list_port_map);
     public    : void             set_body_component_port_map (std::list<std::string> & list_port_map,
@@ -147,6 +178,15 @@
                                                               std::string  text                 );
 
-    private   : std::string      get_library_ieee            (uint32_t     depth                );
-    private   : std::string      get_library_work            (uint32_t     depth                );
+    public    : void             set_debug                   (std::string  condition            ,
+                                                              std::string  text                 ,
+                                                              vhdl_severity_t severity = VHDL_SEVERITY_NOTE);
+    private   : std::string      get_debug                   (uint32_t     depth                );
+
+    private   : std::string      get_library                 (uint32_t     depth                );
+    private   : std::string      get_library_default         (uint32_t     depth                );
+    private   : void             set_library_default         (void                              );
+    public    : void             set_library                 (std::string  library_name         ,
+                                                              std::string  package_name         ,
+                                                              std::string  declarative_unit="all");
     public    : void             set_library_work            (std::string  package_name         );
 
@@ -154,5 +194,20 @@
     };
 
+    std::string vhdl_get_id (std::string model_name);
+
   }; // end namespace behavioural          
+
+  template<> inline std::string toString<morpheo::behavioural::vhdl_severity_t>(const morpheo::behavioural::vhdl_severity_t& x)
+  {
+    switch (x)
+      {
+      case morpheo::behavioural::VHDL_SEVERITY_NOTE    : return "note"   ; break;
+      case morpheo::behavioural::VHDL_SEVERITY_WARNING : return "warning"; break;
+      case morpheo::behavioural::VHDL_SEVERITY_ERROR   : return "error"  ; break;
+      case morpheo::behavioural::VHDL_SEVERITY_FAILURE : return "failure"; break;
+      default : return ""; break;
+      }
+  };
+
 }; // end namespace morpheo              
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component.cpp	(revision 113)
@@ -15,4 +15,5 @@
   {
     log_printf(FUNC,Behavioural,"Component::Component","Begin");
+    _entity = NULL;
     _list_component = new std::list<Tcomponent_t *>;
     log_printf(FUNC,Behavioural,"Component::Component","End");
@@ -31,5 +32,11 @@
   {
     log_printf(FUNC,Behavioural,"Component::~Component","Begin");
-    delete _entity;
+    if (_entity != NULL)
+      delete _entity;
+    while (not _list_component->empty())
+      {
+        delete _list_component->front();
+        _list_component->pop_front();
+      }
     delete _list_component;
     log_printf(FUNC,Behavioural,"Component::~Component","End");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_get_sc_signal.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_get_sc_signal.cpp	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_get_sc_signal.cpp	(revision 113)
@@ -0,0 +1,40 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Component.h"
+
+namespace morpheo              {
+namespace behavioural          {
+
+#undef  FUNCTION
+#define FUNCTION "Component::get_sc_signal"
+  void * Component::get_sc_signal (std::string component,
+                                   std::string port     )
+  {
+    log_begin(Behavioural,FUNCTION);
+
+    std::string name_entity = _entity->get_name();
+
+    Entity * entity = find_entity(component);
+
+    if (entity == NULL)
+      throw (ERRORMORPHEO (FUNCTION,"In component \""+name_entity+"\", the component \""+component+"\" is unknow.\n"));
+
+    Signal * signal = entity->find_signal (port);
+
+    if (signal == NULL)
+      throw (ERRORMORPHEO (FUNCTION,"In component \""+name_entity+"\", the component \""+component+"\" have not the signal \""+port+"\".\n"));
+
+    void * _return = signal->get_sc_signal();
+
+    log_end(Behavioural,FUNCTION);
+
+    return _return;
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_port_map.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_port_map.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_port_map.cpp	(revision 113)
@@ -80,4 +80,6 @@
 	Signal * signal_productor;
 	Entity * entity_productor;
+	Signal * signal_consumer ;
+	Entity * entity_consumer ;
 
 	bool     src_is_productor = (signal_src->get_direction() == OUT);
@@ -85,6 +87,8 @@
 	if (src_is_productor == true)
 	  {
-	    signal_productor = signal_src;
-	    entity_productor = entity_src;
+	    signal_productor = signal_src ;
+	    entity_productor = entity_src ;
+	    signal_consumer  = signal_dest;
+	    entity_consumer  = entity_dest;
 	  }
 	else
@@ -92,8 +96,13 @@
 	    signal_productor = signal_dest;
 	    entity_productor = entity_dest;
+	    signal_consumer  = signal_src ;
+	    entity_consumer  = entity_src ;
 	  }
 
 	// Create internal signal
-	signal_dest= signal_internal (entity_productor, signal_productor);
+	signal_dest= signal_internal (entity_productor,
+                                      signal_productor,
+                                      entity_consumer ,
+                                      signal_consumer );
 	signal_dest->set_size_max(signal_src->get_size());
       }
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_set_component.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_set_component.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_set_component.cpp	(revision 113)
@@ -2,5 +2,5 @@
  * $Id$
  *
- * [ Description ]
+ * [ Description ]
  * 
  */
@@ -21,4 +21,5 @@
 #endif
 				 ,Tinstance_t instance
+                                 ,std::string architecture
 				 )
   {
@@ -29,7 +30,8 @@
     Tcomponent_t * entry = new Tcomponent_t;
     
-    entry->_component= component;
-    entry->_instance = instance;
-    entry->_entity   = entity;
+    entry->_component    = component;
+    entry->_instance     = instance;
+    entry->_architecture = architecture;
+    entry->_entity       = entity;
 
     _list_component->push_back(entry);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_set_entity.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_set_entity.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_set_entity.cpp	(revision 113)
@@ -13,12 +13,15 @@
 #undef  FUNCTION
 #define FUNCTION "Component::set_entity"
-  Entity * Component::set_entity (std::string        name   
-				  ,std::string        type   
+  Entity * Component::set_entity (std::string  name
+				  ,std::string type
 #ifdef POSITION
-				  ,schema_t      schema
+				  ,schema_t    schema
 #endif
 				  )
   {
     log_printf(FUNC,Behavioural,FUNCTION,"Begin");
+
+    if (_entity != NULL)
+      throw ERRORMORPHEO(FUNCTION,_("Entity is already allocated.\n"));
     
     Entity * entity = new Entity (name   
@@ -29,4 +32,5 @@
 				  ,_usage
 				  );
+
     _entity = entity;
     
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_signal_internal.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_signal_internal.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_signal_internal.cpp	(revision 113)
@@ -2,5 +2,5 @@
  * $Id$
  *
- * [ Description ]
+ * [ Description ]
  * 
  */
@@ -14,16 +14,27 @@
 #define FUNCTION "Component::signal_internal"
   Signal * Component::signal_internal (Entity * entity_productor,
-				       Signal * signal_productor)
+				       Signal * signal_productor,
+                                       Entity * entity_consumer,
+				       Signal * signal_consumer)
   {
     log_printf(FUNC,Behavioural,FUNCTION,"Begin");
 
+    bool productor_is_cosimulation = usage_is_set(entity_productor->get_usage(),USE_COSIMULATION);
+    bool consumer_is_cosimulation  = usage_is_set(entity_consumer ->get_usage(),USE_COSIMULATION);
+    bool is_cosimulation           = consumer_is_cosimulation or productor_is_cosimulation;
+    if (productor_is_cosimulation and consumer_is_cosimulation)
+      throw ERRORMORPHEO (FUNCTION,toString(_("Entity \"%s\" and Entity \"%s\" use both cosimulation. It's not supported.\n"),entity_productor->get_name().c_str(),entity_consumer->get_name().c_str()));
+    
     // create name of internal's signal
-    std::string str_entity = entity_productor->get_name();
-    std::string str_signal = signal_productor->get_name();
+    Entity * entity = (consumer_is_cosimulation)?entity_consumer:entity_productor;
+    Signal * signal = (consumer_is_cosimulation)?signal_consumer:signal_productor;
+
+    std::string str_entity = entity->get_name();
+    std::string str_signal = signal->get_name();
     
-    UpperCase (str_entity);
-    UpperCase (str_signal);
+//     UpperCase (str_entity);
+//     UpperCase (str_signal);
     
-    std::string name_internal = "internal_"+str_entity+"_"+str_signal;
+    std::string name_internal = (is_cosimulation)?str_signal:("internal_"+str_entity+"_"+str_signal);
     
     // test if internal's signal exist ... else, create
@@ -38,38 +49,19 @@
 	
 	if (interface == NULL)
-	  throw (ErrorMorpheo ("<Component::port_map> Component \""+_entity->get_name()+"\", doesn't have an interface \"\"."));
-	
-	std::string signame = entity_productor->get_name()+"_"+signal_productor->get_name();
-	
+	  throw ERRORMORPHEO (FUNCTION,toString(_("Component \"%s\", doesn't have an interface \"\".\n"),_entity->get_name().c_str()));
+
+// 	std::string signame   = entity->get_name()+"_"+signal->get_name();
+        std::string signame   = name_internal;
+        type_info_t type_info = signal->get_type_info();
+
 	// Signal's creation
-	switch (signal_productor->get_type_info())
+	switch (type_info)
 	  {
-	  case BOOL     : 
-	    {
-	      interface->set_signal_internal<bool    >(signame, signal_productor->get_size());
-	      break;
-	    }
-	  case UINT8_T  :
-	    {
-	      interface->set_signal_internal<uint8_t >(signame, signal_productor->get_size());
-	      break;
-	    }
-	  case UINT16_T :
-	    {
-	      interface->set_signal_internal<uint16_t>(signame, signal_productor->get_size());
-	      break;
-	    }
-	  case UINT32_T :
-	    {
-	      interface->set_signal_internal<uint32_t>(signame, signal_productor->get_size());
-	      break;
-	    }
-	  case UINT64_T :
-	    {
-	      interface->set_signal_internal<uint64_t>(signame, signal_productor->get_size());
-	      break;
-	    }
-	  default       :
-	    throw (ErrorMorpheo ("Signal \""+name_internal+"\" : type unknow."));
+	  case BOOL     : interface->set_signal_internal<bool    >(signame, signal->get_size()); break;
+	  case UINT8_T  : interface->set_signal_internal<uint8_t >(signame, signal->get_size()); break;
+	  case UINT16_T : interface->set_signal_internal<uint16_t>(signame, signal->get_size()); break;
+	  case UINT32_T : interface->set_signal_internal<uint32_t>(signame, signal->get_size()); break;
+	  case UINT64_T : interface->set_signal_internal<uint64_t>(signame, signal->get_size()); break;
+	  default       :throw (ErrorMorpheo ("Signal \""+name_internal+"\" : type unknow."));
 	  }
 	
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_vhdl_instance.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_vhdl_instance.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_vhdl_instance.cpp	(revision 113)
@@ -92,6 +92,8 @@
 	while (i != list_component->end())
 	  {
-	    Entity *    entity   = (*i)->_entity;
-	    Tinstance_t instance = (*i)->_instance;
+	    Entity *    entity       = (*i)->_entity;
+	    Tinstance_t instance     = (*i)->_instance;
+            std::string architecture = (*i)->_architecture;
+            std::string package      = "work";
 	    
 	    if (instance & INSTANCE_LIBRARY)
@@ -176,5 +178,9 @@
 		    }
 		}
-	      vhdl->set_body_component ("instance_"+entity->get_name(),entity->get_name(),list_port_map);
+	      vhdl->set_body_component ("instance_"+entity->get_name(),
+                                        entity->get_name(),
+                                        architecture,
+                                        package,
+                                        list_port_map);
 	      
 	    }
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_usage.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_usage.cpp	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_usage.cpp	(revision 113)
@@ -0,0 +1,26 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Entity.h"
+
+
+namespace morpheo              {
+namespace behavioural          {
+
+#undef  FUNCTION
+#define FUNCTION "Entity::get_usage"
+  Tusage_t Entity::get_usage (void)
+  {
+    log_begin(Behavioural,FUNCTION);
+    Tusage_t _return = _usage;
+    log_end(Behavioural,FUNCTION);
+
+    return _return;
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface.cpp	(revision 113)
@@ -73,5 +73,10 @@
          it != _list_signal->end();
          ++it)
-      delete (*it);
+      {
+        if ((_usage & USE_SYSTEMC) and 
+            ((*it)->get_direction() == INTERNAL))
+          delete (*it)->get_sc_signal();
+        delete (*it);
+      }
     
     delete _list_signal;
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_fifo_testbench_assert.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_fifo_testbench_assert.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_fifo_testbench_assert.cpp	(revision 113)
@@ -34,6 +34,6 @@
           while (i != _list_cycle->end())
             {
-              vhdl->set_body("assert not (("+counter_name+" = "+toString(*i)+" and "+test_name+" = '1')) report \"***** <"+_name+"> Test number "+toString(j)+" is OK     *****\" severity NOTE;");
-              vhdl->set_body("assert not (("+counter_name+" = "+toString(*i)+" and "+test_name+" = '0')) report \"@@@@@ <"+_name+"> Test number "+toString(j)+" is KO !!! @@@@@\" severity NOTE;");
+              vhdl->set_body("assert not (("+counter_name+" = "+toString(*i)+" and "+test_name+" = '1')) report \"***** <"+_name+"> Test number "+toString(j)+" is OK     *****\" severity "+toString(VHDL_SEVERITY_NOTE)+";");
+              vhdl->set_body("assert not (("+counter_name+" = "+toString(*i)+" and "+test_name+" = '0')) report \"@@@@@ <"+_name+"> Test number "+toString(j)+" is KO !!! @@@@@\" severity "+toString(VHDL_SEVERITY_NOTE)+";");
               j++;
               ++i;
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_fifo_testbench_cycle.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_fifo_testbench_cycle.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_fifo_testbench_cycle.cpp	(revision 113)
@@ -9,4 +9,5 @@
 #include "Behavioural/include/Interface_fifo.h"
 #include "Behavioural/include/Entity.h"
+#include "Common/include/Systemc.h"
 
 namespace morpheo              {
@@ -18,5 +19,5 @@
 
     // note : if defined(VHDL_TESTBENCH) then defined(SYSTEMC)
-    _list_cycle->push_back(static_cast<uint32_t>(sc_simulation_time()));
+    _list_cycle->push_back(static_cast<uint32_t>(simulation_cycle()));
 
     log_printf(FUNC,Behavioural,"testbench_cycle","End");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_find_signal.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_find_signal.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_find_signal.cpp	(revision 113)
@@ -15,4 +15,6 @@
   {
     log_printf(FUNC,Behavioural,"find_signal","Begin");
+
+    LowerCase(name);
 
     std::list<Signal*>::iterator i   = _list_signal->begin();
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_set_port.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_set_port.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_set_port.cpp	(revision 113)
@@ -26,4 +26,5 @@
 	  }
       }
+
     log_printf(FUNC,Behavioural,"set_port (Vhdl)","End");
   };
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_set_signal.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_set_signal.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_set_signal.cpp	(revision 113)
@@ -11,4 +11,6 @@
 namespace behavioural          {
 
+#undef  FUNCTION
+#define FUNCTION "Interface::set_signal"
   Signal * Interface::set_signal (std::string     name     ,
 				  direction_t     direction,
@@ -16,5 +18,5 @@
 				  presence_port_t presence_port)
   {
-    log_printf(FUNC,Behavioural,"set_signal","Begin");
+    log_begin(Behavioural,FUNCTION);
 
     std::string signame = signal_name(_name, name, direction);
@@ -24,5 +26,5 @@
     _list_signal->push_back (sig);
 
-    log_printf(FUNC,Behavioural,"set_signal","End");
+    log_end(Behavioural,FUNCTION);
 
     return sig;
@@ -36,5 +38,5 @@
   void Interface::set_signal (Vhdl * & vhdl)
   {
-    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
+    log_begin(Behavioural,FUNCTION);
     if (not _list_signal->empty())
       {
@@ -47,5 +49,5 @@
 	  }
       }
-    log_printf(FUNC,Behavioural,FUNCTION,"End");
+    log_end(Behavioural,FUNCTION);
   };
 #  endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_signal_name.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_signal_name.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_signal_name.cpp	(revision 113)
@@ -17,17 +17,30 @@
     log_printf(FUNC,Behavioural,"signal_name","Begin");
 
-    std::string str_direction = toString(direction);
+    std::string str_direction = (direction==INTERNAL)?"":toString(direction);
     std::string str_interface = name_interface;
     std::string str_signal    = name_signal;
 
-    LowerCase(str_direction);    
-    UpperCase(str_interface);
-    UpperCase(str_signal   );
+//     LowerCase(str_direction);    
+//     LowerCase(str_interface);
+//     LowerCase(str_signal   );
     
-    std::string signame = str_direction;
+    std::string signame = "";
+    bool need_underscore = false;
+
+    if (str_direction != "")
+      {
+        signame +=                            str_direction;
+        need_underscore = true;
+      }
     if (str_interface != "")
-      signame += "_"+str_interface;
-    if (str_signal    != "")
-      signame += "_"+str_signal;
+      {
+        signame += ((need_underscore)?"_":"")+str_interface;
+        need_underscore = true;
+      }
+    if (str_signal != "")
+      {
+        signame += ((need_underscore)?"_":"")+str_signal;
+//      need_underscore = true;
+      }
 
     log_printf(FUNC,Behavioural,"signal_name","End");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces.cpp	(revision 113)
@@ -11,5 +11,5 @@
 namespace behavioural          {
 
-  Interfaces::Interfaces  (std::string   name,
+  Interfaces::Interfaces  (std::string name,
 			   Tusage_t usage):
     _name  (name),
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_set_port.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_set_port.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_set_port.cpp	(revision 113)
@@ -27,5 +27,10 @@
 	    ++i;
 	  }
+
+//         Signal * clock = get_clock();
+//         if (clock != NULL)
+//           vhdl->set_port_clock (clock->get_name());
       }
+
     log_printf(FUNC,Behavioural,FUNCTION,"End");
   };
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_testbench_generate_file.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_testbench_generate_file.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_testbench_generate_file.cpp	(revision 113)
@@ -66,5 +66,5 @@
     vhdl->set_body("");
     vhdl->set_body("-- if the systemC simulate have multiple reset, we make the last");
-    vhdl->set_body(reset_name+" <= '1' after 150 ns;");    
+    vhdl->set_body(reset_name+" <= '1' after "+toString(2.*VHDL_TIME_PERIOD)+" "+toString(VHDL_TIME_UNIT)+";");    
 
     vhdl->set_body("");
@@ -73,5 +73,5 @@
     vhdl->set_body("------------------------------------------------------");
     vhdl->set_body("");
-    vhdl->set_body(clock_name+" <= not "+clock_name+" after 50 ns;");
+    vhdl->set_body(clock_name+" <= not "+clock_name+" after "+toString(VHDL_TIME_PERIOD/2.)+" "+toString(VHDL_TIME_UNIT)+";");
     vhdl->set_body("");
     vhdl->set_body("process ("+clock_name+")");
@@ -89,5 +89,5 @@
 #ifdef VHDL_TESTBENCH_ASSERT
     for (uint32_t cpt=0; cpt<=cycle; cpt++)
-      vhdl->set_body("\t\t\tassert not ("+counter+" = "+toString(cpt)+") report \"===== Test number "+toString(cpt)+" =====\" severity NOTE;");
+      vhdl->set_body("\t\t\tassert not ("+counter+" = "+toString(cpt)+") report \"===== Test number "+toString(cpt)+" =====\" severity "+toString(VHDL_SEVERITY_NOTE)+";");
 
     for (std::list<Interface_fifo*>::iterator it=_list_interface->begin();
@@ -106,6 +106,6 @@
 
     vhdl->set_body("");
-    vhdl->set_body("\t\t\tassert not ("+counter+" >= "+toString(cycle)+") report \"Test OK\" severity FAILURE;");
-    vhdl->set_body("\t\t\tassert not ("+test_name+" = '0') report \"Test KO\" severity FAILURE;");
+    vhdl->set_body("\t\t\tassert not ("+counter+" >= "+toString(cycle)+") report \"Test OK\" severity "+toString(VHDL_SEVERITY_FAILURE)+";");
+    vhdl->set_body("\t\t\tassert not ("+test_name+" = '0') report \"Test KO\" severity "+toString(VHDL_SEVERITY_FAILURE)+";");
     vhdl->set_body("\t\tend if;");
     vhdl->set_body("\tend if;");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Model_print.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Model_print.cpp	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Model_print.cpp	(revision 113)
@@ -0,0 +1,29 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Model.h"
+
+namespace morpheo              {
+namespace behavioural          {
+
+#undef  FUNCTION
+#define FUNCTION "Model::print"
+  void Model::print (void)
+  {
+    log_begin(Behavioural,FUNCTION);
+
+    msgInformation("Model Information [type, model simulation, debug verbosity]\n");
+    for (std::map<std::string,model_t>::iterator it=models.begin();
+         it!=models.end();
+         ++it)
+      msgInformation("  * %s\t%s\t%s\n",(it->first).c_str(), toString(it->second.type).c_str(), toString(it->second.debug).c_str());
+
+    log_end(Behavioural,FUNCTION);
+  }
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Model_set_model.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Model_set_model.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Model_set_model.cpp	(revision 113)
@@ -12,5 +12,5 @@
 
 #undef  FUNCTION
-#define FUNCTION "Model::get_type"
+#define FUNCTION "Model::set_model"
   void Model::set_model (std::string component, model_type_t type, debug_verbosity_t debug)
   {
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Parameters.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Parameters.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Parameters.cpp	(revision 113)
@@ -13,5 +13,15 @@
 #undef  FUNCTION
 #define FUNCTION "Parameters::Parameters"
-  Parameters::Parameters  (void)
+  Parameters::Parameters  (void) :
+    _type ("")
+  {
+    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
+    log_printf(FUNC,Behavioural,FUNCTION,"End");
+  };
+
+#undef  FUNCTION
+#define FUNCTION "Parameters::Parameters"
+  Parameters::Parameters  (std::string type) :
+    _type (type)
   {
     log_printf(FUNC,Behavioural,FUNCTION,"Begin");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Parameters_test.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Parameters_test.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Parameters_test.cpp	(revision 113)
@@ -20,5 +20,5 @@
     Parameters_test x = msg_error();
     
-    std::cerr << x.print();
+    msg("%s",x.print().c_str());
 
     if (x.have_error())
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal.cpp	(revision 113)
@@ -11,5 +11,5 @@
 namespace behavioural          {
 
-  Signal::Signal  (std::string          name         ,
+  Signal::Signal  (std::string     name         ,
 		   direction_t     direction    ,
 		   uint32_t        size         ,
@@ -20,5 +20,5 @@
   {
     log_printf(FUNC,Behavioural,"Signal","Begin");
-    _size                     = size;
+
     _is_allocate              = false;
     _is_map_as_component_src  = false;
@@ -33,8 +33,8 @@
     _list_value          = new std::list<std::string>;
 #endif
+    set_size(size);
     
     if (_size == 0)
       throw ERRORMORPHEO(FUNCTION,"Size of signal '"+_name+"' is nul");
-
 
     log_printf(FUNC,Behavioural,"Signal","End");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_get_sc_signal.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_get_sc_signal.cpp	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_get_sc_signal.cpp	(revision 113)
@@ -0,0 +1,26 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Signal.h"
+
+
+namespace morpheo              {
+namespace behavioural          {
+
+#undef  FUNCTION
+#define FUNCTION "Signal::get_sc_signal"
+  void * Signal::get_sc_signal (void)
+  {
+    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
+    void * _return = _sc_signal;
+    log_printf(FUNC,Behavioural,FUNCTION,"End");
+
+    return _return;
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_get_size.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_get_size.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_get_size.cpp	(revision 113)
@@ -7,5 +7,5 @@
 
 #include "Behavioural/include/Signal.h"
-
+#include "Common/include/Environment.h"
 
 namespace morpheo              {
@@ -18,4 +18,17 @@
     log_printf(FUNC,Behavioural,FUNCTION,"Begin");
     uint32_t _return = _size;
+
+#ifdef MODELSIM_COSIMULATION
+    switch (_type_info)
+      {
+      case BOOL     : _return =  1; break;
+      case UINT8_T  : _return =  8; break;
+      case UINT16_T : _return = 16; break;
+      case UINT32_T : _return = 32; break;
+      case UINT64_T : _return = 64; break;
+      default       : break;
+      }
+#endif
+
     log_printf(FUNC,Behavioural,FUNCTION,"End");
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_link.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_link.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_link.cpp	(revision 113)
@@ -2,5 +2,5 @@
  * $Id$
  *
- * [ Description ]
+ * [ Description ]
  * 
  */
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_presence_testbench.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_presence_testbench.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_presence_testbench.cpp	(revision 113)
@@ -13,6 +13,6 @@
 
 #undef  FUNCTION
-#define FUNCTION "Signal::presence_vhdl"
-  bool Signal::presence_vhdl (void)
+#define FUNCTION "Signal::presence_testbench"
+  bool Signal::presence_testbench (void)
   {
     log_printf(FUNC,Behavioural,FUNCTION,"Begin");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_set_port.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_set_port.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_set_port.cpp	(revision 113)
@@ -21,5 +21,5 @@
 	(_presence_port == CLOCK_VHDL_YES)              or
 	(_presence_port == RESET_VHDL_YES))
-      vhdl->set_port (_name,_direction,_size);
+      vhdl->set_port (_name,_direction,get_size());
 
     log_printf(FUNC,Behavioural,"set_port (Vhdl)","End");
@@ -38,8 +38,8 @@
 // 	or (_presence_port == RESET_VHDL_NO ) 
 	)
-      vhdl->set_signal (_name        ,_size);
+      vhdl->set_signal (_name        ,get_size());
 
     if (_direction == OUT)
-      vhdl->set_signal (_name+"_test",_size);
+      vhdl->set_signal (_name+"_test",get_size());
 
     log_printf(FUNC,Behavioural,"set_signal (Vhdl)","End");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_set_size.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_set_size.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_set_size.cpp	(revision 113)
@@ -18,4 +18,5 @@
     log_printf(FUNC,Behavioural,FUNCTION,"Begin");
     _size = size;
+
     log_printf(FUNC,Behavioural,FUNCTION,"End");
   };
@@ -27,5 +28,5 @@
     log_printf(FUNC,Behavioural,FUNCTION,"Begin");
     if (size > _size)
-      _size = size;
+      set_size(size);
     log_printf(FUNC,Behavioural,FUNCTION,"End");
   };
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_testbench.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_testbench.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_testbench.cpp	(revision 113)
@@ -44,6 +44,6 @@
 	      switch (_direction)
 		{
-		case IN    : {str =             toBase2 (value,_size); break;}
-		case OUT   : {str =             toBase2 (value,_size); break;}
+		case IN    : {str =             toBase2 (value,get_size()); break;}
+		case OUT   : {str =             toBase2 (value,get_size()); break;}
    		default    : {break;}
 		}
@@ -56,6 +56,6 @@
 	      switch (_direction)
 		{
-		case IN    : {str =             toBase2 (value,_size); break;}
-		case OUT   : {str =             toBase2 (value,_size); break;}
+		case IN    : {str =             toBase2 (value,get_size()); break;}
+		case OUT   : {str =             toBase2 (value,get_size()); break;}
    		default    : {break;}		
 		}
@@ -68,6 +68,6 @@
 	      switch (_direction)
 		{
-		case IN    : {str =             toBase2 (value,_size); break;}
-		case OUT   : {str =             toBase2 (value,_size); break;}
+		case IN    : {str =             toBase2 (value,get_size()); break;}
+		case OUT   : {str =             toBase2 (value,get_size()); break;}
    		default    : {break;}
 		}
@@ -80,6 +80,6 @@
 	      switch (_direction)
 		{
-		case IN    : {str =             toBase2 (value,_size); break;}
-		case OUT   : {str =             toBase2 (value,_size); break;}
+		case IN    : {str =             toBase2 (value,get_size()); break;}
+		case OUT   : {str =             toBase2 (value,get_size()); break;}
    		default    : {break;}
 		}
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_testbench_body.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_testbench_body.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_testbench_body.cpp	(revision 113)
@@ -25,5 +25,5 @@
 	{
 	  std::string separator;
-	  if (_size == 1)
+	  if (get_size() == 1)
 	    separator = "\'";
 	  else
@@ -48,5 +48,5 @@
 	    }
 	  
-	  if (_size == 1)
+	  if (get_size() == 1)
 	    vhdl->set_body ("\t'0' when others;");
 	  else
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Simulation_test_end.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Simulation_test_end.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Simulation_test_end.cpp	(revision 113)
@@ -8,4 +8,5 @@
 
 #include "Behavioural/include/Simulation.h"
+#include "Common/include/Systemc.h"
 
 namespace morpheo              {
@@ -14,5 +15,5 @@
   bool simulation_test_end (void)
   {
-    msg("##########[ cycle %d ]\n",static_cast<uint32_t>(sc_simulation_time()));
+    msg("##########[ cycle %d ]\n",static_cast<uint32_t>(simulation_cycle()));
 
     // Test if a stop condition is activate
@@ -26,5 +27,5 @@
 
     if (_simulation_nb_cycle != 0)
-      end_cycle = (_simulation_nb_cycle <= sc_simulation_time());
+      end_cycle = (_simulation_nb_cycle <= simulation_cycle());
     else
       end_cycle = true;
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Stat_end_cycle.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Stat_end_cycle.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Stat_end_cycle.cpp	(revision 113)
@@ -1,4 +1,5 @@
 #ifdef STATISTICS
 #include "Behavioural/include/Stat.h"
+#include "Common/include/Systemc.h"
 
 namespace morpheo {
@@ -6,5 +7,5 @@
   void Stat::end_cycle (void)
   {
-    cycle_t _cycle_sum = sc_simulation_time();
+    cycle_t _cycle_sum = simulation_cycle();
 
     if (_cycle_sum >= _nb_cycle_before_begin)
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Stat_generate_file.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Stat_generate_file.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Stat_generate_file.cpp	(revision 113)
@@ -3,4 +3,5 @@
 #include "Behavioural/include/Version.h"
 #include "Common/include/Environment.h"
+#include "Common/include/Systemc.h"
 
 namespace morpheo {
@@ -13,5 +14,5 @@
     std::string body = print(1);
 
-    cycle_t _cycle_sum = sc_simulation_time();
+    cycle_t _cycle_sum = simulation_cycle();
 
     morpheo::behavioural::XML * xml = new morpheo::behavioural::XML (_name_instance);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Stat_print.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Stat_print.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Stat_print.cpp	(revision 113)
@@ -1,4 +1,5 @@
 #ifdef STATISTICS
 #include "Behavioural/include/Stat.h"
+#include "Common/include/Systemc.h"
 
 namespace morpheo {
@@ -12,5 +13,5 @@
     end_simulation(); 
 
-    cycle_t _cycle_sum = sc_simulation_time();
+    cycle_t _cycle_sum = simulation_cycle();
 
     morpheo::behavioural::XML xml (_name_instance);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Usage.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Usage.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Usage.cpp	(revision 113)
@@ -5,4 +5,24 @@
 namespace morpheo {
 namespace behavioural {
+
+#ifdef MODELSIM_COSIMULATION
+  Tusage_t usage_cosimulation(Tusage_t usage)
+  {
+    Tusage_t _return = usage;
+//  _return = usage_unset(_return,USE_SYSTEMC              );
+    _return = usage_unset(_return,USE_SYSTEMC_INTERFACE    );
+    _return = usage_unset(_return,USE_SYSTEMC_BODY         );
+    _return = usage_unset(_return,USE_VHDL                 );
+    _return = usage_unset(_return,USE_VHDL_TESTBENCH       );
+    _return = usage_unset(_return,USE_VHDL_TESTBENCH_ASSERT);
+//  _return = usage_unset(_return,USE_POSITION             );
+    _return = usage_unset(_return,USE_STATISTICS           );
+//  _return = usage_unset(_return,USE_INFORMATION          );
+//  _return = usage_unset(_return,USE_HEADER               );
+    _return = usage_set  (_return,USE_COSIMULATION         );
+    
+    return _return;
+  }
+#endif
 
   Tusage_t usage_set         (Tusage_t usage, Tusage_t flag)
@@ -22,9 +42,11 @@
 #undef  FUNCTION
 #define FUNCTION "usage_environment"
-  void     usage_environment (Tusage_t usage)
+  Tusage_t usage_environment (Tusage_t usage)
   {
 #ifndef SYSTEMC
-    if (usage_is_set(usage,USE_SYSTEMC))
-      throw ERRORMORPHEO(FUNCTION,_("Component use the flag \"USE_SYSTEMC\", but the macro's compiler \"SYSTEMC\" is unset.\n"));
+    if (usage_is_set(usage,USE_SYSTEMC_INTERFACE))
+      throw ERRORMORPHEO(FUNCTION,_("Component use the flag \"USE_SYSTEMC_INTERFACE\", but the macro's compiler \"SYSTEMC\" is unset.\n"));
+    if (usage_is_set(usage,USE_SYSTEMC_BODY))
+      throw ERRORMORPHEO(FUNCTION,_("Component use the flag \"USE_SYSTEMC_BODY\", but the macro's compiler \"SYSTEMC\" is unset.\n"));
 #endif
 #ifndef VHDL
@@ -48,20 +70,20 @@
       throw ERRORMORPHEO(FUNCTION,_("Component use the flag \"USE_STATISTICS\", but the macro's compiler \"STATISTICS\" is unset.\n"));
 #endif
-#ifndef INFORMATION
-    if (usage_is_set(usage,USE_INFORMATION))
-      throw ERRORMORPHEO(FUNCTION,_("Component use the flag \"USE_INFORMATION\", but the macro's compiler \"INFORMATION\" is unset.\n"));
-#endif
+// #ifndef INFORMATION
+//     if (usage_is_set(usage,USE_INFORMATION))
+//       throw ERRORMORPHEO(FUNCTION,_("Component use the flag \"USE_INFORMATION\", but the macro's compiler \"INFORMATION\" is unset.\n"));
+// #endif
 
 #ifndef DEBUG
 #endif
 
-    if (usage_is_set(usage,USE_STATISTICS) and not usage_is_set(usage,USE_SYSTEMC))
-      throw ERRORMORPHEO(FUNCTION,_("Usage flags conflit : to use the statistics, you must set flag USE_SYSTEMC\n"));
+    if (usage_is_set(usage,USE_STATISTICS) and not usage_is_set(usage,USE_SYSTEMC_BODY))
+      throw ERRORMORPHEO(FUNCTION,_("Usage flags conflit : to use the statistics, you must set flag USE_SYSTEMC_BODY\n"));
     
-    if (usage_is_set(usage,USE_INFORMATION) and not usage_is_set(usage,USE_STATISTICS))
-      throw ERRORMORPHEO(FUNCTION,_("Usage flags conflit : to use the information, you must set flag USE_STATISTICS\n"));
+//     if (usage_is_set(usage,USE_INFORMATION) and not usage_is_set(usage,USE_STATISTICS))
+//       throw ERRORMORPHEO(FUNCTION,_("Usage flags conflit : to use the information, you must set flag USE_STATISTICS\n"));
     
-    if (usage_is_set(usage,USE_VHDL_TESTBENCH) and not usage_is_set(usage,USE_SYSTEMC))
-      throw ERRORMORPHEO(FUNCTION,_("Usage flags conflit : to use the vhdl's test bench, you must set flag USE_SYSTEMC\n"));
+    if (usage_is_set(usage,USE_VHDL_TESTBENCH) and not usage_is_set(usage,USE_SYSTEMC_BODY))
+      throw ERRORMORPHEO(FUNCTION,_("Usage flags conflit : to use the vhdl's test bench, you must set flag USE_SYSTEMC_BODY\n"));
     
     if (usage_is_set(usage,USE_VHDL_TESTBENCH) and not usage_is_set(usage,USE_VHDL))
@@ -70,4 +92,6 @@
     if (usage_is_set(usage,USE_VHDL_TESTBENCH_ASSERT) and not usage_is_set(usage,USE_VHDL_TESTBENCH))
       throw ERRORMORPHEO(FUNCTION,_("Usage flags conflit : to use an assert in vhdl's test bench, you must set flag USE_VHDL_TESTBENCH\n"));
+
+    return usage;
   }
 
@@ -77,5 +101,6 @@
 
 #ifdef SYSTEMC
-    usage = usage_set(usage,USE_SYSTEMC);
+    usage = usage_set(usage,USE_SYSTEMC_INTERFACE);
+    usage = usage_set(usage,USE_SYSTEMC_BODY);
 #endif
 #ifdef VHDL
@@ -94,7 +119,7 @@
     usage = usage_set(usage,USE_STATISTICS);
 #endif
-#ifdef INFORMATION
-    usage = usage_set(usage,USE_INFORMATION);
-#endif
+// #ifdef INFORMATION
+//     usage = usage_set(usage,USE_INFORMATION);
+// #endif
     usage = usage_set(usage,USE_HEADER);
 #ifdef DEBUG
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl.cpp	(revision 113)
@@ -15,8 +15,17 @@
 #undef  FUNCTION
 #define FUNCTION "Vhdl::Vhdl"
-  Vhdl::Vhdl  (std::string name):
-    _name   (name)
+  Vhdl::Vhdl  (std::string name,
+               std::string id):
+    _name                      (name),
+    _id                        (id),
+    _name_architecture_default ("morpheo_behavioural")
   {
     log_printf(FUNC,Behavioural,FUNCTION,"Begin");
+
+    _name_architecture = _name_architecture_default;
+//  _port_clock        = "";
+
+    set_library_default();
+
     log_printf(FUNC,Behavioural,FUNCTION,"End");
   };
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_generate_file_model.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_generate_file_model.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_generate_file_model.cpp	(revision 113)
@@ -22,5 +22,5 @@
     directory();
 
-    std::string filename = MORPHEO_VHDL + "/" + _name + ".vhdl";
+    std::string filename = MORPHEO_VHDL + "/" + _name + VHDL_EXTENSION;
     
     msg_printf(INFORMATION,_("Generate file \"%s\"."),filename.c_str());
@@ -30,5 +30,5 @@
     file.open(filename.c_str(),std::ios::out | std::ios::trunc);
 
-    file << get_model (0,filename,_name,"behavioural");
+    file << get_model (0,filename,_name);
     file.close();
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_generate_file_package.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_generate_file_package.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_generate_file_package.cpp	(revision 113)
@@ -4,5 +4,5 @@
  * $Id$
  *
- * [ Description ]
+ * [ Description ]
  * 
  */
@@ -23,5 +23,5 @@
 
     std::string name     = _name + "_Pack";
-    std::string filename = MORPHEO_VHDL + "/" + name + ".vhdl";
+    std::string filename = MORPHEO_VHDL + "/" + name + VHDL_EXTENSION;
 
     msg_printf(INFORMATION,_("Generate file \"%s\"."),filename.c_str());
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_alias.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_alias.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_alias.cpp	(revision 113)
@@ -20,5 +20,8 @@
   {
     log_printf(FUNC,Behavioural,FUNCTION,"Begin");
-    std::string _return = get_list(_list_alias, depth, ";", true);
+
+    test_architecture();
+    
+    std::string _return = get_list(_architecture[_name_architecture]._list_alias, depth, ";", true);
     log_printf(FUNC,Behavioural,FUNCTION,"End");
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_architecture.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_architecture.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_architecture.cpp	(revision 113)
@@ -11,6 +11,4 @@
 #include "Common/include/Tabulation.h"
 
-#include <sstream>
-
 namespace morpheo              {
 namespace behavioural          {
@@ -18,20 +16,30 @@
 #undef  FUNCTION
 #define FUNCTION "Vhdl::get_architecture"
-  std::string Vhdl::get_architecture (uint32_t depth      ,
-				 std::string   name       ,
-				 std::string   entity_name)
+  std::string Vhdl::get_architecture (uint32_t    depth      ,
+                                      std::string entity_name)
   {
     log_printf(FUNC,Behavioural,FUNCTION,"Begin");
 
-    std::string        tab = morpheo::tab(depth);
     std::ostringstream text;
+    std::string name_architecture_old = _name_architecture;
+    std::string tab=morpheo::tab(depth);
 
-    text << tab << "architecture " << name << " of " << entity_name << " is" << std::endl
-	 << tab << get_type     (depth+1)                                    << std::endl
-	 << tab << get_signal   (depth+1)                                    << std::endl
-	 << tab << get_alias    (depth+1)                                    << std::endl
-	 << tab << "begin"                                                   << std::endl
-	 << tab << get_body     (depth+1)                                    << std::endl
-	 << tab << "end " << name << ";"                                     << std::endl;
+    for (std::map<std::string,vhdl_architecture_t>::iterator it = _architecture.begin();
+         it!=_architecture.end();
+         ++it)
+      {
+        std::string name = it->first;
+        set_architecture(name);
+
+        text << tab << "architecture " << name << " of " << entity_name << " is" << std::endl
+             << tab << get_type     (depth+1)                                    << std::endl
+             << tab << get_signal   (depth+1)                                    << std::endl
+             << tab << get_alias    (depth+1)                                    << std::endl
+             << tab << "begin"                                                   << std::endl
+             << tab << get_body     (depth+1)                                    << std::endl
+             << tab << "end " << name << ";"                                     << std::endl;
+      }
+
+    set_architecture (name_architecture_old);
 
     log_printf(FUNC,Behavioural,FUNCTION,"End");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_body.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_body.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_body.cpp	(revision 113)
@@ -20,5 +20,10 @@
   {
     log_printf(FUNC,Behavioural,FUNCTION,"Begin");
-    std::string _return = get_list(_list_body,depth,"",true);
+
+    test_architecture();
+    std::string _return = get_list(_architecture[_name_architecture]._list_body,depth,"",true);
+
+    _return = _return + get_debug(depth);
+    
     log_printf(FUNC,Behavioural,FUNCTION,"End");
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_configuration.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_configuration.cpp	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_configuration.cpp	(revision 113)
@@ -0,0 +1,57 @@
+#ifdef VHDL
+
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Vhdl.h"
+#include "Common/include/Tabulation.h"
+
+namespace morpheo              {
+namespace behavioural          {
+  
+#undef  FUNCTION
+#define FUNCTION "Vhdl::get_configuration"
+  std::string Vhdl::get_configuration (uint32_t    depth             ,
+                                       std::string entity_name       ,
+                                       std::string configuration_name)
+  {
+    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
+
+    std::ostringstream text;
+
+    text << "";
+
+//     std::string tab0=morpheo::tab(depth);
+//     std::string tab1=morpheo::tab(depth+1);
+//     std::string tab2=morpheo::tab(depth+2);
+//     std::string name_architecture_old = _name_architecture;
+
+//     text << tab0 << "configuration " << configuration_name << " of " << entity_name << " is" << std::endl;
+//     for (std::map<std::string,vhdl_architecture_t>::iterator it = _architecture.begin();
+//          it!=_architecture.end();
+//          ++it)
+//       {
+//         std::string name = it->first;
+//         set_architecture(name);
+        
+//         text << tab1 << "for " << name << std::endl;
+        
+//         text << tab1 << "end for;" << std::endl;
+//       }
+//     text << tab0 << "end configuration " << configuration_name << ";" << std::endl;
+
+//     set_architecture (name_architecture_old);
+
+    log_printf(FUNC,Behavioural,FUNCTION,"End");
+
+    return text.str();
+  };
+  
+}; // end namespace behavioural          
+}; // end namespace morpheo              
+
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_debug.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_debug.cpp	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_debug.cpp	(revision 113)
@@ -0,0 +1,54 @@
+#ifdef VHDL
+
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Vhdl.h"
+#include "Common/include/Tabulation.h"
+#include <sstream>
+
+namespace morpheo              {
+namespace behavioural          {
+  
+#undef  FUNCTION
+#define FUNCTION "Vhdl::get_debug"
+  std::string Vhdl::get_debug (uint32_t depth)
+  {
+    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
+
+    test_architecture();
+
+    std::string _return = "";
+
+    if (_architecture[_name_architecture]._list_debug.size()>0)
+      {
+//         if (_port_clock == "")
+//           throw ERRORMORPHEO(FUNCTION,_("Clock port is not define.\n"));
+        
+        std::string tab0=morpheo::tab(depth);
+        std::string tab1=morpheo::tab(depth+1);
+        
+        _return += "\n";
+        _return += tab0+"debug: process\n";
+        _return += tab0+"begin  -- process debug\n";
+        _return += get_list(_architecture[_name_architecture]._list_debug,depth+1,"",true);
+        _return += "\n";
+        _return += tab1+"-- wait one period\n";
+        _return += tab1+"wait for "+toString(VHDL_TIME_PERIOD)+" "+toString(VHDL_TIME_UNIT)+";\n";
+        _return += tab0+"end process debug;\n";
+      }
+
+    log_printf(FUNC,Behavioural,FUNCTION,"End");
+
+    return _return;
+  };
+  
+  
+}; // end namespace behavioural          
+}; // end namespace morpheo              
+
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_header.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_header.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_header.cpp	(revision 113)
@@ -12,4 +12,5 @@
 #include <time.h>
 #include <sstream>
+#include <fstream>
 
 namespace morpheo              {
@@ -21,5 +22,5 @@
 			       std::string   filename)
   {
-    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
+    log_begin(Behavioural,FUNCTION);
 
     std::string text;
@@ -32,10 +33,62 @@
     text += "-- "+toString(_("Date    : ")) + ctime (&current_time );
     text += "-- "+toString(_("Version : ")) + MORPHEO_HEADER +"\n";
+    text += "-- "+toString(_("Id      : ")) + _id +"  \n";
     text += "-- "+toString(_("Comment : ")) + _("it's a autogenerated file, don't modify") +"\n";
     text += "-------------------------------------------------------------------------------\n";
     
-    log_printf(FUNC,Behavioural,FUNCTION,"End");
+    log_end(Behavioural,FUNCTION);
 
     return text;
+  };
+
+#undef  FUNCTION
+#define FUNCTION "vhdl_get_id"
+  std::string vhdl_get_id(std::string model_name)
+  {
+    log_begin(Behavioural,FUNCTION);
+
+    std::string id="";
+
+    directory();
+
+    std::string filename = MORPHEO_VHDL + "/" + model_name + VHDL_EXTENSION;
+    std::ifstream file;
+
+    file.open(filename.c_str(),std::ios::in);
+
+    // open file
+    if (!file)
+      {
+        log_printf(INFO,Behavioural,FUNCTION,_("Can't open file : \"%s\""),filename.c_str());
+      }
+    else
+      {
+        // get line with Id
+        do
+          {
+            std::getline(file,id,'\n'); // comment
+          } while ((id.find("Id      :") == std::string::npos) and
+                   (not file.eof()));
+
+        if (file.eof())
+          log_printf(INFO,Behavioural,FUNCTION,_("\"Id\" not find in file : \"%s\""),filename.c_str());
+        else
+          {
+            // get id
+            id = id.substr(id.find_first_of(':',0)+1,std::string::npos);
+
+            // Erase all ' '
+            size_t i=id.find_first_of(' ',0);
+            while (i!=std::string::npos)
+              {
+                id.erase(i,i+1);
+                i=id.find_first_of(' ',i);
+              }
+          }
+      }
+
+    log_end(Behavioural,FUNCTION);
+
+    return id;
   };
   
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_library.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_library.cpp	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_library.cpp	(revision 113)
@@ -0,0 +1,38 @@
+#ifdef VHDL
+
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Vhdl.h"
+#include "Common/include/Tabulation.h"
+#include <sstream>
+
+namespace morpheo              {
+namespace behavioural          {
+  
+#undef  FUNCTION
+#define FUNCTION "Vhdl::get_library"
+  std::string Vhdl::get_library (uint32_t depth)
+  {
+    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
+
+    std::list<std::string>::iterator i   = _list_library.begin();
+    std::string                 tab = morpheo::tab(depth);
+    std::ostringstream          text;
+
+    if (i != _list_library.end())
+      text << get_list(_list_library,depth,";",true);
+
+    log_printf(FUNC,Behavioural,FUNCTION,"End");
+
+    return text.str();
+  };
+  
+}; // end namespace behavioural          
+}; // end namespace morpheo              
+
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_library_default.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_library_default.cpp	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_library_default.cpp	(revision 113)
@@ -0,0 +1,45 @@
+#ifdef VHDL
+
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Vhdl.h"
+#include "Common/include/Tabulation.h"
+
+#include <sstream>
+
+namespace morpheo              {
+namespace behavioural          {
+  
+#undef  FUNCTION
+#define FUNCTION "Vhdl::get_library_default"
+  std::string Vhdl::get_library_default (uint32_t depth)
+  {
+    log_begin(Behavioural,FUNCTION);
+    
+    std::string text;
+    std::string str;
+    
+    std::stringstream it;
+
+    it << get_library(depth);
+
+    while (getline(it,str))
+      {
+        if (str.find( "ieee") != std::string::npos)
+          text += str+"\n";
+      }
+
+    log_end(Behavioural,FUNCTION);
+
+    return text;
+  };
+  
+}; // end namespace behavioural          
+}; // end namespace morpheo              
+
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_library_ieee.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_library_ieee.cpp	(revision 112)
+++ 	(revision )
@@ -1,46 +1,0 @@
-#ifdef VHDL
-
-/*
- * $Id$
- *
- * [ Description ]
- * 
- */
-
-#include "Behavioural/include/Vhdl.h"
-#include "Common/include/Tabulation.h"
-
-#include <sstream>
-
-namespace morpheo              {
-namespace behavioural          {
-  
-#undef  FUNCTION
-#define FUNCTION "Vhdl::get_library_ieee"
-  std::string Vhdl::get_library_ieee (uint32_t depth)
-  {
-    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
-
-    std::string        tab = morpheo::tab(depth);
-    std::ostringstream text;
-
-    text << tab                                         << std::endl
-	 << tab << "library ieee;"                      << std::endl
-         << tab << "  use ieee.numeric_bit.all;       " << std::endl
-         << tab << "  use ieee.numeric_std.all;       " << std::endl
-	 << tab << "  use ieee.std_logic_1164.all;    " << std::endl
-         << tab << "  use ieee.std_logic_arith.all;   " << std::endl
-         << tab << "  use ieee.std_logic_misc.all;    " << std::endl
-         << tab << "--use ieee.std_logic_signed.all;  " << std::endl
-         << tab << "  use ieee.std_logic_unsigned.all;" << std::endl
-         << tab << "--use ieee.std_logic_textio.all;  " << std::endl;
-      
-    log_printf(FUNC,Behavioural,FUNCTION,"End");
-
-    return text.str();
-  };
-  
-}; // end namespace behavioural          
-}; // end namespace morpheo              
-
-#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_library_work.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_library_work.cpp	(revision 112)
+++ 	(revision )
@@ -1,40 +1,0 @@
-#ifdef VHDL
-
-/*
- * $Id$
- *
- * [ Description ]
- * 
- */
-
-#include "Behavioural/include/Vhdl.h"
-#include "Common/include/Tabulation.h"
-#include <sstream>
-
-namespace morpheo              {
-namespace behavioural          {
-  
-#undef  FUNCTION
-#define FUNCTION "Vhdl::get_library_work"
-  std::string Vhdl::get_library_work (uint32_t depth)
-  {
-    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
-
-    std::list<std::string>::iterator i   = _list_library_work.begin();
-    std::string                 tab = morpheo::tab(depth);
-    std::ostringstream          text;
-
-    if (i != _list_library_work.end())
-      text << tab                    << std::endl
-	   << tab << "library work;" << std::endl
-	   << get_list(_list_library_work,depth,";",true);
-
-    log_printf(FUNC,Behavioural,FUNCTION,"End");
-
-    return text.str();
-  };
-  
-}; // end namespace behavioural          
-}; // end namespace morpheo              
-
-#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_list.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_list.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_list.cpp	(revision 113)
@@ -17,8 +17,8 @@
 #undef  FUNCTION
 #define FUNCTION "Vhdl::get_list"
-  std::string Vhdl::get_list (std::list<std::string> liste                ,
-			      uint32_t     depth                ,
-			      std::string       separator            ,
-			      bool         last_separator       )
+  std::string Vhdl::get_list (std::list<std::string> liste         ,
+			      uint32_t               depth         ,
+			      std::string            separator     ,
+			      bool                   last_separator)
   {
     log_printf(FUNC,Behavioural,FUNCTION,"Begin");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_model.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_model.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_model.cpp	(revision 113)
@@ -15,8 +15,7 @@
 namespace behavioural          {
   
-  std::string Vhdl::get_model(uint32_t depth            ,
-			 std::string   filename         ,
-			 std::string   entity_name      ,
-			 std::string   architecture_name)
+  std::string Vhdl::get_model(uint32_t depth                 ,
+                              std::string   filename         ,
+                              std::string   entity_name      )
   {
     log_printf(FUNC,Behavioural,"get_model","Begin");
@@ -25,9 +24,12 @@
     std::ostringstream text;
 
-    text << tab << get_header       (depth,filename)                      << std::endl
-	 << tab << get_library_ieee (depth)                               << std::endl
-	 << tab << get_library_work (depth)                               << std::endl
-	 << tab << get_entity       (depth,entity_name)                   << std::endl
-	 << tab << get_architecture (depth,architecture_name,entity_name) << std::endl;
+    std::string configuration_name = "configuration_"+entity_name;
+
+    text << tab << get_header       (depth,filename)    << std::endl
+	 << tab << get_library      (depth)             << std::endl
+	 << tab << get_entity       (depth,entity_name) << std::endl
+	 << tab << get_architecture (depth,entity_name) << std::endl
+         << tab << get_configuration(depth,entity_name,configuration_name) << std::endl
+      ;
     
     log_printf(FUNC,Behavioural,"get_model","End");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_package.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_package.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_package.cpp	(revision 113)
@@ -27,9 +27,9 @@
     std::ostringstream text;
 
-    text << tab << get_header       (depth,filename)                      << std::endl
-	 << tab << get_library_ieee (depth)                               << std::endl
-	 << tab << "package " << package_name << " is"                    << std::endl
-	 << tab << get_component    (depth+1,entity_name)                 << std::endl
-	 << tab << "end " << package_name << ";"                          << std::endl;
+    text << tab << get_header          (depth,filename)     << std::endl
+ 	 << tab << get_library_default (depth)              << std::endl
+	 << tab << "package " << package_name << " is"      << std::endl
+	 << tab << get_component    (depth+1,entity_name)   << std::endl
+	 << tab << "end " << package_name << ";"            << std::endl;
 
     log_printf(FUNC,Behavioural,FUNCTION,"End");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_signal.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_signal.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_signal.cpp	(revision 113)
@@ -20,5 +20,9 @@
   {
     log_printf(FUNC,Behavioural,FUNCTION,"Begin");
-    std::string _return = get_list (_list_signal, depth, ";", true);
+
+    test_architecture();
+
+    std::string _return = get_list (_architecture[_name_architecture]._list_signal, depth, ";", true);
+
     log_printf(FUNC,Behavioural,FUNCTION,"End");
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_type.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_type.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_get_type.cpp	(revision 113)
@@ -20,5 +20,8 @@
   {
     log_printf(FUNC,Behavioural,FUNCTION,"Begin");
-    std::string _return = get_list (_list_type, depth, ";", true);
+
+    test_architecture();
+    std::string _return = get_list (_architecture[_name_architecture]._list_type, depth, ";", true);
+
     log_printf(FUNC,Behavioural,FUNCTION,"End");
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_alias.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_alias.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_alias.cpp	(revision 113)
@@ -23,5 +23,9 @@
   {
     log_printf(FUNC,Behavioural,FUNCTION,"Begin");
-    set_list(_list_alias, "alias "+ name1+"\t: "+type1+"\tis "+name2+"\t"+range2);
+    
+    test_architecture();
+    
+    set_list(_architecture[_name_architecture]._list_alias, "alias "+ name1+"\t: "+type1+"\tis "+name2+"\t"+range2);
+
     log_printf(FUNC,Behavioural,FUNCTION,"End");
   };
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_architecture.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_architecture.cpp	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_architecture.cpp	(revision 113)
@@ -0,0 +1,37 @@
+#ifdef VHDL
+
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Vhdl.h"
+
+namespace morpheo              {
+namespace behavioural          {
+  
+#undef  FUNCTION
+#define FUNCTION "Vhdl::set_architecture"
+  std::string Vhdl::set_architecture (std::string name)
+  {
+    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
+
+    std::string _return = _name_architecture;
+//     vhdl_architecture_t arch;
+
+//     if (_architecture.find(name) == _architecture.end())
+//       _architecture[name] = arch;
+
+    _name_architecture = name;
+
+    log_printf(FUNC,Behavioural,FUNCTION,"End");
+
+    return _return;
+  };
+  
+}; // end namespace behavioural          
+}; // end namespace morpheo              
+
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_body.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_body.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_body.cpp	(revision 113)
@@ -30,5 +30,8 @@
   {
     log_printf(FUNC,Behavioural,FUNCTION,"Begin");
-    set_list(_list_body, morpheo::tab(depth)+text);
+
+    test_architecture();
+
+    set_list(_architecture[_name_architecture]._list_body, morpheo::tab(depth)+text);
     log_printf(FUNC,Behavioural,FUNCTION,"End");
   };
@@ -40,11 +43,13 @@
   {
     log_printf(FUNC,Behavioural,FUNCTION,"Begin");
+
+    test_architecture();
     
     std::string tab=morpheo::tab(depth);
 
-    for (std::list<std::string>::iterator it=vhdl->_list_body.begin();
-         it!=vhdl->_list_body.end();
+    for (std::list<std::string>::iterator it=vhdl->_architecture[_name_architecture]._list_body.begin();
+         it!=vhdl->_architecture[_name_architecture]._list_body.end();
          ++it)
-      set_list(_list_body,tab+*it);
+      set_list(_architecture[_name_architecture]._list_body,tab+*it);
 
     log_printf(FUNC,Behavioural,FUNCTION,"End");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_body_component.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_body_component.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_body_component.cpp	(revision 113)
@@ -17,13 +17,18 @@
 #undef  FUNCTION
 #define FUNCTION "Vhdl::set_body_component"
-  void Vhdl::set_body_component (std::string         name_instance      ,
-				 std::string         name_component     ,
-				 std::list<std::string>   list_port_map      )
+  void Vhdl::set_body_component (std::string            name_instance    ,
+				 std::string            name_component   ,
+                                 std::string            name_architecture,
+                                 std::string            name_package     ,
+				 std::list<std::string> list_port_map )
   {
     log_printf(FUNC,Behavioural,FUNCTION,"Begin");
 
-    set_body(name_instance + " : " + name_component);
+    name_architecture = test_architecture(name_architecture);
+
+    set_body(name_instance + " : entity " + name_package + "." + name_component + " (" + name_architecture + ")");
+//  set_body(name_instance + " : " + name_component);
     set_body("port map (");
-    set_list(_list_body, get_list(list_port_map, 1, ",", false));
+    set_list(_architecture[name_architecture]._list_body, get_list(list_port_map, 1, ",", false));
     set_body(");");
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_constant.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_constant.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_constant.cpp	(revision 113)
@@ -22,5 +22,9 @@
   {
     log_printf(FUNC,Behavioural,FUNCTION,"Begin");
-    set_list(_list_type, "constant "+ name+"\t: "+type+"\t:= "+init);
+
+    test_architecture();
+    
+    set_list(_architecture[_name_architecture]._list_type, "constant "+ name+"\t: "+type+"\t:= "+init);
+    
     log_printf(FUNC,Behavioural,FUNCTION,"End");
   };
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_debug.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_debug.cpp	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_debug.cpp	(revision 113)
@@ -0,0 +1,38 @@
+#ifdef VHDL
+
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Vhdl.h"
+#include "Common/include/Tabulation.h"
+#include <sstream>
+
+namespace morpheo              {
+namespace behavioural          {
+  
+#undef  FUNCTION
+#define FUNCTION "Vhdl::set_debug"
+  void Vhdl::set_debug (std::string     condition,
+                        std::string     text,
+                        vhdl_severity_t severity)
+  {
+    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
+
+    std::string msg = "assert not ("+condition+") report \""+MSG_VHDL+" "+text+"\" severity "+toString(severity)+";";
+
+    test_architecture();
+
+    set_list(_architecture[_name_architecture]._list_debug, msg);
+
+    log_printf(FUNC,Behavioural,FUNCTION,"End");
+  };
+  
+  
+}; // end namespace behavioural          
+}; // end namespace morpheo              
+
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_library.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_library.cpp	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_library.cpp	(revision 113)
@@ -0,0 +1,42 @@
+#ifdef VHDL
+
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Vhdl.h"
+
+#include <sstream>
+
+namespace morpheo              {
+namespace behavioural          {
+  
+#undef  FUNCTION
+#define FUNCTION "Vhdl::set_library"
+  void Vhdl::set_library (std::string library_name,
+                          std::string package_name,
+                          std::string declarative_unit)
+  {
+    log_begin(Behavioural,FUNCTION);
+
+    std::string library = "library "+library_name;
+
+    std::list<std::string>::iterator it = _list_library.begin();
+    while ((it != _list_library.end()) and
+           (*it != library))
+      ++it;
+    if (it == _list_library.end())
+      set_list(_list_library, library);
+
+    set_list(_list_library, "use "+library_name+"."+ package_name + "."+declarative_unit);
+
+    log_end(Behavioural,FUNCTION);
+  };
+  
+}; // end namespace behavioural          
+}; // end namespace morpheo              
+
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_library_default.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_library_default.cpp	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_library_default.cpp	(revision 113)
@@ -0,0 +1,39 @@
+#ifdef VHDL
+
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Vhdl.h"
+#include "Common/include/Tabulation.h"
+
+#include <sstream>
+
+namespace morpheo              {
+namespace behavioural          {
+  
+#undef  FUNCTION
+#define FUNCTION "Vhdl::set_library_default"
+  void Vhdl::set_library_default (void)
+  {
+    log_begin(Behavioural,FUNCTION);
+    
+    set_library("ieee","numeric_bit"       ,"all");
+    set_library("ieee","numeric_std"       ,"all");
+    set_library("ieee","std_logic_1164"    ,"all");
+    set_library("ieee","std_logic_arith"   ,"all");
+    set_library("ieee","std_logic_misc"    ,"all");
+//  set_library("ieee","std_logic_signed"  ,"all");
+    set_library("ieee","std_logic_unsigned","all");
+//  set_library("ieee","std_logic_textio"  ,"all");
+      
+    log_end(Behavioural,FUNCTION);
+  };
+  
+}; // end namespace behavioural          
+}; // end namespace morpheo              
+
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_library_work.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_library_work.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_library_work.cpp	(revision 113)
@@ -19,7 +19,9 @@
   void Vhdl::set_library_work (std::string      package_name)
   {
-    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
-    set_list(_list_library_work, "use work."+ package_name + ".all");
-    log_printf(FUNC,Behavioural,FUNCTION,"End");
+    log_begin(Behavioural,FUNCTION);
+    
+    set_library("work",package_name,"all");
+
+    log_end(Behavioural,FUNCTION);
   };
   
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_port.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_port.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_port.cpp	(revision 113)
@@ -34,4 +34,15 @@
     log_printf(FUNC,Behavioural,FUNCTION,"End");
   };
+
+// #undef  FUNCTION
+// #define FUNCTION "Vhdl::set_port_clock"
+//   void Vhdl::set_port_clock (std::string name)
+//   {
+//     log_printf(FUNC,Behavioural,FUNCTION,"Begin");
+
+//     _port_clock = name;
+
+//     log_printf(FUNC,Behavioural,FUNCTION,"End");
+//   };
     
 }; // end namespace behavioural          
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_signal.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_signal.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_signal.cpp	(revision 113)
@@ -22,5 +22,9 @@
   {
     log_printf(FUNC,Behavioural,FUNCTION,"Begin");
-    set_list(_list_signal, "signal "+ name + "\t: " + type);
+
+    test_architecture();
+
+    set_list(_architecture[_name_architecture]._list_signal, "signal "+ name + "\t: " + type);
+    
     log_printf(FUNC,Behavioural,FUNCTION,"End");
   };
@@ -39,5 +43,9 @@
   {
     log_printf(FUNC,Behavioural,FUNCTION,"Begin");
-    _list_signal.push_back ("signal "+ name+"\t: "+type+"\t:= "+init);
+
+    test_architecture();
+    
+    _architecture[_name_architecture]._list_signal.push_back ("signal "+ name+"\t: "+type+"\t:= "+init);
+
     log_printf(FUNC,Behavioural,FUNCTION,"End");
   };
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_type.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_type.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_type.cpp	(revision 113)
@@ -21,5 +21,9 @@
   {
     log_printf(FUNC,Behavioural,FUNCTION,"Begin");
-    set_list(_list_type, "type "+ name + "\tis " + type);
+
+    test_architecture();
+
+    set_list(_architecture[_name_architecture]._list_type, "type "+ name + "\tis " + type);
+
     log_printf(FUNC,Behavioural,FUNCTION,"End");
   };
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_test_architecture.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_test_architecture.cpp	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_test_architecture.cpp	(revision 113)
@@ -0,0 +1,51 @@
+#ifdef VHDL
+
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Vhdl.h"
+
+namespace morpheo              {
+namespace behavioural          {
+
+// _architecture[_name_architecture].
+// test_architecture();
+  
+#undef  FUNCTION
+#define FUNCTION "Vhdl::test_architecture"
+  void Vhdl::test_architecture (void)
+  {
+    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
+
+    if (_name_architecture == "")
+      _name_architecture = _name_architecture_default;
+
+    log_printf(FUNC,Behavioural,FUNCTION,"End");
+  };
+
+#undef  FUNCTION
+#define FUNCTION "Vhdl::test_architecture"
+  std::string Vhdl::test_architecture (std::string name)
+  {
+    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
+
+    std::string _return;
+
+    if (name == "")
+      _return = _name_architecture_default;
+    else
+      _return = name;
+    
+    log_printf(FUNC,Behavioural,FUNCTION,"End");
+
+    return _return;
+  };
+  
+}; // end namespace behavioural          
+}; // end namespace morpheo              
+
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Common/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Common/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Common/Makefile.defs	(revision 113)
@@ -5,4 +5,6 @@
 # 
 
+ENTITY                          = Common
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO           = ..
Index: trunk/IPs/systemC/processor/Morpheo/Common/Makefile.deps
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Common/Makefile.deps	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Common/Makefile.deps	(revision 113)
@@ -16,4 +16,6 @@
 #-----[ Library ]------------------------------------------
 
+Common_SOURCES          =       $(Common_DIR)/src/*.cpp
+
 Common_LIBRARY		= 	-lCommon
 
Index: trunk/IPs/systemC/processor/Morpheo/Common/include/BitManipulation.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Common/include/BitManipulation.h	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Common/include/BitManipulation.h	(revision 113)
@@ -42,4 +42,10 @@
   };
 
+  template <typename T>
+  T gen_mask_not   (uint32_t size)
+  { 
+    return gen_mask_not<T>(size-1,0);
+  };
+
   //............................................................................
   // mask, mask_not ............................................................
Index: trunk/IPs/systemC/processor/Morpheo/Common/include/Debug.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Common/include/Debug.h	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Common/include/Debug.h	(revision 113)
@@ -24,4 +24,5 @@
  */
 
+#include "Common/include/Systemc.h"
 #include "Common/include/Message.h"
 #include "Common/include/FromString.h"
@@ -64,6 +65,6 @@
 #define debug_test_simulation_time                                      \
   (not debug_cycle_test or                                              \
-   ( (sc_simulation_time() >= debug_cycle_start) and                    \
-    ((sc_simulation_time() <= debug_cycle_stop) or                      \
+   ( (simulation_cycle() >= debug_cycle_start) and                    \
+    ((simulation_cycle() <= debug_cycle_stop) or                      \
       (debug_cycle_stop == -1))))
 #else
@@ -149,5 +150,5 @@
   do									\
     {									\
-      log_printf(TRACE,component,func,_("[%d] %s.%s"),static_cast<uint32_t>(sc_simulation_time()),name,func); \
+      log_printf(TRACE,component,func,_("[%d] %s.%s"),static_cast<uint32_t>(simulation_cycle()),name,func); \
     } while(0)
 
Index: trunk/IPs/systemC/processor/Morpheo/Common/include/Environment.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Common/include/Environment.h	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Common/include/Environment.h	(revision 113)
@@ -14,29 +14,33 @@
 
 #if (defined(STATISTICS) and not defined(SYSTEMC))
-#  error "To have the statistics, you must set flags SYSTEMC"
+# error "To have the statistics, you must set flags SYSTEMC"
 #endif
 
 #if (defined(INFORMATION) and not defined(STATISTICS))
-#  error "To have the information, you must set flags STATISTICS"
+# error "To have the information, you must set flags STATISTICS"
 #endif
 
 #if (defined(VHDL_TESTBENCH) and not defined(SYSTEMC))
-#  error "To have the vhdl's test bench, you must set flags SYSTEMC"
+# error "To have the vhdl's test bench, you must set flags SYSTEMC"
 #endif
 
 #if (defined(VHDL_TESTBENCH) and not defined(VHDL))
-#  error "To have the vhdl's test bench, you must set flags VHDL"
+# error "To have the vhdl's test bench, you must set flags VHDL"
 #endif
 
 #if (defined(VHDL_TESTBENCH_ASSERT) and not defined(VHDL_TESTBENCH))
-#  error "To have an assert in vhdl's test bench, you must set flags VHDL_TESTBENCH"
+# error "To have an assert in vhdl's test bench, you must set flags VHDL_TESTBENCH"
 #endif
 
 #if (defined(VHDL_TESTBENCH) and defined(SYSTEMC))
-#  define SYSTEMC_VHDL_COMPATIBILITY
+# define SYSTEMC_VHDL_COMPATIBILITY
 #endif
 
 #if (defined(DEBUG))
-#  define DEBUG_TEST
+# define DEBUG_TEST
+#endif
+
+#if defined(MTI_SYSTEMC) and defined(SYSTEMC) and defined(VHDL)
+# define MODELSIM_COSIMULATION
 #endif
 
Index: trunk/IPs/systemC/processor/Morpheo/Common/include/Message.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Common/include/Message.h	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Common/include/Message.h	(revision 113)
@@ -33,4 +33,5 @@
 #  define MSG_INFORMATION   _("[1;32m[INFORMATION][0m")
 #  define MSG_BREAKPOINT    _("[1;38m[   BREAK   ][0m")
+#  define MSG_VHDL          _("[1;34m[   VHDL    ][0m")
 #else
 #  define MSG_DEBUG         _("[   DEBUG   ]")
@@ -39,4 +40,5 @@
 #  define MSG_INFORMATION   _("[INFORMATION]")
 #  define MSG_BREAKPOINT    _("[   BREAK   ]")
+#  define MSG_VHDL          _("[   VHDL    ]")
 #endif
 
@@ -84,9 +86,10 @@
 
 #define msg(arg...)		fmsg(stdout,arg)
+#define err(arg...)             fmsgError(stderr,arg)
+
 #define msgDebug(arg...)	fmsgDebug(stdout,arg)
 #define msgError(arg...)	fmsgError(stdout,arg)
 #define msgWarning(arg...)	fmsgWarning(stdout,arg)
 #define msgInformation(arg...)	fmsgInformation(stdout,arg)
-#define err(arg...)             fmsgError(stderr,arg)
 
 }; // end namespace morpheo
Index: trunk/IPs/systemC/processor/Morpheo/Common/include/Systemc.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Common/include/Systemc.h	(revision 113)
+++ trunk/IPs/systemC/processor/Morpheo/Common/include/Systemc.h	(revision 113)
@@ -0,0 +1,48 @@
+#ifndef Morpheo_systemc_h
+#define Morpheo_systemc_h
+
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ * Macro / function to test
+ */
+
+#ifdef SYSTEMC
+#include <systemc.h>
+
+namespace morpheo {
+
+  // Modelsim to sc_start
+#ifdef MTI_SYSTEMC
+# define TIME_PERIOD 10.
+#else
+# define TIME_PERIOD 1.
+#endif
+
+# ifndef TIME_UNIT_PREFIX
+#  ifdef MTI_SYSTEMC
+#   define TIME_UNIT_PREFIX
+#  else
+#   define TIME_UNIT_PREFIX sc_core::
+#  endif
+# endif
+# define TIME_UNIT TIME_UNIT_PREFIX SC_NS
+
+# define VHDL_TIME_PERIOD TIME_PERIOD
+# define VHDL_TIME_UNIT               "ns"
+// #endif
+
+#ifdef MTI_SYSTEMC
+# define simulation_run(x) do{ if (x>0) wait(TIME_PERIOD*x,TIME_UNIT); else for (int i=0; i<1000; ++i) wait(SC_ZERO_TIME); } while(0)
+#else
+# define simulation_run(x) do{ sc_start(x); } while(0)
+#endif
+
+#define simulation_cycle() sc_simulation_time()/TIME_PERIOD
+
+};
+#endif
+#endif
+
Index: trunk/IPs/systemC/processor/Morpheo/Common/include/Test.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Common/include/Test.h	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Common/include/Test.h	(revision 113)
@@ -16,5 +16,5 @@
 #include "Common/include/ErrorMorpheo.h"
 #include "Common/include/ToString.h"
-
+#include "Common/include/Systemc.h"
 namespace morpheo {
 
@@ -26,5 +26,5 @@
 inline void test_ko_error (void)
 {
-  std::string msg = "Test ko : error in test \""+morpheo::toString(num_test)+"\"";
+  std::string msg = morpheo::toString(_("Test ko : error in test \"%d\""),num_test);
   throw (morpheo::ErrorMorpheo (msg));
 }
@@ -33,15 +33,11 @@
 inline void test_ko (char * file, uint32_t line, T exp1, T exp2)
 {
-  fflush (stdout);
-  fflush (stderr);
-
-  std::cerr << "[" << num_test << "] : " << STR_KO
-       << "\tline " << line                      << std::endl
-       << " * Localisation"                      << std::endl
-       << "   - File : " << file                 << std::endl
-       << "   - Line : " << line                 << std::endl
-       << " * Expression is different"           << std::endl
-       << "   - exp1 : "+morpheo::toString(exp1) << std::endl
-       << "   - exp2 : "+morpheo::toString(exp2) << std::endl;
+  msgError(_("[%d] : %s\n"),num_test,STR_KO);
+  msgError(_(" * Localisation\n"));
+  msgError(_("   - File  : %s\n"),file);
+  msgError(_("   - Line  : %d\n"),line);
+  msgError(_(" * Expression is different\n"));
+  msgError(_("   - exp1  : %s\n"),morpheo::toString(exp1).c_str());
+  msgError(_("   - exp2  : %s\n"),morpheo::toString(exp2).c_str());
 
   test_ko_error ();
@@ -50,12 +46,8 @@
 inline void test_ko (char * file, uint32_t line)
 {
-  fflush (stdout);
-  fflush (stderr);
-
-  std::cerr << "[" << num_test << "] : " << STR_KO
-       << "\tline " << line                           << std::endl
-       << " * Localisation"                           << std::endl
-       << "   - File : " << file                      << std::endl
-       << "   - Line : " << line                      << std::endl;
+  msgError(_("[%d] : %s\n"),num_test,STR_KO);
+  msgError(_(" * Localisation\n"));
+  msgError(_("   - File  : %s\n"),file);
+  msgError(_("   - Line  : %d\n"),line);
   
   test_ko_error ();
@@ -64,8 +56,5 @@
 inline void test_ok ()
 {
-  fflush (stdout);
-  fflush (stderr);
-
-  msg (_("[%d] : %s\n"), num_test,STR_OK);
+  msgInformation (_("[%d] : %s\n"), num_test,STR_OK);
 
   num_test ++;
@@ -74,9 +63,6 @@
 inline void test_ok (char * file, uint32_t line)
 {
-  fflush (stdout);
-  fflush (stderr);
-
-  msg (_("[%d] : %s\n"), num_test,STR_OK);
-  msg (_("\tline %d\n"), line);
+  msgInformation (_("[%d] : %s (line %d)\n"), num_test,STR_OK,line);
+  msgInformation (_("   - Line  : %d\n"), line);
 
   num_test ++;
@@ -86,10 +72,7 @@
 inline void test_ok (char * file, uint32_t line, T exp)
 {
-  fflush (stdout);
-  fflush (stderr);
-
-  msg (_("[%d] : %s\n"), num_test, STR_OK);
-  msg (_("\tline %d\n"), line);
-  msg (_("\tvalue %s\n"), (morpheo::toString(exp)).c_str());
+  msgInformation (_("[%d] : %s\n"), num_test, STR_OK);
+  msgInformation (_("   - Line  : %d\n"), line);
+  msgInformation (_("   - Value : %s\n"), (morpheo::toString(exp)).c_str());
 
   num_test ++;
@@ -112,8 +95,7 @@
 #define LABEL(str...)							\
   {									\
-    msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time()));	\
-    msg (str);								\
-    msg (_("\n"));							\
-    fflush (stdout);                                                    \
+    msgInformation (_("{%.0f} "),simulation_cycle());                \
+    msg            (str);                                               \
+    msg            (_("\n"));                                           \
   } while(0)
 
@@ -122,13 +104,13 @@
 #endif
 
-#define SC_START(cycle_offset)						\
+#define SC_CYCLE(cycle_offset)						\
   do									\
     {									\
-      /*cout << "SC_START (begin)" << endl;*/				\
+      /*cout << "SC_CYCLE (begin)" << endl;*/				\
       									\
-      uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time()); \
+      double cycle_current = simulation_cycle();                        \
       if (cycle_offset != 0)						\
 	{								\
-	  cout << "##########[ cycle "<< cycle_current+cycle_offset << " ] (" << __LINE__ << ")" << endl; \
+	  msgInformation(_("##########[ cycle %.0f ] (%d)\n"),cycle_current+cycle_offset,__LINE__); \
 	}								\
       									\
@@ -138,10 +120,13 @@
 	}								\
       									\
-      sc_start(cycle_offset);						\
+      simulation_run(cycle_offset);                                     \
       									\
-      /*cout << "SC_START (end  )" << endl;*/				\
+      /*cout << "SC_CYCLE (end  )" << endl;*/				\
     } while(0)
 
-
+// old support
+#ifndef MTI_SYSTEMC
+# define SC_START(x) SC_CYCLE(x)
+#endif
 
 };
Index: trunk/IPs/systemC/processor/Morpheo/Common/include/Time.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Common/include/Time.h	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Common/include/Time.h	(revision 113)
@@ -9,4 +9,5 @@
 #include <iostream>
 #include <sys/time.h>
+#include "Common/include/Systemc.h"
 
 namespace morpheo {
@@ -28,5 +29,5 @@
   { 
 #ifdef SYSTEMC
-    nb_cycles_begin = sc_simulation_time();
+    nb_cycles_begin = simulation_cycle();
 #endif
     gettimeofday(&time_begin,NULL);
@@ -48,5 +49,5 @@
     if (x.systemc)
       {
-        double nb_cycles_end = sc_simulation_time();
+        double nb_cycles_end = simulation_cycle();
         double average       = static_cast<double>(nb_cycles_end-x.nb_cycles_begin+1) / static_cast<double>(time_end.tv_sec-x.time_begin.tv_sec+1);
         
Index: trunk/IPs/systemC/processor/Morpheo/Common/src/MemCheck.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Common/src/MemCheck.cpp	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Common/src/MemCheck.cpp	(revision 113)
@@ -10,5 +10,5 @@
 // Global flags set by macros in MemCheck.h
 bool traceFlag  = false;
-bool activeFlag = true;
+bool activeFlag = false;
 
 namespace {
Index: trunk/IPs/systemC/processor/Morpheo/Documentation/Makefile.Documentation
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Documentation/Makefile.Documentation	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Documentation/Makefile.Documentation	(revision 113)
@@ -273,5 +273,5 @@
 			$(RM) $(DIR_SCHEMA_EPS);			\
 			$(RM) $(DVI_FILES) $(PS_FILES) $(PDF_FILES);	\
-			$(MAKE) clean_rec DIR_CLEAN=.;
+			$(MAKE) clean_rec DIR_CLEAN=$(PWD);
 
 clean_all               : clean
Index: trunk/IPs/systemC/processor/Morpheo/Documentation/doc/document-morpheo-vhdl_generation/tex/document-morpheo-vhdl_generation-fr-03_vhdl_body.tex
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Documentation/doc/document-morpheo-vhdl_generation/tex/document-morpheo-vhdl_generation-fr-03_vhdl_body.tex	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Documentation/doc/document-morpheo-vhdl_generation/tex/document-morpheo-vhdl_generation-fr-03_vhdl_body.tex	(revision 113)
@@ -4,4 +4,6 @@
 
 \Section{VHDL : comportement}\label{vhdl_body}
+
+\subSection{Description du fichier {\it Component\_vhdl\_body.cpp}}
 
 Le comportement du composant est défini dans le fichier  {\it Component\_vhdl\_body.cpp}.
@@ -23,2 +25,35 @@
 void set_comment (std::string text );
 \end{lstlisting}
+
+\subSection{Description du fichier {\it Component\_vhdl.cpp}}
+Nous allons décrire ici le fichier {\it Component\_vhdl.cpp}.
+
+\lstparam{C++}
+\begin{lstlisting}[caption={Component\_vhdl.cpp}, label=component_vhdl.cpp]
+  void component::vhdl (void)
+  {
+    Vhdl * vhdl = new Vhdl (_name);
+
+    _interfaces->set_port(vhdl);
+    _component->vhdl_instance(vhdl);
+
+    vhdl_declaration (vhdl);
+    vhdl_body        (vhdl);
+
+    vhdl->generate_file();
+
+    delete vhdl;
+  };
+\end{lstlisting}
+
+
+La première étape est d'éditer le fichier {\it Component\_vhdl.cpp}. Le listing \ref{component_vhdl.cpp} représente le contenu de ce fichier. 
+\begin{itemize}
+\item Ligne 3 : Déclaration et construction de la variable {\it vhdl} qui est du  type {\it Vhdl}.
+\item Ligne 5 : Ajout dans le modèle VHDL des interfaces présentes dans le modèle SystemC. (cf fichiers Component.h).
+\item Ligne 6 : Ajout dans le modèle VHDL des composants internes  dans le modèle SystemC. (cf fichiers Component.h et Component\_allocation.cpp).
+\item Ligne 8 : Ajout dans le modèle VHDL des déclarations définit dans le fichiers Component\_vhdl\_declaration.cpp (cf section \ref{vhdl_declaration}).
+\item Ligne 9 : Ajout dans le modèle VHDL de la description comportemental définit dans le fichiers Component\_vhdl\_body.cpp (cf section \ref{vhdl_body}).
+\item Ligne 11 : Génération des fichiers VHDL. Le nom du fichier est construit à partir du nom fourni lors de la construction de la variable {\it vhdl}.
+\item Ligne 13 : Destruction de l'objet. 
+\end{itemize}
Index: trunk/IPs/systemC/processor/Morpheo/Documentation/doc/document-morpheo-vhdl_generation/tex/document-morpheo-vhdl_generation-fr-04_vhdl_structural.tex
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Documentation/doc/document-morpheo-vhdl_generation/tex/document-morpheo-vhdl_generation-fr-04_vhdl_structural.tex	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Documentation/doc/document-morpheo-vhdl_generation/tex/document-morpheo-vhdl_generation-fr-04_vhdl_structural.tex	(revision 113)
@@ -5,5 +5,5 @@
 \Section{VHDL : structurelle}\label{vhdl_structural}
 
-\subSection{Description du fichier {\it Component\_vhdl.cpp}}
+%\subSection{Description du fichier {\it Component\_vhdl.cpp}}
 Les modèles systemC structurels sont des modèles qui instancient d'autres modèles. Il n'y a pas de description comportementale. Ces modèles sont générés automatiquement. 
 Par contre, les modèles systemC comportementaux peuvent être décrit par un modèle VHDL mixte (incluant une description comportementale et des instances d'autre composant).
@@ -11,71 +11,46 @@
 Les modèles génériques sont dans le répertoire {\it IPs/systemC/processor/Morpheo/Behavioural/Generic}.
 
-\lstparam{C++}
-\begin{lstlisting}[caption={Component\_vhdl.cpp}, label=component_vhdl.cpp]
-  void component::vhdl (void)
-  {
-    Vhdl * vhdl = new Vhdl (_name);
-
-    _interfaces->set_port(vhdl);
-    _component->vhdl_instance(vhdl);
-
-    vhdl_declaration (vhdl);
-    vhdl_body        (vhdl);
-
-    vhdl->generate_file();
-
-    delete vhdl;
-  };
-\end{lstlisting}
-
-
-La première étape est d'éditer le fichier {\it Component\_vhdl.cpp}. Le listing \ref{component_vhdl.cpp} représente le contenu de ce fichier. 
-\begin{itemize}
-\item Ligne 3 : Déclaration et construction de la variable {\it vhdl} qui est du  type {\it Vhdl}.
-\item Ligne 5 : Ajout dans le modèle VHDL des interfaces présentes dans le modèle SystemC. (cf fichiers Component.h).
-\item Ligne 6 : Ajout dans le modèle VHDL des composants internes  dans le modèle SystemC. (cf fichiers Component.h et Component\_allocation.cpp).
-\item Ligne 8 : Ajout dans le modèle VHDL des déclarations définit dans le fichiers Component\_vhdl\_declaration.cpp (cf section \ref{vhdl_declaration}).
-\item Ligne 9 : Ajout dans le modèle VHDL de la description comportemental définit dans le fichiers Component\_vhdl\_body.cpp (cf section \ref{vhdl_body}).
-\item Ligne 11 : Génération des fichiers VHDL. Le nom du fichier est construit à partir du nom fourni lors de la construction de la variable {\it vhdl}.
-\item Ligne 13 : Destruction de l'objet. 
-\end{itemize}
-
 Pour la suite, nous allons supposer l'instanciation d'une FIFO.
 
 \subSection{Ajout d'une instance}
 
-Dans le fichier Component\_vhdl.cpp :
 \begin{enumerate}
-\item Inclure la définition de la classe désirée.
+\item Dans le fichier Component.h : inclure la définition de la classe désirée.
 \lstparam{C++}
 \begin{lstlisting}
 #include "Behavioural/Generic/Queue/include/Queue.h"
 \end{lstlisting}
-\item Creer les paramètres du modèle.
+
+\item Dans le fichier Component.h : déclaré les paramètres et le component
 \lstparam{C++}
 \begin{lstlisting}
-    morpheo::behavioural::generic::queue::Parameters * param_queue;
-    param_queue = new morpheo::behavioural::generic::queue::Parameters
+  morpheo::behavioural::generic::queue::Parameters * _param_queue;
+  morpheo::behavioural::generic::queue::Queue      * _component_queue;
+\end{lstlisting}
+
+\item Dans le fichier Component\_allocation.cpp : creer les paramètres du modèle.
+\lstparam{C++}
+\begin{lstlisting}
+  _param_queue = new morpheo::behavioural::generic::queue::Parameters
       (16, //size_queue
        32);//size_data 
 \end{lstlisting}
-\item Creer le modèle
+\item Dans le fichier Component\_allocation.cpp : creer le modèle
 \lstparam{C++}
 \begin{lstlisting}
-    morpheo::behavioural::generic::queue::Queue      * queue;
     std::string queue_name = _name + "_queue";
 
-    queue = new morpheo::behavioural::generic::queue::Queue
+    _component_queue = new morpheo::behavioural::generic::queue::Queue
       (queue_name.c_str() // nom du modèle
 #ifdef STATISTICS
        ,NULL              // Pas paramètres pour les statistiques
 #endif
-       ,param_queue       // Paramètres de la file
+       ,_param_queue      // Paramètres de la file
        ,USE_VHDL);        // Utilisation du modèle VHDL
 \end{lstlisting}
-\item Inclure le modèle dans la liste des composants internes
+\item Dans le fichier Component\_allocation.cpp : inclure le modèle dans la liste des composants internes
 \lstparam{C++}
 \begin{lstlisting}
-    _component->set_component(queue->_component
+    _component->set_component(_component_queue->_component
 #ifdef POSITION
                               , 20, 20, 20, 20   
@@ -86,5 +61,5 @@
                               );
 \end{lstlisting}
-\item indiquer dans le fichier Makefile.deps que le composant dépend de ce modèle. 
+\item Dans le fichier Makefile.deps : ajouter les dépendances du modèle.
 \lstparam{make}
 \begin{lstlisting}
@@ -114,4 +89,10 @@
                         $(MAKE) --directory=$(Component_DIR) --makefile=Makefile clean;
 \end{lstlisting}
+\item Dans le fichier Component\_deallocation.cpp : détruire les modèles et leurs paramètres.
+\lstparam{C++}
+\begin{lstlisting}
+  delete _component_queue;
+  delete _param_queue;
+\end{lstlisting}
 \end{enumerate}
 
@@ -138,2 +119,3 @@
     vhdl->set_body   (0,");");
 \end{lstlisting}
+
Index: trunk/IPs/systemC/processor/Morpheo/Files/Morpheo.sim
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Files/Morpheo.sim	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Files/Morpheo.sim	(revision 113)
@@ -30,5 +30,8 @@
   <parameter  name="debug_idle_time"                        value="5"       />
 
+  <component  name="Comparator"                             model="systemc" debug="0" />
   <component  name="Counter"                                model="systemc" debug="0" />
+  <component  name="Divider"                                model="systemc" debug="0" />
+  <component  name="Multiplier"                             model="systemc" debug="0" />
   <component  name="Priority"                               model="systemc" debug="0" />
   <component  name="Queue_Control"                          model="systemc" debug="0" />         
Index: trunk/IPs/systemC/processor/Morpheo/TopLevel/Makefile.defs
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/TopLevel/Makefile.defs	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/TopLevel/Makefile.defs	(revision 113)
@@ -7,4 +7,6 @@
 # 
 
+ENTITY                          = TopLevel
+
 #-----[ Directory ]----------------------------------------
 DIR_COMPONENT_MORPHEO		= ..
Index: trunk/Makefile.flags
===================================================================
--- trunk/Makefile.flags	(revision 112)
+++ trunk/Makefile.flags	(revision 113)
@@ -6,14 +6,17 @@
 
 #-----[ Simulator ]----------------------------------------
-SIMULATOR			= systemcass
+#SIMULATOR			?= modelsim
+SIMULATOR			?= systemcass
 
-# 3 simulators :
+# 4 simulators :
 # systemc			- SystemC    
 # systemcass 			- SystemCASS
 # systemcass_deps		- Systemcass, and use port dependency information instead of sensitivity list
+# modelsim                      - Co simulation SystemC/VHDL with Modelsim
 
 #-----[ Flags ]--------------------------------------------
 MORPHEO_FLAGS			=	-DSYSTEMC		\
 					-DDEBUG=DEBUG_TRACE     \
+					-DDEBUG_MEMORY_LEAK	\
 					-DSTATISTICS 		\
 					-DVHDL			\
@@ -24,5 +27,6 @@
 #					-DPRINT_COLOR        	\
 #					-DPOSITION       	\
-#					-DDEBUG_MEMORY_LEAK	\
+#
+
 
 # Flags :
Index: trunk/Makefile.tools
===================================================================
--- trunk/Makefile.tools	(revision 112)
+++ trunk/Makefile.tools	(revision 113)
@@ -18,4 +18,5 @@
 TEST					= test
 DATE					= date +%Y%m%d-%H%M%S
+CHMOD                                   = chmod
 CP					= cp
 MV					= mv
@@ -25,4 +26,5 @@
 RM					= rm -fr
 PWD					= `pwd`
+WC					= wc
 MAKE					= make -s
 AR					= ar -v
@@ -35,17 +37,13 @@
 UPPERtoLOWER				= $(TR) [:lower:] [:upper:]
 MSGFMT                                  = msgfmt
-DISTCC					= ~kane/Softwares/distcc/bin/distcc
-CC_FLAGS_COMMON				= -O0	 	 \
-					  -g3		 \
+DISTCC					= /users/chaos/kane/Softwares/distcc/bin/distcc
+CC_PREFIX                               = $(DISTCC)
+CC_FLAGS_COMMON				= -O2	 	 \
 					  -Wall		 \
 					  -Wunused       \
                                           -m32
-DIST_CXX				= export LANG=C; $(DISTCC) g++
-SEQ_CXX					= export LANG=C;           g++
-CXX					= $(DIST_CXX)
+CXX					= export LANG=C; $(CC_PREFIX) g++
 CXX_FLAGS				= $(CC_FLAGS_COMMON)
-DIST_CC					= export LANG=C; $(DISTCC) gcc
-SEQ_CC					= export LANG=C;           gcc
-CC					= $(DIST_CC)
+CC 					= export LANG=C; $(CC_PREFIX) gcc
 CC_FLAGS				= $(CC_FLAGS_COMMON)
 SED					= sed
@@ -83,5 +81,7 @@
 SYSTEMC_LIBDIR_systemc			= -L$(SYSTEMC_systemc)/lib-linux
 SYSTEMC_LIBNAME_systemc			= -lsystemc
-SYSTEMC_CFLAGS_systemc			=
+SYSTEMC_CXX_systemc			= $(CXX)
+SYSTEMC_CC_systemc			= $(CC)
+SYSTEMC_CFLAGS_systemc			= -g3					  
 SYSTEMC_EXEC_PARAMS_systemc		=
 
@@ -96,5 +96,11 @@
 SYSTEMC_LIBNAME_systemcass_deps		= $(SYSTEMC_LIBNAME_systemcass)
 
-SYSTEMC_CFLAGS_systemcass		= -rdynamic -ansi -Wno-long-long
+SYSTEMC_CXX_systemcass			= $(CXX)
+SYSTEMC_CXX_systemcass_deps		= $(SYSTEMC_CXX_systemcass)
+
+SYSTEMC_CC_systemcass			= $(CC)
+SYSTEMC_CC_systemcass_deps		= $(SYSTEMC_CC_systemcass)
+
+SYSTEMC_CFLAGS_systemcass		= -g3 -rdynamic -ansi -Wno-long-long
 SYSTEMC_CFLAGS_systemcass_deps		= $(SYSTEMC_CFLAGS_systemcass)
 
@@ -104,13 +110,28 @@
 #-----[ xilinx ]-------------------------------------------
 XILINX_ENV				= . $(XILINX)/settings.sh
-XILINX_CORELIB                          = $(XILINX)/vhdl/src/XilinxCoreLib/
+XILINX_COMPXLIB                         = $(XILINX_ENV); compxlib
+XILINX_LIBDIR                           = $(XILINX_CORELIB)/XilinxCoreLib
+XILINX_LIBNAME                          = XilinxCoreLib
 
 #-----[ Modeltech ]----------------------------------------
+#MODELTECH_ENV				= export LM_LICENSE_FILE=$(MODELTECH_LICENCE); export LD_LIBRARY_PATH=$(MODELTECH)/gcc*/lib
 MODELTECH_ENV				= export LM_LICENSE_FILE=$(MODELTECH_LICENCE)
 MODELTECH_BIN				= $(MODELTECH)/bin
 MODELTECH_VLIB				= $(MODELTECH_ENV); $(MODELTECH_BIN)/vlib
 MODELTECH_VCOM				= $(MODELTECH_ENV); $(MODELTECH_BIN)/vcom
-MODELTECH_VSIM				= $(MODELTECH_ENV); $(MODELTECH_BIN)/vsim -c -do "run -all; quit"
+MODELTECH_VSIM				= $(MODELTECH_ENV); $(MODELTECH_BIN)/vsim -c -do 'run -all; quit'
 MODELTECH_VMAP				= $(MODELTECH_ENV); $(MODELTECH_BIN)/vmap
+MODELTECH_SCCOM				= $(MODELTECH_ENV); $(MODELTECH_BIN)/sccom -vv -verbose
+MODELTECH_SCGENMOD                      = $(MODELTECH_ENV); $(MODELTECH_BIN)/scgenmod -sc_logic -sc_lv
+MODELTECH_CXX                           = $(MODELTECH)/gcc*/bin/g++
+MODELTECH_CC                            = $(MODELTECH)/gcc*/bin/gcc
+
+SYSTEMC_INCDIR_modelsim			= -I$(MODELTECH)/include/systemc/ -I$(MODELTECH)/include/
+SYSTEMC_LIBDIR_modelsim			= -L$(MODELTECH)/gcc-4.0.2-rhe21/lib/
+SYSTEMC_LIBNAME_modelsim		=
+SYSTEMC_CXX_modelsim			= $(CC_PREFIX) $(MODELTECH_CXX)
+SYSTEMC_CC_modelsim			= $(CC_PREFIX) $(MODELTECH_CC)
+SYSTEMC_CFLAGS_modelsim			=
+SYSTEMC_EXEC_PARAMS_modelsim		=
 
 #-----[ or1k ]---------------------------------------------
Index: trunk/Makefile.tools_path
===================================================================
--- trunk/Makefile.tools_path	(revision 112)
+++ trunk/Makefile.tools_path	(revision 113)
@@ -15,4 +15,5 @@
 #SYSTEMC_systemcass_deps 		= $(SYSTEMC_systemcass)
 #XILINX					= /home/data/Tools/Xilinx91i
+#XILINX_CORELIB                         = /dsk/l1/misc/XilinxCoreLib
 #MODELTECH				= /home/data/Tools/modelsim/modeltech-6.2b
 #MODELTECH_LICENCE			= /home/data/Tools/modelsim/license/license_modelsim-SE-6.2b
@@ -29,8 +30,9 @@
 SYSTEMC_systemcass_deps 		= $(SYSTEMC_systemcass)
 XILINX					= /users/chaos/Xilinx92i
+XILINX_CORELIB                          = /dsk/l1/misc/XilinxCoreLib
 MODELTECH				= /users/outil/m1archi/M2/modeltech
 MODELTECH_LICENCE			= /users/soft/mentor/mgls_v8-5_0-5-0.ss5/etc/cust/mgc/license.anacad.2008
 OR1K					= /users/cao/kane/Softwares/or32-elf
-NEWLIB					= /users/cao/kane/Softwares/newlib/or32-elf
+NEWLIB					= /users/chaos/kane/Softwares/newlib/or32-elf
 QT					= /dsk/l1/misc/kane/qt-x11-opensource-4.2.3
 
Index: trunk/Platforms/Test/Makefile
===================================================================
--- trunk/Platforms/Test/Makefile	(revision 112)
+++ trunk/Platforms/Test/Makefile	(revision 113)
@@ -29,4 +29,5 @@
 #----------------------------------------------------------
 ENTITY				=	Test
+SIMULATOR			=	modelsim
 
 DIR_TMP				=	$(MORPHEO_TMP)
@@ -34,4 +35,5 @@
 DIR_SRC				=	src
 DIR_OBJ				=	$(DIR_TMP)/obj
+DIR_LIB				=	$(DIR_TMP)/lib
 DIR_BIN				=	$(DIR_TMP)/bin
 DIR_LOG				=	$(DIR_TMP)/log
@@ -57,5 +59,6 @@
 #----------------------------------------------------------
 
-OBJECTS				=	$(patsubst $(DIR_SRC)/%.cpp,$(DIR_OBJ)/%.o,$(wildcard $(DIR_SRC)/*.cpp))
+SOURCES				=	$(wildcard $(DIR_SRC)/*.cpp)
+OBJECTS				=	$(patsubst $(DIR_SRC)/%.cpp,$(DIR_OBJ)/%.o,$(SOURCES))
 LOGS				=	$(patsubst $(DIR_DATA_TEST)/%.cfg,$(DIR_LOG)/%.log,$(wildcard $(DIR_DATA_TEST)/*.cfg))
 BENCHS				=	$(patsubst $(DIR_DATA_BENCH)/%.cfg,$(DIR_LOG)/%.log,$(wildcard $(DIR_DATA_BENCH)/*.cfg))
@@ -73,7 +76,11 @@
 					-I$(DIR_INC)                          
 
+#LIBDIR				=	$(SYSTEMC_LIBDIR_$(SIMULATOR))		\
+#					$(ENVIRONMENT_LIBDIR)			\
+#					$(MORPHEO_LIBDIR)			
+
+# FIXME !!!
 LIBDIR				=	$(SYSTEMC_LIBDIR_$(SIMULATOR))		\
-					$(ENVIRONMENT_LIBDIR)			\
-					$(MORPHEO_LIBDIR)			
+					-L$(DIR_LIB)
 
 LIBNAME				=	$(ENVIRONMENT_LIBNAME)			\
@@ -99,12 +106,26 @@
 .PRECIOUS			: $(DIR_OBJ)/%.o $(DIR_BIN)/%.x $(DIR_LOG)/%.log
 
-all				: $(DIR_OBJ) $(DIR_BIN)
-				@\
-				$(MAKE) $(EXEC)
-
-$(DIR_BIN)/%.x			: $(OBJECTS)
-				@\
-				$(ECHO) "Compilation        : $*";\
-				$(CXX) $(PLATFORMS_L_FLAGS)      -o $@ $^ $(LIBNAME);
+all				: $(EXEC)
+
+$(DIR_BIN)/%.x			:  $(DIR_OBJ) $(DIR_BIN)
+				@\
+				$(ECHO) "Linkage            : $*";\
+				case "${SIMULATOR}" in								\
+				    "modelsim")									\
+					$(MAKE) $(WORK_NAME);							\
+					$(MODELTECH_SCCOM) $(PLATFORMS_CXX_FLAGS) $(SOURCES); 			\
+					$(MODELTECH_SCCOM) -link $(PLATFORMS_L_FLAGS) $(LIBNAME);		\
+					$(ECHO) "#!$(SHELL)"                                              > $@;	\
+					$(ECHO) "cd $${PWD};"                                            >> $@;	\
+					$(ECHO) "$(MODELTECH_VSIM) -sc_arg "'"$${*}"'" $(WORK_NAME).top;" >> $@;\
+					$(ECHO) "cd -;"                                                  >> $@;	\
+					$(CHMOD) +x $@;								\
+					;;									\
+				    *)										\
+					$(MAKE) $(OBJECTS);							\
+					$(CXX) $(PLATFORMS_L_FLAGS) -o $@ $(OBJECTS) $(LIBNAME);		\
+					;;									\
+				esac;										\
+
 
 test				: $(DIR_LOG) all
@@ -141,4 +162,6 @@
 execute				: bench
 
+#				$(ECHO) $${data} | $(EXEC_PREFIX) $(EXEC) &> $$log;	\
+
 $(DIR_LOG)/%.log		: %.cfg
 				@\
@@ -158,5 +181,4 @@
 				fi;							\
 
-
 #-----[ Library + Software ]-------------------------------
 
@@ -177,19 +199,9 @@
 				$(CXX) $(PLATFORMS_CXX_FLAGS) -c -o $@ $<;
 
-$(DIR_OBJ)			:
+$(DIR_OBJ) $(DIR_BIN) $(DIR_LOG) :
 				@\
 				$(ECHO) "Create directory   : $@";\
 				$(MKDIR) $@
 
-$(DIR_BIN)			:
-				@\
-				$(ECHO) "Create directory   : $@";\
-				$(MKDIR) $@
-
-$(DIR_LOG)			:
-				@\
-				$(ECHO) "Create directory   : $@";\
-				$(MKDIR) $@
-
 #-----[ Clean + help ]-------------------------------------
 
@@ -197,10 +209,18 @@
 				@\
 				$(ECHO) "Delete     temporary files in directory $(PWD)";\
-				$(RM) 	*~ $(DIR_SRC)/*~ $(DIR_INC)/*~ $(DIR_DATA_TEST)/*~ $(DIR_DATA_BENCH)/*~ *core* tty* *.vhdl *.log *.stat *.pos\
-					$(DIR_OBJ) $(DIR_BIN) $(DIR_LOG);
+				$(RM) 	$(OBJECTS) $(EXEC) \
+					*~ $(DIR_SRC)/*~ $(DIR_INC)/*~ $(DIR_DATA_TEST)/*~ $(DIR_DATA_BENCH)/*~ \
+					*core* \
+					tty* \
+					*.vhdl \
+					*.log \
+					*.stat \
+					*.pos \
+					modelsim.ini transcript *wlf* $(WORK_NAME)
 
 clean_all			: clean
 				@\
 				$(ECHO) "Delete     generated files in directory $(PWD)";\
+				$(RM) $(DIR_OBJ) $(DIR_BIN) $(DIR_LOG);\
 				$(MAKE) --directory=$(DIR_SOFT)        --makefile=Makefile clean_all; \
 				$(MAKE) --directory=$(ENVIRONMENT_DIR) --makefile=Makefile clean_all; \
@@ -223,4 +243,5 @@
 				$(ECHO) "";
 
+include $(MORPHEO_TOPLEVEL)/IPs/systemC/processor/Morpheo/Behavioural/Makefile.Synthesis
 include $(MORPHEO_TOPLEVEL)/IPs/systemC/processor/Morpheo/Makefile.deps
 include $(MORPHEO_TOPLEVEL)/IPs/systemC/Environment/Makefile.deps
Index: trunk/Platforms/Test/include/test.h
===================================================================
--- trunk/Platforms/Test/include/test.h	(revision 112)
+++ trunk/Platforms/Test/include/test.h	(revision 113)
@@ -9,4 +9,5 @@
  */
 
+#include <systemc.h>
 #include "Morpheo.h"
 #include <iostream>
@@ -23,3 +24,10 @@
          );
 
+#ifdef MTI_SYSTEMC
+class top : public sc_module
+{
+//public : top (int argc, char * argv[]);
+  public : top (sc_module_name name);
+};
 #endif
+#endif
Index: trunk/Platforms/Test/src/sc_main.cpp
===================================================================
--- trunk/Platforms/Test/src/sc_main.cpp	(revision 112)
+++ trunk/Platforms/Test/src/sc_main.cpp	(revision 113)
@@ -12,8 +12,14 @@
 using namespace morpheo;
 
-void usage (int argc, char * argv[])
+void usage (int argc
+#ifdef MTI_SYSTEMC
+            ,const char * const * argv
+#else
+            ,char * argv[]
+#endif
+            )
 {
-  cerr <<  "<Usage> " << argv[0] << " list_params." << endl
-       <<  "list_params is :" << endl
+  cerr <<  "<Usage> " << argv[0] << endl
+       <<  "In input stream : " << endl
        <<  " * filename_simulator   (string  )" << endl
        <<  " * filename_generator   (string  )" << endl
@@ -27,19 +33,34 @@
 }
 
+#ifdef MTI_SYSTEMC
+SC_MODULE_EXPORT(top);
+
+top::top (sc_module_name name)
+#else
 int sc_main (int argc, char * argv[])
+#endif
 {
   cout << "<sc_main> Begin" << endl;
+
+#ifdef MTI_SYSTEMC
+  // accessing command-line arguments with modelsim
+  int argc;
+  const char * const * argv;
+
+  argc = sc_argc ();
+  argv = sc_argv ();
+#endif
 
   for (int32_t i=0; i<argc; ++i)
     cout << argv[i] << " ";
   cout << endl;
-
+  
   //==============================================================================
   //===== [ Parameters ]==========================================================
   //==============================================================================
-
+  
   if (argc != 9)
     usage (argc, argv);
-
+  
   uint32_t x = 1;
   string   filename_simulator = argv[x++];
@@ -51,4 +72,37 @@
   uint32_t cache_size         = fromString<uint32_t>(argv[x++]);
   uint32_t cache_ratio        = fromString<uint32_t>(argv[x++]);
+  
+//   string   filename_simulator;
+//   string   filename_generator;
+//   string   filename_instance ;
+//   string   filename_software ;
+//   uint32_t nb_cache_dedicated;
+//   uint32_t nb_cache_shared   ;
+//   uint32_t cache_size        ;
+//   uint32_t cache_ratio       ;
+
+//   cout <<  "get filename_simulator   ? " << endl;
+//   cin >> filename_simulator ;
+
+//   cout <<  "get filename_generator   ? " << endl;
+//   cin >> filename_generator ;
+
+//   cout <<  "get filename_instance    ? " << endl;
+//   cin >> filename_instance  ;
+
+//   cout <<  "get filename_software    ? " << endl;
+//   cin >> filename_software  ;
+
+//   cout <<  "get nb_cache_dedicated   ? " << endl;
+//   cin >> nb_cache_dedicated ;
+
+//   cout <<  "get nb_cache_shared      ? " << endl;
+//   cin >> nb_cache_shared    ;
+
+//   cout <<  "get size cache L1 (byte) ? " << endl;
+//   cin >> cache_size         ;
+
+//   cout <<  "get ratio cache          ? " << endl;
+//   cin >> cache_ratio        ;
 
   morpheo::behavioural::custom::custom_information_t (*get_custom_information) (void) = NULL;
@@ -64,6 +118,9 @@
                       get_custom_information);
 
+  cout << "  * return : " << _return << endl;  
   cout << "<sc_main> End" << endl;  
 
+#ifndef MTI_SYSTEMC
   return _return;
+#endif
 }
