diff options
author | Martin Braun <martin.braun@ettus.com> | 2017-05-30 17:33:20 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2017-12-22 15:03:58 -0800 |
commit | 2406def0acd7ee4f3f7ac19e3ade1963b4f1c1f5 (patch) | |
tree | fac087703f36d91e0242c0c7bb75a86685a36ba7 /host/lib/usrp | |
parent | 5dcaffcd0be91c7b835734d8ce1ed6f694eeab6f (diff) | |
download | uhd-2406def0acd7ee4f3f7ac19e3ade1963b4f1c1f5.tar.gz uhd-2406def0acd7ee4f3f7ac19e3ade1963b4f1c1f5.tar.bz2 uhd-2406def0acd7ee4f3f7ac19e3ade1963b4f1c1f5.zip |
mpm/mpmd: Crossbar info is now polled instead of hardcoded
- Extended base periph manager to provide crossbar info
Diffstat (limited to 'host/lib/usrp')
-rw-r--r-- | host/lib/usrp/mpmd/mpmd_impl.cpp | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/host/lib/usrp/mpmd/mpmd_impl.cpp b/host/lib/usrp/mpmd/mpmd_impl.cpp index 1d8b2b03b..2464a71cd 100644 --- a/host/lib/usrp/mpmd/mpmd_impl.cpp +++ b/host/lib/usrp/mpmd/mpmd_impl.cpp @@ -120,11 +120,25 @@ mpmd_impl::mpmd_impl(const device_addr_t& device_addr) // TODO read this from the device info _tree->create<std::string>("/name").set("MPMD - Series device"); + const size_t mb_index = 0; + const size_t num_xbars = _mb[mb_index]->rpc->call<size_t>("get_num_xbars"); + UHD_ASSERT_THROW(num_xbars >= 1); + if (num_xbars > 1) { + UHD_LOG_WARNING("MPMD", "Only using first crossbar"); + } + const size_t xbar_index = 0; + const size_t num_blocks = _mb[mb_index]->rpc->call<size_t>("get_num_blocks", xbar_index); + const size_t base_port = _mb[mb_index]->rpc->call<size_t>("get_base_port", xbar_index); + UHD_LOG_TRACE("MPMD", + "Enumerating RFNoC blocks for xbar " << xbar_index << + ". Total blocks: " << num_blocks << + " Base port: " << base_port + ); try { enumerate_rfnoc_blocks( - 0, - 3, /* num blocks */ // TODO don't hardcode - 3, /* base port */ // TODO don't hardcode + mb_index, + num_blocks, + base_port, uhd::sid_t(0x0200), // TODO don't hardcode device_addr ); |