commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] r7951 - in gnuradio/branches/developers/eb/gcell-wip/s


From: eb
Subject: [Commit-gnuradio] r7951 - in gnuradio/branches/developers/eb/gcell-wip/src: apps lib lib/spu
Date: Wed, 5 Mar 2008 23:32:20 -0700 (MST)

Author: eb
Date: 2008-03-05 23:32:18 -0700 (Wed, 05 Mar 2008)
New Revision: 7951

Modified:
   gnuradio/branches/developers/eb/gcell-wip/src/apps/benchmark_dma.cc
   gnuradio/branches/developers/eb/gcell-wip/src/lib/gc_job_manager_impl.cc
   gnuradio/branches/developers/eb/gcell-wip/src/lib/spu/gc_main.c
Log:
gcell work-in-progress.  After using newly created real-time logging
feature from the SPE, it looks like the SPE code is doing the right
thing after all.  Both the PPE and SPE think that 1024 jobs have
completed, but for some reason, the client is still blocked in
wait_jobs.  Need to come up for air and relook at the PPE side.
The problem shows up about 1 in 10 runs, and the freq of occurrence
depends on the size of the dma xfers.  

BTW, the new real-time logging stuff (gc_logging.h) is very cool.  In
effect, DMA "puts" from the SPE end up directly in files on the PPE.
The files are memory mapped and the right thing just happens.


Modified: gnuradio/branches/developers/eb/gcell-wip/src/apps/benchmark_dma.cc
===================================================================
--- gnuradio/branches/developers/eb/gcell-wip/src/apps/benchmark_dma.cc 
2008-03-06 04:18:24 UTC (rev 7950)
+++ gnuradio/branches/developers/eb/gcell-wip/src/apps/benchmark_dma.cc 
2008-03-06 06:32:18 UTC (rev 7951)
@@ -121,6 +121,7 @@
   opts.program_handle = &benchmark_procs;
   opts.nspes = nspes;
   opts.enable_logging = true;
+  opts.log2_nlog_entries = 13;
   gc_job_manager *mgr = gc_make_job_manager(&opts);
 
   if ((gcp_benchmark_udelay = mgr->lookup_proc("benchmark_udelay")) == 
GCP_UNKNOWN_PROC){

Modified: 
gnuradio/branches/developers/eb/gcell-wip/src/lib/gc_job_manager_impl.cc
===================================================================
--- gnuradio/branches/developers/eb/gcell-wip/src/lib/gc_job_manager_impl.cc    
2008-03-06 04:18:24 UTC (rev 7950)
+++ gnuradio/branches/developers/eb/gcell-wip/src/lib/gc_job_manager_impl.cc    
2008-03-06 06:32:18 UTC (rev 7951)
@@ -830,7 +830,7 @@
     return;
   }
 
