updates for multicore runtime to support Tilera
authorjzhou <jzhou>
Sat, 16 May 2009 00:33:57 +0000 (00:33 +0000)
committerjzhou <jzhou>
Sat, 16 May 2009 00:33:57 +0000 (00:33 +0000)
Robust/src/Runtime/multicoretask.c
Robust/src/buildscript

index b47a62032a52f7574b8d40df7c1346944c6490be..3e68d45dd85bb5d6eef0999d411bd0ef62de2534 100644 (file)
@@ -1078,6 +1078,7 @@ void addAliasLock(void * ptr, int lock) {
  *       b -- lock release with redirect info
  *       c -- status confirm request
  *       d -- status report msg
+ *       e -- terminate
  *
  * ObjMsg: 0 + size of msg + obj's address + (task index + param index)+
  * StallMsg: 1 + corenum + sendobjs + receiveobjs (size is always 4 * sizeof(int))
@@ -1092,6 +1093,7 @@ void addAliasLock(void * ptr, int lock) {
  * StatusMsg: c (size is always 1 * sizeof(int))
  *            d + status + corenum (size is always 3 * sizeof(int))
  *            status: 0 -- stall; 1 -- busy
+ * TerminateMsg: e (size is always 1 * sizeof(int)
  */
 
 #ifdef PROFILE
@@ -1676,6 +1678,15 @@ msg:
       }
          break;
        }
+
+       case 0xe: {
+         // receive a terminate msg
+#ifdef DEBUG
+                                 BAMBOO_DEBUGPRINT(0xe889);
+#endif
+                                 BAMBOO_EXIT(0);
+         break;
+       }
        
     default:
       break;
@@ -1686,7 +1697,7 @@ msg:
     msgtype = -1;
     msglength = 30;
 #ifdef DEBUG
-    BAMBOO_DEBUGPRINT(0xe889);
+    BAMBOO_DEBUGPRINT(0xe88a);
 #endif
 
     if(BAMBOO_MSG_AVAIL() != 0) {
@@ -1701,7 +1712,7 @@ msg:
   } else {
     // not a whole msg
 #ifdef DEBUG
-    BAMBOO_DEBUGPRINT(0xe895);
+    BAMBOO_DEBUGPRINT(0xe88b);
 #endif
 #ifdef PROFILE
 /*    if(isInterrupt) {
index 3c67ce0c3c84eb6d4d2d9331f22df64b3fc069d8..b16fb29042a9b200e914a5344cdbaa750edbc8f5 100755 (executable)
@@ -501,6 +501,7 @@ then # TILERAFLAG
 TILERADIR="$CURDIR/tilera"
 MAKEFILE="Makefile.tilera.$TILERACONFIG"
 SIMHVC="sim.hvc.$TILERACONFIG"
+PCIHVC="pci.hvc.$TILERACONFIG"
 mkdir $TILERADIR
 cd $TILERADIR
 make clean
@@ -540,6 +541,7 @@ fi #INTERRUPT version
 
 cp $ROBUSTROOT/Runtime/Tilera/$MAKEFILE ./Makefile
 cp $ROBUSTROOT/Runtime/Tilera/$SIMHVC ./sim.hvc
+cp $ROBUSTROOT/Runtime/Tilera/$PCIHVC ./pci.hvc
 cp ../Runtime/multicoretask.c ./
 cp ../Runtime/multicoreruntime.c ./
 cp ../Runtime/Queue.c ./