From 984a18a75bd73fecafa9050fbec7e8bf58ac3084 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Wed, 25 May 2016 10:58:57 -0700 Subject: cmake: When git describe fails, just use defaults instead of printing warnings. --- host/cmake/Modules/UHDVersion.cmake | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/host/cmake/Modules/UHDVersion.cmake b/host/cmake/Modules/UHDVersion.cmake index a344969d1..4b26efdb2 100644 --- a/host/cmake/Modules/UHDVersion.cmake +++ b/host/cmake/Modules/UHDVersion.cmake @@ -69,16 +69,27 @@ EXECUTE_PROCESS( IF(_git_describe_result EQUAL 0) EXECUTE_PROCESS( WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} - COMMAND ${PYTHON_EXECUTABLE} -c "print('${_git_describe}'.split('-')[-2])" + COMMAND ${PYTHON_EXECUTABLE} -c " +try: + print('${_git_describe}'.split('-')[-2]) +except IndexError: + print('0') +" OUTPUT_VARIABLE UHD_GIT_COUNT OUTPUT_STRIP_TRAILING_WHITESPACE ) EXECUTE_PROCESS( WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} - COMMAND ${PYTHON_EXECUTABLE} -c "print('${_git_describe}'.split('-')[-1])" + COMMAND ${PYTHON_EXECUTABLE} -c " +try: + print('${_git_describe}'.split('-')[-1]) +except IndexError: + print('unknown') +" OUTPUT_VARIABLE UHD_GIT_HASH OUTPUT_STRIP_TRAILING_WHITESPACE ) ENDIF() +## Set default values if all fails. Make sure they're identical to the ones above. IF(NOT UHD_GIT_COUNT) SET(UHD_GIT_COUNT "0") ENDIF() -- cgit v1.2.3 From bf74b4e85d6d2b8833c35b1f243eb36b99432250 Mon Sep 17 00:00:00 2001 From: Ashish Chaudhari Date: Wed, 25 May 2016 16:08:12 -0700 Subject: bugfix#1102: Prevented X300 DAC FIFO from underflowing - The spectral distortion was begin caused by the DAC FIFO underflowing. The fix was to run through the DAC sync procedure which uses the falling edge clock to sample the RefClk and sync it with the data clk --- host/lib/usrp/x300/x300_adc_dac_utils.cpp | 2 +- host/lib/usrp/x300/x300_dac_ctrl.cpp | 14 +++----------- host/lib/usrp/x300/x300_dac_ctrl.hpp | 3 --- 3 files changed, 4 insertions(+), 15 deletions(-) diff --git a/host/lib/usrp/x300/x300_adc_dac_utils.cpp b/host/lib/usrp/x300/x300_adc_dac_utils.cpp index e08825749..cd337febb 100644 --- a/host/lib/usrp/x300/x300_adc_dac_utils.cpp +++ b/host/lib/usrp/x300/x300_adc_dac_utils.cpp @@ -35,7 +35,7 @@ void x300_impl::synchronize_dacs(const std::vector& radios) //Reinitialize and resync all DACs for (size_t i = 0; i < radios.size(); i++) { - radios[i]->dac->reset_and_resync(); + radios[i]->dac->reset(); } //Get a rough estimate of the cumulative command latency diff --git a/host/lib/usrp/x300/x300_dac_ctrl.cpp b/host/lib/usrp/x300/x300_dac_ctrl.cpp index bb41146b6..d49fba383 100644 --- a/host/lib/usrp/x300/x300_dac_ctrl.cpp +++ b/host/lib/usrp/x300/x300_dac_ctrl.cpp @@ -65,17 +65,6 @@ public: } void reset() - { - //ADI recommendations: - //- soft reset the chip before configuration - //- put the chip in sleep mode during configuration and wake it up when done - _soft_reset(); - _sleep_mode(true); - _init(); - _sleep_mode(false); - } - - void reset_and_resync() { //ADI recommendations: //- soft reset the chip before configuration @@ -84,6 +73,9 @@ public: _soft_reset(); _sleep_mode(true); _init(); + //We run backend sync regardless of whether we need to sync multiple DACs + //because we use the internal DAC FIFO to meet system synchronous timing + //and we need to guarantee that the FIFO is not empty. _backend_sync(); _sleep_mode(false); } diff --git a/host/lib/usrp/x300/x300_dac_ctrl.hpp b/host/lib/usrp/x300/x300_dac_ctrl.hpp index c2e509b54..f2a407971 100644 --- a/host/lib/usrp/x300/x300_dac_ctrl.hpp +++ b/host/lib/usrp/x300/x300_dac_ctrl.hpp @@ -40,9 +40,6 @@ public: // ! Reset the DAC virtual void reset(void) = 0; - // ! Reset the DAC and resync - virtual void reset_and_resync(void) = 0; - // ! Check for successful backend and frontend sync virtual void verify_sync(void) = 0; }; -- cgit v1.2.3