Hello,

when aiming for high IO throughput, Python is at the moment not the
language of choice.
You don't need to know much C++ to make an example work: the
rx_samples_to_files example that UHD installs can save directly to disk
in any CPU format.

But: honestly, a USB3 hard disk very likely won't sustain even 123
MB/s, in my experience. You need faster storage; an SSD is desirable
(as even fast internal hard disks bare exceed 200 MB/s even only in
short bursts), and USB3 isn't desirable at all. Do a benchmark with
your storage first – will it even theoretically achieve the write rate
you need?

For how long do you plan to record dual-channel record 30.72 MHz at
once? That will allow you/us to calculate whether using RAM buffering
might be a solution.

Best regards,
Marcus

On Sat, 2019-05-04 at 04:48 +0800, 应山川 via USRP-users wrote:
> Hello , I’m a beginner of the USRP and UHD software. I’m sorry l may
> deliver my question unclearly with my broken English.
> 
> 
> What I want:
> I need to receive the real-time radio signals with a B210 USRP
> device, according to my sample rate,I need an external hard disk to
> achieve at least 245.76MB/s using fc32 in my host.  But the USB3.0
> hard driver I  connecting to the host only get 180MB/s in write mode.
> Therefore,I want change the CPU_format from fc32 to sc16 to decrease
> the load in the USB3.0 transmission.
> 
> 
> What problem I confronted:
> I’m not familiar with CPP language, So I choose to drive the B210
> with python API.When I refer to the source code in Github/UHD , I
> find an example in /UHD/host/python/usrp.py. It tells me how to
> initialize a RX streamer and start receiving samples.These code are
>  
> ….
> st_args = lib.usrp.stream_args("fc32", "sc16”)
> ….
> 
> recv_buffer = np.zeros((len(channels), buffer_samps),
> dtype=np.complex64)
> ….
> 
> samps = streamer.recv(recv_buffer, metadata)
> ...
> 
> 
> I have some confusion as follow:
> 1、Must the recv_buffer be the numpy complex array? As far as I know,
> numpy only has the dtype complex64 and complex128. If I use the sc16
> as the cpu format, what kind  of numpy array should  I create to act
> as the ‘recv_buffer’?
> 
> 2、I try something workarounds, but I’m not sure the receive data are
> correct. 
> First:  st_args = lib.usrp.stream_args(“sc16", "sc16”)      # I
> change the CPU format to sc16
> Second:   recv_buffer = np.zeros((len(channels), buffer_samps*2),
> dtype=np.int16)     # I create the array with double size
> buffer_samps, and  assign the ’np.int16’ to the dtype.
> Finally:   samps = streamer.recv(recv_buffer, metadata)   # receive
> the data in the int16 array
> 
> I guess the recv() function will return I and Q samples in pairs.I
> can print the integer from the array, but cannot confirm the
> correctness of this ‘method’.
> 
> 
> Please give me some suggestions about how to use ’sc16’ in python, I
> will appreciate it in advance!!
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> _______________________________________________
> USRP-users mailing list
> USRP-users@lists.ettus.com
> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com


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

Reply via email to