Discussion and technical support related to USRP, UHD, RFNoC
View all threadsOn Mon, Aug 9, 2021 at 2:12 PM Jonathan Tobin Tobin@augustusaero.com
wrote:
Just as an additional update - I was able to test with UHD 4.1 and there
is no issue - seems to be something with UHD 3.15 then.
Just chiming in here to ensure you understand that your test of receiving
625M samples using that particular program will keep all those samples in
memory for all the channels while you receive.
In other words, 10GB of RAM (625M samples * 4 bytes/sample/channel * 4
channels) will be used just to hold your received signal.
Is this what you really intend to do?
The error you received before was a 32-bit/4GB limit I am pretty sure
(26843545544 = 4294967280 ~= 2^32).
Brian
Hi Brian,
No - only intention would be to receive for 10 seconds and save data. What would you suggest?
Thanks,
Jonathan
From: Brian Padalino bpadalino@gmail.com
Sent: Monday, August 9, 2021 6:01 PM
To: Jonathan Tobin Tobin@augustusaero.com
Cc: Marcus D. Leech patchvonbraun@gmail.com; usrp-users@lists.ettus.com usrp-users@lists.ettus.com
Subject: Re: [USRP-users] Re: Too Many Samples in a Single Burst
On Mon, Aug 9, 2021 at 2:12 PM Jonathan Tobin <Tobin@augustusaero.commailto:Tobin@augustusaero.com> wrote:
Just as an additional update - I was able to test with UHD 4.1 and there is no issue - seems to be something with UHD 3.15 then.
Just chiming in here to ensure you understand that your test of receiving 625M samples using that particular program will keep all those samples in memory for all the channels while you receive.
In other words, 10GB of RAM (625M samples * 4 bytes/sample/channel * 4 channels) will be used just to hold your received signal.
Is this what you really intend to do?
The error you received before was a 32-bit/4GB limit I am pretty sure (26843545544 = 4294967280 ~= 2^32).
Brian
On Tue, Aug 10, 2021 at 9:39 AM Jonathan Tobin Tobin@augustusaero.com
wrote:
Hi Brian,
No - only intention would be to receive for 10 seconds and save data. What
would you suggest?
Modify the program to write out to a file on a high performance drive and
receive smaller parts at a time from UHD.
Brian
On 08/10/2021 12:01 AM, Brian Padalino wrote:
On Mon, Aug 9, 2021 at 2:12 PM Jonathan Tobin <Tobin@augustusaero.com
mailto:Tobin@augustusaero.com> wrote:
Just as an additional update - I was able to test with UHD 4.1 and
there is no issue - seems to be something with UHD 3.15 then.
Just chiming in here to ensure you understand that your test of
receiving 625M samples using that particular program will keep all
those samples in memory for all the channels while you receive.
In other words, 10GB of RAM (625M samples * 4 bytes/sample/channel * 4
channels) will be used just to hold your received signal.
Brian:
I don't think that's actually true. The data are buffered in chunks of
'samps_per_buff' -- so there's only that much being stored at any given
time (at least in rx_multi_samples.cpp).
Is this what you really intend to do?
The error you received before was a 32-bit/4GB limit I am pretty sure
(26843545544 = 4294967280 ~= 2^32).
Brian
On Tue, Aug 10, 2021 at 10:37 AM Marcus D. Leech patchvonbraun@gmail.com
wrote:
On 08/10/2021 12:01 AM, Brian Padalino wrote:
On Mon, Aug 9, 2021 at 2:12 PM Jonathan Tobin Tobin@augustusaero.com
wrote:
Just as an additional update - I was able to test with UHD 4.1 and there
is no issue - seems to be something with UHD 3.15 then.
Just chiming in here to ensure you understand that your test of receiving
625M samples using that particular program will keep all those samples in
memory for all the channels while you receive.
In other words, 10GB of RAM (625M samples * 4 bytes/sample/channel * 4
channels) will be used just to hold your received signal.
Brian:
I don't think that's actually true. The data are buffered in chunks of
'samps_per_buff' -- so there's only that much being stored at any given
time (at least in rx_multi_samples.cpp).
You're right - I should have consulted the code instead of make assumptions
when seeing some numbers printed out.
It follows as such from master:
The stream command num_samps is assigned the total number of samples here:
... and the warning is actually printed out when issue_stream_cmd() is
called:
... and not when trying to actually recv().
Sorry for the misunderstanding.
Brian
On 08/10/2021 10:34 AM, Brian Padalino wrote:
On Tue, Aug 10, 2021 at 9:39 AM Jonathan Tobin <Tobin@augustusaero.com
mailto:Tobin@augustusaero.com> wrote:
Hi Brian,
No - only intention would be to receive for 10 seconds and save
data. What would you suggest?
Modify the program to write out to a file on a high performance drive
and receive smaller parts at a time from UHD.
Brian
I suspect what's going on is that the various streaming modes are
implemented by the HARDWARE, and the control-word for
"NUM_SAMPS_AND_DONE" prior to UHD 4.x was only 32 bits--looks like
it's now 48 bits.
To follow up,
This seems to be the limit now that I have updated to UHD 4.1.0.1:
[ERROR] [0/Radio#0] Requesting too many samples in a single burst! Requested 18446744028430598144, maximum is 281474976710655.
This occurs with the key arguments: --rx-rate 4.8e6 --rx-subdev "A:0 A:1 B:0 B:1" --rx-channels "0,1,2,3" --nsamps 2880000000
The nsamps value is for 10 minutes of recording (sample rate * 60 seconds * 10 minutes).
Thanks,
Jonathan
From: Marcus D. Leech patchvonbraun@gmail.com
Sent: Tuesday, August 10, 2021 4:58 AM
To: Brian Padalino bpadalino@gmail.com; Jonathan Tobin Tobin@augustusaero.com
Cc: usrp-users@lists.ettus.com usrp-users@lists.ettus.com
Subject: Re: [USRP-users] Re: Too Many Samples in a Single Burst
On 08/10/2021 10:34 AM, Brian Padalino wrote:
On Tue, Aug 10, 2021 at 9:39 AM Jonathan Tobin <Tobin@augustusaero.commailto:Tobin@augustusaero.com> wrote:
Hi Brian,
No - only intention would be to receive for 10 seconds and save data. What would you suggest?
Modify the program to write out to a file on a high performance drive and receive smaller parts at a time from UHD.
Brian
I suspect what's going on is that the various streaming modes are implemented by the HARDWARE, and the control-word for
"NUM_SAMPS_AND_DONE" prior to UHD 4.x was only 32 bits--looks like it's now 48 bits.
On 08/10/2021 05:07 PM, Jonathan Tobin wrote:
To follow up,
This seems to be the limit now that I have updated to UHD 4.1.0.1:
[ERROR] [0/Radio#0] Requesting too many samples in a single burst!
Requested 18446744028430598144, maximum is 281474976710655.
This occurs with the key arguments: --rx-rate 4.8e6 --rx-subdev "A:0
A:1 B:0 B:1" --rx-channels "0,1,2,3" --nsamps 2880000000
The nsamps value is for 10 minutes of recording (sample rate * 60
seconds * 10 minutes).
Thanks,
Jonathan
Right. Because that example program uses the NUM_SAMPS_AND_DONE
streamer type, which requires that the RADIO keep track of the
number of samples you're interested in. That was extended from
32-bits to 48 bits.
You'll note that txrx_loopback_to_file will simply run continuously if
you dont specify --nsamps, because it uses two different streaming modes:
// setup streaming
uhd::stream_cmd_t stream_cmd((num_requested_samples == 0)
?
uhd::stream_cmd_t::STREAM_MODE_START_CONTINUOUS
:
uhd::stream_cmd_t::STREAM_MODE_NUM_SAMPS_AND_DONE);
You can then just interrupt it when you're done or add some code to see
if you have enough samples, even when you're running continuously
or see if enough time has elapsed, etc, etc.
Contrast with rx_multi_samples:
// setup streaming
std::cout << std::endl;
std::cout << boost::format("Begin streaming %u samples, %f seconds
in the future...")
% total_num_samps % seconds_in_future
<< std::endl;
uhd::stream_cmd_t
stream_cmd(uhd::stream_cmd_t::STREAM_MODE_NUM_SAMPS_AND_DONE);
Same comment as above. You can modify this to run continuously, and
then have the sample-gather loop exit when it is satisfied that it has
enough samples--either because enough time has elapsed or a sample
counter has reached a certain value.
The UHD API is diverse. There's no possible way that the handful of
example programs can possibly satisfy every use case, and that's simply
not design intent. Some programming may be required.
It's too bad that Ettus did not implement the STOP_CONTINUOUS as a timed
command. Had they done so, it would have been possible to send a
START_CONTINUOUS followed immediately by a STOP_CONTINUOUS (with time
stamp) such that the radio would automatically stop on the correct sample.
That being the case, the long captures require the user to stop the radio
after receiving the desired number of samples and then flush / discard the
rest.
Rob
On Tue, Aug 10, 2021 at 6:00 PM Marcus D. Leech patchvonbraun@gmail.com
wrote:
On 08/10/2021 05:07 PM, Jonathan Tobin wrote:
To follow up,
This seems to be the limit now that I have updated to UHD 4.1.0.1:
[ERROR] [0/Radio#0] Requesting too many samples in a single burst!
Requested 18446744028430598144, maximum is 281474976710655.
This occurs with the key arguments: --rx-rate 4.8e6 --rx-subdev "A:0 A:1
B:0 B:1" --rx-channels "0,1,2,3" --nsamps 2880000000
The nsamps value is for 10 minutes of recording (sample rate * 60 seconds
Thanks,
Jonathan
Right. Because that example program uses the NUM_SAMPS_AND_DONE
streamer type, which requires that the RADIO keep track of the
number of samples you're interested in. That was extended from 32-bits
to 48 bits.
You'll note that txrx_loopback_to_file will simply run continuously if you
dont specify --nsamps, because it uses two different streaming modes:
// setup streaming
uhd::stream_cmd_t stream_cmd((num_requested_samples == 0)
?
uhd::stream_cmd_t::STREAM_MODE_START_CONTINUOUS
:
uhd::stream_cmd_t::STREAM_MODE_NUM_SAMPS_AND_DONE);
You can then just interrupt it when you're done or add some code to see if
you have enough samples, even when you're running continuously
or see if enough time has elapsed, etc, etc.
Contrast with rx_multi_samples:
// setup streaming
std::cout << std::endl;
std::cout << boost::format("Begin streaming %u samples, %f seconds in
the future...")
% total_num_samps % seconds_in_future
<< std::endl;
uhd::stream_cmd_t
stream_cmd(uhd::stream_cmd_t::STREAM_MODE_NUM_SAMPS_AND_DONE);
Same comment as above. You can modify this to run continuously, and then
have the sample-gather loop exit when it is satisfied that it has
enough samples--either because enough time has elapsed or a sample
counter has reached a certain value.
The UHD API is diverse. There's no possible way that the handful of
example programs can possibly satisfy every use case, and that's simply
not design intent. Some programming may be required.
USRP-users mailing list -- usrp-users@lists.ettus.com
To unsubscribe send an email to usrp-users-leave@lists.ettus.com
On 08/11/2021 09:18 AM, Rob Kossler wrote:
It's too bad that Ettus did not implement the STOP_CONTINUOUS as a
timed command. Had they done so, it would have been possible to send
a START_CONTINUOUS followed immediately by a STOP_CONTINUOUS (with
time stamp) such that the radio would automatically stop on the
correct sample. That being the case, the long captures require the
user to stop the radio after receiving the desired number of samples
and then flush / discard the rest.
Rob
Agreed, that would be a good implementation. Probably wouldn't be that
hard to do (he says, displaying an optimism fueled by only superficial
knowledge
of the FPGA codebase).
On Tue, Aug 10, 2021 at 6:00 PM Marcus D. Leech
<patchvonbraun@gmail.com mailto:patchvonbraun@gmail.com> wrote:
On 08/10/2021 05:07 PM, Jonathan Tobin wrote:
To follow up,
This seems to be the limit now that I have updated to UHD 4.1.0.1
<http://4.1.0.1>:
[ERROR] [0/Radio#0] Requesting too many samples in a single
burst! Requested 18446744028430598144, maximum is 281474976710655.
This occurs with the key arguments: --rx-rate 4.8e6 --rx-subdev
"A:0 A:1 B:0 B:1" --rx-channels "0,1,2,3" --nsamps 2880000000
The nsamps value is for 10 minutes of recording (sample rate * 60
seconds * 10 minutes).
Thanks,
Jonathan
Right. Because that *example* program uses the NUM_SAMPS_AND_DONE
streamer type, which requires that the *RADIO* keep track of the
number of samples you're interested in. That was extended from
32-bits to 48 bits.
You'll note that txrx_loopback_to_file will simply run
continuously if you *dont* specify --nsamps, because it uses two
different streaming modes:
// setup streaming
uhd::stream_cmd_t stream_cmd((num_requested_samples == 0)
?
uhd::stream_cmd_t::STREAM_MODE_START_CONTINUOUS
:
uhd::stream_cmd_t::STREAM_MODE_NUM_SAMPS_AND_DONE);
You can then just interrupt it when you're done or add some code
to see if you have enough samples, even when you're running
continuously
or see if enough time has elapsed, etc, etc.
Contrast with rx_multi_samples:
// setup streaming
std::cout << std::endl;
std::cout << boost::format("Begin streaming %u samples, %f
seconds in the future...")
% total_num_samps % seconds_in_future
<< std::endl;
uhd::stream_cmd_t
stream_cmd(uhd::stream_cmd_t::STREAM_MODE_NUM_SAMPS_AND_DONE);
Same comment as above. You can modify this to run continuously,
and then have the sample-gather loop exit when it is satisfied
that it has
enough samples--either because enough time has elapsed or a
sample counter has reached a certain value.
The UHD API is diverse. There's no possible way that the handful
of *example* programs can possibly satisfy every use case, and
that's simply
not design intent. Some programming may be required.
_______________________________________________
USRP-users mailing list -- usrp-users@lists.ettus.com
<mailto:usrp-users@lists.ettus.com>
To unsubscribe send an email to usrp-users-leave@lists.ettus.com
<mailto:usrp-users-leave@lists.ettus.com>