Hello,

Does anybody have a working example of usage of FFT RFNoC block on X410?

Recent example for other USRP i.e. X310 would also be quite good.

I followed the description here: https://kb.ettus.com/Getting_Started_with_RFNoC_in_UHD_4.0
to add the fft block (I've attached my changed RFNoC's YML).
Here are my additions to stock rfnoc image core yml (x410_200_rfnoc_image_core.yml):

stream_endpoints:
   ep_fft:
     ctrl: False
     data: True
     buff_size_bytes: 32768

noc_blocks:
   fft0:
     block_desc: 'fft_1x64.yml'

connections:
   # FFT Blocks Connections
   - { srcblk: ep_fft,  srcport: out0,  dstblk: fft0,    dstport: in_0 }
   - { srcblk: fft0,    srcport: out_0, dstblk: ep_fft,  dstport: in0  }

clk_domains:
     - { srcblk: _device_, srcport: radio_2x, dstblk: fft0, dstport: ce    }

When I use FFT block I don't get any samples (checked with Wireshark)
- I get only timeout errors and information about overflows.

I've attached an example Python code. The same result is obtained in GNU Radio.

Probably there is something wrong with the FFT block, but I don't know
what it might be exactly. I've tried to use different clock rate ('radio' clock)
but without success.

--
Best Regards,
Piotr Krysik
#!/usr/bin/python3
import uhd
import numpy as np

master_clock_rate = 256e6
fft_size = 256
graph = uhd.rfnoc.RfnocGraph("addr=192.168.10.2,master_clock_rate=256e6")

sa = uhd.usrp.StreamArgs("fc32", "sc16")

rx_streamer0 = graph.create_rx_streamer(1, sa)

decim = 128
ddc_block = graph.get_block("0/DDC#0")
ddc_control = uhd.rfnoc.DdcBlockControl(ddc_block)
ddc_control.set_input_rate(master_clock_rate, 0)
ddc_control.set_output_rate(master_clock_rate/decim, 0)

graph.connect("0/Radio#0", 0, "0/DDC#0", 0, False)
graph.connect("0/DDC#0", 0, "0/FFT#0", 0)
graph.connect("0/FFT#0", 0, rx_streamer0, 0)
graph.commit()

num_samps = int(fft_size * 1000)
radio_zeros0 = np.zeros((1,int(num_samps/50)),dtype=np.complex64)

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() + 1.0

rx_streamer0.issue_stream_cmd(stream_cmd)
rx_metadata0 = uhd.types.RXMetadata()

for i in range(0, 30):
    num_samps0 = rx_streamer0.recv(radio_zeros0, rx_metadata0, 0.1)
    print(i, num_samps0, rx_metadata0)

Attachment: x410_200_rfnoc_image_core_with_fft.yml
Description: application/yaml

_______________________________________________
USRP-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to