[prev in list] [next in list] [prev in thread] [next in thread] 

List:       usrp-users
Subject:    Re: [USRP-users] tx_timed_samples zeroing the time not working
From:       Steven Knudsen via USRP-users <usrp-users () lists ! ettus ! com>
Date:       2016-02-25 16:00:15
Message-ID: 857A3E8A-7BE3-47FB-BCAE-BDF0CA7478CF () gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi Michael,

Thanks for picking up on this and for the patch. Stuff happens, and at the very least \
it gave me reason to understand better some of the low-level code and interfaces.

ta,

steven


Steven Knudsen, Ph.D., P.Eng.
www. techconficio.ca
www.linkedin.com/in/knudstevenknudsen

All the wires are cut, my friends
Live beyond the severed ends.  Louis MacNeice

> On Feb 24, 2016, at 17:43, Michael West <michael.west@ettus.com> wrote:
> 
> Hi Steven,
> 
> Congratulations!  You found a bug!  I reproduced this issue and tracked down the \
> root cause to an error in the FPGA code.  I am working on a fix that will hopefully \
> be in UHD 3.9.3.  Fortunately, there are a couple of workarounds in the meantime: 
> 1)  Use set_time_next_pps() or set_time_unknown_pps() to set the time (as you have \
> already discovered). 2)  Use the attached UHD patch.  I have tested it on b200mini \
> and it works. 
> Regards,
> Michael
> 
> On Wed, Feb 24, 2016 at 1:49 PM, Steven Knudsen via USRP-users \
> <usrp-users@lists.ettus.com <mailto:usrp-users@lists.ettus.com>> wrote: Just \
> thought to go run this under Linux. Same behaviour for tx_timed_samples under \
> UHD_003.010.git 
> Did not try recompiling with set_time_unknown_pps().
> 
> 
> Steven Knudsen, Ph.D., P.Eng.
> www. techconficio.ca <http://techconficio.ca/>
> www.linkedin.com/in/knudstevenknudsen \
> <http://www.linkedin.com/in/knudstevenknudsen> 
> Der entscheidende Augenblick der menschlichen Entwicklung ist immerwährend. Darum \
> sind die revolutionären geistigen Bewegungen, welche alles Frühere für nichtig \
> erklären, im Recht, denn es ist noch nichts geschehen. - Franz Kafka 
> > On Feb 24, 2016, at 14:39, Marcus D. Leech <mleech@ripnet.com \
> > <mailto:mleech@ripnet.com>> wrote: 
> > On 02/24/2016 04:36 PM, Steven Knudsen wrote:
> > > After yet more digging in the code, I am still not sure what is going on with \
> > > usrp->set_time_now(uhd::time_spec_t(0.0)). 
> > > For the sake of trying something, I ran the test_pps_input example and, lo, it \
> > > works correctly. That is time is set to whatever I specify, reading back as set \
> > > plus small processing increments. 
> > > That example invokes set_time_unknown_pps(), which spins a loop until the time \
> > > of the last PPS changes and then invokes set_time_next_pps(). 
> > > This makes me wonder if set_time_now() is running up against the internal PPS \
> > > cycle as it consistently sets the time to 3 seconds regardless of the argument \
> > > value. If so, then I must not be configuring the B200mini correctly, or at \
> > > least am not aware of something that needs to be configured. 
> > > Does anyone else have a thought? 
> > > 
> > > Thanks!
> > Hmmm, which UHD version are you using?
> > 
> > 
> > > 
> > > 
> > > Steven Knudsen, Ph.D., P.Eng.
> > > www. techconficio.ca <http://techconficio.ca/>
> > > www.linkedin.com/in/knudstevenknudsen \
> > > <http://www.linkedin.com/in/knudstevenknudsen> 
> > > Der entscheidende Augenblick der menschlichen Entwicklung ist immerwährend. \
> > > Darum sind die revolutionären geistigen Bewegungen, welche alles Frühere für \
> > > nichtig erklären, im Recht, denn es ist noch nichts geschehen. - Franz Kafka 
> > > > On Feb 23, 2016, at 23:54, Steven Knudsen <ee.knud@gmail.com \
> > > > <mailto:ee.knud@gmail.com>> wrote: 
> > > > Some further digging reveals two low-level methods in 
> > > > 
> > > > /host/lib/usrp/cores/time64_core_200.cpp
> > > > /host/lib/usrp/cores/time_core_3000.cpp
> > > > 
> > > > that appear to do the actual poke of time into registers (32-bit, HI and LO). \
> > > >  
> > > > Might it be that (what I should have mentioned below) is that the wrong \
> > > > method is being invoked for the B200mini I'm testing with? 
> > > > I'm relatively new at snooping around code that deals directly with the \
> > > > wishbone register architecture, so am not absolutely sure I understand what \
> > > > I'm looking at. 
> > > > Any ideas?
> > > > 
> > > > Steven Knudsen, Ph.D., P.Eng.
> > > > www. techconficio.ca <http://techconficio.ca/>
> > > > www.linkedin.com/in/knudstevenknudsen \
> > > > <http://www.linkedin.com/in/knudstevenknudsen> 
> > > > All the wires are cut, my friends
> > > > Live beyond the severed ends.  Louis MacNeice
> > > > 
> > > > > On Feb 23, 2016, at 21:07, Steven Knudsen <ee.knud@gmail.com \
> > > > > <mailto:ee.knud@gmail.com>> wrote: 
> > > > > Hi All,
> > > > > 
> > > > > It's likely unfair of me to say that zeroing the time in the example \
> > > > > tx_time_samples.cpp is not working, but I am not sure what is actually \
> > > > > going on. Compared to the delay I set on the command line, the elapsed time \
> > > > > seemed short to me, so I added some cout debugging. Right after the line \
> > > > > setting the time to zero, I added statements as shown 
> > > > > std::cout << boost::format("Setting device timestamp to 0...") << \
> > > > > std::endl; usrp->set_time_now(uhd::time_spec_t(0.0));
> > > > > 
> > > > > uhd::time_spec_t ts = usrp->get_time_now();
> > > > > std::cout << "zero time " << ts.get_real_secs() << " frac=" << \
> > > > > ts.get_frac_secs() << std::endl; 
> > > > > As seen in the output below, the  packets are transmitted when the clock \
> > > > > hits the desired delay (20 s), but the starting point is obviously not zero \
> > > > > as assumed, but is 3.13271 s. 
> > > > > Am I missing something really simple in this?
> > > > > 
> > > > > Thanks for your patience and consideration.
> > > > > 
> > > > > Steven
> > > > > 
> > > > > ======================
> > > > > 
> > > > > knud 20:56:17 $./tx_timed_samples --secs 20
> > > > > Mac OS; Clang version 7.0.2 (clang-700.1.81); Boost_105900; \
> > > > > UHD_003.009.002-MacPorts-Release 
> > > > > 
> > > > > Creating the usrp device with: ...
> > > > > -- Detected Device: B200mini
> > > > > -- Operating over USB 3.
> > > > > -- Initialize CODEC control...
> > > > > -- Initialize Radio control...
> > > > > -- Performing register loopback test... pass
> > > > > -- Performing CODEC loopback test... pass
> > > > > -- Asking for clock rate 16.000000 MHz... 
> > > > > -- Actually got clock rate 16.000000 MHz.
> > > > > -- Performing timer loopback test... pass
> > > > > -- Setting master clock rate selection to 'automatic'.
> > > > > Using Device: Single USRP:
> > > > > Device: B-Series Device
> > > > > Mboard 0: B200mini
> > > > > RX Channel: 0
> > > > > RX DSP: 0
> > > > > RX Dboard: A
> > > > > RX Subdev: FE-RX1
> > > > > TX Channel: 0
> > > > > TX DSP: 0
> > > > > TX Dboard: A
> > > > > TX Subdev: FE-TX1
> > > > > 
> > > > > Setting TX Rate: 6.250000 Msps...
> > > > > -- Asking for clock rate 25.000000 MHz... 
> > > > > -- Actually got clock rate 25.000000 MHz.
> > > > > -- Performing timer loopback test... pass
> > > > > Actual TX Rate: 6.250000 Msps...
> > > > > 
> > > > > Setting device timestamp to 0...
> > > > > zero time 3.13271 frac=0.132706
> > > > > buffer loop time 3.15981 frac=0.15981
> > > > > Sent packet: 2044 samples
> > > > > Sent packet: 2044 samples
> > > > > Sent packet: 2044 samples
> > > > > Sent packet: 2044 samples
> > > > > Sent packet: 1824 samples
> > > > > end buffer loop time 3.16036 frac=0.160363
> > > > > start time 3.16064 frac=0.160645
> > > > > 
> > > > > Waiting for async burst ACK... success
> > > > > end time 20.002 frac=0.00197152
> > > > > 
> > > > > Done!
> > > > > 
> > > > > 
> > > > > 
> > > > > Steven Knudsen, Ph.D., P.Eng.
> > > > > www. techconficio.ca <http://techconficio.ca/>
> > > > > www.linkedin.com/in/knudstevenknudsen \
> > > > > <http://www.linkedin.com/in/knudstevenknudsen> 
> > > > > All the wires are cut, my friends
> > > > > Live beyond the severed ends.  Louis MacNeice
> > > > > 
> > > > 
> > > 
> > 
> 
> 
> _______________________________________________
> USRP-users mailing list
> USRP-users@lists.ettus.com <mailto:USRP-users@lists.ettus.com>
> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com \
> <http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com> 
> 
> <b200mini_set_time_now.patch>


