summaryrefslogtreecommitdiff
path: root/gr-gcell/src
diff options
context:
space:
mode:
Diffstat (limited to 'gr-gcell/src')
-rw-r--r--gr-gcell/src/.gitignore39
-rw-r--r--gr-gcell/src/Makefile.am89
-rw-r--r--gr-gcell/src/Makefile.swig.gen145
-rw-r--r--gr-gcell/src/examples/.gitignore32
-rw-r--r--gr-gcell/src/examples/Makefile.am28
-rw-r--r--gr-gcell/src/gc_job_manager.i75
-rw-r--r--gr-gcell/src/gcell.i40
-rw-r--r--gr-gcell/src/gcell_fft_vcc.cc160
-rw-r--r--gr-gcell/src/gcell_fft_vcc.h64
-rw-r--r--gr-gcell/src/gcell_fft_vcc.i56
-rwxr-xr-xgr-gcell/src/qa_fft.py162
-rw-r--r--gr-gcell/src/run_tests.in10
12 files changed, 0 insertions, 900 deletions
diff --git a/gr-gcell/src/.gitignore b/gr-gcell/src/.gitignore
deleted file mode 100644
index bea05149a..000000000
--- a/gr-gcell/src/.gitignore
+++ /dev/null
@@ -1,39 +0,0 @@
-/*.cache
-/*.la
-/*.lo
-/*.pc
-/.deps
-/.la
-/.libs
-/.lo
-/Makefile
-/Makefile.in
-/aclocal.m4
-/autom4te.cache
-/config.cache
-/config.h
-/config.h.in
-/config.log
-/config.status
-/configure
-/depcomp
-/install-sh
-/libtool
-/ltmain.sh
-/make.log
-/missing
-/missing
-/mkinstalldirs
-/py-compile
-/stamp-h
-/stamp-h.in
-/stamp-h1
-/stamp-h1.in
-/stamp-h2.in
-/run_tests
-/gcell.d
-/gcell.cc
-/gcell.py
-/gnuradio
-/guile
-/python
diff --git a/gr-gcell/src/Makefile.am b/gr-gcell/src/Makefile.am
deleted file mode 100644
index dfbd8f828..000000000
--- a/gr-gcell/src/Makefile.am
+++ /dev/null
@@ -1,89 +0,0 @@
-#
-# Copyright 2008,2009,2010 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.
-#
-
-include $(top_srcdir)/Makefile.common
-include $(top_srcdir)/Makefile.swig
-
-TESTS =
-EXTRA_DIST += run_tests.in
-DISTCLEANFILES += run_tests
-
-SUBDIRS = . examples
-
-AM_CPPFLAGS = $(GCELL_INCLUDES) $(STD_DEFINES_AND_INCLUDES) \
- $(PYTHON_CPPFLAGS) $(WITH_INCLUDES)
-
-# ----------------------------------------------------------------
-
-noinst_PYTHON = \
- qa_fft.py
-
-
-# ----------------------------------------------------------------
-# The C++ blocks
-# ----------------------------------------------------------------
-
-# the library for the C++ blocks
-lib_LTLIBRARIES = libgnuradio_gcell.la
-
-libgnuradio_gcell_la_SOURCES = \
- gcell_fft_vcc.cc
-
-# C/C++ headers get installed in ${prefix}/include/gnuradio
-grinclude_HEADERS = \
- gcell_fft_vcc.h
-
-libgnuradio_gcell_la_LIBADD = \
- $(GNURADIO_CORE_LA) \
- $(GCELL_LA)
-
-libgnuradio_gcell_la_LDFLAGS = $(NO_UNDEFINED) $(LTVERSIONFLAGS)
-
-# ----------------------------------------------------------------
-# SWIG stuff
-# ----------------------------------------------------------------
-
-TOP_SWIG_IFILES = \
- gcell.i
-
-# Install so that they end up available as:
-# import gnuradio.gcell
-# This ends up at:
-# ${prefix}/lib/python${python_version}/site-packages/gnuradio
-gcell_pythondir_category = \
- gnuradio
-
-# additional arguments to the SWIG command
-gcell_swig_args = \
- $(GCELL_INCLUDES)
-
-# additional libraries for linking with the SWIG-generated library
-gcell_la_swig_libadd = \
- libgnuradio_gcell.la
-
-# additional SWIG files to be installed
-gcell_swiginclude_headers = \
- gc_job_manager.i \
- gcell_fft_vcc.i
-
-
-if PYTHON
-TESTS += run_tests
-endif
diff --git a/gr-gcell/src/Makefile.swig.gen b/gr-gcell/src/Makefile.swig.gen
deleted file mode 100644
index dcd8bdefb..000000000
--- a/gr-gcell/src/Makefile.swig.gen
+++ /dev/null
@@ -1,145 +0,0 @@
-# -*- Makefile -*-
-#
-# Copyright 2009 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 GNU Radio; see the file COPYING. If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-# Makefile.swig.gen for gcell.i
-
-## Default install locations for these files:
-##
-## Default location for the Python directory is:
-## ${prefix}/lib/python${python_version}/site-packages/[category]/gcell
-## Default location for the Python exec directory is:
-## ${exec_prefix}/lib/python${python_version}/site-packages/[category]/gcell
-##
-## The following can be overloaded to change the install location, but
-## this has to be done in the including Makefile.am -before-
-## Makefile.swig is included.
-
-gcell_pythondir_category ?= gnuradio/gcell
-gcell_pylibdir_category ?= $(gcell_pythondir_category)
-gcell_pythondir = $(pythondir)/$(gcell_pythondir_category)
-gcell_pylibdir = $(pyexecdir)/$(gcell_pylibdir_category)
-
-# The .so libraries for the guile modules get installed whereever guile
-# is installed, usually /usr/lib/guile/gnuradio/
-# FIXME: determince whether these should be installed with gnuradio.
-gcell_scmlibdir = $(libdir)
-
-# The scm files for the guile modules get installed where ever guile
-# is installed, usually /usr/share/guile/site/gcell
-# FIXME: determince whether these should be installed with gnuradio.
-gcell_scmdir = $(guiledir)
-
-## SWIG headers are always installed into the same directory.
-
-gcell_swigincludedir = $(swigincludedir)
-
-## This is a template file for a "generated" Makefile addition (in
-## this case, "Makefile.swig.gen"). By including the top-level
-## Makefile.swig, this file will be used to generate the SWIG
-## dependencies. Assign the variable TOP_SWIG_FILES to be the list of
-## SWIG .i files to generated wrappings for; there can be more than 1
-## so long as the names are unique (no sorting is done on the
-## TOP_SWIG_FILES list). This file explicitly assumes that a SWIG .i
-## file will generate .cc, .py, and possibly .h files -- meaning that
-## all of these files will have the same base name (that provided for
-## the SWIG .i file).
-##
-## This code is setup to ensure parallel MAKE ("-j" or "-jN") does the
-## right thing. For more info, see <
-## http://sources.redhat.com/automake/automake.html#Multiple-Outputs >
-
-## Other cleaned files: dependency files generated by SWIG or this Makefile
-
-MOSTLYCLEANFILES += $(DEPDIR)/*.S*
-
-## Various SWIG variables. These can be overloaded in the including
-## Makefile.am by setting the variable value there, then including
-## Makefile.swig .
-
-gcell_swiginclude_HEADERS = \
- gcell.i \
- $(gcell_swiginclude_headers)
-
-if PYTHON
-gcell_pylib_LTLIBRARIES = \
- _gcell.la
-
-_gcell_la_SOURCES = \
- python/gcell.cc \
- $(gcell_la_swig_sources)
-
-gcell_python_PYTHON = \
- gcell.py \
- $(gcell_python)
-
-_gcell_la_LIBADD = \
- $(STD_SWIG_LA_LIB_ADD) \
- $(gcell_la_swig_libadd)
-
-_gcell_la_LDFLAGS = \
- $(STD_SWIG_LA_LD_FLAGS) \
- $(gcell_la_swig_ldflags)
-
-_gcell_la_CXXFLAGS = \
- $(STD_SWIG_CXX_FLAGS) \
- -I$(top_builddir) \
- $(gcell_la_swig_cxxflags)
-
-python/gcell.cc: gcell.py
-gcell.py: gcell.i
-
-# Include the python dependencies for this file
--include python/gcell.d
-
-endif # end of if python
-
-if GUILE
-
-gcell_scmlib_LTLIBRARIES = \
- libguile-gnuradio-gcell.la
-libguile_gnuradio_gcell_la_SOURCES = \
- guile/gcell.cc \
- $(gcell_la_swig_sources)
-nobase_gcell_scm_DATA = \
- gnuradio/gcell.scm \
- gnuradio/gcell-primitive.scm
-libguile_gnuradio_gcell_la_LIBADD = \
- $(STD_SWIG_LA_LIB_ADD) \
- $(gcell_la_swig_libadd)
-libguile_gnuradio_gcell_la_LDFLAGS = \
- $(STD_SWIG_LA_LD_FLAGS) \
- $(gcell_la_swig_ldflags)
-libguile_gnuradio_gcell_la_CXXFLAGS = \
- $(STD_SWIG_CXX_FLAGS) \
- -I$(top_builddir) \
- $(gcell_la_swig_cxxflags)
-
-guile/gcell.cc: gnuradio/gcell.scm
-gnuradio/gcell.scm: gcell.i
-gnuradio/gcell-primitive.scm: gnuradio/gcell.scm
-
-# Include the guile dependencies for this file
--include guile/gcell.d
-
-endif # end of GUILE
-
-
diff --git a/gr-gcell/src/examples/.gitignore b/gr-gcell/src/examples/.gitignore
deleted file mode 100644
index 53edad32f..000000000
--- a/gr-gcell/src/examples/.gitignore
+++ /dev/null
@@ -1,32 +0,0 @@
-/*.cache
-/*.la
-/*.lo
-/*.pc
-/.deps
-/.la
-/.libs
-/.lo
-/Makefile
-/Makefile.in
-/aclocal.m4
-/autom4te.cache
-/config.cache
-/config.h
-/config.h.in
-/config.log
-/config.status
-/configure
-/depcomp
-/install-sh
-/libtool
-/ltmain.sh
-/make.log
-/missing
-/missing
-/mkinstalldirs
-/py-compile
-/stamp-h
-/stamp-h.in
-/stamp-h1
-/stamp-h1.in
-/stamp-h2.in
diff --git a/gr-gcell/src/examples/Makefile.am b/gr-gcell/src/examples/Makefile.am
deleted file mode 100644
index bdea961ea..000000000
--- a/gr-gcell/src/examples/Makefile.am
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-# Copyright 2008,2009 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 GNU Radio; see the file COPYING. If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-include $(top_srcdir)/Makefile.common
-
-#ourdatadir = $(exampledir)/gcell
-
-#dist_ourdata_DATA = README
-
-#dist_ourdata_SCRIPTS = fsm_utils.py
diff --git a/gr-gcell/src/gc_job_manager.i b/gr-gcell/src/gc_job_manager.i
deleted file mode 100644
index 7bec48e19..000000000
--- a/gr-gcell/src/gc_job_manager.i
+++ /dev/null
@@ -1,75 +0,0 @@
-/* -*- 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.
- */
-
-struct spe_program_handle_t;
-typedef boost::shared_ptr<spe_program_handle_t> spe_program_handle_sptr;
-%template(spe_program_handle_sptr) boost::shared_ptr<spe_program_handle_t>;
-
-class gc_job_manager;
-typedef boost::shared_ptr<gc_job_manager> gc_job_manager_sptr;
-%template(gc_job_manager_sptr) boost::shared_ptr<gc_job_manager>;
-
-
-%rename(program_handle_from_filename) gc_program_handle_from_filename;
-spe_program_handle_sptr
-gc_program_handle_from_filename(const std::string &filename);
-
-%rename(program_handle_from_address) gc_program_handle_from_address;
-spe_program_handle_sptr
-gc_program_handle_from_address(spe_program_handle_t *handle);
-
-
-%rename(jm_options) gc_jm_options;
-struct gc_jm_options {
- unsigned int max_jobs; // max # of job descriptors in system
- unsigned int max_client_threads; // max # of client threads of job manager
- unsigned int nspes; // how many SPEs shall we use? 0 -> all of them
- bool gang_schedule; // shall we gang schedule?
- bool use_affinity; // shall we try for affinity (FIXME not implmented)
- bool enable_logging; // shall we log SPE events?
- uint32_t log2_nlog_entries; // log2 of number of log entries (default is 12 == 4k)
- spe_program_handle_sptr program_handle; // program to load into SPEs
-
- gc_jm_options(spe_program_handle_sptr program_handle_,
- unsigned int nspes_ = 0) :
- max_jobs(0), max_client_threads(0), nspes(nspes_),
- gang_schedule(false), use_affinity(false),
- enable_logging(false), log2_nlog_entries(12),
- program_handle(program_handle_)
- {
- }
-};
-
-%rename(job_manager) gc_make_job_manager;
-gc_job_manager_sptr
-gc_make_job_manager(const gc_jm_options *options);
-
-%inline {
- void set_singleton(gc_job_manager_sptr mgr)
- {
- gc_job_manager::set_singleton(mgr);
- }
-
- gc_job_manager_sptr singleton()
- {
- return gc_job_manager::singleton();
- }
-}
diff --git a/gr-gcell/src/gcell.i b/gr-gcell/src/gcell.i
deleted file mode 100644
index 7437b9d4e..000000000
--- a/gr-gcell/src/gcell.i
+++ /dev/null
@@ -1,40 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2008,2009 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.
- */
-
-%include "gnuradio.i" // the common stuff
-
-%{
-#include <gcell/gc_job_manager.h>
-#include <gcell_fft_vcc.h>
-%}
-
-%include "gc_job_manager.i"
-%include "gcell_fft_vcc.i"
-
-#if SWIGGUILE
-%scheme %{
-(load-extension-global "libguile-gnuradio-gcell" "scm_init_gnuradio_gcell_module")
-%}
-
-%goops %{
-(use-modules (gnuradio gnuradio_core_runtime))
-%}
-#endif
diff --git a/gr-gcell/src/gcell_fft_vcc.cc b/gr-gcell/src/gcell_fft_vcc.cc
deleted file mode 100644
index ae40b6fad..000000000
--- a/gr-gcell/src/gcell_fft_vcc.cc
+++ /dev/null
@@ -1,160 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2007,2008,2010 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 GNU Radio; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <gcell_fft_vcc.h>
-#include <gr_io_signature.h>
-#include <gcell/gc_job_manager.h>
-#include <gcell/gc_aligned_alloc.h>
-#include <gcell/gcp_fft_1d_r2.h>
-#include <math.h>
-#include <assert.h>
-#include <stdexcept>
-#include <string.h>
-
-
-#define MIN_FFT_SIZE 32
-#define MAX_FFT_SIZE 4096
-
-inline static bool
-is_power_of_2(int x)
-{
- return x != 0 && (x & (x-1)) == 0;
-}
-
-static int
-int_log2(int x) // x is an exact power of 2
-{
- for (int i = 0; i < 32; i++)
- if (x == (1 << i))
- return i;
-
- assert(0);
-}
-
-#if 0
-gr_fft_vcc_sptr
-gcell_make_fft_vcc(int fft_size, bool forward, const std::vector<float> &window, bool shift)
-{
- // If it doesn't meet our constraints, use standard implemenation
- if (fft_size < MIN_FFT_SIZE || fft_size > MAX_FFT_SIZE
- || !is_power_of_2(fft_size)
- || (window.size() != 0 && fft_size > MAX_FFT_SIZE/2))
- return gr_make_fft_vcc(fft_size, forward, window, shift);
- else
- return gr_fft_vcc_sptr (new gcell_fft_vcc(fft_size, forward, window, shift));
-}
-#else
-
-gcell_fft_vcc_sptr
-gcell_make_fft_vcc(int fft_size, bool forward, const std::vector<float> &window, bool shift)
-{
- return gnuradio::get_initial_sptr(new gcell_fft_vcc(fft_size, forward, window, shift));
-}
-
-#endif
-
-gcell_fft_vcc::gcell_fft_vcc (int fft_size, bool forward,
- const std::vector<float> &window, bool shift)
- : gr_fft_vcc("gcell_fft_vcc", fft_size, forward, window, shift)
-{
- if (fft_size < MIN_FFT_SIZE || fft_size > MAX_FFT_SIZE || !is_power_of_2(fft_size)){
- throw std::invalid_argument("fft_size");
- }
-
- if (window.size() != 0 && fft_size > MAX_FFT_SIZE/2){
- throw std::invalid_argument("fft_size too big to use window");
- }
-
- d_log2_fft_size = int_log2(fft_size);
- d_mgr = gc_job_manager::singleton(); // grab the singleton job manager
- d_twiddle_boost = gc_aligned_alloc_sptr(sizeof(std::complex<float>) * fft_size/4, 128);
- d_twiddle = (std::complex<float>*) d_twiddle_boost.get();
- gcp_fft_1d_r2_twiddle(d_log2_fft_size, d_twiddle);
-}
-
-gcell_fft_vcc::~gcell_fft_vcc ()
-{
-}
-
-int
-gcell_fft_vcc::work(int noutput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items)
-{
- const gr_complex *in = (const gr_complex *) input_items[0];
- gr_complex *out = (gr_complex *) output_items[0];
-
- // unsigned int input_data_size = input_signature()->sizeof_stream_item(0);
- // unsigned int output_data_size = output_signature()->sizeof_stream_item(0);
-
- float window_buf[MAX_FFT_SIZE/2] __attribute__((aligned (16)));
- float *window = 0;
-
- // If we've got a window, ensure it's 16-byte aligned
- // FIXME move this to set_window
- if (d_window.size()){
- if ((((intptr_t)&d_window[0]) & 0xf) == 0)
- window = &d_window[0]; // OK as is
- else {
- window = window_buf; // copy to aligned buffer
- memcpy(window, &d_window[0], sizeof(float) * d_window.size());
- }
- }
-
- std::vector<gc_job_desc_sptr> jd_sptr(noutput_items);
- gc_job_desc *jd[noutput_items];
- bool done[noutput_items];
-
- // submit noutput_items jobs in parallel
-
- for (int i = 0; i < noutput_items; i++){
- jd_sptr[i] = gcp_fft_1d_r2_submit(d_mgr, d_log2_fft_size,
- d_forward, d_shift,
- &out[i * d_fft_size],
- &in[i * d_fft_size],
- d_twiddle,
- window);
- jd[i] = jd_sptr[i].get();
- }
-
- int n = d_mgr->wait_jobs(noutput_items, jd, done, GC_WAIT_ALL);
- if (n != noutput_items){
- fprintf(stderr, "gcell_fft_vcc: wait_jobs returned %d, expected %d\n",
- n, noutput_items);
- return -1;
- }
-
- for (int i = 0; i < noutput_items; i++){
- if (jd[i]->status != JS_OK){
- fprintf(stderr, "gcell_fft_vcc jd[%d]->status = %s\n",
- i, gc_job_status_string(jd[i]->status).c_str());
- return -1;
- }
- }
-
- return noutput_items;
-}
-
diff --git a/gr-gcell/src/gcell_fft_vcc.h b/gr-gcell/src/gcell_fft_vcc.h
deleted file mode 100644
index 9e3035b44..000000000
--- a/gr-gcell/src/gcell_fft_vcc.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,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 GNU Radio; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef INCLUDED_GCELL_FFT_VCC_H
-#define INCLUDED_GCELL_FFT_VCC_H
-
-#include <gr_fft_vcc.h>
-
-class gc_job_manager;
-
-class gcell_fft_vcc;
-typedef boost::shared_ptr<gcell_fft_vcc> gcell_fft_vcc_sptr;
-
-gcell_fft_vcc_sptr
-gcell_make_fft_vcc(int fft_size, bool forward, const std::vector<float> &window, bool shift=false);
-
-/*!
- * \brief Compute forward or reverse FFT. complex vector in / complex vector out.
- * \ingroup dft_blk
- * \ingroup gcell
- *
- * Concrete class that uses gcell to offload FFT to SPEs.
- */
-class gcell_fft_vcc : public gr_fft_vcc
-{
- int d_log2_fft_size;
- boost::shared_ptr<gc_job_manager> d_mgr;
- std::complex<float> *d_twiddle; // twiddle values (16-byte aligned)
- boost::shared_ptr<void> d_twiddle_boost; // automatic storage mgmt
-
- friend gcell_fft_vcc_sptr
- gcell_make_fft_vcc(int fft_size, bool forward, const std::vector<float> &window, bool shift);
-
- gcell_fft_vcc(int fft_size, bool forward, const std::vector<float> &window, bool shift);
-
- public:
- ~gcell_fft_vcc();
-
- int work(int noutput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items);
-};
-
-
-#endif /* INCLUDED_GCELL_FFT_VCC_H */
diff --git a/gr-gcell/src/gcell_fft_vcc.i b/gr-gcell/src/gcell_fft_vcc.i
deleted file mode 100644
index 1d4a359f9..000000000
--- a/gr-gcell/src/gcell_fft_vcc.i
+++ /dev/null
@@ -1,56 +0,0 @@
-/* -*- 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.
- */
-
-#if 1
-
-// This version works.
-
-GR_SWIG_BLOCK_MAGIC(gcell, fft_vcc)
-
-gcell_fft_vcc_sptr
-gcell_make_fft_vcc (int fft_size, bool forward, const std::vector<float> window, bool shift=false);
-
-class gcell_fft_vcc : public gr_sync_block
-{
- protected:
- gcell_fft_vcc (int fft_size, bool forward, const std::vector<float> &window, bool shift);
-
- public:
- bool set_window(const std::vector<float> &window);
-};
-
-#else
-
-// This version gives swig heartburn. We end up with an object that's
-// not quite usable.
-
-GR_SWIG_BLOCK_MAGIC(gcell, fft_vcc);
-
-gcell_fft_vcc_sptr
-gcell_make_fft_vcc (int fft_size, bool forward, const std::vector<float> window, bool shift=false);
-
-class gcell_fft_vcc : public gr_fft_vcc
-{
- protected:
- gr_fft_vcc(int fft_size, bool forward, const std::vector<float> &window, bool shift);
-};
-
-#endif
diff --git a/gr-gcell/src/qa_fft.py b/gr-gcell/src/qa_fft.py
deleted file mode 100755
index 88a4f5207..000000000
--- a/gr-gcell/src/qa_fft.py
+++ /dev/null
@@ -1,162 +0,0 @@
-#!/usr/bin/env python
-#
-# 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.
-#
-
-from gnuradio import gr, gr_unittest
-import gcell
-import sys
-import random
-
-primes = (2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,
- 59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,
- 137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,
- 227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311)
-
-
-class test_fft_filter(gr_unittest.TestCase):
-
- def setUp(self):
- ph = gcell.program_handle_from_filename("../../gcell/lib/spu/gcell_all")
- opts = gcell.jm_options(ph, 1)
- self.mgr = gcell.job_manager(opts)
- gcell.set_singleton(self.mgr)
-
- def tearDown(self):
- pass
-
- def assert_fft_ok2(self, expected_result, result_data):
- expected_result = expected_result[:len(result_data)]
- self.assertComplexTuplesAlmostEqual2 (expected_result, result_data,
- abs_eps=1e-9, rel_eps=4e-4)
-
- def assert_fft_float_ok2(self, expected_result, result_data, abs_eps=1e-9, rel_eps=4e-4):
- expected_result = expected_result[:len(result_data)]
- self.assertFloatTuplesAlmostEqual2 (expected_result, result_data,
- abs_eps, rel_eps)
-
- def test_001(self):
- tb = gr.top_block()
- fft_size = 32
- src_data = tuple([complex(primes[2*i], primes[2*i+1]) for i in range(fft_size)])
-
- expected_result = ((4377+4516j),
- (-1706.1268310546875+1638.4256591796875j),
- (-915.2083740234375+660.69427490234375j),
- (-660.370361328125+381.59600830078125j),
- (-499.96044921875+238.41630554199219j),
- (-462.26748657226562+152.88948059082031j),
- (-377.98440551757812+77.5928955078125j),
- (-346.85821533203125+47.152004241943359j),
- (-295+20j),
- (-286.33609008789062-22.257017135620117j),
- (-271.52999877929688-33.081821441650391j),
- (-224.6358642578125-67.019538879394531j),
- (-244.24473571777344-91.524826049804688j),
- (-203.09068298339844-108.54627227783203j),
- (-198.45195007324219-115.90768432617188j),
- (-182.97744750976562-128.12318420410156j),
- (-167-180j),
- (-130.33688354492188-173.83778381347656j),
- (-141.19784545898438-190.28807067871094j),
- (-111.09677124023438-214.48896789550781j),
- (-70.039543151855469-242.41630554199219j),
- (-68.960540771484375-228.30015563964844j),
- (-53.049201965332031-291.47097778320312j),
- (-28.695289611816406-317.64553833007812j),
- (57-300j),
- (45.301143646240234-335.69509887695312j),
- (91.936195373535156-373.32437133789062j),
- (172.09465026855469-439.275146484375j),
- (242.24473571777344-504.47515869140625j),
- (387.81732177734375-666.6788330078125j),
- (689.48553466796875-918.2142333984375j),
- (1646.539306640625-1694.1956787109375j))
-
- src = gr.vector_source_c(src_data)
- s2v = gr.stream_to_vector(gr.sizeof_gr_complex, fft_size)
- fft = gcell.fft_vcc(fft_size, True, [], False)
- v2s = gr.vector_to_stream(gr.sizeof_gr_complex, fft_size)
- dst = gr.vector_sink_c()
- tb.connect(src, s2v, fft, v2s, dst)
- tb.run()
- result_data = dst.data()
- #print 'expected:', expected_result
- #print 'results: ', result_data
- #self.assertComplexTuplesAlmostEqual (expected_result, result_data, 5)
- self.assert_fft_ok2(expected_result, result_data)
-
- def test_002(self):
- tb = gr.top_block()
- fft_size = 32
-
- tmp_data = ((4377+4516j),
- (-1706.1268310546875+1638.4256591796875j),
- (-915.2083740234375+660.69427490234375j),
- (-660.370361328125+381.59600830078125j),
- (-499.96044921875+238.41630554199219j),
- (-462.26748657226562+152.88948059082031j),
- (-377.98440551757812+77.5928955078125j),
- (-346.85821533203125+47.152004241943359j),
- (-295+20j),
- (-286.33609008789062-22.257017135620117j),
- (-271.52999877929688-33.081821441650391j),
- (-224.6358642578125-67.019538879394531j),
- (-244.24473571777344-91.524826049804688j),
- (-203.09068298339844-108.54627227783203j),
- (-198.45195007324219-115.90768432617188j),
- (-182.97744750976562-128.12318420410156j),
- (-167-180j),
- (-130.33688354492188-173.83778381347656j),
- (-141.19784545898438-190.28807067871094j),
- (-111.09677124023438-214.48896789550781j),
- (-70.039543151855469-242.41630554199219j),
- (-68.960540771484375-228.30015563964844j),
- (-53.049201965332031-291.47097778320312j),
- (-28.695289611816406-317.64553833007812j),
- (57-300j),
- (45.301143646240234-335.69509887695312j),
- (91.936195373535156-373.32437133789062j),
- (172.09465026855469-439.275146484375j),
- (242.24473571777344-504.47515869140625j),
- (387.81732177734375-666.6788330078125j),
- (689.48553466796875-918.2142333984375j),
- (1646.539306640625-1694.1956787109375j))
-
- src_data = tuple([x/fft_size for x in tmp_data])
-
- expected_result = tuple([complex(primes[2*i], primes[2*i+1]) for i in range(fft_size)])
-
- src = gr.vector_source_c(src_data)
- s2v = gr.stream_to_vector(gr.sizeof_gr_complex, fft_size)
- fft = gcell.fft_vcc(fft_size, False, [], False)
- v2s = gr.vector_to_stream(gr.sizeof_gr_complex, fft_size)
- dst = gr.vector_sink_c()
- tb.connect(src, s2v, fft, v2s, dst)
- tb.run()
- result_data = dst.data()
- #print 'expected:', expected_result
- #print 'results: ', result_data
- #self.assertComplexTuplesAlmostEqual (expected_result, result_data, 5)
- self.assert_fft_ok2(expected_result, result_data)
-
-
-if __name__ == '__main__':
- gr_unittest.main ()
-
diff --git a/gr-gcell/src/run_tests.in b/gr-gcell/src/run_tests.in
deleted file mode 100644
index f7d51750d..000000000
--- a/gr-gcell/src/run_tests.in
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-# 1st parameter is absolute path to component source directory
-# 2nd parameter is absolute path to component build directory
-# 3rd parameter is path to Python QA directory
-
-@top_builddir@/run_tests.sh \
- @abs_top_srcdir@/gr-gcell \
- @abs_top_builddir@/gr-gcell \
- @srcdir@