aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/rfnoc/noc_block_base.cpp
Commit message (Collapse)AuthorAgeFilesLines
* uhd: Apply clang-format against all .cpp and .hpp files in host/Martin Braun2020-03-031-4/+4
| | | | | Note: template_lvbitx.{cpp,hpp} need to be excluded from the list of files that clang-format gets applied against.
* rfnoc: Add MTU trackingMartin Braun2019-11-261-4/+110
| | | | | | | | | | | | | | | | | MTUs are now tracked through the framework for all childs of noc_block_base. Every edge gets an 'mtu' property. MTU can be set and get either through the prop API, or through new API calls (get_mtu(), set_mtu()). It is also possible to create custom properties that depend on the MTU by asking for a reference to the MTU property, and then adding that to the input list of a property resolver. The radio_control_impl includes a change in this commit where it sets the spp based on the MTU. Blocks can also set an MTU forwarding policy. The DDC block includes a change in this commit that sets a forwarding policy of ONE_TO_ONE, meaning that the MTU on an input edge is forwarded to the corresponding output edge (but not the other edges, as with the tick rate).
* rfnoc: Add clock selection to blocksMartin Braun2019-11-261-13/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | 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 shutdown feature to blocksMartin Braun2019-11-261-0/+13
| | | | | | | | On destruction, the rfnoc_graph will call shutdown() on all blocks. This allows a safe de-initialization of blocks independent of the lifetime of the noc_block_base::sptr. Also adds the shutdown feature to null_block_control.
* rfnoc: noc_block_base: Store property tree reference from make_argsMartin Braun2019-11-261-1/+4
|
* rfnoc: noc_block_base: Pass args into block on constructionMartin Braun2019-11-261-0/+1
| | | | | These args come from the framework, e.g., because the UHD session was launched with them.
* rfnoc: noc_block_base: Add API to reduce num portsMartin Braun2019-11-261-0/+20
| | | | This allows blocks to reduce the number of actual, available ports.
* rfnoc: Add mb_controller APIMartin Braun2019-11-261-0/+6
| | | | | | | | | 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: noc_block_base: Handle the tick_rate property internallyMartin Braun2019-11-261-1/+61
| | | | | | | | | | | All noc_block_base derivatives are now plugged into the tick rate system. Connected nodes can only have one tick rate among them. This implies there is also only ever one tick rate per block. set_tick_rate() is a protected API call which can be called by blocks such as radio blocks to actually set a tick rate. Other blocks would only ever read the tick rate, which is handled by the get_tick_rate() API call.
* rfnoc: Add block registry/factory and make_argsMartin Braun2019-11-261-0/+18
| | | | | | - noc_block_base now has a ctor defined - The registry stores factory functions to the individual Noc-Block implementations
* rfnoc: Add noc_block_base classMartin Braun2019-11-261-0/+11
This is a parent class for all block controllers.