[Attachment #5 (unknown)]

<html><head><meta http-equiv="Content-Type" content="text/html \
charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; \
-webkit-line-break: after-white-space;" class="">Hi Michael,<div class=""><br \
class=""></div><div class="">Thanks for picking up on this and for the patch. Stuff \
happens, and at the very least it gave me reason to understand better some of the \
low-level code and interfaces.</div><div class=""><br class=""></div><div \
class="">ta,</div><div class=""><br class=""></div><div class="">steven</div><div \
class=""><br class=""></div><div class=""><br class=""><div class=""> <span \
class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); \
font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: \
normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; \
text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: \
0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; \
-webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; \
-webkit-text-stroke-width: 0px;  "><span class="Apple-style-span" \
style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica;  \
font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: \
normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; \
white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: \
0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; \
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div \
style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: \
after-white-space; " class=""><span class="Apple-style-span" style="border-collapse: \
separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: \
normal; font-variant: normal; font-weight: normal; letter-spacing: normal; \
line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: \
normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; \
-webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; \
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div \
style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: \
after-white-space; " class=""><span class="Apple-style-span" style="border-collapse: \
separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: \
normal; font-variant: normal; font-weight: normal; letter-spacing: normal; \
line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: \
normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; \
-webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; \
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div \
style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: \
after-white-space; " class=""><span class="Apple-style-span" style="border-collapse: \
separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: \
normal; font-variant: normal; font-weight: normal; letter-spacing: normal; \
line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: \
normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; \
-webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; \
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div \
style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: \
after-white-space; " class=""><span class="Apple-style-span" style="border-collapse: \
separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: \
normal; font-variant: normal; font-weight: normal; letter-spacing: normal; \
line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: \
normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; \
-webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; \
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div \
style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: \
after-white-space; " class=""><span class="Apple-style-span" style="border-collapse: \
separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: \
normal; font-variant: normal; font-weight: normal; letter-spacing: normal; \
line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: \
normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; \
-webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; \
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div \
style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: \
after-white-space; " class=""><div class=""><span class="Apple-style-span" style=" \
"><div class=""><font class="Apple-style-span" face="'Marker Felt'" size="3"><span \
class="Apple-style-span" style="font-size: 12px; ">Steven Knudsen, Ph.D., \
P.Eng.</span></font></div><div class=""><span class="Apple-style-span" \
style="font-size: 12px; "><div style="margin-top: 0px; margin-right: 0px; \
margin-bottom: 0px; margin-left: 0px; " class=""><font class="Apple-style-span" \
face="'Marker Felt'">www.</font><font class="Apple-style-span" face="'Marker \
Felt'">&nbsp;</font><font class="Apple-style-span" face="'Marker Felt'"><a \
href="http://techconficio.ca" \
class="">techconficio.ca</a></font></div></span></div></span><p style="margin-top: \
0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " class=""><span \
class="Apple-style-span" style="font-family: 'Marker Felt'; "><a \
href="http://www.linkedin.com/in/knudstevenknudsen" \
class="">www.linkedin.com/in/knudstevenknudsen</a></span></p><p style="margin-top: \
0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " class=""><br \
class=""></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; \
margin-left: 0px; " class=""><span class="Apple-style-span" style="color: rgb(128, 0, \
0); font-family: 'Kristen ITC'; font-size: 10px; font-style: italic; ">All the wires \
are cut, my friends<br class="">Live beyond the severed ends.&nbsp; Louis \
MacNeice</span></p></div></div></span></div></span></div></span></div></span></div></span></div></span></span>
 </div>
