Index: soft/giet_vm/map.xml
===================================================================
--- soft/giet_vm/map.xml	(revision 185)
+++ soft/giet_vm/map.xml	(revision 189)
@@ -2,8 +2,6 @@
 
 <mapping_info   signature = "0xdeadbeef" 
-                name     = "c1_v2_G12"
+                name     = "1C_4P_FOUR"
                 clusters = "1"
-                ttys     = "8"
-                fbs      = "1"
                 vspaces  = "4" 
                 globals  = "13" >
@@ -11,56 +9,222 @@
         <clusterset>
                 <cluster index  = "0" >
-                        <pseg    name   = "PSEG_ROM" 
-                                 type   = "ROM"
-                                 base   = "0xbfc00000" 
-                                 length = "0x00010000" />
-
-                        <pseg    name   = "PSEG_RAU" 
-                                 type   = "RAM"
-                                 base   = "0x00000000" 
-                                 length = "0x01000000" />
-
-                        <pseg    name   = "PSEG_RAK" 
-                                 type   = "RAM"
-                                 base   = "0x80000000" 
-                                 length = "0x00100000" />
-
-                        <pseg    name   = "PSEG_TTY"
-                                 type   = "PERI"
-                                 base   = "0x90000000" 
-                                 length = "0x00001000" />
-
-                        <pseg    name   = "PSEG_TIM" 
-                                 type   = "PERI"
-                                 base   = "0x91000000" 
-                                 length = "0x00001000" />
-
-                        <pseg    name   = "PSEG_IOC" 
-                                 type   = "PERI"
-                                 base   = "0x92000000" 
-                                 length = "0x00001000" />
-
-                        <pseg    name   = "PSEG_DMA" 
-                                 type   = "PERI"
-                                 base   = "0x93000000" 
-                                 length = "0x00001000" />
-
-                        <pseg    name   = "PSEG_FBF" 
-                                 type   = "PERI"
-                                 base   = "0x96000000" 
-                                 length = "0x00004000" />
-
-                        <pseg    name   = "PSEG_ICU" 
-                                 type   = "PERI"
-                                 base   = "0x9F000000" 
-                                 length = "0x00001000" />
+                         <pseg    name   = "PSEG_ROM" 
+                                  type   = "ROM"
+                                  base   = "0xbfc00000" 
+                                  length = "0x00010000" />
+
+                         <pseg    name   = "PSEG_RAM" 
+                                  type   = "RAM"
+                                  base   = "0x01000000" 
+                                  length = "0x01000000" />
+
+                         <pseg    name   = "PSEG_TTY"
+                                  type   = "PERI"
+                                  base   = "0x90000000" 
+                                  length = "0x00001000" />
+
+                         <pseg    name   = "PSEG_TIM" 
+                                  type   = "PERI"
+                                  base   = "0x90100000" 
+                                  length = "0x00001000" />
+
+                         <pseg    name   = "PSEG_IOC" 
+                                  type   = "PERI"
+                                  base   = "0x90200000" 
+                                  length = "0x00001000" />
+
+                         <pseg    name   = "PSEG_DMA" 
+                                  type   = "PERI"
+                                  base   = "0x90300000" 
+                                  length = "0x00001000" />
+
+                         <pseg    name   = "PSEG_FBF" 
+                                  type   = "PERI"
+                                  base   = "0x90600000" 
+                                  length = "0x00004000" />
+
+                         <pseg    name   = "PSEG_ICU" 
+                                  type   = "PERI"
+                                  base   = "0x90700000" 
+                                  length = "0x00001000" />
+
+                         <pseg    name   = "PSEG_COP" 
+                                  type   = "PERI"
+                                  base   = "0x90800000" 
+                                  length = "0x00001000" />
+
                          <proc    index  = "0" >
