diff options
author | Josh Blum <josh@joshknows.com> | 2011-04-19 11:17:43 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-04-19 11:17:43 -0700 |
commit | 30a6d480eb72f29f78467cb3f0c46434ee9967bc (patch) | |
tree | e483890bc35a15b30e7bac5415547643a7ad1dc6 /host/lib/usrp/usrp2/mboard_impl.cpp | |
parent | 9521c02466bc5dcb053378eeccff507b93cfd973 (diff) | |
parent | 2f102fbff2b7245d3d038e7dfffaa2de856b61aa (diff) | |
download | uhd-30a6d480eb72f29f78467cb3f0c46434ee9967bc.tar.gz uhd-30a6d480eb72f29f78467cb3f0c46434ee9967bc.tar.bz2 uhd-30a6d480eb72f29f78467cb3f0c46434ee9967bc.zip |
Merge branch 'usrp2/discover_with_old_fw'
Diffstat (limited to 'host/lib/usrp/usrp2/mboard_impl.cpp')
-rw-r--r-- | host/lib/usrp/usrp2/mboard_impl.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/host/lib/usrp/usrp2/mboard_impl.cpp b/host/lib/usrp/usrp2/mboard_impl.cpp index 40fc5098b..7a6c596bc 100644 --- a/host/lib/usrp/usrp2/mboard_impl.cpp +++ b/host/lib/usrp/usrp2/mboard_impl.cpp @@ -66,6 +66,16 @@ usrp2_mboard_impl::usrp2_mboard_impl( device_addr["addr"], BOOST_STRINGIZE(USRP2_UDP_CTRL_PORT) ))) { + + //check the fpga compatibility number + const boost::uint32_t fpga_compat_num = _iface->peek32(_iface->regs.compat_num_rb); + if (fpga_compat_num != USRP2_FPGA_COMPAT_NUM){ + throw uhd::runtime_error(str(boost::format( + "Expected fpga compatibility number %d, but got %d:\n" + "The fpga build is not compatible with the host code build." + ) % int(USRP2_FPGA_COMPAT_NUM) % fpga_compat_num)); + } + //construct transports for dsp and async errors std::cout << "Making transport for DSP0..." << std::endl; device.dsp_xports.push_back(udp_zero_copy::make( |