<br class=""><div><blockquote type="cite" class=""><div class="">On Feb 24, 2016, at \
17:43, Michael West &lt;<a href="mailto:michael.west@ettus.com" \
class="">michael.west@ettus.com</a>&gt; wrote:</div><br \
class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div \
class=""><div class=""><div class=""><div class=""><div class="">Hi Steven,<br \
class=""><br class=""></div>Congratulations!&nbsp; You found a bug!&nbsp; I \
reproduced this issue and tracked down the root cause to an error in the FPGA \
code.&nbsp; I am working on a fix that will hopefully be in UHD 3.9.3.&nbsp; \
Fortunately, there are a couple of workarounds in the meantime:<br class=""><br \
class=""></div>1)&nbsp; Use set_time_next_pps() or set_time_unknown_pps() to set the \
time (as you have already discovered).<br class=""></div>2)&nbsp; Use the attached \
UHD patch.&nbsp; I have tested it on b200mini and it works.<br class=""><br \
class=""></div>Regards,<br class=""></div>Michael<br class=""></div><div \
class="gmail_extra"><br class=""><div class="gmail_quote">On Wed, Feb 24, 2016 at \
1:49 PM, Steven Knudsen via USRP-users <span dir="ltr" class="">&lt;<a \
href="mailto:usrp-users@lists.ettus.com" target="_blank" \
class="">usrp-users@lists.ettus.com</a>&gt;</span> wrote:<br class=""><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div style="word-wrap:break-word" class="">Just thought to go \
run this under Linux. Same behaviour for tx_timed_samples under UHD_003.010.git<div \
class=""><br class=""></div><div class="">Did not try recompiling with \
set_time_unknown_pps().</div><div class=""><br class=""></div><div class=""><span \
class=""><br class=""><div class=""> <div class=""><div class=""><font face="'Marker \
Felt'" size="3" class=""><span style="font-size:12px" class="">Steven Knudsen, Ph.D., \
P.Eng.</span></font></div><div class=""><div style="margin:0px" class=""><font \
face="'Marker Felt'" class="">www.</font><font face="'Marker Felt'" \
class="">&nbsp;</font><font face="'Marker Felt'" class=""><a \
href="http://techconficio.ca/" target="_blank" \
class="">techconficio.ca</a></font></div></div><div style="margin:0px" class=""><span \
style="font-family:'Marker Felt'" class=""><a \
href="http://www.linkedin.com/in/knudstevenknudsen" target="_blank" \
class="">www.linkedin.com/in/knudstevenknudsen</a></span></div><div \
style="margin:0px" class=""><br class=""></div><div style="margin:0px" class=""><font \
face="Kristen ITC" color="#800000" size="1" class=""><i class="">Der \
entscheidende&nbsp;Augenblick der menschlichen&nbsp;Entwicklung \
ist&nbsp;immerwährend. Darum sind&nbsp;die revolutionären \
geistigen&nbsp;Bewegungen, welche alles&nbsp;Frühere für nichtig erklären,&nbsp;im \
Recht, denn es ist noch&nbsp;nichts geschehen. - Franz Kafka</i></font></div></div> \
</div> <br class=""></span><div class=""><blockquote type="cite" class=""><span \
class=""><div class="">On Feb 24, 2016, at 14:39, Marcus D. Leech &lt;<a \
href="mailto:mleech@ripnet.com" target="_blank" class="">mleech@ripnet.com</a>&gt; \
wrote:</div><br class=""></span><div class=""><div class="h5"><div class="">  
    
  
  <div bgcolor="#FFFFFF" text="#000000" class="">
    <div class="">On 02/24/2016 04:36 PM, Steven Knudsen
      wrote:<br class="">
    </div>
    <blockquote type="cite" class="">
      
      After yet more digging in the code, I am still not sure what is
      going on with usrp-&gt;set_time_now(uhd::time_spec_t(0.0)).
      <div class=""><br class="">
      </div>
      <div class="">For the sake of trying something, I ran the
        test_pps_input example and, lo, it works correctly. That is time
        is set to whatever I specify, reading back as set plus small
        processing increments.</div>
      <div class=""><br class="">
      </div>
      <div class="">That example invokes set_time_unknown_pps(), which
        spins a loop until the time of the last PPS changes and then
        invokes set_time_next_pps().</div>
      <div class=""><br class="">
      </div>
      <div class="">This makes me wonder if set_time_now() is running up
        against the internal PPS cycle as it consistently sets the time
        to 3 seconds regardless of the argument value. If so, then I
        must not be configuring the B200mini correctly, or at least am
        not aware of something that needs to be configured.</div>
      <div class=""><br class="">
      </div>
      <div class="">Does anyone else have a thought?&nbsp;</div>
      <div class=""><br class="">
      </div>
      <div class="">Thanks!</div>
    </blockquote>
    Hmmm, which UHD version are you using?<br class="">
    <br class="">
    <br class="">
    <blockquote type="cite" class="">
      <div class=""><br class="">
      </div>
      <div class=""><br class="">
        <div class="">
          <div class="">
            <div class=""><font face="'Marker
                Felt'" size="3" class=""><span style="font-size:12px" class="">Steven \
Knudsen, Ph.D., P.Eng.</span></font></div>  <div class="">
              <div style="margin:0px" class=""><font face="'Marker Felt'" \
