Commit Graph

4 Commits

Author SHA1 Message Date
Jörg Hofrichter
f37e61c882 examples: rfnoc-gain: correct cmake command in README
When running cmake, the FPGA directory must be provided as
variable UHD_FPGA_DIR.
2025-07-10 09:30:53 +02:00
Martin Braun
8684d3c15a rfnoc oot: Move fpga/ subdir into rfnoc/
During redesign of the OOT module directory layout, the block YAMLs and
dts files were moved under `rfnoc/`, but the gateware was not. This
causes an inconsistency in the directory layout before and after
installation, making it hard to switch between installed and
not-installed versions of RFNoC modules.

For example, block YAMLs are in `./rfnoc/blocks/*.yml`, and gateware is
in `fpga/gain/rfnoc_block_gain/*`. After installation, block YAMLs are
in `$PREFIX/share/uhd/rfnoc/blocks/*.yml`, and gateware is in
`$PREFIX/share/uhd/rfnoc/fpga/gain/rfnoc_block_gain/*` -- note the
discrepancy.

This fixes two immediate issues:

- When building the X410 example in-tree, the DTS file was not being
  found because it used the same finding logic as the gateware source files.
- When building any image core file post-installation, none of the
  gateware could be found because it used the same logic for finding
  gateware inside the OOT, which is in a different location relative to
  the block YAMLs.

By removing the inconsistencies, both these use cases work.

A note on backward compatibility:

- Existing OOT modules already have the issue that building bitfiles
  post-install does not work, and that will continue to not work.
  However, otherwise, they will keep working as before.
- Because people may have gotten accustomed to specifying the RFNoC OOT
  module as the include directory (e.g., `rfnoc_image_builder -I
  /path/to/rfnoc-gain`), we allow for this use case, and auto-correct
  the include path in this case with some backward compatibility code.
- Building the rfnoc-gain/icores/x410_XG_200_rfnoc_image_core.yml
  example image core file now also works, even with older versions of
  rfnoc-gain.
2025-04-15 09:43:04 +02:00
Martin Braun
1d8026bcfe examples: rfnoc-gain: Add GR submodule
Add a GNU Radio module (gr-rfnoc_gain) which provides bindings for the
gain block into GNU Radio. This is used as an example for how to write
GNU Radio OOT modules.

This GNU Radio OOT includes:
- Native C++ block for the gain block controller
- A generic version of the same block (available in GRC)
- GRC bindings
- GRC examples
2024-09-02 08:22:58 +02:00
Martin Braun
9f3b9e0282 examples: Overhaul RFNoC OOT example directory structure
- Renamed rfnoc-example to rfnoc-gain. This is because a) it's obvious
  that this is an example as it is located in host/examples, b) because
  we have sub-directories of this OOT that are called 'examples' (where
  we ship the OOT examples) so that got confusing and c) names of OOTs
  should declare what they do, and despite this being an example, it
  provides a gain block.
- Changed directory structure so that installation paths and in-repo
  paths match.
  - Block descriptor YAMLs are now in rfnoc/blocks/*.yml
  - HDL sources are in fpga/gain/rfnoc_block_gain
- Improved top-level README
- Added an example for DTS files
- Updated gain.yml to use new features (checks, specifying fpga_includes,
  specifying DTS)
2024-09-02 08:22:58 +02:00