[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: Michael Dickens
Subject: Re: [Discuss-gnuradio] Block with N inputs and M outputs (M>=N)
Date: Mon, 10 Apr 2006 10:10:00 -0500

Let's assume you're working with 1 input and output stream.

If the interpolator block doesn't do it for you (I think it does, so try
to inherit from that code), 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?
  Michael Dickens

reply via email to

[Prev in Thread] Current Thread [Next in Thread]