Index: soft/giet_vm/map.xml
===================================================================
--- soft/giet_vm/map.xml	(revision 161)
+++ soft/giet_vm/map.xml	(revision 165)
@@ -5,12 +5,12 @@
                 clusters = "1"
                 psegs    = "9"
-                ttys     = "9"
-                vspaces  = "4" 
+                ttys     = "7"
+                fbs      = "0"
+                vspaces  = "3" 
                 globals  = "13" >
 
         <clusterset>
-                <cluster procs  = "4"
-                         timers = "4"
-                         dmas   = "4" />
+                <cluster index  = "0"
+                         procs  = "4" />
         </clusterset>
 
@@ -59,9 +59,8 @@
                         psegname  = "PSEG_ROM" 
                         ident	  = "1" >
-					<vobj   name	= "seg_boot"
-							type	= "ELF"
-							length  = "0x00008000" 
-							binpath	= "build/boot.elf"
-							/>
+					    <vobj   name	= "seg_boot"
+					    		type	= "ELF"
+					    		length  = "0x00008000" 
+					    		binpath	= "build/boot.elf" />
 				</vseg>
 
@@ -71,7 +70,7 @@
                         psegname  = "PSEG_ROM"
                         ident	  = "1" >
-					<vobj   name	= "boot_stack"
-							type	= "BUFFER"
-							length  = "0x00004000" />
+    					<vobj   name	= "boot_stack"
+    							type	= "BUFFER"
+    							length  = "0x00004000" />
 				</vseg>
 
@@ -81,9 +80,8 @@
                         psegname  = "PSEG_ROM"
                         ident	  = "1" >
-					<vobj   name	= "seg_mapping"
-							type	= "ELF"
-							length  = "0x00004000" 
-							binpath	= "map.bin"
-							/>
+    					<vobj   name	= "seg_mapping"
+    							type	= "ELF"
+    							length  = "0x00004000" 
+    							binpath	= "map.bin" />
 				</vseg>
 
@@ -105,9 +103,8 @@
                         psegname  = "PSEG_RAK"
                         ident	  = "1" >
-					<vobj   name	= "seg_kernel_data"
-							type	= "ELF"
-							length  = "0x00010000" 
-							binpath	= "build/sys.elf"
-							/>
+    					<vobj   name	= "seg_kernel_data"
+    							type	= "ELF"
+    							length  = "0x00010000" 
+    							binpath	= "build/sys.elf" />
 				</vseg>
 
@@ -117,9 +114,8 @@
                         psegname  = "PSEG_RAK"
                         ident	  = "1" >
-					<vobj   name	= "seg_kernel_uncdata"
-							type	= "ELF"
-							length  = "0x00010000" 
-							binpath	= "build/sys.elf"
-							/>
+					    <vobj   name	= "seg_kernel_uncdata"
+						    	type	= "ELF"
+							    length  = "0x00010000" 
+						    	binpath	= "build/sys.elf" />
 				</vseg>
 
@@ -129,9 +125,8 @@
                         psegname  = "PSEG_RAK"
                         ident	  = "1" >
-					<vobj   name	= "seg_kernel_init"
-							type	= "ELF"
-							length  = "0x00010000" 
-							binpath	= "build/sys.elf"
-							/>
+    					<vobj   name	= "seg_kernel_init"
+	    						type	= "ELF"
+		    					length  = "0x00010000" 
+			    				binpath	= "build/sys.elf" />
 				</vseg>
 
@@ -142,7 +137,7 @@
                         psegname  = "PSEG_TTY"
                         ident	  = "1" >
-					<vobj   name	= "tty"
-							type	= "PERI"
-							length  = "0x00000100" />
+    					<vobj   name	= "tty"
+	    						type	= "PERI"
+		    					length  = "0x00000100" />
 				</vseg>
 
@@ -152,7 +147,7 @@
                         psegname  = "PSEG_TIM"
                         ident	  = "1" >
-					<vobj   name	= "timer"
-							type	= "PERI"
-							length  = "0x00000080" />
+    					<vobj   name	= "timer"
+	    						type	= "PERI"
+		    					length  = "0x00000080" />
 				</vseg>
 
@@ -162,7 +157,7 @@
                         psegname  = "PSEG_IOC"
                         ident	  = "1" >
-					<vobj   name	= "ioc"
-							type	= "PERI"
-							length  = "0x00000020" />
+			    		<vobj   name	= "ioc"
+				    			type	= "PERI"
+					    		length  = "0x00000020" />
 				</vseg>
 
@@ -172,7 +167,7 @@
                         psegname  = "PSEG_DMA"
                         ident	  = "1" >
-					<vobj   name	= "dma"
-							type	= "PERI"
-							length  = "0x00000100" />
+    					<vobj   name	= "dma"
+	    						type	= "PERI"
+		    					length  = "0x00000100" />
 				</vseg>
 
