[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] Re: Multiplying blocks
From: |
Eric Blossom |
Subject: |
Re: [Discuss-gnuradio] Re: Multiplying blocks |
Date: |
Fri, 9 Jun 2006 16:41:31 -0700 |
User-agent: |
Mutt/1.5.9i |
On Fri, Jun 09, 2006 at 03:58:58PM -0700, Johnathan Corgan wrote:
> Eric Blossom wrote:
>
> The application here is to multiply an incoming stream of floats by an
> analysis window and pass it off for further vector processing, and
> ultimately send it through an FFT block. For example, google WOLA DFT
> or check this link:
>
> http://www.epn-online.com/page/15837/efficient-digital-channelisers-for-fpgas-mixed-radix-fft-designs.html
>
> and specifically the diagram here:
>
>
> http://www.epn-online.com/common/inc/loadimage.php?name=33/10/G-09946C.JPG
OK.
Here's how I think you could do it without any new code (admittedly
it's a bit ugly):
Use vector_source_f to provide your window, and set the repeat argument to True.
Before using stream_to_vector on the data, mulitply by the repeating
window using
gr.multiply_ff (or _cc as the case may be)
The run the output of that into gr.stream_to_vector
> > One idea has been to use the "Universal function" (ufunc) idea from
> > NumPy and Numeric:
>
> Yes, your example would work nicely for what I think is needed.
>
> > Are you interested in building something along these lines?
> > It would be a *very* useful contribution.
>
> I might be interested but every time I try to understand what you're
> doing with SWIG to bridge the C++ and Python worlds, I get a serious
> migraine (that's over and above the minor headache stemming from
> deciphering the autotools) :-)
Oh come on, it's not that hairy ;)
Mostly the SWIG .i file is a subset of the .h file.
Just add the GNURADIO_SWIG_BLOCK_MAGIC call at the top ;)
As long as your constructor and methods arguments are ints,
longs, floats, gr_complex or std::vector<foo> of them, pretty much
everything just works. If you've got questions, just ask.
Regarding the autotools: Mostly you've just got to add 3 lines to
the existing Makefile.am. One each for the .h, .cc and .i file.
There's the also the "How to write a block" article. It walks you through
building an extension outside of gnuradio-core.
http://www.gnu.org/software/gnuradio/doc/howto-write-a-block.html
> -Johnathan, AE6HO
Eric