TILERA_ZLINUX mode for BAMBOO can be compiled now, but still has segmentation fault
authorjzhou <jzhou>
Wed, 17 Mar 2010 22:24:23 +0000 (22:24 +0000)
committerjzhou <jzhou>
Wed, 17 Mar 2010 22:24:23 +0000 (22:24 +0000)
Robust/src/IR/Flat/BuildCodeMultiCore.java
Robust/src/Runtime/multicoreruntime.c
Robust/src/Runtime/multicoreruntime.h
Robust/src/buildscript

index 89bc6530b197374c2cce6bae8eb38a97d2ef87a4..1ed0244cbb278c1e1b5d74e2bd84300ceeba6193 100644 (file)
@@ -677,7 +677,7 @@ public class BuildCodeMultiCore extends BuildCode {
                output.println("BAMBOO_DEBUGPRINT_REG(tmpsum);"); 
        } else {
                //output.println("BAMBOO_ENTER_RUNTIME_MODE_FROM_CLIENT();");
-               output.println("tprintf(\"Process %x(%d): task %s\\n\", corenum, corenum, \"" + task.getSymbol() + "\");");
+               output.println("printf(\"(%x,%x) Process %x(%d): task %s\\n\", udn_tile_coord_x(), udn_tile_coord_y(), corenum, corenum, \"" + task.getSymbol() + "\");");
                //output.println("BAMBOO_ENTER_CLIENT_MODE_FROM_RUNTIME();");
        }
        //output.println("BAMBOO_DEBUGPRINT(BAMBOO_GET_EXE_TIME());");
@@ -688,7 +688,7 @@ public class BuildCodeMultiCore extends BuildCode {
                output.println("BAMBOO_DEBUGPRINT_REG(tmpsum);");
        } else {
                //output.println("BAMBOO_ENTER_RUNTIME_MODE_FROM_CLIENT();");
-               output.println("tprintf(\"Process %x(%d): task %s\\n\", corenum, corenum, \"" + task.getSymbol() + "\");");
+               output.println("printf(\"(%x,%x) Process %x(%d): task %s\\n\", udn_tile_coord_x(), udn_tile_coord_y(), corenum, corenum, \"" + task.getSymbol() + "\");");
                //output.println("BAMBOO_ENTER_CLIENT_MODE_FROM_RUNTIME();");
        }
     output.println("#endif");
index 9f4a825c3e6af876098e3a5682b678e2658ef249..7c9cba8efa474fee83c9a0f9de98e977367803c0 100644 (file)
@@ -212,7 +212,8 @@ void CALL01(___System______printString____L___String___,struct ___String___ * __
 void * allocate_new(void * ptr, int type) {
   struct ___Object___ * v=(struct ___Object___ *)FREEMALLOC((struct garbagelist *) ptr, classsize[type]);
 #ifdef DEBUG
-       tprintf("new object: %x \n", v);
+  printf("(%x,%x): new object: %x \n", udn_tile_coord_x(), 
+                 udn_tile_coord_y(), v);
 #endif
   v->type=type;
   v->version = 0;
@@ -227,7 +228,8 @@ void * allocate_new(void * ptr, int type) {
 struct ArrayObject * allocate_newarray(void * ptr, int type, int length) {
   struct ArrayObject * v=(struct ArrayObject *)FREEMALLOC((struct garbagelist *) ptr, sizeof(struct ArrayObject)+length*classsize[type]);
 #ifdef DEBUG
-       tprintf("new array object: %x \n", v);
+  printf("(%x,%x): new array object: %x \n", udn_tile_coord_x(), 
+                 udn_tile_coord_y(), v);
 #endif
   v->type=type;
   v->version = 0;
index dfbd9e88401e09aba218239c6b20e9079bb6223e..b83a89746a7d2721c1caf28b41fdc9988fbbf67a 100644 (file)
@@ -5,6 +5,12 @@
 #define INLINE    inline __attribute__((always_inline))
 #endif
 
+#ifndef bool
+#define bool int
+#define true 1
+#define false 0
+#endif
+
 ////////////////////////////////////////////////////////////////
 // global variables                                          //
 ///////////////////////////////////////////////////////////////
index c6621f581c6cab02e173d04696a237a085de9317..c8fd48bae88248e6a9d0fdf22953a0685ab47b26 100755 (executable)
@@ -662,7 +662,7 @@ SIMHVC="sim.hvc.$TILERACONFIG"
 PCIHVC="pci.hvc.$TILERACONFIG"
 elif $TILERAZLINUXFLAG
 then # TILERAZLINUXFLAG
-TILERA_INDIR="ZLINUX"
+TILERA_INDIR="ZLinux"
 MAKEFILE="Makefile.tilera.$TILERACONFIG"
 fi
 mkdir $TILERADIR
@@ -761,7 +761,10 @@ cp ../Tilera/Runtime/*.c ./
 cp ../Tilera/Runtime/*.h ./
 cp ../Tilera/Runtime/$TILERA_INDIR/*.c ./
 cp ../Tilera/Runtime/$TILERA_INDIR/*.h ./
+if $TILERAZLINUXFLAG
+then # TILERAZLINUXFLAG
 cp ../Tilera/Runtime/$TILERA_INDIR/*.S ./
+fi
 cp ../Tilera/lib/* ./
 cp ../$tmpbuilddirectory/*.c ./
 cp ../$tmpbuilddirectory/*.h ./