usrp-users@lists.ettus.com

Discussion and technical support related to USRP, UHD, RFNoC

View all threads

Post new thread

AH
Ahmet Hes
Mon, Jun 30, 2025 10:02 AM

Hello,

I have followed the exact same steps as shown in this video:
https://www.youtube.com/watch?v=M9ntwQie9vs to create a custom RFNoC Gain
block. I successfully built the FPGA bitstream and booted the E310 device
with it.

After flashing, I confirmed that the RFNoC blocks were correctly loaded.
The output is:
RFNoC blocks on this device:

  • 0/Gain#0
  • 0/Radio#0

Static connections on this device:

  • 0/SEP#0:0 ==> 0/Radio#0:0
  • 0/Radio#0:0 ==> 0/SEP#0:0
  • 0/SEP#1:0 ==> 0/Radio#0:1
  • 0/Radio#0:1 ==> 0/SEP#1:0
  • 0/SEP#2:0 ==> 0/Gain#0:0
  • 0/Gain#0:0 ==> 0/SEP#2:0

In addition to generating the bitstream, I also created and included the
required .yml files — specifically the block descriptor (gain.yml) and
image core (e310_rfnoc_image_core.yml). I confirmed that the image builder
detects them successfully when using --log-level debug.

However, when I try to recreate the block diagram in GNU Radio Companion,
following the same structure as shown in the video, I encounter the
following error during Python code generation:

Generating: "/home/aufer/Projects/rfnoc-gain/rfnoc_gain_trial.py"
Generate Error: Undefined

Failure

Traceback (most recent call last):
File
"/home/aufer/gnuradio-install/lib/python3.12/site-packages/gnuradio/grc/gui/Application.py",
line 758, in _handle_action
generator.write()
File
"/home/aufer/gnuradio-install/lib/python3.12/site-packages/gnuradio/grc/core/generator/top_block.py",
line 86, in write
for filename, data in self._build_python_code_from_template():
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/home/aufer/gnuradio-install/lib/python3.12/site-packages/gnuradio/grc/core/generator/top_block.py",
line 135, in _build_python_code_from_template
connections=self._connections(),
^^^^^^^^^^^^^^^^^^^
File
"/home/aufer/gnuradio-install/lib/python3.12/site-packages/gnuradio/grc/core/generator/top_block.py",
line 328, in _connections
code = template.render(
^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/mako/template.py", line 438, in
render
return runtime.render(self, self.callable, args, data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/mako/runtime.py", line 874, in
_render
_render_context(
File "/usr/lib/python3/dist-packages/mako/runtime.py", line 916, in
_render_context
_exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
File "/usr/lib/python3/dist-packages/mako/runtime.py", line 943, in
exec_template
callable
(context, *args, **kwargs)
File "memory:0x77b7681a8ce0", line 32, in render_body
File "/usr/lib/python3/dist-packages/mako/runtime.py", line 230, in
str
raise NameError("Undefined")
NameError: Undefined

This occurs when GRC attempts to generate the .py file.

Could you please advise what might be missing or misconfigured to cause
this “Undefined” error?

Best regards,

Hello, I have followed the exact same steps as shown in this video: https://www.youtube.com/watch?v=M9ntwQie9vs to create a custom RFNoC Gain block. I successfully built the FPGA bitstream and booted the E310 device with it. After flashing, I confirmed that the RFNoC blocks were correctly loaded. The output is: RFNoC blocks on this device: * 0/Gain#0 * 0/Radio#0 Static connections on this device: * 0/SEP#0:0 ==> 0/Radio#0:0 * 0/Radio#0:0 ==> 0/SEP#0:0 * 0/SEP#1:0 ==> 0/Radio#0:1 * 0/Radio#0:1 ==> 0/SEP#1:0 * 0/SEP#2:0 ==> 0/Gain#0:0 * 0/Gain#0:0 ==> 0/SEP#2:0 In addition to generating the bitstream, I also created and included the required .yml files — specifically the block descriptor (gain.yml) and image core (e310_rfnoc_image_core.yml). I confirmed that the image builder detects them successfully when using --log-level debug. However, when I try to recreate the block diagram in GNU Radio Companion, following the same structure as shown in the video, I encounter the following error during Python code generation: Generating: "/home/aufer/Projects/rfnoc-gain/rfnoc_gain_trial.py" Generate Error: Undefined >>> Failure Traceback (most recent call last): File "/home/aufer/gnuradio-install/lib/python3.12/site-packages/gnuradio/grc/gui/Application.py", line 758, in _handle_action generator.write() File "/home/aufer/gnuradio-install/lib/python3.12/site-packages/gnuradio/grc/core/generator/top_block.py", line 86, in write for filename, data in self._build_python_code_from_template(): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/aufer/gnuradio-install/lib/python3.12/site-packages/gnuradio/grc/core/generator/top_block.py", line 135, in _build_python_code_from_template connections=self._connections(), ^^^^^^^^^^^^^^^^^^^ File "/home/aufer/gnuradio-install/lib/python3.12/site-packages/gnuradio/grc/core/generator/top_block.py", line 328, in _connections code = template.render( ^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/mako/template.py", line 438, in render return runtime._render(self, self.callable_, args, data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/mako/runtime.py", line 874, in _render _render_context( File "/usr/lib/python3/dist-packages/mako/runtime.py", line 916, in _render_context _exec_template(inherit, lclcontext, args=args, kwargs=kwargs) File "/usr/lib/python3/dist-packages/mako/runtime.py", line 943, in _exec_template callable_(context, *args, **kwargs) File "memory:0x77b7681a8ce0", line 32, in render_body File "/usr/lib/python3/dist-packages/mako/runtime.py", line 230, in __str__ raise NameError("Undefined") NameError: Undefined This occurs when GRC attempts to generate the .py file. Could you please advise what might be missing or misconfigured to cause this “Undefined” error? Best regards,