How to align Tx/Rx timestamps

Hi,

I want to implement a TDD system on Gnuradio using stream tags. The
receiver first detects bursts from another transmitter and sets
timestamps
of its bursts accordingly. I have some experiece in writing custom
blocks,
but I have never touched the UHD api nor the gr_uhd blocks. I want to
know
how to align timestamps of UHD source and sink blocks. Does it matter if
I
use the same or separate boxes? I guidline for general MIMO case would
be
appreciated.

Best regards!

On 03/11/2012 09:35 AM, yend B. wrote:

Hi,

I want to implement a TDD system on Gnuradio using stream tags. The
receiver first detects bursts from another transmitter and sets timestamps
of its bursts accordingly. I have some experiece in writing custom blocks,
but I have never touched the UHD api nor the gr_uhd blocks. I want to know
how to align timestamps of UHD source and sink blocks. Does it matter if I
use the same or separate boxes? I guidline for general MIMO case would be
appreciated.

  1. The simple option:

Multiple network devices like N210 can be grouped into one block with
multiple channels. Example:
http://old.nabble.com/attachment/32790029/0/4Channel.png

In this situation, all channels are aligned in time. Similarly, with the
usrp sink, all outputs channels are tagged with the same transmit time.
For this option, there is an assumption that the channels are
homogeneous (same sample rate).

  1. A more complicated option:

More complication, but more control. You can 1 source and 1 sink block
per USRP device. In this situation, to have transmit alignment, your
producer blocks must tag each channel with a timestamp. Similarly, on
receive, the consumer blocks must be aware of the timestamp on each
channel.

A description of tags here:
http://gnuradio.org/cgit/gnuradio.git/tree/gr-uhd/include/gr_uhd_usrp_sink.h#n59
http://gnuradio.org/cgit/gnuradio.git/tree/gr-uhd/include/gr_uhd_usrp_source.h#n59

A tags demonstration:
http://gnuradio.org/cgit/gnuradio.git/tree/gr-uhd/examples/tags_demo.cc

A guide to using stream tags:
http://gnuradio.org/redmine/projects/gnuradio/wiki/BlocksCodingGuide#Stream-Tags

-josh

Josh B. wrote in post #1051099:

On 03/11/2012 09:35 AM, yend B. wrote:

Hi,

I want to implement a TDD system on Gnuradio using stream tags. The
receiver first detects bursts from another transmitter and sets timestamps
of its bursts accordingly. I have some experiece in writing custom blocks,
but I have never touched the UHD api nor the gr_uhd blocks. I want to know
how to align timestamps of UHD source and sink blocks. Does it matter if I
use the same or separate boxes? I guidline for general MIMO case would be
appreciated.

  1. The simple option:

Multiple network devices like N210 can be grouped into one block with
multiple channels. Example:
http://old.nabble.com/attachment/32790029/0/4Channel.png

In this situation, all channels are aligned in time. Similarly, with the
usrp sink, all outputs channels are tagged with the same transmit time.
For this option, there is an assumption that the channels are
homogeneous (same sample rate).

  1. A more complicated option:

More complication, but more control. You can 1 source and 1 sink block
per USRP device. In this situation, to have transmit alignment, your
producer blocks must tag each channel with a timestamp. Similarly, on
receive, the consumer blocks must be aware of the timestamp on each
channel.

A description of tags here:
http://gnuradio.org/cgit/gnuradio.git/tree/gr-uhd/include/gr_uhd_usrp_sink.h#n59

http://gnuradio.org/cgit/gnuradio.git/tree/gr-uhd/include/gr_uhd_usrp_source.h#n59

A tags demonstration:
http://gnuradio.org/cgit/gnuradio.git/tree/gr-uhd/examples/tags_demo.cc

A guide to using stream tags:
http://gnuradio.org/redmine/projects/gnuradio/wiki/BlocksCodingGuide#Stream-Tags

-josh

Using single UHD source/sink block with multiple channels could do time
alignment of either tx or rx streams. I want to try the second option to
synchronize tx and rx chains. As I understood, I get timestamp of the
first sample received and I tag transmit bursts with tx_time. But I have
two questions:

  1. Is timestamp from one sample enough? I thought that the uhd src block
    gives me timestamp of only the first sample assuming no underruns.
  2. If I tag the i^th sample with tx_time t1, does it mean that the
    transmission is suspended on the i^th sample until the time reaches t1,
    and then samples are transmitted continuously until new tag is detected?
    Yesterday I with my friend tried the sob and eob tag keys when streaming
    to the usrp, but we concluded that they can be used only to drop samples
    (instead of inserting sleep periods) which are not enclosed by sob-eob
    tag pairs.

Best Regards!

Using single UHD source/sink block with multiple channels could do time
alignment of either tx or rx streams. I want to try the second option to
synchronize tx and rx chains. As I understood, I get timestamp of the
first sample received and I tag transmit bursts with tx_time. But I have
two questions:

  1. Is timestamp from one sample enough? I thought that the uhd src block
    gives me timestamp of only the first sample assuming no underruns.
  2. If I tag the i^th sample with tx_time t1, does it mean that the
    transmission is suspended on the i^th sample until the time reaches t1,
    and then samples are transmitted continuously until new tag is detected?
    Yesterday I with my friend tried the sob and eob tag keys when streaming
    to the usrp, but we concluded that they can be used only to drop samples
    (instead of inserting sleep periods) which are not enclosed by sob-eob
    tag pairs.

Best Regards!

Hello,
I am doing a similar project. And

  1. Have you slved the problem of droping samples not enclosed in sob and
    eob? How to do it?
  2. I want to know how to tell the USRP2 to RX for a desired length of
    time such as 5 secondss. the Only parameter is rx_time, I donot know how
    to stop the RX.
    Thank you so much.