After reading Marcus' reply, it occurred to me that you really might not
need multiple threads to achieve the factor of 2 improvement you are
looking for.  I think if you call set_rx_freq() it is a non-blocking call
so you should be able to set the 2 freqs, wait for them both to settle,
then get the results simultaneously.  I think you can do it from 1 thread.
Rob

On Thu, Jan 21, 2021 at 4:01 PM Marcus D. Leech via USRP-users <
[email protected]> wrote:

> On 01/21/2021 02:56 PM, Glenn Hazelwood via USRP-users wrote:
>
> I have an N310 and I wish to scan from 10 MHz to 5910 MHz with two
> channels. The frontend bandwidth is 100 MHz. So I do 60 tunings overall. I
> am directly using the UHD 3.15.0.0 C++ API
>
> The retune time is typically ~120 ms. My sample rate is 125 Msps.
> Therefore, the time to receive samples is relatively small. For example,
> receiving time for 32768 samples is ~1.3 ms. WIth one thread and one
> channel, my overall tune and receive time for the 60 tunings is ~7200 ms.
>
> I wanted to try to reduce the overall runtime by using two threads and two
> channels. One thread would do half the tunings and the other thread would
> do the other half at the same time.
>
> I see that I can make separate rx_streamers in separate threads, each with
> its own channel to receive samples. I think rx_streamers[chan].recv()
> should work for two threads. I'm not so confident about
> 'usrp->set_rx_frequency()' for two threads.
>
> Is it possible to have two separate threads each tune to different
> frequencies at the same time with the N310?
>
> Also: Is there a way to search the Archives to see if someone has already
> asked this question. Google doesn't always seem to help.
>
> -
> Diftor heh smusma
> -Famous Vulcan Phrase ;)
>
> Tuning time is an artifact of the hardware (AD9371 in this case)--which
> isn't really fast on re-tuning.  It has nothing to do with thread
>   architecture/layout.
>
> Further, channels 0 and 1 will always be tuned to the same RF frequency,
> due to the LO architecture of the AD9371, similarly 2 and 3 will
>   always use the same LO frequency.
>
>
> You can certainly spread sample-handling across multiple threads, and use
> the two available RF tunings (across the two RF chips) to speed
>   things up a bit (cut the effective latency in half by interleaving).
> But you're not going to get more than a factor of two.
>
>
> _______________________________________________
> USRP-users mailing list
> [email protected]
> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
>
_______________________________________________
USRP-users mailing list
[email protected]
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com

Reply via email to