+                                  <irq   type    = "HARD"
+                                         icuid   = "0"
+                                         isr     = "ISR_SWITCH" />
+
+                                  <irq   type    = "HARD"
+                                         icuid   = "8"
+                                         isr     = "ISR_DMA"
+                                         channel = "0" />
+
+                                  <irq   type    = "HARD"
+                                         icuid   = "9"
+                                         isr     = "ISR_DMA"
+                                         channel = "1" />
+
+                                  <irq   type    = "HARD"
+                                         icuid   = "10"
+                                         isr     = "ISR_DMA"
+                                         channel = "2" />
+
+                                  <irq   type    = "HARD"
+                                         icuid   = "11"
+                                         isr     = "ISR_DMA"
+                                         channel = "3" />
+
+                                  <irq   type    = "HARD"
+                                         icuid   = "12"
+                                         isr     = "ISR_DMA"
+                                         channel = "4" />
+
+                                  <irq   type    = "HARD"
+                                         icuid   = "13"
+                                         isr     = "ISR_DMA"
+                                         channel = "5" />
+
+                                  <irq   type    = "HARD"
+                                         icuid   = "14"
+                                         isr     = "ISR_DMA"
+                                         channel = "6" />
+
+                                  <irq   type    = "HARD"
+                                         icuid   = "15"
+                                         isr     = "ISR_DMA"
+                                         channel = "7" />
+
+                                  <irq   type    = "HARD"
+                                         icuid   = "16"
+                                         isr     = "ISR_TTY"
+                                         channel = "0" />
+
+                                  <irq   type    = "HARD"
+                                         icuid   = "17"
+                                         isr     = "ISR_TTY"
+                                         channel = "1" />
+
+                                  <irq   type    = "HARD"
+                                         icuid   = "18"
+                                         isr     = "ISR_TTY"
+                                         channel = "2" />
+
+                                  <irq   type    = "HARD"
+                                         icuid   = "19"
+                                         isr     = "ISR_TTY"
+                                         channel = "3" />
+
+                                  <irq   type    = "HARD"
+                                         icuid   = "20"
+                                         isr     = "ISR_TTY"
+                                         channel = "4" />
+
+                                  <irq   type    = "HARD"
+                                         icuid   = "21"
+                                         isr     = "ISR_TTY"
+                                         channel = "5" />
+
+                                  <irq   type    = "HARD"
+                                         icuid   = "22"
+                                         isr     = "ISR_TTY"
+                                         channel = "6" />
+
+                                  <irq   type    = "HARD"
+                                         icuid   = "23"
+                                         isr     = "ISR_TTY"
+                                         channel = "7" />
+
+                                  <irq   type    = "HARD"
+                                         icuid   = "24"
+                                         isr     = "ISR_TTY"
+                                         channel = "8" />
+
+                                  <irq   type    = "HARD"
+                                         icuid   = "25"
+                                         isr     = "ISR_TTY"
+                                         channel = "9" />
+
+                                  <irq   type    = "HARD"
+                                         icuid   = "26"
+                                         isr     = "ISR_TTY"
+                                         channel = "10" />
+
+                                  <irq   type    = "HARD"
+                                         icuid   = "27"
+                                         isr     = "ISR_TTY"
+                                         channel = "11" />
+
+                                  <irq   type    = "HARD"
+                                         icuid   = "28"
+                                         isr     = "ISR_TTY"
+                                         channel = "12" />
+
+                                  <irq   type    = "HARD"
+                                         icuid   = "29"
+                                         isr     = "ISR_TTY"
+                                         channel = "13" />
+
+                                  <irq   type    = "HARD"
+                                         icuid   = "30"
+                                         isr     = "ISR_TTY"
+                                         channel = "14" />
+
+                                  <irq   type    = "HARD"
+                                         icuid   = "31"
+                                         isr     = "ISR_IOC" />
                          </proc>
+
                          <proc    index  = "1" >
+                                  <irq   type    = "HARD"
+                                         icuid   = "1"
+                                         isr     = "ISR_SWITCH" />
                          </proc>
+
                          <proc    index  = "2" >
+                                  <irq   type    = "HARD"
+                                         icuid   = "2"
+                                         isr     = "ISR_SWITCH" />
                          </proc>
