Index: /trunk/softs/soft_filter_giet/ldscript
===================================================================
--- /trunk/softs/soft_filter_giet/ldscript	(revision 251)
+++ /trunk/softs/soft_filter_giet/ldscript	(revision 252)
@@ -10,9 +10,9 @@
 peripherals are not present in the architecture */
 
-NB_CLUSTERS		= 4;		/* number of clusters */
-NB_PROCS		= 4;		/* number of processors per cluster */
-NB_TASKS		= 1;		/* number of tasks per processor */
-NB_TIMERS       	= 1;		/* max number of timers per processor */
-NB_LOCKS        	= 8;		/* number of spin_locks */
+NB_CLUSTERS = 4;		/* number of clusters */
+NB_PROCS    = 4;		/* number of processors per cluster */
+NB_TASKS    = 1;		/* number of tasks per processor */
+NB_TIMERS   = 1;		/* max number of timers per processor */
+NB_LOCKS    = 8;		/* number of spin_locks */
 
 /* definition of the base address for all segments 
Index: /trunk/softs/soft_filter_giet/main.c
===================================================================
--- /trunk/softs/soft_filter_giet/main.c	(revision 251)
+++ /trunk/softs/soft_filter_giet/main.c	(revision 252)
@@ -16,5 +16,5 @@
 #define FRAME_SIZE     ((NB_PIXELS) * (PIXEL_SIZE))
 
-#define PRINTF(...)      ({ if (proc_id == 1) { tty_printf(__VA_ARGS__); } })
+#define PRINTF(...)      ({ if (proc_id == 0) { tty_printf(__VA_ARGS__); } })
 
 #define TA(c,l,p)  (A[c][((NP) * (l)) + (p)])
@@ -116,6 +116,4 @@
    PRINTF("\n*** Processor %d entering main at cycle %d ***\n\n", proc_id, proctime());
 
-   //*(unsigned int *) 0x60000000 = *(unsigned int *) 0x70000000;
-   //PRINTF("apres acces illegal\n");
 
    /////////////////////////
@@ -129,4 +127,9 @@
    }
 
+   ////////////////////////////////////////////////////////////////////////
+   // Warning: NB_CLUSTERS must be at least 4 because of the heap size;  //
+   //          if there are less clusters, the heap mixes with the stack //
+   //          (the total heap size must be at least 0x01000000)         //
+   ////////////////////////////////////////////////////////////////////////
    if ((nclusters !=  4) && (nclusters !=  8) && (nclusters != 16) && 
          (nclusters != 32) && (nclusters != 64) && (nclusters !=128) && (nclusters != 256)){
@@ -178,5 +181,5 @@
    for (c = 0; c < nclusters; c++){
       unsigned int offset = base + increment * c;
-      A[c] = (unsigned short *) (offset                             );
+      A[c] = (unsigned short *) (offset);
       B[c] = (int *)            (offset + frame_size * 1 / nclusters); // We increment by 2 * frame_size
       C[c] = (int *)            (offset + frame_size * 3 / nclusters); // because sizeof(int) = 2*sizeof(short)
@@ -426,15 +429,6 @@
          TZ(cluster_id,l,p) = (unsigned char) (((TD(cluster_id,l,p) + TC(cluster_id,l,p)) >> 8) & 0xFF);
       }
-      fb_sync_write(NP * (cluster_id * lines_per_cluster + l), &TZ(cluster_id,l,0), NP);
-   }
-
-#if 0
-   for (l = first; l < last; l++){
-      for (p = 0; p < NP; p++){
-         TA(cluster_id, l, p) = (unsigned char) ((TA(cluster_id, l, p) >> 8) & 0xFF);
-      }
-      fb_write(NP * (cluster_id * lines_per_cluster + l), &TA(cluster_id,l,0), NP);
-   }
-#endif
+      fb_write(NP * (cluster_id * lines_per_cluster + l), &TZ(cluster_id,l,0), NP);
+   }
 
    date  = proctime();
