diff options
author | Lars Amsel <lars.amsel@ni.com> | 2019-07-08 15:36:52 +0200 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2019-11-26 11:49:32 -0800 |
commit | 2a66eb62d89c5d18c176878ce036f0109706a9e2 (patch) | |
tree | 6715fd163aa1e7bdc55a5da5e09f67d04d3a6ed6 /host/lib/rfnoc/rfnoc_graph.cpp | |
parent | 914fbdbcb297322edd8e037cb776d29be4f58c31 (diff) | |
download | uhd-2a66eb62d89c5d18c176878ce036f0109706a9e2.tar.gz uhd-2a66eb62d89c5d18c176878ce036f0109706a9e2.tar.bz2 uhd-2a66eb62d89c5d18c176878ce036f0109706a9e2.zip |
rfnoc: Introduce device-specific blocks
- 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.
Diffstat (limited to 'host/lib/rfnoc/rfnoc_graph.cpp')
-rw-r--r-- | host/lib/rfnoc/rfnoc_graph.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/host/lib/rfnoc/rfnoc_graph.cpp b/host/lib/rfnoc/rfnoc_graph.cpp index c135247d3..bf49ca28b 100644 --- a/host/lib/rfnoc/rfnoc_graph.cpp +++ b/host/lib/rfnoc/rfnoc_graph.cpp @@ -10,6 +10,7 @@ #include <uhd/rfnoc/noc_block_make_args.hpp> #include <uhd/rfnoc/node.hpp> #include <uhd/rfnoc_graph.hpp> +#include <uhd/rfnoc/constants.hpp> #include <uhdlib/rfnoc/block_container.hpp> #include <uhdlib/rfnoc/factory.hpp> #include <uhdlib/rfnoc/graph.hpp> @@ -377,7 +378,8 @@ private: // Iterate through and register each of the blocks in this mboard for (size_t portno = 0; portno < num_blocks; ++portno) { const auto noc_id = mb_cz->get_noc_id(portno + first_block_port); - auto block_factory_info = factory::get_block_factory(noc_id); + const auto device_type = mb_cz->get_device_type(); + auto block_factory_info = factory::get_block_factory(noc_id, device_type); auto block_info = mb_cz->get_block_info(portno + first_block_port); block_id_t block_id(mb_idx, block_factory_info.block_name, @@ -410,9 +412,9 @@ private: make_args_uptr->reg_iface = block_reg_iface; make_args_uptr->tb_clk_iface = tb_clk_iface; make_args_uptr->ctrlport_clk_iface = ctrlport_clk_iface; - make_args_uptr->mb_control = (factory::has_requested_mb_access(noc_id) + make_args_uptr->mb_control = block_factory_info.mb_access ? _mb_controllers.at(mb_idx) - : nullptr); + : nullptr; const uhd::fs_path block_path(uhd::fs_path("/blocks") / block_id.to_string()); _tree->create<uint32_t>(block_path / "noc_id").set(noc_id); make_args_uptr->tree = _tree->subtree(block_path); |