[USRP-users] Keep One in N

Zhihong Luo zhluo at umich.edu
Sun Mar 27 01:44:40 EDT 2016


Hi all,

I tried to use the RFNoC FIR filter and Keep One in N blocks to decimate my
received signal. The FIR filter worked fine, but the Keep One in N block
did not work as I expected. When capturing a square signal, with and
without the Keep One in N block, the received sample number of the high
period remained unchanged. I wonder whether I made a mistake in my code:

 uhd::rfnoc::block_id_t fir_ctrl_id(0, "FIR", 0);
 uhd::rfnoc::block_id_t keep_n_id(0,"KeepOneInN",0);

 uhd::rfnoc::fir_block_ctrl::sptr fir_ctrl =
usrp->get_device3()->find_block_ctrl<uhd::rfnoc::fir_block_ctrl>(fir_ctrl_id);

uhd::rfnoc::block_ctrl_base::sptr
keep_n_ctrl=usrp->get_device3()->find_block_ctrl(keep_n_id);

 fir_ctrl->set_args(uhd::device_addr_t(streamargs)); //streamargs is an
empty string
 usrp->get_device3()->get_block_ctrl(radio_ctrl_id)->set_args(streamargs);
 keep_n_ctrl->set_args(uhd::device_addr_t(streamargs));

 fir_ctrl->set_taps(taps);
 keep_n_ctrl->sr_write("SR_N", 16); // downsampling by 16 times

usrp->connect(radio_ctrl_id, fir_ctrl->get_block_id());
usrp->connect(fir_ctrl->get_block_id(),  keep_n_ctrl->get_block_id());

usrp->set_rx_channel(keep_n_ctrl->get_block_id());

Thanks in advance for providing any help :)

Zhihong
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ettus.com/pipermail/usrp-users_lists.ettus.com/attachments/20160327/5902ddb3/attachment-0002.html>


More information about the USRP-users mailing list