diff options
author | Martin Braun <martin.braun@ettus.com> | 2016-09-27 17:13:13 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2016-09-27 17:13:13 -0700 |
commit | a9c83aca8f95a408c06fbdf470f69b71514a5f46 (patch) | |
tree | 0ad7ad28f4084831f65db0e4738b788f9338ebf9 /host/lib/usrp/x300/x300_impl.hpp | |
parent | f70dd85daa8a6b9e1762c9339532027e40a67018 (diff) | |
parent | 102b03f59afdfd3bc633639a1a126bfdff57af45 (diff) | |
download | uhd-a9c83aca8f95a408c06fbdf470f69b71514a5f46.tar.gz uhd-a9c83aca8f95a408c06fbdf470f69b71514a5f46.tar.bz2 uhd-a9c83aca8f95a408c06fbdf470f69b71514a5f46.zip |
Merge branch 'maint'
Diffstat (limited to 'host/lib/usrp/x300/x300_impl.hpp')
-rw-r--r-- | host/lib/usrp/x300/x300_impl.hpp | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/host/lib/usrp/x300/x300_impl.hpp b/host/lib/usrp/x300/x300_impl.hpp index d491e2bc0..ee42dcf3e 100644 --- a/host/lib/usrp/x300/x300_impl.hpp +++ b/host/lib/usrp/x300/x300_impl.hpp @@ -1,5 +1,5 @@ // -// Copyright 2013-2015 Ettus Research LLC +// Copyright 2013-2016 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -61,8 +61,8 @@ static const size_t X300_PCIE_MSG_NUM_FRAMES = 64; static const size_t X300_PCIE_MAX_CHANNELS = 6; static const size_t X300_PCIE_MAX_MUXED_XPORTS = 32; -static const size_t X300_10GE_DATA_FRAME_MAX_SIZE = 8000; //bytes -static const size_t X300_1GE_DATA_FRAME_MAX_SIZE = 1472; //bytes +static const size_t X300_10GE_DATA_FRAME_MAX_SIZE = 8000; // CHDR packet size in bytes +static const size_t X300_1GE_DATA_FRAME_MAX_SIZE = 1472; // CHDR packet size in bytes static const size_t X300_ETH_MSG_FRAME_SIZE = uhd::transport::udp_simple::mtu; //bytes static const double X300_THREAD_BUFFER_TIMEOUT = 0.1; // Time in seconds @@ -72,8 +72,14 @@ static const size_t X300_ETH_DATA_NUM_FRAMES = 32; static const double X300_DEFAULT_SYSREF_RATE = 10e6; static const size_t X300_MAX_RATE_PCIE = 800000000; // bytes/s -static const size_t X300_MAX_RATE_10GIGE = 800000000; // bytes/s -static const size_t X300_MAX_RATE_1GIGE = 100000000; // bytes/s +static const size_t X300_MAX_RATE_10GIGE = (size_t)( // bytes/s + 10e9 / 8 * // wire speed multiplied by percentage of packets that is sample data + ( float(X300_10GE_DATA_FRAME_MAX_SIZE - uhd::usrp::DEVICE3_TX_MAX_HDR_LEN) / + float(X300_10GE_DATA_FRAME_MAX_SIZE + 8 /* UDP header */ + 20 /* Ethernet header length */ ))); +static const size_t X300_MAX_RATE_1GIGE = (size_t)( // bytes/s + 10e9 / 8 * // wire speed multiplied by percentage of packets that is sample data + ( float(X300_1GE_DATA_FRAME_MAX_SIZE - uhd::usrp::DEVICE3_TX_MAX_HDR_LEN) / + float(X300_1GE_DATA_FRAME_MAX_SIZE + 8 /* UDP header */ + 20 /* Ethernet header length */ ))); #define X300_RADIO_DEST_PREFIX_TX 0 @@ -260,7 +266,6 @@ private: bool wait_for_clk_locked(mboard_members_t& mb, boost::uint32_t which, double timeout); bool is_pps_present(mboard_members_t& mb); - void set_db_eeprom(uhd::i2c_iface::sptr i2c, const size_t, const uhd::usrp::dboard_eeprom_t &); void set_mb_eeprom(uhd::i2c_iface::sptr i2c, const uhd::usrp::mboard_eeprom_t &); void check_fw_compat(const uhd::fs_path &mb_path, uhd::wb_iface::sptr iface); |