Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Allocation.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Allocation.h	(revision 73)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Allocation.h	(revision 76)
@@ -41,11 +41,13 @@
   }									
 #define ALLOC_SIGNAL_IN(  sig, name, type, size)			\
-  {									\
-    sig = interface->set_signal_in <type> (name, size);			\
-  }									
+  if (size > 0)								\
+    {									\
+      sig = interface->set_signal_in <type> (name, size);		\
+    }									
 #define ALLOC_SIGNAL_OUT( sig, name, type, size)			\
-  {									\
-    sig = interface->set_signal_out<type> (name, size);			\
-  }
+  if (size > 0)								\
+    {									\
+      sig = interface->set_signal_out<type> (name, size);		\
+    }
 
 #define ALLOC_SC_SIGNAL(  sig, name, type)		                \
@@ -61,8 +63,9 @@
 #ifdef POSITION
 #define ALLOC1_INTERFACE( name, direction, localisation, str, it1)	\
-  Interface_fifo * interface [it1];					\
+  const uint32_t iterator_1 = it1;					\
+  Interface_fifo * interface [iterator_1];				\
   {									\
     std::string      separator="_";					\
-    for (uint32_t i=0; i<it1; i++)					\
+    for (uint32_t i=0; i<iterator_1; i++)				\
       {									\
 	interface [i] = _interfaces->set_interface( name+separator+toString(i), direction, localisation, str); \
@@ -71,8 +74,9 @@
 #else
 #define ALLOC1_INTERFACE( name, direction, localisation, str, it1)	\
-  Interface_fifo * interface [it1];					\
+  const uint32_t iterator_1 = it1;					\
+  Interface_fifo * interface [iterator_1];				\
   {									\
     std::string      separator="_";					\
-    for (uint32_t i=0; i<it1; i++)					\
+    for (uint32_t i=0; i<iterator_1; i++)				\
       {									\
 	interface [i] = _interfaces->set_interface( name+separator+toString(i)); \
@@ -82,69 +86,71 @@
 
 
-#define ALLOC1_VALACK_IN( sig, name, type, it1)				\
+#define ALLOC1_VALACK_IN( sig, name, type)				\
   {									\
-    sig = new SC_IN (Tcontrol_t) * [it1];				\
-    for (uint32_t i=0; i<it1; i++)					\
+    sig = new SC_IN (Tcontrol_t) * [iterator_1];			\
+    for (uint32_t i=0; i<iterator_1; i++)				\
       {									\
 	sig [i] = interface[i]->set_signal_valack_in (name, type);	\
       }									\
   }
-#define ALLOC1_VALACK_OUT(sig, name, type, it1)				\
+#define ALLOC1_VALACK_OUT(sig, name, type)				\
   {									\
-    sig = new SC_OUT(Tcontrol_t) * [it1];				\
-    for (uint32_t i=0; i<it1; i++)					\
+    sig = new SC_OUT(Tcontrol_t) * [iterator_1];			\
+    for (uint32_t i=0; i<iterator_1; i++)				\
       {									\
 	sig [i] = interface[i]->set_signal_valack_out(name, type);	\
       }									\
   }
-#define ALLOC1_VAL_IN(    sig, it1)					\
+#define ALLOC1_VAL_IN(    sig)						\
   {									\
-    sig = new SC_IN (Tcontrol_t) * [it1];				\
-    for (uint32_t i=0; i<it1; i++)					\
+    sig = new SC_IN (Tcontrol_t) * [iterator_1];			\
+    for (uint32_t i=0; i<iterator_1; i++)				\
       {									\
 	sig [i] = interface[i]->set_signal_valack_in (VAL);		\
       }									\
   }
-#define ALLOC1_VAL_OUT(   sig, it1)					\
+#define ALLOC1_VAL_OUT(   sig)						\
   {									\
-    sig = new SC_OUT(Tcontrol_t) * [it1];				\
-    for (uint32_t i=0; i<it1; i++)					\
+    sig = new SC_OUT(Tcontrol_t) * [iterator_1];			\
+    for (uint32_t i=0; i<iterator_1; i++)				\
       {									\
 	sig [i] = interface[i]->set_signal_valack_out(VAL);		\
       }									\
   }
-#define ALLOC1_ACK_IN(    sig, it1)					\
+#define ALLOC1_ACK_IN(    sig)						\
   {									\
-    sig = new SC_IN (Tcontrol_t) * [it1];				\
-    for (uint32_t i=0; i<it1; i++)					\
+    sig = new SC_IN (Tcontrol_t) * [iterator_1];			\
+    for (uint32_t i=0; i<iterator_1; i++)				\
       {									\
 	sig [i] = interface[i]->set_signal_valack_in (ACK);		\
       }									\
   }
-#define ALLOC1_ACK_OUT(   sig, it1)					\
+#define ALLOC1_ACK_OUT(   sig)						\
   {									\
-    sig = new SC_OUT(Tcontrol_t) * [it1];				\
-    for (uint32_t i=0; i<it1; i++)					\
+    sig = new SC_OUT(Tcontrol_t) * [iterator_1];			\
+    for (uint32_t i=0; i<iterator_1; i++)				\
       {									\
 	sig [i] = interface[i]->set_signal_valack_out(ACK);		\
       }									\
   }
-#define ALLOC1_SIGNAL_IN( sig, name, type, size, it1)			\
-  {									\
-    sig = new SC_IN (type) * [it1];					\
-    for (uint32_t i=0; i<it1; i++)					\
-      {									\
-	sig [i] = interface[i]->set_signal_in <type> (name, size);	\
-      }									\
-  }
+#define ALLOC1_SIGNAL_IN( sig, name, type, size)			\
+  if (size > 0)								\
+    {									\
+      sig = new SC_IN (type) * [iterator_1];				\
+      for (uint32_t i=0; i<iterator_1; i++)				\
+	{								\
+	  sig [i] = interface[i]->set_signal_in <type> (name, size);	\
+	}								\
+    }
 
-#define ALLOC1_SIGNAL_OUT(sig, name, type, size, it1)			\
-  {									\
-    sig = new SC_OUT(type) * [it1];					\
-    for (uint32_t i=0; i<it1; i++)					\
-      {									\
-	sig [i] = interface[i]->set_signal_out<type> (name, size);	\
-      }									\
-  }
+#define ALLOC1_SIGNAL_OUT(sig, name, type, size)			\
+  if (size > 0)								\
+    {									\
+      sig = new SC_OUT(type) * [iterator_1];				\
+      for (uint32_t i=0; i<iterator_1; i++)				\
+	{								\
+	  sig [i] = interface[i]->set_signal_out<type> (name, size);	\
+	}								\
+    }
 
 #define ALLOC1_SC_SIGNAL( sig, name, type, it1)				\