+
                          <proc    index  = "3" >
+                                  <irq   type    = "HARD"
+                                         icuid   = "3"
+                                         isr     = "ISR_SWITCH" />
                          </proc>
+
+                         <periph  type      = "IOC" 
+                                  psegname  = "PSEG_IOC"
+                                  channels  = "1" />
+
+                         <periph  type      = "TTY" 
+                                  psegname  = "PSEG_TTY"
+                                  channels  = "2" />
+   
+                         <periph  type      = "DMA" 
+                                  psegname  = "PSEG_DMA"
+                                  channels  = "1" />
+   
+                         <periph  type      = "TIM"
+                                  psegname  = "PSEG_TIM"
+                                  channels  = "8" />
+
+                         <periph  type      = "FBF"
+                                  psegname  = "PSEG_FBF" />
+
+                         <coproc  name     = "COP0" 
+                                  psegname = "PSEG_COP" >
+
+                                  <port    direction  = "TO_COPROC"
+                                           vspacename = "router"
+                                           vobjname   = "mwmr_in" />
+
+                                  <port    direction  = "FROM_COPROC"
+                                           vspacename = "router"
+                                           vobjname   = "mwmr_out" />
+                         </coproc>
                 </cluster>
         </clusterset>
@@ -69,6 +233,6 @@
                 <vseg   name      = "seg_boot_code_data" 
                         vbase     = "0xbfc00000" 
-                        mode      = "CX__" 
-						clusterid = "0"
+                        mode      = "CXW_" 
+                        clusterid = "0"
                         psegname  = "PSEG_ROM" 
                         ident	  = "1" >
@@ -76,5 +240,5 @@
 					    		type	= "ELF"
 					    		length  = "0x00008000" 
-					    		binpath	= "build/boot.elf" />
+					    		binpath	= "build/boot/boot.elf" />
 				</vseg>
 
@@ -82,5 +246,5 @@
                         vbase     = "0xbfc08000" 
                         mode      = "C_W_"
-						clusterid = "0"
+                        clusterid = "0"
                         psegname  = "PSEG_ROM"
                         ident	  = "1" >
@@ -93,5 +257,5 @@
                         vbase     = "0xbfc0c000" 
                         mode      = "C_W_"
-						clusterid = "0"
+                        clusterid = "0"
                         psegname  = "PSEG_ROM"
                         ident	  = "1" >
@@ -105,12 +269,10 @@
                         vbase     = "0x80000000" 
                         mode      = "CX__" 
-						clusterid = "0"
-                        psegname  = "PSEG_RAU"
-                        ident	  = "0" >
-					<vobj   name	= "seg_kernel_code"
-							type	= "ELF"
-							length  = "0x00010000" 
-							binpath	= "build/sys.elf"
-							/>
+                        clusterid = "0"
+                        psegname  = "PSEG_RAM" >
+					    <vobj   name	= "seg_kernel_code"
+						    	type	= "ELF"
+							    length  = "0x00010000" 
+							    binpath	= "build/sys/sys.elf" />
 				</vseg>
 
@@ -118,11 +280,10 @@
                         vbase     = "0x80010000" 
                         mode      = "C_W_" 
-						clusterid = "0"
-                        psegname  = "PSEG_RAU"
-                        ident	  = "O" >
+                        clusterid = "0"
+                        psegname  = "PSEG_RAM" >
     					<vobj   name	= "seg_kernel_data"
     							type	= "ELF"
     							length  = "0x00040000" 
-    							binpath	= "build/sys.elf" />
+    							binpath	= "build/sys/sys.elf" />
 				</vseg>
 
@@ -130,11 +291,10 @@
                         vbase     = "0x80080000" 
                         mode      = "__W_"
-						clusterid = "0"
-                        psegname  = "PSEG_RAU"
-                        ident	  = "0" >
+                        clusterid = "0"
+                        psegname  = "PSEG_RAM" >
 					    <vobj   name	= "seg_kernel_uncdata"
 						    	type	= "ELF"
 							    length  = "0x00010000" 
