[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] Block with N inputs and M outputs (M>=N)
From: |
Achilleas Anastasopoulos |
Subject: |
Re: [Discuss-gnuradio] Block with N inputs and M outputs (M>=N) |
Date: |
Mon, 10 Apr 2006 15:50:50 -0400 |
User-agent: |
Mozilla Thunderbird 1.0.2 (Windows/20050317) |
Michael,
Thanks for the info.
Indeed I am looking into small numbers of M,N (order of 10)
so this should work.
Can I ask for a clarification here:
If the interpolator block doesn't do it for you (I think it does, so try
to inherit from that code),
Since my overall interpolator block is an M/N-interpolator, even if I
inherit from interpolator, it does not force output_multiple to M,
but rather multiples of (M/N), which is not what I want.
I guess I have to inherit from block and do that manually using
set_output_multiple(M), as you suggested.
am I right?
use "set_output_multiple(M)", then make sure
your "forecast()" function sets the input stream's required items
correctly (to a multiple of N). "forecast()" will always be called with
"noutput" being a multiple of "M", which makes finding the required
items simple (#in = #out * M / N). You should do an "assert(M % N ==
0)" before before the divide just to be sure it's OK.
Hope this helps! - MLD
On Mon, 10 Apr 2006 09:36:51 -0400, "Achilleas Anastasopoulos"
<address@hidden> said:
I am trying to write a block that takes N inputs at a time
and produces M outputs at a time.
Since M>=N this is an interpolator.
However, M/N is not neccesarily an integer.
Is there an elegant way to force the work() function to
process a multiple number of N input samples every time it is called?
--
_______________________________________________________
Achilleas Anastasopoulos
Associate Professor
EECS Department Voice : (734)615-4024
UNIVERSITY OF MICHIGAN Fax : (734)763-8041
Ann Arbor, MI 48109-2122 E-mail: address@hidden
URL: http://www-personal.engin.umich.edu/~anastas/
_______________________________________________________