class="">www.</font><font face="'Marker Felt'" class="">&nbsp;</font><font \
face="'Marker Felt'" class=""><a href="http://techconficio.ca/" target="_blank" \
class="">techconficio.ca</a></font></div>  </div>
            <div style="margin:0px" class=""><span class=""><a \
href="http://www.linkedin.com/in/knudstevenknudsen" target="_blank" \
class="">www.linkedin.com/in/knudstevenknudsen</a></span></div>  <div \
style="margin:0px" class=""><br class="">  </div>
            <div style="margin:0px" class=""><font face="Kristen ITC" color="#800000" \
                size="1" class=""><i class="">Der entscheidende&nbsp;Augenblick der
                  menschlichen&nbsp;Entwicklung ist&nbsp;immerwährend. Darum
                  sind&nbsp;die revolutionären geistigen&nbsp;Bewegungen, welche
                  alles&nbsp;Frühere für nichtig erklären,&nbsp;im Recht, denn es
                  ist noch&nbsp;nichts geschehen. - Franz Kafka</i></font></div>
          </div>
        </div>
        <br class="">
        <div class="">
          <blockquote type="cite" class="">
            <div class="">On Feb 23, 2016, at 23:54, Steven Knudsen &lt;<a \
href="mailto:ee.knud@gmail.com" target="_blank" class="">ee.knud@gmail.com</a>&gt; \
wrote:</div>  <br class="">
            <div class="">
              
              <div style="word-wrap:break-word" class="">Some
                further digging reveals two low-level methods in&nbsp;
                <div class=""><br class="">
                </div>
                <div class="">
                  <div \
