discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] UHD USRP Sink Stream Tagging


From: Josh Blum
Subject: Re: [Discuss-gnuradio] UHD USRP Sink Stream Tagging
Date: Tue, 17 Jul 2012 10:54:39 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1


On 07/17/2012 02:59 AM, Alex Teo wrote:
> Hello all,
> 
> I have been trying to implement a custom block based on
> gr_message_source that will be connected to the UHD USRP sink block.
> It inserts tx_sob and tx_eob tags together with the message contents
> into the output stream. I have a few questions with regards to the
> proper use of the tx streaming tags after looking at the source code
> for both the C++ tags demo as well as the USRP sink:
> 

FYI, You may also be interested in:
https://github.com/guruofquality/grextras/wiki#wiki-feature-message-passing

> 1. I see that in the tags demo code (specifically tag_source_demo.h)
> that a tx_eob tag is first sent when the block starts running (as
> _samps_left_in_burst is set to 1 initially). Is there any reason
> behind this?
> 

Its not necessary from the hardware's perspective. I think it was just a
convenient way to get a new burst started from the perspective of this
code in example (no edge case).

        //Handle the end of burst condition.
        //Tag an end of burst and return early.
        //the next work call will be a start of burst.
        if (_samps_left_in_burst < size_t(noutput_items)){
            this->make_eob_tag(this->nitems_written(0) +
_samps_left_in_burst - 1);
            _do_new_burst = true;
            noutput_items = _samps_left_in_burst;
        }

> 2. Looking at the USRP sink code, it seems that I can just insert
> tx_sob and tx_eob tags without having to insert a tx_time tag together
> with a tx_sob tag?
> 

The time tag is optional. If you dont specify a time, then the samples
are transmitted ASAP.

> 3. Am I right in my understanding that the USRP2 will only start
> transmitting after receiving an tx_eob tag? If so, I presume that

Actually, the usrp will transmit as soon as it seems an incoming packet
of samples (assuming there is not a transmit time set).

EOB is only necessary to tell the USRP, "I will not be sending any more
samples for an indeterminate amount of time". Therefore the device can
go into idle.

> there's a limit as to how much data the USRP2 can buffer before
> transmitting?
> 

There is a limit of about 1MB, after that samples back up into the host.
So you dont have to worry about sample loss.

-Josh



reply via email to

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