-						    	binpath	= "build/sys.elf" />
+						    	binpath	= "build/sys/sys.elf" />
 				</vseg>
 
@@ -142,11 +302,10 @@
                         vbase     = "0x80090000" 
                         mode      = "CX__"
-						clusterid = "0"
-                        psegname  = "PSEG_RAU"
-                        ident	  = "0" >
+                        clusterid = "0"
+                        psegname  = "PSEG_RAM" >
     					<vobj   name	= "seg_kernel_init"
 	    						type	= "ELF"
 		    					length  = "0x00010000" 
-			    				binpath	= "build/sys.elf" />
+			    				binpath	= "build/sys/sys.elf" />
 				</vseg>
 
@@ -155,7 +314,6 @@
                         vbase     = "0x90000000" 
                         mode      = "__W_"
-						clusterid = "0"
-                        psegname  = "PSEG_TTY"
-                        ident	  = "1" >
+                        clusterid = "0"
+                        psegname  = "PSEG_TTY" >
     					<vobj   name	= "tty"
 	    						type	= "PERI"
@@ -166,7 +324,6 @@
                         vbase     = "0x91000000" 
                         mode      = "__W_"
-						clusterid = "0"
-                        psegname  = "PSEG_TIM"
-                        ident	  = "1" >
+                        clusterid = "0"
+                        psegname  = "PSEG_TIM" >
     					<vobj   name	= "timer"
 	    						type	= "PERI"
@@ -177,7 +334,6 @@
                         vbase     = "0x92000000" 
                         mode      = "__W_"
-						clusterid = "0"
-                        psegname  = "PSEG_IOC"
-                        ident	  = "1" >
+                        clusterid = "0"
+                        psegname  = "PSEG_IOC" >
 			    		<vobj   name	= "ioc"
 				    			type	= "PERI"
@@ -188,7 +344,6 @@
                         vbase     = "0x93000000" 
                         mode      = "__W_"
-						clusterid = "0"
-                        psegname  = "PSEG_DMA"
-                        ident	  = "1" >
+                        clusterid = "0"
+                        psegname  = "PSEG_DMA" >
     					<vobj   name	= "dma"
 	    						type	= "PERI"
@@ -199,7 +354,6 @@
                         vbase     = "0x96000000" 
                         mode      = "__W_"
-						clusterid = "0"
-                        psegname  = "PSEG_FBF"
-                        ident	  = "1" >
+                        clusterid = "0"
+                        psegname  = "PSEG_FBF" >
 			    		<vobj   name	= "fb"
 				    			type	= "PERI"
@@ -210,7 +364,6 @@
                         vbase     = "0x9F000000" 
                         mode      = "__W_"
-						clusterid = "0"
-                        psegname  = "PSEG_ICU"
-                        ident	  = "1" >
+                        clusterid = "0"
+                        psegname  = "PSEG_ICU" >
     					<vobj   name	= "icu"
 	    						type	= "PERI"
@@ -226,10 +379,10 @@
                                 vbase     = "0x00800000" 
                                 mode      = "__WU"
-								clusterid = "0"
-                                psegname  = "PSEG_RAU" >
+                                clusterid = "0"
+                                psegname  = "PSEG_RAM" >
 							    <vobj   name	= "seg_data_router"
 								    	type	= "ELF"
 					    				length  = "0x00010000" 
-                                        binpath = "build/router.elf" />
+                                        binpath = "build/router/router.elf" />
 						</vseg>
 
@@ -237,10 +390,10 @@
                                 vbase     = "0x00400000" 
                                 mode      = "CX_U"
-								clusterid = "0"
-                                psegname  = "PSEG_RAU" >
+                                clusterid = "0"
+                                psegname  = "PSEG_RAM" >
 							    <vobj   name	= "seg_code_router"
 								    	type	= "ELF"
 									    length  = "0x00010000" 
-                                        binpath = "build/router.elf" />
+                                        binpath = "build/router/router.elf" />
 						</vseg>
 