@@ -182,7 +177,7 @@
                         psegname  = "PSEG_FBF"
                         ident	  = "1" >
-					<vobj   name	= "fb"
-							type	= "PERI"
-							length  = "0x00004000" />
+			    		<vobj   name	= "fb"
+				    			type	= "PERI"
+					    		length  = "0x00004000" />
 				</vseg>
 
@@ -192,25 +187,22 @@
                         psegname  = "PSEG_ICU"
                         ident	  = "1" >
-					<vobj   name	= "icu"
-							type	= "PERI"
-							length  = "0x00000100" />
+    					<vobj   name	= "icu"
+	    						type	= "PERI"
+		    					length  = "0x00000100" />
 				</vseg>
           </globalset> 
 
           <vspaceset>
-                <vspace name    = "router"
-                        funcs   = "seg_data_router"
-                        ttys    = "4" >
+                <vspace name      = "router"
+                        startname = "seg_data_router" >
 
                         <vseg   name      = "seg_data_router"
                                 vbase     = "0x00800000" 
                                 mode      = "__WU"
-                                psegname  = "PSEG_RAU"
-                                ident	  = "0" >
-							<vobj   name	= "seg_data_router"
-									type	= "ELF"
-									length  = "0x00010000" 
-                                    binpath = "build/router.elf"
-									/>
+                                psegname  = "PSEG_RAU" >
+							    <vobj   name	= "seg_data_router"
+								    	type	= "ELF"
+					    				length  = "0x00010000" 
+                                        binpath = "build/router.elf" />
 						</vseg>
 
@@ -218,11 +210,9 @@
                                 vbase     = "0x00400000" 
                                 mode      = "CX_U"
-                                psegname  = "PSEG_RAU"
-                                ident	  = "0" >
-							<vobj   name	= "seg_code_router"
-									type	= "ELF"
-									length  = "0x00010000" 
-                                    binpath = "build/router.elf"
-									/>
+                                psegname  = "PSEG_RAU" >
+							    <vobj   name	= "seg_code_router"
+								    	type	= "ELF"
+									    length  = "0x00010000" 
+                                        binpath = "build/router.elf" />
 						</vseg>
 
@@ -230,11 +220,9 @@
                                 vbase     = "0x00300000" 
                                 mode      = "C___"
-                                psegname  = "PSEG_RAU"
-                                ident	  = "0" >
-                            <vobj   name	= "ptab"
-                                    type	= "PTAB"
-                                    length  = "0x00010000" 
-                                    align   = "13"
-                                    />
+                                psegname  = "PSEG_RAU" >
+                                <vobj   name	= "ptab_router"
+                                        type	= "PTAB"
+                                        length  = "0x00010000" 
+                                        align   = "13" />
                         </vseg>
 
@@ -243,7 +231,7 @@
                                 mode      = "C_WU"
                                 psegname  = "PSEG_RAU" >
-							<vobj   name	= "stack_producer"
-									type	= "BUFFER"
-									length  = "0x00010000" />
+							    <vobj   name	= "stack_producer"
+								    	type	= "BUFFER"
+									    length  = "0x00010000" />
 						</vseg>
 
@@ -252,7 +240,7 @@
                                 mode      = "C_WU"
                                 psegname  = "PSEG_RAU" >
-							<vobj   name	= "stack_consumer"
-									type	= "BUFFER"
-									length  = "0x00010000" />
+							    <vobj   name	= "stack_consumer"
+								    	type	= "BUFFER"
+									    length  = "0x00010000" />
 						</vseg>
 
@@ -261,7 +249,7 @@
                                 mode      = "C_WU"
                                 psegname  = "PSEG_RAU" >
-							<vobj   name	= "stack_router_A"
-									type	= "BUFFER"
-									length  = "0x00010000" />
+							    <vobj   name	= "stack_router_A"
+								    	type	= "BUFFER"
+									    length  = "0x00010000" />
 						</vseg>
 
@@ -270,25 +258,19 @@
                                 mode      = "C_WU"
                                 psegname  = "PSEG_RAU" >
-							<vobj   name	= "stack_router_B"
-									type	= "BUFFER"
-									length  = "0x00010000" />
-						</vseg>
-
-                        <vseg   name      = "seg_mwmr_in"
+							    <vobj   name	= "stack_router_B"
+								    	type	= "BUFFER"
+									    length  = "0x00010000" />
+						</vseg>
+
+                        <vseg   name      = "seg_mwmr_channels"
                                 vbase     = "0x00050000"
                                 mode      = "__WU"
                                 psegname  = "PSEG_RAU" >
