[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r7561 - in gnuradio/branches/developers/eb/gcell/src:
From: |
eb |
Subject: |
[Commit-gnuradio] r7561 - in gnuradio/branches/developers/eb/gcell/src: apps lib/spu |
Date: |
Mon, 4 Feb 2008 22:13:26 -0700 (MST) |
Author: eb
Date: 2008-02-04 22:13:25 -0700 (Mon, 04 Feb 2008)
New Revision: 7561
Modified:
gnuradio/branches/developers/eb/gcell/src/apps/benchmark_nop.cc
gnuradio/branches/developers/eb/gcell/src/apps/gen_script.py
gnuradio/branches/developers/eb/gcell/src/lib/spu/gc_delay.c
gnuradio/branches/developers/eb/gcell/src/lib/spu/test_spu.c
Log:
gcell work-in-progress
Modified: gnuradio/branches/developers/eb/gcell/src/apps/benchmark_nop.cc
===================================================================
--- gnuradio/branches/developers/eb/gcell/src/apps/benchmark_nop.cc
2008-02-05 02:21:21 UTC (rev 7560)
+++ gnuradio/branches/developers/eb/gcell/src/apps/benchmark_nop.cc
2008-02-05 05:13:25 UTC (rev 7561)
@@ -39,7 +39,7 @@
static void
run_test(unsigned int nspes, unsigned int usecs)
{
- static const int NJDS = 64;
+ static const int NJDS = 32;
static const int njobs = static_cast<int>(1e6);
int nsubmitted = 0;
int ncompleted = 0;
@@ -110,8 +110,8 @@
// stop timing
mb_time t_stop = mb_time::time();
double delta = (t_stop - t_start).double_time();
- printf("nspes: %2d udelay: %4d elapsed_time: %7.3f njobs: %g us/job:
%7.3f\n",
- mgr->nspes(), usecs, delta, (double) njobs, delta/njobs*1e6);
+ printf("nspes: %2d udelay: %4d elapsed_time: %7.3f njobs: %g\n",
+ mgr->nspes(), usecs, delta, (double) njobs);
delete mgr;
}
Modified: gnuradio/branches/developers/eb/gcell/src/apps/gen_script.py
===================================================================
--- gnuradio/branches/developers/eb/gcell/src/apps/gen_script.py
2008-02-05 02:21:21 UTC (rev 7560)
+++ gnuradio/branches/developers/eb/gcell/src/apps/gen_script.py
2008-02-05 05:13:25 UTC (rev 7561)
@@ -16,9 +16,9 @@
f = sys.stdout
for udelay in (1, 10, 50, 100, 200, 300, 500):
for nspes in range(1, options.max_spes+1):
+ # f.write("./benchmark_nop -n %d -u %d\n" % (nspes, udelay))
f.write("./benchmark_nop -n %d -u %d\n" % (nspes, udelay))
f.write("./benchmark_nop -n %d -u %d\n" % (nspes, udelay))
- f.write("./benchmark_nop -n %d -u %d\n" % (nspes, udelay))
if __name__ == '__main__':
main()
Modified: gnuradio/branches/developers/eb/gcell/src/lib/spu/gc_delay.c
===================================================================
--- gnuradio/branches/developers/eb/gcell/src/lib/spu/gc_delay.c
2008-02-05 02:21:21 UTC (rev 7560)
+++ gnuradio/branches/developers/eb/gcell/src/lib/spu/gc_delay.c
2008-02-05 05:13:25 UTC (rev 7561)
@@ -25,7 +25,7 @@
inline static void
gc_udelay_1us(void)
{
- unsigned int i = 160;
+ unsigned int i = 158;
do { // 20 clocks per iteration of the loop
asm ("nop $127; nop $127; nop $127; nop $127; nop $127");
Modified: gnuradio/branches/developers/eb/gcell/src/lib/spu/test_spu.c
===================================================================
--- gnuradio/branches/developers/eb/gcell/src/lib/spu/test_spu.c
2008-02-05 02:21:21 UTC (rev 7560)
+++ gnuradio/branches/developers/eb/gcell/src/lib/spu/test_spu.c
2008-02-05 05:13:25 UTC (rev 7561)
@@ -33,13 +33,15 @@
gc_spu_args_t spu_args;
-#define BACKOFF_CAP ((1 << 12) - 1) // 4095 cycles, about 1.3 us
+//#define BACKOFF_CAP ((1 << 12) - 1) // 4095 cycles, about 1.3 us
+//#define BACKOFF_CAP ((1 << 16) - 1) // 65535 cycles, about 20.4 us
+#define BACKOFF_CAP ((1 << 18) - 1) // 262143 cycles, about 81.9 us
static unsigned int backoff; // current backoff value in clock cycles
void
backoff_reset(void)
{
- backoff = ((1 << (spu_args.spu_idx & 0x3)) + 1) & BACKOFF_CAP;
+ backoff = ((1 << (spu_args.spu_idx & 0x7)) + 1) & BACKOFF_CAP;
}
void
@@ -129,6 +131,33 @@
backoff_reset(); // initialize our backoff counter
+#if 0
+ // check calibration on our two delay methods using DECREMENTER
+ spu_writech(SPU_WrDec, 0xffffffff);
+ int start, stop;
+ start = spu_readch(SPU_RdDec);
+ gc_udelay(1);
+ stop = spu_readch(SPU_RdDec);
+ printf("gc_udelay(1) -> %d decrementer counts\n", start - stop);
+ start = spu_readch(SPU_RdDec);
+ gc_udelay(100);
+ stop = spu_readch(SPU_RdDec);
+ printf("gc_udelay(100) -> %d decrementer counts\n", start - stop);
+ start = spu_readch(SPU_RdDec);
+ gc_udelay(200);
+ stop = spu_readch(SPU_RdDec);
+ printf("gc_udelay(200) -> %d decrementer counts\n", start - stop);
+
+ start = spu_readch(SPU_RdDec);
+ gc_cdelay(320000);
+ stop = spu_readch(SPU_RdDec);
+ printf("gc_cdelay(320000) -> %d decrementer counts\n", start - stop);
+ start = spu_readch(SPU_RdDec);
+ gc_cdelay(640000);
+ stop = spu_readch(SPU_RdDec);
+ printf("gc_cdelay(640000) -> %d decrementer counts\n", start - stop);
+#endif
+
main_loop();
return 0;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r7561 - in gnuradio/branches/developers/eb/gcell/src: apps lib/spu,
eb <=