Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Allocation.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Allocation.h	(revision 137)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Allocation.h	(revision 139)
@@ -413,5 +413,5 @@
     } while (0)
 
-#define ALLOC1_SIGNAL_IN( sig, name, type, size)                        \
+#define ALLOC1_SIGNAL_IN_COND( sig, name, type, size, cond)             \
   do                                                                    \
     {                                                                   \
@@ -419,16 +419,19 @@
       for (uint32_t it1=0; it1<iterator_1; it1++)                       \
         {                                                               \
-          if (size > 0)                                                 \
-            {                                                           \
-              sig [it1] = interface[it1]->set_signal_in <type> (name, size); \
-            }                                                           \
-          else                                                          \
-            {                                                           \
-              PRINT_SIZE_NUL(_component,interface[it1],name);           \
-            }                                                           \
-        }                                                               \
-    } while (0)
-
-#define ALLOC1_SIGNAL_OUT(sig, name, type, size)                        \
+          if (cond)                                                     \
+            {                                                           \
+              if (size > 0)                                             \
+                {                                                       \
+                  sig [it1] = interface[it1]->set_signal_in <type> (name, size); \
+                }                                                       \
+              else                                                      \
+                {                                                       \
+                  PRINT_SIZE_NUL(_component,interface[it1],name);       \
+                }                                                       \
+            }                                                           \
+        }                                                               \
+    } while (0)
+
+#define ALLOC1_SIGNAL_OUT_COND(sig, name, type, size, cond)             \
   do                                                                    \
     {                                                                   \
@@ -436,27 +439,38 @@
       for (uint32_t it1=0; it1<iterator_1; it1++)                       \
         {                                                               \
-          if (size > 0)                                                 \
-            {                                                           \
-              sig [it1] = interface[it1]->set_signal_out<type> (name, size); \
-            }                                                           \
-          else                                                          \
-            {                                                           \
-              PRINT_SIZE_NUL(_component,interface[it1],name);           \
-            }                                                           \
-        }                                                               \
-    } while (0)
-
-#define DELETE1_SIGNAL(sig, x1, size)                                   \
-  do                                                                    \
-    {                                                                   \
-      for (uint32_t it1=0; it1<x1; it1++)                               \
-        {                                                               \
-          if (size > 0)                                                 \
-            {                                                           \
-              delete sig[it1];                                          \
+          if (cond)                                                     \
+            {                                                           \
+              if (size > 0)                                             \
+                {                                                       \
+                  sig [it1] = interface[it1]->set_signal_out<type> (name, size); \
+                }                                                       \
+              else                                                      \
+                {                                                       \
+                  PRINT_SIZE_NUL(_component,interface[it1],name);       \
+                }                                                       \
+            }                                                           \
+        }                                                               \
+    } while (0)
+
+#define ALLOC1_SIGNAL_IN( sig, name, type, size) ALLOC1_SIGNAL_IN_COND( sig, name, type, size,true)
+#define ALLOC1_SIGNAL_OUT(sig, name, type, size) ALLOC1_SIGNAL_OUT_COND(sig, name, type, size,true)
+
+#define DELETE1_SIGNAL_COND(sig, x1, size, cond)                        \
+  do                                                                    \
+    {                                                                   \
+      for (uint32_t it1=0; it1<x1; it1++)                               \
+        {                                                               \
+          if (cond)                                                     \
+            {                                                           \
+              if (size > 0)                                             \
+                {                                                       \
+                  delete sig[it1];                                      \
+                }                                                       \
             }                                                           \
         }                                                               \
       delete [] sig;                                                    \
     } while (0)
+
+#define DELETE1_SIGNAL(sig, x1, size) DELETE1_SIGNAL_COND(sig, x1, size, true)
 
 #define ALLOC1_FOREIGN_SIGNAL_IN(sig, interface, name, type, size,x1)   \
@@ -661,5 +675,5 @@
     } while (0)
 
