[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r7853 - in gnuradio/branches/developers/eb/gcell/src:
From: |
eb |
Subject: |
[Commit-gnuradio] r7853 - in gnuradio/branches/developers/eb/gcell/src: include lib lib/spu |
Date: |
Tue, 26 Feb 2008 19:10:50 -0700 (MST) |
Author: eb
Date: 2008-02-26 19:10:50 -0700 (Tue, 26 Feb 2008)
New Revision: 7853
Modified:
gnuradio/branches/developers/eb/gcell/src/include/gc_proc_ids_private.h
gnuradio/branches/developers/eb/gcell/src/lib/gc_job_manager_impl.cc
gnuradio/branches/developers/eb/gcell/src/lib/spu/gc_spu_procs.c
gnuradio/branches/developers/eb/gcell/src/lib/spu/gcell_spu_main.c
Log:
minor cleanup
Modified:
gnuradio/branches/developers/eb/gcell/src/include/gc_proc_ids_private.h
===================================================================
--- gnuradio/branches/developers/eb/gcell/src/include/gc_proc_ids_private.h
2008-02-27 00:05:37 UTC (rev 7852)
+++ gnuradio/branches/developers/eb/gcell/src/include/gc_proc_ids_private.h
2008-02-27 02:10:50 UTC (rev 7853)
@@ -29,7 +29,8 @@
#define GCP_QA_UDELAY 1 // delay by arg[0] microseconds
#define GCP_QA_SUM_SHORTS 2 // sum elements of ea.arg[i], return in
output.arg[i].s32
#define GCP_QA_PUT_SEQ 3 // write seq of chars to ea.arg[i],
initial value in input.arg[0].s32
-#define GCP_QA_COPY 4 // copy ea.arg[0] = ea.arg[1]
+#define GCP_QA_PUT_ZEROS 4 // write zeros to ea.arg[*]
+#define GCP_QA_COPY 5 // copy ea.arg[0] = ea.arg[1]
#define GCP_NPROC_IDS 16
Modified: gnuradio/branches/developers/eb/gcell/src/lib/gc_job_manager_impl.cc
===================================================================
--- gnuradio/branches/developers/eb/gcell/src/lib/gc_job_manager_impl.cc
2008-02-27 00:05:37 UTC (rev 7852)
+++ gnuradio/branches/developers/eb/gcell/src/lib/gc_job_manager_impl.cc
2008-02-27 02:10:50 UTC (rev 7853)
@@ -1154,6 +1154,7 @@
{ "qa_udelay", GCP_QA_UDELAY },
{ "qa_sum_shorts", GCP_QA_SUM_SHORTS },
{ "qa_put_seq", GCP_QA_PUT_SEQ },
+ { "qa_put_zeros", GCP_QA_PUT_ZEROS },
{ "qa_copy", GCP_QA_COPY }
};
Modified: gnuradio/branches/developers/eb/gcell/src/lib/spu/gc_spu_procs.c
===================================================================
--- gnuradio/branches/developers/eb/gcell/src/lib/spu/gc_spu_procs.c
2008-02-27 00:05:37 UTC (rev 7852)
+++ gnuradio/branches/developers/eb/gcell/src/lib/spu/gc_spu_procs.c
2008-02-27 02:10:50 UTC (rev 7853)
@@ -21,8 +21,8 @@
#include <gc_spu_procs.h>
#include <gc_delay.h>
-#include <stdio.h>
#include <string.h>
+//#include <stdio.h>
#define _UNUSED __attribute__((unused))
@@ -76,8 +76,8 @@
static void
gcp_qa_put_seq(const gc_job_direct_args_t *input,
- gc_job_direct_args_t *output _UNUSED,
- const gc_job_ea_args_t *eaa)
+ gc_job_direct_args_t *output _UNUSED,
+ const gc_job_ea_args_t *eaa)
{
int counter = input->arg[0].s32;
@@ -90,6 +90,17 @@
}
static void
+gcp_qa_put_zeros(const gc_job_direct_args_t *input _UNUSED,
+ gc_job_direct_args_t *output _UNUSED,
+ const gc_job_ea_args_t *eaa)
+{
+ for (unsigned int i = 0; i < eaa->nargs; i++){
+ if (eaa->arg[i].direction == GCJD_DMA_PUT)
+ memset(eaa->arg[i].ls_addr, 0, eaa->arg[i].put_size);
+ }
+}
+
+static void
gcp_qa_copy(const gc_job_direct_args_t *input _UNUSED,
gc_job_direct_args_t *output,
const gc_job_ea_args_t *eaa)
@@ -115,5 +126,6 @@
[GCP_QA_UDELAY] = gcp_qa_udelay,
[GCP_QA_SUM_SHORTS] = gcp_qa_sum_shorts,
[GCP_QA_PUT_SEQ] = gcp_qa_put_seq,
+ [GCP_QA_PUT_ZEROS] = gcp_qa_put_zeros,
[GCP_QA_COPY] = gcp_qa_copy,
};
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-27 00:05:37 UTC (rev 7852)
+++ gnuradio/branches/developers/eb/gcell/src/lib/spu/gcell_spu_main.c
2008-02-27 02:10:50 UTC (rev 7853)
@@ -19,7 +19,6 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#include <stdio.h>
#include <spu_intrinsics.h>
#include <spu_mfcio.h>
#include <sync_utils.h>
@@ -34,6 +33,7 @@
#include "spu_buffers.h"
#include <string.h>
#include <assert.h>
+// #include <stdio.h>
#define MIN(a,b) ((a) < (b) ? (a) : (b))
@@ -103,15 +103,6 @@
if (comp_info.ncomplete == 0)
return;
- if (0){
- static int total_jobs = 0;
- static int total_msgs = 0;
- total_msgs++;
- total_jobs += comp_info.ncomplete;
- printf("spe[%2d]: tj = %6d tm = %6d\n", spu_args.spu_idx,
- total_jobs, total_msgs);
- }
-
// ensure that PPE is done with the buffer we're about to overwrite
wait_for_ppe_to_be_done_with_comp_info(ci_idx);
@@ -198,10 +189,6 @@
// ------------------------------------------------------------------------
-//
-// Handle the nasty case of a dma xfer that's less than 16 bytes long
-// len is guaranteed to be in [1, 15]
-
static inline unsigned int
make_mask(int nbits)
{
@@ -231,8 +218,12 @@
}
}
+// Handle the nasty case of a dma xfer that's less than 16 bytes long.
+// len is guaranteed to be in [1, 15]
+
static void
-handle_slow_and_tedious_dma(gc_eaddr_t ea, unsigned char *ls, unsigned int
len, int put_tag)
+handle_slow_and_tedious_dma(gc_eaddr_t ea, unsigned char *ls,
+ unsigned int len, int put_tag)
{
// special case two likely cases, otherwise handle with divide and conquer
unsigned int t = (((uintptr_t) ls) | len) & 0x7;
@@ -354,14 +345,6 @@
&& dma_len <= (eaa->arg[i].get_size + offset +
CACHE_LINE_SIZE - 1));
}
- if (0){
- printf("eaa->arg[%d]\n", i);
- printf(" ea_addr = %8llx\n", eaa->arg[i].ea_addr);
- printf(" direct = %s\n", eaa->arg[i].direction == GCJD_DMA_GET
? "get" : "put");
- printf(" get_size = %6d\n", eaa->arg[i].get_size);
- printf(" ls_addr = %p\n", eaa->arg[i].ls_addr);
- }
-
// add to dma get list
// FIXME (someday) the dma lists is where the JS_BAD_EAH limitation
comes from
@@ -369,10 +352,6 @@
int n = MIN(dma_len, MFC_MAX_DMA_SIZE);
dma_get_list[gli].size = n;
dma_get_list[gli].eal = mfc_ea2l(ea_base);
- if (0){
- printf(" dma_get_list[%d].size = %6d\n", gli,
dma_get_list[gli].size);
- printf(" dma_get_list[%d].eal = 0x%08x\n", gli,
dma_get_list[gli].eal);
- }
dma_len -= n;
ea_base += n;
gli++;
@@ -404,7 +383,8 @@
eaa->arg[i].ls_addr = ls_base + offset;
if (1){
- assert((mfc_ea2l(eaa->arg[i].ea_addr) & 0x7f) ==
((intptr_t)eaa->arg[i].ls_addr & 0x7f));
+ assert((mfc_ea2l(eaa->arg[i].ea_addr) & 0x7f)
+ == ((intptr_t)eaa->arg[i].ls_addr & 0x7f));
assert((ea_base & 0x7f) == 0);
assert(((intptr_t)ls_base & 0x7f) == 0);
}
@@ -454,25 +434,25 @@
// handle the "pre-multiple-of-16" portion
// do 1, 2, 4, or 8 byte xfers as required
- if (ea & 0x1){ // do a 1-byte
xfer
+ if (ea & 0x1){ // do a 1-byte xfer
mfc_put(ls, ea, 1, put_tag, 0, 0);
ea += 1;
ls += 1;
len -= 1;
}
- if (ea & 0x2){ // do a 2-byte
xfer
+ if (ea & 0x2){ // do a 2-byte xfer
mfc_put(ls, ea, 2, put_tag, 0, 0);
ea += 2;
ls += 2;
len -= 2;
}
- if (ea & 0x4){ // do a 4-byte
xfer
+ if (ea & 0x4){ // do a 4-byte xfer
mfc_put(ls, ea, 4, put_tag, 0, 0);
ea += 4;
ls += 4;
len -= 4;
}
- if (ea & 0x8){ // do an 8-byte
xfer
+ if (ea & 0x8){ // do an 8-byte xfer
mfc_put(ls, ea, 8, put_tag, 0, 0);
ea += 8;
ls += 8;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r7853 - in gnuradio/branches/developers/eb/gcell/src: include lib lib/spu,
eb <=