[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r7886 - in gnuradio/branches/developers/eb/gcell-wip:
From: |
eb |
Subject: |
[Commit-gnuradio] r7886 - in gnuradio/branches/developers/eb/gcell-wip: . src/include src/lib src/lib/spu |
Date: |
Thu, 28 Feb 2008 20:25:52 -0700 (MST) |
Author: eb
Date: 2008-02-28 20:25:51 -0700 (Thu, 28 Feb 2008)
New Revision: 7886
Added:
gnuradio/branches/developers/eb/gcell-wip/Makefile.common.spu
gnuradio/branches/developers/eb/gcell-wip/src/include/gc_declare_proc.h
Modified:
gnuradio/branches/developers/eb/gcell-wip/src/include/gc_job_desc.h
gnuradio/branches/developers/eb/gcell-wip/src/lib/gc_job_manager_impl.cc
gnuradio/branches/developers/eb/gcell-wip/src/lib/spu/Makefile.am
gnuradio/branches/developers/eb/gcell-wip/src/lib/spu/gc_spu_procs.c
Log:
work-in-progress on supporting user SPU code
Added: gnuradio/branches/developers/eb/gcell-wip/Makefile.common.spu
===================================================================
--- gnuradio/branches/developers/eb/gcell-wip/Makefile.common.spu
(rev 0)
+++ gnuradio/branches/developers/eb/gcell-wip/Makefile.common.spu
2008-02-29 03:25:51 UTC (rev 7886)
@@ -0,0 +1,37 @@
+#
+# Copyright 2007,2008 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+
+AR=spu-ar
+RANLIB=spu-ranlib
+CC=spu-cc
+LD=spu-ld
+
+WARNINGS = \
+ -Wall -Wextra -Wstrict-prototypes -Werror-implicit-function-declaration
+
+# Need to override user stuff even though it gives a warning.
+# (Otherwise these contain PPE related info.)
+
+CPPFLAGS=
+LDFLAGS=
+CFLAGS = -O3 --std=gnu99 -fstrict-aliasing $(WARNINGS)
+# -funroll-all-loops
+
+include $(top_srcdir)/Makefile.common
Added: gnuradio/branches/developers/eb/gcell-wip/src/include/gc_declare_proc.h
===================================================================
--- gnuradio/branches/developers/eb/gcell-wip/src/include/gc_declare_proc.h
(rev 0)
+++ gnuradio/branches/developers/eb/gcell-wip/src/include/gc_declare_proc.h
2008-02-29 03:25:51 UTC (rev 7886)
@@ -0,0 +1,55 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2008 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+#ifndef INCLUDED_GC_DECLARE_PROC_H
+#define INCLUDED_GC_DECLARE_PROC_H
+
+#include <stdint.h>
+#include <gc_job_desc.h>
+
+#define GC_PROC_DEF_SECTION_NAME ".gcell.proc_def"
+
+struct gc_proc_def {
+#if defined(__SPU__)
+ gc_spu_proc_t proc;
+#else
+ uint32_t proc;
+#endif
+ char name[28];
+};
+
+
+#if defined(__SPU__)
+/*!
+ * \brief Tell gcell about a SPU procedure
+ *
+ * \param _proc_ pointer to function (gc_spu_proc_t)
+ * \param _name_ the name of the procedure ("quoted string")
+ *
+ * This macro registers the given procedure with the gcell runtime.
+ * From the PPE, use gc_job_manager::lookup_proc to map \p _name_ to a
gc_proc_id_t
+ */
+#define GC_DECLARE_PROC(_proc_, _name_) \
+static struct gc_proc_def \
+ _GCPD_ ## _proc_ __attribute__((section(GC_PROC_DEF_SECTION_NAME), used)) = \
+ { _proc_, _name_ }
+#endif
+
+#endif /* INCLUDED_GC_DECLARE_PROC_H */
Property changes on:
gnuradio/branches/developers/eb/gcell-wip/src/include/gc_declare_proc.h
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: gnuradio/branches/developers/eb/gcell-wip/src/include/gc_job_desc.h
===================================================================
--- gnuradio/branches/developers/eb/gcell-wip/src/include/gc_job_desc.h
2008-02-29 02:28:01 UTC (rev 7885)
+++ gnuradio/branches/developers/eb/gcell-wip/src/include/gc_job_desc.h
2008-02-29 03:25:51 UTC (rev 7886)
@@ -70,6 +70,7 @@
JS_BAD_N_EA, // too many EA args
JS_ARGS_TOO_LONG, // total length of EA args exceeds limit
JS_BAD_JUJU, // misc problem: you're having a bad day
+ JS_BAD_JOB_DESC, // gc_job_desc was not allocated using
mgr->alloc_job_desc()
} gc_job_status_t;
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-02-29 02:28:01 UTC (rev 7885)
+++ gnuradio/branches/developers/eb/gcell-wip/src/lib/gc_job_manager_impl.cc
2008-02-29 03:25:51 UTC (rev 7886)
@@ -478,6 +478,13 @@
return false;
}
+ // Ensure it's one of our job descriptors
+
+ if (jd < d_jd || jd >= &d_jd[d_options.max_jobs]){
+ jd->status = JS_BAD_JOB_DESC;
+ return false;
+ }
+
// Ensure we've got a client_thread_info assigned to this thread.
gc_client_thread_info *cti =
Modified: gnuradio/branches/developers/eb/gcell-wip/src/lib/spu/Makefile.am
===================================================================
--- gnuradio/branches/developers/eb/gcell-wip/src/lib/spu/Makefile.am
2008-02-29 02:28:01 UTC (rev 7885)
+++ gnuradio/branches/developers/eb/gcell-wip/src/lib/spu/Makefile.am
2008-02-29 03:25:51 UTC (rev 7886)
@@ -1,5 +1,5 @@
#
-# Copyright 2007 Free Software Foundation, Inc.
+# Copyright 2007,2008 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -18,24 +18,8 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
-AR=spu-ar
-RANLIB=spu-ranlib
-CC=spu-cc
-LD=spu-ld
+include $(top_srcdir)/Makefile.common.spu
-WARNINGS = \
- -Wall -Wextra -Wstrict-prototypes -Werror-implicit-function-declaration
-
-# Need to override user stuff even though it gives a warning.
-# (Otherwise these contain PPE related info.)
-
-CPPFLAGS=
-LDFLAGS=
-CFLAGS = -O3 --std=gnu99 -fstrict-aliasing $(WARNINGS)
-# -funroll-all-loops
-
-include $(top_srcdir)/Makefile.common
-
AM_CPPFLAGS = $(SPU_DEFINES_AND_INCLUDES) $(IBM_SPU_SYNC_INCLUDES)
# libraray of SPU code
Modified: gnuradio/branches/developers/eb/gcell-wip/src/lib/spu/gc_spu_procs.c
===================================================================
--- gnuradio/branches/developers/eb/gcell-wip/src/lib/spu/gc_spu_procs.c
2008-02-29 02:28:01 UTC (rev 7885)
+++ gnuradio/branches/developers/eb/gcell-wip/src/lib/spu/gc_spu_procs.c
2008-02-29 03:25:51 UTC (rev 7886)
@@ -21,8 +21,8 @@
#include <gc_spu_procs.h>
#include <gc_delay.h>
+#include <gc_declare_proc.h>
#include <string.h>
-//#include <stdio.h>
#define _UNUSED __attribute__((unused))
@@ -36,6 +36,7 @@
{
}
+
static void
gcp_qa_udelay(const gc_job_direct_args_t *input,
gc_job_direct_args_t *output _UNUSED,
@@ -120,7 +121,14 @@
memcpy(eaa->arg[0].ls_addr, eaa->arg[1].ls_addr, n);
}
+GC_DECLARE_PROC(gcp_qa_nop, "qa_nop");
+GC_DECLARE_PROC(gcp_qa_udelay, "qa_udelay");
+GC_DECLARE_PROC(gcp_qa_sum_shorts, "qa_sum_shorts");
+GC_DECLARE_PROC(gcp_qa_put_seq, "qa_put_seq");
+GC_DECLARE_PROC(gcp_qa_put_zeros, "qa_put_zeros");
+GC_DECLARE_PROC(gcp_qa_copy, "qa_copy");
+
gc_spu_proc_t gc_proc_table[GCP_NPROC_IDS] = {
[GCP_QA_NOP] = gcp_qa_nop,
[GCP_QA_UDELAY] = gcp_qa_udelay,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r7886 - in gnuradio/branches/developers/eb/gcell-wip: . src/include src/lib src/lib/spu,
eb <=