diff options
Diffstat (limited to 'host/lib')
-rw-r--r-- | host/lib/CMakeLists.txt | 70 | ||||
-rw-r--r-- | host/lib/ic_reg_maps/CMakeLists.txt | 64 | ||||
-rw-r--r-- | host/lib/transport/CMakeLists.txt | 55 | ||||
-rw-r--r-- | host/lib/usrp/CMakeLists.txt | 39 | ||||
-rw-r--r-- | host/lib/usrp/dboard/CMakeLists.txt | 20 | ||||
-rw-r--r-- | host/lib/usrp/dboard/db_dbsrx.cpp | 2 | ||||
-rw-r--r-- | host/lib/usrp/usrp1/CMakeLists.txt | 43 | ||||
-rw-r--r-- | host/lib/usrp/usrp1/dsp_impl.cpp | 2 | ||||
-rw-r--r-- | host/lib/usrp/usrp2/CMakeLists.txt | 44 | ||||
-rw-r--r-- | host/lib/usrp/usrp2/clock_ctrl.cpp | 57 | ||||
-rw-r--r-- | host/lib/usrp/usrp2/clock_ctrl.hpp | 12 | ||||
-rw-r--r-- | host/lib/usrp/usrp2/fw_common.h | 4 | ||||
-rw-r--r-- | host/lib/usrp/usrp2/mboard_impl.cpp | 48 | ||||
-rw-r--r-- | host/lib/usrp/usrp2/serdes_ctrl.cpp | 46 | ||||
-rw-r--r-- | host/lib/usrp/usrp2/serdes_ctrl.hpp | 40 | ||||
-rw-r--r-- | host/lib/usrp/usrp2/usrp2_impl.hpp | 1 | ||||
-rw-r--r-- | host/lib/usrp/usrp2/usrp2_regs.cpp | 2 | ||||
-rw-r--r-- | host/lib/usrp/usrp2/usrp2_regs.hpp | 10 | ||||
-rw-r--r-- | host/lib/usrp/usrp_e100/CMakeLists.txt | 42 | ||||
-rw-r--r-- | host/lib/utils/CMakeLists.txt | 20 |
20 files changed, 318 insertions, 303 deletions
diff --git a/host/lib/CMakeLists.txt b/host/lib/CMakeLists.txt index a198b476a..28e4bcca2 100644 --- a/host/lib/CMakeLists.txt +++ b/host/lib/CMakeLists.txt @@ -61,32 +61,35 @@ MACRO(LIBUHD_PYTHON_GEN_SOURCE pyfile outfile) LIBUHD_APPEND_SOURCES(${outfile}) ENDMACRO(LIBUHD_PYTHON_GEN_SOURCE) -MACRO(LIBUHD_REGISTER_COMPONENT name var auto) - MESSAGE(STATUS "") - MESSAGE(STATUS "Configuring ${name} support...") - IF(DEFINED ${var}) - MESSAGE(STATUS "${name} support configured ${var}=${${var}}") - ELSE(DEFINED ${var}) #not defined: automatic enabling of component - SET(${var} ${auto}) - MESSAGE(STATUS "${name} support configured automatically") - ENDIF(DEFINED ${var}) - OPTION(${var} "enable ${name} support" ${${var}}) - IF(${var}) - MESSAGE(STATUS " Enabling ${name} support.") - LIST(APPEND _libuhd_enabled_components ${name}) - ELSE(${var}) - MESSAGE(STATUS " Disabling ${name} support.") - LIST(APPEND _libuhd_disabled_components ${name}) - ENDIF(${var}) -ENDMACRO(LIBUHD_REGISTER_COMPONENT) +MACRO(INCLUDE_SUBDIRECTORY subdir) + #insert the current directories on the front of the list + LIST(INSERT _cmake_source_dirs 0 ${CMAKE_CURRENT_SOURCE_DIR}) + LIST(INSERT _cmake_binary_dirs 0 ${CMAKE_CURRENT_BINARY_DIR}) + + #set the current directories to the names of the subdirs + SET(CMAKE_CURRENT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/${subdir}) + SET(CMAKE_CURRENT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${subdir}) + + #include the subdirectory CMakeLists to run it + FILE(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt) + + #reset the value of the current directories + LIST(GET _cmake_source_dirs 0 CMAKE_CURRENT_SOURCE_DIR) + LIST(GET _cmake_binary_dirs 0 CMAKE_CURRENT_BINARY_DIR) + + #pop the subdir names of the front of the list + LIST(REMOVE_AT _cmake_source_dirs 0) + LIST(REMOVE_AT _cmake_binary_dirs 0) +ENDMACRO(INCLUDE_SUBDIRECTORY) ######################################################################## -# Include CMakeLists.txt from subdirectories +# Include subdirectories (different than add) ######################################################################## -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/ic_reg_maps/CMakeLists.txt) -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/transport/CMakeLists.txt) -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/usrp/CMakeLists.txt) -INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/utils/CMakeLists.txt) +INCLUDE_SUBDIRECTORY(ic_reg_maps) +INCLUDE_SUBDIRECTORY(transport) +INCLUDE_SUBDIRECTORY(usrp) +INCLUDE_SUBDIRECTORY(utils) ######################################################################## # Append to the list of sources for lib uhd @@ -128,24 +131,3 @@ INSTALL(TARGETS uhd ARCHIVE DESTINATION ${LIBRARY_DIR} # .lib file RUNTIME DESTINATION ${LIBRARY_DIR} # .dll file ) - -######################################################################## -# Print configuration summary -######################################################################## -MESSAGE(STATUS "") -MESSAGE(STATUS "######################################################") -MESSAGE(STATUS "# LibUHD enabled components ") -MESSAGE(STATUS "######################################################") -FOREACH(comp ${_libuhd_enabled_components}) - MESSAGE(STATUS " * ${comp}") -ENDFOREACH(comp) - -MESSAGE(STATUS "") -MESSAGE(STATUS "######################################################") -MESSAGE(STATUS "# LibUHD disabled components ") -MESSAGE(STATUS "######################################################") -FOREACH(comp ${_libuhd_disabled_components}) - MESSAGE(STATUS " * ${comp}") -ENDFOREACH(comp) - -MESSAGE(STATUS "") diff --git a/host/lib/ic_reg_maps/CMakeLists.txt b/host/lib/ic_reg_maps/CMakeLists.txt index ac051b843..67a63c32b 100644 --- a/host/lib/ic_reg_maps/CMakeLists.txt +++ b/host/lib/ic_reg_maps/CMakeLists.txt @@ -15,76 +15,78 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # -#This file will be included by cmake, use absolute paths! +######################################################################## +# This file included, use CMake directory variables +######################################################################## -INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/lib/ic_reg_maps) +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) LIBUHD_PYTHON_GEN_SOURCE( - ${CMAKE_SOURCE_DIR}/lib/ic_reg_maps/gen_adf4350_regs.py - ${CMAKE_BINARY_DIR}/lib/ic_reg_maps/adf4350_regs.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen_adf4350_regs.py + ${CMAKE_CURRENT_BINARY_DIR}/adf4350_regs.hpp ) LIBUHD_PYTHON_GEN_SOURCE( - ${CMAKE_SOURCE_DIR}/lib/ic_reg_maps/gen_adf4360_regs.py - ${CMAKE_BINARY_DIR}/lib/ic_reg_maps/adf4360_regs.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen_adf4360_regs.py + ${CMAKE_CURRENT_BINARY_DIR}/adf4360_regs.hpp ) LIBUHD_PYTHON_GEN_SOURCE( - ${CMAKE_SOURCE_DIR}/lib/ic_reg_maps/gen_ad9510_regs.py - ${CMAKE_BINARY_DIR}/lib/ic_reg_maps/ad9510_regs.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen_ad9510_regs.py + ${CMAKE_CURRENT_BINARY_DIR}/ad9510_regs.hpp ) LIBUHD_PYTHON_GEN_SOURCE( - ${CMAKE_SOURCE_DIR}/lib/ic_reg_maps/gen_ad9777_regs.py - ${CMAKE_BINARY_DIR}/lib/ic_reg_maps/ad9777_regs.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen_ad9777_regs.py + ${CMAKE_CURRENT_BINARY_DIR}/ad9777_regs.hpp ) LIBUHD_PYTHON_GEN_SOURCE( - ${CMAKE_SOURCE_DIR}/lib/ic_reg_maps/gen_ad5623_regs.py - ${CMAKE_BINARY_DIR}/lib/ic_reg_maps/ad5623_regs.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen_ad5623_regs.py + ${CMAKE_CURRENT_BINARY_DIR}/ad5623_regs.hpp ) LIBUHD_PYTHON_GEN_SOURCE( - ${CMAKE_SOURCE_DIR}/lib/ic_reg_maps/gen_ad7922_regs.py - ${CMAKE_BINARY_DIR}/lib/ic_reg_maps/ad7922_regs.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen_ad7922_regs.py + ${CMAKE_CURRENT_BINARY_DIR}/ad7922_regs.hpp ) LIBUHD_PYTHON_GEN_SOURCE( - ${CMAKE_SOURCE_DIR}/lib/ic_reg_maps/gen_max2829_regs.py - ${CMAKE_BINARY_DIR}/lib/ic_reg_maps/max2829_regs.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen_max2829_regs.py + ${CMAKE_CURRENT_BINARY_DIR}/max2829_regs.hpp ) LIBUHD_PYTHON_GEN_SOURCE( - ${CMAKE_SOURCE_DIR}/lib/ic_reg_maps/gen_max2118_regs.py - ${CMAKE_BINARY_DIR}/lib/ic_reg_maps/max2118_regs.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen_max2118_regs.py + ${CMAKE_CURRENT_BINARY_DIR}/max2118_regs.hpp ) LIBUHD_PYTHON_GEN_SOURCE( - ${CMAKE_SOURCE_DIR}/lib/ic_reg_maps/gen_max2112_regs.py - ${CMAKE_BINARY_DIR}/lib/ic_reg_maps/max2112_regs.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen_max2112_regs.py + ${CMAKE_CURRENT_BINARY_DIR}/max2112_regs.hpp ) LIBUHD_PYTHON_GEN_SOURCE( - ${CMAKE_SOURCE_DIR}/lib/ic_reg_maps/gen_max2112_regs.py - ${CMAKE_BINARY_DIR}/lib/ic_reg_maps/max2112_regs.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen_max2112_regs.py + ${CMAKE_CURRENT_BINARY_DIR}/max2112_regs.hpp ) LIBUHD_PYTHON_GEN_SOURCE( - ${CMAKE_SOURCE_DIR}/lib/ic_reg_maps/gen_ad9862_regs.py - ${CMAKE_BINARY_DIR}/lib/ic_reg_maps/ad9862_regs.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen_ad9862_regs.py + ${CMAKE_CURRENT_BINARY_DIR}/ad9862_regs.hpp ) LIBUHD_PYTHON_GEN_SOURCE( - ${CMAKE_SOURCE_DIR}/lib/ic_reg_maps/gen_ad9522_regs.py - ${CMAKE_BINARY_DIR}/lib/ic_reg_maps/ad9522_regs.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen_ad9522_regs.py + ${CMAKE_CURRENT_BINARY_DIR}/ad9522_regs.hpp ) LIBUHD_PYTHON_GEN_SOURCE( - ${CMAKE_SOURCE_DIR}/lib/ic_reg_maps/gen_ads62p44_regs.py - ${CMAKE_BINARY_DIR}/lib/ic_reg_maps/ads62p44_regs.hpp - ) + ${CMAKE_CURRENT_SOURCE_DIR}/gen_ads62p44_regs.py + ${CMAKE_CURRENT_BINARY_DIR}/ads62p44_regs.hpp +) LIBUHD_PYTHON_GEN_SOURCE( - ${CMAKE_SOURCE_DIR}/lib/ic_reg_maps/gen_tuner_4937di5_regs.py - ${CMAKE_BINARY_DIR}/lib/ic_reg_maps/tuner_4937di5_regs.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen_tuner_4937di5_regs.py + ${CMAKE_CURRENT_BINARY_DIR}/tuner_4937di5_regs.hpp ) diff --git a/host/lib/transport/CMakeLists.txt b/host/lib/transport/CMakeLists.txt index b5f1fc940..de2f1fdd0 100644 --- a/host/lib/transport/CMakeLists.txt +++ b/host/lib/transport/CMakeLists.txt @@ -15,37 +15,36 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # -#This file will be included by cmake, use absolute paths! +######################################################################## +# This file included, use CMake directory variables +######################################################################## ######################################################################## # Setup libusb ######################################################################## -MESSAGE(STATUS "") -MESSAGE(STATUS "Configuring USB support...") -LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/lib/transport) +LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}) FIND_PACKAGE(USB1 REQUIRED) -IF(LIBUSB_FOUND) +LIBUHD_REGISTER_COMPONENT("USB" ENABLE_USB ON "ENABLE_LIBUHD;LIBUSB_FOUND" OFF) + +IF(ENABLE_USB) MESSAGE(STATUS "USB support enabled via libusb.") INCLUDE_DIRECTORIES(${LIBUSB_INCLUDE_DIR}) LIBUHD_APPEND_LIBS(${LIBUSB_LIBRARIES}) LIBUHD_APPEND_SOURCES( - ${CMAKE_SOURCE_DIR}/lib/transport/libusb1_control.cpp - ${CMAKE_SOURCE_DIR}/lib/transport/libusb1_zero_copy.cpp - ${CMAKE_SOURCE_DIR}/lib/transport/libusb1_base.cpp - ${CMAKE_SOURCE_DIR}/lib/transport/libusb1_base.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/libusb1_control.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/libusb1_zero_copy.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/libusb1_base.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/libusb1_base.hpp ) IF(MSVC) #include our custom stdint for libusb - INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/lib/transport/msvc) + INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/msvc) ENDIF(MSVC) - SET(HAVE_USB_SUPPORT TRUE) -ELSE(LIBUSB_FOUND) - MESSAGE(STATUS "USB support disabled.") +ELSE(ENABLE_USB) LIBUHD_APPEND_SOURCES( - ${CMAKE_SOURCE_DIR}/lib/transport/usb_dummy_impl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/usb_dummy_impl.cpp ) - SET(HAVE_USB_SUPPORT FALSE) -ENDIF(LIBUSB_FOUND) +ENDIF(ENABLE_USB) ######################################################################## # Check for SIMD headers @@ -90,29 +89,29 @@ ENDIF(HAVE_IFADDRS_H) # Append to the list of sources for lib uhd ######################################################################## LIBUHD_PYTHON_GEN_SOURCE( - ${CMAKE_SOURCE_DIR}/lib/transport/gen_vrt_if_packet.py - ${CMAKE_BINARY_DIR}/lib/transport/vrt_if_packet.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen_vrt_if_packet.py + ${CMAKE_CURRENT_BINARY_DIR}/vrt_if_packet.cpp ) LIBUHD_PYTHON_GEN_SOURCE( - ${CMAKE_SOURCE_DIR}/lib/transport/gen_convert_types.py - ${CMAKE_BINARY_DIR}/lib/transport/convert_types.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/gen_convert_types.py + ${CMAKE_CURRENT_BINARY_DIR}/convert_types.cpp ) # append this directory to the include path so the generated convert types # can include the implementation convert types file in the source directory -INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/lib/transport) +INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) # make the generated convert types depend on the implementation header SET_SOURCE_FILES_PROPERTIES( - ${CMAKE_BINARY_DIR}/lib/transport/convert_types.cpp PROPERTIES - OBJECT_DEPENDS ${CMAKE_SOURCE_DIR}/lib/transport/convert_types_impl.hpp + ${CMAKE_CURRENT_BINARY_DIR}/convert_types.cpp PROPERTIES + OBJECT_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/convert_types_impl.hpp ) LIBUHD_APPEND_SOURCES( - ${CMAKE_SOURCE_DIR}/lib/transport/if_addrs.cpp - ${CMAKE_SOURCE_DIR}/lib/transport/udp_simple.cpp - ${CMAKE_SOURCE_DIR}/lib/transport/udp_zero_copy_asio.cpp - ${CMAKE_SOURCE_DIR}/lib/transport/vrt_packet_handler.hpp - ${CMAKE_SOURCE_DIR}/lib/transport/zero_copy.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/if_addrs.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/udp_simple.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/udp_zero_copy_asio.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/vrt_packet_handler.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/zero_copy.cpp ) diff --git a/host/lib/usrp/CMakeLists.txt b/host/lib/usrp/CMakeLists.txt index bd26d29a1..9dc74a5fe 100644 --- a/host/lib/usrp/CMakeLists.txt +++ b/host/lib/usrp/CMakeLists.txt @@ -15,25 +15,26 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # -#This file will be included by cmake, use absolute paths! - +######################################################################## +# This file included, use CMake directory variables +######################################################################## LIBUHD_APPEND_SOURCES( - ${CMAKE_SOURCE_DIR}/lib/usrp/dboard_base.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/dboard_eeprom.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/dboard_id.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/dboard_iface.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/dboard_manager.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/dsp_utils.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/mboard_eeprom.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/misc_utils.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/multi_usrp.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/single_usrp.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/subdev_spec.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/tune_helper.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/wrapper_utils.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/dboard_base.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/dboard_eeprom.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/dboard_id.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/dboard_iface.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/dboard_manager.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/dsp_utils.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/mboard_eeprom.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/misc_utils.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/multi_usrp.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/single_usrp.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/subdev_spec.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/tune_helper.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/wrapper_utils.hpp ) -INCLUDE(${CMAKE_SOURCE_DIR}/lib/usrp/dboard/CMakeLists.txt) -INCLUDE(${CMAKE_SOURCE_DIR}/lib/usrp/usrp1/CMakeLists.txt) -INCLUDE(${CMAKE_SOURCE_DIR}/lib/usrp/usrp2/CMakeLists.txt) -INCLUDE(${CMAKE_SOURCE_DIR}/lib/usrp/usrp_e100/CMakeLists.txt) +INCLUDE_SUBDIRECTORY(dboard) +INCLUDE_SUBDIRECTORY(usrp1) +INCLUDE_SUBDIRECTORY(usrp2) +INCLUDE_SUBDIRECTORY(usrp_e100) diff --git a/host/lib/usrp/dboard/CMakeLists.txt b/host/lib/usrp/dboard/CMakeLists.txt index 79cd42d18..7bd201294 100644 --- a/host/lib/usrp/dboard/CMakeLists.txt +++ b/host/lib/usrp/dboard/CMakeLists.txt @@ -15,16 +15,18 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # -#This file will be included by cmake, use absolute paths! +######################################################################## +# This file included, use CMake directory variables +######################################################################## LIBUHD_APPEND_SOURCES( - ${CMAKE_SOURCE_DIR}/lib/usrp/dboard/db_basic_and_lf.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/dboard/db_rfx.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/dboard/db_xcvr2450.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/dboard/db_wbx.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/dboard/db_dbsrx.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/dboard/db_unknown.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/dboard/db_tvrx.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/dboard/db_dbsrx2.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/db_basic_and_lf.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/db_rfx.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/db_xcvr2450.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/db_wbx.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/db_dbsrx.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/db_unknown.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/db_tvrx.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/db_dbsrx2.cpp ) diff --git a/host/lib/usrp/dboard/db_dbsrx.cpp b/host/lib/usrp/dboard/db_dbsrx.cpp index 7edc1822c..7250136f5 100644 --- a/host/lib/usrp/dboard/db_dbsrx.cpp +++ b/host/lib/usrp/dboard/db_dbsrx.cpp @@ -376,7 +376,7 @@ void dbsrx::set_lo_freq(double target_freq){ read_reg(0x0, 0x0); //allow for setup time before checking condition again - boost::this_thread::sleep(boost::posix_time::milliseconds(1)); + boost::this_thread::sleep(boost::posix_time::milliseconds(10)); } if(dbsrx_debug) std::cerr << boost::format( diff --git a/host/lib/usrp/usrp1/CMakeLists.txt b/host/lib/usrp/usrp1/CMakeLists.txt index 8b6ba78d2..519e17bfa 100644 --- a/host/lib/usrp/usrp1/CMakeLists.txt +++ b/host/lib/usrp/usrp1/CMakeLists.txt @@ -15,37 +15,34 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # -#This file will be included by cmake, use absolute paths! +######################################################################## +# This file included, use CMake directory variables +######################################################################## ######################################################################## # Conditionally configure the USRP1 support ######################################################################## -LIBUHD_REGISTER_COMPONENT("USRP1" ENABLE_USRP1 ${HAVE_USB_SUPPORT}) - -#sanity check when USRP1 support enabled -IF(ENABLE_USRP1 AND NOT HAVE_USB_SUPPORT) - MESSAGE(FATAL_ERROR "USRP1 support enabled without USB support") -ENDIF(ENABLE_USRP1 AND NOT HAVE_USB_SUPPORT) +LIBUHD_REGISTER_COMPONENT("USRP1" ENABLE_USRP1 ON "ENABLE_LIBUHD;ENABLE_USB" OFF) IF(ENABLE_USRP1) INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/../firmware/fx2/common) LIBUHD_APPEND_SOURCES( - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp1/clock_ctrl.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp1/clock_ctrl.hpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp1/codec_ctrl.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp1/codec_ctrl.hpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp1/codec_impl.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp1/dboard_impl.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp1/dboard_iface.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp1/dsp_impl.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp1/io_impl.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp1/mboard_impl.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp1/usrp1_iface.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp1/usrp1_iface.hpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp1/usrp1_impl.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp1/usrp1_impl.hpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp1/usrp1_ctrl.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp1/usrp1_ctrl.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/clock_ctrl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/clock_ctrl.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/codec_ctrl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/codec_ctrl.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/codec_impl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/dboard_impl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/dboard_iface.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/dsp_impl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/io_impl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/mboard_impl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/usrp1_iface.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/usrp1_iface.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/usrp1_impl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/usrp1_impl.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/usrp1_ctrl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/usrp1_ctrl.hpp ) ENDIF(ENABLE_USRP1) diff --git a/host/lib/usrp/usrp1/dsp_impl.cpp b/host/lib/usrp/usrp1/dsp_impl.cpp index e9a5e60a6..370f4831f 100644 --- a/host/lib/usrp/usrp1/dsp_impl.cpp +++ b/host/lib/usrp/usrp1/dsp_impl.cpp @@ -102,7 +102,7 @@ void usrp1_impl::rx_dsp_set(const wax::obj &key_, const wax::obj &val){ ("0", FR_RX_FREQ_0) ("1", FR_RX_FREQ_1) ("2", FR_RX_FREQ_2) ("3", FR_RX_FREQ_3) ; - _iface->poke32(freq_name_to_reg_val[key.name], reg_word); + _iface->poke32(freq_name_to_reg_val[key.name], ~reg_word + 1); _rx_dsp_freqs[key.name] = new_freq; return; } diff --git a/host/lib/usrp/usrp2/CMakeLists.txt b/host/lib/usrp/usrp2/CMakeLists.txt index afd69cae9..d83c82063 100644 --- a/host/lib/usrp/usrp2/CMakeLists.txt +++ b/host/lib/usrp/usrp2/CMakeLists.txt @@ -15,34 +15,34 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # -#This file will be included by cmake, use absolute paths! +######################################################################## +# This file included, use CMake directory variables +######################################################################## ######################################################################## # Conditionally configure the USRP2 support ######################################################################## -LIBUHD_REGISTER_COMPONENT("USRP2" ENABLE_USRP2 TRUE) +LIBUHD_REGISTER_COMPONENT("USRP2" ENABLE_USRP2 ON "ENABLE_LIBUHD" OFF) IF(ENABLE_USRP2) LIBUHD_APPEND_SOURCES( - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp2/clock_ctrl.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp2/clock_ctrl.hpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp2/codec_ctrl.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp2/codec_ctrl.hpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp2/codec_impl.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp2/dboard_impl.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp2/dboard_iface.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp2/dsp_impl.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp2/gps_ctrl.hpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp2/gps_ctrl.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp2/io_impl.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp2/mboard_impl.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp2/serdes_ctrl.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp2/serdes_ctrl.hpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp2/usrp2_iface.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp2/usrp2_iface.hpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp2/usrp2_impl.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp2/usrp2_impl.hpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp2/usrp2_regs.hpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp2/usrp2_regs.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/clock_ctrl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/clock_ctrl.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/codec_ctrl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/codec_ctrl.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/codec_impl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/dboard_impl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/dboard_iface.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/dsp_impl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/gps_ctrl.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/gps_ctrl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/io_impl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/mboard_impl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/usrp2_iface.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/usrp2_iface.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/usrp2_impl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/usrp2_impl.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/usrp2_regs.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/usrp2_regs.cpp ) ENDIF(ENABLE_USRP2) diff --git a/host/lib/usrp/usrp2/clock_ctrl.cpp b/host/lib/usrp/usrp2/clock_ctrl.cpp index 428d5539b..27ccefb2b 100644 --- a/host/lib/usrp/usrp2/clock_ctrl.cpp +++ b/host/lib/usrp/usrp2/clock_ctrl.cpp @@ -22,10 +22,13 @@ #include <uhd/utils/assert.hpp> #include <boost/cstdint.hpp> #include <boost/lexical_cast.hpp> +#include <boost/math/special_functions/round.hpp> #include <iostream> using namespace uhd; +static const bool enb_test_clk = false; + /*! * A usrp2 clock control specific to the ad9510 ic. */ @@ -66,13 +69,12 @@ public: this->enable_external_ref(false); this->enable_rx_dboard_clock(false); this->enable_tx_dboard_clock(false); + this->enable_mimo_clock_out(false); /* private clock enables, must be set here */ this->enable_dac_clock(true); this->enable_adc_clock(true); - - /* always driving the mimo reference */ - this->enable_mimo_clock_out(true); + this->enable_test_clock(enb_test_clk); } ~usrp2_clock_ctrl_impl(void){ @@ -83,6 +85,7 @@ public: this->enable_dac_clock(false); this->enable_adc_clock(false); this->enable_mimo_clock_out(false); + this->enable_test_clock(false); } void enable_mimo_clock_out(bool enb){ @@ -246,6 +249,54 @@ public: double get_master_clock_rate(void){ return 100e6; } + + void set_mimo_clock_delay(double delay) { + //delay_val is a 5-bit value (0-31) for fine control + //the equations below determine delay for a given ramp current, # of caps and fine delay register + //delay range: + //range_ns = 200*((caps+3)/i_ramp_ua)*1.3286 + //offset (zero delay): + //offset_ns = 0.34 + (1600 - i_ramp_ua)*1e-4 + ((caps-1)/ramp)*6 + //delay_ns = offset_ns + range_ns * delay / 31 + + int delay_val = boost::math::iround(delay/9.744e-9*31); + + if(delay_val == 0) { + switch(clk_regs.exp) { + case 5: + _ad9510_regs.delay_control_out5 = 1; + break; + case 6: + _ad9510_regs.delay_control_out6 = 1; + break; + default: + break; //delay not supported on U2 rev 3 + } + } else { + switch(clk_regs.exp) { + case 5: + _ad9510_regs.delay_control_out5 = 0; + _ad9510_regs.ramp_current_out5 = ad9510_regs_t::RAMP_CURRENT_OUT5_200UA; + _ad9510_regs.ramp_capacitor_out5 = ad9510_regs_t::RAMP_CAPACITOR_OUT5_4CAPS; + _ad9510_regs.delay_fine_adjust_out5 = delay_val; + this->write_reg(0x34); + this->write_reg(0x35); + this->write_reg(0x36); + break; + case 6: + _ad9510_regs.delay_control_out6 = 0; + _ad9510_regs.ramp_current_out6 = ad9510_regs_t::RAMP_CURRENT_OUT6_200UA; + _ad9510_regs.ramp_capacitor_out6 = ad9510_regs_t::RAMP_CAPACITOR_OUT6_4CAPS; + _ad9510_regs.delay_fine_adjust_out6 = delay_val; + this->write_reg(0x38); + this->write_reg(0x39); + this->write_reg(0x3A); + break; + default: + break; + } + } + } private: /*! diff --git a/host/lib/usrp/usrp2/clock_ctrl.hpp b/host/lib/usrp/usrp2/clock_ctrl.hpp index db6c52c83..9ccbc959e 100644 --- a/host/lib/usrp/usrp2/clock_ctrl.hpp +++ b/host/lib/usrp/usrp2/clock_ctrl.hpp @@ -91,8 +91,18 @@ public: virtual void enable_test_clock(bool enb) = 0; /*! - * TODO other clock control api here.... + * Enable/disable the ref clock output over the serdes cable. + * \param enb true to enable + */ + virtual void enable_mimo_clock_out(bool enb) = 0; + + /*! + * Set the output delay of the mimo clock + * Used to synchronise daisy-chained USRPs over the MIMO cable + * Can also be used to adjust delay for uneven reference cable lengths + * \param delay the clock delay in seconds */ + virtual void set_mimo_clock_delay(double delay) = 0; }; diff --git a/host/lib/usrp/usrp2/fw_common.h b/host/lib/usrp/usrp2/fw_common.h index 29c2a8484..ee7fc3882 100644 --- a/host/lib/usrp/usrp2/fw_common.h +++ b/host/lib/usrp/usrp2/fw_common.h @@ -33,8 +33,8 @@ extern "C" { #endif //fpga and firmware compatibility numbers -#define USRP2_FPGA_COMPAT_NUM 3 -#define USRP2_FW_COMPAT_NUM 7 +#define USRP2_FPGA_COMPAT_NUM 4 +#define USRP2_FW_COMPAT_NUM 8 //used to differentiate control packets over data port #define USRP2_INVALID_VRT_HEADER 0 diff --git a/host/lib/usrp/usrp2/mboard_impl.cpp b/host/lib/usrp/usrp2/mboard_impl.cpp index 9afa6eda7..72d1c9d03 100644 --- a/host/lib/usrp/usrp2/mboard_impl.cpp +++ b/host/lib/usrp/usrp2/mboard_impl.cpp @@ -27,6 +27,10 @@ #include <iostream> #include <boost/date_time/posix_time/posix_time.hpp> +static const double mimo_clock_delay_usrp2_rev4 = 4.18e-9; +static const double mimo_clock_delay_usrp_n2xx = 0; //TODO +static const int mimo_clock_sync_delay_cycles = 134; + using namespace uhd; using namespace uhd::usrp; using namespace boost::posix_time; @@ -122,6 +126,20 @@ usrp2_mboard_impl::usrp2_mboard_impl( init_duc_config(); //initialize the clock configuration + if (device_args.has_key("mimo_mode")){ + if (device_args["mimo_mode"] == "master"){ + _mimo_clocking_mode_is_master = true; + } + else if (device_args["mimo_mode"] == "slave"){ + _mimo_clocking_mode_is_master = false; + } + else throw std::runtime_error( + "mimo_mode must be set to master or slave" + ); + } + else { + _mimo_clocking_mode_is_master = bool(_iface->peek32(_iface->regs.status) & (1 << 8)); + } init_clock_config(); //init the codec before the dboard @@ -196,6 +214,36 @@ void usrp2_mboard_impl::update_clock_config(void){ case usrp2_iface::USRP_NXXX: break; } + + //Handle the serdes clocking based on master/slave mode: + // - Masters always drive the clock over serdes. + // - Slaves always lock to this serdes clock. + // - Slaves lock their time over the serdes. + if (_mimo_clocking_mode_is_master){ + _clock_ctrl->enable_mimo_clock_out(true); + switch(_iface->get_rev()){ + case usrp2_iface::USRP_N200: + case usrp2_iface::USRP_N210: + _clock_ctrl->set_mimo_clock_delay(mimo_clock_delay_usrp_n2xx); + break; + + case usrp2_iface::USRP2_REV4: + _clock_ctrl->set_mimo_clock_delay(mimo_clock_delay_usrp2_rev4); + break; + + default: break; //not handled + } + _iface->poke32(_iface->regs.time64_mimo_sync, 0); + } + else{ + _iface->poke32(_iface->regs.misc_ctrl_clock, 0x15); + _clock_ctrl->enable_external_ref(true); + _clock_ctrl->enable_mimo_clock_out(false); + _iface->poke32(_iface->regs.time64_mimo_sync, + (1 << 8) | (mimo_clock_sync_delay_cycles & 0xff) + ); + } + } void usrp2_mboard_impl::set_time_spec(const time_spec_t &time_spec, bool now){ diff --git a/host/lib/usrp/usrp2/serdes_ctrl.cpp b/host/lib/usrp/usrp2/serdes_ctrl.cpp deleted file mode 100644 index 1cda22f45..000000000 --- a/host/lib/usrp/usrp2/serdes_ctrl.cpp +++ /dev/null @@ -1,46 +0,0 @@ -// -// Copyright 2010 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 -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see <http://www.gnu.org/licenses/>. -// - -#include "serdes_ctrl.hpp" -#include "usrp2_regs.hpp" - -using namespace uhd; - -/*! - * A usrp2 serdes control implementation - */ -class usrp2_serdes_ctrl_impl : public usrp2_serdes_ctrl{ -public: - usrp2_serdes_ctrl_impl(usrp2_iface::sptr iface){ - _iface = iface; - _iface->poke32(_iface->regs.misc_ctrl_serdes, U2_FLAG_MISC_CTRL_SERDES_ENABLE | U2_FLAG_MISC_CTRL_SERDES_RXEN); - } - - ~usrp2_serdes_ctrl_impl(void){ - _iface->poke32(_iface->regs.misc_ctrl_serdes, 0); //power-down - } - -private: - usrp2_iface::sptr _iface; -}; - -/*********************************************************************** - * Public make function for the usrp2 serdes control - **********************************************************************/ -usrp2_serdes_ctrl::sptr usrp2_serdes_ctrl::make(usrp2_iface::sptr iface){ - return sptr(new usrp2_serdes_ctrl_impl(iface)); -} diff --git a/host/lib/usrp/usrp2/serdes_ctrl.hpp b/host/lib/usrp/usrp2/serdes_ctrl.hpp deleted file mode 100644 index 3c909c531..000000000 --- a/host/lib/usrp/usrp2/serdes_ctrl.hpp +++ /dev/null @@ -1,40 +0,0 @@ -// -// Copyright 2010 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 -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see <http://www.gnu.org/licenses/>. -// - -#ifndef INCLUDED_SERDES_CTRL_HPP -#define INCLUDED_SERDES_CTRL_HPP - -#include "usrp2_iface.hpp" -#include <boost/shared_ptr.hpp> -#include <boost/utility.hpp> - -class usrp2_serdes_ctrl : boost::noncopyable{ -public: - typedef boost::shared_ptr<usrp2_serdes_ctrl> sptr; - - /*! - * Make a serdes control object for the usrp2 serdes port. - * \param _iface a pointer to the usrp2 interface object - * \return a new serdes control object - */ - static sptr make(usrp2_iface::sptr iface); - - //TODO fill me in with virtual methods - -}; - -#endif /* INCLUDED_SERDES_CTRL_HPP */ diff --git a/host/lib/usrp/usrp2/usrp2_impl.hpp b/host/lib/usrp/usrp2/usrp2_impl.hpp index be97e1121..9cd27ee41 100644 --- a/host/lib/usrp/usrp2/usrp2_impl.hpp +++ b/host/lib/usrp/usrp2/usrp2_impl.hpp @@ -100,6 +100,7 @@ public: private: size_t _index; bool _continuous_streaming; + bool _mimo_clocking_mode_is_master; //interfaces usrp2_iface::sptr _iface; diff --git a/host/lib/usrp/usrp2/usrp2_regs.cpp b/host/lib/usrp/usrp2/usrp2_regs.cpp index dd0433816..82ad30f08 100644 --- a/host/lib/usrp/usrp2/usrp2_regs.cpp +++ b/host/lib/usrp/usrp2/usrp2_regs.cpp @@ -57,6 +57,8 @@ usrp2_regs_t usrp2_get_regs(bool use_n2xx_map) { x.time64_flags = sr_addr(misc_output_base, x.sr_time64 + 2); x.time64_imm = sr_addr(misc_output_base, x.sr_time64 + 3); x.time64_tps = sr_addr(misc_output_base, x.sr_time64 + 4); + x.time64_mimo_sync = sr_addr(misc_output_base, x.sr_time64 + 5); + x.status = bp_base + 4*8; x.time64_secs_rb = bp_base + 4*10; x.time64_ticks_rb = bp_base + 4*11; x.compat_num_rb = bp_base + 4*12; diff --git a/host/lib/usrp/usrp2/usrp2_regs.hpp b/host/lib/usrp/usrp2/usrp2_regs.hpp index 9936d634a..56e64029e 100644 --- a/host/lib/usrp/usrp2/usrp2_regs.hpp +++ b/host/lib/usrp/usrp2/usrp2_regs.hpp @@ -25,10 +25,10 @@ #define USRP2_ATR_BASE 0xE400 #define USRP2_BP_STATUS_BASE 0xCC00 -#define USRP2P_MISC_OUTPUT_BASE 0x2000 -#define USRP2P_GPIO_BASE 0x3200 -#define USRP2P_ATR_BASE 0x3800 -#define USRP2P_BP_STATUS_BASE 0x3300 +#define USRP2P_MISC_OUTPUT_BASE 0x5000 +#define USRP2P_GPIO_BASE 0x6200 +#define USRP2P_ATR_BASE 0x6800 +#define USRP2P_BP_STATUS_BASE 0x6300 typedef struct { int sr_misc; @@ -57,6 +57,8 @@ typedef struct { int time64_flags; // flags -- see chart below int time64_imm; // set immediate (0=latch on next pps, 1=latch immediate, default=0) int time64_tps; // ticks per second rollover count + int time64_mimo_sync; + int status; int time64_secs_rb; int time64_ticks_rb; int compat_num_rb; diff --git a/host/lib/usrp/usrp_e100/CMakeLists.txt b/host/lib/usrp/usrp_e100/CMakeLists.txt index 3c5c58ee0..5d8a9791d 100644 --- a/host/lib/usrp/usrp_e100/CMakeLists.txt +++ b/host/lib/usrp/usrp_e100/CMakeLists.txt @@ -15,33 +15,35 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # -#This file will be included by cmake, use absolute paths! +######################################################################## +# This file included, use CMake directory variables +######################################################################## ######################################################################## # Conditionally configure the USRP-E100 support ######################################################################## -LIBUHD_REGISTER_COMPONENT("USRP-E100" ENABLE_USRP_E100 FALSE) +LIBUHD_REGISTER_COMPONENT("USRP-E100" ENABLE_USRP_E100 OFF "ENABLE_LIBUHD" ON) IF(ENABLE_USRP_E100) - INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/lib/usrp/usrp_e100/include) + INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include) LIBUHD_APPEND_SOURCES( - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp_e100/clock_ctrl.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp_e100/clock_ctrl.hpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp_e100/codec_ctrl.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp_e100/codec_ctrl.hpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp_e100/codec_impl.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp_e100/dboard_impl.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp_e100/dboard_iface.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp_e100/dsp_impl.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp_e100/fpga-downloader.cc - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp_e100/io_impl.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp_e100/mboard_impl.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp_e100/usrp_e100_impl.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp_e100/usrp_e100_impl.hpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp_e100/usrp_e100_iface.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp_e100/usrp_e100_iface.hpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp_e100/usrp_e100_mmap_zero_copy.cpp - ${CMAKE_SOURCE_DIR}/lib/usrp/usrp_e100/usrp_e100_regs.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/clock_ctrl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/clock_ctrl.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/codec_ctrl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/codec_ctrl.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/codec_impl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/dboard_impl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/dboard_iface.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/dsp_impl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/fpga-downloader.cc + ${CMAKE_CURRENT_SOURCE_DIR}/io_impl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/mboard_impl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/usrp_e100_impl.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/usrp_e100_impl.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/usrp_e100_iface.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/usrp_e100_iface.hpp + ${CMAKE_CURRENT_SOURCE_DIR}/usrp_e100_mmap_zero_copy.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/usrp_e100_regs.hpp ) ENDIF(ENABLE_USRP_E100) diff --git a/host/lib/utils/CMakeLists.txt b/host/lib/utils/CMakeLists.txt index aecd3a4b0..60df24eef 100644 --- a/host/lib/utils/CMakeLists.txt +++ b/host/lib/utils/CMakeLists.txt @@ -15,7 +15,9 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # -#This file will be included by cmake, use absolute paths! +######################################################################## +# This file included, use CMake directory variables +######################################################################## ######################################################################## # Setup defines for process scheduling @@ -79,12 +81,12 @@ ENDIF(HAVE_DLFCN_H) # Append sources ######################################################################## LIBUHD_APPEND_SOURCES( - ${CMAKE_SOURCE_DIR}/lib/utils/assert.cpp - ${CMAKE_SOURCE_DIR}/lib/utils/gain_group.cpp - ${CMAKE_SOURCE_DIR}/lib/utils/images.cpp - ${CMAKE_SOURCE_DIR}/lib/utils/load_modules.cpp - ${CMAKE_SOURCE_DIR}/lib/utils/paths.cpp - ${CMAKE_SOURCE_DIR}/lib/utils/props.cpp - ${CMAKE_SOURCE_DIR}/lib/utils/thread_priority.cpp - ${CMAKE_SOURCE_DIR}/lib/utils/warning.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/assert.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/gain_group.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/images.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/load_modules.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/paths.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/props.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/thread_priority.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/warning.cpp ) |