style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo" \
class="">/host/lib/usrp/cores/time64_core_200.cpp</div>  </div>
                <div \
                style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo" \
                class="">
                  <div style="margin:0px;line-height:normal" \
class="">/host/lib/usrp/cores/time_core_3000.cpp</div>  </div>
                <div class=""><br class="">
                </div>
                <div class="">that appear to do the actual poke of time
                  into registers (32-bit, HI and LO).&nbsp;</div>
                <div class=""><br class="">
                </div>
                <div class="">Might it be that (what I should have
                  mentioned below) is that the wrong method is being
                  invoked for the B200mini I'm testing with?</div>
                <div class=""><br class="">
                </div>
                <div class="">I'm relatively new at snooping around code
                  that deals directly with the wishbone register
                  architecture, so am not absolutely sure I understand
                  what I'm looking at.</div>
                <div class=""><br class="">
                </div>
                <div class="">Any ideas?</div>
                <div class=""><br class="">
                  <div class="">
                    <span \
style="border-collapse:separate;line-height:normal;border-spacing:0px" class=""><span \
style="border-collapse:separate;font-family:Helvetica;font-style:normal;font-variant:n \
ormal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;border-spacing:0px" \
class="">  <div style="word-wrap:break-word" class=""><span \
style="border-collapse:separate;font-family:Helvetica;font-size:12px;font-style:normal \
;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text- \
indent:0px;text-transform:none;white-space:normal;word-spacing:0px;border-spacing:0px" \
class="">  <div style="word-wrap:break-word" class=""><span \
style="border-collapse:separate;font-family:Helvetica;font-size:12px;font-style:normal \
;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text- \
indent:0px;text-transform:none;white-space:normal;word-spacing:0px;border-spacing:0px" \
class="">  <div style="word-wrap:break-word" class=""><span \
style="border-collapse:separate;font-family:Helvetica;font-size:12px;font-style:normal \
;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text- \
indent:0px;text-transform:none;white-space:normal;word-spacing:0px;border-spacing:0px" \
class="">  <div style="word-wrap:break-word" class=""><span \
style="border-collapse:separate;font-family:Helvetica;font-size:12px;font-style:normal \
;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text- \
indent:0px;text-transform:none;white-space:normal;word-spacing:0px;border-spacing:0px" \
class="">  <div style="word-wrap:break-word" class=""><span \
style="border-collapse:separate;font-family:Helvetica;font-size:12px;font-style:normal \
;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text- \
indent:0px;text-transform:none;white-space:normal;word-spacing:0px;border-spacing:0px" \
                class="">
                                            <div style="word-wrap:break-word" \
                class="">
                                              <div class=""><span class="">
                                                  <div class=""><font face="'Marker
                                                      Felt'" size="3" class=""><span \
                style="font-size:12px" class="">Steven Knudsen,
                                                        Ph.D., \
                P.Eng.</span></font></div>
                                                  <div class=""><span \
