On Tue, Jun 14, 2011 at 11:31 PM, Henry Matt <[email protected]> wrote:

> Hi Colby,
>
> So it means that it if one input comes at 20 samples/sec then it limits the
> output rate of my custom block to exactly 20 samples/sec? That is, the other
> input, gr_noise_source can provide samples at a rate faster than 20
> samples/sec to the custom block input but the custom block produces output
> only when both inputs are available. Am I right?
>
> I am sorry for not being clear about the other part of question. The
> question is that if I further multiply the output of the custom block (which
> has a sample rate of 20 samples/sec) with another signal of sampling rate 2M
> samples/sec then what will be the sampling rate of the product signal? If it
> will be 2M samples/sec then will the  custom block output sampled at 2M
> samples/sec have 1 non-zero sample followed by 100,000-1 zeros or will the
> custom block hold its output value to repeat it 100,000 times until the next
> sample arrives after 50mS?
>
> Thanks a lot,
> H.
>
>
> Hi Henry,
>
> GNU Radio, as far as I understand, does not have a concept of time. It will
> try to process samples as quickly as they are available. If your input
> sample is arriving every 50mS then a sample should be produced by your block
> shortly after the 50mS arrival mark.
>
> What do you mean, the output value should stay there? The output value is
> shipped off to some other block that connects to yours.
>
> --Colby
>
> On Tue, Jun 14, 2011 at 10:35 PM, Henry Matt <[email protected]>wrote:
>
> Hi,
>
> I have made a custom block derived from gr_block which has two inputs.
> First input comes at a sampling rate of 20 samples/sec while the other input
> comes from the gr_noise_source block. Now, my question is: what will be the
> sampling rate at my custom block output? Is it also 20 samples/sec? If not
> then how can I make it 20 samples/sec. Also,  my custom block needs to
> operate on sample by sample basis not on chunks of noutput_items. In other
> words, the custom block should produce an output sample after every 50mS
> (and not before) when both inputs arrive and that output value then should
> stay there for another 50mS until next input samples for two inputs arrive
> and new output is computed.
>
> Thanks in anticipation,
> H.
>
> _______________________________________________
> Discuss-gnuradio mailing list
> [email protected]
> https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>
>
>
>
>

If in your custom block you require a sample each from your 20 sample/sec
and other source (in this case noise) to produce one output sample, then the
block will output samples at about ~20 sample/sec. I believe this is default
behaviour for the gr_sync blocks?

In the case of the multiplication block, it will be done on a sample by
sample basis. If a 20 sample/sec and a 2MSample/sec block are put into a
multiplication block, then the output will be 20 sample/sec. HOWEVER, this
is a very bad idea because the 2Msamp source will backup and over flow
because the samples arrive at 2 orders faster than the other source. You
need to rate match the two sources in this situation or things will probably
crash.

Remember in the world of digital samples, the absolute rate of a signal does
not mean anything. Only the relative rates between different signal streams
mater, i.e. stream A produces samples twice as fast as stream B, etc. The
absolute rate only matters when you want to relate a digital signal to the
analog world.

--Colby
_______________________________________________
Discuss-gnuradio mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to