-#define _ALLOC2_SIGNAL_IN( sig, name, type, size, x1, x2)               \
+#define _ALLOC2_SIGNAL_IN_COND( sig, name, type, size, x1, x2, cond)    \
   do                                                                    \
     {                                                                   \
@@ -670,17 +684,20 @@
           for (uint32_t it2=0; it2<x2; it2++)                           \
             {                                                           \
-              if (size > 0)                                             \
-                {                                                       \
-                  sig [it1][it2] = interface[it1][it2]->set_signal_in <type> (name, size); \
-                }                                                       \
-              else                                                      \
-                {                                                       \
-                  PRINT_SIZE_NUL(_component,interface[it1][it2],name);  \
-                }                                                       \
-            }                                                           \
-        }                                                               \
-    } while (0)
-
-#define _ALLOC2_SIGNAL_OUT( sig, name, type, size, x1, x2)              \
+              if (cond)                                                 \
+                {                                                       \
+                  if (size > 0)                                         \
+                    {                                                   \
+                      sig [it1][it2] = interface[it1][it2]->set_signal_in <type> (name, size); \
+                    }                                                   \
+                  else                                                  \
+                    {                                                   \
+                      PRINT_SIZE_NUL(_component,interface[it1][it2],name); \
+                    }                                                   \
+                }                                                       \
+            }                                                           \
+        }                                                               \
+    } while (0)
+
+#define _ALLOC2_SIGNAL_OUT_COND( sig, name, type, size, x1, x2, cond)   \
   do                                                                    \
     {                                                                   \
@@ -691,33 +708,42 @@
           for (uint32_t it2=0; it2<x2; it2++)                           \
             {                                                           \
-              if (size > 0)                                             \
-                {                                                       \
-                  sig [it1][it2] = interface[it1][it2]->set_signal_out <type> (name, size); \
-                }                                                       \
-              else                                                      \
-                {                                                       \
-                  PRINT_SIZE_NUL(_component,interface[it1][it2],name);  \
-                }                                                       \
-            }                                                           \
-        }                                                               \
-    } while (0)
-
-#define ALLOC2_VAL_ACK_IN( sig, name, type      ) _ALLOC2_VAL_ACK_IN( sig, name, type      , iterator_1, iterator_2) 
-#define ALLOC2_VAL_ACK_OUT(sig, name, type      ) _ALLOC2_VAL_ACK_OUT(sig, name, type      , iterator_1, iterator_2) 
-#define ALLOC2_VALACK_IN(  sig,       type      ) _ALLOC2_VALACK_IN(  sig,       type      , iterator_1, iterator_2) 
-#define ALLOC2_VALACK_OUT( sig,       type      ) _ALLOC2_VALACK_OUT( sig,       type      , iterator_1, iterator_2) 
-#define ALLOC2_SIGNAL_IN(  sig, name, type, size) _ALLOC2_SIGNAL_IN(  sig, name, type, size, iterator_1, iterator_2) 
-#define ALLOC2_SIGNAL_OUT( sig, name, type, size) _ALLOC2_SIGNAL_OUT( sig, name, type, size, iterator_1, iterator_2) 
-
-#define DELETE2_SIGNAL(sig, x1,x2, size)                                \
-  do                                                                    \
-    {                                                                   \
-      for (uint32_t it1=0; it1<x1; it1++)                               \
-        {                                                               \
-          for (uint32_t it2=0; it2<x2; it2++)                           \
-            {                                                           \
-              if (size > 0)                                             \
-                {                                                       \
-                  delete sig[it1][it2];                                 \
+              if (cond)                                                 \
+                {                                                       \
+                  if (size > 0)                                         \
+                    {                                                   \
+                      sig [it1][it2] = interface[it1][it2]->set_signal_out <type> (name, size); \
+                    }                                                   \
+                  else                                                  \
+                    {                                                   \
+                      PRINT_SIZE_NUL(_component,interface[it1][it2],name); \
+                    }                                                   \
+                }                                                       \
+            }                                                           \
+        }                                                               \
+    } while (0)
+
+#define _ALLOC2_SIGNAL_IN( sig, name, type, size, x1, x2) _ALLOC2_SIGNAL_IN_COND( sig, name, type, size, x1, x2,true)
+#define _ALLOC2_SIGNAL_OUT(sig, name, type, size, x1, x2) _ALLOC2_SIGNAL_OUT_COND(sig, name, type, size, x1, x2,true)
+
+#define ALLOC2_VAL_ACK_IN( sig, name, type      )         _ALLOC2_VAL_ACK_IN( sig, name, type      , iterator_1, iterator_2) 
+#define ALLOC2_VAL_ACK_OUT(sig, name, type      )         _ALLOC2_VAL_ACK_OUT(sig, name, type      , iterator_1, iterator_2) 
+#define ALLOC2_VALACK_IN(  sig,       type      )         _ALLOC2_VALACK_IN(  sig,       type      , iterator_1, iterator_2) 
+#define ALLOC2_VALACK_OUT( sig,       type      )         _ALLOC2_VALACK_OUT( sig,       type      , iterator_1, iterator_2) 
+#define ALLOC2_SIGNAL_IN(  sig, name, type, size)         _ALLOC2_SIGNAL_IN(  sig, name, type, size, iterator_1, iterator_2) 
+#define ALLOC2_SIGNAL_OUT( sig, name, type, size)         _ALLOC2_SIGNAL_OUT( sig, name, type, size, iterator_1, iterator_2) 
+
+#define DELETE2_SIGNAL_COND(sig, x1,x2, size, cond)                     \
+  do                                                                    \
+    {                                                                   \
+      for (uint32_t it1=0; it1<x1; it1++)                               \
+        {                                                               \
+          for (uint32_t it2=0; it2<x2; it2++)                           \
+            {                                                           \
+              if (cond)                                                 \
+                {                                                       \
+                  if (size > 0)                                         \
+                    {                                                   \
+                      delete sig[it1][it2];                             \
+                    }                                                   \
                 }                                                       \
             }                                                           \
@@ -726,4 +752,6 @@
       delete [] sig;                                                    \
     } while (0)
+
+#define DELETE2_SIGNAL(sig, x1,x2, size) DELETE2_SIGNAL_COND(sig, x1,x2, size,true)
 
 #define ALLOC2_FOREIGN_SIGNAL_IN( sig, interface, name, type, size, x1, x2) \
