[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r10227 - in gnuradio/branches/developers/eb/gcell-wip/
From: |
eb |
Subject: |
[Commit-gnuradio] r10227 - in gnuradio/branches/developers/eb/gcell-wip/gcell/lib/runtime: . spu |
Date: |
Wed, 14 Jan 2009 23:26:59 -0700 (MST) |
Author: eb
Date: 2009-01-14 23:26:56 -0700 (Wed, 14 Jan 2009)
New Revision: 10227
Modified:
gnuradio/branches/developers/eb/gcell-wip/gcell/lib/runtime/gc_job_manager_impl.cc
gnuradio/branches/developers/eb/gcell-wip/gcell/lib/runtime/gc_job_manager_impl.h
gnuradio/branches/developers/eb/gcell-wip/gcell/lib/runtime/spu/gc_main.c
gnuradio/branches/developers/eb/gcell-wip/gcell/lib/runtime/spu/gc_random.c
Log:
work-in-progress: close to approach of r10217
Modified:
gnuradio/branches/developers/eb/gcell-wip/gcell/lib/runtime/gc_job_manager_impl.cc
===================================================================
---
gnuradio/branches/developers/eb/gcell-wip/gcell/lib/runtime/gc_job_manager_impl.cc
2009-01-15 04:50:34 UTC (rev 10226)
+++
gnuradio/branches/developers/eb/gcell-wip/gcell/lib/runtime/gc_job_manager_impl.cc
2009-01-15 06:26:56 UTC (rev 10227)
@@ -581,7 +581,7 @@
}
gc_jd_queue_enqueue(d_queue, jd);
- tell_spes_to_check_queue();
+ // tell_spes_to_check_queue();
return true;
}
@@ -1145,11 +1145,10 @@
////////////////////////////////////////////////////////////////////////
-bool
+void
gc_job_manager_impl::poll_for_job_completion()
{
static const int niter = 10000;
- bool handled_something = false;
CCTPL(); // change current (h/w) thread priority to low
@@ -1159,7 +1158,6 @@
volatile spe_spu_control_area_t *spe_ctrl = d_worker[spe_num].spe_ctrl;
int nentries = spe_ctrl->SPU_Mbox_Stat & 0xFF;
while (nentries-- > 0){
- handled_something = true;
unsigned int msg = spe_ctrl->SPU_Out_Mbox;
switch(MBOX_MSG_OP(msg)){
case OP_JOBS_DONE:
@@ -1179,7 +1177,6 @@
}
}
CCTPM();
- return handled_something;
}
//
@@ -1202,8 +1199,7 @@
}
}
- if (poll_for_job_completion())
- sched_yield();
+ poll_for_job_completion();
}
}
Modified:
gnuradio/branches/developers/eb/gcell-wip/gcell/lib/runtime/gc_job_manager_impl.h
===================================================================
---
gnuradio/branches/developers/eb/gcell-wip/gcell/lib/runtime/gc_job_manager_impl.h
2009-01-15 04:50:34 UTC (rev 10226)
+++
gnuradio/branches/developers/eb/gcell-wip/gcell/lib/runtime/gc_job_manager_impl.h
2009-01-15 06:26:56 UTC (rev 10227)
@@ -177,7 +177,7 @@
bool incr_njobs_active();
void decr_njobs_active(int n);
void tell_spes_to_check_queue();
- bool poll_for_job_completion();
+ void poll_for_job_completion();
// bitvector ops
void bv_zero(unsigned long *bv);
Modified:
gnuradio/branches/developers/eb/gcell-wip/gcell/lib/runtime/spu/gc_main.c
===================================================================
--- gnuradio/branches/developers/eb/gcell-wip/gcell/lib/runtime/spu/gc_main.c
2009-01-15 04:50:34 UTC (rev 10226)
+++ gnuradio/branches/developers/eb/gcell-wip/gcell/lib/runtime/spu/gc_main.c
2009-01-15 06:26:56 UTC (rev 10227)
@@ -52,7 +52,7 @@
//#define OUT_MBOX_CHANNEL SPU_WrOutIntrMbox
#define OUT_MBOX_CHANNEL SPU_WrOutMbox
-#define CHECK_QUEUE_ON_MSG 1 // define to 0 or 1
+#define CHECK_QUEUE_ON_MSG 0 // define to 0 or 1
#define USE_LLR_LOST_EVENT 0 // define to 0 or 1
int gc_sys_tag; // tag for misc DMA operations
@@ -663,6 +663,7 @@
if (unlikely(spu_readchcnt(SPU_RdInMbox))){
int msg = spu_readch(SPU_RdInMbox);
// printf("spu[%d] mbox_msg: 0x%08x\n", spu_args.spu_idx, msg);
+#if CHECK_QUEUE_ON_MSG
if (MBOX_MSG_OP(msg) == OP_CHECK_QUEUE){
while (1){
@@ -688,8 +689,9 @@
}
}
}
-
- else if (MBOX_MSG_OP(msg) == OP_EXIT){
+ else
+#endif
+ if (MBOX_MSG_OP(msg) == OP_EXIT){
flush_completion_info();
if (0){
printf("spu[%2d] jdq_empty = %8d jdq_locked = %8d jdq_ok = %8d\n",
Modified:
gnuradio/branches/developers/eb/gcell-wip/gcell/lib/runtime/spu/gc_random.c
===================================================================
--- gnuradio/branches/developers/eb/gcell-wip/gcell/lib/runtime/spu/gc_random.c
2009-01-15 04:50:34 UTC (rev 10226)
+++ gnuradio/branches/developers/eb/gcell-wip/gcell/lib/runtime/spu/gc_random.c
2009-01-15 06:26:56 UTC (rev 10227)
@@ -22,9 +22,15 @@
static int last_val = 0;
-#define M 259200 // values from Numerical Recipes in C, 1988
-#define A 7141
-#define C 54773
+#if 0
+# define M 259200 // values from Numerical Recipes in C, 1988
+# define A 7141
+# define C 54773
+#else
+# define M 714025 // values from Numerical Recipes in C, 1988
+# define A 4096
+# define C 150889
+#endif
void
gc_set_seed(int seed)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r10227 - in gnuradio/branches/developers/eb/gcell-wip/gcell/lib/runtime: . spu,
eb <=