Index: soft/giet_vm/applications/classif/classif.py
===================================================================
--- soft/giet_vm/applications/classif/classif.py	(revision 720)
+++ soft/giet_vm/applications/classif/classif.py	(revision 825)
@@ -12,7 +12,5 @@
 #  The mapping of threads on processors is the following:
 #    - the "main" on cluster[0][0]  
-#    - one "load" thread per cluster containing processors, 
-#    - one "store" thread per cluster containing processors, 
-#    - (nprocs-2) "analyse" thread per cluster containing processors.
+#    - one "analyse" thread per processor, 
 #  The mapping of virtual segments is the following:
 #    - There is one shared data vseg in cluster[0][0]
@@ -26,7 +24,4 @@
 #    - y_width   : number of bits for y field
 #    - nprocs    : number of processors per cluster
-#
-#  WARNING: The target architecture cannot contain less
-#           than 3 processors per cluster.
 ##################################################################################
 
@@ -40,6 +35,4 @@
     y_width   = mapping.y_width
 
-    assert (nprocs >= 3) and (nprocs <= 8)
-
     # define vsegs base & size
     code_base  = 0x10000000     
@@ -49,14 +42,14 @@
     data_size  = 0x00010000     # 64 Kbytes (non replicated) 
 
-    heap_base  = 0x30000000
-    heap_size  = 0x00200000     # 2M bytes (per cluster)      
+    stack_base = 0x30000000 
+    stack_size = 0x00010000     # 64 Kbytes (per thread)
 
-    stack_base = 0x40000000 
-    stack_size = 0x00010000     # 64 Kbytes (per thread)
+    heap_base  = 0x40000000     
+    heap_size  = 0x00200000     # 2 Mbytes (per cluster)
 
     # create vspace
     vspace = mapping.addVspace( name = 'classif', 
                                 startname = 'classif_data', 
-                                active = False )
+                                active = True )
     
     # data vseg : shared / cluster[0][0]
@@ -65,16 +58,4 @@
                      binpath = 'bin/classif/appli.elf',
                      local = False )
-
-    # heap vsegs : shared (one per cluster) 
-    for x in xrange (x_size):
-        for y in xrange (y_size):
-            cluster_id = (x * y_size) + y
-            if ( mapping.clusters[cluster_id].procs ):
-                size  = heap_size
-                base  = heap_base + (cluster_id * size)
-
-                mapping.addVseg( vspace, 'classif_heap_%d_%d' %(x,y), base , size, 
-                                 'C_WU', vtype = 'HEAP', x = x, y = y, pseg = 'RAM', 
-                                 local = False, big = True )
 
     # code vsegs : local (one copy per cluster)
@@ -110,9 +91,19 @@
                                      local = True )
 
+    # heap vsegs : distributed but non local (any heap can be accessed by any thread)
+    for x in xrange (x_size):
+        for y in xrange (y_size):
+            cluster_id = (x * y_size) + y
+            if ( mapping.clusters[cluster_id].procs ):
+                base       = heap_base + (cluster_id * heap_size)
+
+                mapping.addVseg( vspace, 'classif_heap_%d_%d' % (x,y), base, heap_size,
+                                 'C_WU' , vtype = 'HEAP' , x = x , y = y , pseg = 'RAM',
+                                 local = False, big = True )
+
     # distributed threads / one thread per processor
     # ... plus main on P[0][0][0]
-    mapping.addThread( vspace, 'main', True, 0, 0, 1,
-                       'main_stack',
-                       'classif_heap_0_0',
+    mapping.addThread( vspace, 'main', True, 0, 0, 0,
+                       'main_stack', '' ,
                        0 )                      # index in start_vector
 
@@ -122,18 +113,11 @@
             if ( mapping.clusters[cluster_id].procs ):
                 for p in xrange( nprocs ):
-                    if  ( p== 0 ):                              # thread load
-                        start_index = 3
-                        thread_name = 'load_%d_%d_%d' %(x,y,p)            
-                    elif  ( p== 1 ):                            # thread store
-                        start_index = 2
-                        thread_name = 'stor_%d_%d_%d' %(x,y,p)            
-                    else :                                      # thread analyse
-                        start_index = 1
-                        thread_name = 'anal_%d_%d_%d' % (x,y,p)
+                    start_index = 1
+                    thread_name = 'analyse_%d_%d_%d' % (x,y,p)
 
                     mapping.addThread( vspace, thread_name, False , x, y, p,
-                                       'classif_stack_%d_%d_%d' % (x,y,p), 
+                                       'classif_stack_%d_%d_%d' % (x,y,p),
                                        'classif_heap_%d_%d' % (x,y),
-                                       start_index )  
+                                        1 )      # index in start_vector
 
     # extend mapping name
