commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r7673 - in gnuradio/branches/developers/eb/gcell/src:


From: eb
Subject: [Commit-gnuradio] r7673 - in gnuradio/branches/developers/eb/gcell/src: apps lib/spu
Date: Wed, 13 Feb 2008 22:52:15 -0700 (MST)

Author: eb
Date: 2008-02-13 22:52:14 -0700 (Wed, 13 Feb 2008)
New Revision: 7673

Modified:
   gnuradio/branches/developers/eb/gcell/src/apps/gen_script.py
   gnuradio/branches/developers/eb/gcell/src/lib/spu/
   gnuradio/branches/developers/eb/gcell/src/lib/spu/gcell_spu_main.c
Log:
work-in-progress

Modified: gnuradio/branches/developers/eb/gcell/src/apps/gen_script.py
===================================================================
--- gnuradio/branches/developers/eb/gcell/src/apps/gen_script.py        
2008-02-14 03:48:20 UTC (rev 7672)
+++ gnuradio/branches/developers/eb/gcell/src/apps/gen_script.py        
2008-02-14 05:52:14 UTC (rev 7673)
@@ -1,18 +1,35 @@
 #!/usr/bin/env python
 
 import sys
+import time
+import os
+
 from optparse import OptionParser
 
 
 def main():
+    def make_fname(suffix):
+        return basename + '.' + suffix
+
     parser = OptionParser()
     parser.add_option("-m", "--max-spes", type="int", default=6,
                       help="set maximum number of SPEs to use 
[default=%default]")
+    parser.add_option("-p", "--oprofile", action="store_true", default=False,
+                      help="emit oprofile commands")
+    parser.add_option("-t", "--tag", default=None,
+                      help="specify identifying tag used in generated 
filenames")
     (options, args) = parser.parse_args()
     if len(args) != 0:
         parser.print_help()
         sys.exit(1)
 
+    os.environ['TZ'] = 'PST8PDT'        # always pacific
+    time.tzset()
+    basename = 'R' + time.strftime('%m%d-%H%M')
+    if options.tag:
+        basename = basename + '-' + options.tag
+
+
     base_njobs = int(500e3)
     njobs = {
          1 : base_njobs,
@@ -26,12 +43,34 @@
        500 : int(base_njobs/5)
         }
 
+    
+
+
     f = sys.stdout
+    f.write("#!/bin/bash\n")
+
+    if options.oprofile:
+        f.write("opcontrol --stop\n")
+        f.write("opcontrol --reset\n")
+        f.write("opcontrol --start\n")
+
+    f.write("(\n")
+
     for udelay in (10, 50, 100, 200, 300, 500):
         for nspes in range(1, options.max_spes+1):
             cmd = "./benchmark_nop -n %d -u %d -N %d\n" % (nspes, udelay, 
njobs[udelay])
             f.write(cmd)
             f.write(cmd)
 
+    f.write(") 2>&1 | tee %s\n" % (make_fname('results'),))
+
+    if options.oprofile:
+        f.write("opcontrol --dump\n")
+        f.write("opcontrol --stop\n")
+        f.write("opreport -l | head -100 > %s\n" % (make_fname('opreport'),))
+
+    f.write("./split_and_avg_results.py > %s\n" % (make_fname('summary'),))
+
+
 if __name__ == '__main__':
     main()


Property changes on: gnuradio/branches/developers/eb/gcell/src/lib/spu
___________________________________________________________________
Name: svn:ignore
   - Makefile
Makefile.in
*.a
*.la
*.lo
.deps
.libs
test_spu

   + Makefile
Makefile.in
*.a
*.la
*.lo
.deps
.libs
test_spu
gcell_spu_main


Modified: gnuradio/branches/developers/eb/gcell/src/lib/spu/gcell_spu_main.c
===================================================================
--- gnuradio/branches/developers/eb/gcell/src/lib/spu/gcell_spu_main.c  
2008-02-14 03:48:20 UTC (rev 7672)
+++ gnuradio/branches/developers/eb/gcell/src/lib/spu/gcell_spu_main.c  
2008-02-14 05:52:14 UTC (rev 7673)
@@ -31,6 +31,9 @@
 #include "gc_methods.h"
 #include "gc_delay.h"
 
+
+#define USE_LLR_LOST_EVENT     0       // define to 0 or 1
+
 static gc_spu_args_t   spu_args;
 
 // our working copy of the completion info
@@ -212,9 +215,11 @@
 
   while (1){
 
+#if (USE_LLR_LOST_EVENT)
+
     if (unlikely(spu_readchcnt(SPU_RdEventStat))){
       //
-      // execute standard event handling protocol prologue
+      // execute standard event handling prologue
       //
       int status = spu_readch(SPU_RdEventStat);
       int mask = spu_readch(SPU_RdEventMask);
@@ -236,13 +241,23 @@
       }
 
       //
-      // execute standard event handling protocol epilogue
+      // execute standard event handling epilogue
       //
       spu_writech(SPU_WrEventMask, mask);      // restore event mask
     }
 
-    // FIXME we could handle these via events too
+#else
 
+    // try to get a job from the job queue 
+    if (gc_jd_queue_dequeue(spu_args.queue, &jd_ea, &jd)){ 
+      process_job(jd_ea, &jd); 
+      backoff_reset(); 
+    }
+    else
+      backoff_delay();
+
+#endif
+
     // any msgs for us?
 
     if (unlikely(spu_readchcnt(SPU_RdInMbox))){





reply via email to

[Prev in Thread] Current Thread [Next in Thread]