无法从示例中使用我的增益块。怎么办?
我正在尝试为我的X310制作一个自定义块并使用它。 到目前为止,我无法使用自定义块增益,因为我无法使用FPGA图像汇编。
我已经逐步遵循“构建具有OOT块的FPGA图像”教程,并成功地编译并将图像上传到了我的X310。 uhd_usrp_probe返回了预期的“ 0/块#0”,来回链接到SEP4块。但是RFNOC的警告:block_factory状态“无法找到NOC-ID 0xB16,0xffff”
我在编译了基于rfnoc_radio_loopback示例的自定义C ++程序后继续进行,我继续使用该块,以便使用增益块,
我在包括:
#include <rfnoc::gain::gain_block_control.hpp>
Radio_Block_Control Intancing之后的这两行:
uhd::rfnoc::block_id_t gain_id(0, "Block", 0);
rfnoc::example::gain_block_control::sptr gain_ctrl = graph->get_block<rfnoc::example::gain_block_control>(gain_id);
该程序恢复正常,但运行它返回一个lookuperror,指出“此设备没有类型rfnoc的块::示例:: gain_block_control gain_block_control gain_block_control,rid:gain_block_control具有ID:0/Block#0” 我倾向于相信查找错误很明显,但我不知道该怎么办。
我首先尝试将块与gnuradio-companion一起使用,但根本无法生成块。我敢肯定,我缺少一些东西,但我不知道什么(除了实际的脑细胞)。
- 我的C ++怎么了?
- 是否可以在Gnuradio-Companion中产生增益块,如果是的话?
- 您是否知道一些教程可以解释有关如何使用自定义块的不同过程?
I am trying to make a custom block for my x310 and use it.
So far, I'm stuck at the example FPGA image compilation because I can't use the custom block gain.
I've followed step by step the "Building an FPGA Image with OOT Blocks" tutorial and successfully compiled and uploaded the image to my x310. A uhd_usrp_probe returned the expected "0/Block#0" linked back and forth to the SEP4 Block. But a warning from RFNOC:BLOCK_FACTORY states "could not find block with Noc-ID 0xb16, 0xffff"
I proceeded anyway after compiling a custom C++ program based on the rfnoc_radio_loopback example in order to make use of the gain block,
I added this line in the includes:
#include <rfnoc::gain::gain_block_control.hpp>
And these two lines after the radio_block_control instancing:
uhd::rfnoc::block_id_t gain_id(0, "Block", 0);
rfnoc::example::gain_block_control::sptr gain_ctrl = graph->get_block<rfnoc::example::gain_block_control>(gain_id);
The program compiles fine but running it returns a LookupError stating "This device doesn't have a block of type rfnoc::example::gain_block_control with ID: 0/Block#0"
I tend to believe the lookup error is clear but I don't know what to do instead.
I first tried to use the block with gnuradio-companion but was not able to generate the block at all. I am sure I am missing something but I have no idea what (apart from actual brain cells).
- What is wrong with my C++?
- Is it possible to generate a gain block in gnuradio-companion and if yes how?
- Do you know of some tutorial that explains the different procedures on how to use a custom block?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有一个示例应用程序(
rfnoc-example/apps/init_gain_block.cpp
),该应用程序将为您测试块的功能。您可以编译/运行它,以查看您的块是否有效。如果您看到
uhd_usrp_probe
返回0/block#0
而不是0/gain#0
,则未访问.SO文件适当地。测试此操作的最简单方法是ld_preload the dll喜欢这样:这将做的是强制包含块控制器的dll的预紧额(确保已注册)。现在,您应该将
0/Gain#0
作为块ID现在。There is an example application (
rfnoc-example/apps/init_gain_block.cpp
) that will test the functionality of the block for you. You can compile/run that to see if your block is working.If you are seeing
uhd_usrp_probe
return0/Block#0
instead of0/Gain#0
, then the .so file is not being picked up properly. The easiest way to test this is to LD_PRELOAD the DLL like this:What this will do is force a preload of the DLL containing the block controller (which will make sure it is registered). You should be seing
0/Gain#0
as the block ID now.