style="font-size:12px" class="">  <div \
style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px" \
class=""><font face="'Marker Felt'" class="">www.</font><font face="'Marker  Felt'" \
class="">&nbsp;</font><font face="'Marker Felt'" class=""><a \
href="http://techconficio.ca/" target="_blank" \
class="">techconficio.ca</a></font></div>  </span></div>
                                                </span>
                                                <div style="margin:0px" \
class=""><span style="font-family:'Marker Felt'" class=""><a \
href="http://www.linkedin.com/in/knudstevenknudsen" target="_blank" \
                class="">www.linkedin.com/in/knudstevenknudsen</a></span></div>
                                                <div style="margin:0px" class=""><br \
class="">  </div>
                                                <div style="margin:0px" \
class=""><span style="color:rgb(128,0,0);font-family:'Kristen \
                ITC';font-size:10px;font-style:italic" class="">All the wires are
                                                    cut, my friends<br class="">
                                                    Live beyond the
                                                    severed ends.&nbsp; Louis
                                                    MacNeice</span></div>
                                              </div>
                                            </div>
                                          </span></div>
                                      </span></div>
                                  </span></div>
                              </span></div>
                          </span></div>
                      </span></span>
                  </div>
                  <br class="">
                  <div class="">
                    <blockquote type="cite" class="">
                      <div class="">On Feb 23, 2016, at 21:07, Steven
                        Knudsen &lt;<a href="mailto:ee.knud@gmail.com" \