@@ -248,6 +401,6 @@
                                 vbase     = "0x00300000" 
                                 mode      = "C___"
-								clusterid = "0"
-                                psegname  = "PSEG_RAU" >
+                                clusterid = "0"
+                                psegname  = "PSEG_RAM" >
                                 <vobj   name	= "ptab_router"
                                         type	= "PTAB"
@@ -259,6 +412,6 @@
 				                vbase     = "0x00010000" 
                                 mode      = "C_WU"
-								clusterid = "0"
-                                psegname  = "PSEG_RAU" >
+                                clusterid = "0"
+                                psegname  = "PSEG_RAM" >
 							    <vobj   name	= "stack_producer"
 								    	type	= "BUFFER"
@@ -269,6 +422,6 @@
 				                vbase     = "0x00020000" 
                                 mode      = "C_WU"
-								clusterid = "0"
-                                psegname  = "PSEG_RAU" >
+                                clusterid = "0"
+                                psegname  = "PSEG_RAM" >
 							    <vobj   name	= "stack_consumer"
 								    	type	= "BUFFER"
@@ -279,6 +432,6 @@
                 				vbase     = "0x00030000" 
                                 mode      = "C_WU"
-								clusterid = "0"
-                                psegname  = "PSEG_RAU" >
+                                clusterid = "0"
+                                psegname  = "PSEG_RAM" >
 							    <vobj   name	= "stack_router_A"
 								    	type	= "BUFFER"
@@ -289,6 +442,6 @@
 				                vbase     = "0x00040000" 
                                 mode      = "C_WU"
-								clusterid = "0"
-                                psegname  = "PSEG_RAU" >
+                                clusterid = "0"
+                                psegname  = "PSEG_RAM" >
 							    <vobj   name	= "stack_router_B"
 								    	type	= "BUFFER"
@@ -299,14 +452,14 @@
                                 vbase     = "0x00050000"
                                 mode      = "__WU"
-								clusterid = "0"
-                                psegname  = "PSEG_RAU" >
+                                clusterid = "0"
+                                psegname  = "PSEG_RAM" >
 							    <vobj   name	= "mwmr_in"
 								    	type	= "MWMR"
-									    length  = "0x00000020" 
-									    init    = "1" />
+									    length  = "0x00000020"
+                                        init    = "1" />
 							    <vobj   name	= "mwmr_out"
 								    	type	= "MWMR"
-									    length  = "0x00000020" 
-									    init    = "1" />
+									    length  = "0x00000020"
+                                        init    = "1" />
 						</vseg>
 
@@ -346,10 +499,10 @@
                                 vbase     = "0x00800000" 
                                 mode      = "C_WU"
-								clusterid = "0"
-                                psegname  = "PSEG_RAU" >
+                                clusterid = "0"
+                                psegname  = "PSEG_RAM" >
 							    <vobj   name	= "seg_data_hello"
 								    	type	= "ELF"
 									    length    = "0x00010000" 
-                                        binpath = "build/hello.elf" />
+                                        binpath = "build/hello/hello.elf" />
 						</vseg>
 
@@ -357,10 +510,10 @@
                                 vbase     = "0x00400000" 
                                 mode      = "CX_U"
-								clusterid = "0"
-                                psegname  = "PSEG_RAU" >
+                                clusterid = "0"
+                                psegname  = "PSEG_RAM" >
 							    <vobj   name	= "seg_code_hello"
 								    	type	= "ELF"
 									    length    = "0x00010000" 
-                                        binpath = "build/hello.elf" />
+                                        binpath = "build/hello/hello.elf" />
 						</vseg>
 
@@ -368,6 +521,6 @@
                                 vbase     = "0x00300000" 
                                 mode      = "C___"
-								clusterid = "0"
-                                psegname  = "PSEG_RAU" >
+                                clusterid = "0"
+                                psegname  = "PSEG_RAM" >
                                 <vobj   name	= "ptab"
                                         type	= "PTAB"
@@ -379,6 +532,6 @@
                                 vbase     = "0x00000000" 
                                 mode      = "C_WU"
