Hello community, here is the log from the commit of package uhd for openSUSE:Factory checked in at 2016-05-23 16:39:36 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/uhd (Old) and /work/SRC/openSUSE:Factory/.uhd.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "uhd" Changes: -------- --- /work/SRC/openSUSE:Factory/uhd/uhd.changes 2016-04-01 13:02:46.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.uhd.new/uhd.changes 2016-05-23 16:39:37.000000000 +0200 @@ -1,0 +2,5 @@ +Sat May 7 22:38:01 UTC 2016 - [email protected] + +- Update sources to version 3.9.4 + +------------------------------------------------------------------- Old: ---- uhd-3.9.3.tar.gz uhd-images_003.009.003-release.tar.gz New: ---- uhd-3.9.4.tar.gz uhd-images_003.009.004-release.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ uhd.spec ++++++ --- /var/tmp/diff_new_pack.2heimD/_old 2016-05-23 16:39:39.000000000 +0200 +++ /var/tmp/diff_new_pack.2heimD/_new 2016-05-23 16:39:39.000000000 +0200 @@ -18,10 +18,10 @@ Name: uhd %define libname libuhd003 -Version: 3.9.3 +Version: 3.9.4 Release: 0 -%define src_ver 003.009.003 -%define img_ver 003.009.003 +%define src_ver 003.009.004 +%define img_ver 003.009.004 Summary: The driver for USRP SDR boards License: GPL-3.0+ Group: Hardware/Other ++++++ uhd-3.9.3.tar.gz -> uhd-3.9.4.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/uhd-3.9.3/CMakeLists.txt new/uhd-3.9.4/CMakeLists.txt --- old/uhd-3.9.3/CMakeLists.txt 2016-03-21 23:05:35.000000000 +0100 +++ new/uhd-3.9.4/CMakeLists.txt 2016-05-05 22:13:31.000000000 +0200 @@ -274,8 +274,8 @@ #{{{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 "07b9d06a068cf591fcd0e460552ed02d") -SET(UHD_IMAGES_DOWNLOAD_SRC "uhd-images_003.009.003-release.zip") +SET(UHD_IMAGES_MD5SUM "c33b36a74d82198c8cfede64d8775c46") +SET(UHD_IMAGES_DOWNLOAD_SRC "uhd-images_003.009.004-release.zip") #}}} ######################################################################## diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/uhd-3.9.3/cmake/Modules/UHDPackage.cmake new/uhd-3.9.4/cmake/Modules/UHDPackage.cmake --- old/uhd-3.9.3/cmake/Modules/UHDPackage.cmake 2016-03-21 23:05:35.000000000 +0100 +++ new/uhd-3.9.4/cmake/Modules/UHDPackage.cmake 2016-04-11 19:35:06.000000000 +0200 @@ -218,7 +218,4 @@ ENDIF(WIN32) ######################################################################## -IF(NOT ${CPACK_GENERATOR} STREQUAL NSIS) - SET(CPACK_SET_DESTDIR "ON") -ENDIF(NOT ${CPACK_GENERATOR} STREQUAL NSIS) INCLUDE(CPack) #include after setting vars diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/uhd-3.9.3/cmake/Modules/UHDVersion.cmake new/uhd-3.9.4/cmake/Modules/UHDVersion.cmake --- old/uhd-3.9.3/cmake/Modules/UHDVersion.cmake 2016-03-21 23:05:35.000000000 +0100 +++ new/uhd-3.9.4/cmake/Modules/UHDVersion.cmake 2016-05-04 18:29:40.000000000 +0200 @@ -28,7 +28,7 @@ ######################################################################## SET(UHD_VERSION_MAJOR 003) SET(UHD_VERSION_MINOR 009) -SET(UHD_VERSION_PATCH 003) +SET(UHD_VERSION_PATCH 004) SET(UHD_VERSION_DEVEL FALSE) ######################################################################## diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/uhd-3.9.3/cmake/debian/changelog new/uhd-3.9.4/cmake/debian/changelog --- old/uhd-3.9.3/cmake/debian/changelog 2016-03-21 23:05:35.000000000 +0100 +++ new/uhd-3.9.4/cmake/debian/changelog 2016-05-05 22:13:31.000000000 +0200 @@ -1,3 +1,18 @@ +uhd (3.9.4-0ubuntu1) trusty; urgency=low + + - GPIO control: Fix address mismatch for RX and full duplex. + This fixes full-duplex mode for most devices. + - B200: Fixed auto rate selection (can now select 61.44 Msps) + - UBX: Fix member declaration order which could cause + segfaults for debug builds + - Manual/Docs: Numerous fixes, use dot for graphs in manual + - Utils: multiple fixes for query_gpsdo_sensors, fixed floating point + comparison + - Windows: Include registry file in installation + - Converters: Improve NEON converters + + -- Ettus Research <[email protected]> Thu, 05 May 2016 12:56:28 -0800 + uhd (3.9.3-0ubuntu1) trusty; urgency=low * UBX: Fixed a phase synchronization issue on the sub-1GHz band diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/uhd-3.9.3/docs/CMakeLists.txt new/uhd-3.9.4/docs/CMakeLists.txt --- old/uhd-3.9.3/docs/CMakeLists.txt 2016-03-21 23:05:35.000000000 +0100 +++ new/uhd-3.9.4/docs/CMakeLists.txt 2016-05-04 18:29:40.000000000 +0200 @@ -66,6 +66,7 @@ MESSAGE(STATUS "") LIBUHD_REGISTER_COMPONENT("API/Doxygen" ENABLE_DOXYGEN ON "DOXYGEN_FOUND" OFF OFF) OPTION(ENABLE_DOXYGEN_FULL "Use Doxygen to document the entire source tree (not just API)" OFF) +OPTION(ENABLE_DOXYGEN_DOT "Let Doxygen use dot (requires graphviz)" OFF) IF(LIBUHDDEV_PKG) SET(PKG_DOC_DIR share/doc/libuhd-dev) @@ -94,6 +95,12 @@ IF(ENABLE_MANUAL_OR_DOXYGEN) #generate the doxygen configuration file SET(CMAKE_CURRENT_BINARY_DIR_DOXYGEN ${CMAKE_CURRENT_BINARY_DIR}/doxygen) + IF(ENABLE_DOXYGEN_DOT) + SET(DOXYGEN_HAVE_DOT "YES") + ELSE(ENABLE_DOXYGEN_DOT) + SET(DOXYGEN_HAVE_DOT "NO") + ENDIF(ENABLE_DOXYGEN_DOT) + CONFIGURE_FILE( ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/uhd-3.9.3/docs/Doxyfile.in new/uhd-3.9.4/docs/Doxyfile.in --- old/uhd-3.9.3/docs/Doxyfile.in 2016-03-21 23:05:35.000000000 +0100 +++ new/uhd-3.9.4/docs/Doxyfile.in 2016-04-11 19:35:06.000000000 +0200 @@ -1686,7 +1686,7 @@ # toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) -HAVE_DOT = NO +HAVE_DOT = @DOXYGEN_HAVE_DOT@ # The DOT_NUM_THREADS specifies the number of dot invocations doxygen is # allowed to run in parallel. When set to 0 (the default) doxygen will diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/uhd-3.9.3/docs/images.dox new/uhd-3.9.4/docs/images.dox --- old/uhd-3.9.3/docs/images.dox 2016-03-21 23:05:35.000000000 +0100 +++ new/uhd-3.9.4/docs/images.dox 2016-04-05 02:51:50.000000000 +0200 @@ -24,8 +24,7 @@ Pre-built images are available for download. -- <a href="http://files.ettus.com/binaries/master_images/">Master Branch images</a> -- <a href="http://files.ettus.com/binaries/maint_images/">Maint Branch images</a> +- <a href="http://files.ettus.com/binaries/images/">Images</a> The pre-built images come in two forms: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/uhd-3.9.3/docs/install.dox new/uhd-3.9.4/docs/install.dox --- old/uhd-3.9.3/docs/install.dox 2016-03-21 23:05:35.000000000 +0100 +++ new/uhd-3.9.4/docs/install.dox 2016-04-19 18:32:34.000000000 +0200 @@ -72,7 +72,7 @@ sudo add-apt-repository ppa:ettusresearch/uhd sudo apt-get update - sudo apt-get install uhd + sudo apt-get install libuhd-dev libuhd003 uhd-host \subsubsection install_linux_ourbins_fedora Fedora @@ -101,7 +101,7 @@ We recommend using MacPorts and actively support UHD development on OS X via this method. Using MacPorts, the correct hardware device images are automatically installed for you, -and there are no post install tasks. WIth a single command, you can be up and running in short order. +and there are no post install tasks. With a single command, you can be up and running in short order. If you do not already have MacPorts installed, you will need to install it first. Make sure to follow the MacPorts shell environment changes needed such that MacPorts installed executables are found before all others. These are the only changes to the shell environment needed to execute any MacPorts-installed executable. Setting any DYLD environment variable (e.g., DYLD_LIBRARY_PATH) for general use is highly discouraged, because doing so, in our experience, leads to problems down the road that are very difficult to diagnose. OSX provides robust means for correcting DYLD-based issues even after dependencies are installed. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/uhd-3.9.3/docs/usrp_b200.dox new/uhd-3.9.4/docs/usrp_b200.dox --- old/uhd-3.9.3/docs/usrp_b200.dox 2016-03-21 23:05:35.000000000 +0100 +++ new/uhd-3.9.4/docs/usrp_b200.dox 2016-05-04 18:29:40.000000000 +0200 @@ -185,7 +185,7 @@ </tr> </table> -TX LED indicators are on when transimitting data and off when no samples are +TX LED indicators are on when transmitting data and off when no samples are available to transmit. RX LED indicators are on when sending samples to the host and off when unable to do so. This means that TX/RX activity LED indicators will blink off in a temporary transmit underflow or receive overflow diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/uhd-3.9.3/docs/usrp_e3x0.dox new/uhd-3.9.4/docs/usrp_e3x0.dox --- old/uhd-3.9.3/docs/usrp_e3x0.dox 2016-03-21 23:05:35.000000000 +0100 +++ new/uhd-3.9.4/docs/usrp_e3x0.dox 2016-05-04 18:29:40.000000000 +0200 @@ -102,7 +102,7 @@ To install the toolchain you downloaded type: - $ ./oecore-${TCLIBC}-${SDK_ARCH}-${IMAGE_BASENAME}-${TUNE_PKGARCH}.sh + $ ./oecore-x86_64-armv7ahf-vfp-neon-toolchain-nodistro.0.sh This will prompt you for an installation path. Please ensure you have sufficient disk space, as each of the SDKs may require several gigabytes of disk space (depends on the image flavor selected). @@ -127,17 +127,24 @@ \subsubsection e3x0_sdk_usage_uhd Building UHD +The E310 comes with UHD already installed on the SD card. You will only need +to build UHD and install it if there is a critical bug fix in a later UHD or you +have custom UHD modifications. + -# Obtain the UHD source code via git or tarball -# Setup your environment as described in \ref e3x0_sdk_usage -# Type the following in the build directory (assuming a build in host/build): - $ cmake -DCMAKE_TOOLCHAIN_FILE=<youruhdsrc>/host/cmake/Toolchains/oe-sdk_cross.cmake -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_E300=ON .. + $ cmake -DCMAKE_TOOLCHAIN_FILE=../host/cmake/Toolchains/oe-sdk_cross.cmake -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_E300=ON .. $ make For instructions on building UHD on a PC to interact with your E-Series device, follow these instructions: \ref e3x0_uhd_build \subsubsection e3x0_sdk_usage_gnuradio Building GNU Radio +GNU Radio is already installed on the SD card. You only need to build GNU Radio +for the E3XX if you are doing custom GNU Radio development work. + -# Obtain the gnuradio source code via git. -# Setup the environment as described in \ref e3x0_sdk_usage -# Use the following commands to create a build directory, configure and compile gnuradio. You only need create the build directory once. @@ -158,9 +165,12 @@ used to manage the versions of the various layers that supply recipes for building the image. For more documentation see http://www.yoctoproject.org. These notes will show you how to rebuild the files used to create the SD -card included with the E310. These instructions assume you ahve a working +card included with the E310. These instructions assume you have a working knowledge of Linux. +Once you have rebuilt the factory image, you can create your own custom recipes +to build file system images for specific application. + -# Install `repo`. \code{.sh} $ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > repo @@ -172,7 +182,7 @@ \code{.sh} $ mkdir e300-oe-build $ cd e300-oe-build - $ repo init -u git://github.com/EttusResearch/e300-manifest.git -b Release-3 + $ repo init -u git://github.com/EttusResearch/e300-manifest.git -b Release-4 \endcode -# Initialize the environment. This will take a little while. @@ -187,12 +197,13 @@ it will download all the required sources. (These are saved locally for future builds) \code{.sh} - $ export MACHINE="ettus-e300" + $ export MACHINE="ettus-e3xx-sg1" $ bitbake gnuradio-dev-image \endcode When this completes, the files needed to create the SD card are in -`tmp-glibc/deploy/images/ettus-e300` +`tmp-glibc/deploy/images/ettus-e300`. Building the file that is written +directly to the SD card is covered later in this document. -# Build the toolchain. \code{.sh} @@ -202,6 +213,19 @@ Note that you can set the `MACHINE` variable in `local.conf so that you no longer need to set it from the command line. +-# Building the complete set of E3XX image files and sdk. + +There is a script in the meta-ettus BSP layer that builds SD card images for +all E3XX series devices and the sdk. + +From the build directory run: +\code{.sh} + $ sh ../meta-ettus/scripts/build-all.sh +\endcode + +When the script finishes, the SD ard image files are in ./images and the sdk +is in tmp-glibc/deploy/sdk/ . + -# Using the environment When you log back in, you will need to setup the OpenEmbedded environment again by: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/uhd-3.9.3/include/uhd/device_deprecated.ipp new/uhd-3.9.4/include/uhd/device_deprecated.ipp --- old/uhd-3.9.3/include/uhd/device_deprecated.ipp 2016-03-21 23:05:35.000000000 +0100 +++ new/uhd-3.9.4/include/uhd/device_deprecated.ipp 2016-04-11 19:35:06.000000000 +0200 @@ -106,7 +106,7 @@ * will hold a pointer into the remaining portion of the packet. * Subsequent calls will load from the remainder of the packet, * and will flag the metadata to show that this is a fragment. - * The next call to receive, after the remainder becomes exahausted, + * The next call to receive, after the remainder becomes exhausted, * will perform an over-the-wire receive as usual. * See the rx metadata fragment flags and offset fields for details. * diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/uhd-3.9.3/include/uhd/exception.hpp new/uhd-3.9.4/include/uhd/exception.hpp --- old/uhd-3.9.3/include/uhd/exception.hpp 2016-03-21 23:05:35.000000000 +0100 +++ new/uhd-3.9.4/include/uhd/exception.hpp 2016-04-11 19:35:06.000000000 +0200 @@ -142,9 +142,9 @@ }; /*! - * Create a formated string with throw-site information. + * Create a formatted string with throw-site information. * Fills in the function name, file name, and line number. - * \param what the std::exeption message + * \param what the std::exception message * \return the formatted exception message */ #define UHD_THROW_SITE_INFO(what) std::string( \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/uhd-3.9.3/include/uhd/image_loader.hpp new/uhd-3.9.4/include/uhd/image_loader.hpp --- old/uhd-3.9.3/include/uhd/image_loader.hpp 2016-03-21 23:05:35.000000000 +0100 +++ new/uhd-3.9.4/include/uhd/image_loader.hpp 2016-04-11 19:35:06.000000000 +0200 @@ -80,7 +80,7 @@ * These instructions should be queried if the user interrupts an image loading * session, as this will likely leave the device in an unstable state. * \param device_type the "type=foo" value given in an --args option - * \return recoverying instructions + * \return recovery instructions */ static std::string get_recovery_instructions(const std::string &device_type); }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/uhd-3.9.3/include/uhd/stream.hpp new/uhd-3.9.4/include/uhd/stream.hpp --- old/uhd-3.9.3/include/uhd/stream.hpp 2016-03-21 23:05:35.000000000 +0100 +++ new/uhd-3.9.4/include/uhd/stream.hpp 2016-04-11 19:35:06.000000000 +0200 @@ -204,7 +204,7 @@ * will hold a pointer into the remaining portion of the packet. * Subsequent calls will load from the remainder of the packet, * and will flag the metadata to show that this is a fragment. - * The next call to receive, after the remainder becomes exahausted, + * The next call to receive, after the remainder becomes exhausted, * will perform an over-the-wire receive as usual. * See the rx metadata fragment flags and offset fields for details. * diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/uhd-3.9.3/include/uhd/transport/bounded_buffer.hpp new/uhd-3.9.4/include/uhd/transport/bounded_buffer.hpp --- old/uhd-3.9.3/include/uhd/transport/bounded_buffer.hpp 2016-03-21 23:05:35.000000000 +0100 +++ new/uhd-3.9.4/include/uhd/transport/bounded_buffer.hpp 2016-04-11 19:35:06.000000000 +0200 @@ -55,7 +55,7 @@ /*! * Push a new element into the bounded buffer. * If the buffer is full prior to the push, - * make room by poping the oldest element. + * make room by popping the oldest element. * \param elem the new element to push * \return true if the element fit without popping for space */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/uhd-3.9.3/include/uhd/transport/nirio/nirio_fifo.ipp new/uhd-3.9.4/include/uhd/transport/nirio/nirio_fifo.ipp --- old/uhd-3.9.3/include/uhd/transport/nirio/nirio_fifo.ipp 2016-03-21 23:05:35.000000000 +0100 +++ new/uhd-3.9.4/include/uhd/transport/nirio/nirio_fifo.ipp 2016-04-11 19:35:06.000000000 +0200 @@ -310,7 +310,7 @@ nirio_status_chain(_get_transfer_count(actual_xfer_count), status); //We count the elapsed time using a simple counter instead of the high - //resolution timebase for efficieny reasons. The call to fetch the time + //resolution timebase for efficiency reasons. The call to fetch the time //requires a user-kernel transition which has a large overhead compared //to a simple mem read. As a tradeoff, we deal with a less precise timeout. size_t approx_us_elapsed = 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/uhd-3.9.3/include/uhd/transport/udp_zero_copy.hpp new/uhd-3.9.4/include/uhd/transport/udp_zero_copy.hpp --- old/uhd-3.9.3/include/uhd/transport/udp_zero_copy.hpp 2016-03-21 23:05:35.000000000 +0100 +++ new/uhd-3.9.4/include/uhd/transport/udp_zero_copy.hpp 2016-04-11 19:35:06.000000000 +0200 @@ -31,7 +31,7 @@ * Rather, the zero copy transport gives the caller memory references. * The caller informs the transport when it is finished with the reference. * - * On linux systems, the zero copy transport can use a kernel packet ring. + * On Linux systems, the zero copy transport can use a kernel packet ring. * If no platform specific solution is available, make returns a boost asio * implementation that wraps the functionality around a standard send/recv calls. */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/uhd-3.9.3/include/uhd/transport/usb_control.hpp new/uhd-3.9.4/include/uhd/transport/usb_control.hpp --- old/uhd-3.9.3/include/uhd/transport/usb_control.hpp 2016-03-21 23:05:35.000000000 +0100 +++ new/uhd-3.9.4/include/uhd/transport/usb_control.hpp 2016-04-11 19:35:06.000000000 +0200 @@ -29,7 +29,7 @@ virtual ~usb_control(void) = 0; /*! - * Create a new usb control transport: + * Create a new USB control transport: * This transport is for sending and receiving control information from * the host to device using the Default Control Pipe. * diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/uhd-3.9.3/include/uhd/transport/usb_zero_copy.hpp new/uhd-3.9.4/include/uhd/transport/usb_zero_copy.hpp --- old/uhd-3.9.3/include/uhd/transport/usb_zero_copy.hpp 2016-03-21 23:05:35.000000000 +0100 +++ new/uhd-3.9.4/include/uhd/transport/usb_zero_copy.hpp 2016-04-11 19:35:06.000000000 +0200 @@ -25,12 +25,12 @@ namespace uhd { namespace transport { /*! - * A zero copy usb transport provides an efficient way to handle data. + * A zero copy USB transport provides an efficient way to handle data. * by avoiding the extra copy when recv() or send() is called on the handle. * Rather, the zero copy transport gives the caller memory references. * The caller informs the transport when it is finished with the reference. * - * On linux systems, the zero copy transport can use a kernel packet ring. + * On Linux systems, the zero copy transport can use a kernel packet ring. * If no platform specific solution is available, make returns a boost asio * implementation that wraps functionality around standard send/recv calls. */ @@ -39,19 +39,19 @@ typedef boost::shared_ptr<usb_zero_copy> sptr; /*! - * Make a new zero copy usb transport: + * Make a new zero copy USB transport: * This transport is for sending and receiving between the host * and a pair of USB bulk transfer endpoints. * The primary usage for this transport is data transactions. * The underlying implementation may be platform specific. * * \param handle a device handle that uniquely identifying the device - * \param recv_interface an integer specifiying an IN interface number - * \param recv_endpoint an integer specifiying an IN endpoint number - * \param send_interface an integer specifiying an OUT interface number - * \param send_endpoint an integer specifiying an OUT endpoint number + * \param recv_interface an integer specifying an IN interface number + * \param recv_endpoint an integer specifying an IN endpoint number + * \param send_interface an integer specifying an OUT interface number + * \param send_endpoint an integer specifying an OUT endpoint number * \param hints optional parameters to pass to the underlying transport - * \return a new zero copy usb object + * \return a new zero copy USB object */ static sptr make( usb_device_handle::sptr handle, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/uhd-3.9.3/include/uhd/types/sid.hpp new/uhd-3.9.4/include/uhd/types/sid.hpp --- old/uhd-3.9.3/include/uhd/types/sid.hpp 2016-03-21 23:05:35.000000000 +0100 +++ new/uhd-3.9.4/include/uhd/types/sid.hpp 2016-04-11 19:35:06.000000000 +0200 @@ -28,7 +28,7 @@ * \brief Represents a stream ID (SID). * * A stream ID (SID) is an identifier for data. - * It is a 32-Bit value which consistst of 16 Bits + * It is a 32-Bit value which consists of 16 Bits * for the source address and 16 Bits for the destination * address. * Every address is split into two parts: The _address_, which diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/uhd-3.9.3/include/uhd/types/tune_request.hpp new/uhd-3.9.4/include/uhd/types/tune_request.hpp --- old/uhd-3.9.3/include/uhd/types/tune_request.hpp 2016-03-21 23:05:35.000000000 +0100 +++ new/uhd-3.9.4/include/uhd/types/tune_request.hpp 2016-04-11 19:35:06.000000000 +0200 @@ -94,7 +94,7 @@ * Possible keys used by args (depends on implementation): * * - mode_n: Allows the user to tell the daughterboard tune code - * to choose between an integer N diviver or fractional N divider. + * to choose between an integer N divider or fractional N divider. * Default is fractional N on boards that support fractional N tuning. * Fractional N provides greater tuning accuracy at the expense of spurs. * Possible options for this key: "integer" or "fractional". diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/uhd-3.9.3/include/uhd/usrp/dboard_iface.hpp new/uhd-3.9.4/include/uhd/usrp/dboard_iface.hpp --- old/uhd-3.9.3/include/uhd/usrp/dboard_iface.hpp 2016-03-21 23:05:35.000000000 +0100 +++ new/uhd-3.9.4/include/uhd/usrp/dboard_iface.hpp 2016-05-04 18:29:40.000000000 +0200 @@ -41,10 +41,10 @@ /*! * Mangle i2c addresses: - * When i2c is shared across multiple daugterboard slots, + * When i2c is shared across multiple daughterboard slots, * the i2c addresses will be mangled on the secondary slot * to avoid conflicts between slots in the i2c address space. - * The mangling is daguhterboard specific so the implementation + * The mangling is daughterboard specific so the implementation * needs to know whether it should use mangled addresses or not. */ bool mangle_i2c_addrs; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/uhd-3.9.3/include/uhd/usrp/multi_usrp.hpp new/uhd-3.9.4/include/uhd/usrp/multi_usrp.hpp --- old/uhd-3.9.3/include/uhd/usrp/multi_usrp.hpp 2016-03-21 23:05:35.000000000 +0100 +++ new/uhd-3.9.4/include/uhd/usrp/multi_usrp.hpp 2016-05-04 18:29:40.000000000 +0200 @@ -199,7 +199,7 @@ virtual time_spec_t get_time_now(size_t mboard = 0) = 0; /*! - * Get the time when the last pps pulse occured. + * Get the time when the last pps pulse occurred. * \param mboard which motherboard to query * \return a timespec representing the last pps */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/uhd-3.9.3/include/uhd/usrp/usrp.h new/uhd-3.9.4/include/uhd/usrp/usrp.h --- old/uhd-3.9.3/include/uhd/usrp/usrp.h 2016-03-21 23:05:35.000000000 +0100 +++ new/uhd-3.9.4/include/uhd/usrp/usrp.h 2016-04-11 19:35:06.000000000 +0200 @@ -652,7 +652,7 @@ size_t mboard ); -//! Get the RX frontend specfication for the given device +//! Get the RX frontend specification for the given device UHD_API uhd_error uhd_usrp_get_rx_subdev_spec( uhd_usrp_handle h, size_t mboard, @@ -876,7 +876,7 @@ size_t mboard ); -//! Get the TX frontend specfication for the given device +//! Get the TX frontend specification for the given device UHD_API uhd_error uhd_usrp_get_tx_subdev_spec( uhd_usrp_handle h, size_t mboard, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/uhd-3.9.3/include/uhd/utils/fp_compare_delta.ipp new/uhd-3.9.4/include/uhd/utils/fp_compare_delta.ipp --- old/uhd-3.9.3/include/uhd/utils/fp_compare_delta.ipp 2016-03-21 23:05:35.000000000 +0100 +++ new/uhd-3.9.4/include/uhd/utils/fp_compare_delta.ipp 2016-04-22 20:28:27.000000000 +0200 @@ -27,7 +27,7 @@ template<typename float_t> UHD_INLINE float_t fp_compare_select_delta(float_t lhs_delta, float_t rhs_delta) { - return ((lhs_delta < rhs_delta) ? lhs_delta : rhs_delta); + return ((lhs_delta > rhs_delta) ? lhs_delta : rhs_delta); } template<> UHD_INLINE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/uhd-3.9.3/include/uhd/utils/gain_group.hpp new/uhd-3.9.4/include/uhd/utils/gain_group.hpp --- old/uhd-3.9.3/include/uhd/utils/gain_group.hpp 2016-03-21 23:05:35.000000000 +0100 +++ new/uhd-3.9.4/include/uhd/utils/gain_group.hpp 2016-04-11 19:35:06.000000000 +0200 @@ -65,7 +65,7 @@ * For an empty name, set the overall gain value for this group. * The power will be distributed across individual gain elements. * The semantics of how to do this are determined by the priority. - * \param gain the gain to set for the lement or across the group + * \param gain the gain to set for the element or across the group * \param name name of the gain element (optional) */ virtual void set_value(double gain, const std::string &name = "") = 0; @@ -81,7 +81,7 @@ * Register a set of gain functions into this group: * * The name should be a unique and non-empty name. - * Othwerwise, the implementation will rename it. + * Otherwise, the implementation will rename it. * * Priority determines how power will be distributed * with higher priorities getting the power first, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/uhd-3.9.3/include/uhd/utils/thread_priority.h new/uhd-3.9.4/include/uhd/utils/thread_priority.h --- old/uhd-3.9.3/include/uhd/utils/thread_priority.h 2016-03-21 23:05:35.000000000 +0100 +++ new/uhd-3.9.4/include/uhd/utils/thread_priority.h 2016-04-11 19:35:06.000000000 +0200 @@ -31,7 +31,7 @@ * Set the scheduling priority on the current thread. * * A new thread or calling process should make this call - * with the defailts this to enable realtime scheduling. + * with the defaults this to enable realtime scheduling. * * A priority of zero corresponds to normal priority. * Positive priority values are higher than normal. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/uhd-3.9.3/include/uhd/utils/thread_priority.hpp new/uhd-3.9.4/include/uhd/utils/thread_priority.hpp --- old/uhd-3.9.3/include/uhd/utils/thread_priority.hpp 2016-03-21 23:05:35.000000000 +0100 +++ new/uhd-3.9.4/include/uhd/utils/thread_priority.hpp 2016-04-11 19:35:06.000000000 +0200 @@ -28,7 +28,7 @@ * Set the scheduling priority on the current thread. * * A new thread or calling process should make this call - * with the defailts this to enable realtime scheduling. + * with the defaults this to enable realtime scheduling. * * A priority of zero corresponds to normal priority. * Positive priority values are higher than normal. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/uhd-3.9.3/lib/convert/convert_with_neon.cpp new/uhd-3.9.4/lib/convert/convert_with_neon.cpp --- old/uhd-3.9.3/lib/convert/convert_with_neon.cpp 2016-03-21 23:05:35.000000000 +0100 +++ new/uhd-3.9.4/lib/convert/convert_with_neon.cpp 2016-04-05 02:51:50.000000000 +0200 @@ -34,13 +34,35 @@ size_t i; float32x4_t Q0 = vdupq_n_f32(float(scale_factor)); - for (i=0; i < (nsamps & ~0x03); i+=2) { + for (i=0; i < (nsamps & ~0x0f); i+=8) { float32x4_t Q1 = vld1q_f32(reinterpret_cast<const float *>(&input[i])); + float32x4_t Q4 = vld1q_f32(reinterpret_cast<const float *>(&input[i+2])); + float32x4_t Q7 = vld1q_f32(reinterpret_cast<const float *>(&input[i+4])); + float32x4_t Q10 = vld1q_f32(reinterpret_cast<const float *>(&input[i+6])); + float32x4_t Q2 = vmulq_f32(Q1, Q0); int32x4_t Q3 = vcvtq_s32_f32(Q2); int16x4_t D8 = vmovn_s32(Q3); int16x4_t D9 = vrev32_s16(D8); vst1_s16((reinterpret_cast<int16_t *>(&output[i])), D9); + + float32x4_t Q5 = vmulq_f32(Q4, Q0); + int32x4_t Q6 = vcvtq_s32_f32(Q5); + int16x4_t D10 = vmovn_s32(Q6); + int16x4_t D11 = vrev32_s16(D10); + vst1_s16((reinterpret_cast<int16_t *>(&output[i+2])), D11); + + float32x4_t Q8 = vmulq_f32(Q7, Q0); + int32x4_t Q9 = vcvtq_s32_f32(Q8); + int16x4_t D12 = vmovn_s32(Q9); + int16x4_t D13 = vrev32_s16(D12); + vst1_s16((reinterpret_cast<int16_t *>(&output[i+4])), D13); + + float32x4_t Q11 = vmulq_f32(Q10, Q0); + int32x4_t Q13 = vcvtq_s32_f32(Q11); + int16x4_t D14 = vmovn_s32(Q13); + int16x4_t D15 = vrev32_s16(D14); + vst1_s16((reinterpret_cast<int16_t *>(&output[i+6])), D15); } xx_to_item32_sc16<uhd::htowx>(input+i, output+i, nsamps-i, scale_factor); @@ -53,13 +75,35 @@ size_t i; float32x4_t Q1 = vdupq_n_f32(float(scale_factor)); - for (i=0; i < (nsamps & ~0x03); i+=2) { + for (i=0; i < (nsamps & ~0xf); i+=8) { int16x4_t D0 = vld1_s16(reinterpret_cast<const int16_t *>(&input[i])); + int16x4_t D2 = vld1_s16(reinterpret_cast<const int16_t *>(&input[i+2])); + int16x4_t D4 = vld1_s16(reinterpret_cast<const int16_t *>(&input[i+4])); + int16x4_t D6 = vld1_s16(reinterpret_cast<const int16_t *>(&input[i+6])); + int16x4_t D1 = vrev32_s16(D0); int32x4_t Q2 = vmovl_s16(D1); float32x4_t Q3 = vcvtq_f32_s32(Q2); float32x4_t Q4 = vmulq_f32(Q3, Q1); vst1q_f32((reinterpret_cast<float *>(&output[i])), Q4); + + int16x4_t D3 = vrev32_s16(D2); + int32x4_t Q5 = vmovl_s16(D3); + float32x4_t Q6 = vcvtq_f32_s32(Q5); + float32x4_t Q7 = vmulq_f32(Q6, Q1); + vst1q_f32((reinterpret_cast<float *>(&output[i+2])), Q7); + + int16x4_t D5 = vrev32_s16(D4); + int32x4_t Q8 = vmovl_s16(D5); + float32x4_t Q9 = vcvtq_f32_s32(Q8); + float32x4_t Q10 = vmulq_f32(Q9, Q1); + vst1q_f32((reinterpret_cast<float *>(&output[i+4])), Q10); + + int16x4_t D7 = vrev32_s16(D6); + int32x4_t Q11 = vmovl_s16(D7); + float32x4_t Q12 = vcvtq_f32_s32(Q11); + float32x4_t Q13 = vmulq_f32(Q12, Q1); + vst1q_f32((reinterpret_cast<float *>(&output[i+6])), Q13); } item32_sc16_to_xx<uhd::htowx>(input+i, output+i, nsamps-i, scale_factor); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/uhd-3.9.3/lib/usrp/b200/b200_impl.cpp new/uhd-3.9.4/lib/usrp/b200/b200_impl.cpp --- old/uhd-3.9.3/lib/usrp/b200/b200_impl.cpp 2016-03-21 23:05:35.000000000 +0100 +++ new/uhd-3.9.4/lib/usrp/b200/b200_impl.cpp 2016-05-05 16:43:43.000000000 +0200 @@ -33,6 +33,7 @@ #include <boost/lexical_cast.hpp> #include <boost/functional/hash.hpp> #include <boost/make_shared.hpp> +#include <boost/weak_ptr.hpp> #include <cstdio> #include <ctime> #include <cmath> @@ -731,6 +732,14 @@ * setup radio control objects **********************************************************************/ +void lambda_set_bool_prop(boost::weak_ptr<property_tree> tree_wptr, fs_path path, bool value, double) +{ + property_tree::sptr tree = tree_wptr.lock(); + if (tree) { + tree->access<bool>(path).set(value); + } +} + void b200_impl::setup_radio(const size_t dspno) { radio_perifs_t &perif = _radio_perifs[dspno]; @@ -788,8 +797,10 @@ .subscribe(boost::bind(&rx_dsp_core_3000::set_tick_rate, perif.ddc, _1)); const fs_path rx_dsp_path = mb_path / "rx_dsps" / dspno; perif.ddc->populate_subtree(_tree->subtree(rx_dsp_path)); + _tree->create<bool>(rx_dsp_path / "rate" / "set").set(false); _tree->access<double>(rx_dsp_path / "rate" / "value") .coerce(boost::bind(&b200_impl::coerce_rx_samp_rate, this, perif.ddc, dspno, _1)) + .subscribe(boost::bind(&lambda_set_bool_prop, boost::weak_ptr<property_tree>(_tree), rx_dsp_path / "rate" / "set", true, _1)) .subscribe(boost::bind(&b200_impl::update_rx_samp_rate, this, dspno, _1)) ; _tree->create<stream_cmd_t>(rx_dsp_path / "stream_cmd") @@ -803,8 +814,10 @@ .subscribe(boost::bind(&tx_dsp_core_3000::set_tick_rate, perif.duc, _1)); const fs_path tx_dsp_path = mb_path / "tx_dsps" / dspno; perif.duc->populate_subtree(_tree->subtree(tx_dsp_path)); + _tree->create<bool>(tx_dsp_path / "rate" / "set").set(false); _tree->access<double>(tx_dsp_path / "rate" / "value") .coerce(boost::bind(&b200_impl::coerce_tx_samp_rate, this, perif.duc, dspno, _1)) + .subscribe(boost::bind(&lambda_set_bool_prop, boost::weak_ptr<property_tree>(_tree), tx_dsp_path / "rate" / "set", true, _1)) .subscribe(boost::bind(&b200_impl::update_tx_samp_rate, this, dspno, _1)) ; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/uhd-3.9.3/lib/usrp/b200/b200_io_impl.cpp new/uhd-3.9.4/lib/usrp/b200/b200_io_impl.cpp --- old/uhd-3.9.3/lib/usrp/b200/b200_io_impl.cpp 2016-03-21 23:05:35.000000000 +0100 +++ new/uhd-3.9.4/lib/usrp/b200/b200_io_impl.cpp 2016-05-04 18:29:40.000000000 +0200 @@ -82,9 +82,9 @@ num_chans = std::max(size_t(1), max_chan_count()); } const double max_tick_rate = ad9361_device_t::AD9361_MAX_CLOCK_RATE/num_chans; + using namespace uhd::math; if (rate != 0.0 and - (uhd::math::fp_compare::fp_compare_delta<double>(rate, uhd::math::FREQ_COMPARISON_DELTA_HZ) > - uhd::math::fp_compare::fp_compare_delta<double>(max_tick_rate, uhd::math::FREQ_COMPARISON_DELTA_HZ))) { + (fp_compare::fp_compare_delta<double>(rate, FREQ_COMPARISON_DELTA_HZ) > max_tick_rate)) { throw uhd::value_error(str( boost::format("Requested sampling rate (%.2f Msps) exceeds maximum tick rate of %.2f MHz.") % (rate / 1e6) % (max_tick_rate / 1e6) @@ -96,26 +96,25 @@ boost::uint32_t lcm_rate = (rate == 0) ? 1 : static_cast<boost::uint32_t>(floor(rate + 0.5)); for (int i = 0; i < 2; i++) { // Loop through rx and tx std::string dir = (i == 0) ? "tx" : "rx"; - // We have no way of knowing which DSPs are used, so we check them all. + // We assume all 'set' DSPs are being used. BOOST_FOREACH(const std::string &dsp_no, _tree->list(str(boost::format("/mboards/0/%s_dsps") % dir))) { fs_path dsp_path = str(boost::format("/mboards/0/%s_dsps/%s") % dir % dsp_no); if (dsp_path == tree_dsp_path) { continue; } + if (not _tree->access<bool>(dsp_path / "rate/set").get()) { + continue; + } double this_dsp_rate = _tree->access<double>(dsp_path / "rate/value").get(); // Check if the user selected something completely unreasonable: - if (uhd::math::fp_compare::fp_compare_delta<double>(this_dsp_rate, uhd::math::FREQ_COMPARISON_DELTA_HZ) > - uhd::math::fp_compare::fp_compare_delta<double>(max_tick_rate, uhd::math::FREQ_COMPARISON_DELTA_HZ)) { + if (fp_compare::fp_compare_delta<double>(this_dsp_rate, FREQ_COMPARISON_DELTA_HZ) > max_tick_rate) { throw uhd::value_error(str( boost::format("Requested sampling rate (%.2f Msps) exceeds maximum tick rate of %.2f MHz.") % (this_dsp_rate / 1e6) % (max_tick_rate / 1e6) )); } - // If this_dsp_rate == 0.0, the sampling rate for this DSP hasn't been set, so - // we don't take that into consideration. - if (this_dsp_rate == 0.0) { - continue; - } + // Clean up floating point rounding errors if they crept in + this_dsp_rate = std::min(max_tick_rate, this_dsp_rate); lcm_rate = boost::math::lcm<boost::uint32_t>( lcm_rate, static_cast<boost::uint32_t>(floor(this_dsp_rate + 0.5)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/uhd-3.9.3/lib/usrp/common/max287x.hpp new/uhd-3.9.4/lib/usrp/common/max287x.hpp --- old/uhd-3.9.3/lib/usrp/common/max287x.hpp 2016-03-21 23:05:35.000000000 +0100 +++ new/uhd-3.9.4/lib/usrp/common/max287x.hpp 2016-04-05 02:51:50.000000000 +0200 @@ -1,5 +1,5 @@ // -// Copyright 2015 Ettus Research LLC +// Copyright 2015-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 @@ -27,6 +27,7 @@ #include <boost/function.hpp> #include <boost/thread.hpp> #include <boost/math/special_functions/round.hpp> +#include <stdint.h> #include <vector> #include "max2870_regs.hpp" #include "max2871_regs.hpp" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/uhd-3.9.3/lib/usrp/cores/gpio_core_200.cpp new/uhd-3.9.4/lib/usrp/cores/gpio_core_200.cpp --- old/uhd-3.9.3/lib/usrp/cores/gpio_core_200.cpp 2016-03-21 23:05:35.000000000 +0100 +++ new/uhd-3.9.4/lib/usrp/cores/gpio_core_200.cpp 2016-05-04 18:29:40.000000000 +0200 @@ -102,10 +102,10 @@ addr = REG_GPIO_TX_ONLY; break; case dboard_iface::ATR_REG_RX_ONLY: - addr = REG_GPIO_IDLE; + addr = REG_GPIO_RX_ONLY; break; case dboard_iface::ATR_REG_FULL_DUPLEX: - addr = REG_GPIO_RX_ONLY; + addr = REG_GPIO_BOTH; break; default: UHD_THROW_INVALID_CODE_PATH(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/uhd-3.9.3/lib/usrp/dboard/db_ubx.cpp new/uhd-3.9.4/lib/usrp/dboard/db_ubx.cpp --- old/uhd-3.9.3/lib/usrp/dboard/db_ubx.cpp 2016-03-21 23:05:35.000000000 +0100 +++ new/uhd-3.9.4/lib/usrp/dboard/db_ubx.cpp 2016-05-04 18:29:40.000000000 +0200 @@ -1135,6 +1135,7 @@ boost::mutex _mutex; ubx_cpld_reg_t _cpld_reg; uint32_t _prev_cpld_value; + std::map<ubx_gpio_field_id_t,ubx_gpio_field_info_t> _gpio_map; boost::shared_ptr<max287x_iface> _txlo1; boost::shared_ptr<max287x_iface> _txlo2; boost::shared_ptr<max287x_iface> _rxlo1; @@ -1159,7 +1160,6 @@ size_t _rev; double _prev_tx_freq; double _prev_rx_freq; - std::map<ubx_gpio_field_id_t,ubx_gpio_field_info_t> _gpio_map; ubx_gpio_reg_t _tx_gpio_reg; ubx_gpio_reg_t _rx_gpio_reg; int64_t _tx_sync_delay; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/uhd-3.9.3/lib/usrp/e300/e300_spi.cpp new/uhd-3.9.4/lib/usrp/e300/e300_spi.cpp --- old/uhd-3.9.3/lib/usrp/e300/e300_spi.cpp 2016-03-21 23:05:35.000000000 +0100 +++ new/uhd-3.9.4/lib/usrp/e300/e300_spi.cpp 2016-04-19 18:32:34.000000000 +0200 @@ -93,6 +93,8 @@ tr.rx_buf = (unsigned long) &rx[0]; tr.len = num_bits >> 3; tr.bits_per_word = _bits; + tr.tx_nbits = 1; + tr.rx_nbits = 1; tr.speed_hz = _speed; tr.delay_usecs = _delay; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/uhd-3.9.3/tests/fp_compare_delta_test.cpp new/uhd-3.9.4/tests/fp_compare_delta_test.cpp --- old/uhd-3.9.3/tests/fp_compare_delta_test.cpp 2016-03-21 23:05:35.000000000 +0100 +++ new/uhd-3.9.4/tests/fp_compare_delta_test.cpp 2016-04-22 20:28:27.000000000 +0200 @@ -237,6 +237,14 @@ BOOST_CHECK(double(alpha._value + 3.0008) >= alpha); } +BOOST_AUTO_TEST_CASE(fp_compare_large_delta) { + BOOST_CHECK(fp_compare_delta<double>(61440000.047870710492, 0.1) == 61440000.000000000000); + BOOST_CHECK(fp_compare_delta<double>(61440000.047870710492, 0.1) <= 61440000.000000000000); + BOOST_CHECK(fp_compare_delta<double>(61440000.047870710492, 0.1) >= 61440000.000000000000); + + BOOST_CHECK(fp_compare_delta<double>(1.0, 10.0) == 2.0); +} + BOOST_AUTO_TEST_CASE(frequency_compare_function) { BOOST_CHECK(uhd::math::frequencies_are_equal(6817333232.0, 6817333232.0)); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/uhd-3.9.3/utils/CMakeLists.txt new/uhd-3.9.4/utils/CMakeLists.txt --- old/uhd-3.9.3/utils/CMakeLists.txt 2016-03-21 23:05:35.000000000 +0100 +++ new/uhd-3.9.4/utils/CMakeLists.txt 2016-05-04 18:29:40.000000000 +0200 @@ -173,4 +173,18 @@ ENDIF(ENABLE_USRP2) +######################################################################## +# Other files that are not utilities or executables +######################################################################## +IF(WIN32) + SET(windows_extra_files + FastSendDatagramThreshold.reg + ) + UHD_INSTALL( + FILES ${windows_extra_files} + DESTINATION ${PKG_DATA_DIR} + COMPONENT utilities + ) +ENDIF(WIN32) + ADD_SUBDIRECTORY(latency) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/uhd-3.9.3/utils/query_gpsdo_sensors.cpp new/uhd-3.9.4/utils/query_gpsdo_sensors.cpp --- old/uhd-3.9.3/utils/query_gpsdo_sensors.cpp 2016-03-21 23:05:35.000000000 +0100 +++ new/uhd-3.9.4/utils/query_gpsdo_sensors.cpp 2016-04-05 02:51:50.000000000 +0200 @@ -1,5 +1,5 @@ // -// Copyright 2012,2014 Ettus Research LLC +// Copyright 2012,2014-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 @@ -38,7 +38,6 @@ std::cout << boost::format("**************************************Helpful Notes on Clock/PPS Selection**************************************\n"); std::cout << boost::format("As you can see, the default 10 MHz Reference and 1 PPS signals are now from the GPSDO.\n"); std::cout << boost::format("If you would like to use the internal reference(TCXO) in other applications, you must configure that explicitly.\n"); - std::cout << boost::format("You can no longer select the external SMAs for 10 MHz or 1 PPS signaling.\n"); std::cout << boost::format("****************************************************************************************************************\n"); } @@ -51,7 +50,7 @@ po::options_description desc("Allowed options"); desc.add_options() ("help", "help message") - ("args", po::value<std::string>(&args)->default_value(""), "Specify a single USRP.") + ("args", po::value<std::string>(&args)->default_value(""), "Device address arguments specifying a single USRP") ; po::variables_map vm; po::store(po::parse_command_line(argc, argv, desc), vm); @@ -59,8 +58,11 @@ //Print the help message if (vm.count("help")) { - std::cout << boost::format("Query GPSDO Sensors %s") % desc << std::endl; - return EXIT_FAILURE; + std::cout << boost::format("Query GPSDO Sensors, try to lock the reference oscillator to the GPS disciplined clock, and set the device time to GPS time") + << std::endl + << std::endl + << desc; + return EXIT_FAILURE; } //Create a USRP device @@ -68,9 +70,6 @@ uhd::usrp::multi_usrp::sptr usrp = uhd::usrp::multi_usrp::make(args); std::cout << boost::format("Using Device: %s\n") % usrp->get_pp_string(); - print_notes(); - - //Verify GPS sensors are present (i.e. EEPROM has been burnt) std::vector<std::string> sensor_names = usrp->get_mboard_sensor_names(0); @@ -82,38 +81,96 @@ exit(EXIT_FAILURE); } + // Explicitly set time source to gpsdo + boost::this_thread::sleep(boost::posix_time::seconds(1)); + try { + usrp->set_time_source("gpsdo"); + } catch (uhd::value_error &e) { + std::cout << "could not set the time source to \"gpsdo\"; error was:" <<std::endl; + std::cout << e.what() << std::endl; + std::cout << "trying \"external\"..." <<std::endl; + try { + usrp->set_time_source("external"); + } catch (uhd::value_error &e) { + std::cout << "\"external\" failed, too." << std::endl; + } + } + std::cout<< std::endl << "Time source is now " << usrp->get_time_source(0) << std::endl; + //Check for GPS lock uhd::sensor_value_t gps_locked = usrp->get_mboard_sensor("gps_locked",0); if(not gps_locked.to_bool()) { - std::cout << boost::format("\nGPS does not have lock. Wait a few minutes and try again.\n"); - std::cout << boost::format("NMEA strings and device time may not be accurate until lock is achieved.\n\n"); - } else - std::cout << boost::format("GPS Locked\n"); + std::cout << boost::format("\nGPS does not have lock. Wait a few minutes and try again.\n"); + std::cout << boost::format("NMEA strings and device time may not be accurate until lock is achieved.\n\n"); + } else { + std::cout << boost::format("GPS Locked"); + } + + std::cout << "\nSetting the reference clock source to \"gpsdo\"...\n"; + try { + usrp->set_clock_source("gpsdo"); + } catch (uhd::value_error &e) { + std::cout << "could not set the clock source to \"gpsdo\"; error was:" <<std::endl; + std::cout << e.what() << std::endl; + std::cout << "trying \"external\"..." <<std::endl; + try{ + usrp->set_clock_source("external"); + } catch (uhd::value_error &e) { + std::cout << "\"external\" failed, too." << std::endl; + } + } + std::cout<< std::endl << "Clock source is now " << usrp->get_clock_source(0) << std::endl; + + print_notes(); + //Check for 10 MHz lock if(std::find(sensor_names.begin(), sensor_names.end(), "ref_locked") != sensor_names.end()) { - uhd::sensor_value_t gps_locked = usrp->get_mboard_sensor("ref_locked",0); - if(not gps_locked.to_bool()) { - std::cout << boost::format("USRP NOT Locked to GPSDO 10 MHz Reference.\n"); - std::cout << boost::format("Double check installation instructions (N2X0/E1X0 only): https://www.ettus.com/content/files/gpsdo-kit_4.pdf\n\n"); - } else - std::cout << boost::format("USRP Locked to GPSDO 10 MHz Reference.\n"); - }else - std::cout << boost::format("ref_locked sensor not present on this board.\n"); - - // Explicitly set time source to gpsdo - usrp->set_time_source("gpsdo"); + uhd::sensor_value_t gps_locked = usrp->get_mboard_sensor("ref_locked",0); + if(not gps_locked.to_bool()) { + std::cout << boost::format("USRP NOT Locked to GPSDO 10 MHz Reference.\n"); + std::cout << boost::format("Double check installation instructions (N2X0/E1X0 only): https://www.ettus.com/content/files/gpsdo-kit_4.pdf\n\n"); + std::cout << boost::format("Locking the internal reference to the GPSDO might take a second to reach stability. Retrying in 10 s...\n\n"); + boost::this_thread::sleep(boost::posix_time::seconds(10)); + } + if(usrp->get_mboard_sensor("ref_locked",0).to_bool()) { + std::cout << boost::format("USRP Locked to GPSDO 10 MHz Reference.\n"); + } + } else { + std::cout << boost::format("ref_locked sensor not present on this board.\n"); + } //Check PPS and compare UHD device time to GPS time boost::this_thread::sleep(boost::posix_time::seconds(1)); uhd::sensor_value_t gps_time = usrp->get_mboard_sensor("gps_time"); - const time_t pc_clock_time = time(NULL); - const uhd::time_spec_t last_pps_time = usrp->get_time_last_pps(); + uhd::time_spec_t last_pps_time = usrp->get_time_last_pps(); + + //we only care about the full seconds + signed gps_seconds = gps_time.to_int(); + long long pps_seconds = last_pps_time.to_ticks(1.0); + + if(pps_seconds != gps_seconds) { + std::cout << boost::format("\nGPS and UHD Device time are NOT aligned;\nlast_pps: %ld vs gps: %ld. Trying to set the device time to GPS time...") + % pps_seconds % gps_seconds + << std::endl; + //full next after next second + uhd::time_spec_t next_pps_time(gps_seconds + 2.0); + //instruct the USRP to wait for the next PPS edge, then set the new time on the following PPS + usrp->set_time_unknown_pps(next_pps_time); + //allow some time to make sure the PPS has come… + boost::this_thread::sleep(boost::posix_time::milliseconds(1100)); + //…then ask + gps_seconds = usrp->get_mboard_sensor("gps_time").to_int(); + pps_seconds = usrp->get_time_last_pps().to_ticks(1.0); + } - if (last_pps_time.to_ticks(1.0) == gps_time.to_int()) { + std::cout << boost::format("last_pps: %ld vs gps: %ld.") + % pps_seconds % gps_seconds + << std::endl; + if (pps_seconds == gps_seconds) { std::cout << boost::format("GPS and UHD Device time are aligned.\n"); } else { - std::cout << boost::format("\nGPS and UHD Device time are NOT aligned last_pps: %ld vs gps: %ld. Try re-running the program. Double check 1 PPS connection from GPSDO.\n\n") % last_pps_time.to_ticks(1.0) % gps_time.to_int() << std::endl; + std::cout << boost::format("Could not align UHD Device time to GPS time. Giving up.\n"); } //print NMEA strings @@ -121,12 +178,14 @@ uhd::sensor_value_t gga_string = usrp->get_mboard_sensor("gps_gpgga"); uhd::sensor_value_t rmc_string = usrp->get_mboard_sensor("gps_gprmc"); std::cout << boost::format("Printing available NMEA strings:\n"); - std::cout << boost::format("%s\n%s\n%s\n") % gga_string.to_pp_string() % rmc_string.to_pp_string() % gps_time.to_pp_string(); - } catch (std::exception &) { + std::cout << boost::format("%s\n%s\n") % gga_string.to_pp_string() % rmc_string.to_pp_string(); + } catch (uhd::lookup_error &e) { std::cout << "NMEA strings not implemented for this device." << std::endl; } - std::cout << boost::format("UHD Device time: %.0f seconds\n") % (last_pps_time.get_real_secs()); - std::cout << boost::format("PC Clock time: %.0f seconds\n") % pc_clock_time; + std::cout << boost::format("GPS Epoch time at last PPS: %.5f seconds\n") % usrp->get_mboard_sensor("gps_time").to_real(); + std::cout << boost::format("UHD Device time last PPS: %.5f seconds\n") % (usrp->get_time_last_pps().get_real_secs()); + std::cout << boost::format("UHD Device time right now: %.5f seconds\n") % (usrp->get_time_now().get_real_secs()); + std::cout << boost::format("PC Clock time: %.5f seconds\n") % time(NULL); //finished std::cout << boost::format("\nDone!\n\n"); ++++++ uhd-images_003.009.003-release.tar.gz -> uhd-images_003.009.004-release.tar.gz ++++++ /work/SRC/openSUSE:Factory/uhd/uhd-images_003.009.003-release.tar.gz /work/SRC/openSUSE:Factory/.uhd.new/uhd-images_003.009.004-release.tar.gz differ: char 5, line 1
