无法从示例中使用我的增益块。怎么办?

发布于 2025-01-23 05:08:20 字数 992 浏览 3 评论 0原文

我正在尝试为我的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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

遗弃M 2025-01-30 05:08:20

有一个示例应用程序(rfnoc-example/apps/init_gain_block.cpp),该应用程序将为您测试块的功能。您可以编译/运行它,以查看您的块是否有效。

如果您看到uhd_usrp_probe返回0/block#0而不是0/gain#0,则未访问.SO文件适当地。测试此操作的最简单方法是ld_preload the dll喜欢这样:

LD_PRELOAD=/path/to/librfnoc-example.so uhd_usrp_probe

这将做的是强制包含块控制器的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 return 0/Block#0 instead of 0/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:

LD_PRELOAD=/path/to/librfnoc-example.so uhd_usrp_probe

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文