diff options
author | Martin Braun <martin.braun@ettus.com> | 2019-10-18 15:12:56 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2019-11-26 12:21:32 -0800 |
commit | 1825f0885212d68205bc082d40e909c56ca3d5a6 (patch) | |
tree | b4a8d19fd1242a106d8ab6a43f2146c7bc7e7b44 /host | |
parent | 7bf6ddcb95518118a46befac42aa2ae909808549 (diff) | |
download | uhd-1825f0885212d68205bc082d40e909c56ca3d5a6.tar.gz uhd-1825f0885212d68205bc082d40e909c56ca3d5a6.tar.bz2 uhd-1825f0885212d68205bc082d40e909c56ca3d5a6.zip |
mpmd: Skip generation of mb_controller and mb_iface for skip_init=1
The mpmd_mb_controller requires access to the fully functional FPGA,
which in turn assumes flawless initialization. skip_init doesn't init at
all, so inializing an mb_controller may not be possible, and shouldn't
be attempted. This skips init of both mb_iface and mb_controller for
skip_init, leaving it to the other code to figure out if they are
initialized.
Diffstat (limited to 'host')
-rw-r--r-- | host/lib/usrp/mpmd/mpmd_mboard_impl.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/host/lib/usrp/mpmd/mpmd_mboard_impl.cpp b/host/lib/usrp/mpmd/mpmd_mboard_impl.cpp index 5c8fd5485..e7bd0cff9 100644 --- a/host/lib/usrp/mpmd/mpmd_mboard_impl.cpp +++ b/host/lib/usrp/mpmd/mpmd_mboard_impl.cpp @@ -290,9 +290,12 @@ mpmd_mboard_impl::mpmd_mboard_impl( this->dboard_info.push_back(this_db_info); } - // Initialize mb_iface and mb_controller - mb_iface = std::make_unique<mpmd_mb_iface>(mb_args, rpc); - mb_ctrl = std::make_shared<rfnoc::mpmd_mb_controller>(rpc, device_info); + if (!mb_args.has_key("skip_init")) { + // Initialize mb_iface and mb_controller + mb_iface = std::make_unique<mpmd_mb_iface>(mb_args, rpc); + mb_ctrl = std::make_shared<rfnoc::mpmd_mb_controller>(rpc, device_info); + } // Note -- when skip_init is used, these are not initialized, and trying + // to use them will result in a null pointer dereference exception! } mpmd_mboard_impl::~mpmd_mboard_impl() |