-								clusterid = "0"
-                                psegname  = "PSEG_RAU" >
+                                clusterid = "0"
+                                psegname  = "PSEG_RAM" >
 							    <vobj   name	= "stack"
 								    	type	= "BUFFER"
@@ -401,10 +554,10 @@
                                 vbase     = "0x00800000" 
                                 mode      = "C_WU"
-								clusterid = "0"
-                                psegname  = "PSEG_RAU" >
+                                clusterid = "0"
+                                psegname  = "PSEG_RAM" >
 							    <vobj   name	= "seg_data_pgcd"
 								    	type	= "ELF"
 									    length  = "0x00010000" 
-                                        binpath = "build/pgcd.elf" />
+                                        binpath = "build/pgcd/pgcd.elf" />
 						</vseg>
 
@@ -412,6 +565,6 @@
                                 vbase     = "0x00300000" 
                                 mode      = "C___"
-								clusterid = "0"
-                                psegname  = "PSEG_RAU" >
+                                clusterid = "0"
+                                psegname  = "PSEG_RAM" >
                                 <vobj   name	= "ptab"
                                         type	= "PTAB"
@@ -423,10 +576,10 @@
                                 vbase     = "0x00400000" 
                                 mode      = "CX_U"
-								clusterid = "0"
-                                psegname  = "PSEG_RAU" >
+                                clusterid = "0"
+                                psegname  = "PSEG_RAM" >
 							    <vobj   name	= "seg_code_pgcd"
 								    	type	= "ELF"
 									    length  = "0x00010000" 
-                                        binpath = "build/pgcd.elf" />
+                                        binpath = "build/pgcd/pgcd.elf" />
 						</vseg>
 
@@ -434,6 +587,6 @@
                                 vbase     = "0x00000000" 
                                 mode      = "C_WU"
-								clusterid = "0"
-                                psegname  = "PSEG_RAU" >
+                                clusterid = "0"
+                                psegname  = "PSEG_RAM" >
 							    <vobj   name	= "stack"
 								    	type	= "BUFFER"
@@ -455,10 +608,10 @@
                                 vbase     = "0x00800000" 
                                 mode      = "C_WU"
-								clusterid = "0"
-                                psegname  = "PSEG_RAU" >
+                                clusterid = "0"
+                                psegname  = "PSEG_RAM" >
 							    <vobj   name	= "seg_data_display"
 								    	type	= "ELF"
 									    length  = "0x00010000" 
-                                        binpath = "build/display.elf" />
+                                        binpath = "build/display/display.elf" />
 						</vseg>
 
@@ -466,6 +619,6 @@
                                 vbase     = "0x00300000" 
                                 mode      = "C___"
-								clusterid = "0"
-                                psegname  = "PSEG_RAU" >
+                                clusterid = "0"
+                                psegname  = "PSEG_RAM" >
                                 <vobj   name	= "ptab"
                                         type	= "PTAB"
@@ -477,10 +630,10 @@
                                 vbase     = "0x00400000" 
                                 mode      = "CX_U"
-								clusterid = "0"
-                                psegname  = "PSEG_RAU" >
+                                clusterid = "0"
+                                psegname  = "PSEG_RAM" >
 							    <vobj   name	= "seg_code_display"
 								    	type	= "ELF"
 									    length  = "0x00010000" 
-                                        binpath = "build/display.elf" />
+                                        binpath = "build/display/display.elf" />
 						</vseg>
 
@@ -488,6 +641,6 @@
                                 vbase     = "0x00000000" 
                                 mode      = "C_WU"
-								clusterid = "0"
-                                psegname  = "PSEG_RAU" >
+                                clusterid = "0"
+                                psegname  = "PSEG_RAM" >
 							    <vobj   name	= "stack_display"
 								    	type	= "BUFFER"
@@ -501,5 +654,5 @@
                                 startid   = "0" 
                                 usetty    = "1"
-                                usefb     = "1" />
+                                usefbdma  = "1" />
                 </vspace>
 