-  if (0){
+  if (1){
     static int total_jobs;
     static int total_msgs;
     total_msgs++;

Modified: gnuradio/branches/developers/eb/gcell-wip/src/lib/spu/gc_main.c
===================================================================
--- gnuradio/branches/developers/eb/gcell-wip/src/lib/spu/gc_main.c     
2008-03-06 04:18:24 UTC (rev 7950)
+++ gnuradio/branches/developers/eb/gcell-wip/src/lib/spu/gc_main.c     
2008-03-06 06:32:18 UTC (rev 7951)
@@ -91,12 +91,13 @@
   gc_comp_info_t *p = (gc_comp_info_t *) buf;
 
   do {
+    // FIXME do this with regular DMA, then try LL in main loop
     mfc_getllar(buf, spu_args.comp_info[idx], 0, 0);
     spu_readch(MFC_RdAtomicStat);
     if (p->in_use == 0)
       return;
 
-    gc_udelay(5);    // FIXME use the "lock-line reservation lost" event
+    gc_udelay(5);
 
   } while (1);
 }
@@ -104,6 +105,10 @@
 static void
 flush_completion_info(void)
 {
+  // events: 0x3X
+
+  static int total_complete = 0;
+
   if (comp_info.ncomplete == 0)
     return;
   
@@ -123,13 +128,15 @@
   if (put_in_progress & PBI_MASK(1))
     tag_mask |= (1 << (put_tags + 1));
 
-  gc_log_write2(GCL_SS_SYS, 8, put_in_progress, tag_mask);
+  gc_log_write2(GCL_SS_SYS, 0x30, put_in_progress, tag_mask);
 
   mfc_write_tag_mask(tag_mask);                // the tags we're interested in
   mfc_read_tag_status_all();           // wait for DMA to complete
   put_in_progress = 0;                 // mark them all complete
 
-  gc_log_write1(GCL_SS_SYS, 9, put_in_progress);
+  total_complete += comp_info.ncomplete;
+  gc_log_write4(GCL_SS_SYS, 0x31,
+               put_in_progress, ci_idx, comp_info.ncomplete, total_complete);
 
   // send PPE a message
   spu_writech(SPU_WrOutIntrMbox, MK_MBOX_MSG(OP_JOBS_DONE, ci_idx));
@@ -249,6 +256,8 @@
 static void
 process_job(gc_eaddr_t jd_ea, gc_job_desc_t *jd)
 {
+  // events: 0x2X
+
   jd->status = JS_OK;  // assume success
 
   if (jd->proc_id >= spu_args.nproc_defs)
@@ -288,18 +297,18 @@
       // Do we have any "put" args?  If so ensure that previous
       // dma from this buffer is complete
 
-      gc_log_write2(GCL_SS_SYS, 5, put_in_progress, jd->sys.direction_union);
+      gc_log_write2(GCL_SS_SYS, 0x24, put_in_progress, 
jd->sys.direction_union);
 
       if ((jd->sys.direction_union & GCJD_DMA_PUT)
          && (put_in_progress & PBI_MASK(pb_idx))){
 
-       gc_log_write2(GCL_SS_SYS, 6, put_in_progress, 1 << put_tag);
+       gc_log_write2(GCL_SS_SYS, 0x25, put_in_progress, 1 << put_tag);
 
        mfc_write_tag_mask(1 << put_tag);       // the tag we're interested in
        mfc_read_tag_status_all();              // wait for DMA to complete
        put_in_progress &= ~(PBI_MASK(pb_idx));
 
-       gc_log_write1(GCL_SS_SYS, 7, put_in_progress);
+       gc_log_write1(GCL_SS_SYS, 0x26, put_in_progress);
       }
 
 
@@ -517,7 +526,7 @@
        }
        if (started_dma){
          put_in_progress |= PBI_MASK(pb_idx);          // note it's running
-         gc_log_write2(GCL_SS_SYS, 4, put_in_progress, pb_idx);
+         gc_log_write2(GCL_SS_SYS, 0x27, put_in_progress, pb_idx);
          pb_idx ^= 1;                                  // toggle current buffer
        }
       }
@@ -544,7 +553,7 @@
   flush_completion_info();
 #else
   if (comp_info.ncomplete == GC_CI_NJOBS){
-    gc_log_write0(GCL_SS_SYS, 2);
+    gc_log_write0(GCL_SS_SYS, 0x28);
     flush_completion_info();
   }
 #endif  
@@ -553,8 +562,11 @@
 static void
 main_loop(void)
 {
+  // events: 0x1X
+
   static gc_job_desc_t jd;     // static gets us proper alignment
-  gc_eaddr_t   jd_ea;
+  gc_eaddr_t           jd_ea;
+  int                  total_jobs = 0;
 
   // setup events
   spu_writech(SPU_WrEventMask, MFC_LLR_LOST_EVENT);
@@ -596,8 +608,13 @@
 #else
 
     // try to get a job from the job queue 
-    if (gc_jd_queue_dequeue(spu_args.queue, &jd_ea, &jd)){ 
+    if (gc_jd_queue_dequeue(spu_args.queue, &jd_ea, &jd)){
+      total_jobs++;
+      gc_log_write2(GCL_SS_SYS, 0x10, jd.sys.job_id, total_jobs);
+
       process_job(jd_ea, &jd); 
+
+      gc_log_write2(GCL_SS_SYS, 0x11, jd.sys.job_id, total_jobs);
       backoff_reset(); 
     }
     else
@@ -623,7 +640,7 @@
     // message without blocking, do it.
 
     if (comp_info.ncomplete != 0 && spu_readchcnt(SPU_WrOutIntrMbox) != 0){
-      gc_log_write0(GCL_SS_SYS, 1);
+      gc_log_write0(GCL_SS_SYS, 0x12);
       flush_completion_info();
     }
   }





reply via email to

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