aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/rfnoc/registry_factory.cpp
Commit message (Collapse)AuthorAgeFilesLines
* uhd: Apply clang-format against all .cpp and .hpp files in host/Martin Braun2020-03-031-9/+7
| | | | | Note: template_lvbitx.{cpp,hpp} need to be excluded from the list of files that clang-format gets applied against.
* rfnoc: Create mock factoryMartin Braun2020-01-291-3/+5
| | | | | | This is an API that allows creating mock block controllers, to write unit tests for block controllers. See rfnoc_blocks_test for an example how to use them.
* rfnoc: Introduce device-specific blocksLars Amsel2019-11-261-59/+38
| | | | | | | | | | | | | - Add device ID constants (e.g., E310 == 0xE310, X300 == 0xA300). These are stored in the device FPGA, and can be used for decisions later - Blocks can be specific to a device. For example, x300_radio_control can only work on an X300 series device. - Because blocks can be device-specific, all radio blocks can now share a common Noc-ID (0x12AD1000). - The registry and factory functions are modified to acommodate for this. - The motherboard access is now also factored into the same registry macro.
* rfnoc: Add clock selection to blocksMartin Braun2019-11-261-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | During registration, blocks must now specify which clock they are using for the timebase (i.e., for timed commands) and for the ctrlport (this is used to determine the length of sleeps and polls). For example, the X300 provides bus_clk and radio_clk; typically, the former is used for the control port, and the latter for the timebase clock. Another virtual clock is called "__graph__", and it means the clock is derived from property propagation via the graph. The actual clocks are provided by the mb_iface. It has two new API calls: get_timebase_clock() and get_ctrlport_clock(), which take an argument as to which clock exactly is requested. On block initialization, those clock_iface objects are copied into the block controller. The get_tick_rate() API call for blocks now exclusively checks the timebase clock_iface, and will no longer cache the current tick rate in a separate _tick_rate member variable. Block controllers can't manually modify the clock_iface, unless they also have access to the mb_controller (like the radio block), and that mb_controller has provided said access. This commit also adds the clock selection API changes to the DDC block, the Null block, and the default block.
* rfnoc: Add mb_controller APIMartin Braun2019-11-261-0/+40
| | | | | | | | | The mb_controller is an interface to hardware-specific functions of the motherboard. The API works in two ways: - The user can request access to it, and thus interact directly with the motherboard - RFNoC blocks can request access to it, if they need to interact with the motherboard themselves.
* rfnoc: Add default block controllerMartin Braun2019-11-261-1/+2
| | | | | The default block controller should get instantiated when no other suitable block controller can be found.
* rfnoc: Add block registry/factory and make_argsMartin Braun2019-11-261-0/+88
- noc_block_base now has a ctor defined - The registry stores factory functions to the individual Noc-Block implementations