diff options
author | Martin Braun <martin.braun@ettus.com> | 2016-11-28 12:17:39 -0800 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2016-11-28 12:17:39 -0800 |
commit | fc54c27b48028c9c8139175d40b4b061800f32e3 (patch) | |
tree | bd4ef22159d5bd65458e50fb3e5050a9b63559bf /host | |
parent | 9fe731cc371efee7f0051186697e611571c5b41b (diff) | |
parent | 33c0b32db12ee154b1090360fbf76634590fdd3e (diff) | |
download | uhd-fc54c27b48028c9c8139175d40b4b061800f32e3.tar.gz uhd-fc54c27b48028c9c8139175d40b4b061800f32e3.tar.bz2 uhd-fc54c27b48028c9c8139175d40b4b061800f32e3.zip |
Merge branch 'maint'
Diffstat (limited to 'host')
-rw-r--r-- | host/cmake/Modules/UHDGlobalDefs.cmake | 1 | ||||
-rw-r--r-- | host/docs/usrp_x3x0.dox | 26 | ||||
-rw-r--r-- | host/include/config.h.in | 2 | ||||
-rw-r--r-- | host/include/uhd/rfnoc/block_ctrl_base.hpp | 2 | ||||
-rw-r--r-- | host/lib/device.cpp | 8 | ||||
-rw-r--r-- | host/lib/rfnoc/block_ctrl_base.cpp | 2 | ||||
-rw-r--r-- | host/lib/rfnoc/legacy_compat.cpp | 32 | ||||
-rw-r--r-- | host/lib/transport/muxed_zero_copy_if.cpp | 4 | ||||
-rw-r--r-- | host/lib/transport/nirio/niriok_proxy_impl_v1.cpp | 10 | ||||
-rw-r--r-- | host/lib/transport/nirio_zero_copy.cpp | 2 | ||||
-rw-r--r-- | host/lib/transport/udp_zero_copy.cpp | 2 | ||||
-rw-r--r-- | host/lib/usrp/b100/b100_impl.cpp | 2 | ||||
-rw-r--r-- | host/lib/usrp/b200/b200_iface.cpp | 2 | ||||
-rw-r--r-- | host/lib/usrp/common/adf5355.cpp | 12 | ||||
-rw-r--r-- | host/lib/usrp/cores/dma_fifo_core_3000.cpp | 3 | ||||
-rw-r--r-- | host/lib/usrp/dboard/db_ubx.cpp | 2 | ||||
-rw-r--r-- | host/lib/usrp/usrp1/usrp1_impl.cpp | 2 | ||||
-rw-r--r-- | host/lib/usrp/usrp2/io_impl.cpp | 4 | ||||
-rw-r--r-- | host/lib/usrp/usrp2/usrp2_iface.cpp | 2 | ||||
-rw-r--r-- | host/lib/utils/gain_group.cpp | 2 |
20 files changed, 69 insertions, 53 deletions
diff --git a/host/cmake/Modules/UHDGlobalDefs.cmake b/host/cmake/Modules/UHDGlobalDefs.cmake index f237126a6..ada6371fb 100644 --- a/host/cmake/Modules/UHDGlobalDefs.cmake +++ b/host/cmake/Modules/UHDGlobalDefs.cmake @@ -28,7 +28,6 @@ IF(UHD_VERSION_DEVEL) ELSE() MATH(EXPR UHD_VERSION_ADDED "1000000 * ${UHD_VERSION_MAJOR} + 10000 * ${UHD_VERSION_API} + 100 * ${UHD_VERSION_ABI} + ${UHD_VERSION_PATCH}") ENDIF(UHD_VERSION_DEVEL) -ADD_DEFINITIONS(-DUHD_VERSION=${UHD_VERSION_ADDED}) ## RFNoC IF(ENABLE_RFNOC) diff --git a/host/docs/usrp_x3x0.dox b/host/docs/usrp_x3x0.dox index 8a3d52a7d..ac59c86a3 100644 --- a/host/docs/usrp_x3x0.dox +++ b/host/docs/usrp_x3x0.dox @@ -226,23 +226,16 @@ To connect to this JTAG device, simply connect your computer to the USB JTAG port on the front of the X3x0 device. You may now use the JTAG programmer in the same way you would use any other, including: +- Vivado (standard workflow, see below) - <a href="http://www.xilinx.com/support/download/index.htm">Xilinx Programming Tools (ISE, iMPACT)</a> - <a href="http://www.xilinx.com/tools/cspro.htm">Xilinx Chipscope</a> - <a href="https://www.digilentinc.com/Products/Detail.cfm?NavPath=2,66,828&Prod=ADEPT2">Digilent ADEPT</a> -In order to use the JTAG programmer with the Xilinx tools, the Digilent drivers and plugin have to be installed first. -Although recent versions of ISE ship with the driver, it has to still be manually installed. +In order to use the JTAG programmer with the Xilinx tools, the Digilent drivers and plugin have to be installed first. Although recent versions of Vivado ship with the driver, it has to still be manually installed. -\b Note: Sometimes the ISE shipped versions are newer than the ones available via Digilent's website. It is therefore advisable to -use the ISE provided plugin and drivers. +To install first locate your Vivado installation path on a Linux system (default is `/opt/Xilinx/Vivado/<Version>`): -To install first locate your ISE installation path on a Linux system (default is `/opt/Xilinx/<Version>`): - - sudo <ise install path>/ISE_DS/common/bin/lin64/digilent/install_digilent.sh - -Afterwards either reboot or force udev to reload its rules by: - - sudo udevadm control --reload + sudo `find /opt/Xilinx/Vivado/<Version> -name install_digilent.sh` The USRP-X series device should now be usable with all the tools mentioned above. @@ -304,9 +297,16 @@ that the requested image is already loaded onto the FPGA then it will not reload \subsection x3x0_load_fpga_imgs_jtag Use JTAG to load FPGA images The USRP-X Series device features an on-board USB-JTAG programmer that can be accessed on the front-panel -of the device. The iMPACT tool in the <a href="http://www.xilinx.com/support/download/index.htm">Xilinx Programming Tools (ISE, iMPACT)</a> package can be used to load an image over the JTAG interface. This can be useful for unbricking devices. +of the device. There are multiple tools available to access the FPGA through the JTAG connector (see \ref x3x0_jtag). + +If you have Vivado installed, we provide a command-line script to flash images. Make sure your X3x0 is powered on and connected to your computer using the front panel USB JTAG connector (USB 2.0 is fine for this). Head to the X3x0 FPGA directory, then run the following commands: + + $ cd uhd/fpga-src/usrp3/top/x300 # Assuming this is where the FPGA code is checked out + $ source ./setupenv.sh + $ viv_jtag_program /path/to/bitfile.bit + -If you have iMPACT installed, you can use the `impact_jtag_programmer.sh` tool to install images. Make sure your X3x0 is powered on and connected to your computer using the front panel USB JTAG connector (USB 2.0 is fine for this). Then run the tool: +If you have iMPACT installed, you can use the `impact_jtag_programmer.sh` tool to install images. Then run the tool: <path_to_uhd_tools>/impact_jtag_programmer.sh --fpga-path=<fpga_image_path> diff --git a/host/include/config.h.in b/host/include/config.h.in index b1958ae42..0e8982488 100644 --- a/host/include/config.h.in +++ b/host/include/config.h.in @@ -23,4 +23,6 @@ #cmakedefine UHD_VERSION_ABI ${UHD_VERSION_ABI} #cmakedefine UHD_VERSION_PATCH ${UHD_VERSION_PATCH} #cmakedefine ENABLE_USB +#ifndef UHD_VERSION #cmakedefine UHD_VERSION @UHD_VERSION_ADDED@ +#endif diff --git a/host/include/uhd/rfnoc/block_ctrl_base.hpp b/host/include/uhd/rfnoc/block_ctrl_base.hpp index 724e155bb..778ded043 100644 --- a/host/include/uhd/rfnoc/block_ctrl_base.hpp +++ b/host/include/uhd/rfnoc/block_ctrl_base.hpp @@ -304,7 +304,7 @@ public: * * TODO: Find better name (it disconnects, clears FC...) */ - void clear(const size_t port = 0/* reserved, currently not used */); + void clear(); /*********************************************************************** * Argument handling diff --git a/host/lib/device.cpp b/host/lib/device.cpp index ff4bbc212..c75ecad77 100644 --- a/host/lib/device.cpp +++ b/host/lib/device.cpp @@ -162,13 +162,11 @@ device::sptr device::make(const device_addr_t &hint, device_filter_t filter, siz static uhd::dict<size_t, boost::weak_ptr<device> > hash_to_device; //try to find an existing device - try{ - UHD_ASSERT_THROW(hash_to_device.has_key(dev_hash)); - UHD_ASSERT_THROW(not hash_to_device[dev_hash].expired()); + if (hash_to_device.has_key(dev_hash) and not hash_to_device[dev_hash].expired()){ return hash_to_device[dev_hash].lock(); } - //create and register a new device - catch(const uhd::assertion_error &){ + else { + //create and register a new device device::sptr dev = maker(dev_addr); hash_to_device[dev_hash] = dev; return dev; diff --git a/host/lib/rfnoc/block_ctrl_base.cpp b/host/lib/rfnoc/block_ctrl_base.cpp index 20299a3c3..fa4928a69 100644 --- a/host/lib/rfnoc/block_ctrl_base.cpp +++ b/host/lib/rfnoc/block_ctrl_base.cpp @@ -408,7 +408,7 @@ void block_ctrl_base::clear_command_time(const size_t port) iface_sptr->set_time(time_spec_t(0.0)); } -void block_ctrl_base::clear(const size_t /* port */) +void block_ctrl_base::clear() { UHD_RFNOC_BLOCK_TRACE() << "block_ctrl_base::clear() " << std::endl; // Call parent... diff --git a/host/lib/rfnoc/legacy_compat.cpp b/host/lib/rfnoc/legacy_compat.cpp index e1eff757e..b660a21c7 100644 --- a/host/lib/rfnoc/legacy_compat.cpp +++ b/host/lib/rfnoc/legacy_compat.cpp @@ -103,6 +103,15 @@ uhd::meta_range_t lambda_const_meta_range(const double start, const double stop, { return uhd::meta_range_t(start, stop, step); } + +/*! Recreate passed property without bound subscribers. Maintains current property value. +*/ +template <typename T> +static void recreate_property(const uhd::fs_path &path, uhd::property_tree::sptr &tree) { + T temp = tree->access<T>(path).get(); + tree->remove(path); + tree->create<T>(path).set(temp); +} /************************************************************************ * Class Definition ***********************************************************************/ @@ -169,6 +178,11 @@ public: } } + ~legacy_compat_impl() + { + remove_prop_subscribers(); + } + /************************************************************************ * API Calls ***********************************************************************/ @@ -590,6 +604,24 @@ private: // methods } } + + /*! Remove properties with bound functions in property tree and recreate + */ + void remove_prop_subscribers() + { + for (size_t mboard_idx = 0; mboard_idx < _num_mboards; mboard_idx++) { + uhd::fs_path root = mb_root(mboard_idx); + // Subdev specs + if (_tree->exists(root / "tx_subdev_spec")) { + recreate_property<subdev_spec_t>(root / "tx_subdev_spec", _tree); + } + + if (_tree->exists(root / "rx_subdev_spec")) { + recreate_property<subdev_spec_t>(root / "rx_subdev_spec", _tree); + } + } + } + /*! Default block connections. * * Tx connections: diff --git a/host/lib/transport/muxed_zero_copy_if.cpp b/host/lib/transport/muxed_zero_copy_if.cpp index 7a2b76165..37bea7355 100644 --- a/host/lib/transport/muxed_zero_copy_if.cpp +++ b/host/lib/transport/muxed_zero_copy_if.cpp @@ -106,7 +106,7 @@ private: stream_mrb(size_t size) : _buff(new char[size]) {} ~stream_mrb() { - delete _buff; + delete[] _buff; } void release() {} @@ -118,7 +118,7 @@ private: } private: - char *_buff; + char *_buff; }; class stream_impl : public zero_copy_if diff --git a/host/lib/transport/nirio/niriok_proxy_impl_v1.cpp b/host/lib/transport/nirio/niriok_proxy_impl_v1.cpp index 444e98f1b..dbe9e4abd 100644 --- a/host/lib/transport/nirio/niriok_proxy_impl_v1.cpp +++ b/host/lib/transport/nirio/niriok_proxy_impl_v1.cpp @@ -49,11 +49,11 @@ const uint32_t NIRIO_IOCTL_GET_IFACE_NUM = METHOD_BUFFERED, FILE_READ_DATA); ///< Get the interface number for a device -const uint32_t NIRIO_IOCTL_GET_SESSION = - CTL_CODE(FILE_DEVICE_UNKNOWN, - NIRIO_IOCTL_BASE + 8, - METHOD_BUFFERED, - FILE_READ_ACCESS); ///< Gets a previously opened session to a device +//const uint32_t NIRIO_IOCTL_GET_SESSION = + //CTL_CODE(FILE_DEVICE_UNKNOWN, + //NIRIO_IOCTL_BASE + 8, + //METHOD_BUFFERED, + //FILE_READ_ACCESS); ///< Gets a previously opened session to a device const uint32_t NIRIO_IOCTL_POST_OPEN = CTL_CODE(FILE_DEVICE_UNKNOWN, diff --git a/host/lib/transport/nirio_zero_copy.cpp b/host/lib/transport/nirio_zero_copy.cpp index 1eb431a19..8bec49a5f 100644 --- a/host/lib/transport/nirio_zero_copy.cpp +++ b/host/lib/transport/nirio_zero_copy.cpp @@ -75,7 +75,6 @@ private: nirio_fifo<fifo_data_t>& _fifo; fifo_data_t* _typed_buffer; const size_t _frame_size; - size_t _num_frames; }; class nirio_zero_copy_msb : public managed_send_buffer @@ -116,7 +115,6 @@ private: nirio_fifo<fifo_data_t>& _fifo; fifo_data_t* _typed_buffer; const size_t _frame_size; - size_t _num_frames; }; class nirio_zero_copy_impl : public nirio_zero_copy { diff --git a/host/lib/transport/udp_zero_copy.cpp b/host/lib/transport/udp_zero_copy.cpp index 70fb5b552..036a84a05 100644 --- a/host/lib/transport/udp_zero_copy.cpp +++ b/host/lib/transport/udp_zero_copy.cpp @@ -32,7 +32,7 @@ using namespace uhd::transport; namespace asio = boost::asio; //A reasonable number of frames for send/recv and async/sync -static const size_t DEFAULT_NUM_FRAMES = 32; +//static const size_t DEFAULT_NUM_FRAMES = 32; /*********************************************************************** * Check registry for correct fast-path setting (windows only) diff --git a/host/lib/usrp/b100/b100_impl.cpp b/host/lib/usrp/b100/b100_impl.cpp index d0b9d835d..1a38bf3b7 100644 --- a/host/lib/usrp/b100/b100_impl.cpp +++ b/host/lib/usrp/b100/b100_impl.cpp @@ -39,8 +39,6 @@ using namespace uhd::transport; const uint16_t B100_VENDOR_ID = 0x2500; const uint16_t B100_PRODUCT_ID = 0x0002; -const uint16_t FX2_VENDOR_ID = 0x04b4; -const uint16_t FX2_PRODUCT_ID = 0x8613; static const boost::posix_time::milliseconds REENUMERATION_TIMEOUT_MS(3000); /*********************************************************************** diff --git a/host/lib/usrp/b200/b200_iface.cpp b/host/lib/usrp/b200/b200_iface.cpp index 4e6dd2144..6f9bdd330 100644 --- a/host/lib/usrp/b200/b200_iface.cpp +++ b/host/lib/usrp/b200/b200_iface.cpp @@ -59,7 +59,7 @@ const static uint8_t B200_VREQ_SET_FW_HASH = 0x1E; const static uint8_t B200_VREQ_GET_FW_HASH = 0x1F; const static uint8_t B200_VREQ_LOOP = 0x22; const static uint8_t B200_VREQ_FPGA_CONFIG = 0x55; -const static uint8_t B200_VREQ_FPGA_RESET = 0x62; +//const static uint8_t B200_VREQ_FPGA_RESET = 0x62; const static uint8_t B200_VREQ_GPIF_RESET = 0x72; const static uint8_t B200_VREQ_GET_USB = 0x80; const static uint8_t B200_VREQ_GET_STATUS = 0x83; diff --git a/host/lib/usrp/common/adf5355.cpp b/host/lib/usrp/common/adf5355.cpp index ee9b54622..ee9d1d1d9 100644 --- a/host/lib/usrp/common/adf5355.cpp +++ b/host/lib/usrp/common/adf5355.cpp @@ -34,21 +34,21 @@ double todbl(data_t val) { } static const double ADF5355_DOUBLER_MAX_REF_FREQ = 60e6; -static const double ADF5355_MAX_FREQ_PFD = 125e6; -static const double ADF5355_PRESCALER_THRESH = 7e9; +//static const double ADF5355_MAX_FREQ_PFD = 125e6; +//static const double ADF5355_PRESCALER_THRESH = 7e9; static const double ADF5355_MIN_VCO_FREQ = 3.4e9; -static const double ADF5355_MAX_VCO_FREQ = 6.8e9; +//static const double ADF5355_MAX_VCO_FREQ = 6.8e9; static const double ADF5355_MAX_OUT_FREQ = 6.8e9; static const double ADF5355_MIN_OUT_FREQ = (3.4e9 / 64); -static const double ADF5355_MAX_OUTB_FREQ = (6.8e9 * 2); -static const double ADF5355_MIN_OUTB_FREQ = (3.4e9 * 2); +//static const double ADF5355_MAX_OUTB_FREQ = (6.8e9 * 2); +//static const double ADF5355_MIN_OUTB_FREQ = (3.4e9 * 2); static const double ADF5355_PHASE_RESYNC_TIME = 400e-6; static const uint32_t ADF5355_MOD1 = 16777216; static const uint32_t ADF5355_MAX_MOD2 = 16384; -static const uint16_t ADF5355_MIN_INT_PRESCALER_89 = 75; +//static const uint16_t ADF5355_MIN_INT_PRESCALER_89 = 75; class adf5355_impl : public adf5355_iface { diff --git a/host/lib/usrp/cores/dma_fifo_core_3000.cpp b/host/lib/usrp/cores/dma_fifo_core_3000.cpp index 908ba906e..e1a841b96 100644 --- a/host/lib/usrp/cores/dma_fifo_core_3000.cpp +++ b/host/lib/usrp/cores/dma_fifo_core_3000.cpp @@ -223,7 +223,7 @@ public: public: dma_fifo_core_3000_impl(wb_iface::sptr iface, const size_t base, const size_t readback): - _iface(iface), _base(base), _fifo_readback(iface, base, readback), + _iface(iface), _fifo_readback(iface, base, readback), _fifo_ctrl_reg(base), _base_addr_reg(base), _addr_mask_reg(base), _bist_ctrl_reg(base), _bist_cfg_reg(base), _bist_delay_reg(base), _bist_sid_reg(base) { @@ -368,7 +368,6 @@ private: private: wb_iface::sptr _iface; - const size_t _base; boost::mutex _mutex; bool _has_ext_bist; diff --git a/host/lib/usrp/dboard/db_ubx.cpp b/host/lib/usrp/dboard/db_ubx.cpp index 05a02c321..82472fd9b 100644 --- a/host/lib/usrp/dboard/db_ubx.cpp +++ b/host/lib/usrp/dboard/db_ubx.cpp @@ -1246,8 +1246,6 @@ private: power_mode_t _power_mode; std::string _xcvr_mode; size_t _rev; - double _prev_tx_freq; - double _prev_rx_freq; ubx_gpio_reg_t _tx_gpio_reg; ubx_gpio_reg_t _rx_gpio_reg; int64_t _tx_sync_delay; diff --git a/host/lib/usrp/usrp1/usrp1_impl.cpp b/host/lib/usrp/usrp1/usrp1_impl.cpp index baecc6081..09352c5e0 100644 --- a/host/lib/usrp/usrp1/usrp1_impl.cpp +++ b/host/lib/usrp/usrp1/usrp1_impl.cpp @@ -38,8 +38,6 @@ using namespace uhd::transport; const uint16_t USRP1_VENDOR_ID = 0xfffe; const uint16_t USRP1_PRODUCT_ID = 0x0002; -const uint16_t FX2_VENDOR_ID = 0x04b4; -const uint16_t FX2_PRODUCT_ID = 0x8613; static const boost::posix_time::milliseconds REENUMERATION_TIMEOUT_MS(3000); const std::vector<usrp1_impl::dboard_slot_t> usrp1_impl::_dboard_slots = boost::assign::list_of diff --git a/host/lib/usrp/usrp2/io_impl.cpp b/host/lib/usrp/usrp2/io_impl.cpp index ae39028a1..199436fa2 100644 --- a/host/lib/usrp/usrp2/io_impl.cpp +++ b/host/lib/usrp/usrp2/io_impl.cpp @@ -50,10 +50,6 @@ static UHD_INLINE pt::time_duration to_time_dur(double timeout){ return pt::microseconds(long(timeout*1e6)); } -static UHD_INLINE double from_time_dur(const pt::time_duration &time_dur){ - return 1e-6*time_dur.total_microseconds(); -} - /*********************************************************************** * constants **********************************************************************/ diff --git a/host/lib/usrp/usrp2/usrp2_iface.cpp b/host/lib/usrp/usrp2/usrp2_iface.cpp index 522d6c6d0..021f0e3e5 100644 --- a/host/lib/usrp/usrp2/usrp2_iface.cpp +++ b/host/lib/usrp/usrp2/usrp2_iface.cpp @@ -62,7 +62,7 @@ static const uint32_t MIN_PROTO_COMPAT_I2C = 7; // The register compat number must reflect the protocol compatibility // and the compatibility of the register mapping (more likely to change). static const uint32_t MIN_PROTO_COMPAT_REG = 10; -static const uint32_t MIN_PROTO_COMPAT_UART = 7; +//static const uint32_t MIN_PROTO_COMPAT_UART = 7; class usrp2_iface_impl : public usrp2_iface{ public: diff --git a/host/lib/utils/gain_group.cpp b/host/lib/utils/gain_group.cpp index e907a6573..9428702d1 100644 --- a/host/lib/utils/gain_group.cpp +++ b/host/lib/utils/gain_group.cpp @@ -27,8 +27,6 @@ using namespace uhd; -static const bool verbose = false; - static bool compare_by_step_size( const size_t &rhs, const size_t &lhs, std::vector<gain_fcns_t> &fcns ){ |