-							<vobj   name	= "mwmr_in"
-									type	= "MWMR"
-									length  = "0x00000020"/>
-						</vseg>
-
-                        <vseg   name      = "seg_mwmr_out"
-                                vbase     = "0x00060000"
-                                mode      = "__WU"
-                                psegname  = "PSEG_RAU">
-							<vobj   name	= "mwmr_out"
-									type	= "MWMR"
-									length  = "0x00000020"/>
+							    <vobj   name	= "mwmr_in"
+								    	type	= "MWMR"
+									    length  = "0x00000020" />
+							    <vobj   name	= "mwmr_out"
+								    	type	= "MWMR"
+									    length  = "0x00000020" />
 						</vseg>
 
@@ -298,5 +280,6 @@
                                 stackname = "stack_producer"
                                 startid   = "0"
-                                ttylocid  = "0" />
+                                usetty    = "1" />
+
                         <task   name      = "consumer"
                                 clusterid = "0"
@@ -304,5 +287,6 @@
                                 stackname = "stack_consumer"
                                 startid   = "1" 
-                                ttylocid  = "1" />
+                                usetty    = "1" />
+
                         <task   name      = "router_A"
                                 clusterid = "0"
@@ -310,5 +294,6 @@
                                 stackname = "stack_router_A"
                                 startid   = "2"
-                                ttylocid  = "2" />
+                                usetty    = "1" />
+
                         <task   name      = "router_B"
                                 clusterid = "0"
@@ -316,20 +301,18 @@
                                 stackname = "stack_router_B"
                                 startid   = "2"
-                                ttylocid  = "3" />
+                                usetty    = "1" />
                 </vspace>
 
-                <vspace name    = "hello" 
-                        funcs   = "seg_data_hello"
-                        ttys    = "1" >
+                <vspace name      = "hello" 
+                        startname = "seg_data_hello" >
 
                         <vseg   name      = "seg_data_hello"
                                 vbase     = "0x00800000" 
                                 mode      = "C_WU"
-                                psegname  = "PSEG_RAU"
-                                ident	  = "0" >
-							<vobj   name	= "seg_data_hello"
-									type	= "ELF"
-									length    = "0x00010000" 
-                                    binpath = "build/hello.elf"/>
+                                psegname  = "PSEG_RAU" >
+							    <vobj   name	= "seg_data_hello"
+								    	type	= "ELF"
+									    length    = "0x00010000" 
+                                        binpath = "build/hello.elf" />
 						</vseg>
 
@@ -337,10 +320,9 @@
                                 vbase     = "0x00400000" 
                                 mode      = "CX_U"
-                                psegname  = "PSEG_RAU"
-                                ident	  = "0" >
-							<vobj   name	= "seg_code_hello"
-									type	= "ELF"
-									length    = "0x00010000" 
-                                    binpath = "build/hello.elf"/>
+                                psegname  = "PSEG_RAU" >
+							    <vobj   name	= "seg_code_hello"
+								    	type	= "ELF"
+									    length    = "0x00010000" 
+                                        binpath = "build/hello.elf" />
 						</vseg>
 
@@ -348,11 +330,9 @@
                                 vbase     = "0x00300000" 
                                 mode      = "C___"
-                                psegname  = "PSEG_RAU"
-                                ident	  = "0" >
-                            <vobj   name	= "ptab"
-                                    type	= "PTAB"
-                                    length  = "0x00010000" 
-                                    align   = "13"
-                                    />
+                                psegname  = "PSEG_RAU" >
+                                <vobj   name	= "ptab"
+                                        type	= "PTAB"
+                                        length  = "0x00010000" 
+                                        align   = "13" />
                         </vseg>
 
@@ -361,7 +341,7 @@
                                 mode      = "C_WU"
                                 psegname  = "PSEG_RAU" >
-							<vobj   name	= "stack"
-									type	= "BUFFER"
-									length  = "0x00010000" />
+							    <vobj   name	= "stack"
+								    	type	= "BUFFER"
+									    length  = "0x00010000" />
 						</vseg>
 
@@ -372,20 +352,18 @@
                                 stackname = "stack"
                                 startid   = "0" 
-                                ttylocid  = "0" />
+                                usetty    = "1" />
                 </vspace>
 
-                <vspace name    = "pgcd" 
-                        funcs   = "seg_data_pgcd"
-                        ttys    = "1" >
+                <vspace name      = "pgcd" 
+                        startname = "seg_data_pgcd" >
 
                         <vseg   name      = "seg_data_pgcd"
                                 vbase     = "0x00800000" 
                                 mode      = "C_WU"
-                                psegname  = "PSEG_RAU"
-                                ident	  = "0" >
-							<vobj   name	= "seg_data_pgcd"
-									type	= "ELF"
-									length  = "0x00010000" 
-                                    binpath = "build/pgcd.elf" />
+                                psegname  = "PSEG_RAU" >
+							    <vobj   name	= "seg_data_pgcd"
+								    	type	= "ELF"
+									    length  = "0x00010000" 
+                                        binpath = "build/pgcd.elf" />
 						</vseg>
 
