aboutsummaryrefslogtreecommitdiffstats
path: root/host/utils
diff options
context:
space:
mode:
authorMichael West <michael.west@ettus.com>2020-03-24 15:01:27 -0700
committerAaron Rossetto <aaron.rossetto@ni.com>2020-03-31 15:06:53 -0500
commit010d25f0e29fafb6455ceac522976c3c249ee8d5 (patch)
treee8f0b5b5ca0a1a278c9930df90409d8406e60ed7 /host/utils
parent6728ec40be65ce3e329dcf559d0b330905354dab (diff)
downloaduhd-010d25f0e29fafb6455ceac522976c3c249ee8d5.tar.gz
uhd-010d25f0e29fafb6455ceac522976c3c249ee8d5.tar.bz2
uhd-010d25f0e29fafb6455ceac522976c3c249ee8d5.zip
utils: uhd_usrp_probe: Output frontend info
Add output of frontend info for RFNoC devices. Signed-off-by: Michael West <michael.west@ettus.com>
Diffstat (limited to 'host/utils')
-rw-r--r--host/utils/uhd_usrp_probe.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/host/utils/uhd_usrp_probe.cpp b/host/utils/uhd_usrp_probe.cpp
index 6b98b212a..24b82543c 100644
--- a/host/utils/uhd_usrp_probe.cpp
+++ b/host/utils/uhd_usrp_probe.cpp
@@ -181,9 +181,11 @@ static std::string get_dboard_pp_string(
type, tree, path / (prefix + "_frontends") / name));
}
}
- ss << make_border(get_codec_pp_string(type,
- tree,
- path.branch_path().branch_path() / (prefix + "_codecs") / path.leaf()));
+ const fs_path codec_path =
+ path.branch_path().branch_path() / (prefix + "_codecs") / path.leaf();
+ if (tree->exists(codec_path)) {
+ ss << make_border(get_codec_pp_string(type, tree, codec_path));
+ }
return ss.str();
}
@@ -207,11 +209,17 @@ static std::string get_rfnoc_connections_pp_string(rfnoc::rfnoc_graph::sptr grap
return ss.str();
}
-static std::string get_rfnoc_pp_string(rfnoc::rfnoc_graph::sptr graph)
+static std::string get_rfnoc_pp_string(
+ rfnoc::rfnoc_graph::sptr graph, property_tree::sptr tree)
{
std::stringstream ss;
ss << make_border(get_rfnoc_blocks_pp_string(graph));
ss << make_border(get_rfnoc_connections_pp_string(graph));
+ auto radio_blocks = graph->find_blocks("Radio");
+ for (std::string block : radio_blocks) {
+ ss << make_border(get_dboard_pp_string("TX", tree, "blocks" / block / "dboard"));
+ ss << make_border(get_dboard_pp_string("RX", tree, "blocks" / block / "dboard"));
+ }
return ss.str();
}
@@ -492,7 +500,7 @@ int UHD_SAFE_MAIN(int argc, char* argv[])
} else if (not vm.count("init-only")) {
std::string device_pp_string = get_device_pp_string(tree);
if (graph) {
- device_pp_string += get_rfnoc_pp_string(graph);
+ device_pp_string += get_rfnoc_pp_string(graph, tree);
}
std::cout << make_border(device_pp_string) << std::endl;
}