aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/cores
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2018-01-31 20:20:14 +0100
committerMartin Braun <martin.braun@ettus.com>2018-03-14 15:17:44 -0700
commit6652eb4a033b38bd952563f3544eb11e98f27327 (patch)
treec1b0af72cbaceaa1df462f18194f4063fb13ae17 /host/lib/usrp/cores
parent86b95486ed6d68e2772d79f20feddbef5439981b (diff)
downloaduhd-6652eb4a033b38bd952563f3544eb11e98f27327.tar.gz
uhd-6652eb4a033b38bd952563f3544eb11e98f27327.tar.bz2
uhd-6652eb4a033b38bd952563f3544eb11e98f27327.zip
uhd: Move internal headers to uhdlib/
To avoid the proliferation of additional include directories and multiple ways of including project-local headers, we now default to moving all headers that are used across UHD into the uhdlib/ subdirectory. Some #include statements were also reordered as they were modified for closer compliance with the coding guidelines. Internal cpp source files should now include files like this: #include <uhdlib/rfnoc/ctrl_iface.hpp> Reviewed-by: Ashish Chaudhari <ashish.chaudhari@ettus.com>
Diffstat (limited to 'host/lib/usrp/cores')
-rw-r--r--host/lib/usrp/cores/CMakeLists.txt3
-rw-r--r--host/lib/usrp/cores/dma_fifo_core_3000.cpp5
-rw-r--r--host/lib/usrp/cores/dma_fifo_core_3000.hpp76
-rw-r--r--host/lib/usrp/cores/dsp_core_utils.cpp2
-rw-r--r--host/lib/usrp/cores/dsp_core_utils.hpp23
-rw-r--r--host/lib/usrp/cores/gpio_atr_3000.cpp2
-rw-r--r--host/lib/usrp/cores/gpio_atr_3000.hpp178
-rw-r--r--host/lib/usrp/cores/gpio_core_200.cpp2
-rw-r--r--host/lib/usrp/cores/gpio_core_200.hpp77
-rw-r--r--host/lib/usrp/cores/i2c_core_100_wb32.cpp2
-rw-r--r--host/lib/usrp/cores/i2c_core_100_wb32.hpp29
-rw-r--r--host/lib/usrp/cores/i2c_core_200.cpp2
-rw-r--r--host/lib/usrp/cores/i2c_core_200.hpp27
-rw-r--r--host/lib/usrp/cores/radio_ctrl_core_3000.cpp4
-rw-r--r--host/lib/usrp/cores/radio_ctrl_core_3000.hpp54
-rw-r--r--host/lib/usrp/cores/rx_dsp_core_200.cpp4
-rw-r--r--host/lib/usrp/cores/rx_dsp_core_200.hpp59
-rw-r--r--host/lib/usrp/cores/rx_dsp_core_3000.cpp4
-rw-r--r--host/lib/usrp/cores/rx_dsp_core_3000.hpp58
-rw-r--r--host/lib/usrp/cores/rx_frontend_core_200.cpp2
-rw-r--r--host/lib/usrp/cores/rx_frontend_core_200.hpp43
-rw-r--r--host/lib/usrp/cores/rx_frontend_core_3000.cpp6
-rw-r--r--host/lib/usrp/cores/rx_frontend_core_3000.hpp59
-rw-r--r--host/lib/usrp/cores/rx_vita_core_3000.cpp2
-rw-r--r--host/lib/usrp/cores/rx_vita_core_3000.hpp51
-rw-r--r--host/lib/usrp/cores/spi_core_3000.cpp2
-rw-r--r--host/lib/usrp/cores/spi_core_3000.hpp38
-rw-r--r--host/lib/usrp/cores/time64_core_200.cpp2
-rw-r--r--host/lib/usrp/cores/time64_core_200.hpp55
-rw-r--r--host/lib/usrp/cores/time_core_3000.cpp2
-rw-r--r--host/lib/usrp/cores/time_core_3000.hpp52
-rw-r--r--host/lib/usrp/cores/tx_dsp_core_200.cpp4
-rw-r--r--host/lib/usrp/cores/tx_dsp_core_200.hpp51
-rw-r--r--host/lib/usrp/cores/tx_dsp_core_3000.cpp4
-rw-r--r--host/lib/usrp/cores/tx_dsp_core_3000.hpp52
-rw-r--r--host/lib/usrp/cores/tx_frontend_core_200.cpp2
-rw-r--r--host/lib/usrp/cores/tx_frontend_core_200.hpp40
-rw-r--r--host/lib/usrp/cores/tx_vita_core_3000.cpp2
-rw-r--r--host/lib/usrp/cores/tx_vita_core_3000.hpp51
-rw-r--r--host/lib/usrp/cores/user_settings_core_200.cpp2
-rw-r--r--host/lib/usrp/cores/user_settings_core_200.hpp28
-rw-r--r--host/lib/usrp/cores/user_settings_core_3000.cpp2
-rw-r--r--host/lib/usrp/cores/user_settings_core_3000.hpp25
43 files changed, 30 insertions, 1158 deletions
diff --git a/host/lib/usrp/cores/CMakeLists.txt b/host/lib/usrp/cores/CMakeLists.txt
index 713c78a30..95102f29d 100644
--- a/host/lib/usrp/cores/CMakeLists.txt
+++ b/host/lib/usrp/cores/CMakeLists.txt
@@ -9,8 +9,6 @@
# This file included, use CMake directory variables
########################################################################
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
-
IF(ENABLE_B100 OR ENABLE_USRP2)
LIBUHD_APPEND_SOURCES(
${CMAKE_CURRENT_SOURCE_DIR}/gpio_core_200.cpp
@@ -22,7 +20,6 @@ IF(ENABLE_B100 OR ENABLE_USRP2)
)
ENDIF(ENABLE_B100 OR ENABLE_USRP2)
-
LIBUHD_APPEND_SOURCES(
${CMAKE_CURRENT_SOURCE_DIR}/dma_fifo_core_3000.cpp
${CMAKE_CURRENT_SOURCE_DIR}/dsp_core_utils.cpp
diff --git a/host/lib/usrp/cores/dma_fifo_core_3000.cpp b/host/lib/usrp/cores/dma_fifo_core_3000.cpp
index d2d190af1..618f81f64 100644
--- a/host/lib/usrp/cores/dma_fifo_core_3000.cpp
+++ b/host/lib/usrp/cores/dma_fifo_core_3000.cpp
@@ -5,12 +5,13 @@
// SPDX-License-Identifier: GPL-3.0-or-later
//
-#include "dma_fifo_core_3000.hpp"
#include <uhd/exception.hpp>
-#include <boost/thread/thread.hpp> //sleep
#include <uhd/utils/soft_register.hpp>
#include <uhd/utils/log.hpp>
+#include <uhdlib/usrp/cores/dma_fifo_core_3000.hpp>
#include <boost/format.hpp>
+#include <boost/thread/thread.hpp> //sleep
+
using namespace uhd;
#define SR_DRAM_BIST_BASE 16
diff --git a/host/lib/usrp/cores/dma_fifo_core_3000.hpp b/host/lib/usrp/cores/dma_fifo_core_3000.hpp
deleted file mode 100644
index db665a6c9..000000000
--- a/host/lib/usrp/cores/dma_fifo_core_3000.hpp
+++ /dev/null
@@ -1,76 +0,0 @@
-//
-// Copyright 2015 Ettus Research LLC
-// Copyright 2018 Ettus Research, a National Instruments Company
-//
-// SPDX-License-Identifier: GPL-3.0-or-later
-//
-
-#ifndef INCLUDED_LIBUHD_USRP_DMA_FIFO_CORE_3000_HPP
-#define INCLUDED_LIBUHD_USRP_DMA_FIFO_CORE_3000_HPP
-
-#include <uhd/config.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/noncopyable.hpp>
-#include <uhd/types/wb_iface.hpp>
-
-
-class dma_fifo_core_3000 : boost::noncopyable
-{
-public:
- typedef boost::shared_ptr<dma_fifo_core_3000> sptr;
- virtual ~dma_fifo_core_3000(void) = 0;
-
- /*!
- * Create a DMA FIFO controller using the given bus, settings and readback base
- * Throws uhd::runtime_error if a DMA FIFO is not instantiated in the FPGA
- */
- static sptr make(uhd::wb_iface::sptr iface, const size_t set_base, const size_t rb_addr);
-
- /*!
- * Check if a DMA FIFO is instantiated in the FPGA
- */
- static bool check(uhd::wb_iface::sptr iface, const size_t set_base, const size_t rb_addr);
-
- /*!
- * Flush the DMA FIFO. Will clear all contents.
- */
- virtual void flush() = 0;
-
- /*!
- * Resize and rebase the DMA FIFO. Will clear all contents.
- */
- virtual void resize(const uint32_t base_addr, const uint32_t size) = 0;
-
- /*!
- * Get the (approx) number of bytes currently in the DMA FIFO
- */
- virtual uint32_t get_bytes_occupied() = 0;
-
- /*!
- * Run the built-in-self-test routine for the DMA FIFO
- */
- virtual uint8_t run_bist(bool finite = true, uint32_t timeout_ms = 500) = 0;
-
- /*!
- * Is extended BIST supported
- */
- virtual bool ext_bist_supported() = 0;
-
- /*!
- * Run the built-in-self-test routine for the DMA FIFO (extended BIST only)
- */
- virtual uint8_t run_ext_bist(
- bool finite,
- uint32_t rx_samp_delay,
- uint32_t tx_pkt_delay,
- uint32_t sid,
- uint32_t timeout_ms = 500) = 0;
-
- /*!
- * Get the throughput measured from the last invocation of the BIST (extended BIST only)
- */
- virtual double get_bist_throughput() = 0;
-
-};
-
-#endif /* INCLUDED_LIBUHD_USRP_DMA_FIFO_CORE_3000_HPP */
diff --git a/host/lib/usrp/cores/dsp_core_utils.cpp b/host/lib/usrp/cores/dsp_core_utils.cpp
index a37fea3bc..282073597 100644
--- a/host/lib/usrp/cores/dsp_core_utils.cpp
+++ b/host/lib/usrp/cores/dsp_core_utils.cpp
@@ -5,9 +5,9 @@
// SPDX-License-Identifier: GPL-3.0-or-later
//
-#include "dsp_core_utils.hpp"
#include <uhd/utils/math.hpp>
#include <uhd/exception.hpp>
+#include <uhdlib/usrp/cores/dsp_core_utils.hpp>
#include <boost/math/special_functions/round.hpp>
#include <boost/math/special_functions/sign.hpp>
diff --git a/host/lib/usrp/cores/dsp_core_utils.hpp b/host/lib/usrp/cores/dsp_core_utils.hpp
deleted file mode 100644
index 739b973cb..000000000
--- a/host/lib/usrp/cores/dsp_core_utils.hpp
+++ /dev/null
@@ -1,23 +0,0 @@
-//
-// Copyright 2016 Ettus Research LLC
-// Copyright 2018 Ettus Research, a National Instruments Company
-//
-// SPDX-License-Identifier: GPL-3.0-or-later
-//
-
-#ifndef INCLUDED_LIBUHD_DSP_CORE_UTILS_HPP
-#define INCLUDED_LIBUHD_DSP_CORE_UTILS_HPP
-
-#include <stdint.h>
-
-/*! For a requested frequency and sampling rate, return the
- * correct frequency word (to set the CORDIC) and the actual frequency.
- */
-void get_freq_and_freq_word(
- const double requested_freq,
- const double tick_rate,
- double &actual_freq,
- int32_t &freq_word
-);
-
-#endif /* INCLUDED_LIBUHD_DSP_CORE_UTILS_HPP */
diff --git a/host/lib/usrp/cores/gpio_atr_3000.cpp b/host/lib/usrp/cores/gpio_atr_3000.cpp
index 6e5df02ed..1cfbacfab 100644
--- a/host/lib/usrp/cores/gpio_atr_3000.cpp
+++ b/host/lib/usrp/cores/gpio_atr_3000.cpp
@@ -5,9 +5,9 @@
// SPDX-License-Identifier: GPL-3.0-or-later
//
-#include "gpio_atr_3000.hpp"
#include <uhd/types/dict.hpp>
#include <uhd/utils/soft_register.hpp>
+#include <uhdlib/usrp/cores/gpio_atr_3000.hpp>
using namespace uhd;
using namespace usrp;
diff --git a/host/lib/usrp/cores/gpio_atr_3000.hpp b/host/lib/usrp/cores/gpio_atr_3000.hpp
deleted file mode 100644
index 30c7d6fb7..000000000
--- a/host/lib/usrp/cores/gpio_atr_3000.hpp
+++ /dev/null
@@ -1,178 +0,0 @@
-//
-// Copyright 2011,2014,2015 Ettus Research LLC
-// Copyright 2018 Ettus Research, a National Instruments Company
-//
-// SPDX-License-Identifier: GPL-3.0-or-later
-//
-
-#ifndef INCLUDED_LIBUHD_USRP_GPIO_CORE_3000_HPP
-#define INCLUDED_LIBUHD_USRP_GPIO_CORE_3000_HPP
-
-#include <uhd/config.hpp>
-#include <uhd/usrp/dboard_iface.hpp>
-#include <uhd/usrp/gpio_defs.hpp>
-#include <uhdlib/usrp/gpio_defs.hpp>
-#include <uhd/types/wb_iface.hpp>
-#include <boost/shared_ptr.hpp>
-
-namespace uhd { namespace usrp { namespace gpio_atr {
-
-class gpio_atr_3000 : boost::noncopyable {
-public:
- typedef boost::shared_ptr<gpio_atr_3000> sptr;
-
- static const uint32_t MASK_SET_ALL = 0xFFFFFFFF;
-
- virtual ~gpio_atr_3000(void) {};
-
- /*!
- * Create a read-write GPIO ATR interface object
- *
- * \param iface register iface to GPIO ATR registers
- * \param base base settings offset for GPIO ATR registers
- * \param rb_addr readback offset for GPIO ATR registers
- */
- static sptr make(
- uhd::wb_iface::sptr iface,
- const uhd::wb_iface::wb_addr_type base,
- const uhd::wb_iface::wb_addr_type rb_addr);
-
- /*!
- * Create a write-only GPIO ATR interface object
- *
- * \param iface register iface to GPIO ATR registers
- * \param base base settings offset for GPIO ATR registers
- */
- static sptr make_write_only(
- uhd::wb_iface::sptr iface, const uhd::wb_iface::wb_addr_type base);
-
- /*!
- * Select the ATR mode for all bits in the mask
- *
- * \param mode the mode to apply {ATR = outputs driven by ATR state machine, GPIO = outputs static}
- * \param mask apply the mode to all non-zero bits in the mask
- */
- virtual void set_atr_mode(const gpio_atr_mode_t mode, const uint32_t mask) = 0;
-
- /*!
- * Select the data direction for all bits in the mask
- *
- * \param dir the direction {OUTPUT, INPUT}
- * \param mask apply the mode to all non-zero bits in the mask
- */
- virtual void set_gpio_ddr(const gpio_ddr_t dir, const uint32_t mask) = 0;
-
- /*!
- * Write the specified (masked) value to the ATR register
- *
- * \param atr the type of ATR register to write to {IDLE, RX, TX, FDX}
- * \param value the value to write
- * \param mask only writes to the bits where mask is non-zero
- */
- virtual void set_atr_reg(const gpio_atr_reg_t atr, const uint32_t value, const uint32_t mask = MASK_SET_ALL) = 0;
-
- /*!
- * Write to a static GPIO output
- *
- * \param value the value to write
- * \param mask only writes to the bits where mask is non-zero
- */
- virtual void set_gpio_out(const uint32_t value, const uint32_t mask = MASK_SET_ALL) = 0;
-
- /*!
- * Read the state of the GPIO pins
- * If a pin is configured as an input, reads the actual value of the pin
- * If a pin is configured as an output, reads the last value written to the pin
- *
- * \return the value read back
- */
- virtual uint32_t read_gpio() = 0;
-
- /*!
- * Set a GPIO attribute
- *
- * \param attr the attribute to set
- * \param value the value to write to the attribute
- */
- virtual void set_gpio_attr(const gpio_attr_t attr, const uint32_t value) = 0;
-};
-
-class db_gpio_atr_3000 {
-public:
- typedef boost::shared_ptr<db_gpio_atr_3000> sptr;
-
- typedef uhd::usrp::dboard_iface::unit_t db_unit_t;
-
- virtual ~db_gpio_atr_3000(void) {};
-
- /*!
- * Create a read-write GPIO ATR interface object for a daughterboard connector
- *
- * \param iface register iface to GPIO ATR registers
- * \param base base settings offset for GPIO ATR registers
- * \param rb_addr readback offset for GPIO ATR registers
- */
- static sptr make(
- uhd::wb_iface::sptr iface,
- const uhd::wb_iface::wb_addr_type base,
- const uhd::wb_iface::wb_addr_type rb_addr);
-
- /*!
- * Configure the GPIO mode for all pins in the daughterboard connector
- *
- * \param unit the side of the daughterboard interface to configure (TX or RX)
- * \param value if value[i] is 1, the i'th bit is in ATR mode otherwise it is in GPIO mode
- * \param mask mask
- */
- virtual void set_pin_ctrl(const db_unit_t unit, const uint32_t value, const uint32_t mask) = 0;
-
- virtual uint32_t get_pin_ctrl(const db_unit_t unit) = 0;
-
- /*!
- * Configure the direction for all pins in the daughterboard connector
- *
- * \param unit the side of the daughterboard interface to configure (TX or RX)
- * \param value if value[i] is 1, the i'th bit is an output otherwise it is an input
- * \param mask mask
- */
- virtual void set_gpio_ddr(const db_unit_t unit, const uint32_t value, const uint32_t mask) = 0;
-
- virtual uint32_t get_gpio_ddr(const db_unit_t unit) = 0;
-
- /*!
- * Write the specified value to the ATR register (all bits)
- *
- * \param unit the side of the daughterboard interface to configure (TX or RX)
- * \param atr the type of ATR register to write to {IDLE, RX, TX, FDX}
- * \param value the value to write
- * \param mask mask
- */
- virtual void set_atr_reg(const db_unit_t unit, const gpio_atr_reg_t atr, const uint32_t value, const uint32_t mask) = 0;
-
- virtual uint32_t get_atr_reg(const db_unit_t unit, const gpio_atr_reg_t atr) = 0;
-
- /*!
- * Write the specified value to the GPIO register (all bits)
- *
- * \param unit the side of the daughterboard interface to configure (TX or RX)
- * \param value the value to write
- * \param mask mask
- */
- virtual void set_gpio_out(const db_unit_t unit, const uint32_t value, const uint32_t mask) = 0;
-
- virtual uint32_t get_gpio_out(const db_unit_t unit) = 0;
-
- /*!
- * Read the state of the GPIO pins
- * If a pin is configured as an input, reads the actual value of the pin
- * If a pin is configured as an output, reads the last value written to the pin
- *
- * \param unit the side of the daughterboard interface to configure (TX or RX)
- * \return the value read back
- */
- virtual uint32_t read_gpio(const db_unit_t unit) = 0;
-};
-
-}}} //namespaces
-
-#endif /* INCLUDED_LIBUHD_USRP_GPIO_CORE_3000_HPP */
diff --git a/host/lib/usrp/cores/gpio_core_200.cpp b/host/lib/usrp/cores/gpio_core_200.cpp
index 3cd3574e1..7df8e3c19 100644
--- a/host/lib/usrp/cores/gpio_core_200.cpp
+++ b/host/lib/usrp/cores/gpio_core_200.cpp
@@ -5,8 +5,8 @@
// SPDX-License-Identifier: GPL-3.0-or-later
//
-#include "gpio_core_200.hpp"
#include <uhd/types/dict.hpp>
+#include <uhdlib/usrp/cores/gpio_core_200.hpp>
#define REG_GPIO_IDLE _base + 0
#define REG_GPIO_RX_ONLY _base + 4
diff --git a/host/lib/usrp/cores/gpio_core_200.hpp b/host/lib/usrp/cores/gpio_core_200.hpp
deleted file mode 100644
index d5dff890e..000000000
--- a/host/lib/usrp/cores/gpio_core_200.hpp
+++ /dev/null
@@ -1,77 +0,0 @@
-//
-// Copyright 2011,2014,2015 Ettus Research LLC
-// Copyright 2018 Ettus Research, a National Instruments Company
-//
-// SPDX-License-Identifier: GPL-3.0-or-later
-//
-
-#ifndef INCLUDED_LIBUHD_USRP_GPIO_CORE_200_HPP
-#define INCLUDED_LIBUHD_USRP_GPIO_CORE_200_HPP
-
-#include <uhd/config.hpp>
-#include <uhd/usrp/dboard_iface.hpp>
-#include <uhd/usrp/gpio_defs.hpp>
-#include <boost/assign.hpp>
-#include <stdint.h>
-#include <boost/utility.hpp>
-#include <boost/shared_ptr.hpp>
-#include <uhd/types/wb_iface.hpp>
-#include <map>
-
-class gpio_core_200 : boost::noncopyable{
-public:
- typedef boost::shared_ptr<gpio_core_200> sptr;
-
- typedef uhd::usrp::dboard_iface::unit_t unit_t;
- typedef uhd::usrp::dboard_iface::atr_reg_t atr_reg_t;
-
- virtual ~gpio_core_200(void) = 0;
-
- //! makes a new GPIO core from iface and slave base
- static sptr make(
- uhd::wb_iface::sptr iface, const size_t base, const size_t rb_addr);
-
- //! 1 = ATR
- virtual void set_pin_ctrl(
- const unit_t unit, const uint16_t value, const uint16_t mask) = 0;
-
- virtual uint16_t get_pin_ctrl(unit_t unit) = 0;
-
- virtual void set_atr_reg(
- const unit_t unit, const atr_reg_t atr, const uint16_t value, const uint16_t mask) = 0;
-
- virtual uint16_t get_atr_reg(unit_t unit, atr_reg_t reg) = 0;
-
- //! 1 = OUTPUT
- virtual void set_gpio_ddr(
- const unit_t unit, const uint16_t value, const uint16_t mask) = 0;
-
- virtual uint16_t get_gpio_ddr(unit_t unit) = 0;
-
- virtual void set_gpio_out(
- const unit_t unit, const uint16_t value, const uint16_t mask) = 0;
-
- virtual uint16_t get_gpio_out(unit_t unit) = 0;
-
- virtual uint16_t read_gpio(const unit_t unit) = 0;
-};
-
-//! Simple wrapper for 32 bit write only
-class gpio_core_200_32wo : boost::noncopyable{
-public:
- typedef boost::shared_ptr<gpio_core_200_32wo> sptr;
-
- typedef uhd::usrp::dboard_iface::atr_reg_t atr_reg_t;
-
- virtual ~gpio_core_200_32wo(void) = 0;
-
- static sptr make(uhd::wb_iface::sptr iface, const size_t);
-
- virtual void set_ddr_reg() = 0;
-
- virtual void set_atr_reg(const atr_reg_t atr, const uint32_t value) = 0;
-
- virtual void set_all_regs(const uint32_t value) = 0;
-};
-
-#endif /* INCLUDED_LIBUHD_USRP_GPIO_CORE_200_HPP */
diff --git a/host/lib/usrp/cores/i2c_core_100_wb32.cpp b/host/lib/usrp/cores/i2c_core_100_wb32.cpp
index 3f037f519..c6a0e8d84 100644
--- a/host/lib/usrp/cores/i2c_core_100_wb32.cpp
+++ b/host/lib/usrp/cores/i2c_core_100_wb32.cpp
@@ -5,9 +5,9 @@
// SPDX-License-Identifier: GPL-3.0-or-later
//
-#include "i2c_core_100_wb32.hpp"
#include <uhd/exception.hpp>
#include <uhd/utils/log.hpp>
+#include <uhdlib/usrp/cores/i2c_core_100_wb32.hpp>
#include <boost/thread/thread.hpp> //sleep
#define REG_I2C_PRESCALER_LO _base + 0
diff --git a/host/lib/usrp/cores/i2c_core_100_wb32.hpp b/host/lib/usrp/cores/i2c_core_100_wb32.hpp
deleted file mode 100644
index 6c4182544..000000000
--- a/host/lib/usrp/cores/i2c_core_100_wb32.hpp
+++ /dev/null
@@ -1,29 +0,0 @@
-//
-// Copyright 2011-2014 Ettus Research LLC
-// Copyright 2018 Ettus Research, a National Instruments Company
-//
-// SPDX-License-Identifier: GPL-3.0-or-later
-//
-
-#ifndef INCLUDED_LIBUHD_USRP_I2C_CORE_100_WB32_HPP
-#define INCLUDED_LIBUHD_USRP_I2C_CORE_100_WB32_HPP
-
-#include <uhd/config.hpp>
-#include <uhd/types/serial.hpp>
-#include <boost/utility.hpp>
-#include <boost/shared_ptr.hpp>
-#include <uhd/types/wb_iface.hpp>
-
-class i2c_core_100_wb32 : boost::noncopyable, public uhd::i2c_iface{
-public:
- typedef boost::shared_ptr<i2c_core_100_wb32> sptr;
-
- virtual ~i2c_core_100_wb32(void) = 0;
-
- //! makes a new i2c core from iface and slave base
- static sptr make(uhd::wb_iface::sptr iface, const size_t base);
-
- virtual void set_clock_rate(const double rate) = 0;
-};
-
-#endif /* INCLUDED_LIBUHD_USRP_I2C_CORE_100_WB32_HPP */
diff --git a/host/lib/usrp/cores/i2c_core_200.cpp b/host/lib/usrp/cores/i2c_core_200.cpp
index ce98f7512..c0a6cb949 100644
--- a/host/lib/usrp/cores/i2c_core_200.cpp
+++ b/host/lib/usrp/cores/i2c_core_200.cpp
@@ -5,9 +5,9 @@
// SPDX-License-Identifier: GPL-3.0-or-later
//
-#include "i2c_core_200.hpp"
#include <uhd/exception.hpp>
#include <uhd/utils/log.hpp>
+#include <uhdlib/usrp/cores/i2c_core_200.hpp>
#include <boost/thread/thread.hpp> //sleep
#include <boost/thread/mutex.hpp>
diff --git a/host/lib/usrp/cores/i2c_core_200.hpp b/host/lib/usrp/cores/i2c_core_200.hpp
deleted file mode 100644
index 354244891..000000000
--- a/host/lib/usrp/cores/i2c_core_200.hpp
+++ /dev/null
@@ -1,27 +0,0 @@
-//
-// Copyright 2011-2012,2014 Ettus Research LLC
-// Copyright 2018 Ettus Research, a National Instruments Company
-//
-// SPDX-License-Identifier: GPL-3.0-or-later
-//
-
-#ifndef INCLUDED_LIBUHD_USRP_I2C_CORE_200_HPP
-#define INCLUDED_LIBUHD_USRP_I2C_CORE_200_HPP
-
-#include <uhd/config.hpp>
-#include <uhd/types/serial.hpp>
-#include <boost/utility.hpp>
-#include <boost/shared_ptr.hpp>
-#include <uhd/types/wb_iface.hpp>
-
-class i2c_core_200 : boost::noncopyable, public uhd::i2c_iface{
-public:
- typedef boost::shared_ptr<i2c_core_200> sptr;
-
- virtual ~i2c_core_200(void) = 0;
-
- //! makes a new i2c core from iface and slave base
- static sptr make(uhd::wb_iface::sptr iface, const size_t base, const size_t readback);
-};
-
-#endif /* INCLUDED_LIBUHD_USRP_I2C_CORE_200_HPP */
diff --git a/host/lib/usrp/cores/radio_ctrl_core_3000.cpp b/host/lib/usrp/cores/radio_ctrl_core_3000.cpp
index 631291d18..fe4a01b35 100644
--- a/host/lib/usrp/cores/radio_ctrl_core_3000.cpp
+++ b/host/lib/usrp/cores/radio_ctrl_core_3000.cpp
@@ -5,14 +5,14 @@
// SPDX-License-Identifier: GPL-3.0-or-later
//
-#include "radio_ctrl_core_3000.hpp"
-#include "async_packet_handler.hpp"
#include <uhd/exception.hpp>
#include <uhd/utils/log.hpp>
#include <uhd/utils/byteswap.hpp>
#include <uhd/utils/safe_call.hpp>
#include <uhd/transport/bounded_buffer.hpp>
#include <uhd/transport/vrt_if_packet.hpp>
+#include <uhdlib/usrp/common/async_packet_handler.hpp>
+#include <uhdlib/usrp/cores/radio_ctrl_core_3000.hpp>
#include <boost/thread/mutex.hpp>
#include <boost/thread/thread.hpp>
#include <boost/format.hpp>
diff --git a/host/lib/usrp/cores/radio_ctrl_core_3000.hpp b/host/lib/usrp/cores/radio_ctrl_core_3000.hpp
deleted file mode 100644
index f7be7ef91..000000000
--- a/host/lib/usrp/cores/radio_ctrl_core_3000.hpp
+++ /dev/null
@@ -1,54 +0,0 @@
-//
-// Copyright 2012-2015 Ettus Research LLC
-// Copyright 2018 Ettus Research, a National Instruments Company
-//
-// SPDX-License-Identifier: GPL-3.0-or-later
-//
-
-#ifndef INCLUDED_LIBUHD_USRP_RADIO_CTRL_3000_HPP
-#define INCLUDED_LIBUHD_USRP_RADIO_CTRL_3000_HPP
-
-#include <uhd/utils/msg_task.hpp>
-#include <uhd/types/time_spec.hpp>
-#include <uhd/transport/zero_copy.hpp>
-#include <uhd/types/wb_iface.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/utility.hpp>
-#include <string>
-
-/*!
- * Provide access to peek, poke for the radio ctrl module
- */
-class radio_ctrl_core_3000 : public uhd::timed_wb_iface
-{
-public:
- typedef boost::shared_ptr<radio_ctrl_core_3000> sptr;
-
- virtual ~radio_ctrl_core_3000(void) = 0;
-
- //! Make a new control object
- static sptr make(
- const bool big_endian,
- uhd::transport::zero_copy_if::sptr ctrl_xport,
- uhd::transport::zero_copy_if::sptr resp_xport,
- const uint32_t sid,
- const std::string &name = "0"
- );
-
- //! Hold a ref to a task thats feeding push response
- virtual void hold_task(uhd::msg_task::sptr task) = 0;
-
- //! Push a response externall (resp_xport is NULL)
- virtual void push_response(const uint32_t *buff) = 0;
-
- //! Set the command time that will activate
- virtual void set_time(const uhd::time_spec_t &time) = 0;
-
- //! Get the command time that will activate
- virtual uhd::time_spec_t get_time(void) = 0;
-
- //! Set the tick rate (converting time into ticks)
- virtual void set_tick_rate(const double rate) = 0;
-};
-
-#endif /* INCLUDED_LIBUHD_USRP_RADIO_CTRL_3000_HPP */
diff --git a/host/lib/usrp/cores/rx_dsp_core_200.cpp b/host/lib/usrp/cores/rx_dsp_core_200.cpp
index 723c96de0..730985fdd 100644
--- a/host/lib/usrp/cores/rx_dsp_core_200.cpp
+++ b/host/lib/usrp/cores/rx_dsp_core_200.cpp
@@ -5,13 +5,13 @@
// SPDX-License-Identifier: GPL-3.0-or-later
//
-#include "rx_dsp_core_200.hpp"
-#include "dsp_core_utils.hpp"
#include <uhd/types/dict.hpp>
#include <uhd/exception.hpp>
#include <uhd/utils/math.hpp>
#include <uhd/utils/log.hpp>
#include <uhd/utils/safe_call.hpp>
+#include <uhdlib/usrp/cores/rx_dsp_core_200.hpp>
+#include <uhdlib/usrp/cores/dsp_core_utils.hpp>
#include <boost/assign/list_of.hpp>
#include <boost/thread/thread.hpp> //thread sleep
#include <boost/math/special_functions/round.hpp>
diff --git a/host/lib/usrp/cores/rx_dsp_core_200.hpp b/host/lib/usrp/cores/rx_dsp_core_200.hpp
deleted file mode 100644
index e9b6b98cf..000000000
--- a/host/lib/usrp/cores/rx_dsp_core_200.hpp
+++ /dev/null
@@ -1,59 +0,0 @@
-//
-// Copyright 2011,2014 Ettus Research LLC
-// Copyright 2018 Ettus Research, a National Instruments Company
-//
-// SPDX-License-Identifier: GPL-3.0-or-later
-//
-
-#ifndef INCLUDED_LIBUHD_USRP_RX_DSP_CORE_200_HPP
-#define INCLUDED_LIBUHD_USRP_RX_DSP_CORE_200_HPP
-
-#include <uhd/config.hpp>
-#include <uhd/stream.hpp>
-#include <uhd/types/ranges.hpp>
-#include <boost/utility.hpp>
-#include <boost/shared_ptr.hpp>
-#include <uhd/types/stream_cmd.hpp>
-#include <uhd/types/wb_iface.hpp>
-#include <string>
-
-class rx_dsp_core_200 : boost::noncopyable{
-public:
- typedef boost::shared_ptr<rx_dsp_core_200> sptr;
-
- virtual ~rx_dsp_core_200(void) = 0;
-
- static sptr make(
- uhd::wb_iface::sptr iface,
- const size_t dsp_base, const size_t ctrl_base,
- const uint32_t sid, const bool lingering_packet = false
- );
-
- virtual void clear(void) = 0;
-
- virtual void set_nsamps_per_packet(const size_t nsamps) = 0;
-
- virtual void issue_stream_command(const uhd::stream_cmd_t &stream_cmd) = 0;
-
- virtual void set_mux(const std::string &mode, const bool fe_swapped = false) = 0;
-
- virtual void set_tick_rate(const double rate) = 0;
-
- virtual void set_link_rate(const double rate) = 0;
-
- virtual double set_host_rate(const double rate) = 0;
-
- virtual uhd::meta_range_t get_host_rates(void) = 0;
-
- virtual double get_scaling_adjustment(void) = 0;
-
- virtual uhd::meta_range_t get_freq_range(void) = 0;
-
- virtual double set_freq(const double freq) = 0;
-
- virtual void handle_overflow(void) = 0;
-
- virtual void setup(const uhd::stream_args_t &stream_args) = 0;
-};
-
-#endif /* INCLUDED_LIBUHD_USRP_RX_DSP_CORE_200_HPP */
diff --git a/host/lib/usrp/cores/rx_dsp_core_3000.cpp b/host/lib/usrp/cores/rx_dsp_core_3000.cpp
index bfe3fdab3..27fc760af 100644
--- a/host/lib/usrp/cores/rx_dsp_core_3000.cpp
+++ b/host/lib/usrp/cores/rx_dsp_core_3000.cpp
@@ -5,13 +5,13 @@
// SPDX-License-Identifier: GPL-3.0-or-later
//
-#include "rx_dsp_core_3000.hpp"
-#include "dsp_core_utils.hpp"
#include <uhd/types/dict.hpp>
#include <uhd/exception.hpp>
#include <uhd/utils/math.hpp>
#include <uhd/utils/log.hpp>
#include <uhd/utils/safe_call.hpp>
+#include <uhdlib/usrp/cores/rx_dsp_core_3000.hpp>
+#include <uhdlib/usrp/cores/dsp_core_utils.hpp>
#include <boost/assign/list_of.hpp>
#include <boost/thread/thread.hpp> //thread sleep
#include <boost/math/special_functions/round.hpp>
diff --git a/host/lib/usrp/cores/rx_dsp_core_3000.hpp b/host/lib/usrp/cores/rx_dsp_core_3000.hpp
deleted file mode 100644
index 0fba8ed65..000000000
--- a/host/lib/usrp/cores/rx_dsp_core_3000.hpp
+++ /dev/null
@@ -1,58 +0,0 @@
-//
-// Copyright 2011-2014 Ettus Research LLC
-// Copyright 2018 Ettus Research, a National Instruments Company
-//
-// SPDX-License-Identifier: GPL-3.0-or-later
-//
-
-#ifndef INCLUDED_LIBUHD_USRP_RX_DSP_CORE_3000_HPP
-#define INCLUDED_LIBUHD_USRP_RX_DSP_CORE_3000_HPP
-
-#include <uhd/config.hpp>
-#include <uhd/stream.hpp>
-#include <uhd/types/ranges.hpp>
-#include <uhd/types/stream_cmd.hpp>
-#include <uhd/types/wb_iface.hpp>
-#include <uhd/property_tree.hpp>
-#include <uhd/usrp/fe_connection.hpp>
-#include <boost/utility.hpp>
-#include <boost/shared_ptr.hpp>
-#include <string>
-
-class rx_dsp_core_3000 : boost::noncopyable{
-public:
- static const double DEFAULT_CORDIC_FREQ;
- static const double DEFAULT_RATE;
-
- typedef boost::shared_ptr<rx_dsp_core_3000> sptr;
-
- virtual ~rx_dsp_core_3000(void) = 0;
-
- static sptr make(
- uhd::wb_iface::sptr iface,
- const size_t dsp_base,
- const bool is_b200 = false //TODO: Obsolete this when we switch to the new DDC on the B200
- );
-
- virtual void set_mux(const uhd::usrp::fe_connection_t& fe_conn) = 0;
-
- virtual void set_tick_rate(const double rate) = 0;
-
- virtual void set_link_rate(const double rate) = 0;
-
- virtual double set_host_rate(const double rate) = 0;
-
- virtual uhd::meta_range_t get_host_rates(void) = 0;
-
- virtual double get_scaling_adjustment(void) = 0;
-
- virtual uhd::meta_range_t get_freq_range(void) = 0;
-
- virtual double set_freq(const double freq) = 0;
-
- virtual void setup(const uhd::stream_args_t &stream_args) = 0;
-
- virtual void populate_subtree(uhd::property_tree::sptr subtree) = 0;
-};
-
-#endif /* INCLUDED_LIBUHD_USRP_RX_DSP_CORE_3000_HPP */
diff --git a/host/lib/usrp/cores/rx_frontend_core_200.cpp b/host/lib/usrp/cores/rx_frontend_core_200.cpp
index 2b7fac2d8..38710db15 100644
--- a/host/lib/usrp/cores/rx_frontend_core_200.cpp
+++ b/host/lib/usrp/cores/rx_frontend_core_200.cpp
@@ -5,7 +5,7 @@
// SPDX-License-Identifier: GPL-3.0-or-later
//
-#include "rx_frontend_core_200.hpp"
+#include <uhdlib/usrp/cores/rx_frontend_core_200.hpp>
#include <boost/math/special_functions/round.hpp>
#include <boost/bind.hpp>
diff --git a/host/lib/usrp/cores/rx_frontend_core_200.hpp b/host/lib/usrp/cores/rx_frontend_core_200.hpp
deleted file mode 100644
index c4848bde2..000000000
--- a/host/lib/usrp/cores/rx_frontend_core_200.hpp
+++ /dev/null
@@ -1,43 +0,0 @@
-//
-// Copyright 2011,2014 Ettus Research LLC
-// Copyright 2018 Ettus Research, a National Instruments Company
-//
-// SPDX-License-Identifier: GPL-3.0-or-later
-//
-
-#ifndef INCLUDED_LIBUHD_USRP_TX_FRONTEND_CORE_200_HPP
-#define INCLUDED_LIBUHD_USRP_TX_FRONTEND_CORE_200_HPP
-
-#include <uhd/config.hpp>
-#include <uhd/types/wb_iface.hpp>
-#include <uhd/property_tree.hpp>
-#include <boost/utility.hpp>
-#include <boost/shared_ptr.hpp>
-#include <complex>
-#include <string>
-
-class rx_frontend_core_200 : boost::noncopyable{
-public:
- static const std::complex<double> DEFAULT_DC_OFFSET_VALUE;
- static const bool DEFAULT_DC_OFFSET_ENABLE;
- static const std::complex<double> DEFAULT_IQ_BALANCE_VALUE;
-
- typedef boost::shared_ptr<rx_frontend_core_200> sptr;
-
- virtual ~rx_frontend_core_200(void) = 0;
-
- static sptr make(uhd::wb_iface::sptr iface, const size_t base);
-
- virtual void set_mux(const bool swap) = 0;
-
- virtual void set_dc_offset_auto(const bool enb) = 0;
-
- virtual std::complex<double> set_dc_offset(const std::complex<double> &off) = 0;
-
- virtual void set_iq_balance(const std::complex<double> &cor) = 0;
-
- virtual void populate_subtree(uhd::property_tree::sptr subtree) = 0;
-
-};
-
-#endif /* INCLUDED_LIBUHD_USRP_TX_FRONTEND_CORE_200_HPP */
diff --git a/host/lib/usrp/cores/rx_frontend_core_3000.cpp b/host/lib/usrp/cores/rx_frontend_core_3000.cpp
index 92a3aacfe..cf1a105d8 100644
--- a/host/lib/usrp/cores/rx_frontend_core_3000.cpp
+++ b/host/lib/usrp/cores/rx_frontend_core_3000.cpp
@@ -5,12 +5,12 @@
// SPDX-License-Identifier: GPL-3.0-or-later
//
-#include "rx_frontend_core_3000.hpp"
-#include "dsp_core_utils.hpp"
+#include <uhd/types/dict.hpp>
+#include <uhdlib/usrp/cores/rx_frontend_core_3000.hpp>
+#include <uhdlib/usrp/cores/dsp_core_utils.hpp>
#include <boost/math/special_functions/round.hpp>
#include <boost/assign/list_of.hpp>
#include <boost/bind.hpp>
-#include <uhd/types/dict.hpp>
using namespace uhd;
diff --git a/host/lib/usrp/cores/rx_frontend_core_3000.hpp b/host/lib/usrp/cores/rx_frontend_core_3000.hpp
deleted file mode 100644
index e425e51a4..000000000
--- a/host/lib/usrp/cores/rx_frontend_core_3000.hpp
+++ /dev/null
@@ -1,59 +0,0 @@
-//
-// Copyright 2011,2014-2016 Ettus Research LLC
-// Copyright 2018 Ettus Research, a National Instruments Company
-//
-// SPDX-License-Identifier: GPL-3.0-or-later
-//
-
-#ifndef INCLUDED_LIBUHD_USRP_TX_FRONTEND_CORE_3000_HPP
-#define INCLUDED_LIBUHD_USRP_TX_FRONTEND_CORE_3000_HPP
-
-#include <uhd/config.hpp>
-#include <uhd/types/wb_iface.hpp>
-#include <uhd/property_tree.hpp>
-#include <uhd/usrp/fe_connection.hpp>
-#include <boost/utility.hpp>
-#include <boost/shared_ptr.hpp>
-#include <complex>
-#include <string>
-
-class rx_frontend_core_3000 : boost::noncopyable{
-public:
- static const std::complex<double> DEFAULT_DC_OFFSET_VALUE;
- static const bool DEFAULT_DC_OFFSET_ENABLE;
- static const std::complex<double> DEFAULT_IQ_BALANCE_VALUE;
-
- typedef boost::shared_ptr<rx_frontend_core_3000> sptr;
-
- virtual ~rx_frontend_core_3000(void) = 0;
-
- static sptr make(uhd::wb_iface::sptr iface, const size_t base);
-
- /*! Set the input sampling rate (i.e. ADC rate)
- */
- virtual void set_adc_rate(const double rate) = 0;
-
- virtual void bypass_all(bool bypass_en) = 0;
-
- virtual void set_fe_connection(const uhd::usrp::fe_connection_t& fe_conn) = 0;
-
- virtual void set_dc_offset_auto(const bool enb) = 0;
-
- virtual std::complex<double> set_dc_offset(const std::complex<double> &off) = 0;
-
- virtual void set_iq_balance(const std::complex<double> &cor) = 0;
-
- virtual void populate_subtree(uhd::property_tree::sptr subtree) = 0;
-
- /*! Return the sampling rate at the output
- *
- * In real mode, the frontend core will decimate the sampling rate by a
- * factor of 2.
- *
- * \returns RX sampling rate
- */
- virtual double get_output_rate(void) = 0;
-
-};
-
-#endif /* INCLUDED_LIBUHD_USRP_TX_FRONTEND_CORE_3000_HPP */
diff --git a/host/lib/usrp/cores/rx_vita_core_3000.cpp b/host/lib/usrp/cores/rx_vita_core_3000.cpp
index 44fa63441..1572266a5 100644
--- a/host/lib/usrp/cores/rx_vita_core_3000.cpp
+++ b/host/lib/usrp/cores/rx_vita_core_3000.cpp
@@ -5,9 +5,9 @@
// SPDX-License-Identifier: GPL-3.0-or-later
//
-#include "rx_vita_core_3000.hpp"
#include <uhd/utils/log.hpp>
#include <uhd/utils/safe_call.hpp>
+#include <uhdlib/usrp/cores/rx_vita_core_3000.hpp>
#include <boost/assign/list_of.hpp>
#include <boost/tuple/tuple.hpp>
#include <boost/date_time.hpp>
diff --git a/host/lib/usrp/cores/rx_vita_core_3000.hpp b/host/lib/usrp/cores/rx_vita_core_3000.hpp
deleted file mode 100644
index 919631300..000000000
--- a/host/lib/usrp/cores/rx_vita_core_3000.hpp
+++ /dev/null
@@ -1,51 +0,0 @@
-//
-// Copyright 2013,2014 Ettus Research LLC
-// Copyright 2018 Ettus Research, a National Instruments Company
-//
-// SPDX-License-Identifier: GPL-3.0-or-later
-//
-
-#ifndef INCLUDED_LIBUHD_USRP_RX_VITA_CORE_3000_HPP
-#define INCLUDED_LIBUHD_USRP_RX_VITA_CORE_3000_HPP
-
-#include <uhd/config.hpp>
-#include <uhd/stream.hpp>
-#include <uhd/types/ranges.hpp>
-#include <boost/utility.hpp>
-#include <boost/shared_ptr.hpp>
-#include <uhd/types/stream_cmd.hpp>
-#include <uhd/types/wb_iface.hpp>
-#include <string>
-
-class rx_vita_core_3000 : boost::noncopyable
-{
-public:
- typedef boost::shared_ptr<rx_vita_core_3000> sptr;
-
- virtual ~rx_vita_core_3000(void) = 0;
-
- static sptr make(
- uhd::wb_iface::sptr iface,
- const size_t base
- );
-
- virtual void clear(void) = 0;
-
- virtual void set_nsamps_per_packet(const size_t nsamps) = 0;
-
- virtual void issue_stream_command(const uhd::stream_cmd_t &stream_cmd) = 0;
-
- virtual void set_tick_rate(const double rate) = 0;
-
- virtual void set_sid(const uint32_t sid) = 0;
-
- virtual void handle_overflow(void) = 0;
-
- virtual void setup(const uhd::stream_args_t &stream_args) = 0;
-
- virtual void configure_flow_control(const size_t window_size) = 0;
-
- virtual bool in_continuous_streaming_mode(void) = 0;
-};
-
-#endif /* INCLUDED_LIBUHD_USRP_RX_VITA_CORE_3000_HPP */
diff --git a/host/lib/usrp/cores/spi_core_3000.cpp b/host/lib/usrp/cores/spi_core_3000.cpp
index 5ec1079b6..f4b42f26d 100644
--- a/host/lib/usrp/cores/spi_core_3000.cpp
+++ b/host/lib/usrp/cores/spi_core_3000.cpp
@@ -5,9 +5,9 @@
// SPDX-License-Identifier: GPL-3.0-or-later
//
-#include "spi_core_3000.hpp"
#include <uhd/exception.hpp>
#include <uhd/utils/log.hpp>
+#include <uhdlib/usrp/cores/spi_core_3000.hpp>
#include <boost/thread/thread.hpp> //sleep
#define SPI_DIV _base + 0
diff --git a/host/lib/usrp/cores/spi_core_3000.hpp b/host/lib/usrp/cores/spi_core_3000.hpp
deleted file mode 100644
index ea0507754..000000000
--- a/host/lib/usrp/cores/spi_core_3000.hpp
+++ /dev/null
@@ -1,38 +0,0 @@
-//
-// Copyright 2013-2014 Ettus Research LLC
-// Copyright 2018 Ettus Research, a National Instruments Company
-//
-// SPDX-License-Identifier: GPL-3.0-or-later
-//
-
-#ifndef INCLUDED_LIBUHD_USRP_SPI_CORE_3000_HPP
-#define INCLUDED_LIBUHD_USRP_SPI_CORE_3000_HPP
-
-#include <uhd/config.hpp>
-#include <uhd/types/serial.hpp>
-#include <boost/utility.hpp>
-#include <boost/shared_ptr.hpp>
-#include <uhd/types/wb_iface.hpp>
-
-class spi_core_3000 : boost::noncopyable, public uhd::spi_iface
-{
-public:
- typedef boost::shared_ptr<spi_core_3000> sptr;
-
- virtual ~spi_core_3000(void) = 0;
-
- //! makes a new spi core from iface and slave base
- static sptr make(uhd::wb_iface::sptr iface, const size_t base, const size_t readback);
-
- //! Set the spi clock divider to something usable
- virtual void set_divider(const double div) = 0;
-
- //! Place SPI core in shutdown mode. All attempted SPI transactions are dropped by
- // the core.
- virtual void set_shutdown(const bool shutdown) = 0;
-
- //! Get state of shutdown register
- virtual bool get_shutdown() = 0;
-};
-
-#endif /* INCLUDED_LIBUHD_USRP_SPI_CORE_3000_HPP */
diff --git a/host/lib/usrp/cores/time64_core_200.cpp b/host/lib/usrp/cores/time64_core_200.cpp
index 27d395778..09fa92dcd 100644
--- a/host/lib/usrp/cores/time64_core_200.cpp
+++ b/host/lib/usrp/cores/time64_core_200.cpp
@@ -5,9 +5,9 @@
// SPDX-License-Identifier: GPL-3.0-or-later
//
-#include "time64_core_200.hpp"
#include <uhd/exception.hpp>
#include <uhd/utils/assert_has.hpp>
+#include <uhdlib/usrp/cores/time64_core_200.hpp>
#include <boost/math/special_functions/round.hpp>
#define REG_TIME64_TICKS_HI _base + 0
diff --git a/host/lib/usrp/cores/time64_core_200.hpp b/host/lib/usrp/cores/time64_core_200.hpp
deleted file mode 100644
index 23e0da922..000000000
--- a/host/lib/usrp/cores/time64_core_200.hpp
+++ /dev/null
@@ -1,55 +0,0 @@
-//
-// Copyright 2011-2012,2014 Ettus Research LLC
-// Copyright 2018 Ettus Research, a National Instruments Company
-//
-// SPDX-License-Identifier: GPL-3.0-or-later
-//
-
-#ifndef INCLUDED_LIBUHD_USRP_TIME64_CORE_200_HPP
-#define INCLUDED_LIBUHD_USRP_TIME64_CORE_200_HPP
-
-#include <uhd/config.hpp>
-#include <uhd/types/time_spec.hpp>
-#include <boost/utility.hpp>
-#include <boost/shared_ptr.hpp>
-#include <uhd/types/wb_iface.hpp>
-#include <string>
-#include <vector>
-
-class time64_core_200 : boost::noncopyable{
-public:
- typedef boost::shared_ptr<time64_core_200> sptr;
-
- struct readback_bases_type{
- size_t rb_hi_now, rb_lo_now;
- size_t rb_hi_pps, rb_lo_pps;
- };
-
- virtual ~time64_core_200(void) = 0;
-
- //! makes a new time64 core from iface and slave base
- static sptr make(
- uhd::wb_iface::sptr iface, const size_t base,
- const readback_bases_type &readback_bases,
- const size_t mimo_delay_cycles = 0 // 0 means no-mimo
- );
-
- virtual void enable_gpsdo(void) = 0;
-
- virtual void set_tick_rate(const double rate) = 0;
-
- virtual uhd::time_spec_t get_time_now(void) = 0;
-
- virtual uhd::time_spec_t get_time_last_pps(void) = 0;
-
- virtual void set_time_now(const uhd::time_spec_t &time) = 0;
-
- virtual void set_time_next_pps(const uhd::time_spec_t &time) = 0;
-
- virtual void set_time_source(const std::string &source) = 0;
-
- virtual std::vector<std::string> get_time_sources(void) = 0;
-
-};
-
-#endif /* INCLUDED_LIBUHD_USRP_TIME64_CORE_200_HPP */
diff --git a/host/lib/usrp/cores/time_core_3000.cpp b/host/lib/usrp/cores/time_core_3000.cpp
index a56b233fe..14636edec 100644
--- a/host/lib/usrp/cores/time_core_3000.cpp
+++ b/host/lib/usrp/cores/time_core_3000.cpp
@@ -5,9 +5,9 @@
// SPDX-License-Identifier: GPL-3.0-or-later
//
-#include "time_core_3000.hpp"
#include <uhd/utils/safe_call.hpp>
#include <uhd/utils/log.hpp>
+#include <uhdlib/usrp/cores/time_core_3000.hpp>
#include <boost/thread/thread.hpp>
#define REG_TIME_HI _base + 0
diff --git a/host/lib/usrp/cores/time_core_3000.hpp b/host/lib/usrp/cores/time_core_3000.hpp
deleted file mode 100644
index 4fa2ae657..000000000
--- a/host/lib/usrp/cores/time_core_3000.hpp
+++ /dev/null
@@ -1,52 +0,0 @@
-//
-// Copyright 2013-2014 Ettus Research LLC
-// Copyright 2018 Ettus Research, a National Instruments Company
-//
-// SPDX-License-Identifier: GPL-3.0-or-later
-//
-
-#ifndef INCLUDED_LIBUHD_USRP_TIME_CORE_3000_HPP
-#define INCLUDED_LIBUHD_USRP_TIME_CORE_3000_HPP
-
-#include <uhd/config.hpp>
-#include <uhd/types/time_spec.hpp>
-#include <boost/utility.hpp>
-#include <boost/shared_ptr.hpp>
-#include <uhd/types/wb_iface.hpp>
-
-class time_core_3000 : boost::noncopyable
-{
-public:
- typedef boost::shared_ptr<time_core_3000> sptr;
-
- struct readback_bases_type
- {
- size_t rb_now;
- size_t rb_pps;
- };
-
- virtual ~time_core_3000(void) = 0;
-
- //! makes a new time core from iface and slave base
- static sptr make(
- uhd::wb_iface::sptr iface, const size_t base,
- const readback_bases_type &readback_bases
- );
-
- virtual void self_test(void) = 0;
-
- virtual void set_tick_rate(const double rate) = 0;
-
- virtual uhd::time_spec_t get_time_now(void) = 0;
-
- virtual uhd::time_spec_t get_time_last_pps(void) = 0;
-
- virtual void set_time_now(const uhd::time_spec_t &time) = 0;
-
- virtual void set_time_sync(const uhd::time_spec_t &time) = 0;
-
- virtual void set_time_next_pps(const uhd::time_spec_t &time) = 0;
-
-};
-
-#endif /* INCLUDED_LIBUHD_USRP_TIME_CORE_3000_HPP */
diff --git a/host/lib/usrp/cores/tx_dsp_core_200.cpp b/host/lib/usrp/cores/tx_dsp_core_200.cpp
index 7d11cbb91..efd64f7e5 100644
--- a/host/lib/usrp/cores/tx_dsp_core_200.cpp
+++ b/host/lib/usrp/cores/tx_dsp_core_200.cpp
@@ -5,8 +5,8 @@
// SPDX-License-Identifier: GPL-3.0-or-later
//
-#include "tx_dsp_core_200.hpp"
-#include "dsp_core_utils.hpp"
+#include <uhdlib/usrp/cores/tx_dsp_core_200.hpp>
+#include <uhdlib/usrp/cores/dsp_core_utils.hpp>
#include <uhd/types/dict.hpp>
#include <uhd/exception.hpp>
#include <uhd/utils/math.hpp>
diff --git a/host/lib/usrp/cores/tx_dsp_core_200.hpp b/host/lib/usrp/cores/tx_dsp_core_200.hpp
deleted file mode 100644
index 98e8b5225..000000000
--- a/host/lib/usrp/cores/tx_dsp_core_200.hpp
+++ /dev/null
@@ -1,51 +0,0 @@
-//
-// Copyright 2011,2014 Ettus Research LLC
-// Copyright 2018 Ettus Research, a National Instruments Company
-//
-// SPDX-License-Identifier: GPL-3.0-or-later
-//
-
-#ifndef INCLUDED_LIBUHD_USRP_TX_DSP_CORE_200_HPP
-#define INCLUDED_LIBUHD_USRP_TX_DSP_CORE_200_HPP
-
-#include <uhd/config.hpp>
-#include <uhd/stream.hpp>
-#include <uhd/types/ranges.hpp>
-#include <boost/utility.hpp>
-#include <boost/shared_ptr.hpp>
-#include <uhd/types/wb_iface.hpp>
-
-class tx_dsp_core_200 : boost::noncopyable{
-public:
- typedef boost::shared_ptr<tx_dsp_core_200> sptr;
-
- virtual ~tx_dsp_core_200(void) = 0;
-
- static sptr make(
- uhd::wb_iface::sptr iface,
- const size_t dsp_base, const size_t ctrl_base,
- const uint32_t sid
- );
-
- virtual void clear(void) = 0;
-
- virtual void set_tick_rate(const double rate) = 0;
-
- virtual void set_link_rate(const double rate) = 0;
-
- virtual double set_host_rate(const double rate) = 0;
-
- virtual uhd::meta_range_t get_host_rates(void) = 0;
-
- virtual double get_scaling_adjustment(void) = 0;
-
- virtual uhd::meta_range_t get_freq_range(void) = 0;
-
- virtual double set_freq(const double freq) = 0;
-
- virtual void set_updates(const size_t cycles_per_up, const size_t packets_per_up) = 0;
-
- virtual void setup(const uhd::stream_args_t &stream_args) = 0;
-};
-
-#endif /* INCLUDED_LIBUHD_USRP_TX_DSP_CORE_200_HPP */
diff --git a/host/lib/usrp/cores/tx_dsp_core_3000.cpp b/host/lib/usrp/cores/tx_dsp_core_3000.cpp
index 1afa73eed..b04a20497 100644
--- a/host/lib/usrp/cores/tx_dsp_core_3000.cpp
+++ b/host/lib/usrp/cores/tx_dsp_core_3000.cpp
@@ -5,8 +5,8 @@
// SPDX-License-Identifier: GPL-3.0-or-later
//
-#include "tx_dsp_core_3000.hpp"
-#include "dsp_core_utils.hpp"
+#include <uhdlib/usrp/cores/tx_dsp_core_3000.hpp>
+#include <uhdlib/usrp/cores/dsp_core_utils.hpp>
#include <uhd/types/dict.hpp>
#include <uhd/exception.hpp>
#include <uhd/utils/math.hpp>
diff --git a/host/lib/usrp/cores/tx_dsp_core_3000.hpp b/host/lib/usrp/cores/tx_dsp_core_3000.hpp
deleted file mode 100644
index 3eb53da0d..000000000
--- a/host/lib/usrp/cores/tx_dsp_core_3000.hpp
+++ /dev/null
@@ -1,52 +0,0 @@
-//
-// Copyright 2011-2014 Ettus Research LLC
-// Copyright 2018 Ettus Research, a National Instruments Company
-//
-// SPDX-License-Identifier: GPL-3.0-or-later
-//
-
-#ifndef INCLUDED_LIBUHD_USRP_TX_DSP_CORE_3000_HPP
-#define INCLUDED_LIBUHD_USRP_TX_DSP_CORE_3000_HPP
-
-#include <uhd/config.hpp>
-#include <uhd/stream.hpp>
-#include <uhd/types/ranges.hpp>
-#include <uhd/types/wb_iface.hpp>
-#include <uhd/property_tree.hpp>
-#include <boost/utility.hpp>
-#include <boost/shared_ptr.hpp>
-
-class tx_dsp_core_3000 : boost::noncopyable{
-public:
- static const double DEFAULT_CORDIC_FREQ;
- static const double DEFAULT_RATE;
-
- typedef boost::shared_ptr<tx_dsp_core_3000> sptr;
-
- virtual ~tx_dsp_core_3000(void) = 0;
-
- static sptr make(
- uhd::wb_iface::sptr iface,
- const size_t dsp_base
- );
-
- virtual void set_tick_rate(const double rate) = 0;
-
- virtual void set_link_rate(const double rate) = 0;
-
- virtual double set_host_rate(const double rate) = 0;
-
- virtual uhd::meta_range_t get_host_rates(void) = 0;
-
- virtual double get_scaling_adjustment(void) = 0;
-
- virtual uhd::meta_range_t get_freq_range(void) = 0;
-
- virtual double set_freq(const double freq) = 0;
-
- virtual void setup(const uhd::stream_args_t &stream_args) = 0;
-
- virtual void populate_subtree(uhd::property_tree::sptr subtree) = 0;
-};
-
-#endif /* INCLUDED_LIBUHD_USRP_TX_DSP_CORE_3000_HPP */
diff --git a/host/lib/usrp/cores/tx_frontend_core_200.cpp b/host/lib/usrp/cores/tx_frontend_core_200.cpp
index 92c44602c..7e23e2515 100644
--- a/host/lib/usrp/cores/tx_frontend_core_200.cpp
+++ b/host/lib/usrp/cores/tx_frontend_core_200.cpp
@@ -5,7 +5,7 @@
// SPDX-License-Identifier: GPL-3.0-or-later
//
-#include "tx_frontend_core_200.hpp"
+#include <uhdlib/usrp/cores/tx_frontend_core_200.hpp>
#include <uhd/types/dict.hpp>
#include <uhd/exception.hpp>
#include <boost/assign/list_of.hpp>
diff --git a/host/lib/usrp/cores/tx_frontend_core_200.hpp b/host/lib/usrp/cores/tx_frontend_core_200.hpp
deleted file mode 100644
index eb86bf85d..000000000
--- a/host/lib/usrp/cores/tx_frontend_core_200.hpp
+++ /dev/null
@@ -1,40 +0,0 @@
-//
-// Copyright 2011,2014 Ettus Research LLC
-// Copyright 2018 Ettus Research, a National Instruments Company
-//
-// SPDX-License-Identifier: GPL-3.0-or-later
-//
-
-#ifndef INCLUDED_LIBUHD_USRP_RX_FRONTEND_CORE_200_HPP
-#define INCLUDED_LIBUHD_USRP_RX_FRONTEND_CORE_200_HPP
-
-#include <uhd/config.hpp>
-#include <uhd/types/wb_iface.hpp>
-#include <uhd/property_tree.hpp>
-#include <boost/utility.hpp>
-#include <boost/shared_ptr.hpp>
-#include <complex>
-#include <string>
-
-class tx_frontend_core_200 : boost::noncopyable{
-public:
- typedef boost::shared_ptr<tx_frontend_core_200> sptr;
-
- static const std::complex<double> DEFAULT_DC_OFFSET_VALUE;
- static const std::complex<double> DEFAULT_IQ_BALANCE_VALUE;
-
- virtual ~tx_frontend_core_200(void) = 0;
-
- static sptr make(uhd::wb_iface::sptr iface, const size_t base);
-
- virtual void set_mux(const std::string &mode) = 0;
-
- virtual std::complex<double> set_dc_offset(const std::complex<double> &off) = 0;
-
- virtual void set_iq_balance(const std::complex<double> &cor) = 0;
-
- virtual void populate_subtree(uhd::property_tree::sptr subtree) = 0;
-
-};
-
-#endif /* INCLUDED_LIBUHD_USRP_RX_FRONTEND_CORE_200_HPP */
diff --git a/host/lib/usrp/cores/tx_vita_core_3000.cpp b/host/lib/usrp/cores/tx_vita_core_3000.cpp
index e398f065d..689a6cf45 100644
--- a/host/lib/usrp/cores/tx_vita_core_3000.cpp
+++ b/host/lib/usrp/cores/tx_vita_core_3000.cpp
@@ -5,8 +5,8 @@
// SPDX-License-Identifier: GPL-3.0-or-later
//
-#include "tx_vita_core_3000.hpp"
#include <uhd/utils/safe_call.hpp>
+#include <uhdlib/usrp/cores/tx_vita_core_3000.hpp>
#define REG_CTRL_ERROR_POLICY (_base + 0)
#define REG_FC_PRE_RADIO_RESP_BASE (_base + 2*4)
diff --git a/host/lib/usrp/cores/tx_vita_core_3000.hpp b/host/lib/usrp/cores/tx_vita_core_3000.hpp
deleted file mode 100644
index 4d33bb0c2..000000000
--- a/host/lib/usrp/cores/tx_vita_core_3000.hpp
+++ /dev/null
@@ -1,51 +0,0 @@
-//
-// Copyright 2013-2014 Ettus Research LLC
-// Copyright 2018 Ettus Research, a National Instruments Company
-//
-// SPDX-License-Identifier: GPL-3.0-or-later
-//
-
-#ifndef INCLUDED_LIBUHD_USRP_TX_VITA_CORE_3000_HPP
-#define INCLUDED_LIBUHD_USRP_TX_VITA_CORE_3000_HPP
-
-#include <uhd/config.hpp>
-#include <uhd/stream.hpp>
-#include <uhd/types/ranges.hpp>
-#include <boost/utility.hpp>
-#include <boost/shared_ptr.hpp>
-#include <uhd/types/stream_cmd.hpp>
-#include <uhd/types/wb_iface.hpp>
-#include <string>
-
-class tx_vita_core_3000 : boost::noncopyable
-{
-public:
- typedef boost::shared_ptr<tx_vita_core_3000> sptr;
-
- enum fc_monitor_loc {
- FC_DEFAULT,
- FC_PRE_RADIO,
- FC_PRE_FIFO
- };
-
- virtual ~tx_vita_core_3000(void) = 0;
-
- static sptr make(
- uhd::wb_iface::sptr iface,
- const size_t base,
- fc_monitor_loc fc_location = FC_PRE_RADIO
- );
-
- static sptr make_no_radio_buff(
- uhd::wb_iface::sptr iface,
- const size_t base
- );
-
- virtual void clear(void) = 0;
-
- virtual void setup(const uhd::stream_args_t &stream_args) = 0;
-
- virtual void configure_flow_control(const size_t cycs_per_up, const size_t pkts_per_up) = 0;
-};
-
-#endif /* INCLUDED_LIBUHD_USRP_TX_VITA_CORE_3000_HPP */
diff --git a/host/lib/usrp/cores/user_settings_core_200.cpp b/host/lib/usrp/cores/user_settings_core_200.cpp
index 9b8a0bd5f..7de18d11c 100644
--- a/host/lib/usrp/cores/user_settings_core_200.cpp
+++ b/host/lib/usrp/cores/user_settings_core_200.cpp
@@ -5,7 +5,7 @@
// SPDX-License-Identifier: GPL-3.0-or-later
//
-#include "user_settings_core_200.hpp"
+#include <uhdlib/usrp/cores/user_settings_core_200.hpp>
using namespace uhd;
diff --git a/host/lib/usrp/cores/user_settings_core_200.hpp b/host/lib/usrp/cores/user_settings_core_200.hpp
deleted file mode 100644
index 354b5e637..000000000
--- a/host/lib/usrp/cores/user_settings_core_200.hpp
+++ /dev/null
@@ -1,28 +0,0 @@
-//
-// Copyright 2012,2014 Ettus Research LLC
-// Copyright 2018 Ettus Research, a National Instruments Company
-//
-// SPDX-License-Identifier: GPL-3.0-or-later
-//
-
-#ifndef INCLUDED_LIBUHD_USRP_USER_SETTINGS_CORE_200_HPP
-#define INCLUDED_LIBUHD_USRP_USER_SETTINGS_CORE_200_HPP
-
-#include <uhd/config.hpp>
-#include <boost/utility.hpp>
-#include <boost/shared_ptr.hpp>
-#include <uhd/types/wb_iface.hpp>
-
-class user_settings_core_200 : boost::noncopyable{
-public:
- typedef boost::shared_ptr<user_settings_core_200> sptr;
- typedef std::pair<uint8_t, uint32_t> user_reg_t;
-
- virtual ~user_settings_core_200(void) = 0;
-
- static sptr make(uhd::wb_iface::sptr iface, const size_t base);
-
- virtual void set_reg(const user_reg_t &reg) = 0;
-};
-
-#endif /* INCLUDED_LIBUHD_USRP_USER_SETTINGS_CORE_200_HPP */
diff --git a/host/lib/usrp/cores/user_settings_core_3000.cpp b/host/lib/usrp/cores/user_settings_core_3000.cpp
index 10650d6b6..66baed57a 100644
--- a/host/lib/usrp/cores/user_settings_core_3000.cpp
+++ b/host/lib/usrp/cores/user_settings_core_3000.cpp
@@ -5,7 +5,7 @@
// SPDX-License-Identifier: GPL-3.0-or-later
//
-#include "user_settings_core_3000.hpp"
+#include <uhdlib/usrp/cores/user_settings_core_3000.hpp>
#include <uhd/exception.hpp>
#include <boost/thread/thread.hpp>
diff --git a/host/lib/usrp/cores/user_settings_core_3000.hpp b/host/lib/usrp/cores/user_settings_core_3000.hpp
deleted file mode 100644
index bc281e396..000000000
--- a/host/lib/usrp/cores/user_settings_core_3000.hpp
+++ /dev/null
@@ -1,25 +0,0 @@
-//
-// Copyright 2012 Ettus Research LLC
-// Copyright 2018 Ettus Research, a National Instruments Company
-//
-// SPDX-License-Identifier: GPL-3.0-or-later
-//
-
-#ifndef INCLUDED_LIBUHD_USRP_USER_SETTINGS_CORE_3000_HPP
-#define INCLUDED_LIBUHD_USRP_USER_SETTINGS_CORE_3000_HPP
-
-#include <uhd/config.hpp>
-#include <boost/utility.hpp>
-#include <boost/shared_ptr.hpp>
-#include <uhd/types/wb_iface.hpp>
-
-class user_settings_core_3000 : public uhd::wb_iface {
-public:
- virtual ~user_settings_core_3000() {}
-
- static sptr make(
- wb_iface::sptr iface,
- const wb_addr_type sr_base_addr, const wb_addr_type rb_reg_addr);
-};
-
-#endif /* INCLUDED_LIBUHD_USRP_USER_SETTINGS_CORE_3000_HPP */