discuss-gnuradio
[Top][All Lists]
Advanced

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

2 SDRs – Parallel Programming


From: Oğuzhan Gedikli
Subject: 2 SDRs – Parallel Programming
Date: Thu, 4 Jan 2024 14:43:43 +0000

Hello,

I have a system I set up with 2 different SDRs. One of the SDRs works as a transmitter and the other works as a receiver. When I want to change the center frequency of both of them, I use the code below.

usrp_sink.set_center_freq(uhd.tune_request(freq, rf_freq=freq - lo_offset, rf_freq_policy=uhd.tune_request.POLICY_MANUAL), 0)
usrp_source.set_center_freq(uhd.tune_request(freq, rf_freq=freq - lo_offset, rf_freq_policy=uhd.tune_request.POLICY_MANUAL), 0)

I measured how long each one took. One of them (of course, I know it changes depending on the hopping frequency. I applied all the tests I mentioned at the same frequencies) takes 180ms, and the other one takes 50ms.

50ms is of great importance to me because it repeats this process thousands of times during a measurement. For this reason, I wanted to run the 2 lines of code you see in parallel and I noticed that there was no change in the time. I tested the code I wrote to parallelize it; the code works. It starts both functions at the same time. Later, when I debugged the parts containing 'set_center_freq', I saw that the 'wait' command took up most of the time spent. I have not examined the contents of your library. I'm saying what I see on the debug screen. I did not write any 'wait' command myself. But I don't understand why one SDR keeps threading and prevents applying commands to the other.


footnote: There is no situation due to GIL. I tested this too.



reply via email to

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