target="_blank" class="">ee.knud@gmail.com</a>&gt;  wrote:</div>
                      <br class="">
                      <div class="">
                        
                        <div style="word-wrap:break-word" class="">Hi All,
                          <div class=""><br class="">
                          </div>
                          <div class="">It's likely unfair of me to say
                            that zeroing the time in the example
                            tx_time_samples.cpp is not working, but I am
                            not sure what is actually going on. Compared
                            to the delay I set on the command line, the
                            elapsed time seemed short to me, so I added
                            some cout debugging. Right after the line
                            setting the time to zero, I added statements
                            as shown</div>
                          <div class=""><br class="">
                          </div>
                          <div class="">
                            <div class="">&nbsp; &nbsp; std::cout &lt;&lt;
                              boost::format("Setting device timestamp to
                              0...") &lt;&lt; std::endl;</div>
                            <div class="">&nbsp; &nbsp;
                              usrp-&gt;set_time_now(uhd::time_spec_t(0.0));</div>
                            <div class=""><br class="">
                            </div>
                            <div class="">&nbsp; &nbsp; uhd::time_spec_t ts =
                              usrp-&gt;get_time_now();</div>
                            <div class="">&nbsp; &nbsp; std::cout &lt;&lt; "zero
                              time " &lt;&lt; ts.get_real_secs()
                              &lt;&lt; " frac=" &lt;&lt;
                              ts.get_frac_secs() &lt;&lt; std::endl;</div>
                          </div>
                          <div class=""><br class="">
                          </div>
                          <div class="">As seen in the output below, the
                            &nbsp;packets are transmitted when the clock hits
                            the desired delay (20 s), but the starting
                            point is obviously not zero as assumed, but
                            is 3.13271 s.</div>
                          <div class=""><br class="">
                          </div>
                          <div class="">Am I missing something really
                            simple in this?</div>
                          <div class=""><br class="">
                          </div>
                          <div class="">Thanks for your patience and
                            consideration.</div>
                          <div class=""><br class="">
                          </div>
                          <div class="">Steven</div>
                          <div class=""><br class="">
                          </div>
                          <div class="">======================</div>
                          <div class=""><br class="">
                          </div>
                          <div class="">
                            <div \
style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo" class=""><span \
style="color:#34bd26" class=""><b class="">knud 20:56:17 \
                $</b></span>./tx_timed_samples
                              --secs 20</div>
                            <div \
style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo" class="">Mac \
OS; Clang version 7.0.2  (clang-700.1.81); Boost_105900;
                              UHD_003.009.002-MacPorts-Release</div>
                            <div \
style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;min-height:15px" \
class=""><br class="">  </div>
                            <div \
style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;min-height:15px" \
class=""><br class="">  </div>
                            <div \
style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo" \
                class="">Creating the usrp device with:
                              ...</div>
                            <div \
style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo" class="">-- \
                Detected Device: B200mini</div>
                            <div \
style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo" class="">-- \
                Operating over USB 3.</div>
                            <div \
style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo" class="">-- \
                Initialize CODEC control...</div>
                            <div \
style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo" class="">-- \
                Initialize Radio control...</div>
                            <div \
style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo" class="">-- \
Performing register loopback  test... pass</div>
                            <div \
style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo" class="">-- \
Performing CODEC loopback  test... pass</div>
                            <div \
style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo" class="">-- \
Asking for clock rate  16.000000 MHz...&nbsp;</div>
                            <div \
style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo" class="">-- \
Actually got clock rate  16.000000 MHz.</div>
                            <div \
style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo" class="">-- \
Performing timer loopback  test... pass</div>
                            <div \
style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo" class="">-- \
Setting master clock rate  selection to 'automatic'.</div>
                            <div \
style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo" class="">Using \
                Device: Single USRP:</div>
                            <div \
style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo" \
                class="">&nbsp; Device: B-Series Device</div>
                            <div \
style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo" \
                class="">&nbsp; Mboard 0: B200mini</div>
                            <div \
style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo" \
                class="">&nbsp; RX Channel: 0</div>
                            <div \
style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo" \
                class="">&nbsp; &nbsp; RX DSP: 0</div>
                            <div \
style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo" \
                class="">&nbsp; &nbsp; RX Dboard: A</div>
                            <div \
style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo" \
                class="">&nbsp; &nbsp; RX Subdev: FE-RX1</div>
                            <div \
style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo" \
                class="">&nbsp; TX Channel: 0</div>
                            <div \
style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo" \
                class="">&nbsp; &nbsp; TX DSP: 0</div>
                            <div \
style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo" \
                class="">&nbsp; &nbsp; TX Dboard: A</div>
                            <div \
style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo" \
                class="">&nbsp; &nbsp; TX Subdev: FE-TX1</div>
                            <div \
style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;min-height:15px" \
class=""><br class="">  </div>
                            <div \
style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo" \
                class="">Setting TX Rate: 6.250000 Msps...</div>
                            <div \
style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo" class="">-- \
Asking for clock rate  25.000000 MHz...&nbsp;</div>
                            <div \
style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo" class="">-- \
Actually got clock rate  25.000000 MHz.</div>
                            <div \
style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo" class="">-- \
Performing timer loopback  test... pass</div>
                            <div \
style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo" \
                class="">Actual TX Rate: 6.250000 Msps...</div>
                            <div \
style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;min-height:15px" \
class=""><br class="">  </div>
                            <div \
style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo" \
                class="">Setting device timestamp to 0...</div>
                            <div \
style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo" class="">zero \
                time 3.13271 frac=0.132706</div>
                            <div \
style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo" \
class="">buffer loop time 3.15981  frac=0.15981</div>
                            <div \
style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo" class="">Sent \
                packet: 2044 samples</div>
                            <div \
style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo" class="">Sent \
                packet: 2044 samples</div>
                            <div \
style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo" class="">Sent \
                packet: 2044 samples</div>
                            <div \
style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo" class="">Sent \
                packet: 2044 samples</div>
                            <div \
style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo" class="">Sent \
                packet: 1824 samples</div>
                            <div \
style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo" class="">end \
buffer loop time 3.16036  frac=0.160363</div>
                            <div \
style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo" class="">start \
                time 3.16064 frac=0.160645</div>
                            <div \
style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;min-height:15px" \
class=""><br class="">  </div>
                            <div \
style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo" \
class="">Waiting for async burst ACK...  success</div>
                            <div \
style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo" class="">end \
                time 20.002 frac=0.00197152</div>
                            <div \
style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;min-height:15px" \
class=""><br class="">  </div>
                            <div \
style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo" \
                class="">Done!</div>
                            <div \
style="margin:0px;font-size:13px;line-height:normal;font-family:Menlo;min-height:15px" \
class=""><br class="">  </div>
                          </div>
                          <div class=""><br class="">
                          </div>
                          <div class=""><br class="">
                            <div class="">
                              <div class="">
                                <span \
style="border-collapse:separate;line-height:normal;border-spacing:0px" class=""><span \
style="border-collapse:separate;font-family:Helvetica;font-style:normal;font-variant:n \
ormal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;border-spacing:0px" \
class="">  <div style="word-wrap:break-word" class=""><span \
style="border-collapse:separate;font-family:Helvetica;font-size:12px;font-style:normal \
;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text- \
indent:0px;text-transform:none;white-space:normal;word-spacing:0px;border-spacing:0px" \
class="">  <div style="word-wrap:break-word" class=""><span \
style="border-collapse:separate;font-family:Helvetica;font-size:12px;font-style:normal \
;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text- \
indent:0px;text-transform:none;white-space:normal;word-spacing:0px;border-spacing:0px" \
class="">  <div style="word-wrap:break-word" class=""><span \
style="border-collapse:separate;font-family:Helvetica;font-size:12px;font-style:normal \
;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text- \
indent:0px;text-transform:none;white-space:normal;word-spacing:0px;border-spacing:0px" \
class="">  <div style="word-wrap:break-word" class=""><span \
style="border-collapse:separate;font-family:Helvetica;font-size:12px;font-style:normal \
;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text- \
indent:0px;text-transform:none;white-space:normal;word-spacing:0px;border-spacing:0px" \
class="">  <div style="word-wrap:break-word" class=""><span \
style="border-collapse:separate;font-family:Helvetica;font-size:12px;font-style:normal \
;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text- \
indent:0px;text-transform:none;white-space:normal;word-spacing:0px;border-spacing:0px" \
                class="">
                                                        <div \
                style="word-wrap:break-word" class="">
                                                          <div class=""><span \
                class="">
                                                          <div class=""><font \
face="'Marker Felt'" size="3" class=""><span style="font-size:12px" class="">Steven  \
                Knudsen,
                                                          Ph.D., \
                P.Eng.</span></font></div>
                                                          <div class=""><span \
style="font-size:12px" class="">  <div \
style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px" \
class=""><font face="'Marker Felt'" class="">www.</font><font face="'Marker  Felt'" \
class="">&nbsp;</font><font face="'Marker Felt'" class=""><a \
href="http://techconficio.ca/" target="_blank" \
class="">techconficio.ca</a></font></div>  </span></div>
                                                          </span>
                                                          <div style="margin:0px" \
class=""><span style="font-family:'Marker Felt'" class=""><a \
href="http://www.linkedin.com/in/knudstevenknudsen" target="_blank" \
                class="">www.linkedin.com/in/knudstevenknudsen</a></span></div>
                                                          <div style="margin:0px" \
class=""><br class="">  </div>
                                                          <div style="margin:0px" \
class=""><span style="color:rgb(128,0,0);font-family:'Kristen \
ITC';font-size:10px;font-style:italic" class="">All  the wires are
                                                          cut, my
                                                          friends<br class="">
                                                          Live beyond
                                                          the severed
                                                          ends.&nbsp; Louis
                                                          MacNeice</span></div>
                                                          </div>
                                                        </div>
                                                      </span></div>
                                                  </span></div>
                                              </span></div>
                                          </span></div>
                                      </span></div>
                                  </span></span>
                              </div>
                              <br class="">
                            </div>
                          </div>
                        </div>
                      </div>
                    </blockquote>
                  </div>
                  <br class="">
                </div>
              </div>
            </div>
          </blockquote>
        </div>
        <br class="">
      </div>
    </blockquote>
    <br class="">
  </div>

</div></div></div></blockquote></div><br class=""></div></div><br \
class="">_______________________________________________<br class=""> USRP-users \
mailing list<br class=""> <a href="mailto:USRP-users@lists.ettus.com" \
class="">USRP-users@lists.ettus.com</a><br class=""> <a \
href="http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com" \
rel="noreferrer" target="_blank" \
class="">http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com</a><br \
class=""> <br class=""></blockquote></div><br class=""></div>
<span id="cid:7B873496-06CF-447A-9949-528075CDBDA1">&lt;b200mini_set_time_now.patch&gt;</span></div></blockquote></div><br \
class=""></div></body></html>



_______________________________________________
USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic