From 4a731f6c1d6b71a501c98d745f4e2721e5f3e5c5 Mon Sep 17 00:00:00 2001
From: Ashish Chaudhari <ashish@ettus.com>
Date: Mon, 13 Jul 2015 15:19:04 -0700
Subject: b200: Bumped FPGA compat number to 8 for release

---
 host/lib/usrp/b200/b200_impl.hpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'host')

diff --git a/host/lib/usrp/b200/b200_impl.hpp b/host/lib/usrp/b200/b200_impl.hpp
index 7ed94284d..65796d1a4 100644
--- a/host/lib/usrp/b200/b200_impl.hpp
+++ b/host/lib/usrp/b200/b200_impl.hpp
@@ -47,7 +47,7 @@
 #include "recv_packet_demuxer_3000.hpp"
 static const boost::uint8_t  B200_FW_COMPAT_NUM_MAJOR = 7;
 static const boost::uint8_t  B200_FW_COMPAT_NUM_MINOR = 0;
-static const boost::uint16_t B200_FPGA_COMPAT_NUM = 6;
+static const boost::uint16_t B200_FPGA_COMPAT_NUM = 8;
 static const double          B200_BUS_CLOCK_RATE = 100e6;
 static const double          B200_DEFAULT_TICK_RATE = 32e6;
 static const double          B200_DEFAULT_FREQ = 100e6; // Hz
-- 
cgit v1.2.3


From 850251d4ec31f515b99e2f5f2c128c3ce78c2b76 Mon Sep 17 00:00:00 2001
From: Moritz Fischer <moritz.fischer@ettus.com>
Date: Tue, 7 Jul 2015 14:28:20 -0700
Subject: e3xx: Load idle image on shutdown.

This commit will have UHD load the idle fpga image on
destruction of e300_impl.

Note: This requires usrp_e310_idle_fpga.bit to be present
in the UHD images directory.

Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
---
 host/lib/usrp/e300/e300_impl.cpp | 51 ++++++++++++++++++++++------------------
 host/lib/usrp/e300/e300_impl.hpp |  5 ++++
 2 files changed, 33 insertions(+), 23 deletions(-)

(limited to 'host')

diff --git a/host/lib/usrp/e300/e300_impl.cpp b/host/lib/usrp/e300/e300_impl.cpp
index 41e8eacf3..515fccc08 100644
--- a/host/lib/usrp/e300/e300_impl.cpp
+++ b/host/lib/usrp/e300/e300_impl.cpp
@@ -284,32 +284,36 @@ e300_impl::e300_impl(const uhd::device_addr_t &device_addr)
     // load the fpga image
     ////////////////////////////////////////////////////////////////////
     if (_xport_path == AXI) {
-        if (not device_addr.has_key("no_reload_fpga")) {
+        _do_not_reload = device_addr.has_key("no_reload_fpga");
+        if (not _do_not_reload) {
             // Load FPGA image if provided via args
-            if (device_addr.has_key("fpga")) {
-                common::load_fpga_image(device_addr["fpga"]);
-            // Else load the FPGA image based on the product ID
-            } else {
-                //extract the FPGA path for the e300
-                const boost::uint16_t pid = boost::lexical_cast<boost::uint16_t>(
+            const boost::uint16_t pid = boost::lexical_cast<boost::uint16_t>(
                     device_addr["product"]);
-                std::string fpga_image;
-                switch(e300_eeprom_manager::get_mb_type(pid)) {
-                case e300_eeprom_manager::USRP_E310_MB:
-                    fpga_image = find_image_path(E310_FPGA_FILE_NAME);
-                    break;
-                case e300_eeprom_manager::USRP_E300_MB:
-                    fpga_image = find_image_path(E300_FPGA_FILE_NAME);
-                    break;
-                case e300_eeprom_manager::UNKNOWN:
-                default:
-                    UHD_MSG(warning) << "Unknown motherboard type, loading e300 image."
+
+            std::string fpga_image;
+
+            //extract the FPGA path for the e300
+            switch(e300_eeprom_manager::get_mb_type(pid)) {
+            case e300_eeprom_manager::USRP_E310_MB:
+                fpga_image = device_addr.cast<std::string>("fpga",
+                    find_image_path(E310_FPGA_FILE_NAME));
+                _idle_image = find_image_path(E310_FPGA_IDLE_FILE_NAME);
+                break;
+            case e300_eeprom_manager::USRP_E300_MB:
+                fpga_image = device_addr.cast<std::string>("fpga",
+                    find_image_path(E300_FPGA_FILE_NAME));
+                _idle_image = find_image_path(E300_FPGA_IDLE_FILE_NAME);
+                break;
+            case e300_eeprom_manager::UNKNOWN:
+            default:
+                UHD_MSG(warning) << "Unknown motherboard type, loading e300 image."
                                      << std::endl;
-                    fpga_image = find_image_path(E300_FPGA_FILE_NAME);
-                    break;
-                }
-                common::load_fpga_image(fpga_image);
+                fpga_image = device_addr.cast<std::string>("fpga",
+                    find_image_path(E300_FPGA_FILE_NAME));
+                _idle_image = find_image_path(E300_FPGA_IDLE_FILE_NAME);
+                break;
             }
+            common::load_fpga_image(fpga_image);
         }
     }
 
@@ -621,7 +625,8 @@ uhd::sensor_value_t e300_impl::_get_fe_pll_lock(const bool is_tx)
 
 e300_impl::~e300_impl(void)
 {
-    /* NOP */
+    if (_xport_path == AXI and not _do_not_reload)
+        common::load_fpga_image(_idle_image);
 }
 
 void e300_impl::_enforce_tick_rate_limits(
diff --git a/host/lib/usrp/e300/e300_impl.hpp b/host/lib/usrp/e300/e300_impl.hpp
index c7d683f58..196c5fdd8 100644
--- a/host/lib/usrp/e300/e300_impl.hpp
+++ b/host/lib/usrp/e300/e300_impl.hpp
@@ -51,6 +51,9 @@ namespace uhd { namespace usrp { namespace e300 {
 static const std::string E300_FPGA_FILE_NAME = "usrp_e300_fpga.bit";
 static const std::string E310_FPGA_FILE_NAME = "usrp_e310_fpga.bit";
 
+static const std::string E300_FPGA_IDLE_FILE_NAME = "usrp_e300_idle_fpga.bit";
+static const std::string E310_FPGA_IDLE_FILE_NAME = "usrp_e310_idle_fpga.bit";
+
 static const std::string E300_TEMP_SYSFS = "iio:device0";
 static const std::string E300_SPIDEV_DEVICE  = "/dev/spidev0.1";
 static const std::string E300_I2CDEV_DEVICE  = "/dev/i2c-0";
@@ -287,6 +290,8 @@ private: // members
     e300_eeprom_manager::sptr              _eeprom_manager;
     uhd::transport::zero_copy_xport_params _data_xport_params;
     uhd::transport::zero_copy_xport_params _ctrl_xport_params;
+    std::string                            _idle_image;
+    bool                                   _do_not_reload;
     gpio_t                                 _misc;
     gps::ublox::ubx::control::sptr _gps;
 };
-- 
cgit v1.2.3


From 3cb995e3a60e940e5b23c6ca43712ab51b27c97e Mon Sep 17 00:00:00 2001
From: Moritz Fischer <moritz.fischer@ettus.com>
Date: Tue, 7 Jul 2015 14:29:30 -0700
Subject: e3xx: Increase TX buffer size to PAGE_SIZE.

This was originally limited because it performed poor,
however, with refactoring that has been done since release,
this now gives better performance.

Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
---
 host/lib/usrp/e300/e300_defaults.hpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'host')

diff --git a/host/lib/usrp/e300/e300_defaults.hpp b/host/lib/usrp/e300/e300_defaults.hpp
index 8fe8c3a05..89afcb256 100644
--- a/host/lib/usrp/e300/e300_defaults.hpp
+++ b/host/lib/usrp/e300/e300_defaults.hpp
@@ -41,7 +41,7 @@ static const std::string DEFAULT_CLOCK_SRC  = "internal";
 static const size_t DEFAULT_RX_DATA_FRAME_SIZE = 4096;
 static const size_t DEFAULT_RX_DATA_NUM_FRAMES = 32;
 
-static const size_t DEFAULT_TX_DATA_FRAME_SIZE = 2048;
+static const size_t DEFAULT_TX_DATA_FRAME_SIZE = 4096;
 static const size_t DEFAULT_TX_DATA_NUM_FRAMES = 32;
 
 static const size_t DEFAULT_CTRL_FRAME_SIZE    = 64;
-- 
cgit v1.2.3


From 5f11aee12dc90baac56a803ce462255bc8026f71 Mon Sep 17 00:00:00 2001
From: Moritz Fischer <moritz.fischer@ettus.com>
Date: Thu, 9 Jul 2015 12:36:08 -0700
Subject: e3xx: Bump compat number from 6 -> 8.

Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
---
 host/lib/usrp/e300/e300_fpga_defs.hpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'host')

diff --git a/host/lib/usrp/e300/e300_fpga_defs.hpp b/host/lib/usrp/e300/e300_fpga_defs.hpp
index c038efbae..eea4d7f63 100644
--- a/host/lib/usrp/e300/e300_fpga_defs.hpp
+++ b/host/lib/usrp/e300/e300_fpga_defs.hpp
@@ -21,7 +21,7 @@ namespace uhd { namespace usrp { namespace e300 { namespace fpga {
 
 static const size_t NUM_RADIOS = 2;
 
-static const boost::uint32_t COMPAT_MAJOR = 6;
+static const boost::uint32_t COMPAT_MAJOR = 8;
 static const boost::uint32_t COMPAT_MINOR = 0;
 
 }}}} // namespace
-- 
cgit v1.2.3


From 1c185f8478955c170ba6cf429826dfb286c3c045 Mon Sep 17 00:00:00 2001
From: Martin Braun <martin.braun@ettus.com>
Date: Mon, 13 Jul 2015 16:53:35 -0700
Subject: examples: Improved tx_waveform multi-channel sync

---
 host/examples/tx_waveforms.cpp | 26 ++++++++++++++++++--------
 1 file changed, 18 insertions(+), 8 deletions(-)

(limited to 'host')

diff --git a/host/examples/tx_waveforms.cpp b/host/examples/tx_waveforms.cpp
index 7e633262c..d648d2309 100644
--- a/host/examples/tx_waveforms.cpp
+++ b/host/examples/tx_waveforms.cpp
@@ -225,15 +225,17 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){
     std::vector<std::complex<float> > buff(spb);
     std::vector<std::complex<float> *> buffs(channel_nums.size(), &buff.front());
 
-    //setup the metadata flags
-    uhd::tx_metadata_t md;
-    md.start_of_burst = true;
-    md.end_of_burst   = false;
-    md.has_time_spec  = true;
-    md.time_spec = uhd::time_spec_t(0.1);
-
     std::cout << boost::format("Setting device timestamp to 0...") << std::endl;
-    usrp->set_time_now(uhd::time_spec_t(0.0));
+    if (channel_nums.size() > 1) {
+        // This is the worst-case setup scenario, because this example has to
+        // work for all configurations. set_time_now() and set_time_next_pps()
+        // might also work, depending on what USRPs are being used, and can
+        // accelerate the setup. To keep this example generic, we use
+        // set_time_unknown_pps() to guarantee synchronization.
+        usrp->set_time_unknown_pps(uhd::time_spec_t(0.0));
+    } else {
+        usrp->set_time_now(uhd::time_spec_t(0.0));
+    }
 
     //Check Ref and LO Lock detect
     std::vector<std::string> sensor_names;
@@ -258,6 +260,14 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){
     std::signal(SIGINT, &sig_int_handler);
     std::cout << "Press Ctrl + C to stop streaming..." << std::endl;
 
+    // Set up metadata. We start streaming a bit in the future
+    // to allow MIMO operation:
+    uhd::tx_metadata_t md;
+    md.start_of_burst = true;
+    md.end_of_burst   = false;
+    md.has_time_spec  = true;
+    md.time_spec = usrp->get_time_now() + uhd::time_spec_t(0.1);
+
     //send data until the signal handler gets called
     while(not stop_signal_called){
         //fill the buffer with the waveform
-- 
cgit v1.2.3


From 6091e8759a9291f4a2134cf726683c24983eebf7 Mon Sep 17 00:00:00 2001
From: Moritz Fischer <moritz.fischer@ettus.com>
Date: Mon, 13 Jul 2015 17:00:32 -0700
Subject: e3xx: Fixup for idle image to follow naming convention.

Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com>
---
 host/lib/usrp/e300/e300_impl.hpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'host')

diff --git a/host/lib/usrp/e300/e300_impl.hpp b/host/lib/usrp/e300/e300_impl.hpp
index 196c5fdd8..7f83c16ed 100644
--- a/host/lib/usrp/e300/e300_impl.hpp
+++ b/host/lib/usrp/e300/e300_impl.hpp
@@ -51,8 +51,8 @@ namespace uhd { namespace usrp { namespace e300 {
 static const std::string E300_FPGA_FILE_NAME = "usrp_e300_fpga.bit";
 static const std::string E310_FPGA_FILE_NAME = "usrp_e310_fpga.bit";
 
-static const std::string E300_FPGA_IDLE_FILE_NAME = "usrp_e300_idle_fpga.bit";
-static const std::string E310_FPGA_IDLE_FILE_NAME = "usrp_e310_idle_fpga.bit";
+static const std::string E300_FPGA_IDLE_FILE_NAME = "usrp_e300_fpga_idle.bit";
+static const std::string E310_FPGA_IDLE_FILE_NAME = "usrp_e310_fpga_idle.bit";
 
 static const std::string E300_TEMP_SYSFS = "iio:device0";
 static const std::string E300_SPIDEV_DEVICE  = "/dev/spidev0.1";
-- 
cgit v1.2.3


From 8f47d5b898d7b60f5139fed242309597834c0c52 Mon Sep 17 00:00:00 2001
From: Martin Braun <martin.braun@ettus.com>
Date: Tue, 14 Jul 2015 12:51:08 -0700
Subject: x300: Added max hw rev checking

---
 host/lib/usrp/x300/x300_fw_common.h |  1 +
 host/lib/usrp/x300/x300_impl.cpp    | 10 ++++++++++
 2 files changed, 11 insertions(+)

(limited to 'host')

diff --git a/host/lib/usrp/x300/x300_fw_common.h b/host/lib/usrp/x300/x300_fw_common.h
index 42583f7f0..76531f921 100644
--- a/host/lib/usrp/x300/x300_fw_common.h
+++ b/host/lib/usrp/x300/x300_fw_common.h
@@ -29,6 +29,7 @@
 extern "C" {
 #endif
 
+#define X300_MAX_HW_REV 6
 #define X300_FW_COMPAT_MAJOR 3
 #define X300_FW_COMPAT_MINOR 0
 #define X300_FPGA_COMPAT_MAJOR 9
diff --git a/host/lib/usrp/x300/x300_impl.cpp b/host/lib/usrp/x300/x300_impl.cpp
index 809a56765..58914c02b 100644
--- a/host/lib/usrp/x300/x300_impl.cpp
+++ b/host/lib/usrp/x300/x300_impl.cpp
@@ -622,6 +622,16 @@ void x300_impl::setup_mb(const size_t mb_i, const uhd::device_addr_t &dev_addr)
         mb.hw_rev = X300_REV("D");
     }
 
+    UHD_VAR(mb.hw_rev)
+    if (mb.hw_rev > X300_MAX_HW_REV) {
+        throw uhd::runtime_error(str(
+                boost::format("Unsupported board revision number: %d.\n"
+                              "The maximum board revision number supported in this version is %d.\n"
+                              "Please update your UHD version.")
+                % mb.hw_rev % X300_MAX_HW_REV
+        ));
+    }
+
     //Create clock control. NOTE: This does not configure the LMK yet.
     initialize_clock_control(mb);
     mb.clock = x300_clock_ctrl::make(mb.zpu_spi,
-- 
cgit v1.2.3


From 5f4470a8fb340677f2d0b557f4670bc7506fc38a Mon Sep 17 00:00:00 2001
From: Martin Braun <martin.braun@ettus.com>
Date: Tue, 14 Jul 2015 12:06:04 -0700
Subject: 3.8.5 Release Candidate

    - Updated fpga-src
    - Updated version strings
    - Updated images package
---
 CHANGELOG                           | 14 ++++++++++++++
 fpga-src                            |  2 +-
 host/CMakeLists.txt                 |  4 ++--
 host/cmake/Modules/UHDVersion.cmake |  2 +-
 4 files changed, 18 insertions(+), 4 deletions(-)

(limited to 'host')

diff --git a/CHANGELOG b/CHANGELOG
index c6e53563f..9f0c9a43e 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,20 @@
 Change Log for Releases
 ==============================
 
+## 003.008.005
+* E3xx: Added support for battery-based E3xx device (E312),
+  get_freq() for network mode, fixed GPS time initialization bug
+* AD9361-based devices: Fixed frequency readback bug
+* B200: Fixed DCM issues, better loopback failure handling,
+  fix erroneous warning for custom clock rates
+* X3x0: Better warnings for clock reate / ref freq
+* multi_usrp: Added define for GPIO capabilities (enables
+  exposure in GNU Radio)
+* UHD: sc16->sc16 SSE converter
+* Manual: Multiple minor updates, FPGA manual improvements,
+* Build System: Fixed builds on some Windows platforms, removed
+  stray prints
+
 ## 003.008.004
 * B200: Fixed EEPROM writing bug, updated images for B200 Rev5/6
 * E300: GPS antenna power defaults to staying on, GPS time used as
diff --git a/fpga-src b/fpga-src
index 585a056b0..dd8147301 160000
--- a/fpga-src
+++ b/fpga-src
@@ -1 +1 @@
-Subproject commit 585a056b02bf49d739a5dc1e925a2569c59cf699
+Subproject commit dd8147301da1dafe9cc985227317bc3cd12c5281
diff --git a/host/CMakeLists.txt b/host/CMakeLists.txt
index 93d8b115a..5c4a27b7f 100644
--- a/host/CMakeLists.txt
+++ b/host/CMakeLists.txt
@@ -268,8 +268,8 @@ UHD_INSTALL(FILES
 #{{{IMG_SECTION
 # This section is written automatically by /images/create_imgs_package.py
 # Any manual changes in here will be overwritten.
-SET(UHD_IMAGES_MD5SUM "ffe3f95d9b4e4b8bdbd5483e32e4407c")
-SET(UHD_IMAGES_DOWNLOAD_SRC "uhd-images_003.008.004-release.zip")
+SET(UHD_IMAGES_MD5SUM "eb2d694e0444f02752a988d14488064e")
+SET(UHD_IMAGES_DOWNLOAD_SRC "uhd-images_003.008.005-rc1.zip")
 #}}}
 
 ########################################################################
diff --git a/host/cmake/Modules/UHDVersion.cmake b/host/cmake/Modules/UHDVersion.cmake
index 2a7d88e14..66b4402ed 100644
--- a/host/cmake/Modules/UHDVersion.cmake
+++ b/host/cmake/Modules/UHDVersion.cmake
@@ -28,7 +28,7 @@ FIND_PACKAGE(Git QUIET)
 ########################################################################
 SET(UHD_VERSION_MAJOR 003)
 SET(UHD_VERSION_MINOR 008)
-SET(UHD_VERSION_PATCH 004)
+SET(UHD_VERSION_PATCH 005)
 SET(UHD_VERSION_DEVEL FALSE)
 
 ########################################################################
-- 
cgit v1.2.3