@@ -393,11 +371,9 @@
                                 vbase     = "0x00300000" 
                                 mode      = "C___"
-                                psegname  = "PSEG_RAU"
-                                ident	  = "0" >
-                            <vobj   name	= "ptab"
-                                    type	= "PTAB"
-                                    length  = "0x00010000" 
-                                    align   = "13"
-                                    />
+                                psegname  = "PSEG_RAU" >
+                                <vobj   name	= "ptab"
+                                        type	= "PTAB"
+                                        length  = "0x00010000" 
+                                        align   = "13" />
                         </vseg>
 
@@ -405,10 +381,9 @@
                                 vbase     = "0x00400000" 
                                 mode      = "CX_U"
-                                psegname  = "PSEG_RAU"
-                                ident	  = "0" >
-							<vobj   name	= "seg_code_pgcd"
-									type	= "ELF"
-									length  = "0x00010000" 
-                                    binpath = "build/pgcd.elf" />
+                                psegname  = "PSEG_RAU" >
+							    <vobj   name	= "seg_code_pgcd"
+								    	type	= "ELF"
+									    length  = "0x00010000" 
+                                        binpath = "build/pgcd.elf" />
 						</vseg>
 
@@ -417,9 +392,8 @@
                                 mode      = "C_WU"
                                 psegname  = "PSEG_RAU" >
-							<vobj   name	= "stack"
-									type	= "BUFFER"
-									length  = "0x00010000" />
-						</vseg>
-
+							    <vobj   name	= "stack"
+								    	type	= "BUFFER"
+									    length  = "0x00010000" />
+						</vseg>
 
                         <task   name      = "main_pgcd"
@@ -428,87 +402,5 @@
                                 stackname = "stack"
                                 startid   = "0" 
-                                ttylocid  = "0" />
-                </vspace>
-
-                <vspace name    = "numsplit"
-                        funcs   = "seg_data_numsplit"
-                        ttys    = "2" >
-
-                        <vseg   name      = "seg_data_numsplit"
-                                vbase     = "0x00800000" 
-                                mode      = "__WU"
-                                psegname  = "PSEG_RAU"
-                                ident	  = "0" >
-							<vobj   name	= "seg_data_numsplit"
-									type	= "ELF"
-									length  = "0x00010000" 
-                                    binpath = "build/numsplit.elf"
-									/>
-						</vseg>
-
-                        <vseg   name      = "seg_code_numsplit"
-                                vbase     = "0x00400000" 
-                                mode      = "CX_U"
-                                psegname  = "PSEG_RAU"
-                                ident	  = "0" >
-							<vobj   name	= "seg_code_numsplit"
-									type	= "ELF"
-									length  = "0x00010000" 
-                                    binpath = "build/numsplit.elf"
-									/>
-						</vseg>
-
-                        <vseg   name      = "seg_ptab"
-                                vbase     = "0x00300000" 
-                                mode      = "C___"
-                                psegname  = "PSEG_RAU"
-                                ident	  = "0" >
-                            <vobj   name	= "ptab"
-                                    type	= "PTAB"
-                                    length  = "0x00010000" 
-                                    align   = "13"
-                                    />
-                        </vseg>
-
-                        <vseg   name      = "seg_stack_producer"
-				                vbase     = "0x00010000" 
-                                mode      = "C_WU"
-                                psegname  = "PSEG_RAU" >
-							<vobj   name	= "stack_producer"
-									type	= "BUFFER"
-									length  = "0x00010000" />
-						</vseg>
-
-                        <vseg   name      = "seg_stack_consumer"
-				                vbase     = "0x00020000" 
-                                mode      = "C_WU"
-                                psegname  = "PSEG_RAU" >
-							<vobj   name	= "stack_consumer"
-									type	= "BUFFER"
-									length  = "0x00010000" />
-						</vseg>
-
-                        <vseg   name      = "seg_mwmr"
-                                vbase     = "0x00050000"
-                                mode      = "__WU"
-                                psegname  = "PSEG_RAU">
-							<vobj   name	= "mwmr"
-									type	= "MWMR"
-									length  = "0x00000080"/>
-						</vseg>
-
-                        <task   name      = "producer"
-                                clusterid = "0"
-                                proclocid = "0"
-                                stackname = "stack_producer"
-                                startid   = "0"
-                                ttylocid  = "1" />
-
-                        <task   name      = "consumer"
-                                clusterid = "0"
-                                proclocid = "1"
-                                stackname = "stack_consumer"
-                                startid   = "1" 
-                                ttylocid  = "0" />
+                                usetty    = "1" />
                 </vspace>
           </vspaceset>
