Hello. I want to create a graph with two fft blocks for UHD4 and manage them using python. I am using USRP E310. My FPGA connections look like this: 0/Radio#0:0==>0/FFT#0:0 0/FFT#0:0==>0/SEP#0:0 0/Radio#0:1==>0/FFT#1:0 0/FFT#1:0==>0/SEP#1:0 I want to receive data from two blocks at the same time. But as a result, I get 0 samples. Here is my code: ``` import numpy as np import uhd graph = uhd.rfnoc.RfnocGraph('type=e3xx') for i in graph.enumerate_static_connections(): print(i.to_string()) fft_lenght = 1024 radio_noc_block = graph.get_block('0/Radio#0') radio_block = uhd.rfnoc.RadioControl(radio_noc_block)
radio_block.set_rx_frequency(856e6,0) radio_block.set_rx_gain(65,0) radio_block.set_rx_antenna('RX2',0) radio_block.set_rate(100e3) fft_amplitude = uhd.libpyuhd.rfnoc.fft_magnitude.COMPLEX fft_direction = uhd.libpyuhd.rfnoc.fft_direction.FORWARD fft_shift = uhd.libpyuhd.rfnoc.fft_shift.REVERSE fft = uhd.rfnoc.FftBlockControl(graph.get_block('0/FFT#0')) fft.set_length(fft_lenght) fft.set_magnitude(fft_amplitude) fft.set_direction(fft_direction) fft.set_shift_config(fft_shift) fft1 = uhd.rfnoc.FftBlockControl(graph.get_block('0/FFT#1')) fft1.set_length(fft_lenght) fft1.set_magnitude(fft_amplitude) fft1.set_direction(fft_direction) fft1.set_shift_config(fft_shift) graph.connect('0/Radio#0',0,'0/FFT#0',0,False) graph.connect('0/Radio#0',1,'0/FFT#1',0,False) sa = uhd.usrp.StreamArgs('fc32','sc16') sa.args = 'spp='+str(fft_lenght) rx_streamer = graph.create_rx_streamer(2,sa) graph.connect('0/FFT#1',0,rx_streamer,1) graph.connect('0/FFT#0',0,rx_streamer,0) num_samps = int(fft.get_length()*5) radio_zeros = np.zeros((2,num_samps),dtype=np.complex64) graph.commit() print(num_samps) stream_cmd = uhd.types.StreamCMD(uhd.types.StreamMode.num_done) stream_cmd.num_samps =num_samps stream_cmd.stream_now = False stream_cmd.time_spec = graph.get_mb_controller(0).get_timekeeper(0).get_time_now()+0.1 rx_streamer.issue_stream_cmd(stream_cmd) rx_metadata = uhd.types.RXMetadata() num_samps = rx_streamer.recv(radio_zeros,rx_metadata,0.1) print(num_samps) print(rx_metadata) print(radio_zeros) ``` And I am getting the following error: Has timespec: No Time of first sample: 0 Fragmented: No Fragmentation offset: 0 Start of burst: No End of burst: No Error Code: ERROR_CODE_TIMEOUT Out of sequence: No Please tell me what the problem is, since I did not find documentation and examples other than https://www.youtube.com/watch?v=fbcxm7f-Tj0&t=290s Thank you in advance
_______________________________________________ USRP-users mailing list -- usrp-users@lists.ettus.com To unsubscribe send an email to usrp-users-le...@lists.ettus.com