aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/usrp')
-rw-r--r--host/lib/usrp/b100/b100_impl.cpp22
-rw-r--r--host/lib/usrp/b100/b100_impl.hpp10
-rw-r--r--host/lib/usrp/b100/b100_regs.hpp2
-rw-r--r--host/lib/usrp/b100/clock_ctrl.cpp38
-rw-r--r--host/lib/usrp/b100/codec_ctrl.cpp38
-rw-r--r--host/lib/usrp/b100/dboard_iface.cpp74
-rw-r--r--host/lib/usrp/b100/io_impl.cpp4
-rw-r--r--host/lib/usrp/b100/usb_zero_copy_wrapper.cpp6
-rw-r--r--host/lib/usrp/b200/b200_cores.cpp4
-rw-r--r--host/lib/usrp/b200/b200_cores.hpp4
-rw-r--r--host/lib/usrp/b200/b200_iface.cpp112
-rw-r--r--host/lib/usrp/b200/b200_iface.hpp38
-rw-r--r--host/lib/usrp/b200/b200_image_loader.cpp2
-rw-r--r--host/lib/usrp/b200/b200_impl.cpp52
-rw-r--r--host/lib/usrp/b200/b200_impl.hpp40
-rw-r--r--host/lib/usrp/b200/b200_io_impl.cpp28
-rw-r--r--host/lib/usrp/b200/b200_regs.hpp54
-rw-r--r--host/lib/usrp/b200/b200_uart.cpp20
-rw-r--r--host/lib/usrp/b200/b200_uart.hpp2
-rw-r--r--host/lib/usrp/common/ad9361_ctrl.cpp42
-rw-r--r--host/lib/usrp/common/ad9361_ctrl.hpp6
-rw-r--r--host/lib/usrp/common/ad9361_driver/ad9361_client.h12
-rw-r--r--host/lib/usrp/common/ad9361_driver/ad9361_device.cpp296
-rw-r--r--host/lib/usrp/common/ad9361_driver/ad9361_device.h34
-rw-r--r--host/lib/usrp/common/ad9361_driver/ad9361_filter_taps.h18
-rw-r--r--host/lib/usrp/common/ad9361_driver/ad9361_gain_tables.h8
-rw-r--r--host/lib/usrp/common/ad936x_manager.cpp8
-rw-r--r--host/lib/usrp/common/adf4001_ctrl.cpp60
-rw-r--r--host/lib/usrp/common/adf4001_ctrl.hpp14
-rw-r--r--host/lib/usrp/common/adf435x.hpp46
-rw-r--r--host/lib/usrp/common/adf5355.cpp54
-rw-r--r--host/lib/usrp/common/adf5355.hpp3
-rw-r--r--host/lib/usrp/common/async_packet_handler.hpp4
-rw-r--r--host/lib/usrp/common/fifo_ctrl_excelsior.cpp50
-rw-r--r--host/lib/usrp/common/fx2_ctrl.cpp40
-rw-r--r--host/lib/usrp/common/fx2_ctrl.hpp24
-rw-r--r--host/lib/usrp/common/max287x.hpp22
-rw-r--r--host/lib/usrp/common/recv_packet_demuxer.cpp16
-rw-r--r--host/lib/usrp/common/recv_packet_demuxer.hpp4
-rw-r--r--host/lib/usrp/common/recv_packet_demuxer_3000.hpp20
-rw-r--r--host/lib/usrp/common/usrp3_fw_ctrl_iface.cpp50
-rw-r--r--host/lib/usrp/common/usrp3_fw_ctrl_iface.hpp22
-rw-r--r--host/lib/usrp/cores/dma_fifo_core_3000.cpp64
-rw-r--r--host/lib/usrp/cores/dma_fifo_core_3000.hpp16
-rw-r--r--host/lib/usrp/cores/dsp_core_utils.cpp4
-rw-r--r--host/lib/usrp/cores/gpio_atr_3000.cpp54
-rw-r--r--host/lib/usrp/cores/gpio_atr_3000.hpp32
-rw-r--r--host/lib/usrp/cores/gpio_core_200.cpp58
-rw-r--r--host/lib/usrp/cores/gpio_core_200.hpp24
-rw-r--r--host/lib/usrp/cores/i2c_core_100.cpp12
-rw-r--r--host/lib/usrp/cores/i2c_core_100_wb32.cpp14
-rw-r--r--host/lib/usrp/cores/i2c_core_200.cpp16
-rw-r--r--host/lib/usrp/cores/radio_ctrl_core_3000.cpp48
-rw-r--r--host/lib/usrp/cores/radio_ctrl_core_3000.hpp4
-rw-r--r--host/lib/usrp/cores/rx_dsp_core_200.cpp32
-rw-r--r--host/lib/usrp/cores/rx_dsp_core_200.hpp2
-rw-r--r--host/lib/usrp/cores/rx_dsp_core_3000.cpp10
-rw-r--r--host/lib/usrp/cores/rx_frontend_core_200.cpp8
-rw-r--r--host/lib/usrp/cores/rx_frontend_core_3000.cpp12
-rw-r--r--host/lib/usrp/cores/rx_vita_core_3000.cpp18
-rw-r--r--host/lib/usrp/cores/rx_vita_core_3000.hpp2
-rw-r--r--host/lib/usrp/cores/spi_core_100.cpp6
-rw-r--r--host/lib/usrp/cores/spi_core_3000.cpp10
-rw-r--r--host/lib/usrp/cores/time64_core_200.cpp24
-rw-r--r--host/lib/usrp/cores/time_core_3000.cpp22
-rw-r--r--host/lib/usrp/cores/tx_dsp_core_200.cpp14
-rw-r--r--host/lib/usrp/cores/tx_dsp_core_200.hpp2
-rw-r--r--host/lib/usrp/cores/tx_dsp_core_3000.cpp8
-rw-r--r--host/lib/usrp/cores/tx_frontend_core_200.cpp10
-rw-r--r--host/lib/usrp/cores/user_settings_core_200.hpp2
-rw-r--r--host/lib/usrp/cores/user_settings_core_3000.cpp26
-rw-r--r--host/lib/usrp/dboard/db_cbx.cpp4
-rw-r--r--host/lib/usrp/dboard/db_dbsrx.cpp26
-rw-r--r--host/lib/usrp/dboard/db_dbsrx2.cpp28
-rw-r--r--host/lib/usrp/dboard/db_rfx.cpp4
-rw-r--r--host/lib/usrp/dboard/db_sbx_common.cpp4
-rw-r--r--host/lib/usrp/dboard/db_sbx_common.hpp6
-rw-r--r--host/lib/usrp/dboard/db_sbx_version3.cpp4
-rw-r--r--host/lib/usrp/dboard/db_sbx_version4.cpp4
-rw-r--r--host/lib/usrp/dboard/db_tvrx.cpp6
-rw-r--r--host/lib/usrp/dboard/db_tvrx2.cpp128
-rw-r--r--host/lib/usrp/dboard/db_twinrx.cpp8
-rw-r--r--host/lib/usrp/dboard/db_wbx_common.cpp8
-rw-r--r--host/lib/usrp/dboard/db_wbx_common.hpp2
-rw-r--r--host/lib/usrp/dboard/db_wbx_version3.cpp2
-rw-r--r--host/lib/usrp/dboard/db_wbx_version4.cpp4
-rw-r--r--host/lib/usrp/dboard/db_xcvr2450.cpp6
-rw-r--r--host/lib/usrp/dboard/twinrx/twinrx_ctrl.cpp16
-rw-r--r--host/lib/usrp/dboard/twinrx/twinrx_ctrl.hpp6
-rw-r--r--host/lib/usrp/dboard/twinrx/twinrx_experts.hpp20
-rw-r--r--host/lib/usrp/dboard/twinrx/twinrx_gain_tables.hpp8
-rw-r--r--host/lib/usrp/dboard/twinrx/twinrx_io.hpp30
-rw-r--r--host/lib/usrp/dboard_eeprom.cpp28
-rw-r--r--host/lib/usrp/dboard_id.cpp10
-rw-r--r--host/lib/usrp/device3/device3_impl.hpp4
-rw-r--r--host/lib/usrp/device3/device3_io_impl.cpp22
-rw-r--r--host/lib/usrp/e100/clock_ctrl.cpp24
-rw-r--r--host/lib/usrp/e100/codec_ctrl.cpp36
-rw-r--r--host/lib/usrp/e100/dboard_iface.cpp74
-rw-r--r--host/lib/usrp/e100/e100_ctrl.cpp10
-rw-r--r--host/lib/usrp/e100/e100_impl.cpp8
-rw-r--r--host/lib/usrp/e100/e100_impl.hpp8
-rw-r--r--host/lib/usrp/e100/e100_regs.hpp2
-rw-r--r--host/lib/usrp/e100/io_impl.cpp6
-rw-r--r--host/lib/usrp/e300/e300_eeprom_manager.cpp40
-rw-r--r--host/lib/usrp/e300/e300_eeprom_manager.hpp48
-rw-r--r--host/lib/usrp/e300/e300_fifo_config.cpp14
-rw-r--r--host/lib/usrp/e300/e300_fpga_defs.hpp4
-rw-r--r--host/lib/usrp/e300/e300_global_regs.cpp34
-rw-r--r--host/lib/usrp/e300/e300_global_regs.hpp12
-rw-r--r--host/lib/usrp/e300/e300_i2c.cpp106
-rw-r--r--host/lib/usrp/e300/e300_i2c.hpp46
-rw-r--r--host/lib/usrp/e300/e300_impl.cpp70
-rw-r--r--host/lib/usrp/e300/e300_impl.hpp66
-rw-r--r--host/lib/usrp/e300/e300_io_impl.cpp36
-rw-r--r--host/lib/usrp/e300/e300_network.cpp36
-rw-r--r--host/lib/usrp/e300/e300_remote_codec_ctrl.cpp116
-rw-r--r--host/lib/usrp/e300/e300_remote_codec_ctrl.hpp50
-rw-r--r--host/lib/usrp/e300/e300_sensor_manager.cpp14
-rw-r--r--host/lib/usrp/e300/e300_sensor_manager.hpp14
-rw-r--r--host/lib/usrp/e300/e300_spi.cpp18
-rw-r--r--host/lib/usrp/gps_ctrl.cpp6
-rw-r--r--host/lib/usrp/gpsd_iface.cpp10
-rw-r--r--host/lib/usrp/gpsd_iface.hpp4
-rw-r--r--host/lib/usrp/mboard_eeprom.cpp74
-rw-r--r--host/lib/usrp/multi_usrp.cpp50
-rw-r--r--host/lib/usrp/n230/n230_clk_pps_ctrl.cpp2
-rw-r--r--host/lib/usrp/n230/n230_cores.cpp4
-rw-r--r--host/lib/usrp/n230/n230_cores.hpp4
-rw-r--r--host/lib/usrp/n230/n230_eeprom_manager.cpp50
-rw-r--r--host/lib/usrp/n230/n230_eeprom_manager.hpp4
-rw-r--r--host/lib/usrp/n230/n230_fpga_defs.h6
-rw-r--r--host/lib/usrp/n230/n230_frontend_ctrl.cpp26
-rw-r--r--host/lib/usrp/n230/n230_image_loader.cpp46
-rw-r--r--host/lib/usrp/n230/n230_impl.cpp16
-rw-r--r--host/lib/usrp/n230/n230_resource_manager.cpp58
-rw-r--r--host/lib/usrp/n230/n230_resource_manager.hpp12
-rw-r--r--host/lib/usrp/n230/n230_stream_manager.cpp26
-rw-r--r--host/lib/usrp/n230/n230_stream_manager.hpp6
-rw-r--r--host/lib/usrp/n230/n230_uart.cpp20
-rw-r--r--host/lib/usrp/n230/n230_uart.hpp2
-rw-r--r--host/lib/usrp/usrp1/codec_ctrl.cpp38
-rw-r--r--host/lib/usrp/usrp1/dboard_iface.cpp94
-rw-r--r--host/lib/usrp/usrp1/io_impl.cpp12
-rw-r--r--host/lib/usrp/usrp1/usrp1_calc_mux.hpp4
-rw-r--r--host/lib/usrp/usrp1/usrp1_iface.cpp44
-rw-r--r--host/lib/usrp/usrp1/usrp1_impl.cpp30
-rw-r--r--host/lib/usrp/usrp1/usrp1_impl.hpp2
-rw-r--r--host/lib/usrp/usrp2/clock_ctrl.cpp6
-rw-r--r--host/lib/usrp/usrp2/codec_ctrl.cpp12
-rw-r--r--host/lib/usrp/usrp2/dboard_iface.cpp74
-rw-r--r--host/lib/usrp/usrp2/io_impl.cpp30
-rw-r--r--host/lib/usrp/usrp2/n200_image_loader.cpp64
-rw-r--r--host/lib/usrp/usrp2/usrp2_fifo_ctrl.cpp48
-rw-r--r--host/lib/usrp/usrp2/usrp2_iface.cpp72
-rw-r--r--host/lib/usrp/usrp2/usrp2_iface.hpp4
-rw-r--r--host/lib/usrp/usrp2/usrp2_impl.cpp20
-rw-r--r--host/lib/usrp/usrp2/usrp2_impl.hpp4
-rw-r--r--host/lib/usrp/x300/x300_adc_ctrl.cpp6
-rw-r--r--host/lib/usrp/x300/x300_adc_ctrl.hpp2
-rw-r--r--host/lib/usrp/x300/x300_adc_dac_utils.cpp26
-rw-r--r--host/lib/usrp/x300/x300_clock_ctrl.cpp42
-rw-r--r--host/lib/usrp/x300/x300_dac_ctrl.cpp2
-rw-r--r--host/lib/usrp/x300/x300_dboard_iface.cpp32
-rw-r--r--host/lib/usrp/x300/x300_dboard_iface.hpp30
-rw-r--r--host/lib/usrp/x300/x300_fw_ctrl.cpp44
-rw-r--r--host/lib/usrp/x300/x300_fw_uart.cpp16
-rw-r--r--host/lib/usrp/x300/x300_image_loader.cpp36
-rw-r--r--host/lib/usrp/x300/x300_impl.cpp72
-rw-r--r--host/lib/usrp/x300/x300_impl.hpp2
-rw-r--r--host/lib/usrp/x300/x300_radio_ctrl_impl.cpp30
-rw-r--r--host/lib/usrp/x300/x300_radio_ctrl_impl.hpp4
-rw-r--r--host/lib/usrp/x300/x300_regs.hpp6
173 files changed, 2286 insertions, 2285 deletions
diff --git a/host/lib/usrp/b100/b100_impl.cpp b/host/lib/usrp/b100/b100_impl.cpp
index eec9f0e9a..d0b9d835d 100644
--- a/host/lib/usrp/b100/b100_impl.cpp
+++ b/host/lib/usrp/b100/b100_impl.cpp
@@ -37,10 +37,10 @@ using namespace uhd;
using namespace uhd::usrp;
using namespace uhd::transport;
-const boost::uint16_t B100_VENDOR_ID = 0x2500;
-const boost::uint16_t B100_PRODUCT_ID = 0x0002;
-const boost::uint16_t FX2_VENDOR_ID = 0x04b4;
-const boost::uint16_t FX2_PRODUCT_ID = 0x8613;
+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);
/***********************************************************************
@@ -57,11 +57,11 @@ static device_addrs_t b100_find(const device_addr_t &hint)
//since an address and resource is intended for a different, non-USB, device.
if (hint.has_key("addr") || hint.has_key("resource")) return b100_addrs;
- boost::uint16_t vid, pid;
+ uint16_t vid, pid;
if(hint.has_key("vid") && hint.has_key("pid") && hint.has_key("type") && hint["type"] == "b100") {
- vid = uhd::cast::hexstr_cast<boost::uint16_t>(hint.get("vid"));
- pid = uhd::cast::hexstr_cast<boost::uint16_t>(hint.get("pid"));
+ vid = uhd::cast::hexstr_cast<uint16_t>(hint.get("vid"));
+ pid = uhd::cast::hexstr_cast<uint16_t>(hint.get("pid"));
} else {
vid = B100_VENDOR_ID;
pid = B100_PRODUCT_ID;
@@ -261,7 +261,7 @@ b100_impl::b100_impl(const device_addr_t &device_addr){
//let packet padder know the LUT size in number of words32
const size_t rx_lut_size = size_t(data_xport_args.cast<double>("recv_frame_size", 0.0));
- _fifo_ctrl->poke32(TOREG(SR_PADDER+0), rx_lut_size/sizeof(boost::uint32_t));
+ _fifo_ctrl->poke32(TOREG(SR_PADDER+0), rx_lut_size/sizeof(uint32_t));
_data_transport = usb_zero_copy_make_wrapper(
usb_zero_copy::make(
@@ -526,7 +526,7 @@ b100_impl::~b100_impl(void){
void b100_impl::check_fw_compat(void){
unsigned char data[4]; //useless data buffer
- const boost::uint16_t fw_compat_num = _fx2_ctrl->usrp_control_read(
+ const uint16_t fw_compat_num = _fx2_ctrl->usrp_control_read(
VRQ_FW_COMPAT, 0, 0, data, sizeof(data)
);
if (fw_compat_num != B100_FW_COMPAT_NUM){
@@ -540,8 +540,8 @@ void b100_impl::check_fw_compat(void){
}
void b100_impl::check_fpga_compat(void){
- const boost::uint32_t fpga_compat_num = _fifo_ctrl->peek32(REG_RB_COMPAT);
- boost::uint16_t fpga_major = fpga_compat_num >> 16, fpga_minor = fpga_compat_num & 0xffff;
+ const uint32_t fpga_compat_num = _fifo_ctrl->peek32(REG_RB_COMPAT);
+ uint16_t fpga_major = fpga_compat_num >> 16, fpga_minor = fpga_compat_num & 0xffff;
if (fpga_major == 0){ //old version scheme
fpga_major = fpga_minor;
fpga_minor = 0;
diff --git a/host/lib/usrp/b100/b100_impl.hpp b/host/lib/usrp/b100/b100_impl.hpp
index 7f37030d2..ba4b3cd90 100644
--- a/host/lib/usrp/b100/b100_impl.hpp
+++ b/host/lib/usrp/b100/b100_impl.hpp
@@ -46,11 +46,11 @@
static const double B100_LINK_RATE_BPS = 256e6/5; //pratical link rate (< 480 Mbps)
static const std::string B100_FW_FILE_NAME = "usrp_b100_fw.ihx";
static const std::string B100_FPGA_FILE_NAME = "usrp_b100_fpga.bin";
-static const boost::uint16_t B100_FW_COMPAT_NUM = 4;
-static const boost::uint16_t B100_FPGA_COMPAT_NUM = 11;
-static const boost::uint32_t B100_RX_SID_BASE = 30;
-static const boost::uint32_t B100_TX_ASYNC_SID = 10;
-static const boost::uint32_t B100_CTRL_MSG_SID = 20;
+static const uint16_t B100_FW_COMPAT_NUM = 4;
+static const uint16_t B100_FPGA_COMPAT_NUM = 11;
+static const uint32_t B100_RX_SID_BASE = 30;
+static const uint32_t B100_TX_ASYNC_SID = 10;
+static const uint32_t B100_CTRL_MSG_SID = 20;
static const double B100_DEFAULT_TICK_RATE = 64e6;
static const size_t B100_MAX_PKT_BYTE_LIMIT = 2048;
static const std::string B100_EEPROM_MAP_KEY = "B100";
diff --git a/host/lib/usrp/b100/b100_regs.hpp b/host/lib/usrp/b100/b100_regs.hpp
index 48eb0460d..1498613f5 100644
--- a/host/lib/usrp/b100/b100_regs.hpp
+++ b/host/lib/usrp/b100/b100_regs.hpp
@@ -18,7 +18,7 @@
#ifndef INCLUDED_B100_REGS_HPP
#define INCLUDED_B100_REGS_HPP
-#include <boost/cstdint.hpp>
+#include <stdint.h>
#define TOREG(x) ((x)*4)
diff --git a/host/lib/usrp/b100/clock_ctrl.cpp b/host/lib/usrp/b100/clock_ctrl.cpp
index 85f318470..5700a321a 100644
--- a/host/lib/usrp/b100/clock_ctrl.cpp
+++ b/host/lib/usrp/b100/clock_ctrl.cpp
@@ -22,7 +22,7 @@
#include <uhd/exception.hpp>
#include <uhd/utils/assert_has.hpp>
#include <uhd/utils/safe_call.hpp>
-#include <boost/cstdint.hpp>
+#include <stdint.h>
#include "b100_regs.hpp" //spi slave constants
#include <boost/assign/list_of.hpp>
#include <boost/foreach.hpp>
@@ -119,8 +119,8 @@ static clock_settings_type get_clock_settings(double rate){
//X = chan_div * vco_div * R
//Y = P*B + A
- const boost::uint64_t out_rate = boost::uint64_t(rate);
- const boost::uint64_t ref_rate = boost::uint64_t(cs.get_ref_rate());
+ const uint64_t out_rate = uint64_t(rate);
+ const uint64_t ref_rate = uint64_t(cs.get_ref_rate());
const size_t gcd = size_t(boost::math::gcd(ref_rate, out_rate));
for (size_t i = 1; i <= 100; i++){
@@ -446,8 +446,8 @@ public:
}
bool get_locked(void){
- static const boost::uint8_t addr = 0x01F;
- boost::uint32_t reg = this->read_reg(addr);
+ static const uint8_t addr = 0x01F;
+ uint32_t reg = this->read_reg(addr);
_ad9522_regs.set_reg(addr, reg);
return _ad9522_regs.digital_lock_detect != 0;
}
@@ -464,26 +464,26 @@ private:
this->send_reg(0x232);
}
- void send_reg(boost::uint16_t addr){
- boost::uint32_t reg = _ad9522_regs.get_write_reg(addr);
+ void send_reg(uint16_t addr){
+ uint32_t reg = _ad9522_regs.get_write_reg(addr);
UHD_LOGV(often) << "clock control write reg: " << std::hex << reg << std::endl;
byte_vector_t buf;
- buf.push_back(boost::uint8_t(reg >> 16));
- buf.push_back(boost::uint8_t(reg >> 8));
- buf.push_back(boost::uint8_t(reg & 0xff));
+ buf.push_back(uint8_t(reg >> 16));
+ buf.push_back(uint8_t(reg >> 8));
+ buf.push_back(uint8_t(reg & 0xff));
_iface->write_i2c(0x5C, buf);
}
- boost::uint8_t read_reg(boost::uint16_t addr){
+ uint8_t read_reg(uint16_t addr){
byte_vector_t buf;
- buf.push_back(boost::uint8_t(addr >> 8));
- buf.push_back(boost::uint8_t(addr & 0xff));
+ buf.push_back(uint8_t(addr >> 8));
+ buf.push_back(uint8_t(addr & 0xff));
_iface->write_i2c(0x5C, buf);
buf = _iface->read_i2c(0x5C, 1);
- return boost::uint32_t(buf[0] & 0xFF);
+ return uint32_t(buf[0] & 0xFF);
}
void calibrate_now(void){
@@ -495,10 +495,10 @@ private:
this->send_reg(0x18);
this->latch_regs();
//wait for calibration done:
- static const boost::uint8_t addr = 0x01F;
+ static const uint8_t addr = 0x01F;
for (size_t ms10 = 0; ms10 < 100; ms10++){
boost::this_thread::sleep(boost::posix_time::milliseconds(10));
- boost::uint32_t reg = read_reg(addr);
+ uint32_t reg = read_reg(addr);
_ad9522_regs.set_reg(addr, reg);
if (_ad9522_regs.vco_calibration_finished) goto wait_for_ld;
}
@@ -507,7 +507,7 @@ private:
//wait for digital lock detect:
for (size_t ms10 = 0; ms10 < 100; ms10++){
boost::this_thread::sleep(boost::posix_time::milliseconds(10));
- boost::uint32_t reg = read_reg(addr);
+ uint32_t reg = read_reg(addr);
_ad9522_regs.set_reg(addr, reg);
if (_ad9522_regs.digital_lock_detect) return;
}
@@ -525,7 +525,7 @@ private:
void send_all_regs(void){
//setup a list of register ranges to write
- typedef std::pair<boost::uint16_t, boost::uint16_t> range_t;
+ typedef std::pair<uint16_t, uint16_t> range_t;
static const std::vector<range_t> ranges = boost::assign::list_of
(range_t(0x000, 0x000)) (range_t(0x010, 0x01F))
(range_t(0x0F0, 0x0FD)) (range_t(0x190, 0x19B))
@@ -534,7 +534,7 @@ private:
//write initial register values and latch/update
BOOST_FOREACH(const range_t &range, ranges){
- for(boost::uint16_t addr = range.first; addr <= range.second; addr++){
+ for(uint16_t addr = range.first; addr <= range.second; addr++){
this->send_reg(addr);
}
}
diff --git a/host/lib/usrp/b100/codec_ctrl.cpp b/host/lib/usrp/b100/codec_ctrl.cpp
index 04fbebded..e78608beb 100644
--- a/host/lib/usrp/b100/codec_ctrl.cpp
+++ b/host/lib/usrp/b100/codec_ctrl.cpp
@@ -22,7 +22,7 @@
#include <uhd/utils/algorithm.hpp>
#include <uhd/utils/log.hpp>
#include <uhd/utils/safe_call.hpp>
-#include <boost/cstdint.hpp>
+#include <stdint.h>
#include <boost/tuple/tuple.hpp>
#include <boost/math/special_functions/round.hpp>
#include "b100_regs.hpp" //spi slave constants
@@ -59,8 +59,8 @@ public:
private:
spi_iface::sptr _iface;
ad9862_regs_t _ad9862_regs;
- void send_reg(boost::uint8_t addr);
- void recv_reg(boost::uint8_t addr);
+ void send_reg(uint8_t addr);
+ void recv_reg(uint8_t addr);
};
/***********************************************************************
@@ -109,7 +109,7 @@ b100_codec_ctrl_impl::b100_codec_ctrl_impl(spi_iface::sptr iface){
_ad9862_regs.dll_mode = ad9862_regs_t::DLL_MODE_FAST;
//write the register settings to the codec
- for (boost::uint8_t addr = 0; addr <= 25; addr++){
+ for (uint8_t addr = 0; addr <= 25; addr++){
this->send_reg(addr);
}
@@ -185,8 +185,8 @@ double b100_codec_ctrl_impl::get_rx_pga_gain(char which){
/***********************************************************************
* Codec Control AUX ADC Methods
**********************************************************************/
-static double aux_adc_to_volts(boost::uint8_t high, boost::uint8_t low){
- return double((boost::uint16_t(high) << 2) | low)*3.3/0x3ff;
+static double aux_adc_to_volts(uint8_t high, uint8_t low){
+ return double((uint16_t(high) << 2) | low)*3.3/0x3ff;
}
double b100_codec_ctrl_impl::read_aux_adc(aux_adc_t which){
@@ -227,19 +227,19 @@ double b100_codec_ctrl_impl::read_aux_adc(aux_adc_t which){
void b100_codec_ctrl_impl::write_aux_dac(aux_dac_t which, double volts){
//special case for aux dac d (aka sigma delta word)
if (which == AUX_DAC_D){
- boost::uint16_t dac_word = uhd::clip(boost::math::iround(volts*0xfff/3.3), 0, 0xfff);
- _ad9862_regs.sig_delt_11_4 = boost::uint8_t(dac_word >> 4);
- _ad9862_regs.sig_delt_3_0 = boost::uint8_t(dac_word & 0xf);
+ uint16_t dac_word = uhd::clip(boost::math::iround(volts*0xfff/3.3), 0, 0xfff);
+ _ad9862_regs.sig_delt_11_4 = uint8_t(dac_word >> 4);
+ _ad9862_regs.sig_delt_3_0 = uint8_t(dac_word & 0xf);
this->send_reg(42);
this->send_reg(43);
return;
}
//calculate the dac word for aux dac a, b, c
- boost::uint8_t dac_word = uhd::clip(boost::math::iround(volts*0xff/3.3), 0, 0xff);
+ uint8_t dac_word = uhd::clip(boost::math::iround(volts*0xff/3.3), 0, 0xff);
//setup a lookup table for the aux dac params (reg ref, reg addr)
- typedef boost::tuple<boost::uint8_t*, boost::uint8_t> dac_params_t;
+ typedef boost::tuple<uint8_t*, uint8_t> dac_params_t;
uhd::dict<aux_dac_t, dac_params_t> aux_dac_to_params = boost::assign::map_list_of
(AUX_DAC_A, dac_params_t(&_ad9862_regs.aux_dac_a, 36))
(AUX_DAC_B, dac_params_t(&_ad9862_regs.aux_dac_b, 37))
@@ -248,7 +248,7 @@ void b100_codec_ctrl_impl::write_aux_dac(aux_dac_t which, double volts){
//set the aux dac register
UHD_ASSERT_THROW(aux_dac_to_params.has_key(which));
- boost::uint8_t *reg_ref, reg_addr;
+ uint8_t *reg_ref, reg_addr;
boost::tie(reg_ref, reg_addr) = aux_dac_to_params[which];
*reg_ref = dac_word;
this->send_reg(reg_addr);
@@ -257,8 +257,8 @@ void b100_codec_ctrl_impl::write_aux_dac(aux_dac_t which, double volts){
/***********************************************************************
* Codec Control SPI Methods
**********************************************************************/
-void b100_codec_ctrl_impl::send_reg(boost::uint8_t addr){
- boost::uint32_t reg = _ad9862_regs.get_write_reg(addr);
+void b100_codec_ctrl_impl::send_reg(uint8_t addr){
+ uint32_t reg = _ad9862_regs.get_write_reg(addr);
UHD_LOGV(rarely) << "codec control write reg: " << std::hex << reg << std::endl;
_iface->transact_spi(
B100_SPI_SS_AD9862,
@@ -267,16 +267,16 @@ void b100_codec_ctrl_impl::send_reg(boost::uint8_t addr){
);
}
-void b100_codec_ctrl_impl::recv_reg(boost::uint8_t addr){
- boost::uint32_t reg = _ad9862_regs.get_read_reg(addr);
+void b100_codec_ctrl_impl::recv_reg(uint8_t addr){
+ uint32_t reg = _ad9862_regs.get_read_reg(addr);
UHD_LOGV(rarely) << "codec control read reg: " << std::hex << reg << std::endl;
- boost::uint32_t ret = _iface->transact_spi(
+ uint32_t ret = _iface->transact_spi(
B100_SPI_SS_AD9862,
spi_config_t::EDGE_RISE,
reg, 16, true /*rb*/
);
- UHD_LOGV(rarely) << "codec control read ret: " << std::hex << boost::uint16_t(ret & 0xFF) << std::endl;
- _ad9862_regs.set_reg(addr, boost::uint8_t(ret&0xff));
+ UHD_LOGV(rarely) << "codec control read ret: " << std::hex << uint16_t(ret & 0xFF) << std::endl;
+ _ad9862_regs.set_reg(addr, uint8_t(ret&0xff));
}
/***********************************************************************
diff --git a/host/lib/usrp/b100/dboard_iface.cpp b/host/lib/usrp/b100/dboard_iface.cpp
index 9829f3f09..9b90d676a 100644
--- a/host/lib/usrp/b100/dboard_iface.cpp
+++ b/host/lib/usrp/b100/dboard_iface.cpp
@@ -66,33 +66,33 @@ public:
void write_aux_dac(unit_t, aux_dac_t, double);
double read_aux_adc(unit_t, aux_adc_t);
- void set_pin_ctrl(unit_t unit, boost::uint32_t value, boost::uint32_t mask = 0xffffffff);
- boost::uint32_t get_pin_ctrl(unit_t unit);
- void set_atr_reg(unit_t unit, atr_reg_t reg, boost::uint32_t value, boost::uint32_t mask = 0xffffffff);
- boost::uint32_t get_atr_reg(unit_t unit, atr_reg_t reg);
- void set_gpio_ddr(unit_t unit, boost::uint32_t value, boost::uint32_t mask = 0xffffffff);
- boost::uint32_t get_gpio_ddr(unit_t unit);
- void set_gpio_out(unit_t unit, boost::uint32_t value, boost::uint32_t mask = 0xffffffff);
- boost::uint32_t get_gpio_out(unit_t unit);
- boost::uint32_t read_gpio(unit_t unit);
+ void set_pin_ctrl(unit_t unit, uint32_t value, uint32_t mask = 0xffffffff);
+ uint32_t get_pin_ctrl(unit_t unit);
+ void set_atr_reg(unit_t unit, atr_reg_t reg, uint32_t value, uint32_t mask = 0xffffffff);
+ uint32_t get_atr_reg(unit_t unit, atr_reg_t reg);
+ void set_gpio_ddr(unit_t unit, uint32_t value, uint32_t mask = 0xffffffff);
+ uint32_t get_gpio_ddr(unit_t unit);
+ void set_gpio_out(unit_t unit, uint32_t value, uint32_t mask = 0xffffffff);
+ uint32_t get_gpio_out(unit_t unit);
+ uint32_t read_gpio(unit_t unit);
void set_command_time(const uhd::time_spec_t& t);
uhd::time_spec_t get_command_time(void);
- void write_i2c(boost::uint16_t, const byte_vector_t &);
- byte_vector_t read_i2c(boost::uint16_t, size_t);
+ void write_i2c(uint16_t, const byte_vector_t &);
+ byte_vector_t read_i2c(uint16_t, size_t);
void write_spi(
unit_t unit,
const spi_config_t &config,
- boost::uint32_t data,
+ uint32_t data,
size_t num_bits
);
- boost::uint32_t read_write_spi(
+ uint32_t read_write_spi(
unit_t unit,
const spi_config_t &config,
- boost::uint32_t data,
+ uint32_t data,
size_t num_bits
);
@@ -167,39 +167,39 @@ double b100_dboard_iface::get_codec_rate(unit_t){
/***********************************************************************
* GPIO
**********************************************************************/
-void b100_dboard_iface::set_pin_ctrl(unit_t unit, boost::uint32_t value, boost::uint32_t mask){
- _gpio->set_pin_ctrl(unit, static_cast<boost::uint16_t>(value), static_cast<boost::uint16_t>(mask));
+void b100_dboard_iface::set_pin_ctrl(unit_t unit, uint32_t value, uint32_t mask){
+ _gpio->set_pin_ctrl(unit, static_cast<uint16_t>(value), static_cast<uint16_t>(mask));
}
-boost::uint32_t b100_dboard_iface::get_pin_ctrl(unit_t unit){
- return static_cast<boost::uint32_t>(_gpio->get_pin_ctrl(unit));
+uint32_t b100_dboard_iface::get_pin_ctrl(unit_t unit){
+ return static_cast<uint32_t>(_gpio->get_pin_ctrl(unit));
}
-void b100_dboard_iface::set_atr_reg(unit_t unit, atr_reg_t reg, boost::uint32_t value, boost::uint32_t mask){
- _gpio->set_atr_reg(unit, reg, static_cast<boost::uint16_t>(value), static_cast<boost::uint16_t>(mask));
+void b100_dboard_iface::set_atr_reg(unit_t unit, atr_reg_t reg, uint32_t value, uint32_t mask){
+ _gpio->set_atr_reg(unit, reg, static_cast<uint16_t>(value), static_cast<uint16_t>(mask));
}
-boost::uint32_t b100_dboard_iface::get_atr_reg(unit_t unit, atr_reg_t reg){
- return static_cast<boost::uint32_t>(_gpio->get_atr_reg(unit, reg));
+uint32_t b100_dboard_iface::get_atr_reg(unit_t unit, atr_reg_t reg){
+ return static_cast<uint32_t>(_gpio->get_atr_reg(unit, reg));
}
-void b100_dboard_iface::set_gpio_ddr(unit_t unit, boost::uint32_t value, boost::uint32_t mask){
- _gpio->set_gpio_ddr(unit, static_cast<boost::uint16_t>(value), static_cast<boost::uint16_t>(mask));
+void b100_dboard_iface::set_gpio_ddr(unit_t unit, uint32_t value, uint32_t mask){
+ _gpio->set_gpio_ddr(unit, static_cast<uint16_t>(value), static_cast<uint16_t>(mask));
}
-boost::uint32_t b100_dboard_iface::get_gpio_ddr(unit_t unit){
- return static_cast<boost::uint32_t>(_gpio->get_gpio_ddr(unit));
+uint32_t b100_dboard_iface::get_gpio_ddr(unit_t unit){
+ return static_cast<uint32_t>(_gpio->get_gpio_ddr(unit));
}
-void b100_dboard_iface::set_gpio_out(unit_t unit, boost::uint32_t value, boost::uint32_t mask){
- _gpio->set_gpio_out(unit, static_cast<boost::uint16_t>(value), static_cast<boost::uint16_t>(mask));
+void b100_dboard_iface::set_gpio_out(unit_t unit, uint32_t value, uint32_t mask){
+ _gpio->set_gpio_out(unit, static_cast<uint16_t>(value), static_cast<uint16_t>(mask));
}
-boost::uint32_t b100_dboard_iface::get_gpio_out(unit_t unit){
- return static_cast<boost::uint32_t>(_gpio->get_gpio_out(unit));
+uint32_t b100_dboard_iface::get_gpio_out(unit_t unit){
+ return static_cast<uint32_t>(_gpio->get_gpio_out(unit));
}
-boost::uint32_t b100_dboard_iface::read_gpio(unit_t unit){
+uint32_t b100_dboard_iface::read_gpio(unit_t unit){
return _gpio->read_gpio(unit);
}
@@ -211,7 +211,7 @@ boost::uint32_t b100_dboard_iface::read_gpio(unit_t unit){
* \param unit the dboard interface unit type enum
* \return the slave device number
*/
-static boost::uint32_t unit_to_otw_spi_dev(dboard_iface::unit_t unit){
+static uint32_t unit_to_otw_spi_dev(dboard_iface::unit_t unit){
switch(unit){
case dboard_iface::UNIT_TX: return B100_SPI_SS_TX_DB;
case dboard_iface::UNIT_RX: return B100_SPI_SS_RX_DB;
@@ -222,16 +222,16 @@ static boost::uint32_t unit_to_otw_spi_dev(dboard_iface::unit_t unit){
void b100_dboard_iface::write_spi(
unit_t unit,
const spi_config_t &config,
- boost::uint32_t data,
+ uint32_t data,
size_t num_bits
){
_spi_iface->write_spi(unit_to_otw_spi_dev(unit), config, data, num_bits);
}
-boost::uint32_t b100_dboard_iface::read_write_spi(
+uint32_t b100_dboard_iface::read_write_spi(
unit_t unit,
const spi_config_t &config,
- boost::uint32_t data,
+ uint32_t data,
size_t num_bits
){
return _spi_iface->read_spi(unit_to_otw_spi_dev(unit), config, data, num_bits);
@@ -240,11 +240,11 @@ boost::uint32_t b100_dboard_iface::read_write_spi(
/***********************************************************************
* I2C
**********************************************************************/
-void b100_dboard_iface::write_i2c(boost::uint16_t addr, const byte_vector_t &bytes){
+void b100_dboard_iface::write_i2c(uint16_t addr, const byte_vector_t &bytes){
return _i2c_iface->write_i2c(addr, bytes);
}
-byte_vector_t b100_dboard_iface::read_i2c(boost::uint16_t addr, size_t num_bytes){
+byte_vector_t b100_dboard_iface::read_i2c(uint16_t addr, size_t num_bytes){
return _i2c_iface->read_i2c(addr, num_bytes);
}
diff --git a/host/lib/usrp/b100/io_impl.cpp b/host/lib/usrp/b100/io_impl.cpp
index 86edb4ed6..c1810ed8c 100644
--- a/host/lib/usrp/b100/io_impl.cpp
+++ b/host/lib/usrp/b100/io_impl.cpp
@@ -129,7 +129,7 @@ rx_streamer::sptr b100_impl::get_rx_stream(const uhd::stream_args_t &args_){
//calculate packet size
static const size_t hdr_size = 0
- + vrt::max_if_hdr_words32*sizeof(boost::uint32_t)
+ + vrt::max_if_hdr_words32*sizeof(uint32_t)
+ sizeof(vrt::if_packet_info_t().tlr) //forced to have trailer
- sizeof(vrt::if_packet_info_t().cid) //no class id ever used
- sizeof(vrt::if_packet_info_t().tsi) //no int time ever used
@@ -188,7 +188,7 @@ tx_streamer::sptr b100_impl::get_tx_stream(const uhd::stream_args_t &args_){
//calculate packet size
static const size_t hdr_size = 0
- + vrt::max_if_hdr_words32*sizeof(boost::uint32_t)
+ + vrt::max_if_hdr_words32*sizeof(uint32_t)
+ sizeof(vrt::if_packet_info_t().tlr) //forced to have trailer
- sizeof(vrt::if_packet_info_t().sid) //no stream id ever used
- sizeof(vrt::if_packet_info_t().cid) //no class id ever used
diff --git a/host/lib/usrp/b100/usb_zero_copy_wrapper.cpp b/host/lib/usrp/b100/usb_zero_copy_wrapper.cpp
index d646fcc94..d57d57f21 100644
--- a/host/lib/usrp/b100/usb_zero_copy_wrapper.cpp
+++ b/host/lib/usrp/b100/usb_zero_copy_wrapper.cpp
@@ -60,9 +60,9 @@ public:
//extract this packet's memory address and length in bytes
char *mem = mrb->cast<char *>() + offset_bytes;
- const boost::uint32_t *mem32 = reinterpret_cast<const boost::uint32_t *>(mem);
+ const uint32_t *mem32 = reinterpret_cast<const uint32_t *>(mem);
const size_t words32 = (uhd::wtohx(mem32[0]) & 0xffff); //length in words32 (from VRT header)
- const size_t len = words32*sizeof(boost::uint32_t); //length in bytes
+ const size_t len = words32*sizeof(uint32_t); //length in bytes
//check if this receive buffer has been exhausted
offset_bytes += len;
@@ -100,7 +100,7 @@ public:
_ok_to_auto_flush = true;
//get a reference to the VITA header before incrementing
- const boost::uint32_t vita_header = reinterpret_cast<const boost::uint32_t *>(_mem_buffer_tip)[0];
+ const uint32_t vita_header = reinterpret_cast<const uint32_t *>(_mem_buffer_tip)[0];
_bytes_in_buffer += size();
_mem_buffer_tip += size();
diff --git a/host/lib/usrp/b200/b200_cores.cpp b/host/lib/usrp/b200/b200_cores.cpp
index 19e637ef4..dcfd41825 100644
--- a/host/lib/usrp/b200/b200_cores.cpp
+++ b/host/lib/usrp/b200/b200_cores.cpp
@@ -29,10 +29,10 @@ b200_local_spi_core::b200_local_spi_core(
change_perif(default_perif);
}
-boost::uint32_t b200_local_spi_core::transact_spi(
+uint32_t b200_local_spi_core::transact_spi(
int which_slave,
const uhd::spi_config_t &config,
- boost::uint32_t data,
+ uint32_t data,
size_t num_bits,
bool readback)
{
diff --git a/host/lib/usrp/b200/b200_cores.hpp b/host/lib/usrp/b200/b200_cores.hpp
index 32e583794..54f5e5926 100644
--- a/host/lib/usrp/b200/b200_cores.hpp
+++ b/host/lib/usrp/b200/b200_cores.hpp
@@ -33,10 +33,10 @@ public:
b200_local_spi_core(uhd::wb_iface::sptr iface, perif_t default_perif);
- virtual boost::uint32_t transact_spi(
+ virtual uint32_t transact_spi(
int which_slave,
const uhd::spi_config_t &config,
- boost::uint32_t data,
+ uint32_t data,
size_t num_bits,
bool readback);
diff --git a/host/lib/usrp/b200/b200_iface.cpp b/host/lib/usrp/b200/b200_iface.cpp
index 218f8fd0e..4e6dd2144 100644
--- a/host/lib/usrp/b200/b200_iface.cpp
+++ b/host/lib/usrp/b200/b200_iface.cpp
@@ -24,7 +24,7 @@
#include <uhd/exception.hpp>
#include <boost/functional/hash.hpp>
#include <boost/thread/thread.hpp>
-#include <boost/cstdint.hpp>
+#include <stdint.h>
#include <boost/lexical_cast.hpp>
#include <boost/format.hpp>
#include <fstream>
@@ -45,42 +45,42 @@ using namespace uhd::transport;
static const bool load_img_msg = true;
-const static boost::uint8_t FX3_FIRMWARE_LOAD = 0xA0;
-const static boost::uint8_t VRT_VENDOR_OUT = (LIBUSB_REQUEST_TYPE_VENDOR
+const static uint8_t FX3_FIRMWARE_LOAD = 0xA0;
+const static uint8_t VRT_VENDOR_OUT = (LIBUSB_REQUEST_TYPE_VENDOR
| LIBUSB_ENDPOINT_OUT);
-const static boost::uint8_t VRT_VENDOR_IN = (LIBUSB_REQUEST_TYPE_VENDOR
+const static uint8_t VRT_VENDOR_IN = (LIBUSB_REQUEST_TYPE_VENDOR
| LIBUSB_ENDPOINT_IN);
-const static boost::uint8_t B200_VREQ_FPGA_START = 0x02;
-const static boost::uint8_t B200_VREQ_FPGA_DATA = 0x12;
-const static boost::uint8_t B200_VREQ_GET_COMPAT = 0x15;
-const static boost::uint8_t B200_VREQ_SET_FPGA_HASH = 0x1C;
-const static boost::uint8_t B200_VREQ_GET_FPGA_HASH = 0x1D;
-const static boost::uint8_t B200_VREQ_SET_FW_HASH = 0x1E;
-const static boost::uint8_t B200_VREQ_GET_FW_HASH = 0x1F;
-const static boost::uint8_t B200_VREQ_LOOP = 0x22;
-const static boost::uint8_t B200_VREQ_FPGA_CONFIG = 0x55;
-const static boost::uint8_t B200_VREQ_FPGA_RESET = 0x62;
-const static boost::uint8_t B200_VREQ_GPIF_RESET = 0x72;
-const static boost::uint8_t B200_VREQ_GET_USB = 0x80;
-const static boost::uint8_t B200_VREQ_GET_STATUS = 0x83;
-const static boost::uint8_t B200_VREQ_FX3_RESET = 0x99;
-const static boost::uint8_t B200_VREQ_EEPROM_WRITE = 0xBA;
-const static boost::uint8_t B200_VREQ_EEPROM_READ = 0xBB;
-
-const static boost::uint8_t FX3_STATE_UNDEFINED = 0x00;
-const static boost::uint8_t FX3_STATE_FPGA_READY = 0x01;
-const static boost::uint8_t FX3_STATE_CONFIGURING_FPGA = 0x02;
-const static boost::uint8_t FX3_STATE_BUSY = 0x03;
-const static boost::uint8_t FX3_STATE_RUNNING = 0x04;
-const static boost::uint8_t FX3_STATE_UNCONFIGURED = 0x05;
-const static boost::uint8_t FX3_STATE_ERROR = 0x06;
+const static uint8_t B200_VREQ_FPGA_START = 0x02;
+const static uint8_t B200_VREQ_FPGA_DATA = 0x12;
+const static uint8_t B200_VREQ_GET_COMPAT = 0x15;
+const static uint8_t B200_VREQ_SET_FPGA_HASH = 0x1C;
+const static uint8_t B200_VREQ_GET_FPGA_HASH = 0x1D;
+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_GPIF_RESET = 0x72;
+const static uint8_t B200_VREQ_GET_USB = 0x80;
+const static uint8_t B200_VREQ_GET_STATUS = 0x83;
+const static uint8_t B200_VREQ_FX3_RESET = 0x99;
+const static uint8_t B200_VREQ_EEPROM_WRITE = 0xBA;
+const static uint8_t B200_VREQ_EEPROM_READ = 0xBB;
+
+const static uint8_t FX3_STATE_UNDEFINED = 0x00;
+const static uint8_t FX3_STATE_FPGA_READY = 0x01;
+const static uint8_t FX3_STATE_CONFIGURING_FPGA = 0x02;
+const static uint8_t FX3_STATE_BUSY = 0x03;
+const static uint8_t FX3_STATE_RUNNING = 0x04;
+const static uint8_t FX3_STATE_UNCONFIGURED = 0x05;
+const static uint8_t FX3_STATE_ERROR = 0x06;
const static int VREQ_MAX_SIZE_USB2 = 64;
const static int VREQ_MAX_SIZE_USB3 = 512;
const static int VREQ_DEFAULT_SIZE = VREQ_MAX_SIZE_USB2;
const static int VREQ_MAX_SIZE = VREQ_MAX_SIZE_USB3;
-typedef boost::uint32_t hash_type;
+typedef uint32_t hash_type;
/***********************************************************************
@@ -137,12 +137,12 @@ public:
//NOP
}
- int fx3_control_write(boost::uint8_t request,
- boost::uint16_t value,
- boost::uint16_t index,
+ int fx3_control_write(uint8_t request,
+ uint16_t value,
+ uint16_t index,
unsigned char *buff,
- boost::uint16_t length,
- boost::uint32_t timeout = 0) {
+ uint16_t length,
+ uint32_t timeout = 0) {
return _usb_ctrl->submit(VRT_VENDOR_OUT, // bmReqeustType
request, // bRequest
value, // wValue
@@ -152,12 +152,12 @@ public:
timeout); // timeout
}
- int fx3_control_read(boost::uint8_t request,
- boost::uint16_t value,
- boost::uint16_t index,
+ int fx3_control_read(uint8_t request,
+ uint16_t value,
+ uint16_t index,
unsigned char *buff,
- boost::uint16_t length,
- boost::uint32_t timeout = 0) {
+ uint16_t length,
+ uint32_t timeout = 0) {
return _usb_ctrl->submit(VRT_VENDOR_IN, // bmReqeustType
request, // bRequest
value, // wValue
@@ -167,21 +167,21 @@ public:
timeout); // timeout
}
- void write_i2c(UHD_UNUSED(boost::uint16_t addr), UHD_UNUSED(const byte_vector_t &bytes))
+ void write_i2c(UHD_UNUSED(uint16_t addr), UHD_UNUSED(const byte_vector_t &bytes))
{
throw uhd::not_implemented_error("b200 write i2c");
}
- byte_vector_t read_i2c(UHD_UNUSED(boost::uint16_t addr), UHD_UNUSED(size_t num_bytes))
+ byte_vector_t read_i2c(UHD_UNUSED(uint16_t addr), UHD_UNUSED(size_t num_bytes))
{
throw uhd::not_implemented_error("b200 read i2c");
}
- void write_eeprom(boost::uint16_t addr, boost::uint16_t offset,
+ void write_eeprom(uint16_t addr, uint16_t offset,
const byte_vector_t &bytes) {
int ret = fx3_control_write(B200_VREQ_EEPROM_WRITE,
- 0, offset | (boost::uint16_t(addr) << 8),
+ 0, offset | (uint16_t(addr) << 8),
(unsigned char *) &bytes[0],
bytes.size());
@@ -192,12 +192,12 @@ public:
}
byte_vector_t read_eeprom(
- boost::uint16_t addr,
- boost::uint16_t offset,
+ uint16_t addr,
+ uint16_t offset,
size_t num_bytes) {
byte_vector_t recv_bytes(num_bytes);
int bytes_read = fx3_control_read(B200_VREQ_EEPROM_READ,
- 0, offset | (boost::uint16_t(addr) << 8),
+ 0, offset | (uint16_t(addr) << 8),
(unsigned char*) &recv_bytes[0],
num_bytes);
@@ -281,7 +281,7 @@ public:
*/
}
- boost::uint8_t get_usb_speed(void) {
+ uint8_t get_usb_speed(void) {
unsigned char rx_data[1];
memset(rx_data, 0x00, sizeof(rx_data));
@@ -293,10 +293,10 @@ public:
else if (ret != bytes_to_recv)
throw uhd::io_error((boost::format("Short read on get USB speed (expecting: %d, returned: %d)") % bytes_to_recv % ret).str());
- return boost::lexical_cast<boost::uint8_t>(rx_data[0]);
+ return boost::lexical_cast<uint8_t>(rx_data[0]);
}
- boost::uint8_t get_fx3_status(void) {
+ uint8_t get_fx3_status(void) {
unsigned char rx_data[1];
memset(rx_data, 0x00, sizeof(rx_data));
@@ -308,10 +308,10 @@ public:
else if (ret != bytes_to_recv)
throw uhd::io_error((boost::format("Short read on get FX3 status (expecting: %d, returned: %d)") % bytes_to_recv % ret).str());
- return boost::lexical_cast<boost::uint8_t>(rx_data[0]);
+ return boost::lexical_cast<uint8_t>(rx_data[0]);
}
- boost::uint16_t get_compat_num(void) {
+ uint16_t get_compat_num(void) {
unsigned char rx_data[2];
memset(rx_data, 0x00, sizeof(rx_data));
@@ -374,10 +374,10 @@ public:
throw uhd::io_error((boost::format("Short write on set FPGA hash (expecting: %d, returned: %d)") % bytes_to_send % ret).str());
}
- boost::uint32_t load_fpga(const std::string filestring, bool force) {
+ uint32_t load_fpga(const std::string filestring, bool force) {
- boost::uint8_t fx3_state = 0;
- boost::uint32_t wait_count;
+ uint8_t fx3_state = 0;
+ uint32_t wait_count;
int ret = 0;
int bytes_to_xfer = 0;
@@ -476,7 +476,7 @@ public:
if(n == 0)
continue;
- boost::uint16_t transfer_count = boost::uint16_t(n);
+ uint16_t transfer_count = uint16_t(n);
/* Send the data to the device. */
int nwritten = fx3_control_write(B200_VREQ_FPGA_DATA, 0, 0, out_buff, transfer_count, 5000);
@@ -526,7 +526,7 @@ private:
};
-std::string b200_iface::fx3_state_string(boost::uint8_t state)
+std::string b200_iface::fx3_state_string(uint8_t state)
{
switch (state)
{
diff --git a/host/lib/usrp/b200/b200_iface.hpp b/host/lib/usrp/b200/b200_iface.hpp
index e45c78d49..0cddbf801 100644
--- a/host/lib/usrp/b200/b200_iface.hpp
+++ b/host/lib/usrp/b200/b200_iface.hpp
@@ -35,19 +35,19 @@ enum b200_product_t {
};
// These are actual USB PIDs (not Ettus Product IDs)
-const static boost::uint16_t B200_VENDOR_ID = 0x2500;
-const static boost::uint16_t B200_VENDOR_NI_ID = 0x3923;
-const static boost::uint16_t B200_PRODUCT_ID = 0x0020;
-const static boost::uint16_t B200MINI_PRODUCT_ID = 0x0021;
-const static boost::uint16_t B205MINI_PRODUCT_ID = 0x0022;
-const static boost::uint16_t B200_PRODUCT_NI_ID = 0x7813;
-const static boost::uint16_t B210_PRODUCT_NI_ID = 0x7814;
-const static boost::uint16_t FX3_VID = 0x04b4;
-const static boost::uint16_t FX3_DEFAULT_PID = 0x00f3;
-const static boost::uint16_t FX3_REENUM_PID = 0x00f0;
+const static uint16_t B200_VENDOR_ID = 0x2500;
+const static uint16_t B200_VENDOR_NI_ID = 0x3923;
+const static uint16_t B200_PRODUCT_ID = 0x0020;
+const static uint16_t B200MINI_PRODUCT_ID = 0x0021;
+const static uint16_t B205MINI_PRODUCT_ID = 0x0022;
+const static uint16_t B200_PRODUCT_NI_ID = 0x7813;
+const static uint16_t B210_PRODUCT_NI_ID = 0x7814;
+const static uint16_t FX3_VID = 0x04b4;
+const static uint16_t FX3_DEFAULT_PID = 0x00f3;
+const static uint16_t FX3_REENUM_PID = 0x00f0;
//! Map the USB PID to the product (only for PIDs that map to a single product)
-static const uhd::dict<boost::uint16_t, b200_product_t> B2XX_PID_TO_PRODUCT = boost::assign::map_list_of
+static const uhd::dict<uint16_t, b200_product_t> B2XX_PID_TO_PRODUCT = boost::assign::map_list_of
(B200_PRODUCT_NI_ID, B200)
(B210_PRODUCT_NI_ID, B210)
(B200MINI_PRODUCT_ID, B200MINI)
@@ -57,7 +57,7 @@ static const uhd::dict<boost::uint16_t, b200_product_t> B2XX_PID_TO_PRODUCT = bo
static const std::string B200_FW_FILE_NAME = "usrp_b200_fw.hex";
//! Map the EEPROM product ID codes to the product
-static const uhd::dict<boost::uint16_t, b200_product_t> B2XX_PRODUCT_ID = boost::assign::map_list_of
+static const uhd::dict<uint16_t, b200_product_t> B2XX_PRODUCT_ID = boost::assign::map_list_of
(0x0001, B200)
(0x7737, B200)
(B200_PRODUCT_NI_ID, B200)
@@ -98,13 +98,13 @@ public:
static sptr make(uhd::transport::usb_control::sptr usb_ctrl);
//! query the device USB speed (2, 3)
- virtual boost::uint8_t get_usb_speed(void) = 0;
+ virtual uint8_t get_usb_speed(void) = 0;
//! get the current status of the FX3
- virtual boost::uint8_t get_fx3_status(void) = 0;
+ virtual uint8_t get_fx3_status(void) = 0;
//! get the current status of the FX3
- virtual boost::uint16_t get_compat_num(void) = 0;
+ virtual uint16_t get_compat_num(void) = 0;
//! load a firmware image
virtual void load_firmware(const std::string filestring, bool force=false) = 0;
@@ -119,13 +119,13 @@ public:
virtual void set_fpga_reset_pin(const bool reset) = 0;
//! load an FPGA image
- virtual boost::uint32_t load_fpga(const std::string filestring, bool force=false) = 0;
+ virtual uint32_t load_fpga(const std::string filestring, bool force=false) = 0;
- virtual void write_eeprom(boost::uint16_t addr, boost::uint16_t offset, const uhd::byte_vector_t &bytes) = 0;
+ virtual void write_eeprom(uint16_t addr, uint16_t offset, const uhd::byte_vector_t &bytes) = 0;
- virtual uhd::byte_vector_t read_eeprom(boost::uint16_t addr, boost::uint16_t offset, size_t num_bytes) = 0;
+ virtual uhd::byte_vector_t read_eeprom(uint16_t addr, uint16_t offset, size_t num_bytes) = 0;
- static std::string fx3_state_string(boost::uint8_t state);
+ static std::string fx3_state_string(uint8_t state);
};
diff --git a/host/lib/usrp/b200/b200_image_loader.cpp b/host/lib/usrp/b200/b200_image_loader.cpp
index e8fb8afea..b9c2c0caf 100644
--- a/host/lib/usrp/b200/b200_image_loader.cpp
+++ b/host/lib/usrp/b200/b200_image_loader.cpp
@@ -114,7 +114,7 @@ static bool b200_image_loader(const image_loader::image_loader_args_t &image_loa
* filename for us to use.
*/
std::string product = mb_eeprom.get("product");
- if(not B2XX_PRODUCT_ID.has_key(boost::lexical_cast<boost::uint16_t>(product))){
+ if(not B2XX_PRODUCT_ID.has_key(boost::lexical_cast<uint16_t>(product))){
if(user_specified){
// The user specified a bad device but expects us to know what it is
throw uhd::runtime_error("Could not determine model. You must manually specify an FPGA image filename.");
diff --git a/host/lib/usrp/b200/b200_impl.cpp b/host/lib/usrp/b200/b200_impl.cpp
index 9bd2799c2..e2a0e0b70 100644
--- a/host/lib/usrp/b200/b200_impl.cpp
+++ b/host/lib/usrp/b200/b200_impl.cpp
@@ -130,7 +130,7 @@ std::string check_option_valid(
b200_product_t get_b200_product(const usb_device_handle::sptr& handle, const mboard_eeprom_t &mb_eeprom)
{
// Try USB PID first
- boost::uint16_t product_id = handle->get_product_id();
+ uint16_t product_id = handle->get_product_id();
if (B2XX_PID_TO_PRODUCT.has_key(product_id))
return B2XX_PID_TO_PRODUCT[product_id];
@@ -138,7 +138,7 @@ b200_product_t get_b200_product(const usb_device_handle::sptr& handle, const mbo
if (mb_eeprom["product"].empty()) {
throw uhd::runtime_error("B200: Missing product ID on EEPROM.");
}
- product_id = boost::lexical_cast<boost::uint16_t>(mb_eeprom["product"]);
+ product_id = boost::lexical_cast<uint16_t>(mb_eeprom["product"]);
if (not B2XX_PRODUCT_ID.has_key(product_id)) {
throw uhd::runtime_error(str(
boost::format("B200 unknown product code: 0x%04x")
@@ -153,8 +153,8 @@ std::vector<usb_device_handle::sptr> get_b200_device_handles(const device_addr_t
std::vector<usb_device_handle::vid_pid_pair_t> vid_pid_pair_list;
if(hint.has_key("vid") && hint.has_key("pid") && hint.has_key("type") && hint["type"] == "b200") {
- vid_pid_pair_list.push_back(usb_device_handle::vid_pid_pair_t(uhd::cast::hexstr_cast<boost::uint16_t>(hint.get("vid")),
- uhd::cast::hexstr_cast<boost::uint16_t>(hint.get("pid"))));
+ vid_pid_pair_list.push_back(usb_device_handle::vid_pid_pair_t(uhd::cast::hexstr_cast<uint16_t>(hint.get("vid")),
+ uhd::cast::hexstr_cast<uint16_t>(hint.get("pid"))));
} else {
vid_pid_pair_list = b200_vid_pid_pairs;
}
@@ -292,20 +292,20 @@ b200_impl::b200_impl(const uhd::device_addr_t& device_addr, usb_device_handle::s
const fs_path mb_path = "/mboards/0";
//try to match the given device address with something on the USB bus
- boost::uint16_t vid = B200_VENDOR_ID;
- boost::uint16_t pid = B200_PRODUCT_ID;
+ uint16_t vid = B200_VENDOR_ID;
+ uint16_t pid = B200_PRODUCT_ID;
bool specified_vid = false;
bool specified_pid = false;
if (device_addr.has_key("vid"))
{
- vid = uhd::cast::hexstr_cast<boost::uint16_t>(device_addr.get("vid"));
+ vid = uhd::cast::hexstr_cast<uint16_t>(device_addr.get("vid"));
specified_vid = true;
}
if (device_addr.has_key("pid"))
{
- pid = uhd::cast::hexstr_cast<boost::uint16_t>(device_addr.get("pid"));
+ pid = uhd::cast::hexstr_cast<uint16_t>(device_addr.get("pid"));
specified_pid = true;
}
@@ -425,7 +425,7 @@ b200_impl::b200_impl(const uhd::device_addr_t& device_addr, usb_device_handle::s
device_addr.has_key("fpga")? device_addr["fpga"] : default_file_name
);
- boost::uint32_t status = _iface->load_fpga(b200_fpga_image);
+ uint32_t status = _iface->load_fpga(b200_fpga_image);
if(status != 0) {
throw uhd::runtime_error(str(boost::format("fx3 is in state %1%") % status));
@@ -436,7 +436,7 @@ b200_impl::b200_impl(const uhd::device_addr_t& device_addr, usb_device_handle::s
////////////////////////////////////////////////////////////////////
// Create control transport
////////////////////////////////////////////////////////////////////
- boost::uint8_t usb_speed = _iface->get_usb_speed();
+ uint8_t usb_speed = _iface->get_usb_speed();
UHD_MSG(status) << "Operating over USB " << (int) usb_speed << "." << std::endl;
const std::string min_frame_size = (usb_speed == 3) ? "1024" : "512";
@@ -672,11 +672,11 @@ b200_impl::b200_impl(const uhd::device_addr_t& device_addr, usb_device_handle::s
_radio_perifs[0].fp_gpio = gpio_atr_3000::make(_radio_perifs[0].ctrl, TOREG(SR_FP_GPIO), RB32_FP_GPIO);
BOOST_FOREACH(const gpio_attr_map_t::value_type attr, gpio_attr_map)
{
- _tree->create<boost::uint32_t>(mb_path / "gpio" / "FP0" / attr.second)
+ _tree->create<uint32_t>(mb_path / "gpio" / "FP0" / attr.second)
.set(0)
.add_coerced_subscriber(boost::bind(&gpio_atr_3000::set_gpio_attr, _radio_perifs[0].fp_gpio, attr.first, _1));
}
- _tree->create<boost::uint32_t>(mb_path / "gpio" / "FP0" / "READBACK")
+ _tree->create<uint32_t>(mb_path / "gpio" / "FP0" / "READBACK")
.set_publisher(boost::bind(&gpio_atr_3000::read_gpio, _radio_perifs[0].fp_gpio));
////////////////////////////////////////////////////////////////////
@@ -751,7 +751,7 @@ void b200_impl::setup_radio(const size_t dspno)
////////////////////////////////////////////////////////////////////
// Set up transport
////////////////////////////////////////////////////////////////////
- const boost::uint32_t sid = (dspno == 0) ? B200_CTRL0_MSG_SID : B200_CTRL1_MSG_SID;
+ const uint32_t sid = (dspno == 0) ? B200_CTRL0_MSG_SID : B200_CTRL1_MSG_SID;
////////////////////////////////////////////////////////////////////
// radio control
@@ -879,8 +879,8 @@ void b200_impl::register_loopback_self_test(wb_iface::sptr iface)
for (size_t i = 0; i < 100; i++)
{
boost::hash_combine(hash, i);
- iface->poke32(TOREG(SR_TEST), boost::uint32_t(hash));
- test_fail = iface->peek32(RB32_TEST) != boost::uint32_t(hash);
+ iface->poke32(TOREG(SR_TEST), uint32_t(hash));
+ test_fail = iface->peek32(RB32_TEST) != uint32_t(hash);
if (test_fail) break; //exit loop on any failure
}
UHD_MSG(status) << ((test_fail)? "fail" : "pass") << std::endl;
@@ -946,9 +946,9 @@ double b200_impl::set_tick_rate(const double new_tick_rate)
void b200_impl::check_fw_compat(void)
{
- boost::uint16_t compat_num = _iface->get_compat_num();
- boost::uint32_t compat_major = (boost::uint32_t) (compat_num >> 8);
- boost::uint32_t compat_minor = (boost::uint32_t) (compat_num & 0xFF);
+ uint16_t compat_num = _iface->get_compat_num();
+ uint32_t compat_major = (uint32_t) (compat_num >> 8);
+ uint32_t compat_minor = (uint32_t) (compat_num & 0xFF);
if (compat_major != B200_FW_COMPAT_NUM_MAJOR){
throw uhd::runtime_error(str(boost::format(
@@ -964,14 +964,14 @@ void b200_impl::check_fw_compat(void)
void b200_impl::check_fpga_compat(void)
{
- const boost::uint64_t compat = _local_ctrl->peek64(0);
- const boost::uint32_t signature = boost::uint32_t(compat >> 32);
- const boost::uint16_t compat_major = boost::uint16_t(compat >> 16);
- const boost::uint16_t compat_minor = boost::uint16_t(compat & 0xffff);
+ const uint64_t compat = _local_ctrl->peek64(0);
+ const uint32_t signature = uint32_t(compat >> 32);
+ const uint16_t compat_major = uint16_t(compat >> 16);
+ const uint16_t compat_minor = uint16_t(compat & 0xffff);
if (signature != 0xACE0BA5E) throw uhd::runtime_error(
"b200::check_fpga_compat signature register readback failed");
- const boost::uint16_t expected = ((_product == B200MINI or _product == B205MINI) ? B205_FPGA_COMPAT_NUM : B200_FPGA_COMPAT_NUM);
+ const uint16_t expected = ((_product == B200MINI or _product == B205MINI) ? B205_FPGA_COMPAT_NUM : B200_FPGA_COMPAT_NUM);
if (compat_major != expected)
{
throw uhd::runtime_error(str(boost::format(
@@ -1090,7 +1090,7 @@ void b200_impl::set_time(const uhd::time_spec_t& t)
{
BOOST_FOREACH(radio_perifs_t &perif, _radio_perifs)
perif.time64->set_time_sync(t);
- _local_ctrl->poke32(TOREG(SR_CORE_SYNC), 1 << 2 | boost::uint32_t(_time_source));
+ _local_ctrl->poke32(TOREG(SR_CORE_SYNC), 1 << 2 | uint32_t(_time_source));
_local_ctrl->poke32(TOREG(SR_CORE_SYNC), _time_source);
}
@@ -1145,7 +1145,7 @@ void b200_impl::update_bandsel(const std::string& which, double freq)
void b200_impl::update_gpio_state(void)
{
- const boost::uint32_t misc_word = 0
+ const uint32_t misc_word = 0
| (_gpio_state.swap_atr << 8)
| (_gpio_state.tx_bandsel_a << 7)
| (_gpio_state.tx_bandsel_b << 6)
@@ -1243,7 +1243,7 @@ sensor_value_t b200_impl::get_ref_locked(void)
sensor_value_t b200_impl::get_fe_pll_locked(const bool is_tx)
{
- const boost::uint32_t st = _local_ctrl->peek32(RB32_CORE_PLL);
+ const uint32_t st = _local_ctrl->peek32(RB32_CORE_PLL);
const bool locked = is_tx ? ((st & 0x1) > 0) : ((st & 0x2) > 0);
return sensor_value_t("LO", locked, "locked", "unlocked");
}
diff --git a/host/lib/usrp/b200/b200_impl.hpp b/host/lib/usrp/b200/b200_impl.hpp
index 130e93891..1c756c56d 100644
--- a/host/lib/usrp/b200/b200_impl.hpp
+++ b/host/lib/usrp/b200/b200_impl.hpp
@@ -47,37 +47,37 @@
#include <boost/assign.hpp>
#include <boost/weak_ptr.hpp>
#include "recv_packet_demuxer_3000.hpp"
-static const boost::uint8_t B200_FW_COMPAT_NUM_MAJOR = 8;
-static const boost::uint8_t B200_FW_COMPAT_NUM_MINOR = 0;
-static const boost::uint16_t B200_FPGA_COMPAT_NUM = 14;
-static const boost::uint16_t B205_FPGA_COMPAT_NUM = 5;
+static const uint8_t B200_FW_COMPAT_NUM_MAJOR = 8;
+static const uint8_t B200_FW_COMPAT_NUM_MINOR = 0;
+static const uint16_t B200_FPGA_COMPAT_NUM = 14;
+static const uint16_t B205_FPGA_COMPAT_NUM = 5;
static const double B200_BUS_CLOCK_RATE = 100e6;
-static const boost::uint32_t B200_GPSDO_ST_NONE = 0x83;
+static const uint32_t B200_GPSDO_ST_NONE = 0x83;
static const size_t B200_MAX_RATE_USB2 = 53248000; // bytes/s
static const size_t B200_MAX_RATE_USB3 = 500000000; // bytes/s
#define FLIP_SID(sid) (((sid)<<16)|((sid)>>16))
-static const boost::uint32_t B200_CTRL0_MSG_SID = 0x00000010;
-static const boost::uint32_t B200_RESP0_MSG_SID = FLIP_SID(B200_CTRL0_MSG_SID);
+static const uint32_t B200_CTRL0_MSG_SID = 0x00000010;
+static const uint32_t B200_RESP0_MSG_SID = FLIP_SID(B200_CTRL0_MSG_SID);
-static const boost::uint32_t B200_CTRL1_MSG_SID = 0x00000020;
-static const boost::uint32_t B200_RESP1_MSG_SID = FLIP_SID(B200_CTRL1_MSG_SID);
+static const uint32_t B200_CTRL1_MSG_SID = 0x00000020;
+static const uint32_t B200_RESP1_MSG_SID = FLIP_SID(B200_CTRL1_MSG_SID);
-static const boost::uint32_t B200_TX_DATA0_SID = 0x00000050;
-static const boost::uint32_t B200_TX_MSG0_SID = FLIP_SID(B200_TX_DATA0_SID);
+static const uint32_t B200_TX_DATA0_SID = 0x00000050;
+static const uint32_t B200_TX_MSG0_SID = FLIP_SID(B200_TX_DATA0_SID);
-static const boost::uint32_t B200_TX_DATA1_SID = 0x00000060;
-static const boost::uint32_t B200_TX_MSG1_SID = FLIP_SID(B200_TX_DATA1_SID);
+static const uint32_t B200_TX_DATA1_SID = 0x00000060;
+static const uint32_t B200_TX_MSG1_SID = FLIP_SID(B200_TX_DATA1_SID);
-static const boost::uint32_t B200_RX_DATA0_SID = 0x000000A0;
-static const boost::uint32_t B200_RX_DATA1_SID = 0x000000B0;
+static const uint32_t B200_RX_DATA0_SID = 0x000000A0;
+static const uint32_t B200_RX_DATA1_SID = 0x000000B0;
-static const boost::uint32_t B200_TX_GPS_UART_SID = 0x00000030;
-static const boost::uint32_t B200_RX_GPS_UART_SID = FLIP_SID(B200_TX_GPS_UART_SID);
+static const uint32_t B200_TX_GPS_UART_SID = 0x00000030;
+static const uint32_t B200_RX_GPS_UART_SID = FLIP_SID(B200_TX_GPS_UART_SID);
-static const boost::uint32_t B200_LOCAL_CTRL_SID = 0x00000040;
-static const boost::uint32_t B200_LOCAL_RESP_SID = FLIP_SID(B200_LOCAL_CTRL_SID);
+static const uint32_t B200_LOCAL_CTRL_SID = 0x00000040;
+static const uint32_t B200_LOCAL_RESP_SID = FLIP_SID(B200_LOCAL_CTRL_SID);
static const unsigned char B200_USB_CTRL_RECV_INTERFACE = 4;
static const unsigned char B200_USB_CTRL_RECV_ENDPOINT = 8;
@@ -207,7 +207,7 @@ private:
void handle_overflow(const size_t radio_index);
struct gpio_state {
- boost::uint32_t tx_bandsel_a, tx_bandsel_b, rx_bandsel_a, rx_bandsel_b, rx_bandsel_c, mimo, ref_sel, swap_atr;
+ uint32_t tx_bandsel_a, tx_bandsel_b, rx_bandsel_a, rx_bandsel_b, rx_bandsel_c, mimo, ref_sel, swap_atr;
gpio_state() {
tx_bandsel_a = 0;
diff --git a/host/lib/usrp/b200/b200_io_impl.cpp b/host/lib/usrp/b200/b200_io_impl.cpp
index d1468332e..0a00b9402 100644
--- a/host/lib/usrp/b200/b200_io_impl.cpp
+++ b/host/lib/usrp/b200/b200_io_impl.cpp
@@ -93,7 +93,7 @@ void b200_impl::set_auto_tick_rate(
// See also the doxygen documentation for these steps in b200_impl.hpp
// Step 1: Obtain LCM and max rate from all relevant dsps
- boost::uint32_t lcm_rate = (rate == 0) ? 1 : static_cast<boost::uint32_t>(floor(rate + 0.5));
+ uint32_t lcm_rate = (rate == 0) ? 1 : static_cast<uint32_t>(floor(rate + 0.5));
for (int i = 0; i < 2; i++) { // Loop through rx and tx
std::string dir = (i == 0) ? "tx" : "rx";
// We assume all 'set' DSPs are being used.
@@ -115,9 +115,9 @@ void b200_impl::set_auto_tick_rate(
}
// Clean up floating point rounding errors if they crept in
this_dsp_rate = std::min(max_tick_rate, this_dsp_rate);
- lcm_rate = boost::math::lcm<boost::uint32_t>(
+ lcm_rate = boost::math::lcm<uint32_t>(
lcm_rate,
- static_cast<boost::uint32_t>(floor(this_dsp_rate + 0.5))
+ static_cast<uint32_t>(floor(this_dsp_rate + 0.5))
);
}
}
@@ -266,7 +266,7 @@ void b200_impl::update_subdev_spec(const std::string &tx_rx, const uhd::usrp::su
}
static void b200_if_hdr_unpack_le(
- const boost::uint32_t *packet_buff,
+ const uint32_t *packet_buff,
vrt::if_packet_info_t &if_packet_info
){
if_packet_info.link_type = vrt::if_packet_info_t::LINK_TYPE_CHDR;
@@ -274,7 +274,7 @@ static void b200_if_hdr_unpack_le(
}
static void b200_if_hdr_pack_le(
- boost::uint32_t *packet_buff,
+ uint32_t *packet_buff,
vrt::if_packet_info_t &if_packet_info
){
if_packet_info.link_type = vrt::if_packet_info_t::LINK_TYPE_CHDR;
@@ -310,7 +310,7 @@ boost::optional<uhd::msg_task::msg_type_t> b200_impl::handle_async_task(
if (not buff or buff->size() < 8)
return boost::none;
- const boost::uint32_t sid = uhd::wtohx(buff->cast<const boost::uint32_t *>()[1]);
+ const uint32_t sid = uhd::wtohx(buff->cast<const uint32_t *>()[1]);
switch (sid) {
//if the packet is a control response
@@ -323,10 +323,10 @@ boost::optional<uhd::msg_task::msg_type_t> b200_impl::handle_async_task(
if (sid == B200_RESP1_MSG_SID) ctrl = data->radio_ctrl[1].lock();
if (sid == B200_LOCAL_RESP_SID) ctrl = data->local_ctrl.lock();
if (ctrl){
- ctrl->push_response(buff->cast<const boost::uint32_t *>());
+ ctrl->push_response(buff->cast<const uint32_t *>());
}
else{
- return std::make_pair(sid, uhd::msg_task::buff_to_vector(buff->cast<boost::uint8_t *>(), buff->size() ) );
+ return std::make_pair(sid, uhd::msg_task::buff_to_vector(buff->cast<uint8_t *>(), buff->size() ) );
}
break;
}
@@ -346,8 +346,8 @@ boost::optional<uhd::msg_task::msg_type_t> b200_impl::handle_async_task(
//extract packet info
vrt::if_packet_info_t if_packet_info;
- if_packet_info.num_packet_words32 = buff->size()/sizeof(boost::uint32_t);
- const boost::uint32_t *packet_buff = buff->cast<const boost::uint32_t *>();
+ if_packet_info.num_packet_words32 = buff->size()/sizeof(uint32_t);
+ const uint32_t *packet_buff = buff->cast<const uint32_t *>();
//unpacking can fail
try
@@ -362,7 +362,7 @@ boost::optional<uhd::msg_task::msg_type_t> b200_impl::handle_async_task(
//fill in the async metadata
async_metadata_t metadata;
- load_metadata_from_buff(uhd::wtohx<boost::uint32_t>, metadata, if_packet_info, packet_buff, _tick_rate, i);
+ load_metadata_from_buff(uhd::wtohx<uint32_t>, metadata, if_packet_info, packet_buff, _tick_rate, i);
data->async_md->push_with_pop_on_full(metadata);
standard_async_msg_prints(metadata);
break;
@@ -403,11 +403,11 @@ rx_streamer::sptr b200_impl::get_rx_stream(const uhd::stream_args_t &args_)
if (args.otw_format == "sc12") perif.ctrl->poke32(TOREG(SR_RX_FMT), 1);
if (args.otw_format == "fc32") perif.ctrl->poke32(TOREG(SR_RX_FMT), 2);
if (args.otw_format == "sc8") perif.ctrl->poke32(TOREG(SR_RX_FMT), 3);
- const boost::uint32_t sid = radio_index ? B200_RX_DATA1_SID : B200_RX_DATA0_SID;
+ const uint32_t sid = radio_index ? B200_RX_DATA1_SID : B200_RX_DATA0_SID;
//calculate packet size
static const size_t hdr_size = 0
- + vrt::max_if_hdr_words32*sizeof(boost::uint32_t)
+ + vrt::max_if_hdr_words32*sizeof(uint32_t)
//+ sizeof(vrt::if_packet_info_t().tlr) //no longer using trailer
- sizeof(vrt::if_packet_info_t().cid) //no class id ever used
- sizeof(vrt::if_packet_info_t().tsi) //no int time ever used
@@ -516,7 +516,7 @@ tx_streamer::sptr b200_impl::get_tx_stream(const uhd::stream_args_t &args_)
//calculate packet size
static const size_t hdr_size = 0
- + vrt::max_if_hdr_words32*sizeof(boost::uint32_t)
+ + vrt::max_if_hdr_words32*sizeof(uint32_t)
//+ sizeof(vrt::if_packet_info_t().tlr) //forced to have trailer
- sizeof(vrt::if_packet_info_t().cid) //no class id ever used
- sizeof(vrt::if_packet_info_t().tsi) //no int time ever used
diff --git a/host/lib/usrp/b200/b200_regs.hpp b/host/lib/usrp/b200/b200_regs.hpp
index e9ab81bae..038a59d11 100644
--- a/host/lib/usrp/b200/b200_regs.hpp
+++ b/host/lib/usrp/b200/b200_regs.hpp
@@ -18,7 +18,7 @@
#ifndef INCLUDED_B200_REGS_HPP
#define INCLUDED_B200_REGS_HPP
-#include <boost/cstdint.hpp>
+#include <stdint.h>
#define TOREG(x) ((x)*4)
@@ -61,64 +61,64 @@ static const double AD9361_SPI_RATE = 1e6;
static const double ADF4001_SPI_RATE = 10e3; //slow for large time constant on spi lines
/* ATR Control Bits */
-static const boost::uint32_t TX_ENABLE1 = (1 << 7);
-static const boost::uint32_t SFDX1_RX = (1 << 6);
-static const boost::uint32_t SFDX1_TX = (1 << 5);
-static const boost::uint32_t SRX1_RX = (1 << 4);
-static const boost::uint32_t SRX1_TX = (1 << 3);
-static const boost::uint32_t LED_RX1 = (1 << 2);
-static const boost::uint32_t LED_TXRX_RX1 = (1 << 1);
-static const boost::uint32_t LED_TXRX_TX1 = (1 << 0);
-
-static const boost::uint32_t TX_ENABLE2 = (1 << 7);
-static const boost::uint32_t SFDX2_RX = (1 << 6);
-static const boost::uint32_t SFDX2_TX = (1 << 5);
-static const boost::uint32_t SRX2_RX = (1 << 4);
-static const boost::uint32_t SRX2_TX = (1 << 3);
-static const boost::uint32_t LED_RX2 = (1 << 2);
-static const boost::uint32_t LED_TXRX_RX2 = (1 << 1);
-static const boost::uint32_t LED_TXRX_TX2 = (1 << 0);
+static const uint32_t TX_ENABLE1 = (1 << 7);
+static const uint32_t SFDX1_RX = (1 << 6);
+static const uint32_t SFDX1_TX = (1 << 5);
+static const uint32_t SRX1_RX = (1 << 4);
+static const uint32_t SRX1_TX = (1 << 3);
+static const uint32_t LED_RX1 = (1 << 2);
+static const uint32_t LED_TXRX_RX1 = (1 << 1);
+static const uint32_t LED_TXRX_TX1 = (1 << 0);
+
+static const uint32_t TX_ENABLE2 = (1 << 7);
+static const uint32_t SFDX2_RX = (1 << 6);
+static const uint32_t SFDX2_TX = (1 << 5);
+static const uint32_t SRX2_RX = (1 << 4);
+static const uint32_t SRX2_TX = (1 << 3);
+static const uint32_t LED_RX2 = (1 << 2);
+static const uint32_t LED_TXRX_RX2 = (1 << 1);
+static const uint32_t LED_TXRX_TX2 = (1 << 0);
/* ATR State Definitions. */
-static const boost::uint32_t STATE_OFF = 0x00;
+static const uint32_t STATE_OFF = 0x00;
///////////////////////// side 1 ///////////////////////////////////
-static const boost::uint32_t STATE_RX1_RX2 = (SFDX1_RX
+static const uint32_t STATE_RX1_RX2 = (SFDX1_RX
| SFDX1_TX
| LED_RX1);
-static const boost::uint32_t STATE_RX1_TXRX = (SRX1_RX
+static const uint32_t STATE_RX1_TXRX = (SRX1_RX
| SRX1_TX
| LED_TXRX_RX1);
-static const boost::uint32_t STATE_FDX1_TXRX = (TX_ENABLE1
+static const uint32_t STATE_FDX1_TXRX = (TX_ENABLE1
| SFDX1_RX
| SFDX1_TX
| LED_TXRX_TX1
| LED_RX1);
-static const boost::uint32_t STATE_TX1_TXRX = (TX_ENABLE1
+static const uint32_t STATE_TX1_TXRX = (TX_ENABLE1
| SFDX1_RX
| SFDX1_TX
| LED_TXRX_TX1);
///////////////////////// side 2 ///////////////////////////////////
-static const boost::uint32_t STATE_RX2_RX2 = (SFDX2_RX
+static const uint32_t STATE_RX2_RX2 = (SFDX2_RX
| SRX2_TX
| LED_RX2);
-static const boost::uint32_t STATE_RX2_TXRX = (SRX2_TX
+static const uint32_t STATE_RX2_TXRX = (SRX2_TX
| SRX2_RX
| LED_TXRX_RX2);
-static const boost::uint32_t STATE_FDX2_TXRX = (TX_ENABLE2
+static const uint32_t STATE_FDX2_TXRX = (TX_ENABLE2
| SFDX2_RX
| SFDX2_TX
| LED_TXRX_TX2
| LED_RX2);
-static const boost::uint32_t STATE_TX2_TXRX = (TX_ENABLE2
+static const uint32_t STATE_TX2_TXRX = (TX_ENABLE2
| SFDX2_RX
| SFDX2_TX
| LED_TXRX_TX2);
diff --git a/host/lib/usrp/b200/b200_uart.cpp b/host/lib/usrp/b200/b200_uart.cpp
index 065aa49ce..3c49ebf2a 100644
--- a/host/lib/usrp/b200/b200_uart.cpp
+++ b/host/lib/usrp/b200/b200_uart.cpp
@@ -30,7 +30,7 @@ using namespace uhd::transport;
struct b200_uart_impl : b200_uart
{
- b200_uart_impl(zero_copy_if::sptr xport, const boost::uint32_t sid):
+ b200_uart_impl(zero_copy_if::sptr xport, const uint32_t sid):
_xport(xport),
_sid(sid),
_count(0),
@@ -49,7 +49,7 @@ struct b200_uart_impl : b200_uart
packet_info.link_type = vrt::if_packet_info_t::LINK_TYPE_CHDR;
packet_info.packet_type = vrt::if_packet_info_t::PACKET_TYPE_CONTEXT;
packet_info.num_payload_words32 = 2;
- packet_info.num_payload_bytes = packet_info.num_payload_words32*sizeof(boost::uint32_t);
+ packet_info.num_payload_bytes = packet_info.num_payload_words32*sizeof(uint32_t);
packet_info.packet_count = _count++;
packet_info.sob = false;
packet_info.eob = false;
@@ -60,11 +60,11 @@ struct b200_uart_impl : b200_uart
packet_info.has_tsf = false;
packet_info.has_tlr = false;
- boost::uint32_t *packet_buff = buff->cast<boost::uint32_t *>();
+ uint32_t *packet_buff = buff->cast<uint32_t *>();
vrt::if_hdr_pack_le(packet_buff, packet_info);
- packet_buff[packet_info.num_header_words32+0] = uhd::htowx(boost::uint32_t(_baud_div));
- packet_buff[packet_info.num_header_words32+1] = uhd::htowx(boost::uint32_t(ch));
- buff->commit(packet_info.num_packet_words32*sizeof(boost::uint32_t));
+ packet_buff[packet_info.num_header_words32+0] = uhd::htowx(uint32_t(_baud_div));
+ packet_buff[packet_info.num_header_words32+1] = uhd::htowx(uint32_t(ch));
+ buff->commit(packet_info.num_packet_words32*sizeof(uint32_t));
}
void write_uart(const std::string &buff)
@@ -84,10 +84,10 @@ struct b200_uart_impl : b200_uart
void handle_uart_packet(managed_recv_buffer::sptr buff)
{
- const boost::uint32_t *packet_buff = buff->cast<const boost::uint32_t *>();
+ const uint32_t *packet_buff = buff->cast<const uint32_t *>();
vrt::if_packet_info_t packet_info;
packet_info.link_type = vrt::if_packet_info_t::LINK_TYPE_CHDR;
- packet_info.num_packet_words32 = buff->size()/sizeof(boost::uint32_t);
+ packet_info.num_packet_words32 = buff->size()/sizeof(uint32_t);
vrt::if_hdr_unpack_le(packet_buff, packet_info);
const char ch = char(uhd::wtohx(packet_buff[packet_info.num_header_words32+1]));
_line += ch;
@@ -99,7 +99,7 @@ struct b200_uart_impl : b200_uart
}
const zero_copy_if::sptr _xport;
- const boost::uint32_t _sid;
+ const uint32_t _sid;
size_t _count;
size_t _baud_div;
bounded_buffer<std::string> _line_queue;
@@ -107,7 +107,7 @@ struct b200_uart_impl : b200_uart
};
-b200_uart::sptr b200_uart::make(zero_copy_if::sptr xport, const boost::uint32_t sid)
+b200_uart::sptr b200_uart::make(zero_copy_if::sptr xport, const uint32_t sid)
{
return b200_uart::sptr(new b200_uart_impl(xport, sid));
}
diff --git a/host/lib/usrp/b200/b200_uart.hpp b/host/lib/usrp/b200/b200_uart.hpp
index f58479888..3d4ece240 100644
--- a/host/lib/usrp/b200/b200_uart.hpp
+++ b/host/lib/usrp/b200/b200_uart.hpp
@@ -27,7 +27,7 @@ class b200_uart: boost::noncopyable, public uhd::uart_iface
{
public:
typedef boost::shared_ptr<b200_uart> sptr;
- static sptr make(uhd::transport::zero_copy_if::sptr, const boost::uint32_t sid);
+ static sptr make(uhd::transport::zero_copy_if::sptr, const uint32_t sid);
virtual void handle_uart_packet(uhd::transport::managed_recv_buffer::sptr buff) = 0;
};
diff --git a/host/lib/usrp/common/ad9361_ctrl.cpp b/host/lib/usrp/common/ad9361_ctrl.cpp
index 654311424..0dc5e7919 100644
--- a/host/lib/usrp/common/ad9361_ctrl.cpp
+++ b/host/lib/usrp/common/ad9361_ctrl.cpp
@@ -36,12 +36,12 @@ using namespace uhd::usrp;
class ad9361_io_spi : public ad9361_io
{
public:
- ad9361_io_spi(uhd::spi_iface::sptr spi_iface, boost::uint32_t slave_num) :
+ ad9361_io_spi(uhd::spi_iface::sptr spi_iface, uint32_t slave_num) :
_spi_iface(spi_iface), _slave_num(slave_num) { }
virtual ~ad9361_io_spi() { }
- virtual boost::uint8_t peek8(boost::uint32_t reg)
+ virtual uint8_t peek8(uint32_t reg)
{
boost::lock_guard<boost::mutex> lock(_mutex);
@@ -49,16 +49,16 @@ public:
config.mosi_edge = uhd::spi_config_t::EDGE_FALL;
config.miso_edge = uhd::spi_config_t::EDGE_FALL; //TODO (Ashish): FPGA SPI workaround. This should be EDGE_RISE
- boost::uint32_t rd_word = AD9361_SPI_READ_CMD |
- ((boost::uint32_t(reg) << AD9361_SPI_ADDR_SHIFT) & AD9361_SPI_ADDR_MASK);
+ uint32_t rd_word = AD9361_SPI_READ_CMD |
+ ((uint32_t(reg) << AD9361_SPI_ADDR_SHIFT) & AD9361_SPI_ADDR_MASK);
- boost::uint32_t val = (_spi_iface->read_spi(_slave_num, config, rd_word, AD9361_SPI_NUM_BITS));
+ uint32_t val = (_spi_iface->read_spi(_slave_num, config, rd_word, AD9361_SPI_NUM_BITS));
val &= 0xFF;
- return static_cast<boost::uint8_t>(val);
+ return static_cast<uint8_t>(val);
}
- virtual void poke8(boost::uint32_t reg, boost::uint8_t val)
+ virtual void poke8(uint32_t reg, uint8_t val)
{
boost::lock_guard<boost::mutex> lock(_mutex);
@@ -66,24 +66,24 @@ public:
config.mosi_edge = uhd::spi_config_t::EDGE_FALL;
config.miso_edge = uhd::spi_config_t::EDGE_FALL; //TODO (Ashish): FPGA SPI workaround. This should be EDGE_RISE
- boost::uint32_t wr_word = AD9361_SPI_WRITE_CMD |
- ((boost::uint32_t(reg) << AD9361_SPI_ADDR_SHIFT) & AD9361_SPI_ADDR_MASK) |
- ((boost::uint32_t(val) << AD9361_SPI_DATA_SHIFT) & AD9361_SPI_DATA_MASK);
+ uint32_t wr_word = AD9361_SPI_WRITE_CMD |
+ ((uint32_t(reg) << AD9361_SPI_ADDR_SHIFT) & AD9361_SPI_ADDR_MASK) |
+ ((uint32_t(val) << AD9361_SPI_DATA_SHIFT) & AD9361_SPI_DATA_MASK);
_spi_iface->write_spi(_slave_num, config, wr_word, AD9361_SPI_NUM_BITS);
}
private:
uhd::spi_iface::sptr _spi_iface;
- boost::uint32_t _slave_num;
+ uint32_t _slave_num;
boost::mutex _mutex;
- static const boost::uint32_t AD9361_SPI_WRITE_CMD = 0x00800000;
- static const boost::uint32_t AD9361_SPI_READ_CMD = 0x00000000;
- static const boost::uint32_t AD9361_SPI_ADDR_MASK = 0x003FFF00;
- static const boost::uint32_t AD9361_SPI_ADDR_SHIFT = 8;
- static const boost::uint32_t AD9361_SPI_DATA_MASK = 0x000000FF;
- static const boost::uint32_t AD9361_SPI_DATA_SHIFT = 0;
- static const boost::uint32_t AD9361_SPI_NUM_BITS = 24;
+ static const uint32_t AD9361_SPI_WRITE_CMD = 0x00800000;
+ static const uint32_t AD9361_SPI_READ_CMD = 0x00000000;
+ static const uint32_t AD9361_SPI_ADDR_MASK = 0x003FFF00;
+ static const uint32_t AD9361_SPI_ADDR_SHIFT = 8;
+ static const uint32_t AD9361_SPI_DATA_MASK = 0x000000FF;
+ static const uint32_t AD9361_SPI_DATA_SHIFT = 0;
+ static const uint32_t AD9361_SPI_NUM_BITS = 24;
};
/***********************************************************************
@@ -98,13 +98,13 @@ public:
_device.initialize();
}
- void set_timed_spi(uhd::spi_iface::sptr spi_iface, boost::uint32_t slave_num)
+ void set_timed_spi(uhd::spi_iface::sptr spi_iface, uint32_t slave_num)
{
_timed_spi = boost::make_shared<ad9361_io_spi>(spi_iface, slave_num);
_use_timed_spi();
}
- void set_safe_spi(uhd::spi_iface::sptr spi_iface, boost::uint32_t slave_num)
+ void set_safe_spi(uhd::spi_iface::sptr spi_iface, uint32_t slave_num)
{
_safe_spi = boost::make_shared<ad9361_io_spi>(spi_iface, slave_num);
}
@@ -327,7 +327,7 @@ private:
ad9361_ctrl::sptr ad9361_ctrl::make_spi(
ad9361_params::sptr client_settings,
uhd::spi_iface::sptr spi_iface,
- boost::uint32_t slave_num
+ uint32_t slave_num
) {
boost::shared_ptr<ad9361_io_spi> spi_io_iface = boost::make_shared<ad9361_io_spi>(spi_iface, slave_num);
return sptr(new ad9361_ctrl_impl(client_settings, spi_io_iface));
diff --git a/host/lib/usrp/common/ad9361_ctrl.hpp b/host/lib/usrp/common/ad9361_ctrl.hpp
index 5770c3ec4..5a10e4b5f 100644
--- a/host/lib/usrp/common/ad9361_ctrl.hpp
+++ b/host/lib/usrp/common/ad9361_ctrl.hpp
@@ -58,11 +58,11 @@ public:
static sptr make_spi(
ad9361_params::sptr client_settings,
uhd::spi_iface::sptr spi_iface,
- boost::uint32_t slave_num
+ uint32_t slave_num
);
- virtual void set_timed_spi(uhd::spi_iface::sptr spi_iface, boost::uint32_t slave_num) = 0;
- virtual void set_safe_spi(uhd::spi_iface::sptr spi_iface, boost::uint32_t slave_num) = 0;
+ virtual void set_timed_spi(uhd::spi_iface::sptr spi_iface, uint32_t slave_num) = 0;
+ virtual void set_safe_spi(uhd::spi_iface::sptr spi_iface, uint32_t slave_num) = 0;
//! Get a list of gain names for RX or TX
static std::vector<std::string> get_gain_names(const std::string &/*which*/)
diff --git a/host/lib/usrp/common/ad9361_driver/ad9361_client.h b/host/lib/usrp/common/ad9361_driver/ad9361_client.h
index e9ea1404a..921045fbd 100644
--- a/host/lib/usrp/common/ad9361_driver/ad9361_client.h
+++ b/host/lib/usrp/common/ad9361_driver/ad9361_client.h
@@ -51,10 +51,10 @@ typedef enum {
* Interface timing
*/
typedef struct {
- boost::uint8_t rx_clk_delay;
- boost::uint8_t rx_data_delay;
- boost::uint8_t tx_clk_delay;
- boost::uint8_t tx_data_delay;
+ uint8_t rx_clk_delay;
+ uint8_t rx_data_delay;
+ uint8_t tx_clk_delay;
+ uint8_t tx_data_delay;
} digital_interface_delays_t;
class ad9361_params {
@@ -76,8 +76,8 @@ public:
virtual ~ad9361_io() {}
- virtual boost::uint8_t peek8(boost::uint32_t reg) = 0;
- virtual void poke8(boost::uint32_t reg, boost::uint8_t val) = 0;
+ virtual uint8_t peek8(uint32_t reg) = 0;
+ virtual void poke8(uint32_t reg, uint8_t val) = 0;
};
diff --git a/host/lib/usrp/common/ad9361_driver/ad9361_device.cpp b/host/lib/usrp/common/ad9361_driver/ad9361_device.cpp
index 095017bb6..45ebf78bf 100644
--- a/host/lib/usrp/common/ad9361_driver/ad9361_device.cpp
+++ b/host/lib/usrp/common/ad9361_driver/ad9361_device.cpp
@@ -25,7 +25,7 @@
#include <uhd/exception.hpp>
#include <uhd/utils/log.hpp>
#include <uhd/utils/msg.hpp>
-#include <boost/cstdint.hpp>
+#include <stdint.h>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/thread/thread.hpp>
#include <boost/scoped_array.hpp>
@@ -107,9 +107,9 @@ const double ad9361_device_t::DEFAULT_TX_FREQ = 850e6;
* how many taps are in the filter, and given a vector of the taps
* themselves. */
-void ad9361_device_t::_program_fir_filter(direction_t direction, chain_t chain, int num_taps, boost::uint16_t *coeffs)
+void ad9361_device_t::_program_fir_filter(direction_t direction, chain_t chain, int num_taps, uint16_t *coeffs)
{
- boost::uint16_t base;
+ uint16_t base;
/* RX and TX filters use largely identical sets of programming registers.
Select the appropriate bank of registers here. */
@@ -120,9 +120,9 @@ void ad9361_device_t::_program_fir_filter(direction_t direction, chain_t chain,
}
/* Encode number of filter taps for programming register */
- boost::uint8_t reg_numtaps = (((num_taps / 16) - 1) & 0x07) << 5;
+ uint8_t reg_numtaps = (((num_taps / 16) - 1) & 0x07) << 5;
- boost::uint8_t reg_chain = 0;
+ uint8_t reg_chain = 0;
switch (chain) {
case CHAIN_1:
reg_chain = 0x01 << 3;
@@ -182,25 +182,25 @@ void ad9361_device_t::_program_fir_filter(direction_t direction, chain_t chain,
/* Program the RX FIR Filter. */
-void ad9361_device_t::_setup_rx_fir(size_t num_taps, boost::int32_t decimation)
+void ad9361_device_t::_setup_rx_fir(size_t num_taps, int32_t decimation)
{
if (not (decimation == 1 or decimation == 2 or decimation == 4)) {
throw uhd::runtime_error("[ad9361_device_t] Invalid Rx FIR decimation.");
}
- boost::scoped_array<boost::uint16_t> coeffs(new boost::uint16_t[num_taps]);
+ boost::scoped_array<uint16_t> coeffs(new uint16_t[num_taps]);
for (size_t i = 0; i < num_taps; i++) {
switch (num_taps) {
case 128:
- coeffs[i] = boost::uint16_t((decimation==4) ? fir_128_x4_coeffs[i] : hb127_coeffs[i]);
+ coeffs[i] = uint16_t((decimation==4) ? fir_128_x4_coeffs[i] : hb127_coeffs[i]);
break;
case 96:
- coeffs[i] = boost::uint16_t((decimation==4) ? fir_96_x4_coeffs[i] : hb95_coeffs[i]);
+ coeffs[i] = uint16_t((decimation==4) ? fir_96_x4_coeffs[i] : hb95_coeffs[i]);
break;
case 64:
- coeffs[i] = boost::uint16_t((decimation==4) ? fir_64_x4_coeffs[i] : hb63_coeffs[i]);
+ coeffs[i] = uint16_t((decimation==4) ? fir_64_x4_coeffs[i] : hb63_coeffs[i]);
break;
case 48:
- coeffs[i] = boost::uint16_t((decimation==4) ? fir_48_x4_coeffs[i] : hb47_coeffs[i]);
+ coeffs[i] = uint16_t((decimation==4) ? fir_48_x4_coeffs[i] : hb47_coeffs[i]);
break;
default:
throw uhd::runtime_error("[ad9361_device_t] Unsupported number of Rx FIR taps.");
@@ -211,7 +211,7 @@ void ad9361_device_t::_setup_rx_fir(size_t num_taps, boost::int32_t decimation)
}
/* Program the TX FIR Filter. */
-void ad9361_device_t::_setup_tx_fir(size_t num_taps, boost::int32_t interpolation)
+void ad9361_device_t::_setup_tx_fir(size_t num_taps, int32_t interpolation)
{
if (not (interpolation == 1 or interpolation == 2 or interpolation == 4)) {
throw uhd::runtime_error("[ad9361_device_t] Invalid Tx FIR interpolation.");
@@ -219,20 +219,20 @@ void ad9361_device_t::_setup_tx_fir(size_t num_taps, boost::int32_t interpolatio
if (interpolation == 1 and num_taps > 64) {
throw uhd::runtime_error("[ad9361_device_t] Too many Tx FIR taps for interpolation value.");
}
- boost::scoped_array<boost::uint16_t> coeffs(new boost::uint16_t[num_taps]);
+ boost::scoped_array<uint16_t> coeffs(new uint16_t[num_taps]);
for (size_t i = 0; i < num_taps; i++) {
switch (num_taps) {
case 128:
- coeffs[i] = boost::uint16_t((interpolation==4) ? fir_128_x4_coeffs[i] : hb127_coeffs[i]);
+ coeffs[i] = uint16_t((interpolation==4) ? fir_128_x4_coeffs[i] : hb127_coeffs[i]);
break;
case 96:
- coeffs[i] = boost::uint16_t((interpolation==4) ? fir_96_x4_coeffs[i] : hb95_coeffs[i]);
+ coeffs[i] = uint16_t((interpolation==4) ? fir_96_x4_coeffs[i] : hb95_coeffs[i]);
break;
case 64:
- coeffs[i] = boost::uint16_t((interpolation==4) ? fir_64_x4_coeffs[i] : hb63_coeffs[i]);
+ coeffs[i] = uint16_t((interpolation==4) ? fir_64_x4_coeffs[i] : hb63_coeffs[i]);
break;
case 48:
- coeffs[i] = boost::uint16_t((interpolation==4) ? fir_48_x4_coeffs[i] : hb47_coeffs[i]);
+ coeffs[i] = uint16_t((interpolation==4) ? fir_48_x4_coeffs[i] : hb47_coeffs[i]);
break;
default:
throw uhd::runtime_error("[ad9361_device_t] Unsupported number of Tx FIR taps.");
@@ -335,16 +335,16 @@ double ad9361_device_t::_calibrate_baseband_rx_analog_filter(double req_rfbw)
}
double rxtune_clk = ((1.4 * bbbw * 2 * M_PI) / M_LN2);
- _rx_bbf_tunediv = std::min<boost::uint16_t>(511, boost::uint16_t(std::ceil(_bbpll_freq / rxtune_clk)));
+ _rx_bbf_tunediv = std::min<uint16_t>(511, uint16_t(std::ceil(_bbpll_freq / rxtune_clk)));
_regs.bbftune_config = (_regs.bbftune_config & 0xFE)
| ((_rx_bbf_tunediv >> 8) & 0x0001);
double bbbw_mhz = bbbw / 1e6;
double temp = ((bbbw_mhz - std::floor(bbbw_mhz)) * 1000) / 7.8125;
- boost::uint8_t bbbw_khz = std::min<boost::uint8_t>(127, boost::uint8_t(std::floor(temp + 0.5)));
+ uint8_t bbbw_khz = std::min<uint8_t>(127, uint8_t(std::floor(temp + 0.5)));
/* Set corner frequencies and dividers. */
- _io_iface->poke8(0x1fb, (boost::uint8_t) (bbbw_mhz));
+ _io_iface->poke8(0x1fb, (uint8_t) (bbbw_mhz));
_io_iface->poke8(0x1fc, bbbw_khz);
_io_iface->poke8(0x1f8, (_rx_bbf_tunediv & 0x00FF));
_io_iface->poke8(0x1f9, _regs.bbftune_config);
@@ -402,7 +402,7 @@ double ad9361_device_t::_calibrate_baseband_tx_analog_filter(double req_rfbw)
}
double txtune_clk = ((1.6 * bbbw * 2 * M_PI) / M_LN2);
- boost::uint16_t txbbfdiv = std::min<boost::uint16_t>(511, boost::uint16_t(std::ceil(_bbpll_freq / txtune_clk)));
+ uint16_t txbbfdiv = std::min<uint16_t>(511, uint16_t(std::ceil(_bbpll_freq / txtune_clk)));
_regs.bbftune_mode = (_regs.bbftune_mode & 0xFE)
| ((txbbfdiv >> 8) & 0x0001);
@@ -481,7 +481,7 @@ double ad9361_device_t::_calibrate_secondary_tx_filter(double req_rfbw)
cap = 63;
}
- boost::uint8_t reg0d0, reg0d1, reg0d2;
+ uint8_t reg0d0, reg0d1, reg0d2;
/* Translate baseband bandwidths to register settings. */
if ((bbbw_mhz * 2) <= 9) {
@@ -526,14 +526,14 @@ double ad9361_device_t::_calibrate_secondary_tx_filter(double req_rfbw)
* UG570 page 33 states that this filter should be calibrated to 2.5 * bbbw */
double ad9361_device_t::_calibrate_rx_TIAs(double req_rfbw)
{
- boost::uint8_t reg1eb = _io_iface->peek8(0x1eb) & 0x3F;
- boost::uint8_t reg1ec = _io_iface->peek8(0x1ec) & 0x7F;
- boost::uint8_t reg1e6 = _io_iface->peek8(0x1e6) & 0x07;
- boost::uint8_t reg1db = 0x00;
- boost::uint8_t reg1dc = 0x00;
- boost::uint8_t reg1dd = 0x00;
- boost::uint8_t reg1de = 0x00;
- boost::uint8_t reg1df = 0x00;
+ uint8_t reg1eb = _io_iface->peek8(0x1eb) & 0x3F;
+ uint8_t reg1ec = _io_iface->peek8(0x1ec) & 0x7F;
+ uint8_t reg1e6 = _io_iface->peek8(0x1e6) & 0x07;
+ uint8_t reg1db = 0x00;
+ uint8_t reg1dc = 0x00;
+ uint8_t reg1dd = 0x00;
+ uint8_t reg1de = 0x00;
+ uint8_t reg1df = 0x00;
double bbbw = req_rfbw / 2.0;
@@ -572,12 +572,12 @@ double ad9361_device_t::_calibrate_rx_TIAs(double req_rfbw)
if (CTIA_fF > 2920) {
reg1dc = 0x40;
reg1de = 0x40;
- boost::uint8_t temp = (boost::uint8_t) std::min<boost::uint8_t>(127,
- boost::uint8_t(std::floor(0.5 + ((CTIA_fF - 400.0) / 320.0))));
+ uint8_t temp = (uint8_t) std::min<uint8_t>(127,
+ uint8_t(std::floor(0.5 + ((CTIA_fF - 400.0) / 320.0))));
reg1dd = temp;
reg1df = temp;
} else {
- boost::uint8_t temp = boost::uint8_t(std::floor(0.5 + ((CTIA_fF - 400.0) / 40.0)) + 0x40);
+ uint8_t temp = uint8_t(std::floor(0.5 + ((CTIA_fF - 400.0) / 40.0)) + 0x40);
reg1dc = temp;
reg1de = temp;
reg1dd = 0;
@@ -613,9 +613,9 @@ void ad9361_device_t::_setup_adc()
bbbw_mhz = 0.20;
}
- boost::uint8_t rxbbf_c3_msb = _io_iface->peek8(0x1eb) & 0x3F;
- boost::uint8_t rxbbf_c3_lsb = _io_iface->peek8(0x1ec) & 0x7F;
- boost::uint8_t rxbbf_r2346 = _io_iface->peek8(0x1e6) & 0x07;
+ uint8_t rxbbf_c3_msb = _io_iface->peek8(0x1eb) & 0x3F;
+ uint8_t rxbbf_c3_lsb = _io_iface->peek8(0x1ec) & 0x7F;
+ uint8_t rxbbf_r2346 = _io_iface->peek8(0x1e6) & 0x07;
double fsadc = _adcclock_freq / 1e6;
@@ -644,71 +644,71 @@ void ad9361_device_t::_setup_adc()
/* Calculate the values for all 40 settings registers.
*
* DO NOT TOUCH THIS UNLESS YOU KNOW EXACTLY WHAT YOU ARE DOING. kthx.*/
- boost::uint8_t data[40];
+ uint8_t data[40];
data[0] = 0; data[1] = 0; data[2] = 0; data[3] = 0x24;
data[4] = 0x24; data[5] = 0; data[6] = 0;
- data[7] = std::min<boost::uint8_t>(124, boost::uint8_t(std::floor(-0.5
+ data[7] = std::min<uint8_t>(124, uint8_t(std::floor(-0.5
+ (80.0 * scale_snr * scale_res
* std::min<double>(1.0, sqrt(maxsnr * fsadc / 640.0))))));
double data007 = data[7];
- data[8] = std::min<boost::uint8_t>(255, boost::uint8_t(std::floor(0.5
+ data[8] = std::min<uint8_t>(255, uint8_t(std::floor(0.5
+ ((20.0 * (640.0 / fsadc) * ((data007 / 80.0))
/ (scale_res * scale_cap))))));
- data[10] = std::min<boost::uint8_t>(127, boost::uint8_t(std::floor(-0.5 + (77.0 * scale_res
+ data[10] = std::min<uint8_t>(127, uint8_t(std::floor(-0.5 + (77.0 * scale_res
* std::min<double>(1.0, sqrt(maxsnr * fsadc / 640.0))))));
double data010 = data[10];
- data[9] = std::min<boost::uint8_t>(127, boost::uint8_t(std::floor(0.8 * data010)));
- data[11] = std::min<boost::uint8_t>(255, boost::uint8_t(std::floor(0.5
+ data[9] = std::min<uint8_t>(127, uint8_t(std::floor(0.8 * data010)));
+ data[11] = std::min<uint8_t>(255, uint8_t(std::floor(0.5
+ (20.0 * (640.0 / fsadc) * ((data010 / 77.0)
/ (scale_res * scale_cap))))));
- data[12] = std::min<boost::uint8_t>(127, boost::uint8_t(std::floor(-0.5
+ data[12] = std::min<uint8_t>(127, uint8_t(std::floor(-0.5
+ (80.0 * scale_res * std::min<double>(1.0,
sqrt(maxsnr * fsadc / 640.0))))));
double data012 = data[12];
- data[13] = std::min<boost::uint8_t>(255, boost::uint8_t(std::floor(-1.5
+ data[13] = std::min<uint8_t>(255, uint8_t(std::floor(-1.5
+ (20.0 * (640.0 / fsadc) * ((data012 / 80.0)
/ (scale_res * scale_cap))))));
- data[14] = 21 * boost::uint8_t(std::floor(0.1 * 640.0 / fsadc));
- data[15] = std::min<boost::uint8_t>(127, boost::uint8_t(1.025 * data007));
+ data[14] = 21 * uint8_t(std::floor(0.1 * 640.0 / fsadc));
+ data[15] = std::min<uint8_t>(127, uint8_t(1.025 * data007));
double data015 = data[15];
- data[16] = std::min<boost::uint8_t>(127, boost::uint8_t(std::floor((data015
+ data[16] = std::min<uint8_t>(127, uint8_t(std::floor((data015
* (0.98 + (0.02 * std::max<double>(1.0,
(640.0 / fsadc) / maxsnr)))))));
data[17] = data[15];
- data[18] = std::min<boost::uint8_t>(127, boost::uint8_t(0.975 * (data010)));
+ data[18] = std::min<uint8_t>(127, uint8_t(0.975 * (data010)));
double data018 = data[18];
- data[19] = std::min<boost::uint8_t>(127, boost::uint8_t(std::floor((data018
+ data[19] = std::min<uint8_t>(127, uint8_t(std::floor((data018
* (0.98 + (0.02 * std::max<double>(1.0,
(640.0 / fsadc) / maxsnr)))))));
data[20] = data[18];
- data[21] = std::min<boost::uint8_t>(127, boost::uint8_t(0.975 * data012));
+ data[21] = std::min<uint8_t>(127, uint8_t(0.975 * data012));
double data021 = data[21];
- data[22] = std::min<boost::uint8_t>(127, boost::uint8_t(std::floor((data021
+ data[22] = std::min<uint8_t>(127, uint8_t(std::floor((data021
* (0.98 + (0.02 * std::max<double>(1.0,
(640.0 / fsadc) / maxsnr)))))));
data[23] = data[21];
data[24] = 0x2e;
- data[25] = boost::uint8_t(std::floor(128.0 + std::min<double>(63.0,
+ data[25] = uint8_t(std::floor(128.0 + std::min<double>(63.0,
63.0 * (fsadc / 640.0))));
- data[26] = boost::uint8_t(std::floor(std::min<double>(63.0, 63.0 * (fsadc / 640.0)
+ data[26] = uint8_t(std::floor(std::min<double>(63.0, 63.0 * (fsadc / 640.0)
* (0.92 + (0.08 * (640.0 / fsadc))))));
- data[27] = boost::uint8_t(std::floor(std::min<double>(63.0,
+ data[27] = uint8_t(std::floor(std::min<double>(63.0,
32.0 * sqrt(fsadc / 640.0))));
- data[28] = boost::uint8_t(std::floor(128.0 + std::min<double>(63.0,
+ data[28] = uint8_t(std::floor(128.0 + std::min<double>(63.0,
63.0 * (fsadc / 640.0))));
- data[29] = boost::uint8_t(std::floor(std::min<double>(63.0,
+ data[29] = uint8_t(std::floor(std::min<double>(63.0,
63.0 * (fsadc / 640.0)
* (0.92 + (0.08 * (640.0 / fsadc))))));
- data[30] = boost::uint8_t(std::floor(std::min<double>(63.0,
+ data[30] = uint8_t(std::floor(std::min<double>(63.0,
32.0 * sqrt(fsadc / 640.0))));
- data[31] = boost::uint8_t(std::floor(128.0 + std::min<double>(63.0,
+ data[31] = uint8_t(std::floor(128.0 + std::min<double>(63.0,
63.0 * (fsadc / 640.0))));
- data[32] = boost::uint8_t(std::floor(std::min<double>(63.0,
+ data[32] = uint8_t(std::floor(std::min<double>(63.0,
63.0 * (fsadc / 640.0) * (0.92
+ (0.08 * (640.0 / fsadc))))));
- data[33] = boost::uint8_t(std::floor(std::min<double>(63.0,
+ data[33] = uint8_t(std::floor(std::min<double>(63.0,
63.0 * sqrt(fsadc / 640.0))));
- data[34] = std::min<boost::uint8_t>(127, boost::uint8_t(std::floor(64.0
+ data[34] = std::min<uint8_t>(127, uint8_t(std::floor(64.0
* sqrt(fsadc / 640.0))));
data[35] = 0x40;
data[36] = 0x40;
@@ -848,8 +848,8 @@ void ad9361_device_t::_tx_quadrature_cal_routine() {
* 3) Re-read 0A3 to get bits [5:0] because maybe they changed?
* 4) Update only the TX NCO freq bits in 0A3.
* 5) Profit (I hope). */
- boost::uint8_t reg0a3 = _io_iface->peek8(0x0a3);
- boost::uint8_t nco_freq = (reg0a3 & 0xC0);
+ uint8_t reg0a3 = _io_iface->peek8(0x0a3);
+ uint8_t nco_freq = (reg0a3 & 0xC0);
_io_iface->poke8(0x0a0, 0x15 | (nco_freq >> 1));
reg0a3 = _io_iface->peek8(0x0a3);
_io_iface->poke8(0x0a3, (reg0a3 & 0x3F) | nco_freq);
@@ -916,7 +916,7 @@ void ad9361_device_t::_calibrate_tx_quadrature()
/* This calibration must be done in a certain order, and for both TX_A
* and TX_B, separately. Store the original setting so that we can
* restore it later. */
- boost::uint8_t orig_reg_inputsel = _regs.inputsel;
+ uint8_t orig_reg_inputsel = _regs.inputsel;
/***********************************************************************
* TX1/2-A Calibration
@@ -951,9 +951,9 @@ void ad9361_device_t::_calibrate_tx_quadrature()
* Note that this table is fixed for all frequency settings. */
void ad9361_device_t::_program_mixer_gm_subtable()
{
- boost::uint8_t gain[] = { 0x78, 0x74, 0x70, 0x6C, 0x68, 0x64, 0x60, 0x5C, 0x58,
+ uint8_t gain[] = { 0x78, 0x74, 0x70, 0x6C, 0x68, 0x64, 0x60, 0x5C, 0x58,
0x54, 0x50, 0x4C, 0x48, 0x30, 0x18, 0x00 };
- boost::uint8_t gm[] = { 0x00, 0x0D, 0x15, 0x1B, 0x21, 0x25, 0x29, 0x2C, 0x2F, 0x31,
+ uint8_t gm[] = { 0x00, 0x0D, 0x15, 0x1B, 0x21, 0x25, 0x29, 0x2C, 0x2F, 0x31,
0x33, 0x34, 0x35, 0x3A, 0x3D, 0x3E };
/* Start the clock. */
@@ -984,8 +984,8 @@ void ad9361_device_t::_program_mixer_gm_subtable()
void ad9361_device_t::_program_gain_table() {
/* Figure out which gain table we should be using for our current
* frequency band. */
- boost::uint8_t (*gain_table)[3] = NULL;
- boost::uint8_t new_gain_table;
+ uint8_t (*gain_table)[3] = NULL;
+ uint8_t new_gain_table;
if (_rx_freq < 1300e6) {
gain_table = gain_table_sub_1300mhz;
new_gain_table = 1;
@@ -1012,7 +1012,7 @@ void ad9361_device_t::_program_gain_table() {
_io_iface->poke8(0x137, 0x1A);
/* IT'S PROGRAMMING TIME. */
- boost::uint8_t index = 0;
+ uint8_t index = 0;
for (; index < 77; index++) {
_io_iface->poke8(0x130, index);
_io_iface->poke8(0x131, gain_table[index][0]);
@@ -1118,18 +1118,18 @@ void ad9361_device_t::_setup_synth(direction_t direction, double vcorate)
throw uhd::runtime_error("[ad9361_device_t] vcoindex > 53");
/* Parse the values out of the LUT based on our calculated index... */
- boost::uint8_t vco_output_level = synth_cal_lut[vcoindex][0];
- boost::uint8_t vco_varactor = synth_cal_lut[vcoindex][1];
- boost::uint8_t vco_bias_ref = synth_cal_lut[vcoindex][2];
- boost::uint8_t vco_bias_tcf = synth_cal_lut[vcoindex][3];
- boost::uint8_t vco_cal_offset = synth_cal_lut[vcoindex][4];
- boost::uint8_t vco_varactor_ref = synth_cal_lut[vcoindex][5];
- boost::uint8_t charge_pump_curr = synth_cal_lut[vcoindex][6];
- boost::uint8_t loop_filter_c2 = synth_cal_lut[vcoindex][7];
- boost::uint8_t loop_filter_c1 = synth_cal_lut[vcoindex][8];
- boost::uint8_t loop_filter_r1 = synth_cal_lut[vcoindex][9];
- boost::uint8_t loop_filter_c3 = synth_cal_lut[vcoindex][10];
- boost::uint8_t loop_filter_r3 = synth_cal_lut[vcoindex][11];
+ uint8_t vco_output_level = synth_cal_lut[vcoindex][0];
+ uint8_t vco_varactor = synth_cal_lut[vcoindex][1];
+ uint8_t vco_bias_ref = synth_cal_lut[vcoindex][2];
+ uint8_t vco_bias_tcf = synth_cal_lut[vcoindex][3];
+ uint8_t vco_cal_offset = synth_cal_lut[vcoindex][4];
+ uint8_t vco_varactor_ref = synth_cal_lut[vcoindex][5];
+ uint8_t charge_pump_curr = synth_cal_lut[vcoindex][6];
+ uint8_t loop_filter_c2 = synth_cal_lut[vcoindex][7];
+ uint8_t loop_filter_c1 = synth_cal_lut[vcoindex][8];
+ uint8_t loop_filter_r1 = synth_cal_lut[vcoindex][9];
+ uint8_t loop_filter_c3 = synth_cal_lut[vcoindex][10];
+ uint8_t loop_filter_r3 = synth_cal_lut[vcoindex][11];
/* ... annnd program! */
if (direction == RX) {
@@ -1566,7 +1566,7 @@ void ad9361_device_t::initialize()
boost::this_thread::sleep(boost::posix_time::milliseconds(20));
/* Check device ID to make sure iface works */
- boost::uint32_t device_id = (_io_iface->peek8(0x037) & 0x8);
+ uint32_t device_id = (_io_iface->peek8(0x037) & 0x8);
if (device_id != 0x8) {
throw uhd::runtime_error(str(boost::format("[ad9361_device_t::initialize] Device ID readback failure. Expected: 0x8, Received: 0x%x") % device_id));
}
@@ -1631,9 +1631,9 @@ void ad9361_device_t::initialize()
/* Data delay for TX and RX data clocks */
digital_interface_delays_t timing =
_client_params->get_digital_interface_timing();
- boost::uint8_t rx_delays = ((timing.rx_clk_delay & 0xF) << 4)
+ uint8_t rx_delays = ((timing.rx_clk_delay & 0xF) << 4)
| (timing.rx_data_delay & 0xF);
- boost::uint8_t tx_delays = ((timing.tx_clk_delay & 0xF) << 4)
+ uint8_t tx_delays = ((timing.tx_clk_delay & 0xF) << 4)
| (timing.tx_data_delay & 0xF);
_io_iface->poke8(0x006, rx_delays);
_io_iface->poke8(0x007, tx_delays);
@@ -1811,7 +1811,7 @@ double ad9361_device_t::set_clock_rate(const double req_rate)
/* We must be in the SLEEP / WAIT state to do this. If we aren't already
* there, transition the ENSM to State 0. */
- boost::uint8_t current_state = _io_iface->peek8(0x017) & 0x0F;
+ uint8_t current_state = _io_iface->peek8(0x017) & 0x0F;
switch (current_state) {
case 0x05:
/* We are in the ALERT state. */
@@ -1833,8 +1833,8 @@ double ad9361_device_t::set_clock_rate(const double req_rate)
/* Store the current chain / antenna selections so that we can restore
* them at the end of this routine; all chains will be enabled from
* within setup_rates for calibration purposes. */
- boost::uint8_t orig_tx_chains = _regs.txfilt & 0xC0;
- boost::uint8_t orig_rx_chains = _regs.rxfilt & 0xC0;
+ uint8_t orig_tx_chains = _regs.txfilt & 0xC0;
+ uint8_t orig_rx_chains = _regs.rxfilt & 0xC0;
/* Call into the clock configuration / settings function. This is where
* all the hard work gets done. */
@@ -1962,8 +1962,8 @@ void ad9361_device_t::set_active_chains(bool tx1, bool tx2, bool rx1, bool rx2)
}
/* Check for FDD state */
- boost::uint8_t set_back_to_fdd = 0;
- boost::uint8_t ensm_state = _io_iface->peek8(0x017) & 0x0F;
+ uint8_t set_back_to_fdd = 0;
+ uint8_t ensm_state = _io_iface->peek8(0x017) & 0x0F;
if (ensm_state == 0xA) // FDD
{
/* Put into ALERT state (via the FDD flush state). */
@@ -2124,7 +2124,7 @@ double ad9361_device_t::set_gain(direction_t direction, chain_t chain, const dou
* outside this function.
*/
double atten = AD9361_MAX_GAIN - value;
- boost::uint32_t attenreg = boost::uint32_t(atten * 4);
+ uint32_t attenreg = uint32_t(atten * 4);
if (chain == CHAIN_1) {
_tx1_gain = value;
_io_iface->poke8(0x073, attenreg & 0xFF);
@@ -2166,8 +2166,8 @@ void ad9361_device_t::data_port_loopback(const bool loopback_enabled)
* -0.25dB / bit 9bit resolution.*/
double ad9361_device_t::get_rssi(chain_t chain)
{
- boost::uint32_t reg_rssi = 0;
- boost::uint8_t lsb_bit_pos = 0;
+ uint32_t reg_rssi = 0;
+ uint8_t lsb_bit_pos = 0;
if (chain == CHAIN_1) {
reg_rssi = 0x1A7;
lsb_bit_pos = 0;
@@ -2175,9 +2175,9 @@ double ad9361_device_t::get_rssi(chain_t chain)
reg_rssi = 0x1A9;
lsb_bit_pos = 1;
}
- boost::uint8_t msbs = _io_iface->peek8(reg_rssi);
- boost::uint8_t lsb = ((_io_iface->peek8(0x1AB)) >> lsb_bit_pos) & 0x01;
- boost::uint16_t val = ((msbs << 1) | lsb);
+ uint8_t msbs = _io_iface->peek8(reg_rssi);
+ uint8_t lsb = ((_io_iface->peek8(0x1AB)) >> lsb_bit_pos) & 0x01;
+ uint16_t val = ((msbs << 1) | lsb);
double rssi = (-0.25f * ((double)val)); //-0.25dB/lsb (See Gain Control Users Guide p. 25)
return rssi;
}
@@ -2190,7 +2190,7 @@ double ad9361_device_t::get_rssi(chain_t chain)
double ad9361_device_t::_get_temperature(const double cal_offset, const double timeout)
{
//set 0x01D[0] to 1 to disable AuxADC GPIO reading
- boost::uint8_t tmp = 0;
+ uint8_t tmp = 0;
tmp = _io_iface->peek8(0x01D);
_io_iface->poke8(0x01D, (tmp | 0x01));
_io_iface->poke8(0x00B, 0); //set offset to 0
@@ -2209,7 +2209,7 @@ double ad9361_device_t::_get_temperature(const double cal_offset, const double t
}
_io_iface->poke8(0x00C, 0x00); //clear read flag
- boost::uint8_t temp = _io_iface->peek8(0x00E); //read temperature.
+ uint8_t temp = _io_iface->peek8(0x00E); //read temperature.
double tmp_temp = temp/1.140f; //according to ADI driver
tmp_temp = tmp_temp + cal_offset; //Constant offset acquired by one point calibration.
@@ -2275,9 +2275,9 @@ void ad9361_device_t::set_iq_balance_auto(direction_t direction, const bool on)
* the gain configuration will be reloaded. */
void ad9361_device_t::_setup_agc(chain_t chain, gain_mode_t gain_mode)
{
- boost::uint8_t gain_mode_reg = 0;
- boost::uint8_t gain_mode_prev = 0;
- boost::uint8_t gain_mode_bits_pos = 0;
+ uint8_t gain_mode_reg = 0;
+ uint8_t gain_mode_prev = 0;
+ uint8_t gain_mode_bits_pos = 0;
gain_mode_reg = _io_iface->peek8(0x0FA);
gain_mode_prev = (gain_mode_reg & 0x0F);
@@ -2306,7 +2306,7 @@ void ad9361_device_t::_setup_agc(chain_t chain, gain_mode_t gain_mode)
throw uhd::runtime_error("[ad9361_device_t] Gain mode does not exist");
}
_io_iface->poke8(0x0FA, gain_mode_reg);
- boost::uint8_t gain_mode_status = _io_iface->peek8(0x0FA);
+ uint8_t gain_mode_status = _io_iface->peek8(0x0FA);
gain_mode_status = (gain_mode_status & 0x0F);
/*Check if gain mode configuration needs to be reprogrammed*/
if (((gain_mode_prev == 0) && (gain_mode_status != 0)) || ((gain_mode_prev != 0) && (gain_mode_status == 0))) {
@@ -2434,16 +2434,16 @@ double ad9361_device_t::set_bw_filter(direction_t direction, const double rf_bw)
return (2.0 * set_analog_bb_bw);
}
-void ad9361_device_t::_set_fir_taps(direction_t direction, chain_t chain, const std::vector<boost::int16_t>& taps)
+void ad9361_device_t::_set_fir_taps(direction_t direction, chain_t chain, const std::vector<int16_t>& taps)
{
size_t num_taps = taps.size();
size_t num_taps_avail = _get_num_fir_taps(direction);
if(num_taps == num_taps_avail)
{
- boost::scoped_array<boost::uint16_t> coeffs(new boost::uint16_t[num_taps_avail]);
+ boost::scoped_array<uint16_t> coeffs(new uint16_t[num_taps_avail]);
for (size_t i = 0; i < num_taps_avail; i++)
{
- coeffs[i] = boost::uint16_t(taps[i]);
+ coeffs[i] = uint16_t(taps[i]);
}
_program_fir_filter(direction, chain, num_taps_avail, coeffs.get());
} else if(num_taps < num_taps_avail){
@@ -2455,7 +2455,7 @@ void ad9361_device_t::_set_fir_taps(direction_t direction, chain_t chain, const
size_t ad9361_device_t::_get_num_fir_taps(direction_t direction)
{
- boost::uint8_t num = 0;
+ uint8_t num = 0;
if(direction == RX)
num = _io_iface->peek8(0x0F5);
else
@@ -2466,7 +2466,7 @@ size_t ad9361_device_t::_get_num_fir_taps(direction_t direction)
size_t ad9361_device_t::_get_fir_dec_int(direction_t direction)
{
- boost::uint8_t dec_int = 0;
+ uint8_t dec_int = 0;
if(direction == RX)
dec_int = _io_iface->peek8(0x003);
else
@@ -2484,12 +2484,12 @@ size_t ad9361_device_t::_get_fir_dec_int(direction_t direction)
return dec_int;
}
-std::vector<boost::int16_t> ad9361_device_t::_get_fir_taps(direction_t direction, chain_t chain)
+std::vector<int16_t> ad9361_device_t::_get_fir_taps(direction_t direction, chain_t chain)
{
int base;
size_t num_taps = _get_num_fir_taps(direction);
- boost::uint8_t config;
- boost::uint8_t reg_numtaps = (((num_taps / 16) - 1) & 0x07) << 5;
+ uint8_t config;
+ uint8_t reg_numtaps = (((num_taps / 16) - 1) & 0x07) << 5;
config = reg_numtaps | 0x02; //start the programming clock
if(chain == CHAIN_1)
@@ -2510,17 +2510,17 @@ std::vector<boost::int16_t> ad9361_device_t::_get_fir_taps(direction_t direction
_io_iface->poke8(base+5,config);
- std::vector<boost::int16_t> taps;
- boost::uint8_t lower_val;
- boost::uint8_t higher_val;
- boost::uint16_t coeff;
+ std::vector<int16_t> taps;
+ uint8_t lower_val;
+ uint8_t higher_val;
+ uint16_t coeff;
for(size_t i = 0;i < num_taps;i++)
{
_io_iface->poke8(base,0x00+i);
lower_val = _io_iface->peek8(base+3);
higher_val = _io_iface->peek8(base+4);
coeff = ((higher_val << 8) | lower_val);
- taps.push_back(boost::int16_t(coeff));
+ taps.push_back(int16_t(coeff));
}
config = (config & (~(1 << 1))); //disable filter clock
@@ -2569,16 +2569,16 @@ filter_info_base::sptr ad9361_device_t::_get_filter_lp_bb(direction_t direction)
* For TX direction the INT3 is returned. */
filter_info_base::sptr ad9361_device_t::_get_filter_dec_int_3(direction_t direction)
{
- boost::uint8_t enable = 0;
+ uint8_t enable = 0;
double rate = _adcclock_freq;
double full_scale;
size_t dec = 0;
size_t interpol = 0;
filter_info_base::filter_type type = filter_info_base::DIGITAL_I16;
std::string name;
- boost::int16_t taps_array_rx[] = {55, 83, 0, -393, -580, 0, 1914, 4041, 5120, 4041, 1914, 0, -580, -393, 0, 83, 55};
- boost::int16_t taps_array_tx[] = {36, -19, 0, -156, -12, 0, 479, 233, 0, -1215, -993, 0, 3569, 6277, 8192, 6277, 3569, 0, -993, -1215, 0, 223, 479, 0, -12, -156, 0, -19, 36};
- std::vector<boost::int16_t> taps;
+ int16_t taps_array_rx[] = {55, 83, 0, -393, -580, 0, 1914, 4041, 5120, 4041, 1914, 0, -580, -393, 0, 83, 55};
+ int16_t taps_array_tx[] = {36, -19, 0, -156, -12, 0, 479, 233, 0, -1215, -993, 0, 3569, 6277, 8192, 6277, 3569, 0, -993, -1215, 0, 223, 479, 0, -12, -156, 0, -19, 36};
+ std::vector<int16_t> taps;
filter_info_base::sptr ret;
@@ -2590,14 +2590,14 @@ filter_info_base::sptr ad9361_device_t::_get_filter_dec_int_3(direction_t direct
enable = _io_iface->peek8(0x003);
enable = ((enable >> 4) & 0x03);
- taps.assign(taps_array_rx, taps_array_rx + sizeof(taps_array_rx) / sizeof(boost::int16_t) );
+ taps.assign(taps_array_rx, taps_array_rx + sizeof(taps_array_rx) / sizeof(int16_t) );
} else {
full_scale = 8192;
dec = 1;
interpol = 3;
- boost::uint8_t use_dac_clk_div = _io_iface->peek8(0x00A);
+ uint8_t use_dac_clk_div = _io_iface->peek8(0x00A);
use_dac_clk_div = ((use_dac_clk_div >> 3) & 0x01);
if(use_dac_clk_div == 1)
{
@@ -2611,24 +2611,24 @@ filter_info_base::sptr ad9361_device_t::_get_filter_dec_int_3(direction_t direct
rate /= 3;
}
- taps.assign(taps_array_tx, taps_array_tx + sizeof(taps_array_tx) / sizeof(boost::int16_t) );
+ taps.assign(taps_array_tx, taps_array_tx + sizeof(taps_array_tx) / sizeof(int16_t) );
}
- ret = filter_info_base::sptr(new digital_filter_base<boost::int16_t>(type, (enable != 2) ? true : false, 2, rate, interpol, dec, full_scale, taps.size(), taps));
+ ret = filter_info_base::sptr(new digital_filter_base<int16_t>(type, (enable != 2) ? true : false, 2, rate, interpol, dec, full_scale, taps.size(), taps));
return ret;
}
filter_info_base::sptr ad9361_device_t::_get_filter_hb_3(direction_t direction)
{
- boost::uint8_t enable = 0;
+ uint8_t enable = 0;
double rate = _adcclock_freq;
double full_scale = 0;
size_t dec = 1;
size_t interpol = 1;
filter_info_base::filter_type type = filter_info_base::DIGITAL_I16;
- boost::int16_t taps_array_rx[] = {1, 4, 6, 4, 1};
- boost::int16_t taps_array_tx[] = {1, 2, 1};
- std::vector<boost::int16_t> taps;
+ int16_t taps_array_rx[] = {1, 4, 6, 4, 1};
+ int16_t taps_array_tx[] = {1, 2, 1};
+ std::vector<int16_t> taps;
if(direction == RX)
{
@@ -2637,12 +2637,12 @@ filter_info_base::sptr ad9361_device_t::_get_filter_hb_3(direction_t direction)
enable = _io_iface->peek8(0x003);
enable = ((enable >> 4) & 0x03);
- taps.assign(taps_array_rx, taps_array_rx + sizeof(taps_array_rx) / sizeof(boost::int16_t) );
+ taps.assign(taps_array_rx, taps_array_rx + sizeof(taps_array_rx) / sizeof(int16_t) );
} else {
full_scale = 2;
interpol = 2;
- boost::uint8_t use_dac_clk_div = _io_iface->peek8(0x00A);
+ uint8_t use_dac_clk_div = _io_iface->peek8(0x00A);
use_dac_clk_div = ((use_dac_clk_div >> 3) & 0x01);
if(use_dac_clk_div == 1)
{
@@ -2655,26 +2655,26 @@ filter_info_base::sptr ad9361_device_t::_get_filter_hb_3(direction_t direction)
{
rate /= 2;
}
- taps.assign(taps_array_tx, taps_array_tx + sizeof(taps_array_tx) / sizeof(boost::int16_t) );
+ taps.assign(taps_array_tx, taps_array_tx + sizeof(taps_array_tx) / sizeof(int16_t) );
}
- filter_info_base::sptr hb = filter_info_base::sptr(new digital_filter_base<boost::int16_t>(type, (enable != 1) ? true : false, 2, rate, interpol, dec, full_scale, taps.size(), taps));
+ filter_info_base::sptr hb = filter_info_base::sptr(new digital_filter_base<int16_t>(type, (enable != 1) ? true : false, 2, rate, interpol, dec, full_scale, taps.size(), taps));
return hb;
}
filter_info_base::sptr ad9361_device_t::_get_filter_hb_2(direction_t direction)
{
- boost::uint8_t enable = 0;
+ uint8_t enable = 0;
double rate = _adcclock_freq;
double full_scale = 0;
size_t dec = 1;
size_t interpol = 1;
filter_info_base::filter_type type = filter_info_base::DIGITAL_I16;
- boost::int16_t taps_array[] = {-9, 0, 73, 128, 73, 0, -9};
- std::vector<boost::int16_t> taps(taps_array, taps_array + sizeof(taps_array) / sizeof(boost::int16_t) );
+ int16_t taps_array[] = {-9, 0, 73, 128, 73, 0, -9};
+ std::vector<int16_t> taps(taps_array, taps_array + sizeof(taps_array) / sizeof(int16_t) );
- digital_filter_base<boost::int16_t>::sptr hb_3 = boost::dynamic_pointer_cast<digital_filter_base<boost::int16_t> >(_get_filter_hb_3(direction));
- digital_filter_base<boost::int16_t>::sptr dec_int_3 = boost::dynamic_pointer_cast<digital_filter_base<boost::int16_t> >(_get_filter_dec_int_3(direction));
+ digital_filter_base<int16_t>::sptr hb_3 = boost::dynamic_pointer_cast<digital_filter_base<int16_t> >(_get_filter_hb_3(direction));
+ digital_filter_base<int16_t>::sptr dec_int_3 = boost::dynamic_pointer_cast<digital_filter_base<int16_t> >(_get_filter_dec_int_3(direction));
if(direction == RX)
{
@@ -2714,24 +2714,24 @@ filter_info_base::sptr ad9361_device_t::_get_filter_hb_2(direction_t direction)
}
}
- filter_info_base::sptr hb(new digital_filter_base<boost::int16_t>(type, (enable == 0) ? true : false, 3, rate, interpol, dec, full_scale, taps.size(), taps));
+ filter_info_base::sptr hb(new digital_filter_base<int16_t>(type, (enable == 0) ? true : false, 3, rate, interpol, dec, full_scale, taps.size(), taps));
return hb;
}
filter_info_base::sptr ad9361_device_t::_get_filter_hb_1(direction_t direction)
{
- boost::uint8_t enable = 0;
+ uint8_t enable = 0;
double rate = 0;
double full_scale = 0;
size_t dec = 1;
size_t interpol = 1;
filter_info_base::filter_type type = filter_info_base::DIGITAL_I16;
- std::vector<boost::int16_t> taps;
- boost::int16_t taps_rx_array[] = {-8, 0, 42, 0, -147, 0, 619, 1013, 619, 0, -147, 0, 42, 0, -8};
- boost::int16_t taps_tx_array[] = {-53, 0, 313, 0, -1155, 0, 4989, 8192, 4989, 0, -1155, 0, 313, 0, -53};
+ std::vector<int16_t> taps;
+ int16_t taps_rx_array[] = {-8, 0, 42, 0, -147, 0, 619, 1013, 619, 0, -147, 0, 42, 0, -8};
+ int16_t taps_tx_array[] = {-53, 0, 313, 0, -1155, 0, 4989, 8192, 4989, 0, -1155, 0, 313, 0, -53};
- digital_filter_base<boost::int16_t>::sptr hb_2 = boost::dynamic_pointer_cast<digital_filter_base<boost::int16_t> >(_get_filter_hb_2(direction));
+ digital_filter_base<int16_t>::sptr hb_2 = boost::dynamic_pointer_cast<digital_filter_base<int16_t> >(_get_filter_hb_2(direction));
if(direction == RX)
{
@@ -2740,7 +2740,7 @@ filter_info_base::sptr ad9361_device_t::_get_filter_hb_1(direction_t direction)
enable = _io_iface->peek8(0x003);
enable = ((enable >> 2) & 0x01);
rate = hb_2->get_output_rate();
- taps.assign(taps_rx_array, taps_rx_array + sizeof(taps_rx_array) / sizeof(boost::int16_t) );
+ taps.assign(taps_rx_array, taps_rx_array + sizeof(taps_rx_array) / sizeof(int16_t) );
} else if (direction == TX) {
full_scale = 8192;
interpol = 2;
@@ -2751,10 +2751,10 @@ filter_info_base::sptr ad9361_device_t::_get_filter_hb_1(direction_t direction)
{
rate /= 2;
}
- taps.assign(taps_tx_array, taps_tx_array + sizeof(taps_tx_array) / sizeof(boost::int16_t) );
+ taps.assign(taps_tx_array, taps_tx_array + sizeof(taps_tx_array) / sizeof(int16_t) );
}
- filter_info_base::sptr hb(new digital_filter_base<boost::int16_t>(type, (enable == 0) ? true : false, 4, rate, interpol, dec, full_scale, taps.size(), taps));
+ filter_info_base::sptr hb(new digital_filter_base<int16_t>(type, (enable == 0) ? true : false, 4, rate, interpol, dec, full_scale, taps.size(), taps));
return hb;
}
@@ -2764,9 +2764,9 @@ filter_info_base::sptr ad9361_device_t::_get_filter_fir(direction_t direction, c
size_t dec = 1;
size_t interpol = 1;
size_t max_num_taps = 128;
- boost::uint8_t enable = 1;
+ uint8_t enable = 1;
- digital_filter_base<boost::int16_t>::sptr hb_1 = boost::dynamic_pointer_cast<digital_filter_base<boost::int16_t> >(_get_filter_hb_1(direction));
+ digital_filter_base<int16_t>::sptr hb_1 = boost::dynamic_pointer_cast<digital_filter_base<int16_t> >(_get_filter_hb_1(direction));
if(direction == RX)
{
@@ -2794,14 +2794,14 @@ filter_info_base::sptr ad9361_device_t::_get_filter_fir(direction_t direction, c
}
max_num_taps = _get_num_fir_taps(direction);
- filter_info_base::sptr fir(new digital_filter_fir<boost::int16_t>(filter_info_base::DIGITAL_FIR_I16, (enable == 0) ? true : false, 5, rate, interpol, dec, 32767, max_num_taps, _get_fir_taps(direction, chain)));
+ filter_info_base::sptr fir(new digital_filter_fir<int16_t>(filter_info_base::DIGITAL_FIR_I16, (enable == 0) ? true : false, 5, rate, interpol, dec, 32767, max_num_taps, _get_fir_taps(direction, chain)));
return fir;
}
void ad9361_device_t::_set_filter_fir(direction_t direction, chain_t channel, filter_info_base::sptr filter)
{
- digital_filter_fir<boost::int16_t>::sptr fir = boost::dynamic_pointer_cast<digital_filter_fir<boost::int16_t> >(filter);
+ digital_filter_fir<int16_t>::sptr fir = boost::dynamic_pointer_cast<digital_filter_fir<int16_t> >(filter);
//only write taps. Ignore everything else for now
_set_fir_taps(direction, channel, fir->get_taps());
}
diff --git a/host/lib/usrp/common/ad9361_driver/ad9361_device.h b/host/lib/usrp/common/ad9361_driver/ad9361_device.h
index d0e8a7e39..ae065d78e 100644
--- a/host/lib/usrp/common/ad9361_driver/ad9361_device.h
+++ b/host/lib/usrp/common/ad9361_driver/ad9361_device.h
@@ -167,10 +167,10 @@ public:
static const double DEFAULT_TX_FREQ;
private: //Methods
- void _program_fir_filter(direction_t direction, int num_taps, boost::uint16_t *coeffs);
- void _setup_tx_fir(size_t num_taps, boost::int32_t interpolation);
- void _setup_rx_fir(size_t num_taps, boost::int32_t decimation);
- void _program_fir_filter(direction_t direction, chain_t chain, int num_taps, boost::uint16_t *coeffs);
+ void _program_fir_filter(direction_t direction, int num_taps, uint16_t *coeffs);
+ void _setup_tx_fir(size_t num_taps, int32_t interpolation);
+ void _setup_rx_fir(size_t num_taps, int32_t decimation);
+ void _program_fir_filter(direction_t direction, chain_t chain, int num_taps, uint16_t *coeffs);
void _setup_tx_fir(size_t num_taps);
void _setup_rx_fir(size_t num_taps);
void _calibrate_lock_bbpll();
@@ -197,8 +197,8 @@ private: //Methods
void _configure_bb_dc_tracking();
void _configure_rx_iq_tracking();
void _setup_agc(chain_t chain, gain_mode_t gain_mode);
- void _set_fir_taps(direction_t direction, chain_t chain, const std::vector<boost::int16_t>& taps);
- std::vector<boost::int16_t> _get_fir_taps(direction_t direction, chain_t chain);
+ void _set_fir_taps(direction_t direction, chain_t chain, const std::vector<int16_t>& taps);
+ std::vector<int16_t> _get_fir_taps(direction_t direction, chain_t chain);
size_t _get_num_fir_taps(direction_t direction);
size_t _get_fir_dec_int(direction_t direction);
filter_info_base::sptr _get_filter_lp_tia_sec(direction_t direction);
@@ -214,13 +214,13 @@ private: //Methods
private: //Members
typedef struct {
- boost::uint8_t vcodivs;
- boost::uint8_t inputsel;
- boost::uint8_t rxfilt;
- boost::uint8_t txfilt;
- boost::uint8_t bbpll;
- boost::uint8_t bbftune_config;
- boost::uint8_t bbftune_mode;
+ uint8_t vcodivs;
+ uint8_t inputsel;
+ uint8_t rxfilt;
+ uint8_t txfilt;
+ uint8_t bbpll;
+ uint8_t bbftune_config;
+ uint8_t bbftune_mode;
} chip_regs_t;
struct filter_query_helper
@@ -256,11 +256,11 @@ private: //Members
// if another call to set_clock_rate() actually has the same value.
double _req_clock_rate;
double _req_coreclk;
- boost::uint16_t _rx_bbf_tunediv;
- boost::uint8_t _curr_gain_table;
+ uint16_t _rx_bbf_tunediv;
+ uint8_t _curr_gain_table;
double _rx1_gain, _rx2_gain, _tx1_gain, _tx2_gain;
- boost::int32_t _tfir_factor;
- boost::int32_t _rfir_factor;
+ int32_t _tfir_factor;
+ int32_t _rfir_factor;
gain_mode_t _rx1_agc_mode, _rx2_agc_mode;
bool _rx1_agc_enable, _rx2_agc_enable;
//Register soft-copies
diff --git a/host/lib/usrp/common/ad9361_driver/ad9361_filter_taps.h b/host/lib/usrp/common/ad9361_driver/ad9361_filter_taps.h
index 97ff858fd..927d9e2a7 100644
--- a/host/lib/usrp/common/ad9361_driver/ad9361_filter_taps.h
+++ b/host/lib/usrp/common/ad9361_driver/ad9361_filter_taps.h
@@ -18,7 +18,7 @@
#ifndef INCLUDED_AD9361_FILTER_TAPS_HPP
#define INCLUDED_AD9361_FILTER_TAPS_HPP
-#include <boost/cstdint.hpp>
+#include <stdint.h>
/* A default 128-tap filter that can be used for generic circumstances. */
/* static uint16_t default_128tap_coeffs[] = {
@@ -63,25 +63,25 @@ static uint16_t lte10mhz_tx_coeffs[] = {
/************************************************************/
/* 127 tap Halfband designed with: round(2^16 * halfgen4(0.9/4,32)) (center tap tweaked to 32767) */
-static boost::int16_t hb127_coeffs[] = {
+static int16_t hb127_coeffs[] = {
-0,0,1,-0,-2,0,3,-0,-5,0,8,-0,-11,0,17,-0,-24,0,33,-0,-45,0,61,-0,-80,0,104,-0,-134,0,169,-0,
-213,0,264,-0,-327,0,401,-0,-489,0,595,-0,-724,0,880,-0,-1075,0,1323,-0,-1652,0,2114,-0,-2819,0,4056,-0,-6883,0,20837,32767,
20837,0,-6883,-0,4056,0,-2819,-0,2114,0,-1652,-0,1323,0,-1075,-0,880,0,-724,-0,595,0,-489,-0,401,0,-327,-0,264,0,-213,-0,
169,0,-134,-0,104,0,-80,-0,61,0,-45,-0,33,0,-24,-0,17,0,-11,-0,8,0,-5,-0,3,0,-2,-0,1,0,-0, 0 };
/* 95 tap Halfband designed with: round(2^16 * halfgen4(0.9/4,24)) (center tap tweaked to 32767) */
-static boost::int16_t hb95_coeffs[] = {
+static int16_t hb95_coeffs[] = {
-4,0,8,-0,-14,0,23,-0,-36,0,52,-0,-75,0,104,-0,-140,0,186,-0,-243,0,314,-0,-400,0,505,-0,-634,0,793,-0,
-993,0,1247,-0,-1585,0,2056,-0,-2773,0,4022,-0,-6862,0,20830,32767,20830,0,-6862,-0,4022,0,-2773,-0,2056,0,-1585,-0,1247,0,-993,-0,
793,0,-634,-0,505,0,-400,-0,314,0,-243,-0,186,0,-140,-0,104,0,-75,-0,52,0,-36,-0,23,0,-14,-0,8,0,-4,0};
/* 63 tap Halfband designed with: round(2^16 * halfgen4(0.9/4,16)) (center tap tweaked to 32767) */
-static boost::int16_t hb63_coeffs[] = {
+static int16_t hb63_coeffs[] = {
-58,0,83,-0,-127,0,185,-0,-262,0,361,-0,-488,0,648,-0,-853,0,1117,-0,-1466,0,1954,-0,-2689,0,3960,-0,-6825,0,20818,32767,
20818,0,-6825,-0,3960,0,-2689,-0,1954,0,-1466,-0,1117,0,-853,-0,648,0,-488,-0,361,0,-262,-0,185,0,-127,-0,83,0,-58,0};
/* 47 tap Halfband designed with: round(2^16 * halfgen4(0.85/4,12)) (center tap tweaked to 32767) */
-static boost::int16_t hb47_coeffs[] = {
+static int16_t hb47_coeffs[] = {
-50,0,98,-0,-181,0,307,-0,-489,0,747,-0,-1109,0,1628,-0,-2413,0,3750,-0,-6693,0,20773,32767,20773,0,-6693,-0,3750,0,-2413,-0,
1628,0,-1109,-0,747,0,-489,-0,307,0,-181,-0,98,0,-50,0};
@@ -91,7 +91,7 @@ static boost::int16_t hb47_coeffs[] = {
/************************************************************/
/* 128 tap equiripple FIR low-pass designed with: round(2^16 * fir1(127,0.25)); */
-static boost::int16_t fir_128_x4_coeffs[] = {
+static int16_t fir_128_x4_coeffs[] = {
-15,-27,-23,-6,17,33,31,9,-23,-47,-45,-13,34,69,67,21,-49,-102,-99,-32,69,146,143,48,-96,-204,-200,-69,129,278,275,97,-170,
-372,-371,-135,222,494,497,187,-288,-654,-665,-258,376,875,902,363,-500,-1201,-1265,-530,699,1748,1906,845,-1089,-2922,-3424,
-1697,2326,7714,12821,15921,15921,12821,7714,2326,-1697,-3424,-2922,-1089,845,1906,1748,699,-530,-1265,-1201,-500,363,902,875,
@@ -99,20 +99,20 @@ static boost::int16_t fir_128_x4_coeffs[] = {
67,69,34,-13,-45,-47,-23,9,31,33,17,-6,-23,-27,-15};
/* 96 tap equiripple FIR low-pass designed with: round(2^16 * fir1(95,0.25)); */
-static boost::int16_t fir_96_x4_coeffs[] = {
+static int16_t fir_96_x4_coeffs[] = {
-18,-35,-33,-11,23,50,51,18,-37,-83,-86,-31,62,140,145,54,-98,-224,-232,-88,149,343,356,138,-218,-509,-530,-211,313,743,781,
320,-447,-1089,-1163,-494,658,1663,1830,819,-1062,-2868,-3379,-1682,2314,7695,12812,15924,15924,12812,7695,2314,-1682,-3379,
-2868,-1062,819,1830,1663,658,-494,-1163,-1089,-447,320,781,743,313,-211,-530,-509,-218,138,356,343,149,-88,-232,-224,-98,54,
145,140,62,-31,-86,-83,-37,18,51,50,23,-11,-33,-35,-18};
/* 64 tap equiripple FIR low-pass designed with: round(2^16 * fir1(63,0.25)); */
-static boost::int16_t fir_64_x4_coeffs[] = {
+static int16_t fir_64_x4_coeffs[] = {
-25,-54,-56,-22,41,102,117,50,-87,-223,-253,-109,174,443,496,215,-317,-809,-903,-398,550,1434,1623,744,-987,-2715,-3251,
-1640,2279,7638,12782,15928,15928,12782,7638,2279,-1640,-3251,-2715,-987,744,1623,1434,550,-398,-903,-809,-317,215,496,
443,174,-109,-253,-223,-87,50,117,102,41,-22,-56,-54,-25};
/* 48 tap equiripple FIR low-pass designed with: round(2^16 * fir1(47,0.25)); */
-static boost::int16_t fir_48_x4_coeffs[] = {
+static int16_t fir_48_x4_coeffs[] = {
-32,-74,-84,-39,68,191,237,114,-183,-508,-609,-287,419,1149,1358,647,-887,-2508,-3073,-1580,2230,7555,12736,15928,15928,
12736,7555,2230,-1580,-3073,-2508,-887,647,1358,1149,419,-287,-609,-508,-183,114,237,191,68,-39,-84,-74,-32};
diff --git a/host/lib/usrp/common/ad9361_driver/ad9361_gain_tables.h b/host/lib/usrp/common/ad9361_driver/ad9361_gain_tables.h
index 8cd958e23..99794697a 100644
--- a/host/lib/usrp/common/ad9361_driver/ad9361_gain_tables.h
+++ b/host/lib/usrp/common/ad9361_driver/ad9361_gain_tables.h
@@ -18,9 +18,9 @@
#ifndef INCLUDED_AD9361_GAIN_TABLES_HPP
#define INCLUDED_AD9361_GAIN_TABLES_HPP
-#include <boost/cstdint.hpp>
+#include <stdint.h>
-boost::uint8_t gain_table_sub_1300mhz[77][3] = {
+uint8_t gain_table_sub_1300mhz[77][3] = {
{ 0x00, 0x00, 0x20 }, { 0x00, 0x00, 0x00 }, { 0x00, 0x00, 0x00 },
{ 0x00, 0x01, 0x00 }, { 0x00, 0x02, 0x00 }, { 0x00, 0x03, 0x00 },
{ 0x00, 0x04, 0x00 }, { 0x00, 0x05, 0x00 }, { 0x01, 0x03, 0x20 },
@@ -49,7 +49,7 @@ boost::uint8_t gain_table_sub_1300mhz[77][3] = {
{ 0x6E, 0x38, 0x20 }, { 0x6F, 0x38, 0x20 } };
-boost::uint8_t gain_table_1300mhz_to_4000mhz[77][3] = {
+uint8_t gain_table_1300mhz_to_4000mhz[77][3] = {
{ 0x00, 0x00, 0x20 }, { 0x00, 0x00, 0x00 }, { 0x00, 0x00, 0x00 },
{ 0x00, 0x01, 0x00 }, { 0x00, 0x02, 0x00 }, { 0x00, 0x03, 0x00 },
{ 0x00, 0x04, 0x00 }, { 0x00, 0x05, 0x00 }, { 0x01, 0x03, 0x20 },
@@ -78,7 +78,7 @@ boost::uint8_t gain_table_1300mhz_to_4000mhz[77][3] = {
{ 0x6E, 0x38, 0x20 }, { 0x6F, 0x38, 0x20 } };
-boost::uint8_t gain_table_4000mhz_to_6000mhz[77][3] = {
+uint8_t gain_table_4000mhz_to_6000mhz[77][3] = {
{ 0x00, 0x00, 0x20 }, { 0x00, 0x00, 0x00 }, { 0x00, 0x00, 0x00 },
{ 0x00, 0x00, 0x00 }, { 0x00, 0x00, 0x00 }, { 0x00, 0x01, 0x00 },
{ 0x00, 0x02, 0x00 }, { 0x00, 0x03, 0x00 }, { 0x01, 0x01, 0x20 },
diff --git a/host/lib/usrp/common/ad936x_manager.cpp b/host/lib/usrp/common/ad936x_manager.cpp
index e7af411fa..2b6d69c15 100644
--- a/host/lib/usrp/common/ad936x_manager.cpp
+++ b/host/lib/usrp/common/ad936x_manager.cpp
@@ -113,15 +113,15 @@ class ad936x_manager_impl : public ad936x_manager
{
// Create test word
boost::hash_combine(hash, i);
- const boost::uint32_t word32 = boost::uint32_t(hash) & 0xfff0fff0;
+ const uint32_t word32 = uint32_t(hash) & 0xfff0fff0;
// Write test word to codec_idle idle register (on TX side)
poker_functor(word32);
// Read back values - TX is lower 32-bits and RX is upper 32-bits
- const boost::uint64_t rb_word64 = peeker_functor();
- const boost::uint32_t rb_tx = boost::uint32_t(rb_word64 >> 32);
- const boost::uint32_t rb_rx = boost::uint32_t(rb_word64 & 0xffffffff);
+ const uint64_t rb_word64 = peeker_functor();
+ const uint32_t rb_tx = uint32_t(rb_word64 >> 32);
+ const uint32_t rb_rx = uint32_t(rb_word64 & 0xffffffff);
// Compare TX and RX values to test word
bool test_fail = word32 != rb_tx or word32 != rb_rx;
diff --git a/host/lib/usrp/common/adf4001_ctrl.cpp b/host/lib/usrp/common/adf4001_ctrl.cpp
index 001b68b7a..01a35dbec 100644
--- a/host/lib/usrp/common/adf4001_ctrl.cpp
+++ b/host/lib/usrp/common/adf4001_ctrl.cpp
@@ -47,47 +47,47 @@ adf4001_regs_t::adf4001_regs_t(void) {
}
-boost::uint32_t adf4001_regs_t::get_reg(boost::uint8_t addr) {
- boost::uint32_t reg = 0;
+uint32_t adf4001_regs_t::get_reg(uint8_t addr) {
+ uint32_t reg = 0;
switch (addr) {
case 0:
- reg |= (boost::uint32_t(ref_counter) & 0x003FFF) << 2;
- reg |= (boost::uint32_t(anti_backlash_width) & 0x000003) << 16;
- reg |= (boost::uint32_t(lock_detect_precision) & 0x000001) << 20;
+ reg |= (uint32_t(ref_counter) & 0x003FFF) << 2;
+ reg |= (uint32_t(anti_backlash_width) & 0x000003) << 16;
+ reg |= (uint32_t(lock_detect_precision) & 0x000001) << 20;
break;
case 1:
- reg |= (boost::uint32_t(n) & 0x001FFF) << 8;
- reg |= (boost::uint32_t(charge_pump_gain) & 0x000001) << 21;
+ reg |= (uint32_t(n) & 0x001FFF) << 8;
+ reg |= (uint32_t(charge_pump_gain) & 0x000001) << 21;
break;
case 2:
- reg |= (boost::uint32_t(counter_reset) & 0x000001) << 2;
- reg |= (boost::uint32_t(power_down) & 0x000001) << 3;
- reg |= (boost::uint32_t(muxout) & 0x000007) << 4;
- reg |= (boost::uint32_t(phase_detector_polarity) & 0x000001) << 7;
- reg |= (boost::uint32_t(charge_pump_mode) & 0x000001) << 8;
- reg |= (boost::uint32_t(fastlock_mode) & 0x000003) << 9;
- reg |= (boost::uint32_t(timer_counter_control) & 0x00000F) << 11;
- reg |= (boost::uint32_t(charge_pump_current_1) & 0x000007) << 15;
- reg |= (boost::uint32_t(charge_pump_current_2) & 0x000007) << 18;
- reg |= (boost::uint32_t(power_down) & 0x000002) << 21;
+ reg |= (uint32_t(counter_reset) & 0x000001) << 2;
+ reg |= (uint32_t(power_down) & 0x000001) << 3;
+ reg |= (uint32_t(muxout) & 0x000007) << 4;
+ reg |= (uint32_t(phase_detector_polarity) & 0x000001) << 7;
+ reg |= (uint32_t(charge_pump_mode) & 0x000001) << 8;
+ reg |= (uint32_t(fastlock_mode) & 0x000003) << 9;
+ reg |= (uint32_t(timer_counter_control) & 0x00000F) << 11;
+ reg |= (uint32_t(charge_pump_current_1) & 0x000007) << 15;
+ reg |= (uint32_t(charge_pump_current_2) & 0x000007) << 18;
+ reg |= (uint32_t(power_down) & 0x000002) << 21;
break;
case 3:
- reg |= (boost::uint32_t(counter_reset) & 0x000001) << 2;
- reg |= (boost::uint32_t(power_down) & 0x000001) << 3;
- reg |= (boost::uint32_t(muxout) & 0x000007) << 4;
- reg |= (boost::uint32_t(phase_detector_polarity) & 0x000001) << 7;
- reg |= (boost::uint32_t(charge_pump_mode) & 0x000001) << 8;
- reg |= (boost::uint32_t(fastlock_mode) & 0x000003) << 9;
- reg |= (boost::uint32_t(timer_counter_control) & 0x00000F) << 11;
- reg |= (boost::uint32_t(charge_pump_current_1) & 0x000007) << 15;
- reg |= (boost::uint32_t(charge_pump_current_2) & 0x000007) << 18;
- reg |= (boost::uint32_t(power_down) & 0x000002) << 20;
+ reg |= (uint32_t(counter_reset) & 0x000001) << 2;
+ reg |= (uint32_t(power_down) & 0x000001) << 3;
+ reg |= (uint32_t(muxout) & 0x000007) << 4;
+ reg |= (uint32_t(phase_detector_polarity) & 0x000001) << 7;
+ reg |= (uint32_t(charge_pump_mode) & 0x000001) << 8;
+ reg |= (uint32_t(fastlock_mode) & 0x000003) << 9;
+ reg |= (uint32_t(timer_counter_control) & 0x00000F) << 11;
+ reg |= (uint32_t(charge_pump_current_1) & 0x000007) << 15;
+ reg |= (uint32_t(charge_pump_current_2) & 0x000007) << 18;
+ reg |= (uint32_t(power_down) & 0x000002) << 20;
break;
default:
break;
}
- reg |= (boost::uint32_t(addr) & 0x03);
+ reg |= (uint32_t(addr) & 0x03);
return reg;
}
@@ -140,8 +140,8 @@ void adf4001_ctrl::program_regs(void) {
}
-void adf4001_ctrl::write_reg(boost::uint8_t addr) {
- boost::uint32_t reg = adf4001_regs.get_reg(addr); //load the reg data
+void adf4001_ctrl::write_reg(uint8_t addr) {
+ uint32_t reg = adf4001_regs.get_reg(addr); //load the reg data
spi_iface->transact_spi(slaveno,
spi_config,
diff --git a/host/lib/usrp/common/adf4001_ctrl.hpp b/host/lib/usrp/common/adf4001_ctrl.hpp
index e801ae0c4..c6813f43c 100644
--- a/host/lib/usrp/common/adf4001_ctrl.hpp
+++ b/host/lib/usrp/common/adf4001_ctrl.hpp
@@ -25,7 +25,7 @@
#include "spi_core_3000.hpp"
#include <uhd/types/serial.hpp>
-#include <boost/cstdint.hpp>
+#include <stdint.h>
#include <boost/thread/thread.hpp>
namespace uhd { namespace usrp {
@@ -34,14 +34,14 @@ class adf4001_regs_t {
public:
/* Function prototypes */
- boost::uint32_t get_reg(boost::uint8_t addr);
+ uint32_t get_reg(uint8_t addr);
adf4001_regs_t(void);
/* Register values / addresses */
- boost::uint16_t ref_counter; //14 bits
- boost::uint16_t n; //13 bits
- boost::uint8_t charge_pump_current_1; //3 bits
- boost::uint8_t charge_pump_current_2; //3 bits
+ uint16_t ref_counter; //14 bits
+ uint16_t n; //13 bits
+ uint8_t charge_pump_current_1; //3 bits
+ uint8_t charge_pump_current_2; //3 bits
enum anti_backlash_width_t {
ANTI_BACKLASH_WIDTH_2_9NS = 0,
@@ -133,7 +133,7 @@ private:
adf4001_regs_t adf4001_regs;
void program_regs(void);
- void write_reg(boost::uint8_t addr);
+ void write_reg(uint8_t addr);
};
}}
diff --git a/host/lib/usrp/common/adf435x.hpp b/host/lib/usrp/common/adf435x.hpp
index d08c6b9dd..ff7b1a2f4 100644
--- a/host/lib/usrp/common/adf435x.hpp
+++ b/host/lib/usrp/common/adf435x.hpp
@@ -33,7 +33,7 @@ class adf435x_iface
{
public:
typedef boost::shared_ptr<adf435x_iface> sptr;
- typedef boost::function<void(std::vector<boost::uint32_t>)> write_fn_t;
+ typedef boost::function<void(std::vector<uint32_t>)> write_fn_t;
static sptr make_adf4350(write_fn_t write);
static sptr make_adf4351(write_fn_t write);
@@ -162,8 +162,8 @@ public:
uhd::range_t int_range = get_int_range();
double pfd_freq = 0;
- boost::uint16_t R = 0, BS = 0, N = 0, FRAC = 0, MOD = 0;
- boost::uint16_t RFdiv = static_cast<boost::uint16_t>(rf_divider_range.start());
+ uint16_t R = 0, BS = 0, N = 0, FRAC = 0, MOD = 0;
+ uint16_t RFdiv = static_cast<uint16_t>(rf_divider_range.start());
bool D = false, T = false;
//Reference doubler for 50% duty cycle
@@ -171,7 +171,7 @@ public:
//increase RF divider until acceptable VCO frequency
double vco_freq = target_freq;
- while (vco_freq < VCO_FREQ_MIN && RFdiv < static_cast<boost::uint16_t>(rf_divider_range.stop())) {
+ while (vco_freq < VCO_FREQ_MIN && RFdiv < static_cast<uint16_t>(rf_divider_range.stop())) {
vco_freq *= 2;
RFdiv *= 2;
}
@@ -202,10 +202,10 @@ public:
if (pfd_freq > PFD_FREQ_MAX) continue;
//First, ignore fractional part of tuning
- N = boost::uint16_t(std::floor(feedback_freq/pfd_freq));
+ N = uint16_t(std::floor(feedback_freq/pfd_freq));
//keep N > minimum int divider requirement
- if (N < static_cast<boost::uint16_t>(int_range.start())) continue;
+ if (N < static_cast<uint16_t>(int_range.start())) continue;
for(BS=1; BS <= 255; BS+=1){
//keep the band select frequency at or below band_sel_freq_max
@@ -217,7 +217,7 @@ public:
//Fractional-N calculation
MOD = 4095; //max fractional accuracy
- FRAC = static_cast<boost::uint16_t>(boost::math::round((feedback_freq/pfd_freq - N)*MOD));
+ FRAC = static_cast<uint16_t>(boost::math::round((feedback_freq/pfd_freq - N)*MOD));
if (int_n_mode) {
if (FRAC > (MOD / 2)) { //Round integer such that actual freq is closest to target
N++;
@@ -247,7 +247,7 @@ public:
_regs.frac_12_bit = FRAC;
_regs.int_16_bit = N;
_regs.mod_12_bit = MOD;
- _regs.clock_divider_12_bit = std::max<boost::uint16_t>(1, boost::uint16_t(std::ceil(PHASE_RESYNC_TIME*pfd_freq/MOD)));
+ _regs.clock_divider_12_bit = std::max<uint16_t>(1, uint16_t(std::ceil(PHASE_RESYNC_TIME*pfd_freq/MOD)));
_regs.feedback_select = _fb_after_divider ?
adf435x_regs_t::FEEDBACK_SELECT_DIVIDED :
adf435x_regs_t::FEEDBACK_SELECT_FUNDAMENTAL;
@@ -261,7 +261,7 @@ public:
_regs.reference_doubler = D ?
adf435x_regs_t::REFERENCE_DOUBLER_ENABLED :
adf435x_regs_t::REFERENCE_DOUBLER_DISABLED;
- _regs.band_select_clock_div = boost::uint8_t(BS);
+ _regs.band_select_clock_div = uint8_t(BS);
_regs.rf_divider_select = static_cast<typename adf435x_regs_t::rf_divider_select_t>(_get_rfdiv_setting(RFdiv));
_regs.ldf = int_n_mode ?
adf435x_regs_t::LDF_INT_N :
@@ -277,16 +277,16 @@ public:
<< boost::format("ADF 435X Settings: R=%d, BS=%d, N=%d, FRAC=%d, MOD=%d, T=%d, D=%d, RFdiv=%d"
) % R % BS % N % FRAC % MOD % T % D % RFdiv << std::endl;
- UHD_ASSERT_THROW((_regs.frac_12_bit & ((boost::uint16_t)~0xFFF)) == 0);
- UHD_ASSERT_THROW((_regs.mod_12_bit & ((boost::uint16_t)~0xFFF)) == 0);
- UHD_ASSERT_THROW((_regs.clock_divider_12_bit & ((boost::uint16_t)~0xFFF)) == 0);
- UHD_ASSERT_THROW((_regs.r_counter_10_bit & ((boost::uint16_t)~0x3FF)) == 0);
+ UHD_ASSERT_THROW((_regs.frac_12_bit & ((uint16_t)~0xFFF)) == 0);
+ UHD_ASSERT_THROW((_regs.mod_12_bit & ((uint16_t)~0xFFF)) == 0);
+ UHD_ASSERT_THROW((_regs.clock_divider_12_bit & ((uint16_t)~0xFFF)) == 0);
+ UHD_ASSERT_THROW((_regs.r_counter_10_bit & ((uint16_t)~0x3FF)) == 0);
UHD_ASSERT_THROW(vco_freq >= VCO_FREQ_MIN and vco_freq <= VCO_FREQ_MAX);
- UHD_ASSERT_THROW(RFdiv >= static_cast<boost::uint16_t>(rf_divider_range.start()));
- UHD_ASSERT_THROW(RFdiv <= static_cast<boost::uint16_t>(rf_divider_range.stop()));
- UHD_ASSERT_THROW(_regs.int_16_bit >= static_cast<boost::uint16_t>(int_range.start()));
- UHD_ASSERT_THROW(_regs.int_16_bit <= static_cast<boost::uint16_t>(int_range.stop()));
+ UHD_ASSERT_THROW(RFdiv >= static_cast<uint16_t>(rf_divider_range.start()));
+ UHD_ASSERT_THROW(RFdiv <= static_cast<uint16_t>(rf_divider_range.stop()));
+ UHD_ASSERT_THROW(_regs.int_16_bit >= static_cast<uint16_t>(int_range.start()));
+ UHD_ASSERT_THROW(_regs.int_16_bit <= static_cast<uint16_t>(int_range.stop()));
if (flush) commit();
return actual_freq;
@@ -296,8 +296,8 @@ public:
{
//reset counters
_regs.counter_reset = adf435x_regs_t::COUNTER_RESET_ENABLED;
- std::vector<boost::uint32_t> regs;
- regs.push_back(_regs.get_reg(boost::uint32_t(2)));
+ std::vector<uint32_t> regs;
+ regs.push_back(_regs.get_reg(uint32_t(2)));
_write_fn(regs);
_regs.counter_reset = adf435x_regs_t::COUNTER_RESET_DISABLED;
@@ -305,14 +305,14 @@ public:
//correct power-up sequence to write registers (5, 4, 3, 2, 1, 0)
regs.clear();
for (int addr = 5; addr >= 0; addr--) {
- regs.push_back(_regs.get_reg(boost::uint32_t(addr)));
+ regs.push_back(_regs.get_reg(uint32_t(addr)));
}
_write_fn(regs);
}
protected:
uhd::range_t _get_rfdiv_range();
- int _get_rfdiv_setting(boost::uint16_t div);
+ int _get_rfdiv_setting(uint16_t div);
write_fn_t _write_fn;
adf435x_regs_t _regs;
@@ -334,7 +334,7 @@ inline uhd::range_t adf435x_impl<adf4351_regs_t>::_get_rfdiv_range()
}
template <>
-inline int adf435x_impl<adf4350_regs_t>::_get_rfdiv_setting(boost::uint16_t div)
+inline int adf435x_impl<adf4350_regs_t>::_get_rfdiv_setting(uint16_t div)
{
switch (div) {
case 1: return int(adf4350_regs_t::RF_DIVIDER_SELECT_DIV1);
@@ -347,7 +347,7 @@ inline int adf435x_impl<adf4350_regs_t>::_get_rfdiv_setting(boost::uint16_t div)
}
template <>
-inline int adf435x_impl<adf4351_regs_t>::_get_rfdiv_setting(boost::uint16_t div)
+inline int adf435x_impl<adf4351_regs_t>::_get_rfdiv_setting(uint16_t div)
{
switch (div) {
case 1: return int(adf4351_regs_t::RF_DIVIDER_SELECT_DIV1);
diff --git a/host/lib/usrp/common/adf5355.cpp b/host/lib/usrp/common/adf5355.cpp
index bb0906724..ee9b54622 100644
--- a/host/lib/usrp/common/adf5355.cpp
+++ b/host/lib/usrp/common/adf5355.cpp
@@ -46,9 +46,9 @@ static const double ADF5355_MIN_OUTB_FREQ = (3.4e9 * 2);
static const double ADF5355_PHASE_RESYNC_TIME = 400e-6;
-static const boost::uint32_t ADF5355_MOD1 = 16777216;
-static const boost::uint32_t ADF5355_MAX_MOD2 = 16384;
-static const boost::uint16_t ADF5355_MIN_INT_PRESCALER_89 = 75;
+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;
class adf5355_impl : public adf5355_iface
{
@@ -164,31 +164,31 @@ public:
adf5355_regs_t::REFERENCE_DOUBLER_ENABLED :
adf5355_regs_t::REFERENCE_DOUBLER_DISABLED;
_regs.r_counter_10_bit = ref_div_factor;
- UHD_ASSERT_THROW((_regs.r_counter_10_bit & ((boost::uint16_t)~0x3FF)) == 0);
+ UHD_ASSERT_THROW((_regs.r_counter_10_bit & ((uint16_t)~0x3FF)) == 0);
//-----------------------------------------------------------
//Set timeouts (code from ADI driver)
- _regs.timeout = clamp<boost::uint16_t>(
- static_cast<boost::uint16_t>(ceil(_pfd_freq / (20e3 * 30))), 1, 1023);
- UHD_ASSERT_THROW((_regs.timeout & ((boost::uint16_t)~0x3FF)) == 0);
+ _regs.timeout = clamp<uint16_t>(
+ static_cast<uint16_t>(ceil(_pfd_freq / (20e3 * 30))), 1, 1023);
+ UHD_ASSERT_THROW((_regs.timeout & ((uint16_t)~0x3FF)) == 0);
_regs.synth_lock_timeout =
- static_cast<boost::uint8_t>(ceil((_pfd_freq * 2) / (100e3 * _regs.timeout)));
- UHD_ASSERT_THROW((_regs.synth_lock_timeout & ((boost::uint16_t)~0x1F)) == 0);
+ static_cast<uint8_t>(ceil((_pfd_freq * 2) / (100e3 * _regs.timeout)));
+ UHD_ASSERT_THROW((_regs.synth_lock_timeout & ((uint16_t)~0x1F)) == 0);
_regs.auto_level_timeout =
- static_cast<boost::uint8_t>(ceil((_pfd_freq * 5) / (100e3 * _regs.timeout)));
+ static_cast<uint8_t>(ceil((_pfd_freq * 5) / (100e3 * _regs.timeout)));
//-----------------------------------------------------------
//Set VCO band divider
_regs.vco_band_div =
- static_cast<boost::uint8_t>(ceil(_pfd_freq / 2.4e6));
+ static_cast<uint8_t>(ceil(_pfd_freq / 2.4e6));
//-----------------------------------------------------------
//Set ADC delay (code from ADI driver)
_regs.adc_enable = adf5355_regs_t::ADC_ENABLE_ENABLED;
_regs.adc_conversion = adf5355_regs_t::ADC_CONVERSION_ENABLED;
- _regs.adc_clock_divider = clamp<boost::uint8_t>(
- static_cast<boost::uint8_t>(ceil(((_pfd_freq / 100e3) - 2) / 4)), 1, 255);
- _wait_time_us = static_cast<boost::uint32_t>(
+ _regs.adc_clock_divider = clamp<uint8_t>(
+ static_cast<uint8_t>(ceil(((_pfd_freq / 100e3) - 2) / 4)), 1, 255);
+ _wait_time_us = static_cast<uint32_t>(
ceil(16e6 / (_pfd_freq / ((4 * _regs.adc_clock_divider) + 2))));
//-----------------------------------------------------------
@@ -196,7 +196,7 @@ public:
_regs.phase_resync = adf5355_regs_t::PHASE_RESYNC_DISABLED; // Disabled during development
_regs.phase_adjust = adf5355_regs_t::PHASE_ADJUST_DISABLED;
_regs.sd_load_reset = adf5355_regs_t::SD_LOAD_RESET_ON_REG0_UPDATE;
- _regs.phase_resync_clk_div = static_cast<boost::uint16_t>(
+ _regs.phase_resync_clk_div = static_cast<uint16_t>(
floor(ADF5355_PHASE_RESYNC_TIME * _pfd_freq));
_rewrite_regs = true;
@@ -247,14 +247,14 @@ public:
if (target_freq > ADF5355_MAX_OUT_FREQ or target_freq < ADF5355_MIN_OUT_FREQ) {
throw uhd::runtime_error("requested frequency out of range.");
}
- if ((boost::uint32_t) freq_resolution == 0) {
+ if ((uint32_t) freq_resolution == 0) {
throw uhd::runtime_error("requested resolution cannot be less than 1.");
}
/* Calculate target VCOout frequency */
//Increase RF divider until acceptable VCO frequency
double target_vco_freq = target_freq;
- boost::uint32_t rf_divider = 1;
+ uint32_t rf_divider = 1;
while (target_vco_freq < ADF5355_MIN_VCO_FREQ && rf_divider < 64) {
target_vco_freq *= 2;
rf_divider *= 2;
@@ -278,17 +278,17 @@ public:
}
double N = prescaler_input_freq / _pfd_freq;
- boost::uint16_t INT = static_cast<boost::uint16_t>(floor(N));
- boost::uint32_t FRAC1 = static_cast<boost::uint32_t>(floor((N - INT) * ADF5355_MOD1));
+ uint16_t INT = static_cast<uint16_t>(floor(N));
+ uint32_t FRAC1 = static_cast<uint32_t>(floor((N - INT) * ADF5355_MOD1));
double residue = ADF5355_MOD1 * (N - (INT + FRAC1 / ADF5355_MOD1));
double gcd = boost::math::gcd(static_cast<int>(_pfd_freq), static_cast<int>(freq_resolution));
- boost::uint16_t MOD2 = static_cast<boost::uint16_t>(floor(_pfd_freq / gcd));
+ uint16_t MOD2 = static_cast<uint16_t>(floor(_pfd_freq / gcd));
if (MOD2 > ADF5355_MAX_MOD2) {
MOD2 = ADF5355_MAX_MOD2;
}
- boost::uint16_t FRAC2 = ceil(residue * MOD2);
+ uint16_t FRAC2 = ceil(residue * MOD2);
double coerced_vco_freq = _pfd_freq * (
todbl(INT) + (
@@ -317,9 +317,9 @@ public:
// ADI: Tests have shown that the optimal bleed set is the following:
// 4/N < IBLEED/ICP < 10/N */
/*
- boost::uint32_t cp_curr_ua =
- (static_cast<boost::uint32_t>(_regs.charge_pump_current) + 1) * 315;
- _regs.cp_bleed_current = clamp<boost::uint8_t>(
+ uint32_t cp_curr_ua =
+ (static_cast<uint32_t>(_regs.charge_pump_current) + 1) * 315;
+ _regs.cp_bleed_current = clamp<uint8_t>(
ceil((todbl(400)*cp_curr_ua) / (_regs.int_16_bit*375)), 1, 255);
_regs.negative_bleed = adf5355_regs_t::NEGATIVE_BLEED_ENABLED;
_regs.gated_bleed = adf5355_regs_t::GATED_BLEED_DISABLED;
@@ -335,7 +335,7 @@ public:
//For a full state sync write registers in reverse order 12 - 0
addr_vtr_t regs;
for (int addr = 12; addr >= 0; addr--) {
- regs.push_back(_regs.get_reg(boost::uint32_t(addr)));
+ regs.push_back(_regs.get_reg(uint32_t(addr)));
}
_write_fn(regs);
_rewrite_regs = false;
@@ -359,12 +359,12 @@ public:
}
private: //Members
- typedef std::vector<boost::uint32_t> addr_vtr_t;
+ typedef std::vector<uint32_t> addr_vtr_t;
write_fn_t _write_fn;
adf5355_regs_t _regs;
bool _rewrite_regs;
- boost::uint32_t _wait_time_us;
+ uint32_t _wait_time_us;
double _ref_freq;
double _pfd_freq;
double _fb_after_divider;
diff --git a/host/lib/usrp/common/adf5355.hpp b/host/lib/usrp/common/adf5355.hpp
index fb262cc9f..55294cda1 100644
--- a/host/lib/usrp/common/adf5355.hpp
+++ b/host/lib/usrp/common/adf5355.hpp
@@ -20,12 +20,13 @@
#include <boost/function.hpp>
#include <vector>
+#include <stdint.h>
class adf5355_iface
{
public:
typedef boost::shared_ptr<adf5355_iface> sptr;
- typedef boost::function<void(std::vector<boost::uint32_t>)> write_fn_t;
+ typedef boost::function<void(std::vector<uint32_t>)> write_fn_t;
static sptr make(write_fn_t write);
diff --git a/host/lib/usrp/common/async_packet_handler.hpp b/host/lib/usrp/common/async_packet_handler.hpp
index fef03483f..20409c77a 100644
--- a/host/lib/usrp/common/async_packet_handler.hpp
+++ b/host/lib/usrp/common/async_packet_handler.hpp
@@ -31,11 +31,11 @@ namespace uhd{ namespace usrp{
const to_host_type &to_host,
async_metadata_t &metadata,
const transport::vrt::if_packet_info_t &if_packet_info,
- const boost::uint32_t *vrt_hdr,
+ const uint32_t *vrt_hdr,
const double tick_rate,
const size_t channel = 0
){
- const boost::uint32_t *payload = vrt_hdr + if_packet_info.num_header_words32;
+ const uint32_t *payload = vrt_hdr + if_packet_info.num_header_words32;
//load into metadata
metadata.channel = channel;
diff --git a/host/lib/usrp/common/fifo_ctrl_excelsior.cpp b/host/lib/usrp/common/fifo_ctrl_excelsior.cpp
index f55d1ef41..a9995a161 100644
--- a/host/lib/usrp/common/fifo_ctrl_excelsior.cpp
+++ b/host/lib/usrp/common/fifo_ctrl_excelsior.cpp
@@ -38,7 +38,7 @@ static const size_t POKE32_CMD = (1 << 8);
static const size_t PEEK32_CMD = 0;
static const double ACK_TIMEOUT = 0.5;
static const double MASSIVE_TIMEOUT = 10.0; //for when we wait on a timed command
-static const boost::uint32_t MAX_SEQS_OUT = 15;
+static const uint32_t MAX_SEQS_OUT = 15;
#define SPI_DIV _config.spi_base + 0
#define SPI_CTRL _config.spi_base + 4
@@ -46,7 +46,7 @@ static const boost::uint32_t MAX_SEQS_OUT = 15;
#define SPI_DIVIDER 4
struct ctrl_result_t{
- boost::uint32_t msg[2];
+ uint32_t msg[2];
};
class fifo_ctrl_excelsior_impl : public fifo_ctrl_excelsior{
@@ -90,9 +90,9 @@ public:
void handle_msg1(void){
managed_recv_buffer::sptr buff = _xport->get_recv_buff();
if (not buff) return;
- const boost::uint32_t *pkt = buff->cast<const boost::uint32_t *>();
+ const uint32_t *pkt = buff->cast<const uint32_t *>();
vrt::if_packet_info_t packet_info;
- packet_info.num_packet_words32 = buff->size()/sizeof(boost::uint32_t);
+ packet_info.num_packet_words32 = buff->size()/sizeof(uint32_t);
try{
vrt::if_hdr_unpack_le(pkt, packet_info);
}
@@ -107,7 +107,7 @@ public:
}
else if (packet_info.has_sid and packet_info.sid >= _config.async_sid_base and packet_info.sid <= _config.async_sid_base + _config.num_async_chan){
async_metadata_t metadata;
- load_metadata_from_buff(uhd::wtohx<boost::uint32_t>, metadata, packet_info, pkt, _tick_rate, packet_info.sid - _config.async_sid_base);
+ load_metadata_from_buff(uhd::wtohx<uint32_t>, metadata, packet_info, pkt, _tick_rate, packet_info.sid - _config.async_sid_base);
_async_fifo.push_with_pop_on_full(metadata);
standard_async_msg_prints(metadata);
}
@@ -119,7 +119,7 @@ public:
/*******************************************************************
* Peek and poke 32 bit implementation
******************************************************************/
- void poke32(const wb_addr_type addr, const boost::uint32_t data){
+ void poke32(const wb_addr_type addr, const uint32_t data){
boost::mutex::scoped_lock lock(_mutex);
this->send_pkt(addr, data, POKE32_CMD);
@@ -127,7 +127,7 @@ public:
this->wait_for_ack(_seq_out-MAX_SEQS_OUT);
}
- boost::uint32_t peek32(const wb_addr_type addr){
+ uint32_t peek32(const wb_addr_type addr){
boost::mutex::scoped_lock lock(_mutex);
this->send_pkt(addr, 0, PEEK32_CMD);
@@ -138,11 +138,11 @@ public:
/*******************************************************************
* Peek and poke 16 bit not implemented
******************************************************************/
- void poke16(const wb_addr_type, const boost::uint16_t){
+ void poke16(const wb_addr_type, const uint16_t){
throw uhd::not_implemented_error("poke16 not implemented in fifo ctrl module");
}
- boost::uint16_t peek16(const wb_addr_type){
+ uint16_t peek16(const wb_addr_type){
throw uhd::not_implemented_error("peek16 not implemented in fifo ctrl module");
}
@@ -158,24 +158,24 @@ public:
_ctrl_word_cache = 0; // force update first time around
}
- boost::uint32_t transact_spi(
+ uint32_t transact_spi(
int which_slave,
const spi_config_t &config,
- boost::uint32_t data,
+ uint32_t data,
size_t num_bits,
bool readback
){
boost::mutex::scoped_lock lock(_mutex);
//load control word
- boost::uint32_t ctrl_word = 0;
+ uint32_t ctrl_word = 0;
ctrl_word |= ((which_slave & 0xffffff) << 0);
ctrl_word |= ((num_bits & 0x3ff) << 24);
if (config.mosi_edge == spi_config_t::EDGE_FALL) ctrl_word |= (1 << 31);
if (config.miso_edge == spi_config_t::EDGE_RISE) ctrl_word |= (1 << 30);
//load data word (must be in upper bits)
- const boost::uint32_t data_out = data << (32 - num_bits);
+ const uint32_t data_out = data << (32 - num_bits);
//conditionally send control word
if (_ctrl_word_cache != ctrl_word){
@@ -223,18 +223,18 @@ private:
/*******************************************************************
* Primary control and interaction private methods
******************************************************************/
- UHD_INLINE void send_pkt(wb_addr_type addr, boost::uint32_t data, int cmd){
+ UHD_INLINE void send_pkt(wb_addr_type addr, uint32_t data, int cmd){
managed_send_buffer::sptr buff = _xport->get_send_buff();
if (not buff){
throw uhd::runtime_error("fifo ctrl timed out getting a send buffer");
}
- boost::uint32_t *pkt = buff->cast<boost::uint32_t *>();
+ uint32_t *pkt = buff->cast<uint32_t *>();
//load packet info
vrt::if_packet_info_t packet_info;
packet_info.packet_type = vrt::if_packet_info_t::PACKET_TYPE_CONTEXT;
packet_info.num_payload_words32 = 2;
- packet_info.num_payload_bytes = packet_info.num_payload_words32*sizeof(boost::uint32_t);
+ packet_info.num_payload_bytes = packet_info.num_payload_words32*sizeof(uint32_t);
packet_info.packet_count = ++_seq_out;
packet_info.tsf = _time.to_ticks(_tick_rate);
packet_info.sob = false;
@@ -249,21 +249,21 @@ private:
vrt::if_hdr_pack_le(pkt, packet_info);
//load payload
- const boost::uint32_t ctrl_word = (addr/4 & 0xff) | cmd | (_seq_out << 16);
+ const uint32_t ctrl_word = (addr/4 & 0xff) | cmd | (_seq_out << 16);
pkt[packet_info.num_header_words32+0] = uhd::htowx(ctrl_word);
pkt[packet_info.num_header_words32+1] = uhd::htowx(data);
//send the buffer over the interface
- buff->commit(sizeof(boost::uint32_t)*(packet_info.num_packet_words32));
+ buff->commit(sizeof(uint32_t)*(packet_info.num_packet_words32));
}
- UHD_INLINE bool wraparound_lt16(const boost::int16_t i0, const boost::int16_t i1){
+ UHD_INLINE bool wraparound_lt16(const int16_t i0, const int16_t i1){
if (((i0 ^ i1) & 0x8000) == 0) //same sign bits
- return boost::uint16_t(i0) < boost::uint16_t(i1);
- return boost::int16_t(i1 - i0) > 0;
+ return uint16_t(i0) < uint16_t(i1);
+ return int16_t(i1 - i0) > 0;
}
- UHD_INLINE boost::uint32_t wait_for_ack(const boost::uint16_t seq_to_ack){
+ UHD_INLINE uint32_t wait_for_ack(const uint16_t seq_to_ack){
while (wraparound_lt16(_seq_ack, seq_to_ack)){
ctrl_result_t res = ctrl_result_t();
@@ -280,13 +280,13 @@ private:
zero_copy_if::sptr _xport;
const fifo_ctrl_excelsior_config _config;
boost::mutex _mutex;
- boost::uint16_t _seq_out;
- boost::uint16_t _seq_ack;
+ uint16_t _seq_out;
+ uint16_t _seq_ack;
uhd::time_spec_t _time;
bool _use_time;
double _tick_rate;
double _timeout;
- boost::uint32_t _ctrl_word_cache;
+ uint32_t _ctrl_word_cache;
bounded_buffer<async_metadata_t> _async_fifo;
bounded_buffer<ctrl_result_t> _ctrl_fifo;
task::sptr _msg_task;
diff --git a/host/lib/usrp/common/fx2_ctrl.cpp b/host/lib/usrp/common/fx2_ctrl.cpp
index 7ae97e4d0..c69223747 100644
--- a/host/lib/usrp/common/fx2_ctrl.cpp
+++ b/host/lib/usrp/common/fx2_ctrl.cpp
@@ -21,7 +21,7 @@
#include <uhd/transport/usb_control.hpp>
#include <boost/functional/hash.hpp>
#include <boost/thread/thread.hpp>
-#include <boost/cstdint.hpp>
+#include <stdint.h>
#include <fstream>
#include <sstream>
#include <string>
@@ -35,7 +35,7 @@ using namespace uhd::usrp;
static const bool load_img_msg = true;
-typedef boost::uint32_t hash_type;
+typedef uint32_t hash_type;
/***********************************************************************
* Helper Functions
@@ -259,7 +259,7 @@ public:
file.read((char *)buf, sizeof(buf));
const std::streamsize n = file.gcount();
if(n == 0) continue;
- int ret = usrp_control_write(VRQ_FPGA_LOAD, 0, FL_XFER, buf, boost::uint16_t(n));
+ int ret = usrp_control_write(VRQ_FPGA_LOAD, 0, FL_XFER, buf, uint16_t(n));
if (ret < 0 or std::streamsize(ret) != n) {
throw uhd::io_error("usrp_load_fpga: fpga load error");
}
@@ -281,7 +281,7 @@ public:
{
if (load_img_msg) UHD_MSG(status) << "Loading EEPROM image: " << filestring << "..." << std::flush;
const char *filename = filestring.c_str();
- const boost::uint16_t i2c_addr = 0x50;
+ const uint16_t i2c_addr = 0x50;
unsigned int addr;
unsigned char data[256];
@@ -381,11 +381,11 @@ public:
UHD_ASSERT_THROW(usrp_control_write_cmd(VRQ_FPGA_SET_RESET, on, 0) >= 0);
}
- int usrp_control_write(boost::uint8_t request,
- boost::uint16_t value,
- boost::uint16_t index,
+ int usrp_control_write(uint8_t request,
+ uint16_t value,
+ uint16_t index,
unsigned char *buff,
- boost::uint16_t length)
+ uint16_t length)
{
return _ctrl_transport->submit(VRT_VENDOR_OUT, // bmReqeustType
request, // bRequest
@@ -396,11 +396,11 @@ public:
}
- int usrp_control_read(boost::uint8_t request,
- boost::uint16_t value,
- boost::uint16_t index,
+ int usrp_control_read(uint8_t request,
+ uint16_t value,
+ uint16_t index,
unsigned char *buff,
- boost::uint16_t length)
+ uint16_t length)
{
return _ctrl_transport->submit(VRT_VENDOR_IN, // bmReqeustType
request, // bRequest
@@ -411,26 +411,26 @@ public:
}
- int usrp_control_write_cmd(boost::uint8_t request, boost::uint16_t value, boost::uint16_t index)
+ int usrp_control_write_cmd(uint8_t request, uint16_t value, uint16_t index)
{
return usrp_control_write(request, value, index, 0, 0);
}
byte_vector_t read_eeprom(
- boost::uint16_t addr,
- boost::uint16_t offset,
+ uint16_t addr,
+ uint16_t offset,
size_t num_bytes
){
- this->write_i2c(addr, byte_vector_t(1, boost::uint8_t(offset)));
+ this->write_i2c(addr, byte_vector_t(1, uint8_t(offset)));
return this->read_i2c(addr, num_bytes);
}
- int usrp_i2c_write(boost::uint16_t i2c_addr, unsigned char *buf, boost::uint16_t len)
+ int usrp_i2c_write(uint16_t i2c_addr, unsigned char *buf, uint16_t len)
{
return usrp_control_write(VRQ_I2C_WRITE, i2c_addr, 0, buf, len);
}
- int usrp_i2c_read(boost::uint16_t i2c_addr, unsigned char *buf, boost::uint16_t len)
+ int usrp_i2c_read(uint16_t i2c_addr, unsigned char *buf, uint16_t len)
{
return usrp_control_read(VRQ_I2C_READ, i2c_addr, 0, buf, len);
}
@@ -438,7 +438,7 @@ public:
static const bool iface_debug = false;
static const size_t max_i2c_data_bytes = 64;
- void write_i2c(boost::uint16_t addr, const byte_vector_t &bytes)
+ void write_i2c(uint16_t addr, const byte_vector_t &bytes)
{
UHD_ASSERT_THROW(bytes.size() < max_i2c_data_bytes);
@@ -448,7 +448,7 @@ public:
uhd::runtime_error("USRP: failed i2c write");
}
- byte_vector_t read_i2c(boost::uint16_t addr, size_t num_bytes)
+ byte_vector_t read_i2c(uint16_t addr, size_t num_bytes)
{
UHD_ASSERT_THROW(num_bytes < max_i2c_data_bytes);
diff --git a/host/lib/usrp/common/fx2_ctrl.hpp b/host/lib/usrp/common/fx2_ctrl.hpp
index 9f8cec296..40f91b9b6 100644
--- a/host/lib/usrp/common/fx2_ctrl.hpp
+++ b/host/lib/usrp/common/fx2_ctrl.hpp
@@ -87,11 +87,11 @@ public:
* \param buff buffer to place data
* \return number of bytes read or error
*/
- virtual int usrp_control_read(boost::uint8_t request,
- boost::uint16_t value,
- boost::uint16_t index,
+ virtual int usrp_control_read(uint8_t request,
+ uint16_t value,
+ uint16_t index,
unsigned char *buff,
- boost::uint16_t length) = 0;
+ uint16_t length) = 0;
/*!
* Submit an OUT transfer
@@ -101,11 +101,11 @@ public:
* \param buff buffer of data to be sent
* \return number of bytes written or error
*/
- virtual int usrp_control_write(boost::uint8_t request,
- boost::uint16_t value,
- boost::uint16_t index,
+ virtual int usrp_control_write(uint8_t request,
+ uint16_t value,
+ uint16_t index,
unsigned char *buff,
- boost::uint16_t length) = 0;
+ uint16_t length) = 0;
/*!
* Perform an I2C write
@@ -115,9 +115,9 @@ public:
* \return number of bytes written or error
*/
- virtual int usrp_i2c_write(boost::uint16_t i2c_addr,
+ virtual int usrp_i2c_write(uint16_t i2c_addr,
unsigned char *buf,
- boost::uint16_t len) = 0;
+ uint16_t len) = 0;
/*!
* Perform an I2C read
@@ -127,9 +127,9 @@ public:
* \return number of bytes read or error
*/
- virtual int usrp_i2c_read(boost::uint16_t i2c_addr,
+ virtual int usrp_i2c_read(uint16_t i2c_addr,
unsigned char *buf,
- boost::uint16_t len) = 0;
+ uint16_t len) = 0;
//! enable/disable the rx path
virtual void usrp_rx_enable(bool on) = 0;
diff --git a/host/lib/usrp/common/max287x.hpp b/host/lib/usrp/common/max287x.hpp
index 540f5207f..9022e0f02 100644
--- a/host/lib/usrp/common/max287x.hpp
+++ b/host/lib/usrp/common/max287x.hpp
@@ -40,7 +40,7 @@ class max287x_iface
public:
typedef boost::shared_ptr<max287x_iface> sptr;
- typedef boost::function<void(std::vector<boost::uint32_t>)> write_fn;
+ typedef boost::function<void(std::vector<uint32_t>)> write_fn;
/**
* LD Pin Modes
@@ -207,7 +207,7 @@ public:
* Set phase
* @param phase the phase offset
*/
- virtual void set_phase(boost::uint16_t phase) = 0;
+ virtual void set_phase(uint16_t phase) = 0;
/**
* Write values configured by the set_* functions.
@@ -251,7 +251,7 @@ public:
virtual void set_clock_divider_mode(clock_divider_mode_t mode);
virtual void set_cycle_slip_mode(bool enabled);
virtual void set_low_noise_and_spur(low_noise_and_spur_t mode);
- virtual void set_phase(boost::uint16_t phase);
+ virtual void set_phase(uint16_t phase);
virtual void commit();
virtual bool can_sync();
virtual void config_for_sync(bool enable);
@@ -877,7 +877,7 @@ void max287x<max287x_regs_t>::set_low_noise_and_spur(low_noise_and_spur_t mode)
}
template <typename max287x_regs_t>
-void max287x<max287x_regs_t>::set_phase(boost::uint16_t phase)
+void max287x<max287x_regs_t>::set_phase(uint16_t phase)
{
_regs.phase_12_bit = phase & 0xFFF;
}
@@ -885,26 +885,26 @@ void max287x<max287x_regs_t>::set_phase(boost::uint16_t phase)
template <typename max287x_regs_t>
void max287x<max287x_regs_t>::commit()
{
- std::vector<boost::uint32_t> regs;
- std::set<boost::uint32_t> changed_regs;
+ std::vector<uint32_t> regs;
+ std::set<uint32_t> changed_regs;
// Get only regs with changes
if (_write_all_regs)
{
for (int addr = 5; addr >= 0; addr--)
- regs.push_back(_regs.get_reg(boost::uint32_t(addr)));
+ regs.push_back(_regs.get_reg(uint32_t(addr)));
} else {
try {
- changed_regs = _regs.template get_changed_addrs<boost::uint32_t> ();
+ changed_regs = _regs.template get_changed_addrs<uint32_t> ();
for (int addr = 5; addr >= 0; addr--)
{
- if (changed_regs.find(boost::uint32_t(addr)) != changed_regs.end())
- regs.push_back(_regs.get_reg(boost::uint32_t(addr)));
+ if (changed_regs.find(uint32_t(addr)) != changed_regs.end())
+ regs.push_back(_regs.get_reg(uint32_t(addr)));
}
} catch (uhd::runtime_error&) {
// No saved state - write all regs
for (int addr = 5; addr >= 0; addr--)
- regs.push_back(_regs.get_reg(boost::uint32_t(addr)));
+ regs.push_back(_regs.get_reg(uint32_t(addr)));
}
}
diff --git a/host/lib/usrp/common/recv_packet_demuxer.cpp b/host/lib/usrp/common/recv_packet_demuxer.cpp
index db0f71280..8d9dcee9e 100644
--- a/host/lib/usrp/common/recv_packet_demuxer.cpp
+++ b/host/lib/usrp/common/recv_packet_demuxer.cpp
@@ -39,12 +39,12 @@ public:
delete this;
}
- boost::uint32_t buff[10];
+ uint32_t buff[10];
};
-static UHD_INLINE boost::uint32_t extract_sid(managed_recv_buffer::sptr &buff){
+static UHD_INLINE uint32_t extract_sid(managed_recv_buffer::sptr &buff){
//ASSUME that the data is in little endian format
- return uhd::wtohx(buff->cast<const boost::uint32_t *>()[1]);
+ return uhd::wtohx(buff->cast<const uint32_t *>()[1]);
}
recv_packet_demuxer::~recv_packet_demuxer(void){
@@ -56,7 +56,7 @@ public:
recv_packet_demuxer_impl(
transport::zero_copy_if::sptr transport,
const size_t size,
- const boost::uint32_t sid_base
+ const uint32_t sid_base
):
_transport(transport), _sid_base(sid_base), _queues(size)
{
@@ -92,19 +92,19 @@ public:
vrt::if_packet_info_t info;
info.packet_type = vrt::if_packet_info_t::PACKET_TYPE_DATA;
info.num_payload_words32 = 1;
- info.num_payload_bytes = info.num_payload_words32*sizeof(boost::uint32_t);
+ info.num_payload_bytes = info.num_payload_words32*sizeof(uint32_t);
info.has_sid = true;
info.sid = _sid_base + index;
vrt::if_hdr_pack_le(mrb->buff, info);
mrb->buff[info.num_header_words32] = rx_metadata_t::ERROR_CODE_OVERFLOW;
- return mrb->make(mrb, mrb->buff, info.num_packet_words32*sizeof(boost::uint32_t));
+ return mrb->make(mrb, mrb->buff, info.num_packet_words32*sizeof(uint32_t));
}
}
}
private:
transport::zero_copy_if::sptr _transport;
- const boost::uint32_t _sid_base;
+ const uint32_t _sid_base;
boost::mutex _mutex;
struct channel_guts_type{
channel_guts_type(void): wrapper(container){}
@@ -114,6 +114,6 @@ private:
std::vector<channel_guts_type> _queues;
};
-recv_packet_demuxer::sptr recv_packet_demuxer::make(transport::zero_copy_if::sptr transport, const size_t size, const boost::uint32_t sid_base){
+recv_packet_demuxer::sptr recv_packet_demuxer::make(transport::zero_copy_if::sptr transport, const size_t size, const uint32_t sid_base){
return sptr(new recv_packet_demuxer_impl(transport, size, sid_base));
}
diff --git a/host/lib/usrp/common/recv_packet_demuxer.hpp b/host/lib/usrp/common/recv_packet_demuxer.hpp
index a03f25f47..fc9b005a5 100644
--- a/host/lib/usrp/common/recv_packet_demuxer.hpp
+++ b/host/lib/usrp/common/recv_packet_demuxer.hpp
@@ -21,7 +21,7 @@
#include <uhd/config.hpp>
#include <uhd/transport/zero_copy.hpp>
#include <boost/shared_ptr.hpp>
-#include <boost/cstdint.hpp>
+#include <stdint.h>
namespace uhd{ namespace usrp{
@@ -32,7 +32,7 @@ namespace uhd{ namespace usrp{
virtual ~recv_packet_demuxer(void) = 0;
//! Make a new demuxer from a transport and parameters
- static sptr make(transport::zero_copy_if::sptr transport, const size_t size, const boost::uint32_t sid_base);
+ static sptr make(transport::zero_copy_if::sptr transport, const size_t size, const uint32_t sid_base);
//! Get a buffer at the given index from the transport
virtual transport::managed_recv_buffer::sptr get_recv_buff(const size_t index, const double timeout) = 0;
diff --git a/host/lib/usrp/common/recv_packet_demuxer_3000.hpp b/host/lib/usrp/common/recv_packet_demuxer_3000.hpp
index ec930f3ad..3ad76f1a0 100644
--- a/host/lib/usrp/common/recv_packet_demuxer_3000.hpp
+++ b/host/lib/usrp/common/recv_packet_demuxer_3000.hpp
@@ -20,7 +20,7 @@
#include <uhd/config.hpp>
#include <uhd/transport/zero_copy.hpp>
-#include <boost/cstdint.hpp>
+#include <stdint.h>
#include <boost/thread.hpp>
#include <uhd/utils/msg.hpp>
#include <uhd/utils/atomic.hpp>
@@ -44,7 +44,7 @@ namespace uhd{ namespace usrp{
_xport(xport)
{/*NOP*/}
- transport::managed_recv_buffer::sptr get_recv_buff(const boost::uint32_t sid, const double timeout)
+ transport::managed_recv_buffer::sptr get_recv_buff(const uint32_t sid, const double timeout)
{
const time_spec_t exit_time = time_spec_t(timeout) + time_spec_t::get_system_time();
transport::managed_recv_buffer::sptr buff;
@@ -59,7 +59,7 @@ namespace uhd{ namespace usrp{
return buff;
}
- transport::managed_recv_buffer::sptr _internal_get_recv_buff(const boost::uint32_t sid, const double timeout)
+ transport::managed_recv_buffer::sptr _internal_get_recv_buff(const uint32_t sid, const double timeout)
{
transport::managed_recv_buffer::sptr buff;
@@ -99,7 +99,7 @@ namespace uhd{ namespace usrp{
buff = _xport->get_recv_buff(timeout);
if (buff)
{
- const boost::uint32_t new_sid = uhd::wtohx(buff->cast<const boost::uint32_t *>()[1]);
+ const uint32_t new_sid = uhd::wtohx(buff->cast<const uint32_t *>()[1]);
if (new_sid != sid)
{
boost::mutex::scoped_lock l(mutex);
@@ -118,7 +118,7 @@ namespace uhd{ namespace usrp{
return buff;
}
- void realloc_sid(const boost::uint32_t sid)
+ void realloc_sid(const uint32_t sid)
{
boost::mutex::scoped_lock l(mutex);
while(not _queues[sid].empty()) //allocated and clears if already allocated
@@ -127,10 +127,10 @@ namespace uhd{ namespace usrp{
}
}
- transport::zero_copy_if::sptr make_proxy(const boost::uint32_t sid);
+ transport::zero_copy_if::sptr make_proxy(const uint32_t sid);
typedef std::queue<transport::managed_recv_buffer::sptr> queue_type_t;
- std::map<boost::uint32_t, queue_type_t> _queues;
+ std::map<uint32_t, queue_type_t> _queues;
transport::zero_copy_if::sptr _xport;
#ifdef RECV_PACKET_DEMUXER_3000_THREAD_SAFE
uhd::atomic_uint32_t _claimed;
@@ -141,7 +141,7 @@ namespace uhd{ namespace usrp{
struct recv_packet_demuxer_proxy_3000 : transport::zero_copy_if
{
- recv_packet_demuxer_proxy_3000(recv_packet_demuxer_3000::sptr demux, transport::zero_copy_if::sptr xport, const boost::uint32_t sid):
+ recv_packet_demuxer_proxy_3000(recv_packet_demuxer_3000::sptr demux, transport::zero_copy_if::sptr xport, const uint32_t sid):
_demux(demux), _xport(xport), _sid(sid)
{
_demux->realloc_sid(_sid); //causes clear
@@ -167,10 +167,10 @@ namespace uhd{ namespace usrp{
recv_packet_demuxer_3000::sptr _demux;
transport::zero_copy_if::sptr _xport;
- const boost::uint32_t _sid;
+ const uint32_t _sid;
};
- inline transport::zero_copy_if::sptr recv_packet_demuxer_3000::make_proxy(const boost::uint32_t sid)
+ inline transport::zero_copy_if::sptr recv_packet_demuxer_3000::make_proxy(const uint32_t sid)
{
return transport::zero_copy_if::sptr(new recv_packet_demuxer_proxy_3000(this->shared_from_this(), _xport, sid));
}
diff --git a/host/lib/usrp/common/usrp3_fw_ctrl_iface.cpp b/host/lib/usrp/common/usrp3_fw_ctrl_iface.cpp
index ef541e37f..16ee84140 100644
--- a/host/lib/usrp/common/usrp3_fw_ctrl_iface.cpp
+++ b/host/lib/usrp/common/usrp3_fw_ctrl_iface.cpp
@@ -32,7 +32,7 @@ namespace uhd { namespace usrp { namespace usrp3 {
//----------------------------------------------------------
uhd::wb_iface::sptr usrp3_fw_ctrl_iface::make(
uhd::transport::udp_simple::sptr udp_xport,
- const boost::uint16_t product_id,
+ const uint16_t product_id,
const bool verbose)
{
return wb_iface::sptr(new usrp3_fw_ctrl_iface(udp_xport, product_id, verbose));
@@ -44,7 +44,7 @@ uhd::wb_iface::sptr usrp3_fw_ctrl_iface::make(
usrp3_fw_ctrl_iface::usrp3_fw_ctrl_iface(
uhd::transport::udp_simple::sptr udp_xport,
- const boost::uint16_t product_id,
+ const uint16_t product_id,
const bool verbose) :
_product_id(product_id), _verbose(verbose), _udp_xport(udp_xport),
_seq_num(0)
@@ -64,7 +64,7 @@ void usrp3_fw_ctrl_iface::flush()
_flush();
}
-void usrp3_fw_ctrl_iface::poke32(const wb_addr_type addr, const boost::uint32_t data)
+void usrp3_fw_ctrl_iface::poke32(const wb_addr_type addr, const uint32_t data)
{
boost::mutex::scoped_lock lock(_mutex);
@@ -81,7 +81,7 @@ void usrp3_fw_ctrl_iface::poke32(const wb_addr_type addr, const boost::uint32_t
}
}
-boost::uint32_t usrp3_fw_ctrl_iface::peek32(const wb_addr_type addr)
+uint32_t usrp3_fw_ctrl_iface::peek32(const wb_addr_type addr)
{
boost::mutex::scoped_lock lock(_mutex);
@@ -98,13 +98,13 @@ boost::uint32_t usrp3_fw_ctrl_iface::peek32(const wb_addr_type addr)
return 0;
}
-void usrp3_fw_ctrl_iface::_poke32(const wb_addr_type addr, const boost::uint32_t data)
+void usrp3_fw_ctrl_iface::_poke32(const wb_addr_type addr, const uint32_t data)
{
//Load request struct
fw_comm_pkt_t request;
- request.id = uhd::htonx<boost::uint32_t>(FW_COMM_GENERATE_ID(_product_id));
- request.flags = uhd::htonx<boost::uint32_t>(FW_COMM_FLAGS_ACK | FW_COMM_CMD_POKE32);
- request.sequence = uhd::htonx<boost::uint32_t>(_seq_num++);
+ request.id = uhd::htonx<uint32_t>(FW_COMM_GENERATE_ID(_product_id));
+ request.flags = uhd::htonx<uint32_t>(FW_COMM_FLAGS_ACK | FW_COMM_CMD_POKE32);
+ request.sequence = uhd::htonx<uint32_t>(_seq_num++);
request.addr = uhd::htonx(addr);
request.data_words = 1;
request.data[0] = uhd::htonx(data);
@@ -119,7 +119,7 @@ void usrp3_fw_ctrl_iface::_poke32(const wb_addr_type addr, const boost::uint32_t
if (nbytes == 0) throw uhd::io_error("udp fw poke32 - reply timed out");
//Sanity checks
- const size_t flags = uhd::ntohx<boost::uint32_t>(reply.flags);
+ const size_t flags = uhd::ntohx<uint32_t>(reply.flags);
UHD_ASSERT_THROW(nbytes == sizeof(reply));
UHD_ASSERT_THROW(not (flags & FW_COMM_FLAGS_ERROR_MASK));
UHD_ASSERT_THROW(flags & FW_COMM_CMD_POKE32);
@@ -129,13 +129,13 @@ void usrp3_fw_ctrl_iface::_poke32(const wb_addr_type addr, const boost::uint32_t
UHD_ASSERT_THROW(reply.data[0] == request.data[0]);
}
-boost::uint32_t usrp3_fw_ctrl_iface::_peek32(const wb_addr_type addr)
+uint32_t usrp3_fw_ctrl_iface::_peek32(const wb_addr_type addr)
{
//Load request struct
fw_comm_pkt_t request;
- request.id = uhd::htonx<boost::uint32_t>(FW_COMM_GENERATE_ID(_product_id));
- request.flags = uhd::htonx<boost::uint32_t>(FW_COMM_FLAGS_ACK | FW_COMM_CMD_PEEK32);
- request.sequence = uhd::htonx<boost::uint32_t>(_seq_num++);
+ request.id = uhd::htonx<uint32_t>(FW_COMM_GENERATE_ID(_product_id));
+ request.flags = uhd::htonx<uint32_t>(FW_COMM_FLAGS_ACK | FW_COMM_CMD_PEEK32);
+ request.sequence = uhd::htonx<uint32_t>(_seq_num++);
request.addr = uhd::htonx(addr);
request.data_words = 1;
request.data[0] = 0;
@@ -150,7 +150,7 @@ boost::uint32_t usrp3_fw_ctrl_iface::_peek32(const wb_addr_type addr)
if (nbytes == 0) throw uhd::io_error("udp fw peek32 - reply timed out");
//Sanity checks
- const size_t flags = uhd::ntohx<boost::uint32_t>(reply.flags);
+ const size_t flags = uhd::ntohx<uint32_t>(reply.flags);
UHD_ASSERT_THROW(nbytes == sizeof(reply));
UHD_ASSERT_THROW(not (flags & FW_COMM_FLAGS_ERROR_MASK));
UHD_ASSERT_THROW(flags & FW_COMM_CMD_PEEK32);
@@ -159,7 +159,7 @@ boost::uint32_t usrp3_fw_ctrl_iface::_peek32(const wb_addr_type addr)
UHD_ASSERT_THROW(reply.addr == request.addr);
//return result!
- return uhd::ntohx<boost::uint32_t>(reply.data[0]);
+ return uhd::ntohx<uint32_t>(reply.data[0]);
}
void usrp3_fw_ctrl_iface::_flush(void)
@@ -172,7 +172,7 @@ void usrp3_fw_ctrl_iface::_flush(void)
std::vector<std::string> usrp3_fw_ctrl_iface::discover_devices(
const std::string& addr_hint, const std::string& port,
- boost::uint16_t product_id)
+ uint16_t product_id)
{
std::vector<std::string> addrs;
@@ -190,9 +190,9 @@ std::vector<std::string> usrp3_fw_ctrl_iface::discover_devices(
//Send dummy request
fw_comm_pkt_t request;
- request.id = uhd::htonx<boost::uint32_t>(FW_COMM_GENERATE_ID(product_id));
- request.flags = uhd::htonx<boost::uint32_t>(FW_COMM_FLAGS_ACK|FW_COMM_CMD_ECHO);
- request.sequence = uhd::htonx<boost::uint32_t>(std::rand());
+ request.id = uhd::htonx<uint32_t>(FW_COMM_GENERATE_ID(product_id));
+ request.flags = uhd::htonx<uint32_t>(FW_COMM_FLAGS_ACK|FW_COMM_CMD_ECHO);
+ request.sequence = uhd::htonx<uint32_t>(std::rand());
udp_bcast_xport->send(boost::asio::buffer(&request, sizeof(request)));
//loop for replies until timeout
@@ -213,18 +213,18 @@ std::vector<std::string> usrp3_fw_ctrl_iface::discover_devices(
return addrs;
}
-boost::uint32_t usrp3_fw_ctrl_iface::get_iface_id(
+uint32_t usrp3_fw_ctrl_iface::get_iface_id(
const std::string& addr, const std::string& port,
- boost::uint16_t product_id)
+ uint16_t product_id)
{
uhd::transport::udp_simple::sptr udp_xport =
uhd::transport::udp_simple::make_connected(addr, port);
//Send dummy request
fw_comm_pkt_t request;
- request.id = uhd::htonx<boost::uint32_t>(FW_COMM_GENERATE_ID(product_id));
- request.flags = uhd::htonx<boost::uint32_t>(FW_COMM_FLAGS_ACK|FW_COMM_CMD_ECHO);
- request.sequence = uhd::htonx<boost::uint32_t>(std::rand());
+ request.id = uhd::htonx<uint32_t>(FW_COMM_GENERATE_ID(product_id));
+ request.flags = uhd::htonx<uint32_t>(FW_COMM_FLAGS_ACK|FW_COMM_CMD_ECHO);
+ request.sequence = uhd::htonx<uint32_t>(std::rand());
udp_xport->send(boost::asio::buffer(&request, sizeof(request)));
//loop for replies until timeout
@@ -237,7 +237,7 @@ boost::uint32_t usrp3_fw_ctrl_iface::get_iface_id(
request.flags == reply->flags &&
request.sequence == reply->sequence)
{
- return uhd::ntohx<boost::uint32_t>(reply->data[0]);
+ return uhd::ntohx<uint32_t>(reply->data[0]);
} else {
throw uhd::io_error("udp get_iface_id - bad response");
}
diff --git a/host/lib/usrp/common/usrp3_fw_ctrl_iface.hpp b/host/lib/usrp/common/usrp3_fw_ctrl_iface.hpp
index 33286861b..9dc35ef9e 100644
--- a/host/lib/usrp/common/usrp3_fw_ctrl_iface.hpp
+++ b/host/lib/usrp/common/usrp3_fw_ctrl_iface.hpp
@@ -30,38 +30,38 @@ class usrp3_fw_ctrl_iface : public uhd::wb_iface
public:
usrp3_fw_ctrl_iface(
uhd::transport::udp_simple::sptr udp_xport,
- const boost::uint16_t product_id,
+ const uint16_t product_id,
const bool verbose);
virtual ~usrp3_fw_ctrl_iface();
// -- uhd::wb_iface --
- void poke32(const wb_addr_type addr, const boost::uint32_t data);
- boost::uint32_t peek32(const wb_addr_type addr);
+ void poke32(const wb_addr_type addr, const uint32_t data);
+ uint32_t peek32(const wb_addr_type addr);
void flush();
static uhd::wb_iface::sptr make(
uhd::transport::udp_simple::sptr udp_xport,
- const boost::uint16_t product_id,
+ const uint16_t product_id,
const bool verbose = true);
// -- uhd::wb_iface --
static std::vector<std::string> discover_devices(
const std::string& addr_hint, const std::string& port,
- boost::uint16_t product_id);
+ uint16_t product_id);
- static boost::uint32_t get_iface_id(
+ static uint32_t get_iface_id(
const std::string& addr, const std::string& port,
- boost::uint16_t product_id);
+ uint16_t product_id);
private:
- void _poke32(const wb_addr_type addr, const boost::uint32_t data);
- boost::uint32_t _peek32(const wb_addr_type addr);
+ void _poke32(const wb_addr_type addr, const uint32_t data);
+ uint32_t _peek32(const wb_addr_type addr);
void _flush(void);
- const boost::uint16_t _product_id;
+ const uint16_t _product_id;
const bool _verbose;
uhd::transport::udp_simple::sptr _udp_xport;
- boost::uint32_t _seq_num;
+ uint32_t _seq_num;
boost::mutex _mutex;
static const size_t NUM_RETRIES = 3;
diff --git a/host/lib/usrp/cores/dma_fifo_core_3000.cpp b/host/lib/usrp/cores/dma_fifo_core_3000.cpp
index 5df28f7c2..908ba906e 100644
--- a/host/lib/usrp/cores/dma_fifo_core_3000.cpp
+++ b/host/lib/usrp/cores/dma_fifo_core_3000.cpp
@@ -36,12 +36,12 @@ protected:
public:
UHD_DEFINE_SOFT_REG_FIELD(ADDR, /*width*/ 3, /*shift*/ 0); //[2:0]
- static const boost::uint32_t RB_FIFO_STATUS = 0;
- static const boost::uint32_t RB_BIST_STATUS = 1;
- static const boost::uint32_t RB_BIST_XFER_CNT = 2;
- static const boost::uint32_t RB_BIST_CYC_CNT = 3;
+ static const uint32_t RB_FIFO_STATUS = 0;
+ static const uint32_t RB_BIST_STATUS = 1;
+ static const uint32_t RB_BIST_XFER_CNT = 2;
+ static const uint32_t RB_BIST_CYC_CNT = 3;
- rb_addr_reg_t(boost::uint32_t base):
+ rb_addr_reg_t(uint32_t base):
soft_reg32_wo_t(base + 0)
{
//Initial values
@@ -56,7 +56,7 @@ protected:
UHD_DEFINE_SOFT_REG_FIELD(BURST_TIMEOUT, /*width*/ 12, /*shift*/ 4); //[15:4]
UHD_DEFINE_SOFT_REG_FIELD(RD_SUPPRESS_THRESH, /*width*/ 16, /*shift*/ 16); //[31:16]
- fifo_ctrl_reg_t(boost::uint32_t base):
+ fifo_ctrl_reg_t(uint32_t base):
soft_reg32_wo_t(base + 4)
{
//Initial values
@@ -71,7 +71,7 @@ protected:
public:
UHD_DEFINE_SOFT_REG_FIELD(BASE_ADDR, /*width*/ 30, /*shift*/ 0); //[29:0]
- base_addr_reg_t(boost::uint32_t base):
+ base_addr_reg_t(uint32_t base):
soft_reg32_wo_t(base + 8)
{
//Initial values
@@ -83,7 +83,7 @@ protected:
public:
UHD_DEFINE_SOFT_REG_FIELD(ADDR_MASK, /*width*/ 30, /*shift*/ 0); //[29:0]
- addr_mask_reg_t(boost::uint32_t base):
+ addr_mask_reg_t(uint32_t base):
soft_reg32_wo_t(base + 12)
{
//Initial values
@@ -97,12 +97,12 @@ protected:
UHD_DEFINE_SOFT_REG_FIELD(CONTINUOUS_MODE, /*width*/ 1, /*shift*/ 1); //[1]
UHD_DEFINE_SOFT_REG_FIELD(TEST_PATT, /*width*/ 2, /*shift*/ 4); //[5:4]
- static const boost::uint32_t TEST_PATT_ZERO_ONE = 0;
- static const boost::uint32_t TEST_PATT_CHECKERBOARD = 1;
- static const boost::uint32_t TEST_PATT_COUNT = 2;
- static const boost::uint32_t TEST_PATT_COUNT_INV = 3;
+ static const uint32_t TEST_PATT_ZERO_ONE = 0;
+ static const uint32_t TEST_PATT_CHECKERBOARD = 1;
+ static const uint32_t TEST_PATT_COUNT = 2;
+ static const uint32_t TEST_PATT_COUNT_INV = 3;
- bist_ctrl_reg_t(boost::uint32_t base):
+ bist_ctrl_reg_t(uint32_t base):
soft_reg32_wo_t(base + 16)
{
//Initial values
@@ -118,7 +118,7 @@ protected:
UHD_DEFINE_SOFT_REG_FIELD(MAX_PKT_SIZE, /*width*/ 13, /*shift*/ 18); //[30:18]
UHD_DEFINE_SOFT_REG_FIELD(PKT_SIZE_RAMP, /*width*/ 1, /*shift*/ 31); //[31]
- bist_cfg_reg_t(boost::uint32_t base):
+ bist_cfg_reg_t(uint32_t base):
soft_reg32_wo_t(base + 20)
{
//Initial values
@@ -133,7 +133,7 @@ protected:
UHD_DEFINE_SOFT_REG_FIELD(TX_PKT_DELAY, /*width*/ 16, /*shift*/ 0); //[15:0]
UHD_DEFINE_SOFT_REG_FIELD(RX_SAMP_DELAY, /*width*/ 8, /*shift*/ 16); //[23:16]
- bist_delay_reg_t(boost::uint32_t base):
+ bist_delay_reg_t(uint32_t base):
soft_reg32_wo_t(base + 24)
{
//Initial values
@@ -146,7 +146,7 @@ protected:
public:
UHD_DEFINE_SOFT_REG_FIELD(SID, /*width*/ 32, /*shift*/ 0); //[31:0]
- bist_sid_reg_t(boost::uint32_t base):
+ bist_sid_reg_t(uint32_t base):
soft_reg32_wo_t(base + 28)
{
//Initial values
@@ -169,13 +169,13 @@ public:
return _iface->peek32(_rb_addr) & 0x80000000;
}
- boost::uint32_t get_occupied_cnt() {
+ uint32_t get_occupied_cnt() {
boost::lock_guard<boost::mutex> lock(_mutex);
_addr_reg.write(rb_addr_reg_t::ADDR, rb_addr_reg_t::RB_FIFO_STATUS);
return _iface->peek32(_rb_addr) & 0x7FFFFFF;
}
- boost::uint32_t is_fifo_busy() {
+ uint32_t is_fifo_busy() {
boost::lock_guard<boost::mutex> lock(_mutex);
_addr_reg.write(rb_addr_reg_t::ADDR, rb_addr_reg_t::RB_FIFO_STATUS);
return _iface->peek32(_rb_addr) & 0x40000000;
@@ -184,17 +184,17 @@ public:
struct bist_status_t {
bool running;
bool finished;
- boost::uint8_t error;
+ uint8_t error;
};
bist_status_t get_bist_status() {
boost::lock_guard<boost::mutex> lock(_mutex);
_addr_reg.write(rb_addr_reg_t::ADDR, rb_addr_reg_t::RB_BIST_STATUS);
- boost::uint32_t st32 = _iface->peek32(_rb_addr) & 0xF;
+ uint32_t st32 = _iface->peek32(_rb_addr) & 0xF;
bist_status_t status;
status.running = st32 & 0x1;
status.finished = st32 & 0x2;
- status.error = static_cast<boost::uint8_t>((st32>>2) & 0x3);
+ status.error = static_cast<uint8_t>((st32>>2) & 0x3);
return status;
}
@@ -206,7 +206,7 @@ public:
double get_xfer_ratio() {
boost::lock_guard<boost::mutex> lock(_mutex);
- boost::uint32_t xfer_cnt = 0, cyc_cnt = 0;
+ uint32_t xfer_cnt = 0, cyc_cnt = 0;
_addr_reg.write(rb_addr_reg_t::ADDR, rb_addr_reg_t::RB_BIST_XFER_CNT);
xfer_cnt = _iface->peek32(_rb_addr);
_addr_reg.write(rb_addr_reg_t::ADDR, rb_addr_reg_t::RB_BIST_CYC_CNT);
@@ -252,10 +252,10 @@ public:
_fifo_ctrl_reg.write(fifo_ctrl_reg_t::CLEAR_FIFO, 0);
}
- virtual void resize(const boost::uint32_t base_addr, const boost::uint32_t size) {
+ virtual void resize(const uint32_t base_addr, const uint32_t size) {
//Validate parameters
if (size < 8192) throw uhd::runtime_error("DMA FIFO must be larger than 8KiB");
- boost::uint32_t size_mask = size - 1;
+ uint32_t size_mask = size - 1;
if (size & size_mask) throw uhd::runtime_error("DMA FIFO size must be a power of 2");
//Clear the FIFO and hold it in that state
@@ -268,7 +268,7 @@ public:
flush();
}
- virtual boost::uint32_t get_bytes_occupied() {
+ virtual uint32_t get_bytes_occupied() {
return _fifo_readback.get_occupied_cnt() * 8;
}
@@ -276,16 +276,16 @@ public:
return _fifo_readback.is_ext_bist_supported();
}
- virtual boost::uint8_t run_bist(bool finite = true, boost::uint32_t timeout_ms = 500) {
+ virtual uint8_t run_bist(bool finite = true, uint32_t timeout_ms = 500) {
return run_ext_bist(finite, 0, 0, 0, timeout_ms);
}
- virtual boost::uint8_t run_ext_bist(
+ virtual uint8_t run_ext_bist(
bool finite,
- boost::uint32_t rx_samp_delay,
- boost::uint32_t tx_pkt_delay,
- boost::uint32_t sid,
- boost::uint32_t timeout_ms = 500
+ uint32_t rx_samp_delay,
+ uint32_t tx_pkt_delay,
+ uint32_t sid,
+ uint32_t timeout_ms = 500
) {
boost::lock_guard<boost::mutex> lock(_mutex);
@@ -350,7 +350,7 @@ private:
}
}
- void _wait_for_bist_done(boost::uint32_t timeout_ms, bool force_stop = false)
+ void _wait_for_bist_done(uint32_t timeout_ms, bool force_stop = false)
{
boost::posix_time::ptime start_time = boost::posix_time::microsec_clock::local_time();
boost::posix_time::time_duration elapsed;
diff --git a/host/lib/usrp/cores/dma_fifo_core_3000.hpp b/host/lib/usrp/cores/dma_fifo_core_3000.hpp
index 41430e5c3..46a913c93 100644
--- a/host/lib/usrp/cores/dma_fifo_core_3000.hpp
+++ b/host/lib/usrp/cores/dma_fifo_core_3000.hpp
@@ -49,17 +49,17 @@ public:
/*!
* Resize and rebase the DMA FIFO. Will clear all contents.
*/
- virtual void resize(const boost::uint32_t base_addr, const boost::uint32_t size) = 0;
+ 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 boost::uint32_t get_bytes_occupied() = 0;
+ virtual uint32_t get_bytes_occupied() = 0;
/*!
* Run the built-in-self-test routine for the DMA FIFO
*/
- virtual boost::uint8_t run_bist(bool finite = true, boost::uint32_t timeout_ms = 500) = 0;
+ virtual uint8_t run_bist(bool finite = true, uint32_t timeout_ms = 500) = 0;
/*!
* Is extended BIST supported
@@ -69,12 +69,12 @@ public:
/*!
* Run the built-in-self-test routine for the DMA FIFO (extended BIST only)
*/
- virtual boost::uint8_t run_ext_bist(
+ virtual uint8_t run_ext_bist(
bool finite,
- boost::uint32_t rx_samp_delay,
- boost::uint32_t tx_pkt_delay,
- boost::uint32_t sid,
- boost::uint32_t timeout_ms = 500) = 0;
+ 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)
diff --git a/host/lib/usrp/cores/dsp_core_utils.cpp b/host/lib/usrp/cores/dsp_core_utils.cpp
index aea809ae8..cf022f767 100644
--- a/host/lib/usrp/cores/dsp_core_utils.cpp
+++ b/host/lib/usrp/cores/dsp_core_utils.cpp
@@ -21,8 +21,8 @@
#include <boost/math/special_functions/round.hpp>
#include <boost/math/special_functions/sign.hpp>
-static const int32_t MAX_FREQ_WORD = boost::numeric::bounds<boost::int32_t>::highest();
-static const int32_t MIN_FREQ_WORD = boost::numeric::bounds<boost::int32_t>::lowest();
+static const int32_t MAX_FREQ_WORD = boost::numeric::bounds<int32_t>::highest();
+static const int32_t MIN_FREQ_WORD = boost::numeric::bounds<int32_t>::lowest();
void get_freq_and_freq_word(
const double requested_freq,
diff --git a/host/lib/usrp/cores/gpio_atr_3000.cpp b/host/lib/usrp/cores/gpio_atr_3000.cpp
index 5844af601..6df592e1b 100644
--- a/host/lib/usrp/cores/gpio_atr_3000.cpp
+++ b/host/lib/usrp/cores/gpio_atr_3000.cpp
@@ -58,7 +58,7 @@ public:
_atr_disable_reg.initialize(*_iface, true);
}
- virtual void set_atr_mode(const gpio_atr_mode_t mode, const boost::uint32_t mask)
+ virtual void set_atr_mode(const gpio_atr_mode_t mode, const uint32_t mask)
{
//Each bit in the "ATR Disable" register determines whether the respective bit in the GPIO
//output bus is driven by the ATR engine or a static register.
@@ -70,7 +70,7 @@ public:
_atr_disable_reg.flush();
}
- virtual void set_gpio_ddr(const gpio_ddr_t dir, const boost::uint32_t mask)
+ virtual void set_gpio_ddr(const gpio_ddr_t dir, const uint32_t mask)
{
//Each bit in the "DDR" register determines whether the respective bit in the GPIO
//bus is an input or an output.
@@ -82,7 +82,7 @@ public:
_ddr_reg.flush();
}
- virtual void set_atr_reg(const gpio_atr_reg_t atr, const boost::uint32_t value, const boost::uint32_t mask = MASK_SET_ALL)
+ virtual void set_atr_reg(const gpio_atr_reg_t atr, const uint32_t value, const uint32_t mask = MASK_SET_ALL)
{
//Set the value of the specified ATR register. For bits with ATR Disable set to 1,
//the IDLE register will hold the output state
@@ -102,7 +102,7 @@ public:
reg->flush();
}
- virtual void set_gpio_out(const boost::uint32_t value, const boost::uint32_t mask = MASK_SET_ALL) {
+ virtual void set_gpio_out(const uint32_t value, const uint32_t mask = MASK_SET_ALL) {
//Set the value of the specified GPIO output register.
//This setting will only get applied to all bits in the "mask" that are 1. All other
//bits will retain their old value.
@@ -113,7 +113,7 @@ public:
_atr_idle_reg.flush();
}
- virtual boost::uint32_t read_gpio()
+ virtual uint32_t read_gpio()
{
//Read the state of the GPIO pins
//If a pin is configured as an input, reads the actual value of the pin
@@ -125,7 +125,7 @@ public:
}
}
- inline virtual void set_gpio_attr(const gpio_attr_t attr, const boost::uint32_t value)
+ inline virtual void set_gpio_attr(const gpio_attr_t attr, const uint32_t value)
{
//An attribute based API to configure all settings for the GPIO bus in one function
//call. This API does not have a mask so it configures all bits at the same time.
@@ -175,12 +175,12 @@ protected:
uhd::soft_reg32_wo_t::set(REGISTER, 0);
}
- virtual void set_with_mask(const boost::uint32_t value, const boost::uint32_t mask) {
+ virtual void set_with_mask(const uint32_t value, const uint32_t mask) {
uhd::soft_reg32_wo_t::set(REGISTER,
(value&mask)|(uhd::soft_reg32_wo_t::get(REGISTER)&(~mask)));
}
- virtual boost::uint32_t get() {
+ virtual uint32_t get() {
return uhd::soft_reg32_wo_t::get(uhd::soft_reg32_wo_t::REGISTER);
}
@@ -197,19 +197,19 @@ protected:
_atr_disable_reg(atr_disable_reg)
{ }
- virtual void set_with_mask(const boost::uint32_t value, const boost::uint32_t mask) {
+ virtual void set_with_mask(const uint32_t value, const uint32_t mask) {
_atr_idle_cache = (value&mask)|(_atr_idle_cache&(~mask));
}
- virtual boost::uint32_t get() {
+ virtual uint32_t get() {
return _atr_idle_cache;
}
- void set_gpio_out_with_mask(const boost::uint32_t value, const boost::uint32_t mask) {
+ void set_gpio_out_with_mask(const uint32_t value, const uint32_t mask) {
_gpio_out_cache = (value&mask)|(_gpio_out_cache&(~mask));
}
- virtual boost::uint32_t get_gpio_out() {
+ virtual uint32_t get_gpio_out() {
return _gpio_out_cache;
}
@@ -222,8 +222,8 @@ protected:
}
private:
- boost::uint32_t _atr_idle_cache;
- boost::uint32_t _gpio_out_cache;
+ uint32_t _atr_idle_cache;
+ uint32_t _gpio_out_cache;
masked_reg_t& _atr_disable_reg;
};
@@ -260,34 +260,34 @@ public:
db_gpio_atr_3000_impl(wb_iface::sptr iface, const wb_iface::wb_addr_type base, const wb_iface::wb_addr_type rb_addr):
gpio_atr_3000_impl(iface, base, rb_addr) { /* NOP */ }
- inline void set_pin_ctrl(const db_unit_t unit, const boost::uint32_t value, const boost::uint32_t mask)
+ inline void set_pin_ctrl(const db_unit_t unit, const uint32_t value, const uint32_t mask)
{
gpio_atr_3000_impl::set_atr_mode(MODE_ATR, compute_mask(unit, value&mask));
gpio_atr_3000_impl::set_atr_mode(MODE_GPIO, compute_mask(unit, (~value)&mask));
}
- inline boost::uint32_t get_pin_ctrl(const db_unit_t unit)
+ inline uint32_t get_pin_ctrl(const db_unit_t unit)
{
return (~_atr_disable_reg.get()) >> compute_shift(unit);
}
- inline void set_gpio_ddr(const db_unit_t unit, const boost::uint32_t value, const boost::uint32_t mask)
+ inline void set_gpio_ddr(const db_unit_t unit, const uint32_t value, const uint32_t mask)
{
gpio_atr_3000_impl::set_gpio_ddr(DDR_OUTPUT, compute_mask(unit, value&mask));
gpio_atr_3000_impl::set_gpio_ddr(DDR_INPUT, compute_mask(unit, (~value)&mask));
}
- inline boost::uint32_t get_gpio_ddr(const db_unit_t unit)
+ inline uint32_t get_gpio_ddr(const db_unit_t unit)
{
return _ddr_reg.get() >> compute_shift(unit);
}
- inline void set_atr_reg(const db_unit_t unit, const gpio_atr_reg_t atr, const boost::uint32_t value, const boost::uint32_t mask)
+ inline void set_atr_reg(const db_unit_t unit, const gpio_atr_reg_t atr, const uint32_t value, const uint32_t mask)
{
gpio_atr_3000_impl::set_atr_reg(atr, value << compute_shift(unit), compute_mask(unit, mask));
}
- inline boost::uint32_t get_atr_reg(const db_unit_t unit, const gpio_atr_reg_t atr)
+ inline uint32_t get_atr_reg(const db_unit_t unit, const gpio_atr_reg_t atr)
{
masked_reg_t* reg = NULL;
switch (atr) {
@@ -300,25 +300,25 @@ public:
return (reg->get() & compute_mask(unit, MASK_SET_ALL)) >> compute_shift(unit);
}
- inline void set_gpio_out(const db_unit_t unit, const boost::uint32_t value, const boost::uint32_t mask)
+ inline void set_gpio_out(const db_unit_t unit, const uint32_t value, const uint32_t mask)
{
gpio_atr_3000_impl::set_gpio_out(
- static_cast<boost::uint32_t>(value) << compute_shift(unit),
+ static_cast<uint32_t>(value) << compute_shift(unit),
compute_mask(unit, mask));
}
- inline boost::uint32_t get_gpio_out(const db_unit_t unit)
+ inline uint32_t get_gpio_out(const db_unit_t unit)
{
return (_atr_idle_reg.get_gpio_out() & compute_mask(unit, MASK_SET_ALL)) >> compute_shift(unit);
}
- inline boost::uint32_t read_gpio(const db_unit_t unit)
+ inline uint32_t read_gpio(const db_unit_t unit)
{
return (gpio_atr_3000_impl::read_gpio() & compute_mask(unit, MASK_SET_ALL)) >> compute_shift(unit);
}
private:
- inline boost::uint32_t compute_shift(const db_unit_t unit) {
+ inline uint32_t compute_shift(const db_unit_t unit) {
switch (unit) {
case dboard_iface::UNIT_RX: return 0;
case dboard_iface::UNIT_TX: return 16;
@@ -326,8 +326,8 @@ private:
}
}
- inline boost::uint32_t compute_mask(const db_unit_t unit, const boost::uint32_t mask) {
- boost::uint32_t tmp_mask = (unit == dboard_iface::UNIT_BOTH) ? mask : (mask & 0xFFFF);
+ inline uint32_t compute_mask(const db_unit_t unit, const uint32_t mask) {
+ uint32_t tmp_mask = (unit == dboard_iface::UNIT_BOTH) ? mask : (mask & 0xFFFF);
return tmp_mask << (compute_shift(unit));
}
};
diff --git a/host/lib/usrp/cores/gpio_atr_3000.hpp b/host/lib/usrp/cores/gpio_atr_3000.hpp
index 7b90429fe..1e7c304fa 100644
--- a/host/lib/usrp/cores/gpio_atr_3000.hpp
+++ b/host/lib/usrp/cores/gpio_atr_3000.hpp
@@ -30,7 +30,7 @@ class gpio_atr_3000 : boost::noncopyable {
public:
typedef boost::shared_ptr<gpio_atr_3000> sptr;
- static const boost::uint32_t MASK_SET_ALL = 0xFFFFFFFF;
+ static const uint32_t MASK_SET_ALL = 0xFFFFFFFF;
virtual ~gpio_atr_3000(void) {};
@@ -61,7 +61,7 @@ public:
* \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 boost::uint32_t mask) = 0;
+ 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
@@ -69,7 +69,7 @@ public:
* \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 boost::uint32_t mask) = 0;
+ virtual void set_gpio_ddr(const gpio_ddr_t dir, const uint32_t mask) = 0;
/*!
* Write the specified (masked) value to the ATR register
@@ -78,7 +78,7 @@ public:
* \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 boost::uint32_t value, const boost::uint32_t mask = MASK_SET_ALL) = 0;
+ 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
@@ -86,7 +86,7 @@ public:
* \param value the value to write
* \param mask only writes to the bits where mask is non-zero
*/
- virtual void set_gpio_out(const boost::uint32_t value, const boost::uint32_t mask = MASK_SET_ALL) = 0;
+ virtual void set_gpio_out(const uint32_t value, const uint32_t mask = MASK_SET_ALL) = 0;
/*!
* Read the state of the GPIO pins
@@ -95,7 +95,7 @@ public:
*
* \return the value read back
*/
- virtual boost::uint32_t read_gpio() = 0;
+ virtual uint32_t read_gpio() = 0;
/*!
* Set a GPIO attribute
@@ -103,7 +103,7 @@ public:
* \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 boost::uint32_t value) = 0;
+ virtual void set_gpio_attr(const gpio_attr_t attr, const uint32_t value) = 0;
};
class db_gpio_atr_3000 {
@@ -132,9 +132,9 @@ public:
* \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
*/
- virtual void set_pin_ctrl(const db_unit_t unit, const boost::uint32_t value, const boost::uint32_t mask) = 0;
+ virtual void set_pin_ctrl(const db_unit_t unit, const uint32_t value, const uint32_t mask) = 0;
- virtual boost::uint32_t get_pin_ctrl(const db_unit_t unit) = 0;
+ virtual uint32_t get_pin_ctrl(const db_unit_t unit) = 0;
/*!
* Configure the direction for all pins in the daughterboard connector
@@ -142,9 +142,9 @@ public:
* \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
*/
- virtual void set_gpio_ddr(const db_unit_t unit, const boost::uint32_t value, const boost::uint32_t mask) = 0;
+ virtual void set_gpio_ddr(const db_unit_t unit, const uint32_t value, const uint32_t mask) = 0;
- virtual boost::uint32_t get_gpio_ddr(const db_unit_t unit) = 0;
+ virtual uint32_t get_gpio_ddr(const db_unit_t unit) = 0;
/*!
* Write the specified value to the ATR register (all bits)
@@ -153,9 +153,9 @@ public:
* \param unit the side of the daughterboard interface to configure (TX or RX)
* \param value the value to write
*/
- virtual void set_atr_reg(const db_unit_t unit, const gpio_atr_reg_t atr, const boost::uint32_t value, const boost::uint32_t mask) = 0;
+ 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 boost::uint32_t get_atr_reg(const db_unit_t unit, const gpio_atr_reg_t atr) = 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)
@@ -163,9 +163,9 @@ public:
* \param atr the type of ATR register to write to {IDLE, RX, TX, FDX}
* \param value the value to write
*/
- virtual void set_gpio_out(const db_unit_t unit, const boost::uint32_t value, const boost::uint32_t mask) = 0;
+ virtual void set_gpio_out(const db_unit_t unit, const uint32_t value, const uint32_t mask) = 0;
- virtual boost::uint32_t get_gpio_out(const db_unit_t unit) = 0;
+ virtual uint32_t get_gpio_out(const db_unit_t unit) = 0;
/*!
* Read the state of the GPIO pins
@@ -175,7 +175,7 @@ public:
* \param unit the side of the daughterboard interface to configure (TX or RX)
* \return the value read back
*/
- virtual boost::uint32_t read_gpio(const db_unit_t unit) = 0;
+ virtual uint32_t read_gpio(const db_unit_t unit) = 0;
};
}}} //namespaces
diff --git a/host/lib/usrp/cores/gpio_core_200.cpp b/host/lib/usrp/cores/gpio_core_200.cpp
index 8ada95b1f..3bce8e078 100644
--- a/host/lib/usrp/cores/gpio_core_200.cpp
+++ b/host/lib/usrp/cores/gpio_core_200.cpp
@@ -41,18 +41,18 @@ public:
gpio_core_200_impl(wb_iface::sptr iface, const size_t base, const size_t rb_addr):
_iface(iface), _base(base), _rb_addr(rb_addr), _first_atr(true) { /* NOP */ }
- void set_pin_ctrl(const unit_t unit, const boost::uint16_t value, const boost::uint16_t mask){
+ void set_pin_ctrl(const unit_t unit, const uint16_t value, const uint16_t mask){
if (unit == dboard_iface::UNIT_BOTH) throw uhd::runtime_error("UNIT_BOTH not supported in gpio_core_200");
shadow_it(_pin_ctrl[unit], value, mask);
update(); //full update
}
- boost::uint16_t get_pin_ctrl(unit_t unit){
+ uint16_t get_pin_ctrl(unit_t unit){
if (unit == dboard_iface::UNIT_BOTH) throw uhd::runtime_error("UNIT_BOTH not supported in gpio_core_200");
return _pin_ctrl[unit];
}
- void set_atr_reg(const unit_t unit, const atr_reg_t atr, const boost::uint16_t value, const boost::uint16_t mask){
+ void set_atr_reg(const unit_t unit, const atr_reg_t atr, const uint16_t value, const uint16_t mask){
if (unit == dboard_iface::UNIT_BOTH) throw uhd::runtime_error("UNIT_BOTH not supported in gpio_core_200");
shadow_it(_atr_regs[unit][atr], value, mask);
if (_first_atr)
@@ -65,39 +65,39 @@ public:
update(atr);
}
- boost::uint16_t get_atr_reg(unit_t unit, atr_reg_t reg){
+ uint16_t get_atr_reg(unit_t unit, atr_reg_t reg){
if (unit == dboard_iface::UNIT_BOTH) throw uhd::runtime_error("UNIT_BOTH not supported in gpio_core_200");
return _atr_regs[unit][reg];
}
- void set_gpio_ddr(const unit_t unit, const boost::uint16_t value, const boost::uint16_t mask){
+ void set_gpio_ddr(const unit_t unit, const uint16_t value, const uint16_t mask){
if (unit == dboard_iface::UNIT_BOTH) throw uhd::runtime_error("UNIT_BOTH not supported in gpio_core_200");
shadow_it(_gpio_ddr[unit], value, mask);
_iface->poke32(REG_GPIO_DDR, //update the 32 bit register
- (boost::uint32_t(_gpio_ddr[dboard_iface::UNIT_RX]) << shift_by_unit(dboard_iface::UNIT_RX)) |
- (boost::uint32_t(_gpio_ddr[dboard_iface::UNIT_TX]) << shift_by_unit(dboard_iface::UNIT_TX))
+ (uint32_t(_gpio_ddr[dboard_iface::UNIT_RX]) << shift_by_unit(dboard_iface::UNIT_RX)) |
+ (uint32_t(_gpio_ddr[dboard_iface::UNIT_TX]) << shift_by_unit(dboard_iface::UNIT_TX))
);
}
- boost::uint16_t get_gpio_ddr(unit_t unit){
+ uint16_t get_gpio_ddr(unit_t unit){
if (unit == dboard_iface::UNIT_BOTH) throw uhd::runtime_error("UNIT_BOTH not supported in gpio_core_200");
return _gpio_ddr[unit];
}
- void set_gpio_out(const unit_t unit, const boost::uint16_t value, const boost::uint16_t mask){
+ void set_gpio_out(const unit_t unit, const uint16_t value, const uint16_t mask){
if (unit == dboard_iface::UNIT_BOTH) throw uhd::runtime_error("UNIT_BOTH not supported in gpio_core_200");
shadow_it(_gpio_out[unit], value, mask);
this->update(); //full update
}
- boost::uint16_t get_gpio_out(unit_t unit){
+ uint16_t get_gpio_out(unit_t unit){
if (unit == dboard_iface::UNIT_BOTH) throw uhd::runtime_error("UNIT_BOTH not supported in gpio_core_200");
return _gpio_out[unit];
}
- boost::uint16_t read_gpio(const unit_t unit){
+ uint16_t read_gpio(const unit_t unit){
if (unit == dboard_iface::UNIT_BOTH) throw uhd::runtime_error("UNIT_BOTH not supported in gpio_core_200");
- return boost::uint16_t(_iface->peek32(_rb_addr) >> shift_by_unit(unit));
+ return uint16_t(_iface->peek32(_rb_addr) >> shift_by_unit(unit));
}
private:
@@ -105,10 +105,10 @@ private:
const size_t _base;
const size_t _rb_addr;
bool _first_atr;
- uhd::dict<size_t, boost::uint32_t> _update_cache;
+ uhd::dict<size_t, uint32_t> _update_cache;
- uhd::dict<unit_t, boost::uint16_t> _pin_ctrl, _gpio_out, _gpio_ddr;
- uhd::dict<unit_t, uhd::dict<atr_reg_t, boost::uint16_t> > _atr_regs;
+ uhd::dict<unit_t, uint16_t> _pin_ctrl, _gpio_out, _gpio_ddr;
+ uhd::dict<unit_t, uhd::dict<atr_reg_t, uint16_t> > _atr_regs;
unsigned shift_by_unit(const unit_t unit){
return (unit == dboard_iface::UNIT_RX)? 0 : 16;
@@ -140,18 +140,18 @@ private:
default:
UHD_THROW_INVALID_CODE_PATH();
}
- const boost::uint32_t atr_val =
- (boost::uint32_t(_atr_regs[dboard_iface::UNIT_RX][atr]) << shift_by_unit(dboard_iface::UNIT_RX)) |
- (boost::uint32_t(_atr_regs[dboard_iface::UNIT_TX][atr]) << shift_by_unit(dboard_iface::UNIT_TX));
-
- const boost::uint32_t gpio_val =
- (boost::uint32_t(_gpio_out[dboard_iface::UNIT_RX]) << shift_by_unit(dboard_iface::UNIT_RX)) |
- (boost::uint32_t(_gpio_out[dboard_iface::UNIT_TX]) << shift_by_unit(dboard_iface::UNIT_TX));
-
- const boost::uint32_t ctrl =
- (boost::uint32_t(_pin_ctrl[dboard_iface::UNIT_RX]) << shift_by_unit(dboard_iface::UNIT_RX)) |
- (boost::uint32_t(_pin_ctrl[dboard_iface::UNIT_TX]) << shift_by_unit(dboard_iface::UNIT_TX));
- const boost::uint32_t val = (ctrl & atr_val) | ((~ctrl) & gpio_val);
+ const uint32_t atr_val =
+ (uint32_t(_atr_regs[dboard_iface::UNIT_RX][atr]) << shift_by_unit(dboard_iface::UNIT_RX)) |
+ (uint32_t(_atr_regs[dboard_iface::UNIT_TX][atr]) << shift_by_unit(dboard_iface::UNIT_TX));
+
+ const uint32_t gpio_val =
+ (uint32_t(_gpio_out[dboard_iface::UNIT_RX]) << shift_by_unit(dboard_iface::UNIT_RX)) |
+ (uint32_t(_gpio_out[dboard_iface::UNIT_TX]) << shift_by_unit(dboard_iface::UNIT_TX));
+
+ const uint32_t ctrl =
+ (uint32_t(_pin_ctrl[dboard_iface::UNIT_RX]) << shift_by_unit(dboard_iface::UNIT_RX)) |
+ (uint32_t(_pin_ctrl[dboard_iface::UNIT_TX]) << shift_by_unit(dboard_iface::UNIT_TX));
+ const uint32_t val = (ctrl & atr_val) | ((~ctrl) & gpio_val);
if (not _update_cache.has_key(addr) or _update_cache[addr] != val)
{
_iface->poke32(addr, val);
@@ -182,7 +182,7 @@ public:
}
- void set_atr_reg(const atr_reg_t atr, const boost::uint32_t value){
+ void set_atr_reg(const atr_reg_t atr, const uint32_t value){
if (atr == gpio_atr::ATR_REG_IDLE)
_iface->poke32(REG_GPIO_IDLE, value);
else if (atr == gpio_atr::ATR_REG_TX_ONLY)
@@ -195,7 +195,7 @@ public:
UHD_THROW_INVALID_CODE_PATH();
}
- void set_all_regs(const boost::uint32_t value){
+ void set_all_regs(const uint32_t value){
set_atr_reg(gpio_atr::ATR_REG_IDLE, value);
set_atr_reg(gpio_atr::ATR_REG_TX_ONLY, value);
set_atr_reg(gpio_atr::ATR_REG_RX_ONLY, value);
diff --git a/host/lib/usrp/cores/gpio_core_200.hpp b/host/lib/usrp/cores/gpio_core_200.hpp
index c697f0e77..95362de1b 100644
--- a/host/lib/usrp/cores/gpio_core_200.hpp
+++ b/host/lib/usrp/cores/gpio_core_200.hpp
@@ -22,7 +22,7 @@
#include <uhd/usrp/dboard_iface.hpp>
#include <uhd/usrp/gpio_defs.hpp>
#include <boost/assign.hpp>
-#include <boost/cstdint.hpp>
+#include <stdint.h>
#include <boost/utility.hpp>
#include <boost/shared_ptr.hpp>
#include <uhd/types/wb_iface.hpp>
@@ -43,27 +43,27 @@ public:
//! 1 = ATR
virtual void set_pin_ctrl(
- const unit_t unit, const boost::uint16_t value, const boost::uint16_t mask) = 0;
+ const unit_t unit, const uint16_t value, const uint16_t mask) = 0;
- virtual boost::uint16_t get_pin_ctrl(unit_t unit) = 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 boost::uint16_t value, const boost::uint16_t mask) = 0;
+ const unit_t unit, const atr_reg_t atr, const uint16_t value, const uint16_t mask) = 0;
- virtual boost::uint16_t get_atr_reg(unit_t unit, atr_reg_t reg) = 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 boost::uint16_t value, const boost::uint16_t mask) = 0;
+ const unit_t unit, const uint16_t value, const uint16_t mask) = 0;
- virtual boost::uint16_t get_gpio_ddr(unit_t unit) = 0;
+ virtual uint16_t get_gpio_ddr(unit_t unit) = 0;
virtual void set_gpio_out(
- const unit_t unit, const boost::uint16_t value, const boost::uint16_t mask) = 0;
+ const unit_t unit, const uint16_t value, const uint16_t mask) = 0;
- virtual boost::uint16_t get_gpio_out(unit_t unit) = 0;
+ virtual uint16_t get_gpio_out(unit_t unit) = 0;
- virtual boost::uint16_t read_gpio(const unit_t unit) = 0;
+ virtual uint16_t read_gpio(const unit_t unit) = 0;
};
//! Simple wrapper for 32 bit write only
@@ -79,9 +79,9 @@ public:
virtual void set_ddr_reg() = 0;
- virtual void set_atr_reg(const atr_reg_t atr, const boost::uint32_t value) = 0;
+ virtual void set_atr_reg(const atr_reg_t atr, const uint32_t value) = 0;
- virtual void set_all_regs(const boost::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.cpp b/host/lib/usrp/cores/i2c_core_100.cpp
index 796447e0c..029b6eaa7 100644
--- a/host/lib/usrp/cores/i2c_core_100.cpp
+++ b/host/lib/usrp/cores/i2c_core_100.cpp
@@ -65,16 +65,16 @@ public:
//init I2C FPGA interface.
_iface->poke16(REG_I2C_CTRL, 0x0000);
//set prescalers to operate at 400kHz: WB_CLK is 64MHz...
- static const boost::uint32_t i2c_datarate = 400000;
- static const boost::uint32_t wishbone_clk = 64000000; //FIXME should go somewhere else
- boost::uint16_t prescaler = wishbone_clk / (i2c_datarate*5) - 1;
+ static const uint32_t i2c_datarate = 400000;
+ static const uint32_t wishbone_clk = 64000000; //FIXME should go somewhere else
+ uint16_t prescaler = wishbone_clk / (i2c_datarate*5) - 1;
_iface->poke16(REG_I2C_PRESCALER_LO, prescaler & 0xFF);
_iface->poke16(REG_I2C_PRESCALER_HI, (prescaler >> 8) & 0xFF);
_iface->poke16(REG_I2C_CTRL, I2C_CTRL_EN); //enable I2C core
}
void write_i2c(
- boost::uint16_t addr,
+ uint16_t addr,
const byte_vector_t &bytes
){
_iface->poke16(REG_I2C_DATA, (addr << 1) | 0); //addr and read bit (0)
@@ -97,7 +97,7 @@ public:
}
byte_vector_t read_i2c(
- boost::uint16_t addr,
+ uint16_t addr,
size_t num_bytes
){
byte_vector_t bytes;
@@ -116,7 +116,7 @@ public:
for (size_t i = 0; i < num_bytes; i++) {
_iface->poke16(REG_I2C_CMD_STATUS, I2C_CMD_RD | ((num_bytes == i+1) ? (I2C_CMD_STOP | I2C_CMD_NACK) : 0));
i2c_wait();
- bytes.push_back(boost::uint8_t(_iface->peek16(REG_I2C_DATA)));
+ bytes.push_back(uint8_t(_iface->peek16(REG_I2C_DATA)));
}
return bytes;
}
diff --git a/host/lib/usrp/cores/i2c_core_100_wb32.cpp b/host/lib/usrp/cores/i2c_core_100_wb32.cpp
index 530267f6c..099b80447 100644
--- a/host/lib/usrp/cores/i2c_core_100_wb32.cpp
+++ b/host/lib/usrp/cores/i2c_core_100_wb32.cpp
@@ -69,14 +69,14 @@ public:
void set_clock_rate(const double rate)
{
- static const boost::uint32_t i2c_datarate = 400000;
- boost::uint16_t prescaler = boost::uint16_t(rate / (i2c_datarate*5) - 1);
+ static const uint32_t i2c_datarate = 400000;
+ uint16_t prescaler = uint16_t(rate / (i2c_datarate*5) - 1);
_iface->poke32(REG_I2C_PRESCALER_LO, prescaler & 0xFF);
_iface->poke32(REG_I2C_PRESCALER_HI, (prescaler >> 8) & 0xFF);
}
void write_i2c(
- boost::uint16_t addr,
+ uint16_t addr,
const byte_vector_t &bytes
){
_iface->poke32(REG_I2C_DATA, (addr << 1) | 0); //addr and read bit (0)
@@ -99,7 +99,7 @@ public:
}
byte_vector_t read_i2c(
- boost::uint16_t addr,
+ uint16_t addr,
size_t num_bytes
){
byte_vector_t bytes;
@@ -118,16 +118,16 @@ public:
for (size_t i = 0; i < num_bytes; i++) {
_iface->poke32(REG_I2C_CMD_STATUS, I2C_CMD_RD | ((num_bytes == i+1) ? (I2C_CMD_STOP | I2C_CMD_NACK) : 0));
i2c_wait();
- bytes.push_back(boost::uint8_t(_iface->peek32(REG_I2C_DATA)));
+ bytes.push_back(uint8_t(_iface->peek32(REG_I2C_DATA)));
}
return bytes;
}
//override read_eeprom so we can write once, read all N bytes
//the default implementation calls read i2c once per byte
- byte_vector_t read_eeprom(boost::uint16_t addr, boost::uint16_t offset, size_t num_bytes)
+ byte_vector_t read_eeprom(uint16_t addr, uint16_t offset, size_t num_bytes)
{
- this->write_i2c(addr, byte_vector_t(1, boost::uint8_t(offset)));
+ this->write_i2c(addr, byte_vector_t(1, uint8_t(offset)));
return this->read_i2c(addr, num_bytes);
}
diff --git a/host/lib/usrp/cores/i2c_core_200.cpp b/host/lib/usrp/cores/i2c_core_200.cpp
index 2f0f6f815..eae91253c 100644
--- a/host/lib/usrp/cores/i2c_core_200.cpp
+++ b/host/lib/usrp/cores/i2c_core_200.cpp
@@ -68,16 +68,16 @@ public:
//init I2C FPGA interface.
this->poke(REG_I2C_WR_CTRL, 0x0000);
//set prescalers to operate at 400kHz: WB_CLK is 64MHz...
- static const boost::uint32_t i2c_datarate = 400000;
- static const boost::uint32_t wishbone_clk = 64000000; //FIXME should go somewhere else
- boost::uint16_t prescaler = wishbone_clk / (i2c_datarate*5) - 1;
+ static const uint32_t i2c_datarate = 400000;
+ static const uint32_t wishbone_clk = 64000000; //FIXME should go somewhere else
+ uint16_t prescaler = wishbone_clk / (i2c_datarate*5) - 1;
this->poke(REG_I2C_WR_PRESCALER_LO, prescaler & 0xFF);
this->poke(REG_I2C_WR_PRESCALER_HI, (prescaler >> 8) & 0xFF);
this->poke(REG_I2C_WR_CTRL, I2C_CTRL_EN); //enable I2C core
}
void write_i2c(
- boost::uint16_t addr,
+ uint16_t addr,
const byte_vector_t &bytes
){
this->poke(REG_I2C_WR_DATA, (addr << 1) | 0); //addr and read bit (0)
@@ -100,7 +100,7 @@ public:
}
byte_vector_t read_i2c(
- boost::uint16_t addr,
+ uint16_t addr,
size_t num_bytes
){
byte_vector_t bytes;
@@ -138,17 +138,17 @@ private:
return (this->peek(REG_I2C_RD_ST) & I2C_ST_RXACK) == 0;
}
- void poke(const size_t what, const boost::uint8_t cmd)
+ void poke(const size_t what, const uint8_t cmd)
{
boost::mutex::scoped_lock lock(_mutex);
_iface->poke32(_base, (what << 8) | cmd);
}
- boost::uint8_t peek(const size_t what)
+ uint8_t peek(const size_t what)
{
boost::mutex::scoped_lock lock(_mutex);
_iface->poke32(_base, what << 8);
- return boost::uint8_t(_iface->peek32(_readback));
+ return uint8_t(_iface->peek32(_readback));
}
wb_iface::sptr _iface;
diff --git a/host/lib/usrp/cores/radio_ctrl_core_3000.cpp b/host/lib/usrp/cores/radio_ctrl_core_3000.cpp
index 47cfaf3ca..2e405d735 100644
--- a/host/lib/usrp/cores/radio_ctrl_core_3000.cpp
+++ b/host/lib/usrp/cores/radio_ctrl_core_3000.cpp
@@ -48,7 +48,7 @@ public:
radio_ctrl_core_3000_impl(const bool big_endian,
uhd::transport::zero_copy_if::sptr ctrl_xport,
uhd::transport::zero_copy_if::sptr resp_xport,
- const boost::uint32_t sid, const std::string &name) :
+ const uint32_t sid, const std::string &name) :
_link_type(vrt::if_packet_info_t::LINK_TYPE_CHDR), _packet_type(
vrt::if_packet_info_t::PACKET_TYPE_CONTEXT), _bige(
big_endian), _ctrl_xport(ctrl_xport), _resp_xport(
@@ -76,24 +76,24 @@ public:
/*******************************************************************
* Peek and poke 32 bit implementation
******************************************************************/
- void poke32(const wb_addr_type addr, const boost::uint32_t data)
+ void poke32(const wb_addr_type addr, const uint32_t data)
{
boost::mutex::scoped_lock lock(_mutex);
this->send_pkt(addr/4, data);
this->wait_for_ack(false);
}
- boost::uint32_t peek32(const wb_addr_type addr)
+ uint32_t peek32(const wb_addr_type addr)
{
boost::mutex::scoped_lock lock(_mutex);
this->send_pkt(SR_READBACK, addr/8);
- const boost::uint64_t res = this->wait_for_ack(true);
- const boost::uint32_t lo = boost::uint32_t(res & 0xffffffff);
- const boost::uint32_t hi = boost::uint32_t(res >> 32);
+ const uint64_t res = this->wait_for_ack(true);
+ const uint32_t lo = uint32_t(res & 0xffffffff);
+ const uint32_t hi = uint32_t(res >> 32);
return ((addr/4) & 0x1)? hi : lo;
}
- boost::uint64_t peek64(const wb_addr_type addr)
+ uint64_t peek64(const wb_addr_type addr)
{
boost::mutex::scoped_lock lock(_mutex);
this->send_pkt(SR_READBACK, addr/8);
@@ -127,26 +127,26 @@ private:
// This is the buffer type for messages in radio control core.
struct resp_buff_type
{
- boost::uint32_t data[8];
+ uint32_t data[8];
};
/*******************************************************************
* Primary control and interaction private methods
******************************************************************/
- UHD_INLINE void send_pkt(const boost::uint32_t addr, const boost::uint32_t data = 0)
+ UHD_INLINE void send_pkt(const uint32_t addr, const uint32_t data = 0)
{
managed_send_buffer::sptr buff = _ctrl_xport->get_send_buff(0.0);
if (not buff) {
throw uhd::runtime_error("fifo ctrl timed out getting a send buffer");
}
- boost::uint32_t *pkt = buff->cast<boost::uint32_t *>();
+ uint32_t *pkt = buff->cast<uint32_t *>();
//load packet info
vrt::if_packet_info_t packet_info;
packet_info.link_type = _link_type;
packet_info.packet_type = _packet_type;
packet_info.num_payload_words32 = 2;
- packet_info.num_payload_bytes = packet_info.num_payload_words32*sizeof(boost::uint32_t);
+ packet_info.num_payload_bytes = packet_info.num_payload_words32*sizeof(uint32_t);
packet_info.packet_count = _seq_out;
packet_info.tsf = _time.to_ticks(_tick_rate);
packet_info.sob = false;
@@ -168,12 +168,12 @@ private:
//UHD_MSG(status) << boost::format("0x%08x, 0x%08x\n") % addr % data;
//send the buffer over the interface
_outstanding_seqs.push(_seq_out);
- buff->commit(sizeof(boost::uint32_t)*(packet_info.num_packet_words32));
+ buff->commit(sizeof(uint32_t)*(packet_info.num_packet_words32));
_seq_out++;//inc seq for next call
}
- UHD_INLINE boost::uint64_t wait_for_ack(const bool readback)
+ UHD_INLINE uint64_t wait_for_ack(const bool readback)
{
while (readback or (_outstanding_seqs.size() >= _resp_queue_size))
{
@@ -186,7 +186,7 @@ private:
vrt::if_packet_info_t packet_info;
resp_buff_type resp_buff;
memset(&resp_buff, 0x00, sizeof(resp_buff));
- boost::uint32_t const *pkt = NULL;
+ uint32_t const *pkt = NULL;
managed_recv_buffer::sptr buff;
//get buffer from response endpoint - or die in timeout
@@ -202,8 +202,8 @@ private:
{
throw uhd::io_error(str(boost::format("Radio ctrl (%s) no response packet - %s") % _name % ex.what()));
}
- pkt = buff->cast<const boost::uint32_t *>();
- packet_info.num_packet_words32 = buff->size()/sizeof(boost::uint32_t);
+ pkt = buff->cast<const uint32_t *>();
+ packet_info.num_packet_words32 = buff->size()/sizeof(uint32_t);
}
//get buffer from response endpoint - or die in timeout
@@ -231,7 +231,7 @@ private:
}
pkt = resp_buff.data;
- packet_info.num_packet_words32 = sizeof(resp_buff)/sizeof(boost::uint32_t);
+ packet_info.num_packet_words32 = sizeof(resp_buff)/sizeof(uint32_t);
}
//parse the buffer
@@ -260,7 +260,7 @@ private:
try
{
UHD_ASSERT_THROW(packet_info.has_sid);
- UHD_ASSERT_THROW(packet_info.sid == boost::uint32_t((_sid >> 16) | (_sid << 16)));
+ UHD_ASSERT_THROW(packet_info.sid == uint32_t((_sid >> 16) | (_sid << 16)));
UHD_ASSERT_THROW(packet_info.packet_count == (seq_to_ack & 0xfff));
UHD_ASSERT_THROW(packet_info.num_payload_words32 == 2);
UHD_ASSERT_THROW(packet_info.packet_type == _packet_type);
@@ -273,8 +273,8 @@ private:
//return the readback value
if (readback and _outstanding_seqs.empty())
{
- const boost::uint64_t hi = (_bige)? uhd::ntohx(pkt[packet_info.num_header_words32+0]) : uhd::wtohx(pkt[packet_info.num_header_words32+0]);
- const boost::uint64_t lo = (_bige)? uhd::ntohx(pkt[packet_info.num_header_words32+1]) : uhd::wtohx(pkt[packet_info.num_header_words32+1]);
+ const uint64_t hi = (_bige)? uhd::ntohx(pkt[packet_info.num_header_words32+0]) : uhd::wtohx(pkt[packet_info.num_header_words32+0]);
+ const uint64_t lo = (_bige)? uhd::ntohx(pkt[packet_info.num_header_words32+1]) : uhd::wtohx(pkt[packet_info.num_header_words32+1]);
return ((hi << 32) | lo);
}
}
@@ -292,7 +292,7 @@ private:
*/
bool check_dump_queue(resp_buff_type& b) {
const size_t min_buff_size = 8; // Same value as in b200_io_impl->handle_async_task
- boost::uint32_t recv_sid = (((_sid)<<16)|((_sid)>>16));
+ uint32_t recv_sid = (((_sid)<<16)|((_sid)>>16));
uhd::msg_task::msg_payload_t msg;
do{
msg = _async_task->get_msg_from_dump_queue(recv_sid);
@@ -306,7 +306,7 @@ private:
return false;
}
- void push_response(const boost::uint32_t *buff)
+ void push_response(const uint32_t *buff)
{
resp_buff_type resp_buff;
std::memcpy(resp_buff.data, buff, sizeof(resp_buff));
@@ -324,7 +324,7 @@ private:
const uhd::transport::zero_copy_if::sptr _ctrl_xport;
const uhd::transport::zero_copy_if::sptr _resp_xport;
uhd::msg_task::sptr _async_task;
- const boost::uint32_t _sid;
+ const uint32_t _sid;
const std::string _name;
boost::mutex _mutex;
size_t _seq_out;
@@ -339,7 +339,7 @@ private:
radio_ctrl_core_3000::sptr radio_ctrl_core_3000::make(const bool big_endian,
zero_copy_if::sptr ctrl_xport, zero_copy_if::sptr resp_xport,
- const boost::uint32_t sid, const std::string &name)
+ const uint32_t sid, const std::string &name)
{
return sptr(
new radio_ctrl_core_3000_impl(big_endian, ctrl_xport, resp_xport,
diff --git a/host/lib/usrp/cores/radio_ctrl_core_3000.hpp b/host/lib/usrp/cores/radio_ctrl_core_3000.hpp
index c1cc1d372..3685ac1a1 100644
--- a/host/lib/usrp/cores/radio_ctrl_core_3000.hpp
+++ b/host/lib/usrp/cores/radio_ctrl_core_3000.hpp
@@ -41,7 +41,7 @@ public:
const bool big_endian,
uhd::transport::zero_copy_if::sptr ctrl_xport,
uhd::transport::zero_copy_if::sptr resp_xport,
- const boost::uint32_t sid,
+ const uint32_t sid,
const std::string &name = "0"
);
@@ -49,7 +49,7 @@ public:
virtual void hold_task(uhd::msg_task::sptr task) = 0;
//! Push a response externall (resp_xport is NULL)
- virtual void push_response(const boost::uint32_t *buff) = 0;
+ 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;
diff --git a/host/lib/usrp/cores/rx_dsp_core_200.cpp b/host/lib/usrp/cores/rx_dsp_core_200.cpp
index e51862d3b..e781cfc6d 100644
--- a/host/lib/usrp/cores/rx_dsp_core_200.cpp
+++ b/host/lib/usrp/cores/rx_dsp_core_200.cpp
@@ -62,7 +62,7 @@ public:
rx_dsp_core_200_impl(
wb_iface::sptr iface,
const size_t dsp_base, const size_t ctrl_base,
- const boost::uint32_t sid, const bool lingering_packet
+ const uint32_t sid, const bool lingering_packet
):
_iface(iface), _dsp_base(dsp_base), _ctrl_base(ctrl_base), _sid(sid)
{
@@ -128,22 +128,22 @@ public:
boost::tie(inst_reload, inst_chain, inst_samps, inst_stop) = mode_to_inst[stream_cmd.stream_mode];
//calculate the word from flags and length
- boost::uint32_t cmd_word = 0;
- cmd_word |= boost::uint32_t((stream_cmd.stream_now)? 1 : 0) << 31;
- cmd_word |= boost::uint32_t((inst_chain)? 1 : 0) << 30;
- cmd_word |= boost::uint32_t((inst_reload)? 1 : 0) << 29;
- cmd_word |= boost::uint32_t((inst_stop)? 1 : 0) << 28;
+ uint32_t cmd_word = 0;
+ cmd_word |= uint32_t((stream_cmd.stream_now)? 1 : 0) << 31;
+ cmd_word |= uint32_t((inst_chain)? 1 : 0) << 30;
+ cmd_word |= uint32_t((inst_reload)? 1 : 0) << 29;
+ cmd_word |= uint32_t((inst_stop)? 1 : 0) << 28;
cmd_word |= (inst_samps)? stream_cmd.num_samps : ((inst_stop)? 0 : 1);
//issue the stream command
_iface->poke32(REG_RX_CTRL_STREAM_CMD, cmd_word);
- const boost::uint64_t ticks = (stream_cmd.stream_now)? 0 : stream_cmd.time_spec.to_ticks(_tick_rate);
- _iface->poke32(REG_RX_CTRL_TIME_HI, boost::uint32_t(ticks >> 32));
- _iface->poke32(REG_RX_CTRL_TIME_LO, boost::uint32_t(ticks >> 0)); //latches the command
+ const uint64_t ticks = (stream_cmd.stream_now)? 0 : stream_cmd.time_spec.to_ticks(_tick_rate);
+ _iface->poke32(REG_RX_CTRL_TIME_HI, uint32_t(ticks >> 32));
+ _iface->poke32(REG_RX_CTRL_TIME_LO, uint32_t(ticks >> 0)); //latches the command
}
void set_mux(const std::string &mode, const bool fe_swapped){
- static const uhd::dict<std::string, boost::uint32_t> mode_to_mux = boost::assign::map_list_of
+ static const uhd::dict<std::string, uint32_t> mode_to_mux = boost::assign::map_list_of
("IQ", 0)
("QI", FLAG_DSP_RX_MUX_SWAP_IQ)
("I", FLAG_DSP_RX_MUX_REAL_MODE)
@@ -157,8 +157,8 @@ public:
}
void set_link_rate(const double rate){
- //_link_rate = rate/sizeof(boost::uint32_t); //in samps/s
- _link_rate = rate/sizeof(boost::uint16_t); //in samps/s (allows for 8sc)
+ //_link_rate = rate/sizeof(uint32_t); //in samps/s
+ _link_rate = rate/sizeof(uint16_t); //in samps/s (allows for 8sc)
}
uhd::meta_range_t get_host_rates(void){
@@ -214,7 +214,7 @@ public:
void update_scalar(void){
const double factor = 1.0 + std::max(ceil_log2(_scaling_adjustment), 0.0);
const double target_scalar = (1 << 17)*_scaling_adjustment/_dsp_extra_scaling/factor;
- const boost::int32_t actual_scalar = boost::math::iround(target_scalar);
+ const int32_t actual_scalar = boost::math::iround(target_scalar);
_fxpt_scalar_correction = target_scalar/actual_scalar*factor; //should be small
_iface->poke32(REG_DSP_RX_SCALE_IQ, actual_scalar);
}
@@ -227,7 +227,7 @@ public:
double actual_freq;
int32_t freq_word;
get_freq_and_freq_word(requested_freq, _tick_rate, actual_freq, freq_word);
- _iface->poke32(REG_DSP_RX_FREQ, boost::uint32_t(freq_word));
+ _iface->poke32(REG_DSP_RX_FREQ, uint32_t(freq_word));
return actual_freq;
}
@@ -271,9 +271,9 @@ private:
double _tick_rate, _link_rate;
bool _continuous_streaming;
double _scaling_adjustment, _dsp_extra_scaling, _host_extra_scaling, _fxpt_scalar_correction;
- const boost::uint32_t _sid;
+ const uint32_t _sid;
};
-rx_dsp_core_200::sptr rx_dsp_core_200::make(wb_iface::sptr iface, const size_t dsp_base, const size_t ctrl_base, const boost::uint32_t sid, const bool lingering_packet){
+rx_dsp_core_200::sptr rx_dsp_core_200::make(wb_iface::sptr iface, const size_t dsp_base, const size_t ctrl_base, const uint32_t sid, const bool lingering_packet){
return sptr(new rx_dsp_core_200_impl(iface, dsp_base, ctrl_base, sid, lingering_packet));
}
diff --git a/host/lib/usrp/cores/rx_dsp_core_200.hpp b/host/lib/usrp/cores/rx_dsp_core_200.hpp
index 1dc51fa24..a565ffebd 100644
--- a/host/lib/usrp/cores/rx_dsp_core_200.hpp
+++ b/host/lib/usrp/cores/rx_dsp_core_200.hpp
@@ -36,7 +36,7 @@ public:
static sptr make(
uhd::wb_iface::sptr iface,
const size_t dsp_base, const size_t ctrl_base,
- const boost::uint32_t sid, const bool lingering_packet = false
+ const uint32_t sid, const bool lingering_packet = false
);
virtual void clear(void) = 0;
diff --git a/host/lib/usrp/cores/rx_dsp_core_3000.cpp b/host/lib/usrp/cores/rx_dsp_core_3000.cpp
index eedbbef95..fdd73a7ac 100644
--- a/host/lib/usrp/cores/rx_dsp_core_3000.cpp
+++ b/host/lib/usrp/cores/rx_dsp_core_3000.cpp
@@ -81,7 +81,7 @@ public:
}
void set_mux(const uhd::usrp::fe_connection_t& fe_conn){
- boost::uint32_t reg_val = 0;
+ uint32_t reg_val = 0;
switch (fe_conn.get_sampling_mode()) {
case uhd::usrp::fe_connection_t::REAL:
case uhd::usrp::fe_connection_t::HETERODYNE:
@@ -122,8 +122,8 @@ public:
}
void set_link_rate(const double rate){
- //_link_rate = rate/sizeof(boost::uint32_t); //in samps/s
- _link_rate = rate/sizeof(boost::uint16_t); //in samps/s (allows for 8sc)
+ //_link_rate = rate/sizeof(uint32_t); //in samps/s
+ _link_rate = rate/sizeof(uint16_t); //in samps/s (allows for 8sc)
}
uhd::meta_range_t get_host_rates(void){
@@ -223,7 +223,7 @@ public:
// Further more factor in OTW format which adds further gain factor to weight output samples correctly.
void update_scalar(void){
const double target_scalar = (1 << (_is_b200 ? 16 : 15))*_scaling_adjustment/_dsp_extra_scaling;
- const boost::int32_t actual_scalar = boost::math::iround(target_scalar);
+ const int32_t actual_scalar = boost::math::iround(target_scalar);
// Calculate the error introduced by using integer representation for the scalar, can be corrected in host later.
_fxpt_scalar_correction = target_scalar/actual_scalar;
// Write DDC with scaling correction for CIC and CORDIC that maximizes dynamic range in 32/16/12/8bits.
@@ -238,7 +238,7 @@ public:
double actual_freq;
int32_t freq_word;
get_freq_and_freq_word(requested_freq + _dsp_freq_offset, _tick_rate, actual_freq, freq_word);
- _iface->poke32(REG_DSP_RX_FREQ, boost::uint32_t(freq_word));
+ _iface->poke32(REG_DSP_RX_FREQ, uint32_t(freq_word));
return actual_freq;
}
diff --git a/host/lib/usrp/cores/rx_frontend_core_200.cpp b/host/lib/usrp/cores/rx_frontend_core_200.cpp
index 0a60bf87c..1ecc3e420 100644
--- a/host/lib/usrp/cores/rx_frontend_core_200.cpp
+++ b/host/lib/usrp/cores/rx_frontend_core_200.cpp
@@ -31,8 +31,8 @@ using namespace uhd;
#define OFFSET_SET (1ul << 30)
#define FLAG_MASK (OFFSET_FIXED | OFFSET_SET)
-static boost::uint32_t fs_to_bits(const double num, const size_t bits){
- return boost::int32_t(boost::math::round(num * (1 << (bits-1))));
+static uint32_t fs_to_bits(const double num, const size_t bits){
+ return int32_t(boost::math::round(num * (1 << (bits-1))));
}
rx_frontend_core_200::~rx_frontend_core_200(void){
@@ -69,7 +69,7 @@ public:
return std::complex<double>(_i_dc_off/scaler, _q_dc_off/scaler);
}
- void set_dc_offset(const boost::uint32_t flags){
+ void set_dc_offset(const uint32_t flags){
_iface->poke32(REG_RX_FE_OFFSET_I, flags | (_i_dc_off & ~FLAG_MASK));
_iface->poke32(REG_RX_FE_OFFSET_Q, flags | (_q_dc_off & ~FLAG_MASK));
}
@@ -96,7 +96,7 @@ public:
}
private:
- boost::int32_t _i_dc_off, _q_dc_off;
+ int32_t _i_dc_off, _q_dc_off;
wb_iface::sptr _iface;
const size_t _base;
};
diff --git a/host/lib/usrp/cores/rx_frontend_core_3000.cpp b/host/lib/usrp/cores/rx_frontend_core_3000.cpp
index 23197cf5a..1c4674a8a 100644
--- a/host/lib/usrp/cores/rx_frontend_core_3000.cpp
+++ b/host/lib/usrp/cores/rx_frontend_core_3000.cpp
@@ -46,8 +46,8 @@ using namespace uhd;
using namespace uhd::usrp;
-static boost::uint32_t fs_to_bits(const double num, const size_t bits){
- return boost::int32_t(boost::math::round(num * (1 << (bits-1))));
+static uint32_t fs_to_bits(const double num, const size_t bits){
+ return int32_t(boost::math::round(num * (1 << (bits-1))));
}
rx_frontend_core_3000::~rx_frontend_core_3000(void){
@@ -82,7 +82,7 @@ public:
}
void set_fe_connection(const fe_connection_t& fe_conn) {
- boost::uint32_t mapping_reg_val = 0;
+ uint32_t mapping_reg_val = 0;
switch (fe_conn.get_sampling_mode()) {
case fe_connection_t::REAL:
case fe_connection_t::HETERODYNE:
@@ -118,7 +118,7 @@ public:
}
int32_t freq_word;
get_freq_and_freq_word(cordic_freq, _adc_rate, actual_cordic_freq, freq_word);
- _iface->poke32(REG_RX_FE_HET_CORDIC_PHASE, boost::uint32_t(freq_word));
+ _iface->poke32(REG_RX_FE_HET_CORDIC_PHASE, uint32_t(freq_word));
_fe_conn = fe_conn;
}
@@ -137,7 +137,7 @@ public:
return std::complex<double>(_i_dc_off/scaler, _q_dc_off/scaler);
}
- void _set_dc_offset(const boost::uint32_t flags) {
+ void _set_dc_offset(const uint32_t flags) {
_iface->poke32(REG_RX_FE_OFFSET_I, flags | (_i_dc_off & ~FLAG_MASK));
_iface->poke32(REG_RX_FE_OFFSET_Q, flags | (_q_dc_off & ~FLAG_MASK));
}
@@ -174,7 +174,7 @@ public:
}
private:
- boost::int32_t _i_dc_off, _q_dc_off;
+ int32_t _i_dc_off, _q_dc_off;
double _adc_rate;
fe_connection_t _fe_conn;
wb_iface::sptr _iface;
diff --git a/host/lib/usrp/cores/rx_vita_core_3000.cpp b/host/lib/usrp/cores/rx_vita_core_3000.cpp
index 54c57c2d5..57868ff54 100644
--- a/host/lib/usrp/cores/rx_vita_core_3000.cpp
+++ b/host/lib/usrp/cores/rx_vita_core_3000.cpp
@@ -117,18 +117,18 @@ struct rx_vita_core_3000_impl : rx_vita_core_3000
boost::tie(inst_reload, inst_chain, inst_samps, inst_stop) = mode_to_inst[stream_cmd.stream_mode];
//calculate the word from flags and length
- boost::uint32_t cmd_word = 0;
- cmd_word |= boost::uint32_t((stream_cmd.stream_now)? 1 : 0) << 31;
- cmd_word |= boost::uint32_t((inst_chain)? 1 : 0) << 30;
- cmd_word |= boost::uint32_t((inst_reload)? 1 : 0) << 29;
- cmd_word |= boost::uint32_t((inst_stop)? 1 : 0) << 28;
+ uint32_t cmd_word = 0;
+ cmd_word |= uint32_t((stream_cmd.stream_now)? 1 : 0) << 31;
+ cmd_word |= uint32_t((inst_chain)? 1 : 0) << 30;
+ cmd_word |= uint32_t((inst_reload)? 1 : 0) << 29;
+ cmd_word |= uint32_t((inst_stop)? 1 : 0) << 28;
cmd_word |= (inst_samps)? stream_cmd.num_samps : ((inst_stop)? 0 : 1);
//issue the stream command
_iface->poke32(REG_CTRL_CMD, cmd_word);
- const boost::uint64_t ticks = (stream_cmd.stream_now)? 0 : stream_cmd.time_spec.to_ticks(_tick_rate);
- _iface->poke32(REG_CTRL_TIME_HI, boost::uint32_t(ticks >> 32));
- _iface->poke32(REG_CTRL_TIME_LO, boost::uint32_t(ticks >> 0)); //latches the command
+ const uint64_t ticks = (stream_cmd.stream_now)? 0 : stream_cmd.time_spec.to_ticks(_tick_rate);
+ _iface->poke32(REG_CTRL_TIME_HI, uint32_t(ticks >> 32));
+ _iface->poke32(REG_CTRL_TIME_LO, uint32_t(ticks >> 0)); //latches the command
}
void set_tick_rate(const double rate)
@@ -136,7 +136,7 @@ struct rx_vita_core_3000_impl : rx_vita_core_3000
_tick_rate = rate;
}
- void set_sid(const boost::uint32_t sid)
+ void set_sid(const uint32_t sid)
{
_iface->poke32(REG_FRAMER_SID, sid);
}
diff --git a/host/lib/usrp/cores/rx_vita_core_3000.hpp b/host/lib/usrp/cores/rx_vita_core_3000.hpp
index cd718a190..94e901bf4 100644
--- a/host/lib/usrp/cores/rx_vita_core_3000.hpp
+++ b/host/lib/usrp/cores/rx_vita_core_3000.hpp
@@ -47,7 +47,7 @@ public:
virtual void set_tick_rate(const double rate) = 0;
- virtual void set_sid(const boost::uint32_t sid) = 0;
+ virtual void set_sid(const uint32_t sid) = 0;
virtual void handle_overflow(void) = 0;
diff --git a/host/lib/usrp/cores/spi_core_100.cpp b/host/lib/usrp/cores/spi_core_100.cpp
index 71d92bcb6..22b163b14 100644
--- a/host/lib/usrp/cores/spi_core_100.cpp
+++ b/host/lib/usrp/cores/spi_core_100.cpp
@@ -48,10 +48,10 @@ public:
spi_core_100_impl(wb_iface::sptr iface, const size_t base):
_iface(iface), _base(base) { /* NOP */}
- boost::uint32_t transact_spi(
+ uint32_t transact_spi(
int which_slave,
const spi_config_t &config,
- boost::uint32_t data,
+ uint32_t data,
size_t num_bits,
bool readback
){
@@ -60,7 +60,7 @@ public:
int edge_flags = ((config.miso_edge==spi_config_t::EDGE_FALL) ? SPI_CTRL_RXNEG : 0) |
((config.mosi_edge==spi_config_t::EDGE_FALL) ? 0 : SPI_CTRL_TXNEG)
;
- boost::uint16_t ctrl = SPI_CTRL_ASS | (SPI_CTRL_CHAR_LEN_MASK & num_bits) | edge_flags;
+ uint16_t ctrl = SPI_CTRL_ASS | (SPI_CTRL_CHAR_LEN_MASK & num_bits) | edge_flags;
spi_wait();
_iface->poke16(REG_SPI_DIV, 0x0001); // = fpga_clk / 4
diff --git a/host/lib/usrp/cores/spi_core_3000.cpp b/host/lib/usrp/cores/spi_core_3000.cpp
index 01df71cec..78b0af1a3 100644
--- a/host/lib/usrp/cores/spi_core_3000.cpp
+++ b/host/lib/usrp/cores/spi_core_3000.cpp
@@ -40,10 +40,10 @@ public:
this->set_divider(30);
}
- boost::uint32_t transact_spi(
+ uint32_t transact_spi(
int which_slave,
const spi_config_t &config,
- boost::uint32_t data,
+ uint32_t data,
size_t num_bits,
bool readback
){
@@ -64,7 +64,7 @@ public:
}
//load control word
- boost::uint32_t ctrl_word = 0;
+ uint32_t ctrl_word = 0;
ctrl_word |= ((which_slave & 0xffffff) << 0);
ctrl_word |= ((num_bits & 0x3f) << 24);
if (config.mosi_edge == spi_config_t::EDGE_FALL) ctrl_word |= (1 << 31);
@@ -78,7 +78,7 @@ public:
}
//load data word (must be in upper bits)
- const boost::uint32_t data_out = data << (32 - num_bits);
+ const uint32_t data_out = data << (32 - num_bits);
//send data word
_iface->poke32(SPI_DATA, data_out);
@@ -113,7 +113,7 @@ private:
wb_iface::sptr _iface;
const size_t _base;
const size_t _readback;
- boost::uint32_t _ctrl_word_cache;
+ uint32_t _ctrl_word_cache;
bool _shutdown_cache;
boost::mutex _mutex;
size_t _div;
diff --git a/host/lib/usrp/cores/time64_core_200.cpp b/host/lib/usrp/cores/time64_core_200.cpp
index 54b60b6ad..b0138400d 100644
--- a/host/lib/usrp/cores/time64_core_200.cpp
+++ b/host/lib/usrp/cores/time64_core_200.cpp
@@ -71,10 +71,10 @@ public:
uhd::time_spec_t get_time_now(void){
for (size_t i = 0; i < 3; i++){ //special algorithm because we cant read 64 bits synchronously
- const boost::uint32_t ticks_hi = _iface->peek32(_readback_bases.rb_hi_now);
- const boost::uint32_t ticks_lo = _iface->peek32(_readback_bases.rb_lo_now);
+ const uint32_t ticks_hi = _iface->peek32(_readback_bases.rb_hi_now);
+ const uint32_t ticks_lo = _iface->peek32(_readback_bases.rb_lo_now);
if (ticks_hi != _iface->peek32(_readback_bases.rb_hi_now)) continue;
- const boost::uint64_t ticks = (boost::uint64_t(ticks_hi) << 32) | ticks_lo;
+ const uint64_t ticks = (uint64_t(ticks_hi) << 32) | ticks_lo;
return time_spec_t::from_ticks(ticks, _tick_rate);
}
throw uhd::runtime_error("time64_core_200: get time now timeout");
@@ -82,27 +82,27 @@ public:
uhd::time_spec_t get_time_last_pps(void){
for (size_t i = 0; i < 3; i++){ //special algorithm because we cant read 64 bits synchronously
- const boost::uint32_t ticks_hi = _iface->peek32(_readback_bases.rb_hi_pps);
- const boost::uint32_t ticks_lo = _iface->peek32(_readback_bases.rb_lo_pps);
+ const uint32_t ticks_hi = _iface->peek32(_readback_bases.rb_hi_pps);
+ const uint32_t ticks_lo = _iface->peek32(_readback_bases.rb_lo_pps);
if (ticks_hi != _iface->peek32(_readback_bases.rb_hi_pps)) continue;
- const boost::uint64_t ticks = (boost::uint64_t(ticks_hi) << 32) | ticks_lo;
+ const uint64_t ticks = (uint64_t(ticks_hi) << 32) | ticks_lo;
return time_spec_t::from_ticks(ticks, _tick_rate);
}
throw uhd::runtime_error("time64_core_200: get time last pps timeout");
}
void set_time_now(const uhd::time_spec_t &time){
- const boost::uint64_t ticks = time.to_ticks(_tick_rate);
- _iface->poke32(REG_TIME64_TICKS_LO, boost::uint32_t(ticks >> 0));
+ const uint64_t ticks = time.to_ticks(_tick_rate);
+ _iface->poke32(REG_TIME64_TICKS_LO, uint32_t(ticks >> 0));
_iface->poke32(REG_TIME64_IMM, FLAG_TIME64_LATCH_NOW);
- _iface->poke32(REG_TIME64_TICKS_HI, boost::uint32_t(ticks >> 32)); //latches all 3
+ _iface->poke32(REG_TIME64_TICKS_HI, uint32_t(ticks >> 32)); //latches all 3
}
void set_time_next_pps(const uhd::time_spec_t &time){
- const boost::uint64_t ticks = time.to_ticks(_tick_rate);
- _iface->poke32(REG_TIME64_TICKS_LO, boost::uint32_t(ticks >> 0));
+ const uint64_t ticks = time.to_ticks(_tick_rate);
+ _iface->poke32(REG_TIME64_TICKS_LO, uint32_t(ticks >> 0));
_iface->poke32(REG_TIME64_IMM, FLAG_TIME64_LATCH_NEXT_PPS);
- _iface->poke32(REG_TIME64_TICKS_HI, boost::uint32_t(ticks >> 32)); //latches all 3
+ _iface->poke32(REG_TIME64_TICKS_HI, uint32_t(ticks >> 32)); //latches all 3
}
void set_time_source(const std::string &source){
diff --git a/host/lib/usrp/cores/time_core_3000.cpp b/host/lib/usrp/cores/time_core_3000.cpp
index 45b1750d2..25142b9fe 100644
--- a/host/lib/usrp/cores/time_core_3000.cpp
+++ b/host/lib/usrp/cores/time_core_3000.cpp
@@ -82,37 +82,37 @@ struct time_core_3000_impl : time_core_3000
uhd::time_spec_t get_time_now(void)
{
- const boost::uint64_t ticks = _iface->peek64(_readback_bases.rb_now);
+ const uint64_t ticks = _iface->peek64(_readback_bases.rb_now);
return time_spec_t::from_ticks(ticks, _tick_rate);
}
uhd::time_spec_t get_time_last_pps(void)
{
- const boost::uint64_t ticks = _iface->peek64(_readback_bases.rb_pps);
+ const uint64_t ticks = _iface->peek64(_readback_bases.rb_pps);
return time_spec_t::from_ticks(ticks, _tick_rate);
}
void set_time_now(const uhd::time_spec_t &time)
{
- const boost::uint64_t ticks = time.to_ticks(_tick_rate);
- _iface->poke32(REG_TIME_HI, boost::uint32_t(ticks >> 32));
- _iface->poke32(REG_TIME_LO, boost::uint32_t(ticks >> 0));
+ const uint64_t ticks = time.to_ticks(_tick_rate);
+ _iface->poke32(REG_TIME_HI, uint32_t(ticks >> 32));
+ _iface->poke32(REG_TIME_LO, uint32_t(ticks >> 0));
_iface->poke32(REG_TIME_CTRL, CTRL_LATCH_TIME_NOW);
}
void set_time_sync(const uhd::time_spec_t &time)
{
- const boost::uint64_t ticks = time.to_ticks(_tick_rate);
- _iface->poke32(REG_TIME_HI, boost::uint32_t(ticks >> 32));
- _iface->poke32(REG_TIME_LO, boost::uint32_t(ticks >> 0));
+ const uint64_t ticks = time.to_ticks(_tick_rate);
+ _iface->poke32(REG_TIME_HI, uint32_t(ticks >> 32));
+ _iface->poke32(REG_TIME_LO, uint32_t(ticks >> 0));
_iface->poke32(REG_TIME_CTRL, CTRL_LATCH_TIME_SYNC);
}
void set_time_next_pps(const uhd::time_spec_t &time)
{
- const boost::uint64_t ticks = time.to_ticks(_tick_rate);
- _iface->poke32(REG_TIME_HI, boost::uint32_t(ticks >> 32));
- _iface->poke32(REG_TIME_LO, boost::uint32_t(ticks >> 0));
+ const uint64_t ticks = time.to_ticks(_tick_rate);
+ _iface->poke32(REG_TIME_HI, uint32_t(ticks >> 32));
+ _iface->poke32(REG_TIME_LO, uint32_t(ticks >> 0));
_iface->poke32(REG_TIME_CTRL, CTRL_LATCH_TIME_PPS);
}
diff --git a/host/lib/usrp/cores/tx_dsp_core_200.cpp b/host/lib/usrp/cores/tx_dsp_core_200.cpp
index 4c456a10d..4e1743ee1 100644
--- a/host/lib/usrp/cores/tx_dsp_core_200.cpp
+++ b/host/lib/usrp/cores/tx_dsp_core_200.cpp
@@ -60,7 +60,7 @@ public:
tx_dsp_core_200_impl(
wb_iface::sptr iface,
const size_t dsp_base, const size_t ctrl_base,
- const boost::uint32_t sid
+ const uint32_t sid
):
_iface(iface), _dsp_base(dsp_base), _ctrl_base(ctrl_base), _sid(sid)
{
@@ -98,8 +98,8 @@ public:
}
void set_link_rate(const double rate){
- //_link_rate = rate/sizeof(boost::uint32_t); //in samps/s
- _link_rate = rate/sizeof(boost::uint16_t); //in samps/s (allows for 8sc)
+ //_link_rate = rate/sizeof(uint32_t); //in samps/s
+ _link_rate = rate/sizeof(uint16_t); //in samps/s (allows for 8sc)
}
uhd::meta_range_t get_host_rates(void){
@@ -154,7 +154,7 @@ public:
void update_scalar(void){
const double factor = 1.0 + std::max(ceil_log2(_scaling_adjustment), 0.0);
const double target_scalar = (1 << 17)*_scaling_adjustment/_dsp_extra_scaling/factor;
- const boost::int32_t actual_scalar = boost::math::iround(target_scalar);
+ const int32_t actual_scalar = boost::math::iround(target_scalar);
_fxpt_scalar_correction = target_scalar/actual_scalar*factor; //should be small
_iface->poke32(REG_DSP_TX_SCALE_IQ, actual_scalar);
}
@@ -167,7 +167,7 @@ public:
double actual_freq;
int32_t freq_word;
get_freq_and_freq_word(requested_freq, _tick_rate, actual_freq, freq_word);
- _iface->poke32(REG_DSP_TX_FREQ, boost::uint32_t(freq_word));
+ _iface->poke32(REG_DSP_TX_FREQ, uint32_t(freq_word));
return actual_freq;
}
@@ -214,9 +214,9 @@ private:
const size_t _dsp_base, _ctrl_base;
double _tick_rate, _link_rate;
double _scaling_adjustment, _dsp_extra_scaling, _host_extra_scaling, _fxpt_scalar_correction;
- const boost::uint32_t _sid;
+ const uint32_t _sid;
};
-tx_dsp_core_200::sptr tx_dsp_core_200::make(wb_iface::sptr iface, const size_t dsp_base, const size_t ctrl_base, const boost::uint32_t sid){
+tx_dsp_core_200::sptr tx_dsp_core_200::make(wb_iface::sptr iface, const size_t dsp_base, const size_t ctrl_base, const uint32_t sid){
return sptr(new tx_dsp_core_200_impl(iface, dsp_base, ctrl_base, sid));
}
diff --git a/host/lib/usrp/cores/tx_dsp_core_200.hpp b/host/lib/usrp/cores/tx_dsp_core_200.hpp
index f0475c579..02faad587 100644
--- a/host/lib/usrp/cores/tx_dsp_core_200.hpp
+++ b/host/lib/usrp/cores/tx_dsp_core_200.hpp
@@ -34,7 +34,7 @@ public:
static sptr make(
uhd::wb_iface::sptr iface,
const size_t dsp_base, const size_t ctrl_base,
- const boost::uint32_t sid
+ const uint32_t sid
);
virtual void clear(void) = 0;
diff --git a/host/lib/usrp/cores/tx_dsp_core_3000.cpp b/host/lib/usrp/cores/tx_dsp_core_3000.cpp
index 3889bbdc4..67ff418b3 100644
--- a/host/lib/usrp/cores/tx_dsp_core_3000.cpp
+++ b/host/lib/usrp/cores/tx_dsp_core_3000.cpp
@@ -66,8 +66,8 @@ public:
}
void set_link_rate(const double rate){
- //_link_rate = rate/sizeof(boost::uint32_t); //in samps/s
- _link_rate = rate/sizeof(boost::uint16_t); //in samps/s (allows for 8sc)
+ //_link_rate = rate/sizeof(uint32_t); //in samps/s
+ _link_rate = rate/sizeof(uint16_t); //in samps/s (allows for 8sc)
}
uhd::meta_range_t get_host_rates(void){
@@ -127,7 +127,7 @@ public:
// Further more factor in OTW format which adds further gain factor to weight output samples correctly.
void update_scalar(void){
const double target_scalar = (1 << 16)*_scaling_adjustment/_dsp_extra_scaling;
- const boost::int32_t actual_scalar = boost::math::iround(target_scalar);
+ const int32_t actual_scalar = boost::math::iround(target_scalar);
_fxpt_scalar_correction = target_scalar/actual_scalar; //should be small
_iface->poke32(REG_DSP_TX_SCALE_IQ, actual_scalar);
}
@@ -140,7 +140,7 @@ public:
double actual_freq;
int32_t freq_word;
get_freq_and_freq_word(requested_freq, _tick_rate, actual_freq, freq_word);
- _iface->poke32(REG_DSP_TX_FREQ, boost::uint32_t(freq_word));
+ _iface->poke32(REG_DSP_TX_FREQ, uint32_t(freq_word));
return actual_freq;
}
diff --git a/host/lib/usrp/cores/tx_frontend_core_200.cpp b/host/lib/usrp/cores/tx_frontend_core_200.cpp
index be4f77f39..241f98d07 100644
--- a/host/lib/usrp/cores/tx_frontend_core_200.cpp
+++ b/host/lib/usrp/cores/tx_frontend_core_200.cpp
@@ -33,8 +33,8 @@ using namespace uhd;
const std::complex<double> tx_frontend_core_200::DEFAULT_DC_OFFSET_VALUE = std::complex<double>(0.0, 0.0);
const std::complex<double> tx_frontend_core_200::DEFAULT_IQ_BALANCE_VALUE = std::complex<double>(0.0, 0.0);
-static boost::uint32_t fs_to_bits(const double num, const size_t bits){
- return boost::int32_t(boost::math::round(num * (1 << (bits-1))));
+static uint32_t fs_to_bits(const double num, const size_t bits){
+ return int32_t(boost::math::round(num * (1 << (bits-1))));
}
tx_frontend_core_200::~tx_frontend_core_200(void){
@@ -50,7 +50,7 @@ public:
}
void set_mux(const std::string &mode){
- static const uhd::dict<std::string, boost::uint32_t> mode_to_mux = boost::assign::map_list_of
+ static const uhd::dict<std::string, uint32_t> mode_to_mux = boost::assign::map_list_of
("IQ", (0x1 << 4) | (0x0 << 0)) //DAC0Q=DUC0Q, DAC0I=DUC0I
("QI", (0x0 << 4) | (0x1 << 0)) //DAC0Q=DUC0I, DAC0I=DUC0Q
("I", (0xf << 4) | (0x0 << 0)) //DAC0Q=ZERO, DAC0I=DUC0I
@@ -61,8 +61,8 @@ public:
std::complex<double> set_dc_offset(const std::complex<double> &off){
static const double scaler = double(1ul << 23);
- const boost::int32_t i_dc_off = boost::math::iround(off.real()*scaler);
- const boost::int32_t q_dc_off = boost::math::iround(off.imag()*scaler);
+ const int32_t i_dc_off = boost::math::iround(off.real()*scaler);
+ const int32_t q_dc_off = boost::math::iround(off.imag()*scaler);
_iface->poke32(REG_TX_FE_DC_OFFSET_I, i_dc_off);
_iface->poke32(REG_TX_FE_DC_OFFSET_Q, q_dc_off);
diff --git a/host/lib/usrp/cores/user_settings_core_200.hpp b/host/lib/usrp/cores/user_settings_core_200.hpp
index a8efeed38..9e985c23b 100644
--- a/host/lib/usrp/cores/user_settings_core_200.hpp
+++ b/host/lib/usrp/cores/user_settings_core_200.hpp
@@ -26,7 +26,7 @@
class user_settings_core_200 : boost::noncopyable{
public:
typedef boost::shared_ptr<user_settings_core_200> sptr;
- typedef std::pair<boost::uint8_t, boost::uint32_t> user_reg_t;
+ typedef std::pair<uint8_t, uint32_t> user_reg_t;
virtual ~user_settings_core_200(void) = 0;
diff --git a/host/lib/usrp/cores/user_settings_core_3000.cpp b/host/lib/usrp/cores/user_settings_core_3000.cpp
index 549264f57..22d27cfbb 100644
--- a/host/lib/usrp/cores/user_settings_core_3000.cpp
+++ b/host/lib/usrp/cores/user_settings_core_3000.cpp
@@ -34,40 +34,40 @@ public:
{
}
- void poke64(const wb_addr_type offset, const boost::uint64_t value)
+ void poke64(const wb_addr_type offset, const uint64_t value)
{
- if (offset % sizeof(boost::uint64_t) != 0) throw uhd::value_error("poke64: Incorrect address alignment");
- poke32(offset, static_cast<boost::uint32_t>(value));
- poke32(offset + 4, static_cast<boost::uint32_t>(value >> 32));
+ if (offset % sizeof(uint64_t) != 0) throw uhd::value_error("poke64: Incorrect address alignment");
+ poke32(offset, static_cast<uint32_t>(value));
+ poke32(offset + 4, static_cast<uint32_t>(value >> 32));
}
- boost::uint64_t peek64(const wb_addr_type offset)
+ uint64_t peek64(const wb_addr_type offset)
{
- if (offset % sizeof(boost::uint64_t) != 0) throw uhd::value_error("peek64: Incorrect address alignment");
+ if (offset % sizeof(uint64_t) != 0) throw uhd::value_error("peek64: Incorrect address alignment");
boost::unique_lock<boost::mutex> lock(_mutex);
_iface->poke32(REG_USER_RB_ADDR, offset >> 3); //Translate byte offset to 64-bit offset
return _iface->peek64(_rb_reg_addr);
}
- void poke32(const wb_addr_type offset, const boost::uint32_t value)
+ void poke32(const wb_addr_type offset, const uint32_t value)
{
- if (offset % sizeof(boost::uint32_t) != 0) throw uhd::value_error("poke32: Incorrect address alignment");
+ if (offset % sizeof(uint32_t) != 0) throw uhd::value_error("poke32: Incorrect address alignment");
boost::unique_lock<boost::mutex> lock(_mutex);
_iface->poke32(REG_USER_SR_ADDR, offset >> 2); //Translate byte offset to 64-bit offset
_iface->poke32(REG_USER_SR_DATA, value);
}
- boost::uint32_t peek32(const wb_addr_type offset)
+ uint32_t peek32(const wb_addr_type offset)
{
- if (offset % sizeof(boost::uint32_t) != 0) throw uhd::value_error("peek32: Incorrect address alignment");
+ if (offset % sizeof(uint32_t) != 0) throw uhd::value_error("peek32: Incorrect address alignment");
- boost::uint64_t value = peek64((offset >> 3) << 3);
+ uint64_t value = peek64((offset >> 3) << 3);
if ((offset & 0x7) == 0) {
- return static_cast<boost::uint32_t>(value);
+ return static_cast<uint32_t>(value);
} else {
- return static_cast<boost::uint32_t>(value >> 32);
+ return static_cast<uint32_t>(value >> 32);
}
}
diff --git a/host/lib/usrp/dboard/db_cbx.cpp b/host/lib/usrp/dboard/db_cbx.cpp
index daf9a8dfd..c27cbf58a 100644
--- a/host/lib/usrp/dboard/db_cbx.cpp
+++ b/host/lib/usrp/dboard/db_cbx.cpp
@@ -38,9 +38,9 @@ sbx_xcvr::cbx::~cbx(void){
/* NOP */
}
-void sbx_xcvr::cbx::write_lo_regs(dboard_iface::unit_t unit, const std::vector<boost::uint32_t> &regs)
+void sbx_xcvr::cbx::write_lo_regs(dboard_iface::unit_t unit, const std::vector<uint32_t> &regs)
{
- BOOST_FOREACH(boost::uint32_t reg, regs)
+ BOOST_FOREACH(uint32_t reg, regs)
{
self_base->get_iface()->write_spi(unit, spi_config_t::EDGE_RISE, reg, 32);
}
diff --git a/host/lib/usrp/dboard/db_dbsrx.cpp b/host/lib/usrp/dboard/db_dbsrx.cpp
index 6e1846fb8..f296820c5 100644
--- a/host/lib/usrp/dboard/db_dbsrx.cpp
+++ b/host/lib/usrp/dboard/db_dbsrx.cpp
@@ -74,7 +74,7 @@ private:
uhd::dict<std::string, double> _gains;
max2118_write_regs_t _max2118_write_regs;
max2118_read_regs_t _max2118_read_regs;
- boost::uint8_t _max2118_addr(void){
+ uint8_t _max2118_addr(void){
return (this->get_iface()->get_special_props().mangle_i2c_addrs)? 0x65 : 0x67;
};
@@ -82,12 +82,12 @@ private:
double set_gain(double gain, const std::string &name);
double set_bandwidth(double bandwidth);
- void send_reg(boost::uint8_t start_reg, boost::uint8_t stop_reg){
- start_reg = boost::uint8_t(uhd::clip(int(start_reg), 0x0, 0x5));
- stop_reg = boost::uint8_t(uhd::clip(int(stop_reg), 0x0, 0x5));
+ void send_reg(uint8_t start_reg, uint8_t stop_reg){
+ start_reg = uint8_t(uhd::clip(int(start_reg), 0x0, 0x5));
+ stop_reg = uint8_t(uhd::clip(int(stop_reg), 0x0, 0x5));
- for(boost::uint8_t start_addr=start_reg; start_addr <= stop_reg; start_addr += sizeof(boost::uint32_t) - 1){
- int num_bytes = int(stop_reg - start_addr + 1) > int(sizeof(boost::uint32_t)) - 1 ? sizeof(boost::uint32_t) - 1 : stop_reg - start_addr + 1;
+ for(uint8_t start_addr=start_reg; start_addr <= stop_reg; start_addr += sizeof(uint32_t) - 1){
+ int num_bytes = int(stop_reg - start_addr + 1) > int(sizeof(uint32_t)) - 1 ? sizeof(uint32_t) - 1 : stop_reg - start_addr + 1;
//create buffer for register data (+1 for start address)
byte_vector_t regs_vector(num_bytes + 1);
@@ -110,13 +110,13 @@ private:
}
}
- void read_reg(boost::uint8_t start_reg, boost::uint8_t stop_reg){
- static const boost::uint8_t status_addr = 0x0;
- start_reg = boost::uint8_t(uhd::clip(int(start_reg), 0x0, 0x1));
- stop_reg = boost::uint8_t(uhd::clip(int(stop_reg), 0x0, 0x1));
+ void read_reg(uint8_t start_reg, uint8_t stop_reg){
+ static const uint8_t status_addr = 0x0;
+ start_reg = uint8_t(uhd::clip(int(start_reg), 0x0, 0x1));
+ stop_reg = uint8_t(uhd::clip(int(stop_reg), 0x0, 0x1));
- for(boost::uint8_t start_addr=start_reg; start_addr <= stop_reg; start_addr += sizeof(boost::uint32_t)){
- int num_bytes = int(stop_reg - start_addr + 1) > int(sizeof(boost::uint32_t)) ? sizeof(boost::uint32_t) : stop_reg - start_addr + 1;
+ for(uint8_t start_addr=start_reg; start_addr <= stop_reg; start_addr += sizeof(uint32_t)){
+ int num_bytes = int(stop_reg - start_addr + 1) > int(sizeof(uint32_t)) ? sizeof(uint32_t) : stop_reg - start_addr + 1;
//create buffer for register data
byte_vector_t regs_vector(num_bytes);
@@ -126,7 +126,7 @@ private:
_max2118_addr(), num_bytes
);
- for(boost::uint8_t i=0; i < num_bytes; i++){
+ for(uint8_t i=0; i < num_bytes; i++){
if (i + start_addr >= status_addr){
_max2118_read_regs.set_reg(i + start_addr, regs_vector[i]);
}
diff --git a/host/lib/usrp/dboard/db_dbsrx2.cpp b/host/lib/usrp/dboard/db_dbsrx2.cpp
index 11d706ed6..21b0fd02d 100644
--- a/host/lib/usrp/dboard/db_dbsrx2.cpp
+++ b/host/lib/usrp/dboard/db_dbsrx2.cpp
@@ -68,7 +68,7 @@ private:
uhd::dict<std::string, double> _gains;
max2112_write_regs_t _max2112_write_regs;
max2112_read_regs_t _max2112_read_regs;
- boost::uint8_t _max2112_addr(){ //0x60 or 0x61 depending on which side
+ uint8_t _max2112_addr(){ //0x60 or 0x61 depending on which side
return (this->get_iface()->get_special_props().mangle_i2c_addrs)? 0x60 : 0x61;
}
@@ -76,12 +76,12 @@ private:
double set_gain(double gain, const std::string &name);
double set_bandwidth(double bandwidth);
- void send_reg(boost::uint8_t start_reg, boost::uint8_t stop_reg){
- start_reg = boost::uint8_t(uhd::clip(int(start_reg), 0x0, 0xB));
- stop_reg = boost::uint8_t(uhd::clip(int(stop_reg), 0x0, 0xB));
+ void send_reg(uint8_t start_reg, uint8_t stop_reg){
+ start_reg = uint8_t(uhd::clip(int(start_reg), 0x0, 0xB));
+ stop_reg = uint8_t(uhd::clip(int(stop_reg), 0x0, 0xB));
- for(boost::uint8_t start_addr=start_reg; start_addr <= stop_reg; start_addr += sizeof(boost::uint32_t) - 1){
- int num_bytes = int(stop_reg - start_addr + 1) > int(sizeof(boost::uint32_t)) - 1 ? sizeof(boost::uint32_t) - 1 : stop_reg - start_addr + 1;
+ for(uint8_t start_addr=start_reg; start_addr <= stop_reg; start_addr += sizeof(uint32_t) - 1){
+ int num_bytes = int(stop_reg - start_addr + 1) > int(sizeof(uint32_t)) - 1 ? sizeof(uint32_t) - 1 : stop_reg - start_addr + 1;
//create buffer for register data (+1 for start address)
byte_vector_t regs_vector(num_bytes + 1);
@@ -104,13 +104,13 @@ private:
}
}
- void read_reg(boost::uint8_t start_reg, boost::uint8_t stop_reg){
- static const boost::uint8_t status_addr = 0xC;
- start_reg = boost::uint8_t(uhd::clip(int(start_reg), 0x0, 0xD));
- stop_reg = boost::uint8_t(uhd::clip(int(stop_reg), 0x0, 0xD));
+ void read_reg(uint8_t start_reg, uint8_t stop_reg){
+ static const uint8_t status_addr = 0xC;
+ start_reg = uint8_t(uhd::clip(int(start_reg), 0x0, 0xD));
+ stop_reg = uint8_t(uhd::clip(int(stop_reg), 0x0, 0xD));
- for(boost::uint8_t start_addr=start_reg; start_addr <= stop_reg; start_addr += sizeof(boost::uint32_t)){
- int num_bytes = int(stop_reg - start_addr + 1) > int(sizeof(boost::uint32_t)) ? sizeof(boost::uint32_t) : stop_reg - start_addr + 1;
+ for(uint8_t start_addr=start_reg; start_addr <= stop_reg; start_addr += sizeof(uint32_t)){
+ int num_bytes = int(stop_reg - start_addr + 1) > int(sizeof(uint32_t)) ? sizeof(uint32_t) : stop_reg - start_addr + 1;
//create address to start reading register data
byte_vector_t address_vector(1);
@@ -129,7 +129,7 @@ private:
_max2112_addr(), num_bytes
);
- for(boost::uint8_t i=0; i < num_bytes; i++){
+ for(uint8_t i=0; i < num_bytes; i++){
if (i + start_addr >= status_addr){
_max2112_read_regs.set_reg(i + start_addr, regs_vector[i]);
/*
@@ -183,7 +183,7 @@ UHD_STATIC_BLOCK(reg_dbsrx2_dboard){
dbsrx2::dbsrx2(ctor_args_t args) : rx_dboard_base(args){
//send initial register settings
send_reg(0x0, 0xB);
- //for (boost::uint8_t addr=0; addr<=12; addr++) this->send_reg(addr, addr);
+ //for (uint8_t addr=0; addr<=12; addr++) this->send_reg(addr, addr);
////////////////////////////////////////////////////////////////////
// Register properties
diff --git a/host/lib/usrp/dboard/db_rfx.cpp b/host/lib/usrp/dboard/db_rfx.cpp
index dbb1600ec..9bbd73425 100644
--- a/host/lib/usrp/dboard/db_rfx.cpp
+++ b/host/lib/usrp/dboard/db_rfx.cpp
@@ -86,7 +86,7 @@ private:
const uhd::dict<dboard_iface::unit_t, bool> _div2;
std::string _rx_ant;
uhd::dict<std::string, double> _rx_gains;
- boost::uint16_t _power_up;
+ uint16_t _power_up;
void set_rx_ant(const std::string &ant);
void set_tx_ant(const std::string &ant);
@@ -241,7 +241,7 @@ rfx_xcvr::rfx_xcvr(
this->get_iface()->set_clock_enabled(dboard_iface::UNIT_RX, true);
//set the gpio directions and atr controls (identically)
- boost::uint16_t output_enables = POWER_IO | ANTSW_IO | MIXER_IO;
+ uint16_t output_enables = POWER_IO | ANTSW_IO | MIXER_IO;
this->get_iface()->set_pin_ctrl(dboard_iface::UNIT_TX, output_enables);
this->get_iface()->set_pin_ctrl(dboard_iface::UNIT_RX, output_enables);
this->get_iface()->set_gpio_ddr(dboard_iface::UNIT_TX, output_enables);
diff --git a/host/lib/usrp/dboard/db_sbx_common.cpp b/host/lib/usrp/dboard/db_sbx_common.cpp
index be02cf77a..efc84d7e6 100644
--- a/host/lib/usrp/dboard/db_sbx_common.cpp
+++ b/host/lib/usrp/dboard/db_sbx_common.cpp
@@ -150,7 +150,7 @@ sbx_xcvr::sbx_xcvr(ctor_args_t args) : xcvr_dboard_base(args){
////////////////////////////////////////////////////////////////////
this->get_rx_subtree()->create<device_addr_t>("tune_args").set(device_addr_t());
- boost::uint16_t rx_id = get_rx_id().to_uint16();
+ uint16_t rx_id = get_rx_id().to_uint16();
if(rx_id == 0x0054) this->get_rx_subtree()->create<std::string>("name").set("SBXv3 RX");
else if(rx_id == 0x0065) this->get_rx_subtree()->create<std::string>("name").set("SBXv4 RX");
else if(rx_id == 0x0067) this->get_rx_subtree()->create<std::string>("name").set("CBX RX");
@@ -191,7 +191,7 @@ sbx_xcvr::sbx_xcvr(ctor_args_t args) : xcvr_dboard_base(args){
////////////////////////////////////////////////////////////////////
this->get_tx_subtree()->create<device_addr_t>("tune_args").set(device_addr_t());
- boost::uint16_t tx_id = get_tx_id().to_uint16();
+ uint16_t tx_id = get_tx_id().to_uint16();
if(tx_id == 0x0055) this->get_tx_subtree()->create<std::string>("name").set("SBXv3 TX");
else if(tx_id == 0x0064) this->get_tx_subtree()->create<std::string>("name").set("SBXv4 TX");
else if(tx_id == 0x0066) this->get_tx_subtree()->create<std::string>("name").set("CBX TX");
diff --git a/host/lib/usrp/dboard/db_sbx_common.hpp b/host/lib/usrp/dboard/db_sbx_common.hpp
index c0e29f263..ad64e2267 100644
--- a/host/lib/usrp/dboard/db_sbx_common.hpp
+++ b/host/lib/usrp/dboard/db_sbx_common.hpp
@@ -200,7 +200,7 @@ protected:
private:
adf435x_iface::sptr _txlo;
adf435x_iface::sptr _rxlo;
- void write_lo_regs(dboard_iface::unit_t unit, const std::vector<boost::uint32_t> &regs);
+ void write_lo_regs(dboard_iface::unit_t unit, const std::vector<uint32_t> &regs);
};
/*!
@@ -220,7 +220,7 @@ protected:
private:
adf435x_iface::sptr _txlo;
adf435x_iface::sptr _rxlo;
- void write_lo_regs(dboard_iface::unit_t unit, const std::vector<boost::uint32_t> &regs);
+ void write_lo_regs(dboard_iface::unit_t unit, const std::vector<uint32_t> &regs);
};
/*!
@@ -240,7 +240,7 @@ protected:
/*! This is the registered instance of the wrapper class, sbx_base. */
sbx_xcvr *self_base;
private:
- void write_lo_regs(dboard_iface::unit_t unit, const std::vector<boost::uint32_t> &regs);
+ void write_lo_regs(dboard_iface::unit_t unit, const std::vector<uint32_t> &regs);
max287x_iface::sptr _txlo;
max287x_iface::sptr _rxlo;
};
diff --git a/host/lib/usrp/dboard/db_sbx_version3.cpp b/host/lib/usrp/dboard/db_sbx_version3.cpp
index 76ad7b04f..bb2ba6bd6 100644
--- a/host/lib/usrp/dboard/db_sbx_version3.cpp
+++ b/host/lib/usrp/dboard/db_sbx_version3.cpp
@@ -38,9 +38,9 @@ sbx_xcvr::sbx_version3::~sbx_version3(void){
/* NOP */
}
-void sbx_xcvr::sbx_version3::write_lo_regs(dboard_iface::unit_t unit, const std::vector<boost::uint32_t> &regs)
+void sbx_xcvr::sbx_version3::write_lo_regs(dboard_iface::unit_t unit, const std::vector<uint32_t> &regs)
{
- BOOST_FOREACH(boost::uint32_t reg, regs)
+ BOOST_FOREACH(uint32_t reg, regs)
{
self_base->get_iface()->write_spi(unit, spi_config_t::EDGE_RISE, reg, 32);
}
diff --git a/host/lib/usrp/dboard/db_sbx_version4.cpp b/host/lib/usrp/dboard/db_sbx_version4.cpp
index 639bce250..e5b6e081c 100644
--- a/host/lib/usrp/dboard/db_sbx_version4.cpp
+++ b/host/lib/usrp/dboard/db_sbx_version4.cpp
@@ -39,9 +39,9 @@ sbx_xcvr::sbx_version4::~sbx_version4(void){
/* NOP */
}
-void sbx_xcvr::sbx_version4::write_lo_regs(dboard_iface::unit_t unit, const std::vector<boost::uint32_t> &regs)
+void sbx_xcvr::sbx_version4::write_lo_regs(dboard_iface::unit_t unit, const std::vector<uint32_t> &regs)
{
- BOOST_FOREACH(boost::uint32_t reg, regs)
+ BOOST_FOREACH(uint32_t reg, regs)
{
self_base->get_iface()->write_spi(unit, spi_config_t::EDGE_RISE, reg, 32);
}
diff --git a/host/lib/usrp/dboard/db_tvrx.cpp b/host/lib/usrp/dboard/db_tvrx.cpp
index 0f84cd68a..5c0600c61 100644
--- a/host/lib/usrp/dboard/db_tvrx.cpp
+++ b/host/lib/usrp/dboard/db_tvrx.cpp
@@ -125,7 +125,7 @@ static uhd::dict<std::string, gain_range_t> get_tvrx_gain_ranges(void) {
static const double opamp_gain = 1.22; //onboard DAC opamp gain
static const double tvrx_if_freq = 43.75e6; //IF freq of TVRX module
-static const boost::uint16_t reference_divider = 640; //clock reference divider to use
+static const uint16_t reference_divider = 640; //clock reference divider to use
static const double reference_freq = 4.0e6;
/***********************************************************************
@@ -140,7 +140,7 @@ private:
uhd::dict<std::string, double> _gains;
double _lo_freq;
tuner_4937di5_regs_t _tuner_4937di5_regs;
- boost::uint8_t _tuner_4937di5_addr(void){
+ uint8_t _tuner_4937di5_addr(void){
return (this->get_iface()->get_special_props().mangle_i2c_addrs)? 0x61 : 0x60; //ok really? we could rename that call
};
@@ -271,7 +271,7 @@ static double gain_interp(double gain, const boost::array<double, 17>& db_vector
double volts;
gain = uhd::clip<double>(gain, db_vector.front(), db_vector.back()); //let's not get carried away here
- boost::uint8_t gain_step = 0;
+ uint8_t gain_step = 0;
//find which bin we're in
for(size_t i = 0; i < db_vector.size()-1; i++) {
if(gain >= db_vector[i] && gain <= db_vector[i+1]) gain_step = i;
diff --git a/host/lib/usrp/dboard/db_tvrx2.cpp b/host/lib/usrp/dboard/db_tvrx2.cpp
index 6f0604f72..1bac81153 100644
--- a/host/lib/usrp/dboard/db_tvrx2.cpp
+++ b/host/lib/usrp/dboard/db_tvrx2.cpp
@@ -77,32 +77,32 @@ using namespace boost::assign;
* The TVRX2 types
**********************************************************************/
struct tvrx2_tda18272_rfcal_result_t {
- boost::int8_t delta_c;
- boost::int8_t c_offset;
+ int8_t delta_c;
+ int8_t c_offset;
tvrx2_tda18272_rfcal_result_t(void): delta_c(0), c_offset(0){}
};
struct tvrx2_tda18272_rfcal_coeffs_t {
- boost::uint8_t cal_number;
- boost::int32_t RF_A1;
- boost::int32_t RF_B1;
+ uint8_t cal_number;
+ int32_t RF_A1;
+ int32_t RF_B1;
tvrx2_tda18272_rfcal_coeffs_t(void): cal_number(0), RF_A1(0), RF_B1(0) {}
- tvrx2_tda18272_rfcal_coeffs_t(boost::uint32_t num): RF_A1(0), RF_B1(0) { cal_number = num; }
+ tvrx2_tda18272_rfcal_coeffs_t(uint32_t num): RF_A1(0), RF_B1(0) { cal_number = num; }
};
struct tvrx2_tda18272_cal_map_t {
- boost::array<boost::uint32_t, 4> cal_freq;
- boost::array<boost::uint8_t, 4> c_offset;
- tvrx2_tda18272_cal_map_t(boost::array<boost::uint32_t, 4> freqs, boost::array<boost::uint8_t, 4> offsets)
+ boost::array<uint32_t, 4> cal_freq;
+ boost::array<uint8_t, 4> c_offset;
+ tvrx2_tda18272_cal_map_t(boost::array<uint32_t, 4> freqs, boost::array<uint8_t, 4> offsets)
{ cal_freq = freqs; c_offset = offsets; }
};
struct tvrx2_tda18272_freq_map_t {
- boost::uint32_t rf_max;
- boost::uint8_t c_prog;
- boost::uint8_t gain_taper;
- boost::uint8_t rf_band;
- tvrx2_tda18272_freq_map_t( boost::uint32_t max, boost::uint8_t c, boost::uint8_t taper, boost::uint8_t band)
+ uint32_t rf_max;
+ uint8_t c_prog;
+ uint8_t gain_taper;
+ uint8_t rf_band;
+ tvrx2_tda18272_freq_map_t( uint32_t max, uint8_t c, uint8_t taper, uint8_t band)
{ rf_max = max; c_prog = c; gain_taper = taper; rf_band = band; }
};
@@ -119,7 +119,7 @@ static const boost::array<freq_range_t, 4> tvrx2_tda18272_rf_bands = list_of
#define TVRX2_TDA18272_FREQ_MAP_ENTRIES (565)
-static const uhd::dict<boost::uint32_t, tvrx2_tda18272_cal_map_t> tvrx2_tda18272_cal_map = map_list_of
+static const uhd::dict<uint32_t, tvrx2_tda18272_cal_map_t> tvrx2_tda18272_cal_map = map_list_of
( 0, tvrx2_tda18272_cal_map_t( list_of( 44032000)( 48128000)( 52224000)( 56320000), list_of(15)( 0)(10)(17) ) )
( 1, tvrx2_tda18272_cal_map_t( list_of( 84992000)( 89088000)( 93184000)( 97280000), list_of( 1)( 0)(-2)( 3) ) )
( 2, tvrx2_tda18272_cal_map_t( list_of(106496000)(111616000)(115712000)(123904000), list_of( 0)(-1)( 1)( 2) ) )
@@ -722,12 +722,12 @@ static const uhd::dict<std::string, std::string> tvrx2_sd_name_to_conn = map_lis
("RX2", "I")
;
-static const uhd::dict<std::string, boost::uint8_t> tvrx2_sd_name_to_i2c_addr = map_list_of
+static const uhd::dict<std::string, uint8_t> tvrx2_sd_name_to_i2c_addr = map_list_of
("RX1", 0x63)
("RX2", 0x60)
;
-static const uhd::dict<std::string, boost::uint8_t> tvrx2_sd_name_to_irq_io = map_list_of
+static const uhd::dict<std::string, uint8_t> tvrx2_sd_name_to_irq_io = map_list_of
("RX1", (RX1_IRQ))
("RX2", (RX2_IRQ))
;
@@ -760,8 +760,8 @@ private:
double _bandwidth;
uhd::dict<std::string, double> _gains;
tda18272hnm_regs_t _tda18272hnm_regs;
- uhd::dict<boost::uint32_t, tvrx2_tda18272_rfcal_result_t> _rfcal_results;
- uhd::dict<boost::uint32_t, tvrx2_tda18272_rfcal_coeffs_t> _rfcal_coeffs;
+ uhd::dict<uint32_t, tvrx2_tda18272_rfcal_result_t> _rfcal_results;
+ uhd::dict<uint32_t, tvrx2_tda18272_rfcal_coeffs_t> _rfcal_coeffs;
bool _enabled;
@@ -775,12 +775,12 @@ private:
double get_scaled_rf_freq(void);
void set_scaled_if_freq(double if_freq);
double get_scaled_if_freq(void);
- void send_reg(boost::uint8_t start_reg, boost::uint8_t stop_reg);
- void read_reg(boost::uint8_t start_reg, boost::uint8_t stop_reg);
+ void send_reg(uint8_t start_reg, uint8_t stop_reg);
+ void read_reg(uint8_t start_reg, uint8_t stop_reg);
- freq_range_t get_tda18272_rfcal_result_freq_range(boost::uint32_t result);
+ freq_range_t get_tda18272_rfcal_result_freq_range(uint32_t result);
void tvrx2_tda18272_init_rfcal(void);
- void tvrx2_tda18272_tune_rf_filter(boost::uint32_t uRF);
+ void tvrx2_tda18272_tune_rf_filter(uint32_t uRF);
void soft_calibration(void);
void transition_0(void);
void transition_1(void);
@@ -1103,7 +1103,7 @@ tvrx2::~tvrx2(void){
* TDA18272 Register IO Functions
**********************************************************************/
void tvrx2::set_scaled_rf_freq(double rf_freq){
- _tda18272hnm_regs.set_rf_freq(boost::uint32_t(_freq_scalar*rf_freq/1e3));
+ _tda18272hnm_regs.set_rf_freq(uint32_t(_freq_scalar*rf_freq/1e3));
}
double tvrx2::get_scaled_rf_freq(void){
@@ -1118,12 +1118,12 @@ double tvrx2::get_scaled_if_freq(void){
return _tda18272hnm_regs.if_freq*50e3/_freq_scalar;
}
-void tvrx2::send_reg(boost::uint8_t start_reg, boost::uint8_t stop_reg){
- start_reg = boost::uint8_t(uhd::clip(int(start_reg), 0x0, 0x43));
- stop_reg = boost::uint8_t(uhd::clip(int(stop_reg), 0x0, 0x43));
+void tvrx2::send_reg(uint8_t start_reg, uint8_t stop_reg){
+ start_reg = uint8_t(uhd::clip(int(start_reg), 0x0, 0x43));
+ stop_reg = uint8_t(uhd::clip(int(stop_reg), 0x0, 0x43));
- for(boost::uint8_t start_addr=start_reg; start_addr <= stop_reg; start_addr += sizeof(boost::uint32_t) - 1){
- int num_bytes = int(stop_reg - start_addr + 1) > int(sizeof(boost::uint32_t)) - 1 ? sizeof(boost::uint32_t) - 1 : stop_reg - start_addr + 1;
+ for(uint8_t start_addr=start_reg; start_addr <= stop_reg; start_addr += sizeof(uint32_t) - 1){
+ int num_bytes = int(stop_reg - start_addr + 1) > int(sizeof(uint32_t)) - 1 ? sizeof(uint32_t) - 1 : stop_reg - start_addr + 1;
//create buffer for register data (+1 for start address)
byte_vector_t regs_vector(num_bytes + 1);
@@ -1146,13 +1146,13 @@ void tvrx2::send_reg(boost::uint8_t start_reg, boost::uint8_t stop_reg){
}
}
-void tvrx2::read_reg(boost::uint8_t start_reg, boost::uint8_t stop_reg){
- static const boost::uint8_t status_addr = 0x0;
- start_reg = boost::uint8_t(uhd::clip(int(start_reg), 0x0, 0x43));
- stop_reg = boost::uint8_t(uhd::clip(int(stop_reg), 0x0, 0x43));
+void tvrx2::read_reg(uint8_t start_reg, uint8_t stop_reg){
+ static const uint8_t status_addr = 0x0;
+ start_reg = uint8_t(uhd::clip(int(start_reg), 0x0, 0x43));
+ stop_reg = uint8_t(uhd::clip(int(stop_reg), 0x0, 0x43));
- for(boost::uint8_t start_addr=start_reg; start_addr <= stop_reg; start_addr += sizeof(boost::uint32_t)){
- int num_bytes = int(stop_reg - start_addr + 1) > int(sizeof(boost::uint32_t)) ? sizeof(boost::uint32_t) : stop_reg - start_addr + 1;
+ for(uint8_t start_addr=start_reg; start_addr <= stop_reg; start_addr += sizeof(uint32_t)){
+ int num_bytes = int(stop_reg - start_addr + 1) > int(sizeof(uint32_t)) ? sizeof(uint32_t) : stop_reg - start_addr + 1;
//create buffer for starting address
byte_vector_t start_address_vector(1);
@@ -1173,7 +1173,7 @@ void tvrx2::read_reg(boost::uint8_t start_reg, boost::uint8_t stop_reg){
tvrx2_sd_name_to_i2c_addr[get_subdev_name()], num_bytes
);
- for(boost::uint8_t i=0; i < num_bytes; i++){
+ for(uint8_t i=0; i < num_bytes; i++){
if (i + start_addr >= status_addr){
_tda18272hnm_regs.set_reg(i + start_addr, regs_vector[i]);
}
@@ -1188,10 +1188,10 @@ void tvrx2::read_reg(boost::uint8_t start_reg, boost::uint8_t stop_reg){
/***********************************************************************
* TDA18272 Calibration Functions
**********************************************************************/
-freq_range_t tvrx2::get_tda18272_rfcal_result_freq_range(boost::uint32_t result)
+freq_range_t tvrx2::get_tda18272_rfcal_result_freq_range(uint32_t result)
{
- uhd::dict<boost::uint32_t, freq_range_t> result_to_cal_freq_ranges_map = map_list_of
+ uhd::dict<uint32_t, freq_range_t> result_to_cal_freq_ranges_map = map_list_of
( 0, freq_range_t(
(double) tvrx2_tda18272_cal_map[0].cal_freq[_tda18272hnm_regs.rfcal_freq0] * _freq_scalar,
(double) tvrx2_tda18272_cal_map[1].cal_freq[_tda18272hnm_regs.rfcal_freq1] * _freq_scalar
@@ -1254,7 +1254,7 @@ void tvrx2::tvrx2_tda18272_init_rfcal(void)
/* read byte 0x38-0x43 */
read_reg(0x38, 0x43);
- uhd::dict<boost::uint32_t, boost::uint8_t> result_to_cal_regs = map_list_of
+ uhd::dict<uint32_t, uint8_t> result_to_cal_regs = map_list_of
( 0, _tda18272hnm_regs.rfcal_log_1)
( 1, _tda18272hnm_regs.rfcal_log_2)
( 2, _tda18272hnm_regs.rfcal_log_3)
@@ -1271,27 +1271,27 @@ void tvrx2::tvrx2_tda18272_init_rfcal(void)
// Loop through rfcal_log_* registers, initialize _rfcal_results
- BOOST_FOREACH(const boost::uint32_t &result, result_to_cal_regs.keys())
+ BOOST_FOREACH(const uint32_t &result, result_to_cal_regs.keys())
_rfcal_results[result].delta_c = result_to_cal_regs[result] > 63 ? result_to_cal_regs[result] - 128 : result_to_cal_regs[result];
/* read byte 0x26-0x2B */
read_reg(0x26, 0x2B);
// Loop through rfcal_byte_* registers, initialize _rfcal_coeffs
- BOOST_FOREACH(const boost::uint32_t &subband, _rfcal_coeffs.keys())
+ BOOST_FOREACH(const uint32_t &subband, _rfcal_coeffs.keys())
{
freq_range_t subband_freqs;
- boost::uint32_t result = _rfcal_coeffs[subband].cal_number;
+ uint32_t result = _rfcal_coeffs[subband].cal_number;
subband_freqs = get_tda18272_rfcal_result_freq_range(result);
_rfcal_coeffs[subband].RF_B1 = _rfcal_results[result].delta_c + tvrx2_tda18272_cal_map[result].c_offset[_rfcal_results[result].c_offset];
- boost::uint32_t quotient = (((_rfcal_results[result+1].delta_c + tvrx2_tda18272_cal_map[result+1].c_offset[_rfcal_results[result].c_offset])
+ uint32_t quotient = (((_rfcal_results[result+1].delta_c + tvrx2_tda18272_cal_map[result+1].c_offset[_rfcal_results[result].c_offset])
- (_rfcal_results[result].delta_c + tvrx2_tda18272_cal_map[result].c_offset[_rfcal_results[result].c_offset])) * 1000000);
- boost::uint32_t divisor = ((boost::int32_t)(subband_freqs.stop() - subband_freqs.start())/1000);
+ uint32_t divisor = ((int32_t)(subband_freqs.stop() - subband_freqs.start())/1000);
_rfcal_coeffs[subband].RF_A1 = quotient / divisor;
@@ -1302,27 +1302,27 @@ void tvrx2::tvrx2_tda18272_init_rfcal(void)
/*
* Apply calibration coefficients to RF Filter tuning
*/
-void tvrx2::tvrx2_tda18272_tune_rf_filter(boost::uint32_t uRF)
+void tvrx2::tvrx2_tda18272_tune_rf_filter(uint32_t uRF)
{
- boost::uint32_t uCounter = 0;
- boost::uint8_t cal_result = 0;
- boost::uint32_t uRFCal0 = 0;
- boost::uint32_t uRFCal1 = 0;
- boost::uint8_t subband = 0;
- boost::int32_t cProg = 0;
- boost::uint8_t gain_taper = 0;
- boost::uint8_t RFBand = 0;
- boost::int32_t RF_A1 = 0;
- boost::int32_t RF_B1 = 0;
+ uint32_t uCounter = 0;
+ uint8_t cal_result = 0;
+ uint32_t uRFCal0 = 0;
+ uint32_t uRFCal1 = 0;
+ uint8_t subband = 0;
+ int32_t cProg = 0;
+ uint8_t gain_taper = 0;
+ uint8_t RFBand = 0;
+ int32_t RF_A1 = 0;
+ int32_t RF_B1 = 0;
freq_range_t subband_freqs;
/* read byte 0x26-0x2B */
read_reg(0x26, 0x2B);
subband_freqs = get_tda18272_rfcal_result_freq_range(1);
- uRFCal0 = boost::uint32_t(subband_freqs.start());
+ uRFCal0 = uint32_t(subband_freqs.start());
subband_freqs = get_tda18272_rfcal_result_freq_range(4);
- uRFCal1 = boost::uint32_t(subband_freqs.start());
+ uRFCal1 = uint32_t(subband_freqs.start());
if(uRF < uRFCal0)
subband = 0;
@@ -1335,9 +1335,9 @@ void tvrx2::tvrx2_tda18272_tune_rf_filter(boost::uint32_t uRF)
else
{
subband_freqs = get_tda18272_rfcal_result_freq_range(7);
- uRFCal0 = boost::uint32_t(subband_freqs.start());
+ uRFCal0 = uint32_t(subband_freqs.start());
subband_freqs = get_tda18272_rfcal_result_freq_range(10);
- uRFCal1 = boost::uint32_t(subband_freqs.start());
+ uRFCal1 = uint32_t(subband_freqs.start());
if(uRF < uRFCal0)
subband = 4;
@@ -1351,7 +1351,7 @@ void tvrx2::tvrx2_tda18272_tune_rf_filter(boost::uint32_t uRF)
cal_result = _rfcal_coeffs[subband].cal_number;
subband_freqs = get_tda18272_rfcal_result_freq_range(cal_result);
- uRFCal0 = boost::uint32_t(subband_freqs.start());
+ uRFCal0 = uint32_t(subband_freqs.start());
RF_A1 = _rfcal_coeffs[subband].RF_A1;
RF_B1 = _rfcal_coeffs[subband].RF_B1;
@@ -1364,13 +1364,13 @@ void tvrx2::tvrx2_tda18272_tune_rf_filter(boost::uint32_t uRF)
gain_taper = tvrx2_tda18272_freq_map[uCounter - 1].gain_taper;
RFBand = tvrx2_tda18272_freq_map[uCounter - 1].rf_band;
- cProg = (boost::int32_t)(cProg + RF_B1 + (RF_A1*((boost::int32_t)(uRF - uRFCal0)/1000))/1000000);
+ cProg = (int32_t)(cProg + RF_B1 + (RF_A1*((int32_t)(uRF - uRFCal0)/1000))/1000000);
if(cProg>255) cProg = 255;
if(cProg<0) cProg = 0;
_tda18272hnm_regs.rf_filter_bypass = 1;
- _tda18272hnm_regs.rf_filter_cap = (boost::uint8_t) cProg;
+ _tda18272hnm_regs.rf_filter_cap = (uint8_t) cProg;
_tda18272hnm_regs.gain_taper = gain_taper;
_tda18272hnm_regs.rf_filter_band = RFBand;
@@ -1462,7 +1462,7 @@ void tvrx2::test_rf_filter_robustness(void){
read_reg(0x38, 0x43);
- uhd::dict<std::string, boost::uint8_t> filter_cal_regs = map_list_of
+ uhd::dict<std::string, uint8_t> filter_cal_regs = map_list_of
("VHFLow_0", 0x38)
("VHFLow_1", 0x3a)
("VHFHigh_0", 0x3b)
@@ -1474,7 +1474,7 @@ void tvrx2::test_rf_filter_robustness(void){
;
BOOST_FOREACH(const std::string &name, filter_cal_regs.keys()){
- boost::uint8_t cal_result = _tda18272hnm_regs.get_reg(filter_cal_regs[name]);
+ uint8_t cal_result = _tda18272hnm_regs.get_reg(filter_cal_regs[name]);
if (cal_result & 0x80) {
_filter_ratings.set(name, "E");
_filter_margins.set(name, 0.0);
diff --git a/host/lib/usrp/dboard/db_twinrx.cpp b/host/lib/usrp/dboard/db_twinrx.cpp
index 8fcc31cc7..2af6bc4ff 100644
--- a/host/lib/usrp/dboard/db_twinrx.cpp
+++ b/host/lib/usrp/dboard/db_twinrx.cpp
@@ -171,13 +171,13 @@ public:
prepend_ch("ch/preamp2", _ch_name), false);
expert_factory::add_data_node<bool>(_expert,
prepend_ch("ant/preamp2", _ch_name), false);
- expert_factory::add_data_node<boost::uint8_t>(_expert,
+ expert_factory::add_data_node<uint8_t>(_expert,
prepend_ch("ch/input_atten", _ch_name), 0);
- expert_factory::add_data_node<boost::uint8_t>(_expert,
+ expert_factory::add_data_node<uint8_t>(_expert,
prepend_ch("ant/input_atten", _ch_name), 0);
- expert_factory::add_data_node<boost::uint8_t>(_expert,
+ expert_factory::add_data_node<uint8_t>(_expert,
prepend_ch("ch/lb_atten", _ch_name), 0);
- expert_factory::add_data_node<boost::uint8_t>(_expert,
+ expert_factory::add_data_node<uint8_t>(_expert,
prepend_ch("ch/hb_atten", _ch_name), 0);
expert_factory::add_data_node<twinrx_ctrl::lo_source_t>(_expert,
prepend_ch("ch/LO1/source", _ch_name), twinrx_ctrl::LO_INTERNAL);
diff --git a/host/lib/usrp/dboard/db_wbx_common.cpp b/host/lib/usrp/dboard/db_wbx_common.cpp
index 6539e798a..5afbb1f88 100644
--- a/host/lib/usrp/dboard/db_wbx_common.cpp
+++ b/host/lib/usrp/dboard/db_wbx_common.cpp
@@ -65,7 +65,7 @@ wbx_base::wbx_base(ctor_args_t args) : xcvr_dboard_base(args){
////////////////////////////////////////////////////////////////////
// Register RX and TX properties
////////////////////////////////////////////////////////////////////
- boost::uint16_t rx_id = this->get_rx_id().to_uint16();
+ uint16_t rx_id = this->get_rx_id().to_uint16();
this->get_rx_subtree()->create<device_addr_t>("tune_args").set(device_addr_t());
this->get_rx_subtree()->create<sensor_value_t>("sensors/lo_locked")
@@ -139,7 +139,7 @@ void wbx_base::set_rx_enabled(bool enb){
double wbx_base::set_rx_gain(double gain, const std::string &name){
assert_has(wbx_rx_gain_ranges.keys(), name, "wbx rx gain name");
if(name == "PGA0"){
- boost::uint16_t io_bits = rx_pga0_gain_to_iobits(gain);
+ uint16_t io_bits = rx_pga0_gain_to_iobits(gain);
_rx_gains[name] = gain;
//write the new gain to rx gpio outputs
@@ -157,8 +157,8 @@ sensor_value_t wbx_base::get_locked(dboard_iface::unit_t unit){
return sensor_value_t("LO", locked, "locked", "unlocked");
}
-void wbx_base::wbx_versionx::write_lo_regs(dboard_iface::unit_t unit, const std::vector<boost::uint32_t> &regs) {
- BOOST_FOREACH(boost::uint32_t reg, regs) {
+void wbx_base::wbx_versionx::write_lo_regs(dboard_iface::unit_t unit, const std::vector<uint32_t> &regs) {
+ BOOST_FOREACH(uint32_t reg, regs) {
self_base->get_iface()->write_spi(unit, spi_config_t::EDGE_RISE, reg, 32);
}
}
diff --git a/host/lib/usrp/dboard/db_wbx_common.hpp b/host/lib/usrp/dboard/db_wbx_common.hpp
index 0e339e4a3..a6b2ca852 100644
--- a/host/lib/usrp/dboard/db_wbx_common.hpp
+++ b/host/lib/usrp/dboard/db_wbx_common.hpp
@@ -153,7 +153,7 @@ protected:
adf435x_iface::sptr _txlo;
adf435x_iface::sptr _rxlo;
- void write_lo_regs(dboard_iface::unit_t unit, const std::vector<boost::uint32_t> &regs);
+ void write_lo_regs(dboard_iface::unit_t unit, const std::vector<uint32_t> &regs);
};
diff --git a/host/lib/usrp/dboard/db_wbx_version3.cpp b/host/lib/usrp/dboard/db_wbx_version3.cpp
index 4dcf3bb71..1bd326e6f 100644
--- a/host/lib/usrp/dboard/db_wbx_version3.cpp
+++ b/host/lib/usrp/dboard/db_wbx_version3.cpp
@@ -175,7 +175,7 @@ void wbx_base::wbx_version3::set_tx_enabled(bool enb){
double wbx_base::wbx_version3::set_tx_gain(double gain, const std::string &name){
assert_has(wbx_v3_tx_gain_ranges.keys(), name, "wbx tx gain name");
if(name == "PGA0"){
- boost::uint16_t io_bits = tx_pga0_gain_to_iobits(gain);
+ uint16_t io_bits = tx_pga0_gain_to_iobits(gain);
self_base->_tx_gains[name] = gain;
diff --git a/host/lib/usrp/dboard/db_wbx_version4.cpp b/host/lib/usrp/dboard/db_wbx_version4.cpp
index dc351af1d..3cc0f1887 100644
--- a/host/lib/usrp/dboard/db_wbx_version4.cpp
+++ b/host/lib/usrp/dboard/db_wbx_version4.cpp
@@ -87,7 +87,7 @@ wbx_base::wbx_version4::wbx_version4(wbx_base *_self_wbx_base) {
////////////////////////////////////////////////////////////////////
// Register RX properties
////////////////////////////////////////////////////////////////////
- boost::uint16_t rx_id = _self_wbx_base->get_rx_id().to_uint16();
+ uint16_t rx_id = _self_wbx_base->get_rx_id().to_uint16();
if(rx_id == 0x0063) this->get_rx_subtree()->create<std::string>("name").set("WBXv4 RX");
else if(rx_id == 0x0081) this->get_rx_subtree()->create<std::string>("name").set("WBX-120 RX");
@@ -182,7 +182,7 @@ void wbx_base::wbx_version4::set_tx_enabled(bool enb) {
double wbx_base::wbx_version4::set_tx_gain(double gain, const std::string &name) {
assert_has(wbx_v4_tx_gain_ranges.keys(), name, "wbx tx gain name");
if(name == "PGA0"){
- boost::uint16_t io_bits = tx_pga0_gain_to_iobits(gain);
+ uint16_t io_bits = tx_pga0_gain_to_iobits(gain);
self_base->_tx_gains[name] = gain;
diff --git a/host/lib/usrp/dboard/db_xcvr2450.cpp b/host/lib/usrp/dboard/db_xcvr2450.cpp
index 0f839b03e..6876ee4be 100644
--- a/host/lib/usrp/dboard/db_xcvr2450.cpp
+++ b/host/lib/usrp/dboard/db_xcvr2450.cpp
@@ -133,8 +133,8 @@ private:
void update_atr(void);
void spi_reset(void);
- void send_reg(boost::uint8_t addr){
- boost::uint32_t value = _max2829_regs.get_reg(addr);
+ void send_reg(uint8_t addr){
+ uint32_t value = _max2829_regs.get_reg(addr);
UHD_LOGV(often) << boost::format(
"XCVR2450: send reg 0x%02x, value 0x%05x"
) % int(addr) % value << std::endl;
@@ -221,7 +221,7 @@ xcvr2450::xcvr2450(ctor_args_t args) : xcvr_dboard_base(args){
_max2829_regs.tx_upconv_linearity = max2829_regs_t::TX_UPCONV_LINEARITY_78;
//send initial register settings
- for(boost::uint8_t reg = 0x2; reg <= 0xC; reg++){
+ for(uint8_t reg = 0x2; reg <= 0xC; reg++){
this->send_reg(reg);
}
diff --git a/host/lib/usrp/dboard/twinrx/twinrx_ctrl.cpp b/host/lib/usrp/dboard/twinrx/twinrx_ctrl.cpp
index 172992f0a..dfbea9917 100644
--- a/host/lib/usrp/dboard/twinrx/twinrx_ctrl.cpp
+++ b/host/lib/usrp/dboard/twinrx/twinrx_ctrl.cpp
@@ -27,7 +27,7 @@ using namespace usrp;
using namespace dboard::twinrx;
typedef twinrx_cpld_regmap rm;
-static boost::uint32_t bool2bin(bool x) { return x ? 1 : 0; }
+static uint32_t bool2bin(bool x) { return x ? 1 : 0; }
static const double TWINRX_DESIRED_REFERENCE_FREQ = 50e6;
@@ -224,7 +224,7 @@ public:
void set_lb_preselector(channel_t ch, preselector_path_t path, bool commit = true)
{
boost::lock_guard<boost::mutex> lock(_mutex);
- boost::uint32_t sw7val = 0, sw8val = 0;
+ uint32_t sw7val = 0, sw8val = 0;
switch (path) {
case PRESEL_PATH1: sw7val = 3; sw8val = 1; break;
case PRESEL_PATH2: sw7val = 2; sw8val = 0; break;
@@ -246,7 +246,7 @@ public:
void set_hb_preselector(channel_t ch, preselector_path_t path, bool commit = true)
{
boost::lock_guard<boost::mutex> lock(_mutex);
- boost::uint32_t sw9ch1val = 0, sw10ch1val = 0, sw9ch2val = 0, sw10ch2val = 0;
+ uint32_t sw9ch1val = 0, sw10ch1val = 0, sw9ch2val = 0, sw10ch2val = 0;
switch (path) {
case PRESEL_PATH1: sw9ch1val = 3; sw10ch1val = 0; sw9ch2val = 0; sw10ch2val = 3; break;
case PRESEL_PATH2: sw9ch1val = 1; sw10ch1val = 2; sw9ch2val = 1; sw10ch2val = 1; break;
@@ -266,7 +266,7 @@ public:
}
- void set_input_atten(channel_t ch, boost::uint8_t atten, bool commit = true)
+ void set_input_atten(channel_t ch, uint8_t atten, bool commit = true)
{
boost::lock_guard<boost::mutex> lock(_mutex);
if (ch == CH1 or ch == BOTH) {
@@ -278,7 +278,7 @@ public:
if (commit) _commit();
}
- void set_lb_atten(channel_t ch, boost::uint8_t atten, bool commit = true)
+ void set_lb_atten(channel_t ch, uint8_t atten, bool commit = true)
{
boost::lock_guard<boost::mutex> lock(_mutex);
if (ch == CH1 or ch == BOTH) {
@@ -290,7 +290,7 @@ public:
if (commit) _commit();
}
- void set_hb_atten(channel_t ch, boost::uint8_t atten, bool commit = true)
+ void set_hb_atten(channel_t ch, uint8_t atten, bool commit = true)
{
boost::lock_guard<boost::mutex> lock(_mutex);
if (ch == CH1 or ch == BOTH) {
@@ -502,9 +502,9 @@ private: //Functions
_cpld_regs->if0_reg2.flush();
}
- void _write_lo_spi(dboard_iface::unit_t unit, const std::vector<boost::uint32_t> &regs)
+ void _write_lo_spi(dboard_iface::unit_t unit, const std::vector<uint32_t> &regs)
{
- BOOST_FOREACH(boost::uint32_t reg, regs) {
+ BOOST_FOREACH(uint32_t reg, regs) {
spi_config_t spi_config = spi_config_t(spi_config_t::EDGE_RISE);
spi_config.use_custom_divider = true;
spi_config.divider = 67;
diff --git a/host/lib/usrp/dboard/twinrx/twinrx_ctrl.hpp b/host/lib/usrp/dboard/twinrx/twinrx_ctrl.hpp
index 521e27ae9..5537d00ab 100644
--- a/host/lib/usrp/dboard/twinrx/twinrx_ctrl.hpp
+++ b/host/lib/usrp/dboard/twinrx/twinrx_ctrl.hpp
@@ -69,11 +69,11 @@ public:
virtual void set_hb_preselector(channel_t ch, preselector_path_t path, bool commit = true) = 0;
- virtual void set_input_atten(channel_t ch, boost::uint8_t atten, bool commit = true) = 0;
+ virtual void set_input_atten(channel_t ch, uint8_t atten, bool commit = true) = 0;
- virtual void set_lb_atten(channel_t ch, boost::uint8_t atten, bool commit = true) = 0;
+ virtual void set_lb_atten(channel_t ch, uint8_t atten, bool commit = true) = 0;
- virtual void set_hb_atten(channel_t ch, boost::uint8_t atten, bool commit = true) = 0;
+ virtual void set_hb_atten(channel_t ch, uint8_t atten, bool commit = true) = 0;
virtual void set_lo1_source(channel_t ch, lo_source_t source, bool commit = true) = 0;
diff --git a/host/lib/usrp/dboard/twinrx/twinrx_experts.hpp b/host/lib/usrp/dboard/twinrx/twinrx_experts.hpp
index 9c83dbfa8..7b85137e1 100644
--- a/host/lib/usrp/dboard/twinrx/twinrx_experts.hpp
+++ b/host/lib/usrp/dboard/twinrx/twinrx_experts.hpp
@@ -436,9 +436,9 @@ private:
experts::data_reader_t<twinrx_ctrl::preselector_path_t> _hb_presel;
experts::data_reader_t<twinrx_ctrl::antenna_mapping_t> _ant_mapping;
//Outputs
- experts::data_writer_t<boost::uint8_t> _input_atten;
- experts::data_writer_t<boost::uint8_t> _lb_atten;
- experts::data_writer_t<boost::uint8_t> _hb_atten;
+ experts::data_writer_t<uint8_t> _input_atten;
+ experts::data_writer_t<uint8_t> _lb_atten;
+ experts::data_writer_t<uint8_t> _hb_atten;
experts::data_writer_t<twinrx_ctrl::preamp_state_t> _preamp1;
experts::data_writer_t<bool> _preamp2;
};
@@ -499,21 +499,21 @@ private:
//Inputs
experts::data_reader_t<twinrx_ctrl::antenna_mapping_t> _ant_mapping;
- experts::data_reader_t<boost::uint8_t> _ch0_input_atten;
+ experts::data_reader_t<uint8_t> _ch0_input_atten;
experts::data_reader_t<twinrx_ctrl::preamp_state_t> _ch0_preamp1;
experts::data_reader_t<bool> _ch0_preamp2;
experts::data_reader_t<bool> _ch0_lb_preamp_presel;
- experts::data_reader_t<boost::uint8_t> _ch1_input_atten;
+ experts::data_reader_t<uint8_t> _ch1_input_atten;
experts::data_reader_t<twinrx_ctrl::preamp_state_t> _ch1_preamp1;
experts::data_reader_t<bool> _ch1_preamp2;
experts::data_reader_t<bool> _ch1_lb_preamp_presel;
//Outputs
- experts::data_writer_t<boost::uint8_t> _ant0_input_atten;
+ experts::data_writer_t<uint8_t> _ant0_input_atten;
experts::data_writer_t<twinrx_ctrl::preamp_state_t> _ant0_preamp1;
experts::data_writer_t<bool> _ant0_preamp2;
experts::data_writer_t<bool> _ant0_lb_preamp_presel;
- experts::data_writer_t<boost::uint8_t> _ant1_input_atten;
+ experts::data_writer_t<uint8_t> _ant1_input_atten;
experts::data_writer_t<twinrx_ctrl::preamp_state_t> _ant1_preamp1;
experts::data_writer_t<bool> _ant1_preamp2;
experts::data_writer_t<bool> _ant1_lb_preamp_presel;
@@ -623,9 +623,9 @@ private:
experts::data_reader_t<twinrx_ctrl::signal_path_t> signal_path;
experts::data_reader_t<twinrx_ctrl::preselector_path_t> lb_presel;
experts::data_reader_t<twinrx_ctrl::preselector_path_t> hb_presel;
- experts::data_reader_t<boost::uint8_t> input_atten;
- experts::data_reader_t<boost::uint8_t> lb_atten;
- experts::data_reader_t<boost::uint8_t> hb_atten;
+ experts::data_reader_t<uint8_t> input_atten;
+ experts::data_reader_t<uint8_t> lb_atten;
+ experts::data_reader_t<uint8_t> hb_atten;
experts::data_reader_t<twinrx_ctrl::lo_source_t> lo1_source;
experts::data_reader_t<twinrx_ctrl::lo_source_t> lo2_source;
experts::data_reader_t<double> lo1_freq_d;
diff --git a/host/lib/usrp/dboard/twinrx/twinrx_gain_tables.hpp b/host/lib/usrp/dboard/twinrx/twinrx_gain_tables.hpp
index 0148965da..8ebab4243 100644
--- a/host/lib/usrp/dboard/twinrx/twinrx_gain_tables.hpp
+++ b/host/lib/usrp/dboard/twinrx/twinrx_gain_tables.hpp
@@ -19,7 +19,7 @@
#define INCLUDED_DBOARD_TWINRX_GAIN_TABLES_HPP
#include <uhd/config.hpp>
-#include <boost/cstdint.hpp>
+#include <stdint.h>
#include <uhd/types/ranges.hpp>
#include "twinrx_ctrl.hpp"
@@ -29,7 +29,7 @@ class twinrx_gain_config_t {
public:
twinrx_gain_config_t(
size_t index_, double sys_gain_,
- boost::uint8_t atten1_, boost::uint8_t atten2_,
+ uint8_t atten1_, uint8_t atten2_,
bool amp1_, bool amp2_
): index(index_), sys_gain(sys_gain_), atten1(atten1_), atten2(atten2_),
amp1(amp1_), amp2(amp2_)
@@ -49,8 +49,8 @@ public:
size_t index;
double sys_gain;
- boost::uint8_t atten1;
- boost::uint8_t atten2;
+ uint8_t atten1;
+ uint8_t atten2;
bool amp1;
bool amp2;
};
diff --git a/host/lib/usrp/dboard/twinrx/twinrx_io.hpp b/host/lib/usrp/dboard/twinrx/twinrx_io.hpp
index 5d099e361..4fa5a22d5 100644
--- a/host/lib/usrp/dboard/twinrx/twinrx_io.hpp
+++ b/host/lib/usrp/dboard/twinrx/twinrx_io.hpp
@@ -26,13 +26,13 @@
namespace uhd { namespace usrp { namespace dboard { namespace twinrx {
-static const boost::uint32_t SET_ALL_BITS = 0xFFFFFFFF;
+static const uint32_t SET_ALL_BITS = 0xFFFFFFFF;
namespace cpld {
-static wb_iface::wb_addr_type addr(boost::uint8_t cpld_num, boost::uint8_t cpld_addr) {
+static wb_iface::wb_addr_type addr(uint8_t cpld_num, uint8_t cpld_addr) {
//Decode CPLD addressing for the following bitmap:
// {CPLD1_EN, CPLD2_EN, CPLD3_EN, CPLD4_EN, CPLD_ADDR[2:0]}
- boost::uint8_t addr = 0;
+ uint8_t addr = 0;
switch (cpld_num) {
case 1: addr = 0x8 << 3; break;
case 2: addr = 0x4 << 3; break;
@@ -43,8 +43,8 @@ static wb_iface::wb_addr_type addr(boost::uint8_t cpld_num, boost::uint8_t cpld_
return static_cast<wb_iface::wb_addr_type>(addr | (cpld_addr & 0x7));
}
-static boost::uint32_t get_reg(wb_iface::wb_addr_type addr) {
- return static_cast<boost::uint32_t>(addr) & 0x7;
+static uint32_t get_reg(wb_iface::wb_addr_type addr) {
+ return static_cast<uint32_t>(addr) & 0x7;
}
}
@@ -84,37 +84,37 @@ public:
_db_iface->set_gpio_ddr(dboard_iface::UNIT_BOTH, ~GPIO_OUTPUT_MASK, SET_ALL_BITS);
}
- void set_field(const uhd::soft_reg_field_t field, const boost::uint32_t value) {
+ void set_field(const uhd::soft_reg_field_t field, const uint32_t value) {
boost::lock_guard<boost::mutex> lock(_mutex);
using namespace soft_reg_field;
_db_iface->set_gpio_out(dboard_iface::UNIT_BOTH,
(value << shift(field)),
- mask<boost::uint32_t>(field));
+ mask<uint32_t>(field));
}
- boost::uint32_t get_field(const uhd::soft_reg_field_t field) {
+ uint32_t get_field(const uhd::soft_reg_field_t field) {
boost::lock_guard<boost::mutex> lock(_mutex);
using namespace soft_reg_field;
- return (_db_iface->read_gpio(dboard_iface::UNIT_BOTH) & mask<boost::uint32_t>(field)) >> shift(field);
+ return (_db_iface->read_gpio(dboard_iface::UNIT_BOTH) & mask<uint32_t>(field)) >> shift(field);
}
// CPLD register write-only interface
- void poke32(const wb_addr_type addr, const boost::uint32_t data) {
+ void poke32(const wb_addr_type addr, const uint32_t data) {
boost::lock_guard<boost::mutex> lock(_mutex);
using namespace soft_reg_field;
//Step 1: Write the reg offset and data to the GPIO bus and de-assert all enables
_db_iface->set_gpio_out(dboard_iface::UNIT_BOTH,
(cpld::get_reg(addr) << shift(CPLD_FULL_ADDR)) | (data << shift(CPLD_DATA)),
- mask<boost::uint32_t>(CPLD_FULL_ADDR)|mask<boost::uint32_t>(CPLD_DATA));
+ mask<uint32_t>(CPLD_FULL_ADDR)|mask<uint32_t>(CPLD_DATA));
//Sleep for 166ns to ensure that we don't toggle the enables too quickly
//The underlying sleep function rounds to microsecond precision.
_db_iface->sleep(boost::chrono::nanoseconds(166));
//Step 2: Write the reg offset and data, and assert the necessary enable
_db_iface->set_gpio_out(dboard_iface::UNIT_BOTH,
- (static_cast<boost::uint32_t>(addr) << shift(CPLD_FULL_ADDR)) | (data << shift(CPLD_DATA)),
- mask<boost::uint32_t>(CPLD_FULL_ADDR)|mask<boost::uint32_t>(CPLD_DATA));
+ (static_cast<uint32_t>(addr) << shift(CPLD_FULL_ADDR)) | (data << shift(CPLD_DATA)),
+ mask<uint32_t>(CPLD_FULL_ADDR)|mask<uint32_t>(CPLD_DATA));
}
// Timed command interface
@@ -128,8 +128,8 @@ public:
}
private: //Members/definitions
- static const boost::uint32_t GPIO_OUTPUT_MASK = 0xFC06FE03;
- static const boost::uint32_t GPIO_PINCTRL_MASK = 0x00000000;
+ static const uint32_t GPIO_OUTPUT_MASK = 0xFC06FE03;
+ static const uint32_t GPIO_PINCTRL_MASK = 0x00000000;
//Private GPIO fields
UHD_DEFINE_SOFT_REG_FIELD(CPLD_FULL_ADDR, /*width*/ 7, /*shift*/ 9); //GPIO[15:9]
diff --git a/host/lib/usrp/dboard_eeprom.cpp b/host/lib/usrp/dboard_eeprom.cpp
index 3b56ae19a..9c748f556 100644
--- a/host/lib/usrp/dboard_eeprom.cpp
+++ b/host/lib/usrp/dboard_eeprom.cpp
@@ -63,13 +63,13 @@ using namespace uhd::usrp;
////////////////////////////////////////////////////////////////////////
//negative sum of bytes excluding checksum byte
-static boost::uint8_t checksum(const byte_vector_t &bytes){
+static uint8_t checksum(const byte_vector_t &bytes){
int sum = 0;
for (size_t i = 0; i < std::min(bytes.size(), size_t(DB_EEPROM_CHKSUM)); i++){
sum -= int(bytes.at(i));
}
UHD_LOGV(often) << boost::format("sum: 0x%02x") % sum << std::endl;
- return boost::uint8_t(sum);
+ return uint8_t(sum);
}
dboard_eeprom_t::dboard_eeprom_t(void){
@@ -77,7 +77,7 @@ dboard_eeprom_t::dboard_eeprom_t(void){
serial = "";
}
-void dboard_eeprom_t::load(i2c_iface &iface, boost::uint8_t addr){
+void dboard_eeprom_t::load(i2c_iface &iface, uint8_t addr){
byte_vector_t bytes = iface.read_eeprom(addr, 0, DB_EEPROM_CLEN);
std::ostringstream ss;
@@ -95,8 +95,8 @@ void dboard_eeprom_t::load(i2c_iface &iface, boost::uint8_t addr){
//parse the ids
id = dboard_id_t::from_uint16(0
- | (boost::uint16_t(bytes[DB_EEPROM_ID_LSB]) << 0)
- | (boost::uint16_t(bytes[DB_EEPROM_ID_MSB]) << 8)
+ | (uint16_t(bytes[DB_EEPROM_ID_LSB]) << 0)
+ | (uint16_t(bytes[DB_EEPROM_ID_MSB]) << 8)
);
//parse the serial
@@ -106,9 +106,9 @@ void dboard_eeprom_t::load(i2c_iface &iface, boost::uint8_t addr){
);
//parse the revision
- const boost::uint16_t rev_num = 0
- | (boost::uint16_t(bytes[DB_EEPROM_REV_LSB]) << 0)
- | (boost::uint16_t(bytes[DB_EEPROM_REV_MSB]) << 8)
+ const uint16_t rev_num = 0
+ | (uint16_t(bytes[DB_EEPROM_REV_LSB]) << 0)
+ | (uint16_t(bytes[DB_EEPROM_REV_MSB]) << 8)
;
if (rev_num != 0 and rev_num != 0xffff){
revision = boost::lexical_cast<std::string>(rev_num);
@@ -120,13 +120,13 @@ void dboard_eeprom_t::load(i2c_iface &iface, boost::uint8_t addr){
}
}
-void dboard_eeprom_t::store(i2c_iface &iface, boost::uint8_t addr) const{
+void dboard_eeprom_t::store(i2c_iface &iface, uint8_t addr) const{
byte_vector_t bytes(DB_EEPROM_CLEN, 0); //defaults to all zeros
bytes[DB_EEPROM_MAGIC] = DB_EEPROM_MAGIC_VALUE;
//load the id bytes
- bytes[DB_EEPROM_ID_LSB] = boost::uint8_t(id.to_uint16() >> 0);
- bytes[DB_EEPROM_ID_MSB] = boost::uint8_t(id.to_uint16() >> 8);
+ bytes[DB_EEPROM_ID_LSB] = uint8_t(id.to_uint16() >> 0);
+ bytes[DB_EEPROM_ID_MSB] = uint8_t(id.to_uint16() >> 8);
//load the serial bytes
byte_vector_t ser_bytes = string_to_bytes(serial, DB_EEPROM_SERIAL_LEN);
@@ -134,9 +134,9 @@ void dboard_eeprom_t::store(i2c_iface &iface, boost::uint8_t addr) const{
//load the revision bytes
if (not revision.empty()){
- const boost::uint16_t rev_num = boost::lexical_cast<boost::uint16_t>(revision);
- bytes[DB_EEPROM_REV_LSB] = boost::uint8_t(rev_num >> 0);
- bytes[DB_EEPROM_REV_MSB] = boost::uint8_t(rev_num >> 8);
+ const uint16_t rev_num = boost::lexical_cast<uint16_t>(revision);
+ bytes[DB_EEPROM_REV_LSB] = uint8_t(rev_num >> 0);
+ bytes[DB_EEPROM_REV_MSB] = uint8_t(rev_num >> 8);
}
//load the checksum
diff --git a/host/lib/usrp/dboard_id.cpp b/host/lib/usrp/dboard_id.cpp
index 557e13914..b4d458c5f 100644
--- a/host/lib/usrp/dboard_id.cpp
+++ b/host/lib/usrp/dboard_id.cpp
@@ -23,7 +23,7 @@
using namespace uhd::usrp;
-dboard_id_t::dboard_id_t(boost::uint16_t id){
+dboard_id_t::dboard_id_t(uint16_t id){
_id = id;
}
@@ -31,11 +31,11 @@ dboard_id_t dboard_id_t::none(void){
return dboard_id_t();
}
-dboard_id_t dboard_id_t::from_uint16(boost::uint16_t uint16){
+dboard_id_t dboard_id_t::from_uint16(uint16_t uint16){
return dboard_id_t(uint16);
}
-boost::uint16_t dboard_id_t::to_uint16(void) const{
+uint16_t dboard_id_t::to_uint16(void) const{
return _id;
}
@@ -52,11 +52,11 @@ template <class T> struct to_hex{
dboard_id_t dboard_id_t::from_string(const std::string &string){
if (string.substr(0, 2) == "0x"){
std::stringstream interpreter(string);
- to_hex<boost::uint16_t> hh;
+ to_hex<uint16_t> hh;
interpreter >> hh;
return dboard_id_t::from_uint16(hh);
}
- return dboard_id_t::from_uint16(boost::lexical_cast<boost::uint16_t>(string));
+ return dboard_id_t::from_uint16(boost::lexical_cast<uint16_t>(string));
}
std::string dboard_id_t::to_string(void) const{
diff --git a/host/lib/usrp/device3/device3_impl.hpp b/host/lib/usrp/device3/device3_impl.hpp
index 309559f92..117e4af1c 100644
--- a/host/lib/usrp/device3/device3_impl.hpp
+++ b/host/lib/usrp/device3/device3_impl.hpp
@@ -42,8 +42,8 @@ static const size_t DEVICE3_RX_FC_REQUEST_FREQ = 32; //per flow-contr
static const size_t DEVICE3_TX_FC_RESPONSE_FREQ = 8;
static const size_t DEVICE3_TX_FC_RESPONSE_CYCLES = 0; // Cycles: Off.
-static const size_t DEVICE3_TX_MAX_HDR_LEN = uhd::transport::vrt::chdr::max_if_hdr_words64 * sizeof(boost::uint64_t); // Bytes
-static const size_t DEVICE3_RX_MAX_HDR_LEN = uhd::transport::vrt::chdr::max_if_hdr_words64 * sizeof(boost::uint64_t); // Bytes
+static const size_t DEVICE3_TX_MAX_HDR_LEN = uhd::transport::vrt::chdr::max_if_hdr_words64 * sizeof(uint64_t); // Bytes
+static const size_t DEVICE3_RX_MAX_HDR_LEN = uhd::transport::vrt::chdr::max_if_hdr_words64 * sizeof(uint64_t); // Bytes
class device3_impl : public uhd::device3, public boost::enable_shared_from_this<device3_impl>
{
diff --git a/host/lib/usrp/device3/device3_io_impl.cpp b/host/lib/usrp/device3/device3_io_impl.cpp
index 753cd1235..4ec14c43b 100644
--- a/host/lib/usrp/device3/device3_io_impl.cpp
+++ b/host/lib/usrp/device3/device3_io_impl.cpp
@@ -39,7 +39,7 @@ using namespace uhd::usrp;
using namespace uhd::transport;
//! CVITA uses 12-Bit sequence numbers
-static const boost::uint32_t HW_SEQ_NUM_MASK = 0xfff;
+static const uint32_t HW_SEQ_NUM_MASK = 0xfff;
/***********************************************************************
@@ -236,7 +236,7 @@ static void handle_rx_flowctrl(
if (not buff) {
throw uhd::runtime_error("handle_rx_flowctrl timed out getting a send buffer");
}
- boost::uint32_t *pkt = buff->cast<boost::uint32_t *>();
+ uint32_t *pkt = buff->cast<uint32_t *>();
// Recover sequence number. The sequence numbers handled by the streamers
// are 12 Bits, but we want to know the 32-Bit sequence number.
@@ -255,7 +255,7 @@ static void handle_rx_flowctrl(
vrt::if_packet_info_t packet_info;
packet_info.packet_type = vrt::if_packet_info_t::PACKET_TYPE_FC;
packet_info.num_payload_words32 = RXFC_PACKET_LEN_IN_WORDS;
- packet_info.num_payload_bytes = packet_info.num_payload_words32*sizeof(boost::uint32_t);
+ packet_info.num_payload_bytes = packet_info.num_payload_words32*sizeof(uint32_t);
packet_info.packet_count = seq32;
packet_info.sob = false;
packet_info.eob = false;
@@ -270,14 +270,14 @@ static void handle_rx_flowctrl(
// Load Header:
vrt::chdr::if_hdr_pack_be(pkt, packet_info);
// Load Payload: (the sequence number)
- pkt[packet_info.num_header_words32+RXFC_CMD_CODE_OFFSET] = uhd::htonx<boost::uint32_t>(0);
- pkt[packet_info.num_header_words32+RXFC_SEQ_NUM_OFFSET] = uhd::htonx<boost::uint32_t>(seq32);
+ pkt[packet_info.num_header_words32+RXFC_CMD_CODE_OFFSET] = uhd::htonx<uint32_t>(0);
+ pkt[packet_info.num_header_words32+RXFC_SEQ_NUM_OFFSET] = uhd::htonx<uint32_t>(seq32);
} else {
// Load Header:
vrt::chdr::if_hdr_pack_le(pkt, packet_info);
// Load Payload: (the sequence number)
- pkt[packet_info.num_header_words32+RXFC_CMD_CODE_OFFSET] = uhd::htowx<boost::uint32_t>(0);
- pkt[packet_info.num_header_words32+RXFC_SEQ_NUM_OFFSET] = uhd::htowx<boost::uint32_t>(seq32);
+ pkt[packet_info.num_header_words32+RXFC_CMD_CODE_OFFSET] = uhd::htowx<uint32_t>(0);
+ pkt[packet_info.num_header_words32+RXFC_SEQ_NUM_OFFSET] = uhd::htowx<uint32_t>(seq32);
}
//std::cout << " SID=" << std::hex << sid << " hdr bits=" << packet_info.packet_type << " seq32=" << seq32 << std::endl;
@@ -290,7 +290,7 @@ static void handle_rx_flowctrl(
//}
//send the buffer over the interface
- buff->commit(sizeof(boost::uint32_t)*(packet_info.num_packet_words32));
+ buff->commit(sizeof(uint32_t)*(packet_info.num_packet_words32));
}
/***********************************************************************
@@ -384,11 +384,11 @@ static void handle_tx_async_msgs(
//extract packet info
vrt::if_packet_info_t if_packet_info;
- if_packet_info.num_packet_words32 = buff->size()/sizeof(boost::uint32_t);
- const boost::uint32_t *packet_buff = buff->cast<const boost::uint32_t *>();
+ if_packet_info.num_packet_words32 = buff->size()/sizeof(uint32_t);
+ const uint32_t *packet_buff = buff->cast<const uint32_t *>();
//unpacking can fail
- boost::uint32_t (*endian_conv)(boost::uint32_t) = uhd::ntohx;
+ uint32_t (*endian_conv)(uint32_t) = uhd::ntohx;
try
{
if (endianness == ENDIANNESS_BIG)
diff --git a/host/lib/usrp/e100/clock_ctrl.cpp b/host/lib/usrp/e100/clock_ctrl.cpp
index 9e355ce17..0dbd6a5d3 100644
--- a/host/lib/usrp/e100/clock_ctrl.cpp
+++ b/host/lib/usrp/e100/clock_ctrl.cpp
@@ -20,7 +20,7 @@
#include <uhd/utils/msg.hpp>
#include <uhd/utils/log.hpp>
#include <uhd/utils/assert_has.hpp>
-#include <boost/cstdint.hpp>
+#include <stdint.h>
#include "e100_regs.hpp" //spi slave constants
#include <boost/assign/list_of.hpp>
#include <boost/foreach.hpp>
@@ -107,8 +107,8 @@ static clock_settings_type get_clock_settings(double rate){
//X = chan_div * vco_div * R
//Y = P*B + A
- const boost::uint64_t out_rate = boost::uint64_t(rate);
- const boost::uint64_t ref_rate = boost::uint64_t(cs.get_ref_rate());
+ const uint64_t out_rate = uint64_t(rate);
+ const uint64_t ref_rate = uint64_t(cs.get_ref_rate());
const size_t gcd = size_t(boost::math::gcd(ref_rate, out_rate));
for (size_t i = 1; i <= 100; i++){
@@ -436,8 +436,8 @@ public:
}
bool get_locked(void){
- static const boost::uint8_t addr = 0x01F;
- boost::uint32_t reg = _iface->read_spi(
+ static const uint8_t addr = 0x01F;
+ uint32_t reg = _iface->read_spi(
UE_SPI_SS_AD9522, spi_config_t::EDGE_RISE,
_ad9522_regs.get_read_reg(addr), 24
);
@@ -458,8 +458,8 @@ private:
this->send_reg(0x232);
}
- void send_reg(boost::uint16_t addr){
- boost::uint32_t reg = _ad9522_regs.get_write_reg(addr);
+ void send_reg(uint16_t addr){
+ uint32_t reg = _ad9522_regs.get_write_reg(addr);
UHD_LOGV(often) << "clock control write reg: " << std::hex << reg << std::endl;
_iface->write_spi(
UE_SPI_SS_AD9522,
@@ -477,10 +477,10 @@ private:
this->send_reg(0x18);
this->latch_regs();
//wait for calibration done:
- static const boost::uint8_t addr = 0x01F;
+ static const uint8_t addr = 0x01F;
for (size_t ms10 = 0; ms10 < 100; ms10++){
boost::this_thread::sleep(boost::posix_time::milliseconds(10));
- boost::uint32_t reg = _iface->read_spi(
+ uint32_t reg = _iface->read_spi(
UE_SPI_SS_AD9522, spi_config_t::EDGE_RISE,
_ad9522_regs.get_read_reg(addr), 24
);
@@ -492,7 +492,7 @@ private:
//wait for digital lock detect:
for (size_t ms10 = 0; ms10 < 100; ms10++){
boost::this_thread::sleep(boost::posix_time::milliseconds(10));
- boost::uint32_t reg = _iface->read_spi(
+ uint32_t reg = _iface->read_spi(
UE_SPI_SS_AD9522, spi_config_t::EDGE_RISE,
_ad9522_regs.get_read_reg(addr), 24
);
@@ -513,7 +513,7 @@ private:
void send_all_regs(void){
//setup a list of register ranges to write
- typedef std::pair<boost::uint16_t, boost::uint16_t> range_t;
+ typedef std::pair<uint16_t, uint16_t> range_t;
static const std::vector<range_t> ranges = boost::assign::list_of
(range_t(0x000, 0x000)) (range_t(0x010, 0x01F))
(range_t(0x0F0, 0x0FD)) (range_t(0x190, 0x19B))
@@ -522,7 +522,7 @@ private:
//write initial register values and latch/update
BOOST_FOREACH(const range_t &range, ranges){
- for(boost::uint16_t addr = range.first; addr <= range.second; addr++){
+ for(uint16_t addr = range.first; addr <= range.second; addr++){
this->send_reg(addr);
}
}
diff --git a/host/lib/usrp/e100/codec_ctrl.cpp b/host/lib/usrp/e100/codec_ctrl.cpp
index 2c13176a3..7dce01e46 100644
--- a/host/lib/usrp/e100/codec_ctrl.cpp
+++ b/host/lib/usrp/e100/codec_ctrl.cpp
@@ -21,7 +21,7 @@
#include <uhd/types/dict.hpp>
#include <uhd/exception.hpp>
#include <uhd/utils/algorithm.hpp>
-#include <boost/cstdint.hpp>
+#include <stdint.h>
#include <boost/tuple/tuple.hpp>
#include <boost/math/special_functions/round.hpp>
#include "e100_regs.hpp" //spi slave constants
@@ -54,8 +54,8 @@ public:
private:
spi_iface::sptr _iface;
ad9862_regs_t _ad9862_regs;
- void send_reg(boost::uint8_t addr);
- void recv_reg(boost::uint8_t addr);
+ void send_reg(uint8_t addr);
+ void recv_reg(uint8_t addr);
};
/***********************************************************************
@@ -110,7 +110,7 @@ e100_codec_ctrl_impl::e100_codec_ctrl_impl(spi_iface::sptr iface){
//_ad9862_regs.dis2 = ad9862_regs_t::DIS2_DIS; needed for transmit
//write the register settings to the codec
- for (boost::uint8_t addr = 0; addr <= 25; addr++){
+ for (uint8_t addr = 0; addr <= 25; addr++){
this->send_reg(addr);
}
@@ -185,8 +185,8 @@ double e100_codec_ctrl_impl::get_rx_pga_gain(char which){
/***********************************************************************
* Codec Control AUX ADC Methods
**********************************************************************/
-static double aux_adc_to_volts(boost::uint8_t high, boost::uint8_t low){
- return double((boost::uint16_t(high) << 2) | low)*3.3/0x3ff;
+static double aux_adc_to_volts(uint8_t high, uint8_t low){
+ return double((uint16_t(high) << 2) | low)*3.3/0x3ff;
}
double e100_codec_ctrl_impl::read_aux_adc(aux_adc_t which){
@@ -228,19 +228,19 @@ double e100_codec_ctrl_impl::read_aux_adc(aux_adc_t which){
void e100_codec_ctrl_impl::write_aux_dac(aux_dac_t which, double volts){
//special case for aux dac d (aka sigma delta word)
if (which == AUX_DAC_D){
- boost::uint16_t dac_word = uhd::clip(boost::math::iround(volts*0xfff/3.3), 0, 0xfff);
- _ad9862_regs.sig_delt_11_4 = boost::uint8_t(dac_word >> 4);
- _ad9862_regs.sig_delt_3_0 = boost::uint8_t(dac_word & 0xf);
+ uint16_t dac_word = uhd::clip(boost::math::iround(volts*0xfff/3.3), 0, 0xfff);
+ _ad9862_regs.sig_delt_11_4 = uint8_t(dac_word >> 4);
+ _ad9862_regs.sig_delt_3_0 = uint8_t(dac_word & 0xf);
this->send_reg(42);
this->send_reg(43);
return;
}
//calculate the dac word for aux dac a, b, c
- boost::uint8_t dac_word = uhd::clip(boost::math::iround(volts*0xff/3.3), 0, 0xff);
+ uint8_t dac_word = uhd::clip(boost::math::iround(volts*0xff/3.3), 0, 0xff);
//setup a lookup table for the aux dac params (reg ref, reg addr)
- typedef boost::tuple<boost::uint8_t*, boost::uint8_t> dac_params_t;
+ typedef boost::tuple<uint8_t*, uint8_t> dac_params_t;
uhd::dict<aux_dac_t, dac_params_t> aux_dac_to_params = boost::assign::map_list_of
(AUX_DAC_A, dac_params_t(&_ad9862_regs.aux_dac_a, 36))
(AUX_DAC_B, dac_params_t(&_ad9862_regs.aux_dac_b, 37))
@@ -249,7 +249,7 @@ void e100_codec_ctrl_impl::write_aux_dac(aux_dac_t which, double volts){
//set the aux dac register
UHD_ASSERT_THROW(aux_dac_to_params.has_key(which));
- boost::uint8_t *reg_ref, reg_addr;
+ uint8_t *reg_ref, reg_addr;
boost::tie(reg_ref, reg_addr) = aux_dac_to_params[which];
*reg_ref = dac_word;
this->send_reg(reg_addr);
@@ -258,8 +258,8 @@ void e100_codec_ctrl_impl::write_aux_dac(aux_dac_t which, double volts){
/***********************************************************************
* Codec Control SPI Methods
**********************************************************************/
-void e100_codec_ctrl_impl::send_reg(boost::uint8_t addr){
- boost::uint32_t reg = _ad9862_regs.get_write_reg(addr);
+void e100_codec_ctrl_impl::send_reg(uint8_t addr){
+ uint32_t reg = _ad9862_regs.get_write_reg(addr);
UHD_LOGV(often) << "codec control write reg: " << std::hex << reg << std::endl;
_iface->write_spi(
UE_SPI_SS_AD9862,
@@ -268,16 +268,16 @@ void e100_codec_ctrl_impl::send_reg(boost::uint8_t addr){
);
}
-void e100_codec_ctrl_impl::recv_reg(boost::uint8_t addr){
- boost::uint32_t reg = _ad9862_regs.get_read_reg(addr);
+void e100_codec_ctrl_impl::recv_reg(uint8_t addr){
+ uint32_t reg = _ad9862_regs.get_read_reg(addr);
UHD_LOGV(often) << "codec control read reg: " << std::hex << reg << std::endl;
- boost::uint32_t ret = _iface->read_spi(
+ uint32_t ret = _iface->read_spi(
UE_SPI_SS_AD9862,
spi_config_t::EDGE_RISE,
reg, 16
);
UHD_LOGV(often) << "codec control read ret: " << std::hex << ret << std::endl;
- _ad9862_regs.set_reg(addr, boost::uint16_t(ret));
+ _ad9862_regs.set_reg(addr, uint16_t(ret));
}
/***********************************************************************
diff --git a/host/lib/usrp/e100/dboard_iface.cpp b/host/lib/usrp/e100/dboard_iface.cpp
index ce0ac026b..ce42c5506 100644
--- a/host/lib/usrp/e100/dboard_iface.cpp
+++ b/host/lib/usrp/e100/dboard_iface.cpp
@@ -66,33 +66,33 @@ public:
void write_aux_dac(unit_t, aux_dac_t, double);
double read_aux_adc(unit_t, aux_adc_t);
- void set_pin_ctrl(unit_t unit, boost::uint32_t value, boost::uint32_t mask = 0xffffffff);
- boost::uint32_t get_pin_ctrl(unit_t unit);
- void set_atr_reg(unit_t unit, atr_reg_t reg, boost::uint32_t value, boost::uint32_t mask = 0xffffffff);
- boost::uint32_t get_atr_reg(unit_t unit, atr_reg_t reg);
- void set_gpio_ddr(unit_t unit, boost::uint32_t value, boost::uint32_t mask = 0xffffffff);
- boost::uint32_t get_gpio_ddr(unit_t unit);
- void set_gpio_out(unit_t unit, boost::uint32_t value, boost::uint32_t mask = 0xffffffff);
- boost::uint32_t get_gpio_out(unit_t unit);
- boost::uint32_t read_gpio(unit_t unit);
+ void set_pin_ctrl(unit_t unit, uint32_t value, uint32_t mask = 0xffffffff);
+ uint32_t get_pin_ctrl(unit_t unit);
+ void set_atr_reg(unit_t unit, atr_reg_t reg, uint32_t value, uint32_t mask = 0xffffffff);
+ uint32_t get_atr_reg(unit_t unit, atr_reg_t reg);
+ void set_gpio_ddr(unit_t unit, uint32_t value, uint32_t mask = 0xffffffff);
+ uint32_t get_gpio_ddr(unit_t unit);
+ void set_gpio_out(unit_t unit, uint32_t value, uint32_t mask = 0xffffffff);
+ uint32_t get_gpio_out(unit_t unit);
+ uint32_t read_gpio(unit_t unit);
void set_command_time(const uhd::time_spec_t& t);
uhd::time_spec_t get_command_time(void);
- void write_i2c(boost::uint16_t, const byte_vector_t &);
- byte_vector_t read_i2c(boost::uint16_t, size_t);
+ void write_i2c(uint16_t, const byte_vector_t &);
+ byte_vector_t read_i2c(uint16_t, size_t);
void write_spi(
unit_t unit,
const spi_config_t &config,
- boost::uint32_t data,
+ uint32_t data,
size_t num_bits
);
- boost::uint32_t read_write_spi(
+ uint32_t read_write_spi(
unit_t unit,
const spi_config_t &config,
- boost::uint32_t data,
+ uint32_t data,
size_t num_bits
);
@@ -167,39 +167,39 @@ double e100_dboard_iface::get_codec_rate(unit_t){
/***********************************************************************
* GPIO
**********************************************************************/
-void e100_dboard_iface::set_pin_ctrl(unit_t unit, boost::uint32_t value, boost::uint32_t mask){
- _gpio->set_pin_ctrl(unit, static_cast<boost::uint16_t>(value), static_cast<boost::uint16_t>(mask));
+void e100_dboard_iface::set_pin_ctrl(unit_t unit, uint32_t value, uint32_t mask){
+ _gpio->set_pin_ctrl(unit, static_cast<uint16_t>(value), static_cast<uint16_t>(mask));
}
-boost::uint32_t e100_dboard_iface::get_pin_ctrl(unit_t unit){
- return static_cast<boost::uint32_t>(_gpio->get_pin_ctrl(unit));
+uint32_t e100_dboard_iface::get_pin_ctrl(unit_t unit){
+ return static_cast<uint32_t>(_gpio->get_pin_ctrl(unit));
}
-void e100_dboard_iface::set_atr_reg(unit_t unit, atr_reg_t reg, boost::uint32_t value, boost::uint32_t mask){
- _gpio->set_atr_reg(unit, reg, static_cast<boost::uint16_t>(value), static_cast<boost::uint16_t>(mask));
+void e100_dboard_iface::set_atr_reg(unit_t unit, atr_reg_t reg, uint32_t value, uint32_t mask){
+ _gpio->set_atr_reg(unit, reg, static_cast<uint16_t>(value), static_cast<uint16_t>(mask));
}
-boost::uint32_t e100_dboard_iface::get_atr_reg(unit_t unit, atr_reg_t reg){
- return static_cast<boost::uint32_t>(_gpio->get_atr_reg(unit, reg));
+uint32_t e100_dboard_iface::get_atr_reg(unit_t unit, atr_reg_t reg){
+ return static_cast<uint32_t>(_gpio->get_atr_reg(unit, reg));
}
-void e100_dboard_iface::set_gpio_ddr(unit_t unit, boost::uint32_t value, boost::uint32_t mask){
- _gpio->set_gpio_ddr(unit, static_cast<boost::uint16_t>(value), static_cast<boost::uint16_t>(mask));
+void e100_dboard_iface::set_gpio_ddr(unit_t unit, uint32_t value, uint32_t mask){
+ _gpio->set_gpio_ddr(unit, static_cast<uint16_t>(value), static_cast<uint16_t>(mask));
}
-boost::uint32_t e100_dboard_iface::get_gpio_ddr(unit_t unit){
- return static_cast<boost::uint32_t>(_gpio->get_gpio_ddr(unit));
+uint32_t e100_dboard_iface::get_gpio_ddr(unit_t unit){
+ return static_cast<uint32_t>(_gpio->get_gpio_ddr(unit));
}
-void e100_dboard_iface::set_gpio_out(unit_t unit, boost::uint32_t value, boost::uint32_t mask){
- _gpio->set_gpio_out(unit, static_cast<boost::uint16_t>(value), static_cast<boost::uint16_t>(mask));
+void e100_dboard_iface::set_gpio_out(unit_t unit, uint32_t value, uint32_t mask){
+ _gpio->set_gpio_out(unit, static_cast<uint16_t>(value), static_cast<uint16_t>(mask));
}
-boost::uint32_t e100_dboard_iface::get_gpio_out(unit_t unit){
- return static_cast<boost::uint32_t>(_gpio->get_gpio_out(unit));
+uint32_t e100_dboard_iface::get_gpio_out(unit_t unit){
+ return static_cast<uint32_t>(_gpio->get_gpio_out(unit));
}
-boost::uint32_t e100_dboard_iface::read_gpio(unit_t unit){
+uint32_t e100_dboard_iface::read_gpio(unit_t unit){
return _gpio->read_gpio(unit);
}
@@ -211,7 +211,7 @@ boost::uint32_t e100_dboard_iface::read_gpio(unit_t unit){
* \param unit the dboard interface unit type enum
* \return the slave device number
*/
-static boost::uint32_t unit_to_otw_spi_dev(dboard_iface::unit_t unit){
+static uint32_t unit_to_otw_spi_dev(dboard_iface::unit_t unit){
switch(unit){
case dboard_iface::UNIT_TX: return UE_SPI_SS_TX_DB;
case dboard_iface::UNIT_RX: return UE_SPI_SS_RX_DB;
@@ -222,16 +222,16 @@ static boost::uint32_t unit_to_otw_spi_dev(dboard_iface::unit_t unit){
void e100_dboard_iface::write_spi(
unit_t unit,
const spi_config_t &config,
- boost::uint32_t data,
+ uint32_t data,
size_t num_bits
){
_spi_iface->write_spi(unit_to_otw_spi_dev(unit), config, data, num_bits);
}
-boost::uint32_t e100_dboard_iface::read_write_spi(
+uint32_t e100_dboard_iface::read_write_spi(
unit_t unit,
const spi_config_t &config,
- boost::uint32_t data,
+ uint32_t data,
size_t num_bits
){
return _spi_iface->read_spi(unit_to_otw_spi_dev(unit), config, data, num_bits);
@@ -240,11 +240,11 @@ boost::uint32_t e100_dboard_iface::read_write_spi(
/***********************************************************************
* I2C
**********************************************************************/
-void e100_dboard_iface::write_i2c(boost::uint16_t addr, const byte_vector_t &bytes){
+void e100_dboard_iface::write_i2c(uint16_t addr, const byte_vector_t &bytes){
return _i2c_iface->write_i2c(addr, bytes);
}
-byte_vector_t e100_dboard_iface::read_i2c(boost::uint16_t addr, size_t num_bytes){
+byte_vector_t e100_dboard_iface::read_i2c(uint16_t addr, size_t num_bytes){
return _i2c_iface->read_i2c(addr, num_bytes);
}
diff --git a/host/lib/usrp/e100/e100_ctrl.cpp b/host/lib/usrp/e100/e100_ctrl.cpp
index c164a6fb0..4217286f8 100644
--- a/host/lib/usrp/e100/e100_ctrl.cpp
+++ b/host/lib/usrp/e100/e100_ctrl.cpp
@@ -94,15 +94,15 @@ public:
this->spi_sclk_gpio(1); //out of reset
}
- boost::uint32_t transact_spi(
+ uint32_t transact_spi(
int, const spi_config_t &, //not used params
- boost::uint32_t bits,
+ uint32_t bits,
size_t num_bits,
bool readback
){
boost::mutex::scoped_lock lock(gpio_irq_resp_mutex);
- boost::uint32_t rb_bits = 0;
+ uint32_t rb_bits = 0;
this->spi_sen_gpio(0);
for (size_t i = 0; i < num_bits; i++){
@@ -144,7 +144,7 @@ public:
::close(_node_fd);
}
- void write_i2c(boost::uint16_t addr, const byte_vector_t &bytes){
+ void write_i2c(uint16_t addr, const byte_vector_t &bytes){
byte_vector_t rw_bytes(bytes);
//setup the message
@@ -163,7 +163,7 @@ public:
UHD_ASSERT_THROW(::ioctl(_node_fd, I2C_RDWR, &data) >= 0);
}
- byte_vector_t read_i2c(boost::uint16_t addr, size_t num_bytes){
+ byte_vector_t read_i2c(uint16_t addr, size_t num_bytes){
byte_vector_t bytes(num_bytes);
//setup the message
diff --git a/host/lib/usrp/e100/e100_impl.cpp b/host/lib/usrp/e100/e100_impl.cpp
index 1f8fe84cb..25c967cfa 100644
--- a/host/lib/usrp/e100/e100_impl.cpp
+++ b/host/lib/usrp/e100/e100_impl.cpp
@@ -183,8 +183,8 @@ e100_impl::e100_impl(const uhd::device_addr_t &device_addr){
size_t hash = time(NULL);
for (size_t i = 0; i < 100; i++){
boost::hash_combine(hash, i);
- _fifo_ctrl->poke32(TOREG(SR_MISC+0), boost::uint32_t(hash));
- test_fail = _fifo_ctrl->peek32(REG_RB_CONFIG0) != boost::uint32_t(hash);
+ _fifo_ctrl->poke32(TOREG(SR_MISC+0), uint32_t(hash));
+ test_fail = _fifo_ctrl->peek32(REG_RB_CONFIG0) != uint32_t(hash);
if (test_fail) break; //exit loop on any failure
}
UHD_MSG(status) << ((test_fail)? " fail" : "pass") << std::endl;
@@ -533,8 +533,8 @@ sensor_value_t e100_impl::get_ref_locked(void){
}
void e100_impl::check_fpga_compat(void){
- const boost::uint32_t fpga_compat_num = _fifo_ctrl->peek32(REG_RB_COMPAT);
- boost::uint16_t fpga_major = fpga_compat_num >> 16, fpga_minor = fpga_compat_num & 0xffff;
+ const uint32_t fpga_compat_num = _fifo_ctrl->peek32(REG_RB_COMPAT);
+ uint16_t fpga_major = fpga_compat_num >> 16, fpga_minor = fpga_compat_num & 0xffff;
if (fpga_major == 0){ //old version scheme
fpga_major = fpga_minor;
fpga_minor = 0;
diff --git a/host/lib/usrp/e100/e100_impl.hpp b/host/lib/usrp/e100/e100_impl.hpp
index b05053f84..5f8277dda 100644
--- a/host/lib/usrp/e100/e100_impl.hpp
+++ b/host/lib/usrp/e100/e100_impl.hpp
@@ -50,10 +50,10 @@ static const double E100_RX_LINK_RATE_BPS = 166e6/3/2*2;
static const double E100_TX_LINK_RATE_BPS = 166e6/3/1*2;
static const std::string E100_I2C_DEV_NODE = "/dev/i2c-3";
static const std::string E100_UART_DEV_NODE = "/dev/ttyO0";
-static const boost::uint16_t E100_FPGA_COMPAT_NUM = 11;
-static const boost::uint32_t E100_RX_SID_BASE = 30;
-static const boost::uint32_t E100_TX_ASYNC_SID = 10;
-static const boost::uint32_t E100_CTRL_MSG_SID = 20;
+static const uint16_t E100_FPGA_COMPAT_NUM = 11;
+static const uint32_t E100_RX_SID_BASE = 30;
+static const uint32_t E100_TX_ASYNC_SID = 10;
+static const uint32_t E100_CTRL_MSG_SID = 20;
static const double E100_DEFAULT_CLOCK_RATE = 64e6;
static const std::string E100_EEPROM_MAP_KEY = "E100";
diff --git a/host/lib/usrp/e100/e100_regs.hpp b/host/lib/usrp/e100/e100_regs.hpp
index 654163dce..208abede8 100644
--- a/host/lib/usrp/e100/e100_regs.hpp
+++ b/host/lib/usrp/e100/e100_regs.hpp
@@ -18,7 +18,7 @@
#ifndef INCLUDED_E100_REGS_HPP
#define INCLUDED_E100_REGS_HPP
-#include <boost/cstdint.hpp>
+#include <stdint.h>
#define TOREG(x) ((x)*4)
diff --git a/host/lib/usrp/e100/io_impl.cpp b/host/lib/usrp/e100/io_impl.cpp
index bf04a5871..ebed3614c 100644
--- a/host/lib/usrp/e100/io_impl.cpp
+++ b/host/lib/usrp/e100/io_impl.cpp
@@ -131,7 +131,7 @@ rx_streamer::sptr e100_impl::get_rx_stream(const uhd::stream_args_t &args_){
//calculate packet size
static const size_t hdr_size = 0
- + vrt::max_if_hdr_words32*sizeof(boost::uint32_t)
+ + vrt::max_if_hdr_words32*sizeof(uint32_t)
+ sizeof(vrt::if_packet_info_t().tlr) //forced to have trailer
- sizeof(vrt::if_packet_info_t().cid) //no class id ever used
- sizeof(vrt::if_packet_info_t().tsi) //no int time ever used
@@ -189,8 +189,8 @@ tx_streamer::sptr e100_impl::get_tx_stream(const uhd::stream_args_t &args_){
//calculate packet size
static const size_t hdr_size = 0
- + vrt_send_header_offset_words32*sizeof(boost::uint32_t)
- + vrt::max_if_hdr_words32*sizeof(boost::uint32_t)
+ + vrt_send_header_offset_words32*sizeof(uint32_t)
+ + vrt::max_if_hdr_words32*sizeof(uint32_t)
+ sizeof(vrt::if_packet_info_t().tlr) //forced to have trailer
- sizeof(vrt::if_packet_info_t().sid) //no stream id ever used
- sizeof(vrt::if_packet_info_t().cid) //no class id ever used
diff --git a/host/lib/usrp/e300/e300_eeprom_manager.cpp b/host/lib/usrp/e300/e300_eeprom_manager.cpp
index 00200747d..d43ca3d4c 100644
--- a/host/lib/usrp/e300/e300_eeprom_manager.cpp
+++ b/host/lib/usrp/e300/e300_eeprom_manager.cpp
@@ -21,7 +21,7 @@
namespace uhd { namespace usrp { namespace e300 {
-static const std::string _bytes_to_string(const boost::uint8_t* bytes, size_t max_len)
+static const std::string _bytes_to_string(const uint8_t* bytes, size_t max_len)
{
std::string out;
for (size_t i = 0; i < max_len; i++) {
@@ -31,7 +31,7 @@ static const std::string _bytes_to_string(const boost::uint8_t* bytes, size_t ma
return out;
}
-static void _string_to_bytes(const std::string &string, size_t max_len, boost::uint8_t* buffer)
+static void _string_to_bytes(const std::string &string, size_t max_len, uint8_t* buffer)
{
byte_vector_t bytes;
const size_t len = std::min(string.size(), max_len);
@@ -56,7 +56,7 @@ const mboard_eeprom_t& e300_eeprom_manager::read_mb_eeprom(void)
{
boost::mutex::scoped_lock(_mutex);
- std::vector<boost::uint8_t> bytes;
+ std::vector<uint8_t> bytes;
bytes.resize(sizeof(mb_eeprom_map_t));
mb_eeprom_map_t *map_ptr = reinterpret_cast<mb_eeprom_map_t*>(&bytes[0]);
memset(map_ptr, 0xff, sizeof(mb_eeprom_map_t));
@@ -68,9 +68,9 @@ const mboard_eeprom_t& e300_eeprom_manager::read_mb_eeprom(void)
mb_eeprom_map_t &map = *map_ptr;
_mb_eeprom["product"] = boost::lexical_cast<std::string>(
- uhd::ntohx<boost::uint16_t>(map.hw_product));
+ uhd::ntohx<uint16_t>(map.hw_product));
_mb_eeprom["revision"] = boost::lexical_cast<std::string>(
- uhd::ntohx<boost::uint16_t>(map.hw_revision));
+ uhd::ntohx<uint16_t>(map.hw_revision));
_mb_eeprom["serial"] = _bytes_to_string(
map.serial, MB_SERIAL_LEN);
@@ -87,7 +87,7 @@ const dboard_eeprom_t& e300_eeprom_manager::read_db_eeprom(void)
{
boost::mutex::scoped_lock(_mutex);
- std::vector<boost::uint8_t> bytes;
+ std::vector<uint8_t> bytes;
bytes.resize(sizeof(db_eeprom_map_t));
db_eeprom_map_t *map_ptr = reinterpret_cast<db_eeprom_map_t*>(&bytes[0]);
memset(map_ptr, 0xff, sizeof(db_eeprom_map_t));
@@ -99,10 +99,10 @@ const dboard_eeprom_t& e300_eeprom_manager::read_db_eeprom(void)
db_eeprom_map_t &map = *map_ptr;
_db_eeprom.id = uhd::usrp::dboard_id_t::from_uint16(
- uhd::ntohx<boost::uint16_t>(map.hw_product));
+ uhd::ntohx<uint16_t>(map.hw_product));
_db_eeprom.revision = boost::lexical_cast<std::string>(
- uhd::ntohx<boost::uint16_t>(map.hw_revision));
+ uhd::ntohx<uint16_t>(map.hw_revision));
_db_eeprom.serial = _bytes_to_string(
map.serial, DB_SERIAL_LEN);
@@ -113,7 +113,7 @@ void e300_eeprom_manager::write_db_eeprom(const dboard_eeprom_t& eeprom)
{
boost::mutex::scoped_lock(_mutex);
_db_eeprom = eeprom;
- std::vector<boost::uint8_t> bytes;
+ std::vector<uint8_t> bytes;
bytes.resize(sizeof(db_eeprom_map_t));
@@ -131,13 +131,13 @@ void e300_eeprom_manager::write_db_eeprom(const dboard_eeprom_t& eeprom)
map.data_version_minor = E310_DB_MAP_MINOR;
if (_db_eeprom.id != dboard_id_t::none()) {
- map.hw_product = uhd::htonx<boost::uint16_t>(
+ map.hw_product = uhd::htonx<uint16_t>(
_db_eeprom.id.to_uint16());
}
if (not _db_eeprom.revision.empty()) {
- map.hw_revision = uhd::htonx<boost::uint16_t>(
- boost::lexical_cast<boost::uint16_t>(_db_eeprom.revision));
+ map.hw_revision = uhd::htonx<uint16_t>(
+ boost::lexical_cast<uint16_t>(_db_eeprom.revision));
}
if (not _db_eeprom.serial.empty()) {
@@ -151,7 +151,7 @@ void e300_eeprom_manager::write_mb_eeprom(const mboard_eeprom_t& eeprom)
{
boost::mutex::scoped_lock(_mutex);
_mb_eeprom = eeprom;
- std::vector<boost::uint8_t> bytes;
+ std::vector<uint8_t> bytes;
bytes.resize(sizeof(mb_eeprom_map_t));
@@ -170,12 +170,12 @@ void e300_eeprom_manager::write_mb_eeprom(const mboard_eeprom_t& eeprom)
if (_mb_eeprom.has_key("product")) {
- map.hw_product = uhd::htonx<boost::uint16_t>(
- boost::lexical_cast<boost::uint16_t>(_mb_eeprom["product"]));
+ map.hw_product = uhd::htonx<uint16_t>(
+ boost::lexical_cast<uint16_t>(_mb_eeprom["product"]));
}
if (_mb_eeprom.has_key("revision")) {
- map.hw_revision = uhd::htonx<boost::uint16_t>(
- boost::lexical_cast<boost::uint16_t>(_mb_eeprom["revision"]));
+ map.hw_revision = uhd::htonx<uint16_t>(
+ boost::lexical_cast<uint16_t>(_mb_eeprom["revision"]));
}
if (_mb_eeprom.has_key("serial")) {
_string_to_bytes(_mb_eeprom["serial"], MB_SERIAL_LEN, map.serial);
@@ -198,13 +198,13 @@ void e300_eeprom_manager::write_mb_eeprom(const mboard_eeprom_t& eeprom)
e300_eeprom_manager::mboard_t e300_eeprom_manager::get_mb_type(void) const
{
boost::mutex::scoped_lock(_mutex);
- boost::uint16_t pid = boost::lexical_cast<boost::uint16_t>(
+ uint16_t pid = boost::lexical_cast<uint16_t>(
_mb_eeprom["product"]);
return get_mb_type(pid);
}
e300_eeprom_manager::mboard_t e300_eeprom_manager::get_mb_type(
- boost::uint16_t pid)
+ uint16_t pid)
{
switch (pid) {
case E300_MB_PID:
@@ -225,7 +225,7 @@ e300_eeprom_manager::mboard_t e300_eeprom_manager::get_mb_type(
std::string e300_eeprom_manager::get_mb_type_string(void) const
{
boost::mutex::scoped_lock(_mutex);
- boost::uint16_t product = boost::lexical_cast<boost::uint16_t>(
+ uint16_t product = boost::lexical_cast<uint16_t>(
_mb_eeprom["product"]);
switch (product) {
case E300_MB_PID:
diff --git a/host/lib/usrp/e300/e300_eeprom_manager.hpp b/host/lib/usrp/e300/e300_eeprom_manager.hpp
index b06eeada9..14acfba26 100644
--- a/host/lib/usrp/e300/e300_eeprom_manager.hpp
+++ b/host/lib/usrp/e300/e300_eeprom_manager.hpp
@@ -28,18 +28,18 @@
namespace uhd { namespace usrp { namespace e300 {
-static const boost::uint16_t E300_MB_PID = 0x77d1;
-static const boost::uint16_t E310_SG1_MB_PID = 0x77d2;
-static const boost::uint16_t E310_SG3_MB_PID = 0x77d3;
+static const uint16_t E300_MB_PID = 0x77d1;
+static const uint16_t E310_SG1_MB_PID = 0x77d2;
+static const uint16_t E310_SG3_MB_PID = 0x77d3;
-static const boost::uint16_t E300_DB_PID = 0x0100;
-static const boost::uint16_t E310_DB_PID = 0x0110;
+static const uint16_t E300_DB_PID = 0x0100;
+static const uint16_t E310_DB_PID = 0x0110;
-static const boost::uint16_t E310_MB_MAP_MAJOR = 0x0001;
-static const boost::uint16_t E310_MB_MAP_MINOR = 0x0000;
+static const uint16_t E310_MB_MAP_MAJOR = 0x0001;
+static const uint16_t E310_MB_MAP_MINOR = 0x0000;
-static const boost::uint16_t E310_DB_MAP_MAJOR = 0x0001;
-static const boost::uint16_t E310_DB_MAP_MINOR = 0x0000;
+static const uint16_t E310_DB_MAP_MAJOR = 0x0001;
+static const uint16_t E310_DB_MAP_MINOR = 0x0000;
class e300_eeprom_manager : boost::noncopyable
{
@@ -72,7 +72,7 @@ public:
enum mboard_t {USRP_E300_MB, USRP_E310_SG1_MB, USRP_E310_SG3_MB, UNKNOWN};
mboard_t get_mb_type(void) const;
- static mboard_t get_mb_type(boost::uint16_t pid);
+ static mboard_t get_mb_type(uint16_t pid);
std::string get_mb_type_string(void) const;
private: // types
@@ -86,37 +86,37 @@ private: // types
struct mb_eeprom_map_t
{
// Data format version
- boost::uint16_t data_version_major;
- boost::uint16_t data_version_minor;
+ uint16_t data_version_major;
+ uint16_t data_version_minor;
// NIC mac address
- boost::uint8_t mac_addr[6];
+ uint8_t mac_addr[6];
// HW identification info
- boost::uint16_t hw_product;
- boost::uint16_t hw_revision;
+ uint16_t hw_product;
+ uint16_t hw_revision;
// serial
- boost::uint8_t serial[MB_SERIAL_LEN];
- boost::uint8_t pad[20 - MB_SERIAL_LEN];
+ uint8_t serial[MB_SERIAL_LEN];
+ uint8_t pad[20 - MB_SERIAL_LEN];
//User specific
- boost::uint8_t user_name[MB_NAME_LEN];
+ uint8_t user_name[MB_NAME_LEN];
};
struct db_eeprom_map_t
{
// Data format version
- boost::uint16_t data_version_major;
- boost::uint16_t data_version_minor;
+ uint16_t data_version_major;
+ uint16_t data_version_minor;
// HW identification info
- boost::uint16_t hw_product;
- boost::uint16_t hw_revision;
+ uint16_t hw_product;
+ uint16_t hw_revision;
// serial
- boost::uint8_t serial[DB_SERIAL_LEN];
- boost::uint8_t pad[20 - DB_SERIAL_LEN];
+ uint8_t serial[DB_SERIAL_LEN];
+ uint8_t pad[20 - DB_SERIAL_LEN];
};
private: // members
diff --git a/host/lib/usrp/e300/e300_fifo_config.cpp b/host/lib/usrp/e300/e300_fifo_config.cpp
index ac4ace7f2..4138bb581 100644
--- a/host/lib/usrp/e300/e300_fifo_config.cpp
+++ b/host/lib/usrp/e300/e300_fifo_config.cpp
@@ -17,7 +17,7 @@
#ifdef E300_NATIVE
-#include <boost/cstdint.hpp>
+#include <stdint.h>
#include <uhd/config.hpp>
// constants coded into the fpga parameters
@@ -141,15 +141,15 @@ struct __mem_addrz_t
/***********************************************************************
* peek n' poke mmapped space
**********************************************************************/
-UHD_INLINE void zf_poke32(const boost::uint32_t addr, const boost::uint32_t data)
+UHD_INLINE void zf_poke32(const uint32_t addr, const uint32_t data)
{
- volatile boost::uint32_t *p = reinterpret_cast<boost::uint32_t *>(addr);
+ volatile uint32_t *p = reinterpret_cast<uint32_t *>(addr);
*p = data;
}
-UHD_INLINE boost::uint32_t zf_peek32(const boost::uint32_t addr)
+UHD_INLINE uint32_t zf_peek32(const uint32_t addr)
{
- volatile const boost::uint32_t *p = reinterpret_cast<const boost::uint32_t *>(addr);
+ volatile const uint32_t *p = reinterpret_cast<const uint32_t *>(addr);
return *p;
}
@@ -206,7 +206,7 @@ public:
//UHD_MSG(status) << boost::format("data 0x%x") % addrs.data << std::endl;
//UHD_MSG(status) << boost::format("ctrl 0x%x") % addrs.ctrl << std::endl;
- const boost::uint32_t sig = zf_peek32(_addrs.ctrl + ARBITER_RD_SIG);
+ const uint32_t sig = zf_peek32(_addrs.ctrl + ARBITER_RD_SIG);
UHD_ASSERT_THROW((sig >> 16) == 0xACE0);
zf_poke32(_addrs.ctrl + ARBITER_WR_CLEAR, 1);
@@ -240,7 +240,7 @@ public:
{
if (zf_peek32(_addrs.ctrl + ARBITER_RB_STATUS_OCC))
{
- const boost::uint32_t sts = zf_peek32(_addrs.ctrl + ARBITER_RB_STATUS);
+ const uint32_t sts = zf_peek32(_addrs.ctrl + ARBITER_RB_STATUS);
UHD_ASSERT_THROW((sts >> 7) & 0x1); //assert OK
UHD_ASSERT_THROW((sts & 0xf) == _addrs.which); //expected tag
zf_poke32(_addrs.ctrl + ARBITER_WR_STS_RDY, 1); //pop from sts fifo
diff --git a/host/lib/usrp/e300/e300_fpga_defs.hpp b/host/lib/usrp/e300/e300_fpga_defs.hpp
index 36dd47383..af54c0a9a 100644
--- a/host/lib/usrp/e300/e300_fpga_defs.hpp
+++ b/host/lib/usrp/e300/e300_fpga_defs.hpp
@@ -21,8 +21,8 @@ namespace uhd { namespace usrp { namespace e300 { namespace fpga {
static const size_t NUM_RADIOS = 2;
-static const boost::uint32_t COMPAT_MAJOR = 16;
-static const boost::uint32_t COMPAT_MINOR = 0;
+static const uint32_t COMPAT_MAJOR = 16;
+static const uint32_t COMPAT_MINOR = 0;
}}}} // namespace
diff --git a/host/lib/usrp/e300/e300_global_regs.cpp b/host/lib/usrp/e300/e300_global_regs.cpp
index 3ba895826..bfd166e67 100644
--- a/host/lib/usrp/e300/e300_global_regs.cpp
+++ b/host/lib/usrp/e300/e300_global_regs.cpp
@@ -17,7 +17,7 @@
#include "e300_global_regs.hpp"
-#include <boost/cstdint.hpp>
+#include <stdint.h>
#include <uhd/exception.hpp>
#include <uhd/utils/byteswap.hpp>
#include <cstring>
@@ -36,14 +36,14 @@ public:
{
}
- boost::uint32_t peek32(const uhd::wb_iface::wb_addr_type addr)
+ uint32_t peek32(const uhd::wb_iface::wb_addr_type addr)
{
// setup readback register
_poke32(_ctrl_base + global_regs::SR_CORE_READBACK, addr);
return _peek32(_ctrl_base);
}
- void poke32(const uhd::wb_iface::wb_addr_type addr, const boost::uint32_t data)
+ void poke32(const uhd::wb_iface::wb_addr_type addr, const uint32_t data)
{
_poke32(_ctrl_base + static_cast<size_t>(addr), data);
}
@@ -52,15 +52,15 @@ public:
private:
const size_t _ctrl_base;
- UHD_INLINE void _poke32(const boost::uint32_t addr, const boost::uint32_t data)
+ UHD_INLINE void _poke32(const uint32_t addr, const uint32_t data)
{
- volatile boost::uint32_t *p = reinterpret_cast<boost::uint32_t *>(addr);
+ volatile uint32_t *p = reinterpret_cast<uint32_t *>(addr);
*p = data;
}
- UHD_INLINE boost::uint32_t _peek32(const boost::uint32_t addr)
+ UHD_INLINE uint32_t _peek32(const uint32_t addr)
{
- volatile const boost::uint32_t *p = reinterpret_cast<const boost::uint32_t *>(addr);
+ volatile const uint32_t *p = reinterpret_cast<const uint32_t *>(addr);
return *p;
}
};
@@ -81,12 +81,12 @@ public:
{
}
- boost::uint32_t peek32(const uhd::wb_iface::wb_addr_type addr)
+ uint32_t peek32(const uhd::wb_iface::wb_addr_type addr)
{
global_regs_transaction_t transaction;
- transaction.is_poke = uhd::htonx<boost::uint32_t>(0);
- transaction.addr = uhd::htonx<boost::uint32_t>(
- static_cast<boost::uint32_t>(addr));
+ transaction.is_poke = uhd::htonx<uint32_t>(0);
+ transaction.addr = uhd::htonx<uint32_t>(
+ static_cast<uint32_t>(addr));
{
uhd::transport::managed_send_buffer::sptr buff = _xport->get_send_buff(10.0);
if (not buff or buff->size() < sizeof(transaction))
@@ -100,16 +100,16 @@ public:
throw std::runtime_error("global_regs_zc_impl recv timeout");
std::memcpy(&transaction, buff->cast<const void *>(), sizeof(transaction));
}
- return uhd::ntohx<boost::uint32_t>(transaction.data);
+ return uhd::ntohx<uint32_t>(transaction.data);
}
- void poke32(const uhd::wb_iface::wb_addr_type addr, const boost::uint32_t data)
+ void poke32(const uhd::wb_iface::wb_addr_type addr, const uint32_t data)
{
global_regs_transaction_t transaction;
- transaction.is_poke = uhd::htonx<boost::uint32_t>(1);
- transaction.addr = uhd::htonx<boost::uint32_t>(
- static_cast<boost::uint32_t>(addr));
- transaction.data = uhd::htonx<boost::uint32_t>(data);
+ transaction.is_poke = uhd::htonx<uint32_t>(1);
+ transaction.addr = uhd::htonx<uint32_t>(
+ static_cast<uint32_t>(addr));
+ transaction.data = uhd::htonx<uint32_t>(data);
{
uhd::transport::managed_send_buffer::sptr buff = _xport->get_send_buff(10.0);
if (not buff or buff->size() < sizeof(transaction))
diff --git a/host/lib/usrp/e300/e300_global_regs.hpp b/host/lib/usrp/e300/e300_global_regs.hpp
index 12693da79..3b6b26239 100644
--- a/host/lib/usrp/e300/e300_global_regs.hpp
+++ b/host/lib/usrp/e300/e300_global_regs.hpp
@@ -24,10 +24,10 @@
namespace uhd { namespace usrp { namespace e300 {
struct global_regs_transaction_t {
- boost::uint32_t is_poke;
- boost::uint32_t addr;
- boost::uint32_t data;
- boost::uint32_t pad;
+ uint32_t is_poke;
+ uint32_t addr;
+ uint32_t data;
+ uint32_t pad;
};
class global_regs : boost::noncopyable, public virtual uhd::wb_iface
@@ -63,12 +63,12 @@ public:
static const size_t PPS_EXT = 3;
};
-UHD_INLINE boost::uint32_t XB_ADDR(const boost::uint32_t addr)
+UHD_INLINE uint32_t XB_ADDR(const uint32_t addr)
{
return global_regs::SR_CORE_XBAR + (addr << 2);
}
-UHD_INLINE boost::uint32_t DST_ADDR(const boost::uint32_t addr)
+UHD_INLINE uint32_t DST_ADDR(const uint32_t addr)
{
return global_regs::SR_CORE_DST + (addr << 2);
}
diff --git a/host/lib/usrp/e300/e300_i2c.cpp b/host/lib/usrp/e300/e300_i2c.cpp
index d8f535a98..b3e872aff 100644
--- a/host/lib/usrp/e300/e300_i2c.cpp
+++ b/host/lib/usrp/e300/e300_i2c.cpp
@@ -37,14 +37,14 @@ public:
}
void set_i2c_reg8(
- const boost::uint8_t addr,
- const boost::uint8_t reg,
- const boost::uint8_t value)
+ const uint8_t addr,
+ const uint8_t reg,
+ const uint8_t value)
{
i2c_transaction_t transaction;
transaction.type = WRITE | ONEBYTE;
transaction.addr = addr;
- transaction.reg = uhd::htonx<boost::uint16_t>(reg);
+ transaction.reg = uhd::htonx<uint16_t>(reg);
transaction.data = value;
{
uhd::transport::managed_send_buffer::sptr buff = _xport->get_send_buff(10.0);
@@ -55,14 +55,14 @@ public:
}
}
- boost::uint8_t get_i2c_reg8(
- const boost::uint8_t addr,
- const boost::uint8_t reg)
+ uint8_t get_i2c_reg8(
+ const uint8_t addr,
+ const uint8_t reg)
{
i2c_transaction_t transaction;
transaction.type = READ | ONEBYTE;
transaction.addr = addr;
- transaction.reg = uhd::htonx<boost::uint16_t>(reg);
+ transaction.reg = uhd::htonx<uint16_t>(reg);
{
uhd::transport::managed_send_buffer::sptr buff = _xport->get_send_buff(10.0);
if (not buff or buff->size() < sizeof(transaction))
@@ -80,14 +80,14 @@ public:
}
void set_i2c_reg16(
- const boost::uint8_t addr,
- const boost::uint16_t reg,
- const boost::uint8_t value)
+ const uint8_t addr,
+ const uint16_t reg,
+ const uint8_t value)
{
i2c_transaction_t transaction;
transaction.type = WRITE | TWOBYTE;
transaction.addr = addr;
- transaction.reg = uhd::htonx<boost::uint16_t>(reg);
+ transaction.reg = uhd::htonx<uint16_t>(reg);
transaction.data = value;
{
uhd::transport::managed_send_buffer::sptr buff = _xport->get_send_buff(10.0);
@@ -98,14 +98,14 @@ public:
}
}
- boost::uint8_t get_i2c_reg16(
- const boost::uint8_t addr,
- const boost::uint16_t reg)
+ uint8_t get_i2c_reg16(
+ const uint8_t addr,
+ const uint16_t reg)
{
i2c_transaction_t transaction;
transaction.type = READ | TWOBYTE;
transaction.addr = addr;
- transaction.reg = uhd::htonx<boost::uint16_t>(reg);
+ transaction.reg = uhd::htonx<uint16_t>(reg);
{
uhd::transport::managed_send_buffer::sptr buff = _xport->get_send_buff(10.0);
if (not buff or buff->size() < sizeof(transaction))
@@ -145,14 +145,14 @@ public:
}
void set_i2c_reg8(
- const boost::uint8_t addr,
- const boost::uint8_t reg,
- const boost::uint8_t value)
+ const uint8_t addr,
+ const uint8_t reg,
+ const uint8_t value)
{
i2c_transaction_t transaction;
transaction.type = i2c::WRITE | ONEBYTE;
transaction.addr = addr;
- transaction.reg = uhd::htonx<boost::uint16_t>(reg);
+ transaction.reg = uhd::htonx<uint16_t>(reg);
transaction.data = value;
_xport->send(
@@ -161,14 +161,14 @@ public:
sizeof(transaction)));
}
- boost::uint8_t get_i2c_reg8(
- const boost::uint8_t addr,
- const boost::uint8_t reg)
+ uint8_t get_i2c_reg8(
+ const uint8_t addr,
+ const uint8_t reg)
{
i2c_transaction_t transaction;
transaction.type = i2c::READ | ONEBYTE;
transaction.addr = addr;
- transaction.reg = uhd::htonx<boost::uint16_t>(reg);
+ transaction.reg = uhd::htonx<uint16_t>(reg);
transaction.data = 0;
_xport->send(
@@ -176,7 +176,7 @@ public:
&transaction,
sizeof(transaction)));
- boost::uint8_t buff[sizeof(i2c_transaction_t)] = {};
+ uint8_t buff[sizeof(i2c_transaction_t)] = {};
const size_t nbytes = _xport->recv(
boost::asio::buffer(buff), 0.100);
if (not (nbytes == sizeof(transaction)))
@@ -186,14 +186,14 @@ public:
}
void set_i2c_reg16(
- const boost::uint8_t addr,
- const boost::uint16_t reg,
- const boost::uint8_t value)
+ const uint8_t addr,
+ const uint16_t reg,
+ const uint8_t value)
{
i2c_transaction_t transaction;
transaction.type = i2c::WRITE | TWOBYTE;
transaction.addr = addr;
- transaction.reg = uhd::htonx<boost::uint16_t>(reg);
+ transaction.reg = uhd::htonx<uint16_t>(reg);
transaction.data = value;
_xport->send(
@@ -202,14 +202,14 @@ public:
sizeof(transaction)));
}
- boost::uint8_t get_i2c_reg16(
- const boost::uint8_t addr,
- const boost::uint16_t reg)
+ uint8_t get_i2c_reg16(
+ const uint8_t addr,
+ const uint16_t reg)
{
i2c_transaction_t transaction;
transaction.type = i2c::READ | TWOBYTE;
transaction.addr = addr;
- transaction.reg = uhd::htonx<boost::uint16_t>(reg);
+ transaction.reg = uhd::htonx<uint16_t>(reg);
transaction.data = 0;
_xport->send(
@@ -217,7 +217,7 @@ public:
&transaction,
sizeof(transaction)));
- boost::uint8_t buff[sizeof(i2c_transaction_t)] = {};
+ uint8_t buff[sizeof(i2c_transaction_t)] = {};
const size_t nbytes = _xport->recv(
boost::asio::buffer(buff), 0.100);
if (not (nbytes == sizeof(transaction)))
@@ -248,7 +248,7 @@ i2c::sptr i2c::make_simple_udp(
#include <sys/ioctl.h>
#include <boost/thread.hpp>
-#include <boost/cstdint.hpp>
+#include <stdint.h>
namespace uhd { namespace usrp { namespace e300 {
@@ -268,11 +268,11 @@ public:
}
void set_i2c_reg8(
- const boost::uint8_t addr,
- const boost::uint8_t reg,
- const boost::uint8_t value)
+ const uint8_t addr,
+ const uint8_t reg,
+ const uint8_t value)
{
- boost::uint8_t outbuf[2];
+ uint8_t outbuf[2];
i2c_rdwr_ioctl_data packets;
i2c_msg messages[1];
@@ -294,20 +294,20 @@ public:
boost::this_thread::sleep(boost::posix_time::milliseconds(5));
}
- boost::uint8_t get_i2c_reg8(
- const boost::uint8_t addr,
- const boost::uint8_t reg)
+ uint8_t get_i2c_reg8(
+ const uint8_t addr,
+ const uint8_t reg)
{
i2c_rdwr_ioctl_data packets;
i2c_msg messages[2];
- boost::uint8_t outbuf = reg;
+ uint8_t outbuf = reg;
messages[0].addr = addr;
messages[0].flags = 0;
messages[0].len = sizeof(outbuf);
messages[0].buf = &outbuf;
- boost::uint8_t inbuf;
+ uint8_t inbuf;
messages[1].addr = addr;
messages[1].flags = I2C_M_RD;
messages[1].len = sizeof(inbuf);
@@ -325,11 +325,11 @@ public:
// the daughterboard uses 16 bit addresses
void set_i2c_reg16(
- const boost::uint8_t addr,
- const boost::uint16_t reg,
- const boost::uint8_t value)
+ const uint8_t addr,
+ const uint16_t reg,
+ const uint8_t value)
{
- boost::uint8_t outbuf[3];
+ uint8_t outbuf[3];
i2c_rdwr_ioctl_data packets;
i2c_msg messages[1];
@@ -354,15 +354,15 @@ public:
// the daughterboard eeprom uses 16 bit addresses
- boost::uint8_t get_i2c_reg16(
- const boost::uint8_t addr,
- const boost::uint16_t reg)
+ uint8_t get_i2c_reg16(
+ const uint8_t addr,
+ const uint16_t reg)
{
i2c_rdwr_ioctl_data packets;
i2c_msg messages[2];
// always little endian
- boost::uint8_t outbuf[2];
+ uint8_t outbuf[2];
outbuf[0] = (reg >> 8) & 0xff;
outbuf[1] = reg & 0xff;
@@ -371,7 +371,7 @@ public:
messages[0].len = sizeof(outbuf);
messages[0].buf = outbuf;
- boost::uint8_t inbuf;
+ uint8_t inbuf;
messages[1].addr = addr;
messages[1].flags = I2C_M_RD;
messages[1].len = sizeof(inbuf);
diff --git a/host/lib/usrp/e300/e300_i2c.hpp b/host/lib/usrp/e300/e300_i2c.hpp
index 6cca7ab70..98a1f80aa 100644
--- a/host/lib/usrp/e300/e300_i2c.hpp
+++ b/host/lib/usrp/e300/e300_i2c.hpp
@@ -19,7 +19,7 @@
#define INCLUDED_E300_I2C_HPP
#include <boost/noncopyable.hpp>
-#include <boost/cstdint.hpp>
+#include <stdint.h>
#include <boost/shared_ptr.hpp>
#include <uhd/transport/zero_copy.hpp>
@@ -27,10 +27,10 @@
namespace uhd { namespace usrp { namespace e300 {
struct i2c_transaction_t {
- boost::uint16_t reg;
- boost::uint8_t addr;
- boost::uint8_t data;
- boost::uint8_t type;
+ uint16_t reg;
+ uint8_t addr;
+ uint8_t data;
+ uint8_t type;
};
class i2c : public boost::noncopyable
@@ -44,32 +44,32 @@ public:
const std::string &ip_addr,
const std::string &port);
- virtual boost::uint8_t get_i2c_reg8(
- const boost::uint8_t addr,
- const boost::uint8_t reg) = 0;
+ virtual uint8_t get_i2c_reg8(
+ const uint8_t addr,
+ const uint8_t reg) = 0;
- virtual boost::uint8_t get_i2c_reg16(
- const boost::uint8_t addr,
- const boost::uint16_t reg) = 0;
+ virtual uint8_t get_i2c_reg16(
+ const uint8_t addr,
+ const uint16_t reg) = 0;
virtual void set_i2c_reg8(
- const boost::uint8_t addr,
- const boost::uint8_t reg,
- const boost::uint8_t value) = 0;
+ const uint8_t addr,
+ const uint8_t reg,
+ const uint8_t value) = 0;
virtual void set_i2c_reg16(
- const boost::uint8_t addr,
- const boost::uint16_t reg,
- const boost::uint8_t value) = 0;
+ const uint8_t addr,
+ const uint16_t reg,
+ const uint8_t value) = 0;
- static const boost::uint8_t DB_EEPROM_ADDR = 0x50;
- static const boost::uint8_t MB_EEPROM_ADDR = 0x51;
+ static const uint8_t DB_EEPROM_ADDR = 0x50;
+ static const uint8_t MB_EEPROM_ADDR = 0x51;
- static const boost::uint8_t WRITE = 0x1;
- static const boost::uint8_t READ = 0x0;
- static const boost::uint8_t TWOBYTE = 0x4;
- static const boost::uint8_t ONEBYTE = 0x2;
+ static const uint8_t WRITE = 0x1;
+ static const uint8_t READ = 0x0;
+ static const uint8_t TWOBYTE = 0x4;
+ static const uint8_t ONEBYTE = 0x2;
};
}}};
diff --git a/host/lib/usrp/e300/e300_impl.cpp b/host/lib/usrp/e300/e300_impl.cpp
index 114686b4f..84f50c67b 100644
--- a/host/lib/usrp/e300/e300_impl.cpp
+++ b/host/lib/usrp/e300/e300_impl.cpp
@@ -104,7 +104,7 @@ static std::vector<std::string> discover_ip_addrs(
// loop for replies until timeout
while (true) {
- boost::uint8_t buff[sizeof(i2c_transaction_t)] = {};
+ uint8_t buff[sizeof(i2c_transaction_t)] = {};
const size_t nbytes = udp_bcast_xport->recv(boost::asio::buffer(buff), 0.050);
if (nbytes == 0)
break; //No more responses
@@ -273,7 +273,7 @@ static device::sptr e300_make(const device_addr_t &device_addr)
void get_e3x0_fpga_images(const uhd::device_addr_t &device_addr,
std::string &fpga_image,
std::string &idle_image){
- const boost::uint16_t pid = boost::lexical_cast<boost::uint16_t>(
+ const uint16_t pid = boost::lexical_cast<uint16_t>(
device_addr["product"]);
//extract the FPGA path for the e300
@@ -526,11 +526,11 @@ e300_impl::e300_impl(const uhd::device_addr_t &device_addr)
gpio_atr_3000::sptr fp_gpio = gpio_atr_3000::make(_radio_perifs[0].ctrl, radio::sr_addr(radio::FP_GPIO), radio::RB32_FP_GPIO);
BOOST_FOREACH(const gpio_attr_map_t::value_type attr, gpio_attr_map)
{
- _tree->create<boost::uint32_t>(mb_path / "gpio" / "INT0" / attr.second)
+ _tree->create<uint32_t>(mb_path / "gpio" / "INT0" / attr.second)
.add_coerced_subscriber(boost::bind(&gpio_atr_3000::set_gpio_attr, fp_gpio, attr.first, _1))
.set(0);
}
- _tree->create<boost::uint8_t>(mb_path / "gpio" / "INT0" / "READBACK")
+ _tree->create<uint8_t>(mb_path / "gpio" / "INT0" / "READBACK")
.set_publisher(boost::bind(&gpio_atr_3000::read_gpio, fp_gpio));
@@ -639,7 +639,7 @@ e300_impl::e300_impl(const uhd::device_addr_t &device_addr)
uhd::sensor_value_t e300_impl::_get_fe_pll_lock(const bool is_tx)
{
- const boost::uint32_t st =
+ const uint32_t st =
_global_regs->peek32(global_regs::RB32_CORE_PLL);
const bool locked = is_tx ? ((st & 0x1) > 0) : ((st & 0x2) > 0);
return sensor_value_t("LO", locked, "locked", "unlocked");
@@ -712,16 +712,16 @@ void e300_impl::_register_loopback_self_test(wb_iface::sptr iface)
for (size_t i = 0; i < 100; i++)
{
boost::hash_combine(hash, i);
- iface->poke32(radio::sr_addr(radio::TEST), boost::uint32_t(hash));
- test_fail = iface->peek32(radio::RB32_TEST) != boost::uint32_t(hash);
+ iface->poke32(radio::sr_addr(radio::TEST), uint32_t(hash));
+ test_fail = iface->peek32(radio::RB32_TEST) != uint32_t(hash);
if (test_fail) break; //exit loop on any failure
}
UHD_MSG(status) << ((test_fail)? " fail" : "pass") << std::endl;
}
-boost::uint32_t e300_impl::_get_version(compat_t which)
+uint32_t e300_impl::_get_version(compat_t which)
{
- const boost::uint16_t compat_num
+ const uint16_t compat_num
= _global_regs->peek32(global_regs::RB32_CORE_COMPAT);
switch(which) {
@@ -736,18 +736,18 @@ boost::uint32_t e300_impl::_get_version(compat_t which)
std::string e300_impl::_get_version_hash(void)
{
- const boost::uint32_t git_hash
+ const uint32_t git_hash
= _global_regs->peek32(global_regs::RB32_CORE_GITHASH);
return str(boost::format("%7x%s")
% (git_hash & 0x0FFFFFFF)
% ((git_hash & 0xF000000) ? "-dirty" : ""));
}
-boost::uint32_t e300_impl::_allocate_sid(const sid_config_t &config)
+uint32_t e300_impl::_allocate_sid(const sid_config_t &config)
{
- const boost::uint32_t stream = (config.dst_prefix | (config.router_dst_there << 2)) & 0xff;
+ const uint32_t stream = (config.dst_prefix | (config.router_dst_there << 2)) & 0xff;
- const boost::uint32_t sid = 0
+ const uint32_t sid = 0
| (E300_DEVICE_HERE << 24)
| (_sid_framer << 16)
| (config.router_addr_there << 8)
@@ -785,7 +785,7 @@ boost::uint32_t e300_impl::_allocate_sid(const sid_config_t &config)
return sid;
}
-void e300_impl::_setup_dest_mapping(const boost::uint32_t sid, const size_t which_stream)
+void e300_impl::_setup_dest_mapping(const uint32_t sid, const size_t which_stream)
{
UHD_LOG << boost::format("Setting up dest map for 0x%lx to be stream %d")
% (sid & 0xff) % which_stream << std::endl;
@@ -825,44 +825,44 @@ void e300_impl::_sync_times()
}
size_t e300_impl::_get_axi_dma_channel(
- boost::uint8_t destination,
- boost::uint8_t prefix)
+ uint8_t destination,
+ uint8_t prefix)
{
- static const boost::uint32_t RADIO_GRP_SIZE = 4;
- static const boost::uint32_t RADIO0_GRP = 0;
- static const boost::uint32_t RADIO1_GRP = 1;
+ static const uint32_t RADIO_GRP_SIZE = 4;
+ static const uint32_t RADIO0_GRP = 0;
+ static const uint32_t RADIO1_GRP = 1;
- boost::uint32_t radio_grp = (destination == E300_XB_DST_R0) ? RADIO0_GRP : RADIO1_GRP;
+ uint32_t radio_grp = (destination == E300_XB_DST_R0) ? RADIO0_GRP : RADIO1_GRP;
return ((radio_grp * RADIO_GRP_SIZE) + prefix);
}
-boost::uint16_t e300_impl::_get_udp_port(
- boost::uint8_t destination,
- boost::uint8_t prefix)
+uint16_t e300_impl::_get_udp_port(
+ uint8_t destination,
+ uint8_t prefix)
{
if (destination == E300_XB_DST_R0) {
if (prefix == E300_RADIO_DEST_PREFIX_CTRL)
- return boost::lexical_cast<boost::uint16_t>(E300_SERVER_CTRL_PORT0);
+ return boost::lexical_cast<uint16_t>(E300_SERVER_CTRL_PORT0);
else if (prefix == E300_RADIO_DEST_PREFIX_TX)
- return boost::lexical_cast<boost::uint16_t>(E300_SERVER_TX_PORT0);
+ return boost::lexical_cast<uint16_t>(E300_SERVER_TX_PORT0);
else if (prefix == E300_RADIO_DEST_PREFIX_RX)
- return boost::lexical_cast<boost::uint16_t>(E300_SERVER_RX_PORT0);
+ return boost::lexical_cast<uint16_t>(E300_SERVER_RX_PORT0);
} else if (destination == E300_XB_DST_R1) {
if (prefix == E300_RADIO_DEST_PREFIX_CTRL)
- return boost::lexical_cast<boost::uint16_t>(E300_SERVER_CTRL_PORT1);
+ return boost::lexical_cast<uint16_t>(E300_SERVER_CTRL_PORT1);
else if (prefix == E300_RADIO_DEST_PREFIX_TX)
- return boost::lexical_cast<boost::uint16_t>(E300_SERVER_TX_PORT1);
+ return boost::lexical_cast<uint16_t>(E300_SERVER_TX_PORT1);
else if (prefix == E300_RADIO_DEST_PREFIX_RX)
- return boost::lexical_cast<boost::uint16_t>(E300_SERVER_RX_PORT1);
+ return boost::lexical_cast<uint16_t>(E300_SERVER_RX_PORT1);
}
throw uhd::value_error(str(boost::format("No UDP port defined for combination: %u %u") % destination % prefix));
}
e300_impl::both_xports_t e300_impl::_make_transport(
- const boost::uint8_t &destination,
- const boost::uint8_t &prefix,
+ const uint8_t &destination,
+ const uint8_t &prefix,
const uhd::transport::zero_copy_xport_params &params,
- boost::uint32_t &sid)
+ uint32_t &sid)
{
both_xports_t xports;
@@ -890,7 +890,7 @@ e300_impl::both_xports_t e300_impl::_make_transport(
} else if (_xport_path == ETH) {
// lookup which udp port we need
// to use to create our transport
- const boost::uint16_t port = _get_udp_port(
+ const uint16_t port = _get_udp_port(
destination,
prefix);
@@ -950,7 +950,7 @@ void e300_impl::_setup_radio(const size_t dspno)
////////////////////////////////////////////////////////////////////
// make a transport, grab a sid
- boost::uint32_t ctrl_sid;
+ uint32_t ctrl_sid;
both_xports_t ctrl_xports = _make_transport(
dspno ? E300_XB_DST_R1 : E300_XB_DST_R0,
E300_RADIO_DEST_PREFIX_CTRL,
@@ -1102,7 +1102,7 @@ void e300_impl::_update_enables(void)
void e300_impl::_update_gpio_state(void)
{
- boost::uint32_t misc_reg = 0
+ uint32_t misc_reg = 0
| (_misc.pps_sel << gpio_t::PPS_SEL)
| (_misc.mimo << gpio_t::MIMO)
| (_misc.codec_arst << gpio_t::CODEC_ARST)
diff --git a/host/lib/usrp/e300/e300_impl.hpp b/host/lib/usrp/e300/e300_impl.hpp
index e9a0b4b9a..632424438 100644
--- a/host/lib/usrp/e300/e300_impl.hpp
+++ b/host/lib/usrp/e300/e300_impl.hpp
@@ -85,18 +85,18 @@ static const size_t E300_RX_FC_REQUEST_FREQ = 32; // per flow ctrl window
static const size_t E300_TX_FC_RESPONSE_FREQ = 8; // per flow ctrl window
// crossbar settings
-static const boost::uint8_t E300_RADIO_DEST_PREFIX_TX = 0;
-static const boost::uint8_t E300_RADIO_DEST_PREFIX_CTRL = 1;
-static const boost::uint8_t E300_RADIO_DEST_PREFIX_RX = 2;
+static const uint8_t E300_RADIO_DEST_PREFIX_TX = 0;
+static const uint8_t E300_RADIO_DEST_PREFIX_CTRL = 1;
+static const uint8_t E300_RADIO_DEST_PREFIX_RX = 2;
-static const boost::uint8_t E300_XB_DST_AXI = 0;
-static const boost::uint8_t E300_XB_DST_R0 = 1;
-static const boost::uint8_t E300_XB_DST_R1 = 2;
-static const boost::uint8_t E300_XB_DST_CE0 = 3;
-static const boost::uint8_t E300_XB_DST_CE1 = 4;
+static const uint8_t E300_XB_DST_AXI = 0;
+static const uint8_t E300_XB_DST_R0 = 1;
+static const uint8_t E300_XB_DST_R1 = 2;
+static const uint8_t E300_XB_DST_CE0 = 3;
+static const uint8_t E300_XB_DST_CE1 = 4;
-static const boost::uint8_t E300_DEVICE_THERE = 2;
-static const boost::uint8_t E300_DEVICE_HERE = 0;
+static const uint8_t E300_DEVICE_THERE = 2;
+static const uint8_t E300_DEVICE_HERE = 0;
static const size_t E300_R0_CTRL_STREAM = (0 << 2) | E300_RADIO_DEST_PREFIX_CTRL;
static const size_t E300_R0_TX_DATA_STREAM = (0 << 2) | E300_RADIO_DEST_PREFIX_TX;
@@ -137,10 +137,10 @@ private: // types
// sid convenience struct
struct sid_config_t
{
- boost::uint8_t router_addr_there;
- boost::uint8_t dst_prefix; //2bits
- boost::uint8_t router_dst_there;
- boost::uint8_t router_dst_here;
+ uint8_t router_addr_there;
+ uint8_t dst_prefix; //2bits
+ uint8_t router_dst_there;
+ uint8_t router_dst_here;
};
// perifs in the radio core
@@ -192,16 +192,16 @@ private: // types
rx_bandsel_a(0), rx_bandsel_b(0), rx_bandsel_c(0)
{}
- boost::uint32_t pps_sel;
- boost::uint32_t mimo;
- boost::uint32_t codec_arst;
+ uint32_t pps_sel;
+ uint32_t mimo;
+ uint32_t codec_arst;
- boost::uint32_t tx_bandsels;
- boost::uint32_t rx_bandsel_a;
- boost::uint32_t rx_bandsel_b;
- boost::uint32_t rx_bandsel_c;
+ uint32_t tx_bandsels;
+ uint32_t rx_bandsel_a;
+ uint32_t rx_bandsel_b;
+ uint32_t rx_bandsel_c;
- boost::uint32_t time_sync;
+ uint32_t time_sync;
static const size_t PPS_SEL = 0;
static const size_t MIMO = 2;
@@ -216,30 +216,30 @@ private: // types
private: // methods
void _register_loopback_self_test(uhd::wb_iface::sptr iface);
- boost::uint32_t _get_version(compat_t which);
+ uint32_t _get_version(compat_t which);
std::string _get_version_hash(void);
void _setup_radio(const size_t which_radio);
- boost::uint32_t _allocate_sid(const sid_config_t &config);
+ uint32_t _allocate_sid(const sid_config_t &config);
void _setup_dest_mapping(
- const boost::uint32_t sid,
+ const uint32_t sid,
const size_t which_stream);
size_t _get_axi_dma_channel(
- boost::uint8_t destination,
- boost::uint8_t prefix);
+ uint8_t destination,
+ uint8_t prefix);
- boost::uint16_t _get_udp_port(
- boost::uint8_t destination,
- boost::uint8_t prefix);
+ uint16_t _get_udp_port(
+ uint8_t destination,
+ uint8_t prefix);
both_xports_t _make_transport(
- const boost::uint8_t &destination,
- const boost::uint8_t &prefix,
+ const uint8_t &destination,
+ const uint8_t &prefix,
const uhd::transport::zero_copy_xport_params &params,
- boost::uint32_t &sid);
+ uint32_t &sid);
double _get_tick_rate(void){return _tick_rate;}
double _set_tick_rate(const double rate);
diff --git a/host/lib/usrp/e300/e300_io_impl.cpp b/host/lib/usrp/e300/e300_io_impl.cpp
index c84042e98..2514b7f40 100644
--- a/host/lib/usrp/e300/e300_io_impl.cpp
+++ b/host/lib/usrp/e300/e300_io_impl.cpp
@@ -35,7 +35,7 @@ using namespace uhd::transport;
namespace uhd { namespace usrp { namespace e300 {
-static const boost::uint32_t HW_SEQ_NUM_MASK = 0xfff;
+static const uint32_t HW_SEQ_NUM_MASK = 0xfff;
/***********************************************************************
* update streamer rates
@@ -169,7 +169,7 @@ void e300_impl::_update_subdev_spec(
* VITA stuff
**********************************************************************/
static void e300_if_hdr_unpack_le(
- const boost::uint32_t *packet_buff,
+ const uint32_t *packet_buff,
vrt::if_packet_info_t &if_packet_info
){
if_packet_info.link_type = vrt::if_packet_info_t::LINK_TYPE_CHDR;
@@ -177,7 +177,7 @@ static void e300_if_hdr_unpack_le(
}
static void e300_if_hdr_pack_le(
- boost::uint32_t *packet_buff,
+ uint32_t *packet_buff,
vrt::if_packet_info_t &if_packet_info
){
if_packet_info.link_type = vrt::if_packet_info_t::LINK_TYPE_CHDR;
@@ -240,7 +240,7 @@ static size_t get_rx_flow_control_window(size_t frame_size, size_t sw_buff_size,
}
static void handle_rx_flowctrl(
- const boost::uint32_t sid,
+ const uint32_t sid,
zero_copy_if::sptr xport,
boost::shared_ptr<e300_rx_fc_cache_t> fc_cache,
const size_t last_seq)
@@ -254,7 +254,7 @@ static void handle_rx_flowctrl(
{
throw uhd::runtime_error("handle_rx_flowctrl timed out getting a send buffer");
}
- boost::uint32_t *pkt = buff->cast<boost::uint32_t *>();
+ uint32_t *pkt = buff->cast<uint32_t *>();
//recover seq32
size_t& seq_sw = fc_cache->last_seq_in;
@@ -268,7 +268,7 @@ static void handle_rx_flowctrl(
vrt::if_packet_info_t packet_info;
packet_info.packet_type = vrt::if_packet_info_t::PACKET_TYPE_CONTEXT;
packet_info.num_payload_words32 = RXFC_PACKET_LEN_IN_WORDS;
- packet_info.num_payload_bytes = packet_info.num_payload_words32*sizeof(boost::uint32_t);
+ packet_info.num_payload_bytes = packet_info.num_payload_words32*sizeof(uint32_t);
packet_info.packet_count = seq_sw;
packet_info.sob = false;
packet_info.eob = false;
@@ -283,11 +283,11 @@ static void handle_rx_flowctrl(
e300_if_hdr_pack_le(pkt, packet_info);
//load payload
- pkt[packet_info.num_header_words32+RXFC_CMD_CODE_OFFSET] = uhd::htowx<boost::uint32_t>(0);
- pkt[packet_info.num_header_words32+RXFC_SEQ_NUM_OFFSET] = uhd::htowx<boost::uint32_t>(seq_sw);
+ pkt[packet_info.num_header_words32+RXFC_CMD_CODE_OFFSET] = uhd::htowx<uint32_t>(0);
+ pkt[packet_info.num_header_words32+RXFC_SEQ_NUM_OFFSET] = uhd::htowx<uint32_t>(seq_sw);
//send the buffer over the interface
- buff->commit(sizeof(boost::uint32_t)*(packet_info.num_packet_words32));
+ buff->commit(sizeof(uint32_t)*(packet_info.num_packet_words32));
}
@@ -326,8 +326,8 @@ static void handle_tx_async_msgs(boost::shared_ptr<e300_tx_fc_cache_t> fc_cache,
//extract packet info
vrt::if_packet_info_t if_packet_info;
- if_packet_info.num_packet_words32 = buff->size()/sizeof(boost::uint32_t);
- const boost::uint32_t *packet_buff = buff->cast<const boost::uint32_t *>();
+ if_packet_info.num_packet_words32 = buff->size()/sizeof(uint32_t);
+ const uint32_t *packet_buff = buff->cast<const uint32_t *>();
//unpacking can fail
try
@@ -350,7 +350,7 @@ static void handle_tx_async_msgs(boost::shared_ptr<e300_tx_fc_cache_t> fc_cache,
//fill in the async metadata
async_metadata_t metadata;
- load_metadata_from_buff(uhd::wtohx<boost::uint32_t>,
+ load_metadata_from_buff(uhd::wtohx<uint32_t>,
metadata, if_packet_info, packet_buff,
get_tick_rate(), fc_cache->stream_channel);
@@ -434,7 +434,7 @@ rx_streamer::sptr e300_impl::get_rx_stream(const uhd::stream_args_t &args_)
radio_perifs_t &perif = _radio_perifs[radio_index];
// make a transport, grab a sid
- boost::uint32_t data_sid;
+ uint32_t data_sid;
both_xports_t data_xports = _make_transport(
radio_index ? E300_XB_DST_R1 : E300_XB_DST_R0,
E300_RADIO_DEST_PREFIX_RX,
@@ -443,8 +443,8 @@ rx_streamer::sptr e300_impl::get_rx_stream(const uhd::stream_args_t &args_)
//calculate packet size
static const size_t hdr_size = 0
- + vrt::num_vrl_words32*sizeof(boost::uint32_t)
- + vrt::max_if_hdr_words32*sizeof(boost::uint32_t)
+ + vrt::num_vrl_words32*sizeof(uint32_t)
+ + vrt::max_if_hdr_words32*sizeof(uint32_t)
+ sizeof(vrt::if_packet_info_t().tlr) //forced to have trailer
- sizeof(vrt::if_packet_info_t().cid) //no class id ever used
- sizeof(vrt::if_packet_info_t().tsi) //no int time ever used
@@ -548,7 +548,7 @@ tx_streamer::sptr e300_impl::get_tx_stream(const uhd::stream_args_t &args_)
// make a transport, grab a sid
- boost::uint32_t data_sid;
+ uint32_t data_sid;
both_xports_t data_xports = _make_transport(
radio_index ? E300_XB_DST_R1 : E300_XB_DST_R0,
E300_RADIO_DEST_PREFIX_TX,
@@ -557,8 +557,8 @@ tx_streamer::sptr e300_impl::get_tx_stream(const uhd::stream_args_t &args_)
//calculate packet size
static const size_t hdr_size = 0
- + vrt::num_vrl_words32*sizeof(boost::uint32_t)
- + vrt::max_if_hdr_words32*sizeof(boost::uint32_t)
+ + vrt::num_vrl_words32*sizeof(uint32_t)
+ + vrt::max_if_hdr_words32*sizeof(uint32_t)
+ sizeof(vrt::if_packet_info_t().tlr) //forced to have trailer
- sizeof(vrt::if_packet_info_t().cid) //no class id ever used
- sizeof(vrt::if_packet_info_t().tsi) //no int time ever used
diff --git a/host/lib/usrp/e300/e300_network.cpp b/host/lib/usrp/e300/e300_network.cpp
index 0aa5a21ae..e68f2a54d 100644
--- a/host/lib/usrp/e300/e300_network.cpp
+++ b/host/lib/usrp/e300/e300_network.cpp
@@ -190,7 +190,7 @@ static void e300_codec_ctrl_tunnel(
std::memcpy(out, in, sizeof(codec_xact_t));
std::string which_str;
- switch (uhd::ntohx<boost::uint32_t>(in->which)) {
+ switch (uhd::ntohx<uint32_t>(in->which)) {
case codec_xact_t::CHAIN_TX1:
which_str = "TX1"; break;
case codec_xact_t::CHAIN_TX2:
@@ -203,7 +203,7 @@ static void e300_codec_ctrl_tunnel(
which_str = ""; break;
}
- switch (uhd::ntohx<boost::uint32_t>(in->action)) {
+ switch (uhd::ntohx<uint32_t>(in->action)) {
case codec_xact_t::ACTION_SET_GAIN:
out->gain = _codec_ctrl->set_gain(which_str, in->gain);
break;
@@ -212,10 +212,10 @@ static void e300_codec_ctrl_tunnel(
break;
case codec_xact_t::ACTION_SET_ACTIVE_CHANS:
_codec_ctrl->set_active_chains(
- uhd::ntohx<boost::uint32_t>(in->bits) & (1<<0),
- uhd::ntohx<boost::uint32_t>(in->bits) & (1<<1),
- uhd::ntohx<boost::uint32_t>(in->bits) & (1<<2),
- uhd::ntohx<boost::uint32_t>(in->bits) & (1<<3));
+ uhd::ntohx<uint32_t>(in->bits) & (1<<0),
+ uhd::ntohx<uint32_t>(in->bits) & (1<<1),
+ uhd::ntohx<uint32_t>(in->bits) & (1<<2),
+ uhd::ntohx<uint32_t>(in->bits) & (1<<3));
break;
case codec_xact_t::ACTION_TUNE:
out->freq = _codec_ctrl->tune(which_str, in->freq);
@@ -225,7 +225,7 @@ static void e300_codec_ctrl_tunnel(
break;
case codec_xact_t::ACTION_SET_LOOPBACK:
_codec_ctrl->data_port_loopback(
- uhd::ntohx<boost::uint32_t>(in->bits) & 1);
+ uhd::ntohx<uint32_t>(in->bits) & 1);
break;
case codec_xact_t::ACTION_GET_RSSI:
out->rssi = _codec_ctrl->get_rssi(which_str).to_real();
@@ -254,7 +254,7 @@ static void e300_codec_ctrl_tunnel(
default:
UHD_MSG(status) << "Got unknown request?!" << std::endl;
//Zero out actions to fail this request on client
- out->action = uhd::htonx<boost::uint32_t>(0);
+ out->action = uhd::htonx<uint32_t>(0);
}
socket->send_to(asio::buffer(out_buff, 64), *endpoint);
@@ -298,11 +298,11 @@ static void e300_global_regs_tunnel(
global_regs_transaction_t *in =
reinterpret_cast<global_regs_transaction_t *>(in_buff);
- if(uhd::ntohx<boost::uint32_t>(in->is_poke)) {
- regs->poke32(uhd::ntohx<boost::uint32_t>(in->addr), uhd::ntohx<boost::uint32_t>(in->data));
+ if(uhd::ntohx<uint32_t>(in->is_poke)) {
+ regs->poke32(uhd::ntohx<uint32_t>(in->addr), uhd::ntohx<uint32_t>(in->data));
}
else {
- in->data = uhd::htonx<boost::uint32_t>(regs->peek32(uhd::ntohx<boost::uint32_t>(in->addr)));
+ in->data = uhd::htonx<uint32_t>(regs->peek32(uhd::ntohx<uint32_t>(in->addr)));
socket->send_to(asio::buffer(in_buff, 16), *endpoint);
}
}
@@ -347,10 +347,10 @@ static void e300_sensor_tunnel(
if (uhd::ntohx(in->which) == ZYNQ_TEMP) {
sensor_value_t temp = sensor_manager->get_mb_temp();
// TODO: This is ugly ... use proper serialization
- in->value = uhd::htonx<boost::uint32_t>(
+ in->value = uhd::htonx<uint32_t>(
e300_sensor_manager::pack_float_in_uint32_t(temp.to_real()));
} else if (uhd::ntohx(in->which) == REF_LOCK) {
- in->value = uhd::htonx<boost::uint32_t>(
+ in->value = uhd::htonx<uint32_t>(
sensor_manager->get_ref_lock().to_bool() ? 1 : 0);
} else
UHD_MSG(status) << "Got unknown request?!" << std::endl;
@@ -401,9 +401,9 @@ static void e300_i2c_tunnel(
if(in->type & i2c::WRITE) {
i2c->set_i2c_reg8(
in->addr,
- uhd::ntohx<boost::uint16_t>(in->reg), in->data);
+ uhd::ntohx<uint16_t>(in->reg), in->data);
} else {
- in->data = i2c->get_i2c_reg8(in->addr, uhd::ntohx<boost::uint16_t>(in->reg));
+ in->data = i2c->get_i2c_reg8(in->addr, uhd::ntohx<uint16_t>(in->reg));
socket->send_to(asio::buffer(in_buff, sizeof(in_buff)), *endpoint);
}
@@ -412,9 +412,9 @@ static void e300_i2c_tunnel(
if(in->type & i2c::WRITE) {
i2c->set_i2c_reg16(
in->addr,
- uhd::ntohx<boost::uint16_t>(in->reg), in->data);
+ uhd::ntohx<uint16_t>(in->reg), in->data);
} else {
- in->data = i2c->get_i2c_reg16(in->addr, uhd::ntohx<boost::uint16_t>(in->reg));
+ in->data = i2c->get_i2c_reg16(in->addr, uhd::ntohx<uint16_t>(in->reg));
socket->send_to(asio::buffer(in_buff, sizeof(in_buff)), *endpoint);
}
@@ -571,7 +571,7 @@ network_server_impl::network_server_impl(const uhd::device_addr_t &device_addr)
// Else load the FPGA image based on the product ID
} else {
//extract the FPGA path for the e300
- const boost::uint16_t pid = boost::lexical_cast<boost::uint16_t>(
+ const uint16_t pid = boost::lexical_cast<uint16_t>(
_eeprom_manager->get_mb_eeprom()["product"]);
std::string fpga_image;
switch(e300_eeprom_manager::get_mb_type(pid)) {
diff --git a/host/lib/usrp/e300/e300_remote_codec_ctrl.cpp b/host/lib/usrp/e300/e300_remote_codec_ctrl.cpp
index 6ec39131d..b7c46c17d 100644
--- a/host/lib/usrp/e300/e300_remote_codec_ctrl.cpp
+++ b/host/lib/usrp/e300/e300_remote_codec_ctrl.cpp
@@ -17,7 +17,7 @@
#include "e300_remote_codec_ctrl.hpp"
-#include <boost/cstdint.hpp>
+#include <stdint.h>
#include <uhd/exception.hpp>
#include <uhd/utils/byteswap.hpp>
#include <cstring>
@@ -36,17 +36,17 @@ public:
{
}
- void set_timed_spi(uhd::spi_iface::sptr, boost::uint32_t ) {};
- void set_safe_spi(uhd::spi_iface::sptr, boost::uint32_t ) {};
+ void set_timed_spi(uhd::spi_iface::sptr, uint32_t ) {};
+ void set_safe_spi(uhd::spi_iface::sptr, uint32_t ) {};
double set_gain(const std::string &which, const double value)
{
_clear();
- _args.action = uhd::htonx<boost::uint32_t>(transaction_t::ACTION_SET_GAIN);
- if (which == "TX1") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_TX1);
- else if (which == "TX2") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_TX2);
- else if (which == "RX1") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_RX1);
- else if (which == "RX2") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_RX2);
+ _args.action = uhd::htonx<uint32_t>(transaction_t::ACTION_SET_GAIN);
+ if (which == "TX1") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_TX1);
+ else if (which == "TX2") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_TX2);
+ else if (which == "RX1") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_RX1);
+ else if (which == "RX2") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_RX2);
else throw std::runtime_error("e300_remote_codec_ctrl_impl incorrect chain string.");
_args.gain = value;
@@ -57,9 +57,9 @@ public:
double set_clock_rate(const double rate)
{
_clear();
- _args.action = uhd::htonx<boost::uint32_t>(
+ _args.action = uhd::htonx<uint32_t>(
transaction_t::ACTION_SET_CLOCK_RATE);
- _args.which = uhd::htonx<boost::uint32_t>(
+ _args.which = uhd::htonx<uint32_t>(
transaction_t::CHAIN_NONE); /*Unused*/
_args.rate = rate;
@@ -70,12 +70,12 @@ public:
void set_active_chains(bool tx1, bool tx2, bool rx1, bool rx2)
{
_clear();
- _args.action = uhd::htonx<boost::uint32_t>(
+ _args.action = uhd::htonx<uint32_t>(
transaction_t::ACTION_SET_ACTIVE_CHANS);
/*Unused*/
- _args.which = uhd::htonx<boost::uint32_t>(
+ _args.which = uhd::htonx<uint32_t>(
transaction_t::CHAIN_NONE);
- _args.bits = uhd::htonx<boost::uint32_t>(
+ _args.bits = uhd::htonx<uint32_t>(
(tx1 ? (1<<0) : 0) |
(tx2 ? (1<<1) : 0) |
(rx1 ? (1<<2) : 0) |
@@ -87,11 +87,11 @@ public:
double tune(const std::string &which, const double value)
{
_clear();
- _args.action = uhd::htonx<boost::uint32_t>(transaction_t::ACTION_TUNE);
- if (which == "TX1") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_TX1);
- else if (which == "TX2") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_TX2);
- else if (which == "RX1") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_RX1);
- else if (which == "RX2") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_RX2);
+ _args.action = uhd::htonx<uint32_t>(transaction_t::ACTION_TUNE);
+ if (which == "TX1") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_TX1);
+ else if (which == "TX2") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_TX2);
+ else if (which == "RX1") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_RX1);
+ else if (which == "RX2") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_RX2);
else throw std::runtime_error("e300_remote_codec_ctrl_impl incorrect chain string.");
_args.freq = value;
@@ -102,11 +102,11 @@ public:
double get_freq(const std::string &which)
{
_clear();
- _args.action = uhd::htonx<boost::uint32_t>(transaction_t::ACTION_GET_FREQ);
- if (which == "TX1") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_TX1);
- else if (which == "TX2") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_TX2);
- else if (which == "RX1") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_RX1);
- else if (which == "RX2") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_RX2);
+ _args.action = uhd::htonx<uint32_t>(transaction_t::ACTION_GET_FREQ);
+ if (which == "TX1") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_TX1);
+ else if (which == "TX2") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_TX2);
+ else if (which == "RX1") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_RX1);
+ else if (which == "RX2") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_RX2);
else throw std::runtime_error("e300_remote_codec_ctrl_impl incorrect chain string.");
_transact();
@@ -116,9 +116,9 @@ public:
void data_port_loopback(const bool on)
{
_clear();
- _args.action = uhd::htonx<boost::uint32_t>(transaction_t::ACTION_SET_LOOPBACK);
- _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_NONE); /*Unused*/
- _args.bits = uhd::htonx<boost::uint32_t>(on ? 1 : 0);
+ _args.action = uhd::htonx<uint32_t>(transaction_t::ACTION_SET_LOOPBACK);
+ _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_NONE); /*Unused*/
+ _args.bits = uhd::htonx<uint32_t>(on ? 1 : 0);
_transact();
}
@@ -126,11 +126,11 @@ public:
sensor_value_t get_rssi(const std::string &which)
{
_clear();
- _args.action = uhd::htonx<boost::uint32_t>(transaction_t::ACTION_GET_RSSI);
- if (which == "RX1") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_RX1);
- else if (which == "RX2") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_RX2);
+ _args.action = uhd::htonx<uint32_t>(transaction_t::ACTION_GET_RSSI);
+ if (which == "RX1") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_RX1);
+ else if (which == "RX2") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_RX2);
else throw std::runtime_error("e300_remote_codec_ctrl_impl incorrect chain string.");
- _args.bits = uhd::htonx<boost::uint32_t>(0);
+ _args.bits = uhd::htonx<uint32_t>(0);
_transact();
return sensor_value_t("RSSI", _retval.rssi, "dB");
@@ -139,9 +139,9 @@ public:
sensor_value_t get_temperature()
{
_clear();
- _args.action = uhd::htonx<boost::uint32_t>(transaction_t::ACTION_GET_TEMPERATURE);
- _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_NONE); /*Unused*/
- _args.bits = uhd::htonx<boost::uint32_t>(0);
+ _args.action = uhd::htonx<uint32_t>(transaction_t::ACTION_GET_TEMPERATURE);
+ _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_NONE); /*Unused*/
+ _args.bits = uhd::htonx<uint32_t>(0);
_transact();
return sensor_value_t("temp", _retval.temp, "C");
@@ -150,11 +150,11 @@ public:
void set_dc_offset_auto(const std::string &which, const bool on)
{
_clear();
- _args.action = uhd::htonx<boost::uint32_t>(transaction_t::ACTION_SET_DC_OFFSET_AUTO);
- if (which == "TX1") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_TX1);
- else if (which == "TX2") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_TX2);
- else if (which == "RX1") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_RX1);
- else if (which == "RX2") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_RX2);
+ _args.action = uhd::htonx<uint32_t>(transaction_t::ACTION_SET_DC_OFFSET_AUTO);
+ if (which == "TX1") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_TX1);
+ else if (which == "TX2") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_TX2);
+ else if (which == "RX1") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_RX1);
+ else if (which == "RX2") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_RX2);
else throw std::runtime_error("e300_remote_codec_ctrl_impl incorrect chain string.");
_args.use_dc_correction = on ? 1 : 0;
@@ -164,11 +164,11 @@ public:
void set_iq_balance_auto(const std::string &which, const bool on)
{
_clear();
- _args.action = uhd::htonx<boost::uint32_t>(transaction_t::ACTION_SET_IQ_BALANCE_AUTO);
- if (which == "TX1") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_TX1);
- else if (which == "TX2") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_TX2);
- else if (which == "RX1") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_RX1);
- else if (which == "RX2") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_RX2);
+ _args.action = uhd::htonx<uint32_t>(transaction_t::ACTION_SET_IQ_BALANCE_AUTO);
+ if (which == "TX1") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_TX1);
+ else if (which == "TX2") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_TX2);
+ else if (which == "RX1") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_RX1);
+ else if (which == "RX2") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_RX2);
else throw std::runtime_error("e300_remote_codec_ctrl_impl incorrect chain string.");
_args.use_iq_correction = on ? 1 : 0;
@@ -178,11 +178,11 @@ public:
void set_agc(const std::string &which, bool enable)
{
_clear();
- _args.action = uhd::htonx<boost::uint32_t>(transaction_t::ACTION_SET_AGC);
- if (which == "TX1") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_TX1);
- else if (which == "TX2") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_TX2);
- else if (which == "RX1") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_RX1);
- else if (which == "RX2") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_RX2);
+ _args.action = uhd::htonx<uint32_t>(transaction_t::ACTION_SET_AGC);
+ if (which == "TX1") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_TX1);
+ else if (which == "TX2") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_TX2);
+ else if (which == "RX1") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_RX1);
+ else if (which == "RX2") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_RX2);
else throw std::runtime_error("e300_remote_codec_ctrl_impl incorrect chain string.");
_args.use_agc = enable ? 1 : 0;
@@ -192,12 +192,12 @@ public:
void set_agc_mode(const std::string &which, const std::string &mode)
{
_clear();
- _args.action = uhd::htonx<boost::uint32_t>(transaction_t::ACTION_SET_AGC_MODE);
+ _args.action = uhd::htonx<uint32_t>(transaction_t::ACTION_SET_AGC_MODE);
- if (which == "TX1") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_TX1);
- else if (which == "TX2") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_TX2);
- else if (which == "RX1") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_RX1);
- else if (which == "RX2") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_RX2);
+ if (which == "TX1") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_TX1);
+ else if (which == "TX2") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_TX2);
+ else if (which == "RX1") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_RX1);
+ else if (which == "RX2") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_RX2);
else throw std::runtime_error("e300_remote_codec_ctrl_impl incorrect chain string.");
if(mode == "slow") {
@@ -215,11 +215,11 @@ public:
double set_bw_filter(const std::string &which, const double bw)
{
_clear();
- _args.action = uhd::htonx<boost::uint32_t>(transaction_t::ACTION_SET_BW);
- if (which == "TX1") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_TX1);
- else if (which == "TX2") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_TX2);
- else if (which == "RX1") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_RX1);
- else if (which == "RX2") _args.which = uhd::htonx<boost::uint32_t>(transaction_t::CHAIN_RX2);
+ _args.action = uhd::htonx<uint32_t>(transaction_t::ACTION_SET_BW);
+ if (which == "TX1") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_TX1);
+ else if (which == "TX2") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_TX2);
+ else if (which == "RX1") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_RX1);
+ else if (which == "RX2") _args.which = uhd::htonx<uint32_t>(transaction_t::CHAIN_RX2);
else throw std::runtime_error("e300_remote_codec_ctrl_impl incorrect chain string.");
_args.bw = bw;
diff --git a/host/lib/usrp/e300/e300_remote_codec_ctrl.hpp b/host/lib/usrp/e300/e300_remote_codec_ctrl.hpp
index 43723e0d5..9453a6b39 100644
--- a/host/lib/usrp/e300/e300_remote_codec_ctrl.hpp
+++ b/host/lib/usrp/e300/e300_remote_codec_ctrl.hpp
@@ -27,8 +27,8 @@ class e300_remote_codec_ctrl : public uhd::usrp::ad9361_ctrl
{
public:
struct transaction_t {
- boost::uint32_t action;
- boost::uint32_t which;
+ uint32_t action;
+ uint32_t which;
union {
double rate;
double gain;
@@ -36,34 +36,34 @@ public:
double rssi;
double temp;
double bw;
- boost::uint32_t use_dc_correction;
- boost::uint32_t use_iq_correction;
- boost::uint32_t use_agc;
- boost::uint32_t agc_mode;
- boost::uint64_t bits;
+ uint32_t use_dc_correction;
+ uint32_t use_iq_correction;
+ uint32_t use_agc;
+ uint32_t agc_mode;
+ uint64_t bits;
};
//Actions
- static const boost::uint32_t ACTION_SET_GAIN = 10;
- static const boost::uint32_t ACTION_SET_CLOCK_RATE = 11;
- static const boost::uint32_t ACTION_SET_ACTIVE_CHANS = 12;
- static const boost::uint32_t ACTION_TUNE = 13;
- static const boost::uint32_t ACTION_SET_LOOPBACK = 14;
- static const boost::uint32_t ACTION_GET_RSSI = 15;
- static const boost::uint32_t ACTION_GET_TEMPERATURE = 16;
- static const boost::uint32_t ACTION_SET_DC_OFFSET_AUTO = 17;
- static const boost::uint32_t ACTION_SET_IQ_BALANCE_AUTO = 18;
- static const boost::uint32_t ACTION_SET_AGC = 19;
- static const boost::uint32_t ACTION_SET_AGC_MODE = 20;
- static const boost::uint32_t ACTION_SET_BW = 21;
- static const boost::uint32_t ACTION_GET_FREQ = 22;
+ static const uint32_t ACTION_SET_GAIN = 10;
+ static const uint32_t ACTION_SET_CLOCK_RATE = 11;
+ static const uint32_t ACTION_SET_ACTIVE_CHANS = 12;
+ static const uint32_t ACTION_TUNE = 13;
+ static const uint32_t ACTION_SET_LOOPBACK = 14;
+ static const uint32_t ACTION_GET_RSSI = 15;
+ static const uint32_t ACTION_GET_TEMPERATURE = 16;
+ static const uint32_t ACTION_SET_DC_OFFSET_AUTO = 17;
+ static const uint32_t ACTION_SET_IQ_BALANCE_AUTO = 18;
+ static const uint32_t ACTION_SET_AGC = 19;
+ static const uint32_t ACTION_SET_AGC_MODE = 20;
+ static const uint32_t ACTION_SET_BW = 21;
+ static const uint32_t ACTION_GET_FREQ = 22;
//Values for "which"
- static const boost::uint32_t CHAIN_NONE = 0;
- static const boost::uint32_t CHAIN_TX1 = 1;
- static const boost::uint32_t CHAIN_TX2 = 2;
- static const boost::uint32_t CHAIN_RX1 = 3;
- static const boost::uint32_t CHAIN_RX2 = 4;
+ static const uint32_t CHAIN_NONE = 0;
+ static const uint32_t CHAIN_TX1 = 1;
+ static const uint32_t CHAIN_TX2 = 2;
+ static const uint32_t CHAIN_RX1 = 3;
+ static const uint32_t CHAIN_RX2 = 4;
};
static sptr make(uhd::transport::zero_copy_if::sptr xport);
diff --git a/host/lib/usrp/e300/e300_sensor_manager.cpp b/host/lib/usrp/e300/e300_sensor_manager.cpp
index a4319fa4b..b96656e5e 100644
--- a/host/lib/usrp/e300/e300_sensor_manager.cpp
+++ b/host/lib/usrp/e300/e300_sensor_manager.cpp
@@ -55,7 +55,7 @@ public:
{
boost::mutex::scoped_lock(_mutex);
sensor_transaction_t transaction;
- transaction.which = uhd::htonx<boost::uint32_t>(ZYNQ_TEMP);
+ transaction.which = uhd::htonx<uint32_t>(ZYNQ_TEMP);
{
uhd::transport::managed_send_buffer::sptr buff
= _xport->get_send_buff(1.0);
@@ -80,7 +80,7 @@ public:
buff->cast<const void *>(),
sizeof(transaction));
}
- UHD_ASSERT_THROW(uhd::ntohx<boost::uint32_t>(transaction.which) == ZYNQ_TEMP);
+ UHD_ASSERT_THROW(uhd::ntohx<uint32_t>(transaction.which) == ZYNQ_TEMP);
// TODO: Use proper serialization here ...
return sensor_value_t(
"temp",
@@ -93,7 +93,7 @@ public:
{
boost::mutex::scoped_lock(_mutex);
sensor_transaction_t transaction;
- transaction.which = uhd::htonx<boost::uint32_t>(REF_LOCK);
+ transaction.which = uhd::htonx<uint32_t>(REF_LOCK);
{
uhd::transport::managed_send_buffer::sptr buff
= _xport->get_send_buff(1.0);
@@ -118,7 +118,7 @@ public:
buff->cast<const void *>(),
sizeof(transaction));
}
- UHD_ASSERT_THROW(uhd::ntohx<boost::uint32_t>(transaction.which) == REF_LOCK);
+ UHD_ASSERT_THROW(uhd::ntohx<uint32_t>(transaction.which) == REF_LOCK);
// TODO: Use proper serialization here ...
return sensor_value_t("Ref", (uhd::ntohx(transaction.value) > 0), "locked", "unlocked");
}
@@ -185,10 +185,10 @@ public:
//PPSLOOP_LOCKED_MASK is asserted in the following cases:
//- (Time source = GPS or External) AND (Loop is locked and is in fine adj mode)
//- Time source is Internal
- static const boost::uint32_t PPSLOOP_LOCKED_MASK = 0x04;
- static const boost::uint32_t REFPLL_LOCKED_MASK = 0x20;
+ static const uint32_t PPSLOOP_LOCKED_MASK = 0x04;
+ static const uint32_t REFPLL_LOCKED_MASK = 0x20;
- const boost::uint32_t status =
+ const uint32_t status =
_global_regs->peek32(global_regs::RB32_CORE_MISC);
bool ref_locked = (status & PPSLOOP_LOCKED_MASK) && (status & REFPLL_LOCKED_MASK);
diff --git a/host/lib/usrp/e300/e300_sensor_manager.hpp b/host/lib/usrp/e300/e300_sensor_manager.hpp
index 1252e07b9..c2d31bff7 100644
--- a/host/lib/usrp/e300/e300_sensor_manager.hpp
+++ b/host/lib/usrp/e300/e300_sensor_manager.hpp
@@ -16,7 +16,7 @@
//
#include <boost/noncopyable.hpp>
-#include <boost/cstdint.hpp>
+#include <stdint.h>
#include <uhd/transport/zero_copy.hpp>
#include <uhd/types/sensors.hpp>
@@ -30,10 +30,10 @@
namespace uhd { namespace usrp { namespace e300 {
struct sensor_transaction_t {
- boost::uint32_t which;
+ uint32_t which;
union {
- boost::uint32_t value;
- boost::uint32_t value64;
+ uint32_t value;
+ uint32_t value64;
};
};
@@ -59,13 +59,13 @@ public:
static sptr make_local(global_regs::sptr global_regs);
// Note: This is a hack
- static boost::uint32_t pack_float_in_uint32_t(const float &v)
+ static uint32_t pack_float_in_uint32_t(const float &v)
{
- const boost::uint32_t *cast = reinterpret_cast<const boost::uint32_t*>(&v);
+ const uint32_t *cast = reinterpret_cast<const uint32_t*>(&v);
return *cast;
}
- static float unpack_float_from_uint32_t(const boost::uint32_t &v)
+ static float unpack_float_from_uint32_t(const uint32_t &v)
{
const float *cast = reinterpret_cast<const float*>(&v);
return *cast;
diff --git a/host/lib/usrp/e300/e300_spi.cpp b/host/lib/usrp/e300/e300_spi.cpp
index 74d348555..906b32474 100644
--- a/host/lib/usrp/e300/e300_spi.cpp
+++ b/host/lib/usrp/e300/e300_spi.cpp
@@ -75,20 +75,20 @@ public:
close(_fd);
}
- boost::uint32_t transact_spi(int, const uhd::spi_config_t &,
- boost::uint32_t data, size_t num_bits,
+ uint32_t transact_spi(int, const uhd::spi_config_t &,
+ uint32_t data, size_t num_bits,
bool)
{
int ret(0);
struct spi_ioc_transfer tr;
- boost::uint8_t *tx_data = reinterpret_cast<boost::uint8_t *>(&data);
+ uint8_t *tx_data = reinterpret_cast<uint8_t *>(&data);
UHD_ASSERT_THROW(num_bits == 24);
- boost::uint8_t tx[] = {tx_data[2], tx_data[1], tx_data[0]};
+ uint8_t tx[] = {tx_data[2], tx_data[1], tx_data[0]};
- boost::uint8_t rx[3];
+ uint8_t rx[3];
tr.tx_buf = (unsigned long) &tx[0];
tr.rx_buf = (unsigned long) &rx[0];
tr.len = num_bits >> 3;
@@ -107,10 +107,10 @@ public:
private:
int _fd;
- boost::uint8_t _mode;
- boost::uint32_t _speed;
- boost::uint8_t _bits;
- boost::uint16_t _delay;
+ uint8_t _mode;
+ uint32_t _speed;
+ uint8_t _bits;
+ uint16_t _delay;
};
spi::sptr spi::make(const std::string &device)
diff --git a/host/lib/usrp/gps_ctrl.cpp b/host/lib/usrp/gps_ctrl.cpp
index 2c78b1834..28f5a28cd 100644
--- a/host/lib/usrp/gps_ctrl.cpp
+++ b/host/lib/usrp/gps_ctrl.cpp
@@ -22,7 +22,7 @@
#include <uhd/types/sensors.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/assign/list_of.hpp>
-#include <boost/cstdint.hpp>
+#include <stdint.h>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/thread/thread.hpp>
#include <boost/tokenizer.hpp>
@@ -118,8 +118,8 @@ private:
return false;
std::stringstream ss;
- boost::uint32_t string_crc;
- boost::uint32_t calculated_crc = 0;
+ uint32_t string_crc;
+ uint32_t calculated_crc = 0;
// get crc from string
ss << std::hex << nmea.substr(nmea.length()-2, 2);
diff --git a/host/lib/usrp/gpsd_iface.cpp b/host/lib/usrp/gpsd_iface.cpp
index cd7e5601a..98b359135 100644
--- a/host/lib/usrp/gpsd_iface.cpp
+++ b/host/lib/usrp/gpsd_iface.cpp
@@ -21,7 +21,7 @@
#include <boost/assign/list_of.hpp>
#include <boost/bind.hpp>
-#include <boost/cstdint.hpp>
+#include <stdint.h>
#include "boost/date_time/gregorian/gregorian.hpp"
#include <boost/format.hpp>
#include <boost/lexical_cast.hpp>
@@ -43,7 +43,7 @@ static const size_t CLICK_RATE = 250000;
class gpsd_iface_impl : public virtual gpsd_iface {
public:
- gpsd_iface_impl(const std::string &addr, boost::uint16_t port)
+ gpsd_iface_impl(const std::string &addr, uint16_t port)
: _detected(false), _bthread(), _timeout_cnt(0)
{
boost::unique_lock<boost::shared_mutex> l(_d_mutex);
@@ -182,9 +182,9 @@ private: // member functions
if ((s.at(0) != '$'))
return 0;
- boost::uint8_t sum = '\0';
+ uint8_t sum = '\0';
for (size_t i = 1; i < s.size(); i++)
- sum ^= static_cast<boost::uint8_t>(s.at(i));
+ sum ^= static_cast<uint8_t>(s.at(i));
return sum;
}
@@ -303,7 +303,7 @@ private: // members
using namespace uhd::usrp;
-gpsd_iface::sptr gpsd_iface::make(const std::string &addr, const boost::uint16_t port)
+gpsd_iface::sptr gpsd_iface::make(const std::string &addr, const uint16_t port)
{
return gpsd_iface::sptr(new gpsd_iface_impl(addr, port));
}
diff --git a/host/lib/usrp/gpsd_iface.hpp b/host/lib/usrp/gpsd_iface.hpp
index 7d934ae5c..ad8ebb92a 100644
--- a/host/lib/usrp/gpsd_iface.hpp
+++ b/host/lib/usrp/gpsd_iface.hpp
@@ -18,7 +18,7 @@
#ifndef INCLUDED_GPSD_IFACE_HPP
#define INCLUDED_GPSD_IFACE_HPP
-#include <boost/cstdint.hpp>
+#include <stdint.h>
#include <boost/shared_ptr.hpp>
#include <uhd/usrp/gps_ctrl.hpp>
@@ -28,7 +28,7 @@ namespace uhd { namespace usrp {
class gpsd_iface : public virtual uhd::gps_ctrl {
public:
typedef boost::shared_ptr<gpsd_iface> sptr;
- static sptr make(const std::string &addr, boost::uint16_t port);
+ static sptr make(const std::string &addr, uint16_t port);
};
}};
diff --git a/host/lib/usrp/mboard_eeprom.cpp b/host/lib/usrp/mboard_eeprom.cpp
index f60182c76..f10e0319a 100644
--- a/host/lib/usrp/mboard_eeprom.cpp
+++ b/host/lib/usrp/mboard_eeprom.cpp
@@ -42,36 +42,36 @@ static const size_t NAME_MAX_LEN = 32 - SERIAL_LEN;
//! convert a string to a byte vector to write to eeprom
static byte_vector_t string_to_uint16_bytes(const std::string &num_str){
- const boost::uint16_t num = boost::lexical_cast<boost::uint16_t>(num_str);
+ const uint16_t num = boost::lexical_cast<uint16_t>(num_str);
const byte_vector_t lsb_msb = boost::assign::list_of
- (boost::uint8_t(num >> 0))(boost::uint8_t(num >> 8));
+ (uint8_t(num >> 0))(uint8_t(num >> 8));
return lsb_msb;
}
//! convert a byte vector read from eeprom to a string
static std::string uint16_bytes_to_string(const byte_vector_t &bytes){
- const boost::uint16_t num = (boost::uint16_t(bytes.at(0)) << 0) | (boost::uint16_t(bytes.at(1)) << 8);
+ const uint16_t num = (uint16_t(bytes.at(0)) << 0) | (uint16_t(bytes.at(1)) << 8);
return (num == 0 or num == 0xffff)? "" : boost::lexical_cast<std::string>(num);
}
/***********************************************************************
* Implementation of N100 load/store
**********************************************************************/
-static const boost::uint8_t N100_EEPROM_ADDR = 0x50;
+static const uint8_t N100_EEPROM_ADDR = 0x50;
struct n100_eeprom_map{
- boost::uint16_t hardware;
- boost::uint8_t mac_addr[6];
- boost::uint32_t subnet;
- boost::uint32_t ip_addr;
- boost::uint16_t _pad0;
- boost::uint16_t revision;
- boost::uint16_t product;
+ uint16_t hardware;
+ uint8_t mac_addr[6];
+ uint32_t subnet;
+ uint32_t ip_addr;
+ uint16_t _pad0;
+ uint16_t revision;
+ uint16_t product;
unsigned char _pad1;
unsigned char gpsdo;
unsigned char serial[SERIAL_LEN];
unsigned char name[NAME_MAX_LEN];
- boost::uint32_t gateway;
+ uint32_t gateway;
};
enum n200_gpsdo_type{
@@ -112,7 +112,7 @@ static void load_n100(mboard_eeprom_t &mb_eeprom, i2c_iface &iface){
mb_eeprom["gateway"] = boost::asio::ip::address_v4(ip_addr_bytes).to_string();
//gpsdo capabilities
- boost::uint8_t gpsdo_byte = iface.read_eeprom(N100_EEPROM_ADDR, offsetof(n100_eeprom_map, gpsdo), 1).at(0);
+ uint8_t gpsdo_byte = iface.read_eeprom(N100_EEPROM_ADDR, offsetof(n100_eeprom_map, gpsdo), 1).at(0);
switch(n200_gpsdo_type(gpsdo_byte)){
case N200_GPSDO_INTERNAL: mb_eeprom["gpsdo"] = "internal"; break;
case N200_GPSDO_ONBOARD: mb_eeprom["gpsdo"] = "onboard"; break;
@@ -184,7 +184,7 @@ static void store_n100(const mboard_eeprom_t &mb_eeprom, i2c_iface &iface){
//gpsdo capabilities
if (mb_eeprom.has_key("gpsdo")){
- boost::uint8_t gpsdo_byte = N200_GPSDO_NONE;
+ uint8_t gpsdo_byte = N200_GPSDO_NONE;
if (mb_eeprom["gpsdo"] == "internal") gpsdo_byte = N200_GPSDO_INTERNAL;
if (mb_eeprom["gpsdo"] == "onboard") gpsdo_byte = N200_GPSDO_ONBOARD;
iface.write_eeprom(N100_EEPROM_ADDR, offsetof(n100_eeprom_map, gpsdo), byte_vector_t(1, gpsdo_byte));
@@ -206,7 +206,7 @@ static void store_n100(const mboard_eeprom_t &mb_eeprom, i2c_iface &iface){
/***********************************************************************
* Implementation of X300 load/store
**********************************************************************/
-static const boost::uint8_t X300_EEPROM_ADDR = 0x50;
+static const uint8_t X300_EEPROM_ADDR = 0x50;
struct x300_eeprom_map
{
@@ -214,19 +214,19 @@ struct x300_eeprom_map
unsigned char revision[2];
unsigned char product[2];
unsigned char revision_compat[2];
- boost::uint8_t _pad0[2];
+ uint8_t _pad0[2];
//all the mac addrs
- boost::uint8_t mac_addr0[6];
- boost::uint8_t _pad1[2];
- boost::uint8_t mac_addr1[6];
- boost::uint8_t _pad2[2];
+ uint8_t mac_addr0[6];
+ uint8_t _pad1[2];
+ uint8_t mac_addr1[6];
+ uint8_t _pad2[2];
//all the IP addrs
- boost::uint32_t gateway;
- boost::uint32_t subnet[4];
- boost::uint32_t ip_addr[4];
- boost::uint8_t _pad3[16];
+ uint32_t gateway;
+ uint32_t subnet[4];
+ uint32_t ip_addr[4];
+ uint8_t _pad3[16];
//names and serials
unsigned char name[NAME_MAX_LEN];
@@ -349,7 +349,7 @@ static void store_x300(const mboard_eeprom_t &mb_eeprom, i2c_iface &iface)
/***********************************************************************
* Implementation of B000 load/store
**********************************************************************/
-static const boost::uint8_t B000_EEPROM_ADDR = 0x50;
+static const uint8_t B000_EEPROM_ADDR = 0x50;
static const size_t B000_SERIAL_LEN = 8;
//use char array so we dont need to attribute packed
@@ -372,13 +372,13 @@ static void load_b000(mboard_eeprom_t &mb_eeprom, i2c_iface &iface){
));
//extract master clock rate as a 32-bit uint in Hz
- boost::uint32_t master_clock_rate;
+ uint32_t master_clock_rate;
const byte_vector_t rate_bytes = iface.read_eeprom(
B000_EEPROM_ADDR, offsetof(b000_eeprom_map, mcr), sizeof(master_clock_rate)
);
std::copy(
rate_bytes.begin(), rate_bytes.end(), //input
- reinterpret_cast<boost::uint8_t *>(&master_clock_rate) //output
+ reinterpret_cast<uint8_t *>(&master_clock_rate) //output
);
master_clock_rate = ntohl(master_clock_rate);
if (master_clock_rate > 1e6 and master_clock_rate < 1e9){
@@ -402,11 +402,11 @@ static void store_b000(const mboard_eeprom_t &mb_eeprom, i2c_iface &iface){
//store the master clock rate as a 32-bit uint in Hz
if (mb_eeprom.has_key("mcr")){
- boost::uint32_t master_clock_rate = boost::uint32_t(boost::lexical_cast<double>(mb_eeprom["mcr"]));
+ uint32_t master_clock_rate = uint32_t(boost::lexical_cast<double>(mb_eeprom["mcr"]));
master_clock_rate = htonl(master_clock_rate);
const byte_vector_t rate_bytes(
- reinterpret_cast<const boost::uint8_t *>(&master_clock_rate),
- reinterpret_cast<const boost::uint8_t *>(&master_clock_rate) + sizeof(master_clock_rate)
+ reinterpret_cast<const uint8_t *>(&master_clock_rate),
+ reinterpret_cast<const uint8_t *>(&master_clock_rate) + sizeof(master_clock_rate)
);
iface.write_eeprom(
B000_EEPROM_ADDR, offsetof(b000_eeprom_map, mcr), rate_bytes
@@ -417,7 +417,7 @@ static void store_b000(const mboard_eeprom_t &mb_eeprom, i2c_iface &iface){
/***********************************************************************
* Implementation of B100 load/store
**********************************************************************/
-static const boost::uint8_t B100_EEPROM_ADDR = 0x50;
+static const uint8_t B100_EEPROM_ADDR = 0x50;
//use char array so we dont need to attribute packed
struct b100_eeprom_map{
@@ -481,7 +481,7 @@ static void store_b100(const mboard_eeprom_t &mb_eeprom, i2c_iface &iface){
**********************************************************************/
/* On the B200, this field indicates the slave address. From the FX3, this
* address is always 0. */
-static const boost::uint8_t B200_EEPROM_SLAVE_ADDR = 0x04;
+static const uint8_t B200_EEPROM_SLAVE_ADDR = 0x04;
//use char array so we dont need to attribute packed
struct b200_eeprom_map{
@@ -542,11 +542,11 @@ static void store_b200(const mboard_eeprom_t &mb_eeprom, i2c_iface &iface){
/***********************************************************************
* Implementation of E100 load/store
**********************************************************************/
-static const boost::uint8_t E100_EEPROM_ADDR = 0x51;
+static const uint8_t E100_EEPROM_ADDR = 0x51;
struct e100_eeprom_map{
- boost::uint16_t vendor;
- boost::uint16_t device;
+ uint16_t vendor;
+ uint16_t device;
unsigned char revision;
unsigned char content;
unsigned char model[8];
@@ -591,12 +591,12 @@ static void store_e100(const mboard_eeprom_t &mb_eeprom, i2c_iface &iface){
if (mb_eeprom.has_key("vendor")) iface.write_eeprom(
E100_EEPROM_ADDR, offsetof(e100_eeprom_map, vendor),
- to_bytes(uhd::htonx(boost::lexical_cast<boost::uint16_t>(mb_eeprom["vendor"])))
+ to_bytes(uhd::htonx(boost::lexical_cast<uint16_t>(mb_eeprom["vendor"])))
);
if (mb_eeprom.has_key("device")) iface.write_eeprom(
E100_EEPROM_ADDR, offsetof(e100_eeprom_map, device),
- to_bytes(uhd::htonx(boost::lexical_cast<boost::uint16_t>(mb_eeprom["device"])))
+ to_bytes(uhd::htonx(boost::lexical_cast<uint16_t>(mb_eeprom["device"])))
);
if (mb_eeprom.has_key("revision")) iface.write_eeprom(
diff --git a/host/lib/usrp/multi_usrp.cpp b/host/lib/usrp/multi_usrp.cpp
index 52dfa5773..7c3bf8007 100644
--- a/host/lib/usrp/multi_usrp.cpp
+++ b/host/lib/usrp/multi_usrp.cpp
@@ -749,9 +749,9 @@ public:
return _tree->list(mb_root(mboard) / "sensors");
}
- void set_user_register(const boost::uint8_t addr, const boost::uint32_t data, size_t mboard){
+ void set_user_register(const uint8_t addr, const uint32_t data, size_t mboard){
if (mboard != ALL_MBOARDS){
- typedef std::pair<boost::uint8_t, boost::uint32_t> user_reg_t;
+ typedef std::pair<uint8_t, uint32_t> user_reg_t;
_tree->access<user_reg_t>(mb_root(mboard) / "user/regs").set(user_reg_t(addr, data));
return;
}
@@ -1525,13 +1525,13 @@ public:
return banks;
}
- void set_gpio_attr(const std::string &bank, const std::string &attr, const boost::uint32_t value, const boost::uint32_t mask, const size_t mboard)
+ void set_gpio_attr(const std::string &bank, const std::string &attr, const uint32_t value, const uint32_t mask, const size_t mboard)
{
if (_tree->exists(mb_root(mboard) / "gpio" / bank))
{
- const boost::uint32_t current = _tree->access<boost::uint32_t>(mb_root(mboard) / "gpio" / bank / attr).get();
- const boost::uint32_t new_value = (current & ~mask) | (value & mask);
- _tree->access<boost::uint32_t>(mb_root(mboard) / "gpio" / bank / attr).set(new_value);
+ const uint32_t current = _tree->access<uint32_t>(mb_root(mboard) / "gpio" / bank / attr).get();
+ const uint32_t new_value = (current & ~mask) | (value & mask);
+ _tree->access<uint32_t>(mb_root(mboard) / "gpio" / bank / attr).set(new_value);
return;
}
if (bank.size() > 2 and bank[1] == 'X')
@@ -1539,21 +1539,21 @@ public:
const std::string name = bank.substr(2);
const dboard_iface::unit_t unit = (bank[0] == 'R')? dboard_iface::UNIT_RX : dboard_iface::UNIT_TX;
dboard_iface::sptr iface = _tree->access<dboard_iface::sptr>(mb_root(mboard) / "dboards" / name / "iface").get();
- if (attr == "CTRL") iface->set_pin_ctrl(unit, boost::uint16_t(value), boost::uint16_t(mask));
- if (attr == "DDR") iface->set_gpio_ddr(unit, boost::uint16_t(value), boost::uint16_t(mask));
- if (attr == "OUT") iface->set_gpio_out(unit, boost::uint16_t(value), boost::uint16_t(mask));
- if (attr == "ATR_0X") iface->set_atr_reg(unit, gpio_atr::ATR_REG_IDLE, boost::uint16_t(value), boost::uint16_t(mask));
- if (attr == "ATR_RX") iface->set_atr_reg(unit, gpio_atr::ATR_REG_RX_ONLY, boost::uint16_t(value), boost::uint16_t(mask));
- if (attr == "ATR_TX") iface->set_atr_reg(unit, gpio_atr::ATR_REG_TX_ONLY, boost::uint16_t(value), boost::uint16_t(mask));
- if (attr == "ATR_XX") iface->set_atr_reg(unit, gpio_atr::ATR_REG_FULL_DUPLEX, boost::uint16_t(value), boost::uint16_t(mask));
+ if (attr == "CTRL") iface->set_pin_ctrl(unit, uint16_t(value), uint16_t(mask));
+ if (attr == "DDR") iface->set_gpio_ddr(unit, uint16_t(value), uint16_t(mask));
+ if (attr == "OUT") iface->set_gpio_out(unit, uint16_t(value), uint16_t(mask));
+ if (attr == "ATR_0X") iface->set_atr_reg(unit, gpio_atr::ATR_REG_IDLE, uint16_t(value), uint16_t(mask));
+ if (attr == "ATR_RX") iface->set_atr_reg(unit, gpio_atr::ATR_REG_RX_ONLY, uint16_t(value), uint16_t(mask));
+ if (attr == "ATR_TX") iface->set_atr_reg(unit, gpio_atr::ATR_REG_TX_ONLY, uint16_t(value), uint16_t(mask));
+ if (attr == "ATR_XX") iface->set_atr_reg(unit, gpio_atr::ATR_REG_FULL_DUPLEX, uint16_t(value), uint16_t(mask));
}
}
- boost::uint32_t get_gpio_attr(const std::string &bank, const std::string &attr, const size_t mboard)
+ uint32_t get_gpio_attr(const std::string &bank, const std::string &attr, const size_t mboard)
{
if (_tree->exists(mb_root(mboard) / "gpio" / bank))
{
- return boost::uint32_t(_tree->access<boost::uint64_t>(mb_root(mboard) / "gpio" / bank / attr).get());
+ return uint32_t(_tree->access<uint64_t>(mb_root(mboard) / "gpio" / bank / attr).get());
}
if (bank.size() > 2 and bank[1] == 'X')
{
@@ -1572,7 +1572,7 @@ public:
return 0;
}
- void write_register(const std::string &path, const boost::uint32_t field, const boost::uint64_t value, const size_t mboard)
+ void write_register(const std::string &path, const uint32_t field, const uint64_t value, const size_t mboard)
{
if (_tree->exists(mb_root(mboard) / "registers"))
{
@@ -1587,16 +1587,16 @@ public:
switch (reg.get_bitwidth()) {
case 16:
if (reg.is_readable())
- uhd::soft_register_base::cast<uhd::soft_reg16_rw_t>(reg).write(field, static_cast<boost::uint16_t>(value));
+ uhd::soft_register_base::cast<uhd::soft_reg16_rw_t>(reg).write(field, static_cast<uint16_t>(value));
else
- uhd::soft_register_base::cast<uhd::soft_reg16_wo_t>(reg).write(field, static_cast<boost::uint16_t>(value));
+ uhd::soft_register_base::cast<uhd::soft_reg16_wo_t>(reg).write(field, static_cast<uint16_t>(value));
break;
case 32:
if (reg.is_readable())
- uhd::soft_register_base::cast<uhd::soft_reg32_rw_t>(reg).write(field, static_cast<boost::uint32_t>(value));
+ uhd::soft_register_base::cast<uhd::soft_reg32_rw_t>(reg).write(field, static_cast<uint32_t>(value));
else
- uhd::soft_register_base::cast<uhd::soft_reg32_wo_t>(reg).write(field, static_cast<boost::uint32_t>(value));
+ uhd::soft_register_base::cast<uhd::soft_reg32_wo_t>(reg).write(field, static_cast<uint32_t>(value));
break;
case 64:
@@ -1615,7 +1615,7 @@ public:
}
}
- boost::uint64_t read_register(const std::string &path, const boost::uint32_t field, const size_t mboard)
+ uint64_t read_register(const std::string &path, const uint32_t field, const size_t mboard)
{
if (_tree->exists(mb_root(mboard) / "registers"))
{
@@ -1630,16 +1630,16 @@ public:
switch (reg.get_bitwidth()) {
case 16:
if (reg.is_writable())
- return static_cast<boost::uint64_t>(uhd::soft_register_base::cast<uhd::soft_reg16_rw_t>(reg).read(field));
+ return static_cast<uint64_t>(uhd::soft_register_base::cast<uhd::soft_reg16_rw_t>(reg).read(field));
else
- return static_cast<boost::uint64_t>(uhd::soft_register_base::cast<uhd::soft_reg16_ro_t>(reg).read(field));
+ return static_cast<uint64_t>(uhd::soft_register_base::cast<uhd::soft_reg16_ro_t>(reg).read(field));
break;
case 32:
if (reg.is_writable())
- return static_cast<boost::uint64_t>(uhd::soft_register_base::cast<uhd::soft_reg32_rw_t>(reg).read(field));
+ return static_cast<uint64_t>(uhd::soft_register_base::cast<uhd::soft_reg32_rw_t>(reg).read(field));
else
- return static_cast<boost::uint64_t>(uhd::soft_register_base::cast<uhd::soft_reg32_ro_t>(reg).read(field));
+ return static_cast<uint64_t>(uhd::soft_register_base::cast<uhd::soft_reg32_ro_t>(reg).read(field));
break;
case 64:
diff --git a/host/lib/usrp/n230/n230_clk_pps_ctrl.cpp b/host/lib/usrp/n230/n230_clk_pps_ctrl.cpp
index 9d704b702..2bcfb0394 100644
--- a/host/lib/usrp/n230/n230_clk_pps_ctrl.cpp
+++ b/host/lib/usrp/n230/n230_clk_pps_ctrl.cpp
@@ -19,7 +19,7 @@
#include <uhd/utils/msg.hpp>
#include <uhd/utils/safe_call.hpp>
-#include <boost/cstdint.hpp>
+#include <stdint.h>
#include <boost/format.hpp>
#include <boost/foreach.hpp>
#include <stdexcept>
diff --git a/host/lib/usrp/n230/n230_cores.cpp b/host/lib/usrp/n230/n230_cores.cpp
index 58c702ec1..26e69e14d 100644
--- a/host/lib/usrp/n230/n230_cores.cpp
+++ b/host/lib/usrp/n230/n230_cores.cpp
@@ -33,10 +33,10 @@ n230_core_spi_core::n230_core_spi_core(
change_perif(default_perif);
}
-boost::uint32_t n230_core_spi_core::transact_spi(
+uint32_t n230_core_spi_core::transact_spi(
int which_slave,
const spi_config_t &config,
- boost::uint32_t data,
+ uint32_t data,
size_t num_bits,
bool readback)
{
diff --git a/host/lib/usrp/n230/n230_cores.hpp b/host/lib/usrp/n230/n230_cores.hpp
index 3f56c1889..db92658f1 100644
--- a/host/lib/usrp/n230/n230_cores.hpp
+++ b/host/lib/usrp/n230/n230_cores.hpp
@@ -35,10 +35,10 @@ public:
n230_core_spi_core(uhd::wb_iface::sptr iface, perif_t default_perif);
- virtual boost::uint32_t transact_spi(
+ virtual uint32_t transact_spi(
int which_slave,
const spi_config_t &config,
- boost::uint32_t data,
+ uint32_t data,
size_t num_bits,
bool readback);
diff --git a/host/lib/usrp/n230/n230_eeprom_manager.cpp b/host/lib/usrp/n230/n230_eeprom_manager.cpp
index b19deb23a..d9d02c58c 100644
--- a/host/lib/usrp/n230/n230_eeprom_manager.cpp
+++ b/host/lib/usrp/n230/n230_eeprom_manager.cpp
@@ -65,13 +65,13 @@ const mboard_eeprom_t& n230_eeprom_manager::read_mb_eeprom()
const n230_eeprom_map_t* map_ptr = reinterpret_cast<const n230_eeprom_map_t*>(_response.data);
const n230_eeprom_map_t& map = *map_ptr;
- uint16_t ver_major = uhd::htonx<boost::uint16_t>(map.data_version_major);
- uint16_t ver_minor = uhd::htonx<boost::uint16_t>(map.data_version_minor);
+ uint16_t ver_major = uhd::htonx<uint16_t>(map.data_version_major);
+ uint16_t ver_minor = uhd::htonx<uint16_t>(map.data_version_minor);
_mb_eeprom["product"] = boost::lexical_cast<std::string>(
- uhd::htonx<boost::uint16_t>(map.hw_product));
+ uhd::htonx<uint16_t>(map.hw_product));
_mb_eeprom["revision"] = boost::lexical_cast<std::string>(
- uhd::htonx<boost::uint16_t>(map.hw_revision));
+ uhd::htonx<uint16_t>(map.hw_revision));
//The revision_compat field does not exist in version 1.0
//EEPROM version 1.0 will only exist on HW revision 1 so it is safe to set
//revision_compat = revision
@@ -79,20 +79,20 @@ const mboard_eeprom_t& n230_eeprom_manager::read_mb_eeprom()
_mb_eeprom["revision_compat"] = _mb_eeprom["revision"];
} else {
_mb_eeprom["revision_compat"] = boost::lexical_cast<std::string>(
- uhd::htonx<boost::uint16_t>(map.hw_revision_compat));
+ uhd::htonx<uint16_t>(map.hw_revision_compat));
}
_mb_eeprom["serial"] = _bytes_to_string(
map.serial, N230_EEPROM_SERIAL_LEN);
//Extract ethernet info
_mb_eeprom["gateway"] = boost::asio::ip::address_v4(
- uhd::htonx<boost::uint32_t>(map.gateway)).to_string();
+ uhd::htonx<uint32_t>(map.gateway)).to_string();
for (size_t i = 0; i < N230_MAX_NUM_ETH_PORTS; i++) {
const std::string n(1, i+'0');
_mb_eeprom["ip-addr"+n] = boost::asio::ip::address_v4(
- uhd::htonx<boost::uint32_t>(map.eth_info[i].ip_addr)).to_string();
+ uhd::htonx<uint32_t>(map.eth_info[i].ip_addr)).to_string();
_mb_eeprom["subnet"+n] = boost::asio::ip::address_v4(
- uhd::htonx<boost::uint32_t>(map.eth_info[i].subnet)).to_string();
+ uhd::htonx<uint32_t>(map.eth_info[i].subnet)).to_string();
byte_vector_t mac_addr(map.eth_info[i].mac_addr, map.eth_info[i].mac_addr + 6);
_mb_eeprom["mac-addr"+n] = mac_addr_t::from_bytes(mac_addr).to_string();
}
@@ -117,28 +117,28 @@ void n230_eeprom_manager::write_mb_eeprom(const mboard_eeprom_t& eeprom)
n230_eeprom_map_t& map = *map_ptr;
// Automatic version upgrade handling
- uint16_t old_ver_major = uhd::htonx<boost::uint16_t>(map.data_version_major);
- uint16_t old_ver_minor = uhd::htonx<boost::uint16_t>(map.data_version_minor);
+ uint16_t old_ver_major = uhd::htonx<uint16_t>(map.data_version_major);
+ uint16_t old_ver_minor = uhd::htonx<uint16_t>(map.data_version_minor);
//The revision_compat field does not exist for version 1.0 so force write it
//EEPROM version 1.0 will only exist on HW revision 1 so it is safe to set
//revision_compat = revision for the upgrade
bool force_write_version_compat = (old_ver_major == 1 and old_ver_minor == 0);
- map.data_version_major = uhd::htonx<boost::uint16_t>(N230_EEPROM_VER_MAJOR);
- map.data_version_minor = uhd::htonx<boost::uint16_t>(N230_EEPROM_VER_MINOR);
+ map.data_version_major = uhd::htonx<uint16_t>(N230_EEPROM_VER_MAJOR);
+ map.data_version_minor = uhd::htonx<uint16_t>(N230_EEPROM_VER_MINOR);
if (_mb_eeprom.has_key("product")) {
- map.hw_product = uhd::htonx<boost::uint16_t>(
- boost::lexical_cast<boost::uint16_t>(_mb_eeprom["product"]));
+ map.hw_product = uhd::htonx<uint16_t>(
+ boost::lexical_cast<uint16_t>(_mb_eeprom["product"]));
}
if (_mb_eeprom.has_key("revision")) {
- map.hw_revision = uhd::htonx<boost::uint16_t>(
- boost::lexical_cast<boost::uint16_t>(_mb_eeprom["revision"]));
+ map.hw_revision = uhd::htonx<uint16_t>(
+ boost::lexical_cast<uint16_t>(_mb_eeprom["revision"]));
}
if (_mb_eeprom.has_key("revision_compat")) {
- map.hw_revision_compat = uhd::htonx<boost::uint16_t>(
- boost::lexical_cast<boost::uint16_t>(_mb_eeprom["revision_compat"]));
+ map.hw_revision_compat = uhd::htonx<uint16_t>(
+ boost::lexical_cast<uint16_t>(_mb_eeprom["revision_compat"]));
} else if (force_write_version_compat) {
map.hw_revision_compat = map.hw_revision;
}
@@ -148,17 +148,17 @@ void n230_eeprom_manager::write_mb_eeprom(const mboard_eeprom_t& eeprom)
//Push ethernet info
if (_mb_eeprom.has_key("gateway")){
- map.gateway = uhd::htonx<boost::uint32_t>(
+ map.gateway = uhd::htonx<uint32_t>(
boost::asio::ip::address_v4::from_string(_mb_eeprom["gateway"]).to_ulong());
}
for (size_t i = 0; i < N230_MAX_NUM_ETH_PORTS; i++) {
const std::string n(1, i+'0');
if (_mb_eeprom.has_key("ip-addr"+n)){
- map.eth_info[i].ip_addr = uhd::htonx<boost::uint32_t>(
+ map.eth_info[i].ip_addr = uhd::htonx<uint32_t>(
boost::asio::ip::address_v4::from_string(_mb_eeprom["ip-addr"+n]).to_ulong());
}
if (_mb_eeprom.has_key("subnet"+n)){
- map.eth_info[i].subnet = uhd::htonx<boost::uint32_t>(
+ map.eth_info[i].subnet = uhd::htonx<uint32_t>(
boost::asio::ip::address_v4::from_string(_mb_eeprom["subnet"+n]).to_ulong());
}
if (_mb_eeprom.has_key("mac-addr"+n)) {
@@ -175,11 +175,11 @@ void n230_eeprom_manager::write_mb_eeprom(const mboard_eeprom_t& eeprom)
_transact(N230_FLASH_COMM_CMD_WRITE_NV_DATA);
}
-void n230_eeprom_manager::_transact(const boost::uint32_t command)
+void n230_eeprom_manager::_transact(const uint32_t command)
{
//Load request struct
- _request.flags = uhd::htonx<boost::uint32_t>(N230_FLASH_COMM_FLAGS_ACK | command);
- _request.seq = uhd::htonx<boost::uint32_t>(_seq_num++);
+ _request.flags = uhd::htonx<uint32_t>(N230_FLASH_COMM_FLAGS_ACK | command);
+ _request.seq = uhd::htonx<uint32_t>(_seq_num++);
//Send request
_flush_xport();
@@ -190,7 +190,7 @@ void n230_eeprom_manager::_transact(const boost::uint32_t command)
if (nbytes == 0) throw uhd::io_error("n230_eeprom_manager::_transact failure");
//Sanity checks
- const size_t flags = uhd::ntohx<boost::uint32_t>(_response.flags);
+ const size_t flags = uhd::ntohx<uint32_t>(_response.flags);
UHD_ASSERT_THROW(nbytes == sizeof(_response));
UHD_ASSERT_THROW(_response.seq == _request.seq);
UHD_ASSERT_THROW(flags & command);
diff --git a/host/lib/usrp/n230/n230_eeprom_manager.hpp b/host/lib/usrp/n230/n230_eeprom_manager.hpp
index cc5aee9f3..190ed943f 100644
--- a/host/lib/usrp/n230/n230_eeprom_manager.hpp
+++ b/host/lib/usrp/n230/n230_eeprom_manager.hpp
@@ -39,7 +39,7 @@ public:
}
private: //Functions
- void _transact(const boost::uint32_t command);
+ void _transact(const uint32_t command);
void _flush_xport();
private: //Members
@@ -47,7 +47,7 @@ private: //Members
transport::udp_simple::sptr _udp_xport;
n230_flash_prog_t _request;
n230_flash_prog_t _response;
- boost::uint32_t _seq_num;
+ uint32_t _seq_num;
boost::mutex _mutex;
static const double UDP_TIMEOUT_IN_SEC;
diff --git a/host/lib/usrp/n230/n230_fpga_defs.h b/host/lib/usrp/n230/n230_fpga_defs.h
index 3aa96643f..3fa0451e7 100644
--- a/host/lib/usrp/n230/n230_fpga_defs.h
+++ b/host/lib/usrp/n230/n230_fpga_defs.h
@@ -55,9 +55,9 @@ enum xb_endpoint_t {
N230_XB_DST_UART = 5
};
-static const boost::uint8_t RADIO_CTRL_SUFFIX = 0x00;
-static const boost::uint8_t RADIO_FC_SUFFIX = 0x01;
-static const boost::uint8_t RADIO_DATA_SUFFIX = 0x02;
+static const uint8_t RADIO_CTRL_SUFFIX = 0x00;
+static const uint8_t RADIO_FC_SUFFIX = 0x01;
+static const uint8_t RADIO_DATA_SUFFIX = 0x02;
/*******************************************************************
* Seting Register Base addresses
diff --git a/host/lib/usrp/n230/n230_frontend_ctrl.cpp b/host/lib/usrp/n230/n230_frontend_ctrl.cpp
index e0820d9b2..3d81721ec 100644
--- a/host/lib/usrp/n230/n230_frontend_ctrl.cpp
+++ b/host/lib/usrp/n230/n230_frontend_ctrl.cpp
@@ -27,29 +27,29 @@
namespace uhd { namespace usrp { namespace n230 {
/* ATR Control Bits */
-static const boost::uint32_t TX_ENABLE = (1 << 7);
-static const boost::uint32_t SFDX_RX = (1 << 6);
-static const boost::uint32_t SFDX_TX = (1 << 5);
-static const boost::uint32_t SRX_RX = (1 << 4);
-static const boost::uint32_t SRX_TX = (1 << 3);
-static const boost::uint32_t LED_RX = (1 << 2);
-static const boost::uint32_t LED_TXRX_RX = (1 << 1);
-static const boost::uint32_t LED_TXRX_TX = (1 << 0);
+static const uint32_t TX_ENABLE = (1 << 7);
+static const uint32_t SFDX_RX = (1 << 6);
+static const uint32_t SFDX_TX = (1 << 5);
+static const uint32_t SRX_RX = (1 << 4);
+static const uint32_t SRX_TX = (1 << 3);
+static const uint32_t LED_RX = (1 << 2);
+static const uint32_t LED_TXRX_RX = (1 << 1);
+static const uint32_t LED_TXRX_TX = (1 << 0);
/* ATR State Definitions. */
-static const boost::uint32_t STATE_OFF = 0x00;
-static const boost::uint32_t STATE_RX_RX2 = (SFDX_RX
+static const uint32_t STATE_OFF = 0x00;
+static const uint32_t STATE_RX_RX2 = (SFDX_RX
| SFDX_TX
| LED_RX);
-static const boost::uint32_t STATE_RX_TXRX = (SRX_RX
+static const uint32_t STATE_RX_TXRX = (SRX_RX
| SRX_TX
| LED_TXRX_RX);
-static const boost::uint32_t STATE_FDX_TXRX = (TX_ENABLE
+static const uint32_t STATE_FDX_TXRX = (TX_ENABLE
| SFDX_RX
| SFDX_TX
| LED_TXRX_TX
| LED_RX);
-static const boost::uint32_t STATE_TX_TXRX = (TX_ENABLE
+static const uint32_t STATE_TX_TXRX = (TX_ENABLE
| SFDX_RX
| SFDX_TX
| LED_TXRX_TX);
diff --git a/host/lib/usrp/n230/n230_image_loader.cpp b/host/lib/usrp/n230/n230_image_loader.cpp
index 9dd4a252d..25f498a73 100644
--- a/host/lib/usrp/n230/n230_image_loader.cpp
+++ b/host/lib/usrp/n230/n230_image_loader.cpp
@@ -40,23 +40,23 @@ struct xil_bitfile_hdr_t {
{}
bool valid;
- boost::uint32_t userid;
+ uint32_t userid;
std::string product;
std::string fpga;
std::string timestamp;
- boost::uint32_t filesize;
+ uint32_t filesize;
};
-static inline boost::uint16_t _to_uint16(boost::uint8_t* buf) {
- return (static_cast<boost::uint16_t>(buf[0]) << 8) |
- (static_cast<boost::uint16_t>(buf[1]) << 0);
+static inline uint16_t _to_uint16(uint8_t* buf) {
+ return (static_cast<uint16_t>(buf[0]) << 8) |
+ (static_cast<uint16_t>(buf[1]) << 0);
}
-static inline boost::uint32_t _to_uint32(boost::uint8_t* buf) {
- return (static_cast<boost::uint32_t>(buf[0]) << 24) |
- (static_cast<boost::uint32_t>(buf[1]) << 16) |
- (static_cast<boost::uint32_t>(buf[2]) << 8) |
- (static_cast<boost::uint32_t>(buf[3]) << 0);
+static inline uint32_t _to_uint32(uint8_t* buf) {
+ return (static_cast<uint32_t>(buf[0]) << 24) |
+ (static_cast<uint32_t>(buf[1]) << 16) |
+ (static_cast<uint32_t>(buf[2]) << 8) |
+ (static_cast<uint32_t>(buf[3]) << 0);
}
static void _parse_bitfile_header(const std::string& filepath, xil_bitfile_hdr_t& hdr) {
@@ -70,9 +70,9 @@ static void _parse_bitfile_header(const std::string& filepath, xil_bitfile_hdr_t
//Parse header
size_t ptr = 0;
- boost::uint8_t* buf = reinterpret_cast<boost::uint8_t*>(hdr_buf.get()); //Shortcut
+ uint8_t* buf = reinterpret_cast<uint8_t*>(hdr_buf.get()); //Shortcut
- boost::uint8_t signature[10] = {0x00, 0x09, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0};
+ uint8_t signature[10] = {0x00, 0x09, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0};
if (memcmp(buf, signature, 10) == 0) { //Validate signature
ptr += _to_uint16(buf + ptr) + 2;
ptr += _to_uint16(buf + ptr) + 1;
@@ -80,7 +80,7 @@ static void _parse_bitfile_header(const std::string& filepath, xil_bitfile_hdr_t
std::string fields[4];
for (size_t i = 0; i < 4; i++) {
size_t key = buf[ptr++] - 'a';
- boost::uint16_t len = _to_uint16(buf + ptr); ptr += 2;
+ uint16_t len = _to_uint16(buf + ptr); ptr += 2;
fields[key] = std::string(reinterpret_cast<char*>(buf + ptr), size_t(len)); ptr += len;
}
@@ -108,11 +108,11 @@ static size_t _send_and_recv(
udp_simple::sptr xport,
n230_flash_prog_t& out, n230_flash_prog_t& in)
{
- static boost::uint32_t seqno = 0;
- out.seq = htonx<boost::uint32_t>(++seqno);
+ static uint32_t seqno = 0;
+ out.seq = htonx<uint32_t>(++seqno);
xport->send(boost::asio::buffer(&out, sizeof(n230_flash_prog_t)));
size_t len = xport->recv(boost::asio::buffer(&in, udp_simple::mtu), 0.5);
- if (len != sizeof(n230_flash_prog_t) or ntohx<boost::uint32_t>(in.seq) != seqno) {
+ if (len != sizeof(n230_flash_prog_t) or ntohx<uint32_t>(in.seq) != seqno) {
throw uhd::io_error("Error communicating with the device.");
}
return len;
@@ -173,17 +173,17 @@ static bool n230_image_loader(const image_loader::image_loader_args_t &loader_ar
while (bytes_written < image_size) {
size_t payload_size = std::min<size_t>(image_size - bytes_written, N230_FLASH_COMM_MAX_PAYLOAD_SIZE);
if (bytes_written % SECTOR_SIZE == 0) {
- out.flags = htonx<boost::uint32_t>(N230_FLASH_COMM_FLAGS_ACK|N230_FLASH_COMM_CMD_ERASE_FPGA);
- out.offset = htonx<boost::uint32_t>(bytes_written + IMAGE_BASE);
- out.size = htonx<boost::uint32_t>(payload_size);
+ out.flags = htonx<uint32_t>(N230_FLASH_COMM_FLAGS_ACK|N230_FLASH_COMM_CMD_ERASE_FPGA);
+ out.offset = htonx<uint32_t>(bytes_written + IMAGE_BASE);
+ out.size = htonx<uint32_t>(payload_size);
_send_and_recv(udp_xport, out, in);
}
- out.flags = htonx<boost::uint32_t>(N230_FLASH_COMM_FLAGS_ACK|N230_FLASH_COMM_CMD_WRITE_FPGA);
- out.offset = htonx<boost::uint32_t>(bytes_written + IMAGE_BASE);
- out.size = htonx<boost::uint32_t>(payload_size);
+ out.flags = htonx<uint32_t>(N230_FLASH_COMM_FLAGS_ACK|N230_FLASH_COMM_CMD_WRITE_FPGA);
+ out.offset = htonx<uint32_t>(bytes_written + IMAGE_BASE);
+ out.size = htonx<uint32_t>(payload_size);
image.read((char*)out.data, payload_size);
_send_and_recv(udp_xport, out, in);
- bytes_written += ntohx<boost::uint32_t>(in.size);
+ bytes_written += ntohx<uint32_t>(in.size);
std::cout << boost::format("\r-- Loading FPGA image: %d%%")
% (int(double(bytes_written) / double(image_size) * 100.0))
<< std::flush;
diff --git a/host/lib/usrp/n230/n230_impl.cpp b/host/lib/usrp/n230/n230_impl.cpp
index 5e8aa37b7..24ef5d97d 100644
--- a/host/lib/usrp/n230/n230_impl.cpp
+++ b/host/lib/usrp/n230/n230_impl.cpp
@@ -214,8 +214,8 @@ n230_impl::n230_impl(const uhd::device_addr_t& dev_addr)
"checks.\nOperating in this mode may cause hardware damage and unstable "
"radio performance!"<< std::endl;
}
- boost::uint16_t hw_rev = boost::lexical_cast<boost::uint16_t>(mb_eeprom["revision"]);
- boost::uint16_t hw_rev_compat = boost::lexical_cast<boost::uint16_t>(mb_eeprom["revision_compat"]);
+ uint16_t hw_rev = boost::lexical_cast<uint16_t>(mb_eeprom["revision"]);
+ uint16_t hw_rev_compat = boost::lexical_cast<uint16_t>(mb_eeprom["revision_compat"]);
if (not recover_mb_eeprom) {
if (hw_rev_compat > N230_HW_REVISION_COMPAT) {
throw uhd::runtime_error(str(boost::format(
@@ -411,25 +411,25 @@ void n230_impl::_initialize_property_tree(const fs_path& mb_path)
//------------------------------------------------------------------
// MiniSAS GPIO
//------------------------------------------------------------------
- _tree->create<boost::uint32_t>(mb_path / "gpio" / "FP0" / "DDR")
+ _tree->create<uint32_t>(mb_path / "gpio" / "FP0" / "DDR")
.set(0)
.add_coerced_subscriber(boost::bind(&gpio_atr::gpio_atr_3000::set_gpio_attr,
_resource_mgr->get_minisas_gpio_ctrl_sptr(0), gpio_atr::GPIO_DDR, _1));
- _tree->create<boost::uint32_t>(mb_path / "gpio" / "FP1" / "DDR")
+ _tree->create<uint32_t>(mb_path / "gpio" / "FP1" / "DDR")
.set(0)
.add_coerced_subscriber(boost::bind(&gpio_atr::gpio_atr_3000::set_gpio_attr,
_resource_mgr->get_minisas_gpio_ctrl_sptr(1), gpio_atr::GPIO_DDR, _1));
- _tree->create<boost::uint32_t>(mb_path / "gpio" / "FP0" / "OUT")
+ _tree->create<uint32_t>(mb_path / "gpio" / "FP0" / "OUT")
.set(0)
.add_coerced_subscriber(boost::bind(&gpio_atr::gpio_atr_3000::set_gpio_attr,
_resource_mgr->get_minisas_gpio_ctrl_sptr(0), gpio_atr::GPIO_OUT, _1));
- _tree->create<boost::uint32_t>(mb_path / "gpio" / "FP1" / "OUT")
+ _tree->create<uint32_t>(mb_path / "gpio" / "FP1" / "OUT")
.set(0)
.add_coerced_subscriber(boost::bind(&gpio_atr::gpio_atr_3000::set_gpio_attr,
_resource_mgr->get_minisas_gpio_ctrl_sptr(1), gpio_atr::GPIO_OUT, _1));
- _tree->create<boost::uint32_t>(mb_path / "gpio" / "FP0" / "READBACK")
+ _tree->create<uint32_t>(mb_path / "gpio" / "FP0" / "READBACK")
.set_publisher(boost::bind(&gpio_atr::gpio_atr_3000::read_gpio, _resource_mgr->get_minisas_gpio_ctrl_sptr(0)));
- _tree->create<boost::uint32_t>(mb_path / "gpio" / "FP1" / "READBACK")
+ _tree->create<uint32_t>(mb_path / "gpio" / "FP1" / "READBACK")
.set_publisher(boost::bind(&gpio_atr::gpio_atr_3000::read_gpio, _resource_mgr->get_minisas_gpio_ctrl_sptr(1)));
//------------------------------------------------------------------
diff --git a/host/lib/usrp/n230/n230_resource_manager.cpp b/host/lib/usrp/n230/n230_resource_manager.cpp
index f13dd0b33..826db5ed2 100644
--- a/host/lib/usrp/n230/n230_resource_manager.cpp
+++ b/host/lib/usrp/n230/n230_resource_manager.cpp
@@ -89,7 +89,7 @@ n230_resource_manager::n230_resource_manager(
n230_eth_conn_t conn_iface;
conn_iface.ip_addr = addr;
- boost::uint32_t iface_id = 0xFFFFFFFF;
+ uint32_t iface_id = 0xFFFFFFFF;
try {
iface_id = usrp3::usrp3_fw_ctrl_iface::get_iface_id(
conn_iface.ip_addr, BOOST_STRINGIZE(N230_FW_COMMS_UDP_PORT), N230_FW_PRODUCT_ID);
@@ -360,16 +360,16 @@ void n230_resource_manager::_initialize_radio(size_t instance)
}
}
-boost::uint8_t xb_ep_to_sid(fpga::xb_endpoint_t ep) {
- return static_cast<boost::uint8_t>(ep) << 4;
+uint8_t xb_ep_to_sid(fpga::xb_endpoint_t ep) {
+ return static_cast<uint8_t>(ep) << 4;
}
const sid_t n230_resource_manager::_generate_sid(const n230_endpoint_t type, const n230_eth_port_t xport, size_t instance)
{
fpga::xb_endpoint_t xb_dest_ep;
- boost::uint8_t sid_dest_ep = 0;
+ uint8_t sid_dest_ep = 0;
fpga::xb_endpoint_t xb_ret_ep = (xport == ETH1) ? fpga::N230_XB_DST_E1 : fpga::N230_XB_DST_E0;
- boost::uint8_t sid_ret_addr = (xport == ETH1) ? N230_HOST_SRC_ADDR_ETH1 : N230_HOST_SRC_ADDR_ETH0;
+ uint8_t sid_ret_addr = (xport == ETH1) ? N230_HOST_SRC_ADDR_ETH1 : N230_HOST_SRC_ADDR_ETH0;
if (type == CORE or type == GPS_UART) {
//Non-radio endpoints
@@ -399,10 +399,10 @@ const sid_t n230_resource_manager::_generate_sid(const n230_endpoint_t type, con
_fw_ctrl->poke32(fw::reg_addr(fw::WB_SBRB_BASE, fw::SR_ZPU_XB_LOCAL), sid.get_dst_addr());
// Program CAM entry for returning packets to us
// This type of packet does not match the XB_LOCAL address and is looked up in the lower half of the CAM
- _fw_ctrl->poke32(fw::reg_addr(fw::WB_XB_SBRB_BASE, sid.get_src_addr()), static_cast<boost::uint32_t>(xb_ret_ep));
+ _fw_ctrl->poke32(fw::reg_addr(fw::WB_XB_SBRB_BASE, sid.get_src_addr()), static_cast<uint32_t>(xb_ret_ep));
// Program CAM entry for outgoing packets matching a N230 resource (for example a Radio)
// This type of packet does matches the XB_LOCAL address and is looked up in the upper half of the CAM
- _fw_ctrl->poke32(fw::reg_addr(fw::WB_XB_SBRB_BASE, 256 + sid.get_dst_endpoint()), static_cast<boost::uint32_t>(xb_dest_ep));
+ _fw_ctrl->poke32(fw::reg_addr(fw::WB_XB_SBRB_BASE, 256 + sid.get_dst_endpoint()), static_cast<uint32_t>(xb_dest_ep));
return sid;
}
@@ -434,8 +434,8 @@ void n230_resource_manager::_program_dispatcher(
//Send a mini packet with SID into the ZPU
//ZPU will reprogram the ethernet framer
transport::managed_send_buffer::sptr buff = xport.get_send_buff();
- buff->cast<boost::uint32_t *>()[0] = 0; //eth dispatch looks for != 0
- buff->cast<boost::uint32_t *>()[1] = uhd::htonx(sid.get());
+ buff->cast<uint32_t *>()[0] = 0; //eth dispatch looks for != 0
+ buff->cast<uint32_t *>()[1] = uhd::htonx(sid.get());
buff->commit(8);
buff.reset();
@@ -466,8 +466,8 @@ bool n230_resource_manager::_radio_register_loopback_self_test(wb_iface::sptr if
size_t hash = static_cast<size_t>(time(NULL));
for (size_t i = 0; i < 100; i++) {
boost::hash_combine(hash, i);
- iface->poke32(fpga::sr_addr(fpga::SR_RADIO_TEST), boost::uint32_t(hash));
- test_fail = iface->peek32(fpga::rb_addr(fpga::RB_RADIO_TEST)) != boost::uint32_t(hash);
+ iface->poke32(fpga::sr_addr(fpga::SR_RADIO_TEST), uint32_t(hash));
+ test_fail = iface->peek32(fpga::rb_addr(fpga::RB_RADIO_TEST)) != uint32_t(hash);
if (test_fail) break; //exit loop on any failure
}
return !test_fail;
@@ -479,13 +479,13 @@ bool n230_resource_manager::_radio_data_loopback_self_test(wb_iface::sptr iface)
size_t hash = size_t(time(NULL));
for (size_t i = 0; i < 100; i++) {
boost::hash_combine(hash, i);
- const boost::uint32_t word32 = boost::uint32_t(hash) & (IF_DATA_I_MASK | IF_DATA_Q_MASK);
+ const uint32_t word32 = uint32_t(hash) & (IF_DATA_I_MASK | IF_DATA_Q_MASK);
iface->poke32(fpga::sr_addr(fpga::SR_RADIO_CODEC_IDLE), word32);
iface->peek64(fpga::rb_addr(fpga::RB_RADIO_CODEC_DATA)); //block until request completes
boost::this_thread::sleep(boost::posix_time::microseconds(100)); //wait for loopback to propagate through codec
- const boost::uint64_t rb_word64 = iface->peek64(fpga::rb_addr(fpga::RB_RADIO_CODEC_DATA));
- const boost::uint32_t rb_tx = boost::uint32_t(rb_word64 >> 32);
- const boost::uint32_t rb_rx = boost::uint32_t(rb_word64 & 0xffffffff);
+ const uint64_t rb_word64 = iface->peek64(fpga::rb_addr(fpga::RB_RADIO_CODEC_DATA));
+ const uint32_t rb_tx = uint32_t(rb_word64 >> 32);
+ const uint32_t rb_rx = uint32_t(rb_word64 & 0xffffffff);
test_fail = word32 != rb_tx or word32 != rb_rx;
if (test_fail)
UHD_MSG(fastpath) << boost::format("mismatch (exp:%x, got:%x and %x)... ") % word32 % rb_tx % rb_rx;
@@ -514,7 +514,7 @@ std::string n230_resource_manager::_get_fpga_upgrade_msg() {
void n230_resource_manager::_check_fw_compat()
{
- boost::uint32_t compat_num = _fw_ctrl->peek32(N230_FW_HOST_SHMEM_OFFSET(fw_compat_num));
+ uint32_t compat_num = _fw_ctrl->peek32(N230_FW_HOST_SHMEM_OFFSET(fw_compat_num));
_fw_version.compat_major = compat_num >> 16;
_fw_version.compat_minor = compat_num;
_fw_version.version_hash = _fw_ctrl->peek32(N230_FW_HOST_SHMEM_OFFSET(fw_version_hash));
@@ -524,23 +524,23 @@ void n230_resource_manager::_check_fw_compat()
"Expected firmware compatibility number %d.x, but got %d.%d\n"
"The firmware build is not compatible with the host code build.\n"
"%s"
- ) % static_cast<boost::uint32_t>(N230_FW_COMPAT_NUM_MAJOR)
- % static_cast<boost::uint32_t>(_fw_version.compat_major)
- % static_cast<boost::uint32_t>(_fw_version.compat_minor)
+ ) % static_cast<uint32_t>(N230_FW_COMPAT_NUM_MAJOR)
+ % static_cast<uint32_t>(_fw_version.compat_major)
+ % static_cast<uint32_t>(_fw_version.compat_minor)
% _get_fpga_upgrade_msg()));
}
}
void n230_resource_manager::_check_fpga_compat()
{
- const boost::uint64_t compat = _core_ctrl->peek64(fpga::rb_addr(fpga::RB_CORE_SIGNATUE));
- const boost::uint32_t signature = boost::uint32_t(compat >> 32);
- const boost::uint16_t product_id = boost::uint8_t(compat >> 24);
- _fpga_version.compat_major = static_cast<boost::uint8_t>(compat >> 16);
- _fpga_version.compat_minor = static_cast<boost::uint16_t>(compat);
+ const uint64_t compat = _core_ctrl->peek64(fpga::rb_addr(fpga::RB_CORE_SIGNATUE));
+ const uint32_t signature = uint32_t(compat >> 32);
+ const uint16_t product_id = uint8_t(compat >> 24);
+ _fpga_version.compat_major = static_cast<uint8_t>(compat >> 16);
+ _fpga_version.compat_minor = static_cast<uint16_t>(compat);
- const boost::uint64_t version_hash = _core_ctrl->peek64(fpga::rb_addr(fpga::RB_CORE_VERSION_HASH));
- _fpga_version.version_hash = boost::uint32_t(version_hash);
+ const uint64_t version_hash = _core_ctrl->peek64(fpga::rb_addr(fpga::RB_CORE_VERSION_HASH));
+ _fpga_version.version_hash = uint32_t(version_hash);
if (signature != 0x0ACE0BA5E || product_id != fpga::RB_N230_PRODUCT_ID)
throw uhd::runtime_error("Signature check failed. Please contact support.");
@@ -559,9 +559,9 @@ void n230_resource_manager::_check_fpga_compat()
"Expected FPGA compatibility number %d.x, but got %d.%d:\n"
"The FPGA build is not compatible with the host code build.\n"
"%s"
- ) % static_cast<boost::uint32_t>(fpga::RB_N230_COMPAT_MAJOR)
- % static_cast<boost::uint32_t>(_fpga_version.compat_major)
- % static_cast<boost::uint32_t>(_fpga_version.compat_minor)
+ ) % static_cast<uint32_t>(fpga::RB_N230_COMPAT_MAJOR)
+ % static_cast<uint32_t>(_fpga_version.compat_major)
+ % static_cast<uint32_t>(_fpga_version.compat_minor)
% _get_fpga_upgrade_msg()));
}
}
diff --git a/host/lib/usrp/n230/n230_resource_manager.hpp b/host/lib/usrp/n230/n230_resource_manager.hpp
index 0a1178bd2..180f4f437 100644
--- a/host/lib/usrp/n230/n230_resource_manager.hpp
+++ b/host/lib/usrp/n230/n230_resource_manager.hpp
@@ -108,7 +108,7 @@ public: //Methods
}
}
- inline boost::uint32_t get_version(n230_ver_src_t src, n230_version_t type) {
+ inline uint32_t get_version(n230_ver_src_t src, n230_version_t type) {
switch (src) {
case FPGA: return _fpga_version.get(type);
case FIRMWARE: return _fw_version.get(type);
@@ -210,11 +210,11 @@ public: //Methods
private:
struct ver_info_t {
- boost::uint8_t compat_major;
- boost::uint16_t compat_minor;
- boost::uint32_t version_hash;
+ uint8_t compat_major;
+ uint16_t compat_minor;
+ uint32_t version_hash;
- boost::uint32_t get(n230_version_t type) {
+ uint32_t get(n230_version_t type) {
switch (type) {
case COMPAT_MAJOR: return compat_major;
case COMPAT_MINOR: return compat_minor;
@@ -281,7 +281,7 @@ private:
static boost::mutex _claimer_mutex; //All claims and checks in this process are serialized
//Transport
- boost::uint8_t _last_host_enpoint;
+ uint8_t _last_host_enpoint;
//Radio settings interface
radio_ctrl_core_3000::sptr _core_ctrl;
diff --git a/host/lib/usrp/n230/n230_stream_manager.cpp b/host/lib/usrp/n230/n230_stream_manager.cpp
index e7624ecd6..0528212d0 100644
--- a/host/lib/usrp/n230/n230_stream_manager.cpp
+++ b/host/lib/usrp/n230/n230_stream_manager.cpp
@@ -33,7 +33,7 @@ static const size_t N230_TX_MAX_ASYNC_MESSAGES = 1000;
static const size_t N230_TX_MAX_SPP = 4092;
static const size_t N230_TX_FC_RESPONSE_FREQ = 10; //per flow-control window
-static const boost::uint32_t N230_EVENT_CODE_FLOW_CTRL = 0;
+static const uint32_t N230_EVENT_CODE_FLOW_CTRL = 0;
namespace uhd { namespace usrp { namespace n230 {
@@ -97,7 +97,7 @@ rx_streamer::sptr n230_stream_manager::get_rx_stream(const uhd::stream_args_t &a
//calculate packet size
static const size_t hdr_size = 0
- + vrt::max_if_hdr_words32*sizeof(boost::uint32_t)
+ + vrt::max_if_hdr_words32*sizeof(uint32_t)
//+ sizeof(vrt::if_packet_info_t().tlr) //no longer using trailer
- sizeof(vrt::if_packet_info_t().cid) //no class id ever used
- sizeof(vrt::if_packet_info_t().tsi) //no int time ever used
@@ -224,8 +224,8 @@ tx_streamer::sptr n230_stream_manager::get_tx_stream(const uhd::stream_args_t &a
//calculate packet size
static const size_t hdr_size = 0
- + vrt::num_vrl_words32*sizeof(boost::uint32_t)
- + vrt::max_if_hdr_words32*sizeof(boost::uint32_t)
+ + vrt::num_vrl_words32*sizeof(uint32_t)
+ + vrt::max_if_hdr_words32*sizeof(uint32_t)
//+ sizeof(vrt::if_packet_info_t().tlr) //forced to have trailer
- sizeof(vrt::if_packet_info_t().cid) //no class id ever used
- sizeof(vrt::if_packet_info_t().tsi) //no int time ever used
@@ -424,7 +424,7 @@ void n230_stream_manager::_handle_rx_flowctrl(
if (not buff) {
throw uhd::runtime_error("handle_rx_flowctrl timed out getting a send buffer");
}
- boost::uint32_t *pkt = buff->cast<boost::uint32_t *>();
+ uint32_t *pkt = buff->cast<uint32_t *>();
//recover seq32
size_t& seq_sw = fc_cache->last_seq_in;
@@ -437,7 +437,7 @@ void n230_stream_manager::_handle_rx_flowctrl(
vrt::if_packet_info_t packet_info;
packet_info.packet_type = vrt::if_packet_info_t::PACKET_TYPE_CONTEXT;
packet_info.num_payload_words32 = RXFC_PACKET_LEN_IN_WORDS;
- packet_info.num_payload_bytes = packet_info.num_payload_words32*sizeof(boost::uint32_t);
+ packet_info.num_payload_bytes = packet_info.num_payload_words32*sizeof(uint32_t);
packet_info.packet_count = seq_sw;
packet_info.sob = false;
packet_info.eob = false;
@@ -452,11 +452,11 @@ void n230_stream_manager::_handle_rx_flowctrl(
_cvita_hdr_pack(pkt, packet_info);
//load payload
- pkt[packet_info.num_header_words32 + RXFC_CMD_CODE_OFFSET] = uhd::htonx<boost::uint32_t>(N230_EVENT_CODE_FLOW_CTRL);
- pkt[packet_info.num_header_words32 + RXFC_SEQ_NUM_OFFSET] = uhd::htonx<boost::uint32_t>(seq_sw);
+ pkt[packet_info.num_header_words32 + RXFC_CMD_CODE_OFFSET] = uhd::htonx<uint32_t>(N230_EVENT_CODE_FLOW_CTRL);
+ pkt[packet_info.num_header_words32 + RXFC_SEQ_NUM_OFFSET] = uhd::htonx<uint32_t>(seq_sw);
//send the buffer over the interface
- buff->commit(sizeof(boost::uint32_t)*(packet_info.num_packet_words32));
+ buff->commit(sizeof(uint32_t)*(packet_info.num_packet_words32));
}
void n230_stream_manager::_handle_tx_async_msgs(
@@ -469,8 +469,8 @@ void n230_stream_manager::_handle_tx_async_msgs(
//extract packet info
vrt::if_packet_info_t if_packet_info;
- if_packet_info.num_packet_words32 = buff->size()/sizeof(boost::uint32_t);
- const boost::uint32_t *packet_buff = buff->cast<const boost::uint32_t *>();
+ if_packet_info.num_packet_words32 = buff->size()/sizeof(uint32_t);
+ const uint32_t *packet_buff = buff->cast<const uint32_t *>();
//unpacking can fail
uint32_t (*endian_conv)(uint32_t) = uhd::ntohx;
@@ -544,7 +544,7 @@ double n230_stream_manager::_get_tick_rate()
}
void n230_stream_manager::_cvita_hdr_unpack(
- const boost::uint32_t *packet_buff,
+ const uint32_t *packet_buff,
vrt::if_packet_info_t &if_packet_info)
{
if_packet_info.link_type = vrt::if_packet_info_t::LINK_TYPE_CHDR;
@@ -552,7 +552,7 @@ void n230_stream_manager::_cvita_hdr_unpack(
}
void n230_stream_manager::_cvita_hdr_pack(
- boost::uint32_t *packet_buff,
+ uint32_t *packet_buff,
vrt::if_packet_info_t &if_packet_info)
{
if_packet_info.link_type = vrt::if_packet_info_t::LINK_TYPE_CHDR;
diff --git a/host/lib/usrp/n230/n230_stream_manager.hpp b/host/lib/usrp/n230/n230_stream_manager.hpp
index 7a496c4e9..c3588474e 100644
--- a/host/lib/usrp/n230/n230_stream_manager.hpp
+++ b/host/lib/usrp/n230/n230_stream_manager.hpp
@@ -123,11 +123,11 @@ private:
size_t hw_buff_size);
static void _cvita_hdr_unpack(
- const boost::uint32_t *packet_buff,
+ const uint32_t *packet_buff,
transport::vrt::if_packet_info_t &if_packet_info);
static void _cvita_hdr_pack(
- boost::uint32_t *packet_buff,
+ uint32_t *packet_buff,
transport::vrt::if_packet_info_t &if_packet_info);
const n230_device_args_t _dev_args;
@@ -143,7 +143,7 @@ private:
stream_args_t _tx_stream_cached_args[fpga::NUM_RADIOS];
stream_args_t _rx_stream_cached_args[fpga::NUM_RADIOS];
- static const boost::uint32_t HW_SEQ_NUM_MASK = 0xFFF;
+ static const uint32_t HW_SEQ_NUM_MASK = 0xFFF;
};
}}} //namespace
diff --git a/host/lib/usrp/n230/n230_uart.cpp b/host/lib/usrp/n230/n230_uart.cpp
index 20936c303..7291a7276 100644
--- a/host/lib/usrp/n230/n230_uart.cpp
+++ b/host/lib/usrp/n230/n230_uart.cpp
@@ -31,7 +31,7 @@ namespace uhd { namespace usrp { namespace n230 {
struct n230_uart_impl : n230_uart
{
- n230_uart_impl(zero_copy_if::sptr xport, const boost::uint32_t sid):
+ n230_uart_impl(zero_copy_if::sptr xport, const uint32_t sid):
_xport(xport),
_sid(sid),
_count(0),
@@ -53,7 +53,7 @@ struct n230_uart_impl : n230_uart
packet_info.link_type = vrt::if_packet_info_t::LINK_TYPE_CHDR;
packet_info.packet_type = vrt::if_packet_info_t::PACKET_TYPE_CONTEXT;
packet_info.num_payload_words32 = 2;
- packet_info.num_payload_bytes = packet_info.num_payload_words32*sizeof(boost::uint32_t);
+ packet_info.num_payload_bytes = packet_info.num_payload_words32*sizeof(uint32_t);
packet_info.packet_count = _count++;
packet_info.sob = false;
packet_info.eob = false;
@@ -64,11 +64,11 @@ struct n230_uart_impl : n230_uart
packet_info.has_tsf = false;
packet_info.has_tlr = false;
- boost::uint32_t *packet_buff = buff->cast<boost::uint32_t *>();
+ uint32_t *packet_buff = buff->cast<uint32_t *>();
vrt::if_hdr_pack_le(packet_buff, packet_info);
- packet_buff[packet_info.num_header_words32+0] = uhd::htonx(boost::uint32_t(_baud_div));
- packet_buff[packet_info.num_header_words32+1] = uhd::htonx(boost::uint32_t(ch));
- buff->commit(packet_info.num_packet_words32*sizeof(boost::uint32_t));
+ packet_buff[packet_info.num_header_words32+0] = uhd::htonx(uint32_t(_baud_div));
+ packet_buff[packet_info.num_header_words32+1] = uhd::htonx(uint32_t(ch));
+ buff->commit(packet_info.num_packet_words32*sizeof(uint32_t));
}
void write_uart(const std::string &buff)
@@ -100,10 +100,10 @@ struct n230_uart_impl : n230_uart
managed_recv_buffer::sptr buff = _xport->get_recv_buff();
if (not buff)
return;
- const boost::uint32_t *packet_buff = buff->cast<const boost::uint32_t *>();
+ const uint32_t *packet_buff = buff->cast<const uint32_t *>();
vrt::if_packet_info_t packet_info;
packet_info.link_type = vrt::if_packet_info_t::LINK_TYPE_CHDR;
- packet_info.num_packet_words32 = buff->size()/sizeof(boost::uint32_t);
+ packet_info.num_packet_words32 = buff->size()/sizeof(uint32_t);
vrt::if_hdr_unpack_be(packet_buff, packet_info);
const char ch = char(uhd::ntohx(packet_buff[packet_info.num_header_words32+1]));
_char_queue.push_with_pop_on_full(ch);
@@ -115,7 +115,7 @@ struct n230_uart_impl : n230_uart
}
const zero_copy_if::sptr _xport;
- const boost::uint32_t _sid;
+ const uint32_t _sid;
size_t _count;
size_t _baud_div;
bounded_buffer<char> _char_queue;
@@ -123,7 +123,7 @@ struct n230_uart_impl : n230_uart
};
-n230_uart::sptr n230_uart::make(zero_copy_if::sptr xport, const boost::uint32_t sid)
+n230_uart::sptr n230_uart::make(zero_copy_if::sptr xport, const uint32_t sid)
{
return n230_uart::sptr(new n230_uart_impl(xport, sid));
}
diff --git a/host/lib/usrp/n230/n230_uart.hpp b/host/lib/usrp/n230/n230_uart.hpp
index 0bde12ab2..168399f50 100644
--- a/host/lib/usrp/n230/n230_uart.hpp
+++ b/host/lib/usrp/n230/n230_uart.hpp
@@ -29,7 +29,7 @@ class n230_uart: boost::noncopyable, public uhd::uart_iface
{
public:
typedef boost::shared_ptr<n230_uart> sptr;
- static sptr make(uhd::transport::zero_copy_if::sptr, const boost::uint32_t sid);
+ static sptr make(uhd::transport::zero_copy_if::sptr, const uint32_t sid);
virtual void set_baud_divider(const double baud_div) = 0;
};
diff --git a/host/lib/usrp/usrp1/codec_ctrl.cpp b/host/lib/usrp/usrp1/codec_ctrl.cpp
index 8ba7b54ca..4c811d5e2 100644
--- a/host/lib/usrp/usrp1/codec_ctrl.cpp
+++ b/host/lib/usrp/usrp1/codec_ctrl.cpp
@@ -23,7 +23,7 @@
#include <uhd/exception.hpp>
#include <uhd/utils/algorithm.hpp>
#include <uhd/utils/byteswap.hpp>
-#include <boost/cstdint.hpp>
+#include <stdint.h>
#include <boost/format.hpp>
#include <boost/tuple/tuple.hpp>
#include <boost/math/special_functions/round.hpp>
@@ -70,8 +70,8 @@ private:
spi_iface::sptr _iface;
int _spi_slave;
ad9862_regs_t _ad9862_regs;
- void send_reg(boost::uint8_t addr);
- void recv_reg(boost::uint8_t addr);
+ void send_reg(uint8_t addr);
+ void recv_reg(uint8_t addr);
double coarse_tune(double codec_rate, double freq);
double fine_tune(double codec_rate, double freq);
@@ -124,7 +124,7 @@ usrp1_codec_ctrl_impl::usrp1_codec_ctrl_impl(spi_iface::sptr iface, int spi_slav
_ad9862_regs.clkout2_div_factor = ad9862_regs_t::CLKOUT2_DIV_FACTOR_2;
//write the register settings to the codec
- for (boost::uint8_t addr = 0; addr <= 25; addr++) {
+ for (uint8_t addr = 0; addr <= 25; addr++) {
this->send_reg(addr);
}
@@ -198,9 +198,9 @@ double usrp1_codec_ctrl_impl::get_rx_pga_gain(char which){
/***********************************************************************
* Codec Control AUX ADC Methods
**********************************************************************/
-static double aux_adc_to_volts(boost::uint8_t high, boost::uint8_t low)
+static double aux_adc_to_volts(uint8_t high, uint8_t low)
{
- return double(((boost::uint16_t(high) << 2) | low)*3.3)/0x3ff;
+ return double(((uint16_t(high) << 2) | low)*3.3)/0x3ff;
}
double usrp1_codec_ctrl_impl::read_aux_adc(aux_adc_t which){
@@ -243,19 +243,19 @@ void usrp1_codec_ctrl_impl::write_aux_dac(aux_dac_t which, double volts)
{
//special case for aux dac d (aka sigma delta word)
if (which == AUX_DAC_D) {
- boost::uint16_t dac_word = uhd::clip(boost::math::iround(volts*0xfff/3.3), 0, 0xfff);
- _ad9862_regs.sig_delt_11_4 = boost::uint8_t(dac_word >> 4);
- _ad9862_regs.sig_delt_3_0 = boost::uint8_t(dac_word & 0xf);
+ uint16_t dac_word = uhd::clip(boost::math::iround(volts*0xfff/3.3), 0, 0xfff);
+ _ad9862_regs.sig_delt_11_4 = uint8_t(dac_word >> 4);
+ _ad9862_regs.sig_delt_3_0 = uint8_t(dac_word & 0xf);
this->send_reg(42);
this->send_reg(43);
return;
}
//calculate the dac word for aux dac a, b, c
- boost::uint8_t dac_word = uhd::clip(boost::math::iround(volts*0xff/3.3), 0, 0xff);
+ uint8_t dac_word = uhd::clip(boost::math::iround(volts*0xff/3.3), 0, 0xff);
//setup a lookup table for the aux dac params (reg ref, reg addr)
- typedef boost::tuple<boost::uint8_t*, boost::uint8_t> dac_params_t;
+ typedef boost::tuple<uint8_t*, uint8_t> dac_params_t;
uhd::dict<aux_dac_t, dac_params_t> aux_dac_to_params = boost::assign::map_list_of
(AUX_DAC_A, dac_params_t(&_ad9862_regs.aux_dac_a, 36))
(AUX_DAC_B, dac_params_t(&_ad9862_regs.aux_dac_b, 37))
@@ -264,7 +264,7 @@ void usrp1_codec_ctrl_impl::write_aux_dac(aux_dac_t which, double volts)
//set the aux dac register
UHD_ASSERT_THROW(aux_dac_to_params.has_key(which));
- boost::uint8_t *reg_ref, reg_addr;
+ uint8_t *reg_ref, reg_addr;
boost::tie(reg_ref, reg_addr) = aux_dac_to_params[which];
*reg_ref = dac_word;
this->send_reg(reg_addr);
@@ -273,9 +273,9 @@ void usrp1_codec_ctrl_impl::write_aux_dac(aux_dac_t which, double volts)
/***********************************************************************
* Codec Control SPI Methods
**********************************************************************/
-void usrp1_codec_ctrl_impl::send_reg(boost::uint8_t addr)
+void usrp1_codec_ctrl_impl::send_reg(uint8_t addr)
{
- boost::uint32_t reg = _ad9862_regs.get_write_reg(addr);
+ uint32_t reg = _ad9862_regs.get_write_reg(addr);
UHD_LOGV(often)
<< "codec control write reg: 0x"
@@ -285,16 +285,16 @@ void usrp1_codec_ctrl_impl::send_reg(boost::uint8_t addr)
spi_config_t::EDGE_RISE, reg, 16);
}
-void usrp1_codec_ctrl_impl::recv_reg(boost::uint8_t addr)
+void usrp1_codec_ctrl_impl::recv_reg(uint8_t addr)
{
- boost::uint32_t reg = _ad9862_regs.get_read_reg(addr);
+ uint32_t reg = _ad9862_regs.get_read_reg(addr);
UHD_LOGV(often)
<< "codec control read reg: 0x"
<< std::setw(8) << std::hex << reg << std::endl
;
- boost::uint32_t ret = _iface->read_spi(_spi_slave,
+ uint32_t ret = _iface->read_spi(_spi_slave,
spi_config_t::EDGE_RISE, reg, 16);
UHD_LOGV(often)
@@ -302,7 +302,7 @@ void usrp1_codec_ctrl_impl::recv_reg(boost::uint8_t addr)
<< std::setw(8) << std::hex << ret << std::endl
;
- _ad9862_regs.set_reg(addr, boost::uint16_t(ret));
+ _ad9862_regs.set_reg(addr, uint16_t(ret));
}
/***********************************************************************
@@ -356,7 +356,7 @@ double usrp1_codec_ctrl_impl::fine_tune(double codec_rate, double target_freq)
{
static const double scale_factor = std::pow(2.0, 24);
- boost::uint32_t freq_word = boost::uint32_t(
+ uint32_t freq_word = uint32_t(
boost::math::round(std::abs((target_freq / codec_rate) * scale_factor)));
double actual_freq = freq_word * codec_rate / scale_factor;
diff --git a/host/lib/usrp/usrp1/dboard_iface.cpp b/host/lib/usrp/usrp1/dboard_iface.cpp
index 5640e8dae..645c0bfd3 100644
--- a/host/lib/usrp/usrp1/dboard_iface.cpp
+++ b/host/lib/usrp/usrp1/dboard_iface.cpp
@@ -107,35 +107,35 @@ public:
void write_aux_dac(unit_t, aux_dac_t, double);
double read_aux_adc(unit_t, aux_adc_t);
- void set_pin_ctrl(unit_t unit, boost::uint32_t value, boost::uint32_t mask = 0xffffffff);
- boost::uint32_t get_pin_ctrl(unit_t unit);
- void set_atr_reg(unit_t unit, atr_reg_t reg, boost::uint32_t value, boost::uint32_t mask = 0xffffffff);
- boost::uint32_t get_atr_reg(unit_t unit, atr_reg_t reg);
- void set_gpio_ddr(unit_t unit, boost::uint32_t value, boost::uint32_t mask = 0xffffffff);
- boost::uint32_t get_gpio_ddr(unit_t unit);
- void set_gpio_out(unit_t unit, boost::uint32_t value, boost::uint32_t mask = 0xffffffff);
- boost::uint32_t get_gpio_out(unit_t unit);
- boost::uint32_t read_gpio(unit_t unit);
-
- void _set_pin_ctrl(unit_t, boost::uint16_t);
- void _set_atr_reg(unit_t, atr_reg_t, boost::uint16_t);
- void _set_gpio_ddr(unit_t, boost::uint16_t);
- void _set_gpio_out(unit_t, boost::uint16_t);
+ void set_pin_ctrl(unit_t unit, uint32_t value, uint32_t mask = 0xffffffff);
+ uint32_t get_pin_ctrl(unit_t unit);
+ void set_atr_reg(unit_t unit, atr_reg_t reg, uint32_t value, uint32_t mask = 0xffffffff);
+ uint32_t get_atr_reg(unit_t unit, atr_reg_t reg);
+ void set_gpio_ddr(unit_t unit, uint32_t value, uint32_t mask = 0xffffffff);
+ uint32_t get_gpio_ddr(unit_t unit);
+ void set_gpio_out(unit_t unit, uint32_t value, uint32_t mask = 0xffffffff);
+ uint32_t get_gpio_out(unit_t unit);
+ uint32_t read_gpio(unit_t unit);
+
+ void _set_pin_ctrl(unit_t, uint16_t);
+ void _set_atr_reg(unit_t, atr_reg_t, uint16_t);
+ void _set_gpio_ddr(unit_t, uint16_t);
+ void _set_gpio_out(unit_t, uint16_t);
void set_command_time(const uhd::time_spec_t& t);
uhd::time_spec_t get_command_time(void);
- void write_i2c(boost::uint16_t, const byte_vector_t &);
- byte_vector_t read_i2c(boost::uint16_t, size_t);
+ void write_i2c(uint16_t, const byte_vector_t &);
+ byte_vector_t read_i2c(uint16_t, size_t);
void write_spi(unit_t unit,
const spi_config_t &config,
- boost::uint32_t data,
+ uint32_t data,
size_t num_bits);
- boost::uint32_t read_write_spi(unit_t unit,
+ uint32_t read_write_spi(unit_t unit,
const spi_config_t &config,
- boost::uint32_t data,
+ uint32_t data,
size_t num_bits);
void set_clock_rate(unit_t, double);
@@ -152,8 +152,8 @@ private:
const usrp1_impl::dboard_slot_t _dboard_slot;
const double &_master_clock_rate;
const dboard_id_t _rx_dboard_id;
- uhd::dict<unit_t, boost::uint16_t> _pin_ctrl, _gpio_out, _gpio_ddr;
- uhd::dict<unit_t, uhd::dict<atr_reg_t, boost::uint16_t> > _atr_regs;
+ uhd::dict<unit_t, uint16_t> _pin_ctrl, _gpio_out, _gpio_ddr;
+ uhd::dict<unit_t, uhd::dict<atr_reg_t, uint16_t> > _atr_regs;
};
/***********************************************************************
@@ -238,41 +238,41 @@ static T shadow_it(T &shadow, const T &value, const T &mask){
return shadow;
}
-void usrp1_dboard_iface::set_pin_ctrl(unit_t unit, boost::uint32_t value, boost::uint32_t mask){
- _set_pin_ctrl(unit, shadow_it(_pin_ctrl[unit], static_cast<boost::uint16_t>(value), static_cast<boost::uint16_t>(mask)));
+void usrp1_dboard_iface::set_pin_ctrl(unit_t unit, uint32_t value, uint32_t mask){
+ _set_pin_ctrl(unit, shadow_it(_pin_ctrl[unit], static_cast<uint16_t>(value), static_cast<uint16_t>(mask)));
}
-boost::uint32_t usrp1_dboard_iface::get_pin_ctrl(unit_t unit){
+uint32_t usrp1_dboard_iface::get_pin_ctrl(unit_t unit){
return _pin_ctrl[unit];
}
-void usrp1_dboard_iface::set_atr_reg(unit_t unit, atr_reg_t reg, boost::uint32_t value, boost::uint32_t mask){
- _set_atr_reg(unit, reg, shadow_it(_atr_regs[unit][reg], static_cast<boost::uint16_t>(value), static_cast<boost::uint16_t>(mask)));
+void usrp1_dboard_iface::set_atr_reg(unit_t unit, atr_reg_t reg, uint32_t value, uint32_t mask){
+ _set_atr_reg(unit, reg, shadow_it(_atr_regs[unit][reg], static_cast<uint16_t>(value), static_cast<uint16_t>(mask)));
}
-boost::uint32_t usrp1_dboard_iface::get_atr_reg(unit_t unit, atr_reg_t reg){
+uint32_t usrp1_dboard_iface::get_atr_reg(unit_t unit, atr_reg_t reg){
return _atr_regs[unit][reg];
}
-void usrp1_dboard_iface::set_gpio_ddr(unit_t unit, boost::uint32_t value, boost::uint32_t mask){
- _set_gpio_ddr(unit, shadow_it(_gpio_ddr[unit], static_cast<boost::uint16_t>(value), static_cast<boost::uint16_t>(mask)));
+void usrp1_dboard_iface::set_gpio_ddr(unit_t unit, uint32_t value, uint32_t mask){
+ _set_gpio_ddr(unit, shadow_it(_gpio_ddr[unit], static_cast<uint16_t>(value), static_cast<uint16_t>(mask)));
}
-boost::uint32_t usrp1_dboard_iface::get_gpio_ddr(unit_t unit){
+uint32_t usrp1_dboard_iface::get_gpio_ddr(unit_t unit){
return _gpio_ddr[unit];
}
-void usrp1_dboard_iface::set_gpio_out(unit_t unit, boost::uint32_t value, boost::uint32_t mask){
- _set_gpio_out(unit, shadow_it(_gpio_out[unit], static_cast<boost::uint16_t>(value), static_cast<boost::uint16_t>(mask)));
+void usrp1_dboard_iface::set_gpio_out(unit_t unit, uint32_t value, uint32_t mask){
+ _set_gpio_out(unit, shadow_it(_gpio_out[unit], static_cast<uint16_t>(value), static_cast<uint16_t>(mask)));
}
-boost::uint32_t usrp1_dboard_iface::get_gpio_out(unit_t unit){
+uint32_t usrp1_dboard_iface::get_gpio_out(unit_t unit){
return _gpio_out[unit];
}
-boost::uint32_t usrp1_dboard_iface::read_gpio(unit_t unit)
+uint32_t usrp1_dboard_iface::read_gpio(unit_t unit)
{
- boost::uint32_t out_value;
+ uint32_t out_value;
if (_dboard_slot == usrp1_impl::DBOARD_SLOT_A)
out_value = _iface->peek32(1);
@@ -283,15 +283,15 @@ boost::uint32_t usrp1_dboard_iface::read_gpio(unit_t unit)
switch(unit) {
case UNIT_RX:
- return (boost::uint32_t)((out_value >> 16) & 0x0000ffff);
+ return (uint32_t)((out_value >> 16) & 0x0000ffff);
case UNIT_TX:
- return (boost::uint32_t)((out_value >> 0) & 0x0000ffff);
+ return (uint32_t)((out_value >> 0) & 0x0000ffff);
default: UHD_THROW_INVALID_CODE_PATH();
}
UHD_ASSERT_THROW(false);
}
-void usrp1_dboard_iface::_set_pin_ctrl(unit_t unit, boost::uint16_t value)
+void usrp1_dboard_iface::_set_pin_ctrl(unit_t unit, uint16_t value)
{
switch(unit) {
case UNIT_RX:
@@ -310,7 +310,7 @@ void usrp1_dboard_iface::_set_pin_ctrl(unit_t unit, boost::uint16_t value)
}
}
-void usrp1_dboard_iface::_set_gpio_ddr(unit_t unit, boost::uint16_t value)
+void usrp1_dboard_iface::_set_gpio_ddr(unit_t unit, uint16_t value)
{
switch(unit) {
case UNIT_RX:
@@ -329,7 +329,7 @@ void usrp1_dboard_iface::_set_gpio_ddr(unit_t unit, boost::uint16_t value)
}
}
-void usrp1_dboard_iface::_set_gpio_out(unit_t unit, boost::uint16_t value)
+void usrp1_dboard_iface::_set_gpio_out(unit_t unit, uint16_t value)
{
switch(unit) {
case UNIT_RX:
@@ -349,7 +349,7 @@ void usrp1_dboard_iface::_set_gpio_out(unit_t unit, boost::uint16_t value)
}
void usrp1_dboard_iface::_set_atr_reg(unit_t unit,
- atr_reg_t atr, boost::uint16_t value)
+ atr_reg_t atr, uint16_t value)
{
// Ignore unsupported states
if ((atr == ATR_REG_IDLE) || (atr == ATR_REG_TX_ONLY))
@@ -397,7 +397,7 @@ void usrp1_dboard_iface::_set_atr_reg(unit_t unit,
* \param slot the side (A or B) the dboard is attached
* \return the slave device number
*/
-static boost::uint32_t unit_to_otw_spi_dev(dboard_iface::unit_t unit,
+static uint32_t unit_to_otw_spi_dev(dboard_iface::unit_t unit,
usrp1_impl::dboard_slot_t slot)
{
switch(unit) {
@@ -423,16 +423,16 @@ static boost::uint32_t unit_to_otw_spi_dev(dboard_iface::unit_t unit,
void usrp1_dboard_iface::write_spi(unit_t unit,
const spi_config_t &config,
- boost::uint32_t data,
+ uint32_t data,
size_t num_bits)
{
_iface->write_spi(unit_to_otw_spi_dev(unit, _dboard_slot),
config, data, num_bits);
}
-boost::uint32_t usrp1_dboard_iface::read_write_spi(unit_t unit,
+uint32_t usrp1_dboard_iface::read_write_spi(unit_t unit,
const spi_config_t &config,
- boost::uint32_t data,
+ uint32_t data,
size_t num_bits)
{
return _iface->read_spi(unit_to_otw_spi_dev(unit, _dboard_slot),
@@ -442,13 +442,13 @@ boost::uint32_t usrp1_dboard_iface::read_write_spi(unit_t unit,
/***********************************************************************
* I2C
**********************************************************************/
-void usrp1_dboard_iface::write_i2c(boost::uint16_t addr,
+void usrp1_dboard_iface::write_i2c(uint16_t addr,
const byte_vector_t &bytes)
{
return _iface->write_i2c(addr, bytes);
}
-byte_vector_t usrp1_dboard_iface::read_i2c(boost::uint16_t addr,
+byte_vector_t usrp1_dboard_iface::read_i2c(uint16_t addr,
size_t num_bytes)
{
return _iface->read_i2c(addr, num_bytes);
diff --git a/host/lib/usrp/usrp1/io_impl.cpp b/host/lib/usrp/usrp1/io_impl.cpp
index e1f17e5a6..920023dad 100644
--- a/host/lib/usrp/usrp1/io_impl.cpp
+++ b/host/lib/usrp/usrp1/io_impl.cpp
@@ -115,7 +115,7 @@ private:
* BS VRT packer/unpacker functions (since samples don't have headers)
**********************************************************************/
static void usrp1_bs_vrt_packer(
- boost::uint32_t *,
+ uint32_t *,
vrt::if_packet_info_t &if_packet_info
){
if_packet_info.num_header_words32 = 0;
@@ -123,12 +123,12 @@ static void usrp1_bs_vrt_packer(
}
static void usrp1_bs_vrt_unpacker(
- const boost::uint32_t *,
+ const uint32_t *,
vrt::if_packet_info_t &if_packet_info
){
if_packet_info.packet_type = vrt::if_packet_info_t::PACKET_TYPE_DATA;
if_packet_info.num_payload_words32 = if_packet_info.num_packet_words32;
- if_packet_info.num_payload_bytes = if_packet_info.num_packet_words32*sizeof(boost::uint32_t);
+ if_packet_info.num_payload_bytes = if_packet_info.num_packet_words32*sizeof(uint32_t);
if_packet_info.num_header_words32 = 0;
if_packet_info.packet_count = 0;
if_packet_info.sob = false;
@@ -286,7 +286,7 @@ void usrp1_impl::vandal_conquest_loop(void){
//start the polling loop...
try{ while (not boost::this_thread::interruption_requested()){
- boost::uint8_t underflow = 0, overflow = 0;
+ uint8_t underflow = 0, overflow = 0;
//shutoff transmit if it has been too long since send() was called
if (_tx_enabled and (boost::get_system_time() - _io_impl->last_send_time) > boost::posix_time::milliseconds(100)){
@@ -566,9 +566,9 @@ double usrp1_impl::update_rx_dsp_freq(const size_t dspno, const double freq_){
//calculate the freq register word (signed)
UHD_ASSERT_THROW(std::abs(freq) <= _master_clock_rate/2.0);
static const double scale_factor = std::pow(2.0, 32);
- const boost::int32_t freq_word = boost::int32_t(boost::math::round((freq / _master_clock_rate) * scale_factor));
+ const int32_t freq_word = int32_t(boost::math::round((freq / _master_clock_rate) * scale_factor));
- static const boost::uint32_t dsp_index_to_reg_val[4] = {
+ static const uint32_t dsp_index_to_reg_val[4] = {
FR_RX_FREQ_0, FR_RX_FREQ_1, FR_RX_FREQ_2, FR_RX_FREQ_3
};
_iface->poke32(dsp_index_to_reg_val[dspno], freq_word);
diff --git a/host/lib/usrp/usrp1/usrp1_calc_mux.hpp b/host/lib/usrp/usrp1/usrp1_calc_mux.hpp
index d86a7a809..3577a8042 100644
--- a/host/lib/usrp/usrp1/usrp1_calc_mux.hpp
+++ b/host/lib/usrp/usrp1/usrp1_calc_mux.hpp
@@ -47,7 +47,7 @@ static int calc_rx_mux_pair(int adc_for_i, int adc_for_q){
* | must be zero | Q3| I3| Q2| I2| Q1| I1| Q0| I0|Z| NCH |
* +-----------------------+-------+-------+-------+-------+-+-----+
*/
-static boost::uint32_t calc_rx_mux(const std::vector<mapping_pair_t> &mapping){
+static uint32_t calc_rx_mux(const std::vector<mapping_pair_t> &mapping){
//create look-up-table for mapping dboard name and connection type to ADC flags
static const int ADC0 = 0, ADC1 = 1, ADC2 = 2, ADC3 = 3;
static const uhd::dict<std::string, uhd::dict<std::string, int> > name_to_conn_to_flag = boost::assign::map_list_of
@@ -108,7 +108,7 @@ static int calc_tx_mux_pair(int chn_for_i, int chn_for_q){
* | | DAC1Q | DAC1I | DAC0Q | DAC0I |0| NCH |
* +-----------------------------------------------+-------+-+-----+
*/
-static boost::uint32_t calc_tx_mux(const std::vector<mapping_pair_t> &mapping){
+static uint32_t calc_tx_mux(const std::vector<mapping_pair_t> &mapping){
//create look-up-table for mapping channel number and connection type to flags
static const int ENB = 1 << 3, CHAN_I0 = 0, CHAN_Q0 = 1, CHAN_I1 = 2, CHAN_Q1 = 3;
static const uhd::dict<size_t, uhd::dict<std::string, int> > chan_to_conn_to_flag = boost::assign::map_list_of
diff --git a/host/lib/usrp/usrp1/usrp1_iface.cpp b/host/lib/usrp/usrp1/usrp1_iface.cpp
index 48fdfcf12..b65f8fa2f 100644
--- a/host/lib/usrp/usrp1/usrp1_iface.cpp
+++ b/host/lib/usrp/usrp1/usrp1_iface.cpp
@@ -45,9 +45,9 @@ public:
/*******************************************************************
* Peek and Poke
******************************************************************/
- void poke32(const boost::uint32_t addr, const boost::uint32_t value)
+ void poke32(const uint32_t addr, const uint32_t value)
{
- boost::uint32_t swapped = uhd::htonx(value);
+ uint32_t swapped = uhd::htonx(value);
UHD_LOGV(always)
<< "poke32("
@@ -55,48 +55,48 @@ public:
<< std::hex << std::setw(8) << value << ")" << std::endl
;
- boost::uint8_t w_index_h = SPI_ENABLE_FPGA & 0xff;
- boost::uint8_t w_index_l = (SPI_FMT_MSB | SPI_FMT_HDR_1) & 0xff;
+ uint8_t w_index_h = SPI_ENABLE_FPGA & 0xff;
+ uint8_t w_index_l = (SPI_FMT_MSB | SPI_FMT_HDR_1) & 0xff;
int ret =_ctrl_transport->usrp_control_write(
VRQ_SPI_WRITE,
addr & 0x7f,
(w_index_h << 8) | (w_index_l << 0),
(unsigned char*) &swapped,
- sizeof(boost::uint32_t));
+ sizeof(uint32_t));
if (ret < 0) throw uhd::io_error("USRP1: failed control write");
}
- boost::uint32_t peek32(const boost::uint32_t addr)
+ uint32_t peek32(const uint32_t addr)
{
UHD_LOGV(always)
<< "peek32("
<< std::dec << std::setw(2) << addr << ")" << std::endl
;
- boost::uint32_t value_out;
+ uint32_t value_out;
- boost::uint8_t w_index_h = SPI_ENABLE_FPGA & 0xff;
- boost::uint8_t w_index_l = (SPI_FMT_MSB | SPI_FMT_HDR_1) & 0xff;
+ uint8_t w_index_h = SPI_ENABLE_FPGA & 0xff;
+ uint8_t w_index_l = (SPI_FMT_MSB | SPI_FMT_HDR_1) & 0xff;
int ret = _ctrl_transport->usrp_control_read(
VRQ_SPI_READ,
0x80 | (addr & 0x7f),
(w_index_h << 8) | (w_index_l << 0),
(unsigned char*) &value_out,
- sizeof(boost::uint32_t));
+ sizeof(uint32_t));
if (ret < 0) throw uhd::io_error("USRP1: failed control read");
return uhd::ntohx(value_out);
}
- void poke16(const boost::uint32_t, const boost::uint16_t) {
+ void poke16(const uint32_t, const uint16_t) {
throw uhd::not_implemented_error("Unhandled command poke16()");
}
- boost::uint16_t peek16(const boost::uint32_t) {
+ uint16_t peek16(const uint32_t) {
throw uhd::not_implemented_error("Unhandled command peek16()");
return 0;
}
@@ -104,11 +104,11 @@ public:
/*******************************************************************
* I2C
******************************************************************/
- void write_i2c(boost::uint16_t addr, const byte_vector_t &bytes){
+ void write_i2c(uint16_t addr, const byte_vector_t &bytes){
return _ctrl_transport->write_i2c(addr, bytes);
}
- byte_vector_t read_i2c(boost::uint16_t addr, size_t num_bytes){
+ byte_vector_t read_i2c(uint16_t addr, size_t num_bytes){
return _ctrl_transport->read_i2c(addr, num_bytes);
}
@@ -123,9 +123,9 @@ public:
* 4 bytes of OUT data in the device request fields and uses the
* control buffer for IN data.
******************************************************************/
- boost::uint32_t transact_spi(int which_slave,
+ uint32_t transact_spi(int which_slave,
const spi_config_t &,
- boost::uint32_t bits,
+ uint32_t bits,
size_t num_bits,
bool readback)
{
@@ -166,10 +166,10 @@ public:
else{
throw uhd::io_error("USRP1: invalid input data for SPI readback");
}
- boost::uint32_t val = (((boost::uint32_t)buff[0]) << 0) |
- (((boost::uint32_t)buff[1]) << 8) |
- (((boost::uint32_t)buff[2]) << 16) |
- (((boost::uint32_t)buff[3]) << 24);
+ uint32_t val = (((uint32_t)buff[0]) << 0) |
+ (((uint32_t)buff[1]) << 8) |
+ (((uint32_t)buff[2]) << 16) |
+ (((uint32_t)buff[3]) << 24);
return val;
}
else {
@@ -178,8 +178,8 @@ public:
for (size_t i = 1; i <= num_bytes; i++)
buff[num_bytes - i] = (bits >> ((i - 1) * 8)) & 0xff;
- boost::uint8_t w_index_h = which_slave & 0xff;
- boost::uint8_t w_index_l = (SPI_FMT_MSB | SPI_FMT_HDR_0) & 0xff;
+ uint8_t w_index_h = which_slave & 0xff;
+ uint8_t w_index_l = (SPI_FMT_MSB | SPI_FMT_HDR_0) & 0xff;
int ret =_ctrl_transport->usrp_control_write(
VRQ_SPI_WRITE,
diff --git a/host/lib/usrp/usrp1/usrp1_impl.cpp b/host/lib/usrp/usrp1/usrp1_impl.cpp
index 5e1a70a8f..baecc6081 100644
--- a/host/lib/usrp/usrp1/usrp1_impl.cpp
+++ b/host/lib/usrp/usrp1/usrp1_impl.cpp
@@ -36,10 +36,10 @@ using namespace uhd;
using namespace uhd::usrp;
using namespace uhd::transport;
-const boost::uint16_t USRP1_VENDOR_ID = 0xfffe;
-const boost::uint16_t USRP1_PRODUCT_ID = 0x0002;
-const boost::uint16_t FX2_VENDOR_ID = 0x04b4;
-const boost::uint16_t FX2_PRODUCT_ID = 0x8613;
+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
@@ -60,11 +60,11 @@ static device_addrs_t usrp1_find(const device_addr_t &hint)
//since an address and resource is intended for a different, non-USB, device.
if (hint.has_key("addr") || hint.has_key("resource")) return usrp1_addrs;
- boost::uint16_t vid, pid;
+ uint16_t vid, pid;
if(hint.has_key("vid") && hint.has_key("pid") && hint.has_key("type") && hint["type"] == "usrp1") {
- vid = uhd::cast::hexstr_cast<boost::uint16_t>(hint.get("vid"));
- pid = uhd::cast::hexstr_cast<boost::uint16_t>(hint.get("pid"));
+ vid = uhd::cast::hexstr_cast<uint16_t>(hint.get("vid"));
+ pid = uhd::cast::hexstr_cast<uint16_t>(hint.get("pid"));
} else {
vid = USRP1_VENDOR_ID;
pid = USRP1_PRODUCT_ID;
@@ -214,7 +214,7 @@ usrp1_impl::usrp1_impl(const device_addr_t &device_addr){
////////////////////////////////////////////////////////////////////
// create user-defined control objects
////////////////////////////////////////////////////////////////////
- _tree->create<std::pair<boost::uint8_t, boost::uint32_t> >(mb_path / "user" / "regs")
+ _tree->create<std::pair<uint8_t, uint32_t> >(mb_path / "user" / "regs")
.add_coerced_subscriber(boost::bind(&usrp1_impl::set_reg, this, _1));
////////////////////////////////////////////////////////////////////
@@ -432,22 +432,22 @@ usrp1_impl::~usrp1_impl(void){
* +-----------------------------------------------+-+-----+-+-----+
*/
size_t usrp1_impl::get_num_ddcs(void){
- boost::uint32_t regval = _iface->peek32(FR_RB_CAPS);
+ uint32_t regval = _iface->peek32(FR_RB_CAPS);
return (regval >> 0) & 0x0007;
}
size_t usrp1_impl::get_num_ducs(void){
- boost::uint32_t regval = _iface->peek32(FR_RB_CAPS);
+ uint32_t regval = _iface->peek32(FR_RB_CAPS);
return (regval >> 4) & 0x0007;
}
bool usrp1_impl::has_rx_halfband(void){
- boost::uint32_t regval = _iface->peek32(FR_RB_CAPS);
+ uint32_t regval = _iface->peek32(FR_RB_CAPS);
return (regval >> 3) & 0x0001;
}
bool usrp1_impl::has_tx_halfband(void){
- boost::uint32_t regval = _iface->peek32(FR_RB_CAPS);
+ uint32_t regval = _iface->peek32(FR_RB_CAPS);
return (regval >> 7) & 0x0001;
}
@@ -489,8 +489,8 @@ void usrp1_impl::set_enb_rx_dc_offset(const std::string &db, const bool enb){
}
std::complex<double> usrp1_impl::set_rx_dc_offset(const std::string &db, const std::complex<double> &offset){
- const boost::int32_t i_off = boost::math::iround(offset.real() * (1ul << 31));
- const boost::int32_t q_off = boost::math::iround(offset.imag() * (1ul << 31));
+ const int32_t i_off = boost::math::iround(offset.real() * (1ul << 31));
+ const int32_t q_off = boost::math::iround(offset.imag() * (1ul << 31));
if (db == "A"){
_iface->poke32(FR_ADC_OFFSET_0, i_off);
@@ -505,7 +505,7 @@ std::complex<double> usrp1_impl::set_rx_dc_offset(const std::string &db, const s
return std::complex<double>(double(i_off) * (1ul << 31), double(q_off) * (1ul << 31));
}
-void usrp1_impl::set_reg(const std::pair<boost::uint8_t, boost::uint32_t> &reg)
+void usrp1_impl::set_reg(const std::pair<uint8_t, uint32_t> &reg)
{
_iface->poke32(reg.first, reg.second);
}
diff --git a/host/lib/usrp/usrp1/usrp1_impl.hpp b/host/lib/usrp/usrp1/usrp1_impl.hpp
index da901bd6c..18c5c8bd3 100644
--- a/host/lib/usrp/usrp1/usrp1_impl.hpp
+++ b/host/lib/usrp/usrp1/usrp1_impl.hpp
@@ -147,7 +147,7 @@ private:
void vandal_conquest_loop(void);
- void set_reg(const std::pair<boost::uint8_t, boost::uint32_t> &reg);
+ void set_reg(const std::pair<uint8_t, uint32_t> &reg);
//handle the enables
bool _rx_enabled, _tx_enabled;
diff --git a/host/lib/usrp/usrp2/clock_ctrl.cpp b/host/lib/usrp/usrp2/clock_ctrl.cpp
index ecb5a7101..c05453c40 100644
--- a/host/lib/usrp/usrp2/clock_ctrl.cpp
+++ b/host/lib/usrp/usrp2/clock_ctrl.cpp
@@ -21,7 +21,7 @@
#include "usrp2_clk_regs.hpp"
#include <uhd/utils/safe_call.hpp>
#include <uhd/utils/assert_has.hpp>
-#include <boost/cstdint.hpp>
+#include <stdint.h>
#include <boost/lexical_cast.hpp>
#include <boost/math/special_functions/round.hpp>
#include <iostream>
@@ -334,8 +334,8 @@ private:
* Write a single register to the spi regs.
* \param addr the address to write
*/
- void write_reg(boost::uint8_t addr){
- boost::uint32_t data = _ad9510_regs.get_write_reg(addr);
+ void write_reg(uint8_t addr){
+ uint32_t data = _ad9510_regs.get_write_reg(addr);
_spiface->write_spi(SPI_SS_AD9510, spi_config_t::EDGE_RISE, data, 24);
}
diff --git a/host/lib/usrp/usrp2/codec_ctrl.cpp b/host/lib/usrp/usrp2/codec_ctrl.cpp
index a565078cf..a0e456708 100644
--- a/host/lib/usrp/usrp2/codec_ctrl.cpp
+++ b/host/lib/usrp/usrp2/codec_ctrl.cpp
@@ -22,7 +22,7 @@
#include <uhd/utils/log.hpp>
#include <uhd/utils/safe_call.hpp>
#include <uhd/exception.hpp>
-#include <boost/cstdint.hpp>
+#include <stdint.h>
#include <boost/foreach.hpp>
using namespace uhd;
@@ -58,7 +58,7 @@ public:
_ad9777_regs.qdac_offset_adjust_lsb = 0;
_ad9777_regs.qdac_offset_adjust_msb = 0;
//write all regs
- for(boost::uint8_t addr = 0; addr <= 0xC; addr++){
+ for(uint8_t addr = 0; addr <= 0xC; addr++){
this->send_ad9777_reg(addr);
}
set_tx_mod_mode(0);
@@ -196,8 +196,8 @@ private:
usrp2_iface::sptr _iface;
uhd::spi_iface::sptr _spiface;
- void send_ad9777_reg(boost::uint8_t addr){
- boost::uint16_t reg = _ad9777_regs.get_write_reg(addr);
+ void send_ad9777_reg(uint8_t addr){
+ uint16_t reg = _ad9777_regs.get_write_reg(addr);
UHD_LOGV(always) << "send_ad9777_reg: " << std::hex << reg << std::endl;
_spiface->write_spi(
SPI_SS_AD9777, spi_config_t::EDGE_RISE,
@@ -205,8 +205,8 @@ private:
);
}
- void send_ads62p44_reg(boost::uint8_t addr) {
- boost::uint16_t reg = _ads62p44_regs.get_write_reg(addr);
+ void send_ads62p44_reg(uint8_t addr) {
+ uint16_t reg = _ads62p44_regs.get_write_reg(addr);
_spiface->write_spi(
SPI_SS_ADS62P44, spi_config_t::EDGE_FALL,
reg, 16
diff --git a/host/lib/usrp/usrp2/dboard_iface.cpp b/host/lib/usrp/usrp2/dboard_iface.cpp
index a6ba1e0b7..9fde9a626 100644
--- a/host/lib/usrp/usrp2/dboard_iface.cpp
+++ b/host/lib/usrp/usrp2/dboard_iface.cpp
@@ -54,21 +54,21 @@ public:
void write_aux_dac(unit_t, aux_dac_t, double);
double read_aux_adc(unit_t, aux_adc_t);
- void set_pin_ctrl(unit_t unit, boost::uint32_t value, boost::uint32_t mask = 0xffffffff);
- boost::uint32_t get_pin_ctrl(unit_t unit);
- void set_atr_reg(unit_t unit, atr_reg_t reg, boost::uint32_t value, boost::uint32_t mask = 0xffffffff);
- boost::uint32_t get_atr_reg(unit_t unit, atr_reg_t reg);
- void set_gpio_ddr(unit_t unit, boost::uint32_t value, boost::uint32_t mask = 0xffffffff);
- boost::uint32_t get_gpio_ddr(unit_t unit);
- void set_gpio_out(unit_t unit, boost::uint32_t value, boost::uint32_t mask = 0xffffffff);
- boost::uint32_t get_gpio_out(unit_t unit);
- boost::uint32_t read_gpio(unit_t unit);
+ void set_pin_ctrl(unit_t unit, uint32_t value, uint32_t mask = 0xffffffff);
+ uint32_t get_pin_ctrl(unit_t unit);
+ void set_atr_reg(unit_t unit, atr_reg_t reg, uint32_t value, uint32_t mask = 0xffffffff);
+ uint32_t get_atr_reg(unit_t unit, atr_reg_t reg);
+ void set_gpio_ddr(unit_t unit, uint32_t value, uint32_t mask = 0xffffffff);
+ uint32_t get_gpio_ddr(unit_t unit);
+ void set_gpio_out(unit_t unit, uint32_t value, uint32_t mask = 0xffffffff);
+ uint32_t get_gpio_out(unit_t unit);
+ uint32_t read_gpio(unit_t unit);
void set_command_time(const uhd::time_spec_t& t);
uhd::time_spec_t get_command_time(void);
- void write_i2c(boost::uint16_t, const byte_vector_t &);
- byte_vector_t read_i2c(boost::uint16_t, size_t);
+ void write_i2c(uint16_t, const byte_vector_t &);
+ byte_vector_t read_i2c(uint16_t, size_t);
void set_clock_rate(unit_t, double);
double get_clock_rate(unit_t);
@@ -80,14 +80,14 @@ public:
void write_spi(
unit_t unit,
const spi_config_t &config,
- boost::uint32_t data,
+ uint32_t data,
size_t num_bits
);
- boost::uint32_t read_write_spi(
+ uint32_t read_write_spi(
unit_t unit,
const spi_config_t &config,
- boost::uint32_t data,
+ uint32_t data,
size_t num_bits
);
@@ -194,39 +194,39 @@ double usrp2_dboard_iface::get_codec_rate(unit_t unit){
/***********************************************************************
* GPIO
**********************************************************************/
-void usrp2_dboard_iface::set_pin_ctrl(unit_t unit, boost::uint32_t value, boost::uint32_t mask){
- _gpio->set_pin_ctrl(unit, static_cast<boost::uint16_t>(value), static_cast<boost::uint16_t>(mask));
+void usrp2_dboard_iface::set_pin_ctrl(unit_t unit, uint32_t value, uint32_t mask){
+ _gpio->set_pin_ctrl(unit, static_cast<uint16_t>(value), static_cast<uint16_t>(mask));
}
-boost::uint32_t usrp2_dboard_iface::get_pin_ctrl(unit_t unit){
- return static_cast<boost::uint32_t>(_gpio->get_pin_ctrl(unit));
+uint32_t usrp2_dboard_iface::get_pin_ctrl(unit_t unit){
+ return static_cast<uint32_t>(_gpio->get_pin_ctrl(unit));
}
-void usrp2_dboard_iface::set_atr_reg(unit_t unit, atr_reg_t reg, boost::uint32_t value, boost::uint32_t mask){
- _gpio->set_atr_reg(unit, reg, static_cast<boost::uint16_t>(value), static_cast<boost::uint16_t>(mask));
+void usrp2_dboard_iface::set_atr_reg(unit_t unit, atr_reg_t reg, uint32_t value, uint32_t mask){
+ _gpio->set_atr_reg(unit, reg, static_cast<uint16_t>(value), static_cast<uint16_t>(mask));
}
-boost::uint32_t usrp2_dboard_iface::get_atr_reg(unit_t unit, atr_reg_t reg){
- return static_cast<boost::uint32_t>(_gpio->get_atr_reg(unit, reg));
+uint32_t usrp2_dboard_iface::get_atr_reg(unit_t unit, atr_reg_t reg){
+ return static_cast<uint32_t>(_gpio->get_atr_reg(unit, reg));
}
-void usrp2_dboard_iface::set_gpio_ddr(unit_t unit, boost::uint32_t value, boost::uint32_t mask){
- _gpio->set_gpio_ddr(unit, static_cast<boost::uint16_t>(value), static_cast<boost::uint16_t>(mask));
+void usrp2_dboard_iface::set_gpio_ddr(unit_t unit, uint32_t value, uint32_t mask){
+ _gpio->set_gpio_ddr(unit, static_cast<uint16_t>(value), static_cast<uint16_t>(mask));
}
-boost::uint32_t usrp2_dboard_iface::get_gpio_ddr(unit_t unit){
- return static_cast<boost::uint32_t>(_gpio->get_gpio_ddr(unit));
+uint32_t usrp2_dboard_iface::get_gpio_ddr(unit_t unit){
+ return static_cast<uint32_t>(_gpio->get_gpio_ddr(unit));
}
-void usrp2_dboard_iface::set_gpio_out(unit_t unit, boost::uint32_t value, boost::uint32_t mask){
- _gpio->set_gpio_out(unit, static_cast<boost::uint16_t>(value), static_cast<boost::uint16_t>(mask));
+void usrp2_dboard_iface::set_gpio_out(unit_t unit, uint32_t value, uint32_t mask){
+ _gpio->set_gpio_out(unit, static_cast<uint16_t>(value), static_cast<uint16_t>(mask));
}
-boost::uint32_t usrp2_dboard_iface::get_gpio_out(unit_t unit){
- return static_cast<boost::uint32_t>(_gpio->get_gpio_out(unit));
+uint32_t usrp2_dboard_iface::get_gpio_out(unit_t unit){
+ return static_cast<uint32_t>(_gpio->get_gpio_out(unit));
}
-boost::uint32_t usrp2_dboard_iface::read_gpio(unit_t unit){
+uint32_t usrp2_dboard_iface::read_gpio(unit_t unit){
return _gpio->read_gpio(unit);
}
@@ -241,17 +241,17 @@ static const uhd::dict<dboard_iface::unit_t, int> unit_to_spi_dev = map_list_of
void usrp2_dboard_iface::write_spi(
unit_t unit,
const spi_config_t &config,
- boost::uint32_t data,
+ uint32_t data,
size_t num_bits
){
if (unit == UNIT_BOTH) throw uhd::runtime_error("UNIT_BOTH not supported.");
_spi_iface->write_spi(unit_to_spi_dev[unit], config, data, num_bits);
}
-boost::uint32_t usrp2_dboard_iface::read_write_spi(
+uint32_t usrp2_dboard_iface::read_write_spi(
unit_t unit,
const spi_config_t &config,
- boost::uint32_t data,
+ uint32_t data,
size_t num_bits
){
if (unit == UNIT_BOTH) throw uhd::runtime_error("UNIT_BOTH not supported.");
@@ -261,11 +261,11 @@ boost::uint32_t usrp2_dboard_iface::read_write_spi(
/***********************************************************************
* I2C
**********************************************************************/
-void usrp2_dboard_iface::write_i2c(boost::uint16_t addr, const byte_vector_t &bytes){
+void usrp2_dboard_iface::write_i2c(uint16_t addr, const byte_vector_t &bytes){
return _i2c_iface->write_i2c(addr, bytes);
}
-byte_vector_t usrp2_dboard_iface::read_i2c(boost::uint16_t addr, size_t num_bytes){
+byte_vector_t usrp2_dboard_iface::read_i2c(uint16_t addr, size_t num_bytes){
return _i2c_iface->read_i2c(addr, num_bytes);
}
@@ -334,7 +334,7 @@ double usrp2_dboard_iface::read_aux_adc(unit_t unit, aux_adc_t which){
unit_to_spi_adc[unit], config,
ad7922_regs.get_reg(), 16
);
- ad7922_regs.set_reg(boost::uint16_t(_spi_iface->read_spi(
+ ad7922_regs.set_reg(uint16_t(_spi_iface->read_spi(
unit_to_spi_adc[unit], config,
ad7922_regs.get_reg(), 16
)));
diff --git a/host/lib/usrp/usrp2/io_impl.cpp b/host/lib/usrp/usrp2/io_impl.cpp
index 81be97fa5..ae39028a1 100644
--- a/host/lib/usrp/usrp2/io_impl.cpp
+++ b/host/lib/usrp/usrp2/io_impl.cpp
@@ -66,7 +66,7 @@ static const size_t vrt_send_header_offset_words32 = 1;
**********************************************************************/
class flow_control_monitor{
public:
- typedef boost::uint32_t seq_type;
+ typedef uint32_t seq_type;
typedef boost::shared_ptr<flow_control_monitor> sptr;
/*!
@@ -159,7 +159,7 @@ struct usrp2_impl::io_impl{
managed_send_buffer::sptr buff = tx_xports[chan]->get_send_buff(timeout);
//write the flow control word into the buffer
- if (buff.get()) buff->cast<boost::uint32_t *>()[0] = uhd::htonx(fc_mon.get_curr_seq_out());
+ if (buff.get()) buff->cast<uint32_t *>()[0] = uhd::htonx(fc_mon.get_curr_seq_out());
return buff;
}
@@ -196,8 +196,8 @@ void usrp2_impl::io_impl::recv_pirate_loop(
try{
//extract the vrt header packet info
vrt::if_packet_info_t if_packet_info;
- if_packet_info.num_packet_words32 = buff->size()/sizeof(boost::uint32_t);
- const boost::uint32_t *vrt_hdr = buff->cast<const boost::uint32_t *>();
+ if_packet_info.num_packet_words32 = buff->size()/sizeof(uint32_t);
+ const uint32_t *vrt_hdr = buff->cast<const uint32_t *>();
vrt::if_hdr_unpack_be(vrt_hdr, if_packet_info);
//handle a tx async report message
@@ -205,11 +205,11 @@ void usrp2_impl::io_impl::recv_pirate_loop(
//fill in the async metadata
async_metadata_t metadata;
- load_metadata_from_buff(uhd::ntohx<boost::uint32_t>, metadata, if_packet_info, vrt_hdr, tick_rate, index);
+ load_metadata_from_buff(uhd::ntohx<uint32_t>, metadata, if_packet_info, vrt_hdr, tick_rate, index);
//catch the flow control packets and react
if (metadata.event_code == 0){
- boost::uint32_t fc_word32 = (vrt_hdr + if_packet_info.num_header_words32)[1];
+ uint32_t fc_word32 = (vrt_hdr + if_packet_info.num_header_words32)[1];
fc_mon.update_fc_condition(uhd::ntohx(fc_word32));
continue;
}
@@ -374,8 +374,8 @@ void usrp2_impl::program_stream_dest(
//program the stream command
usrp2_stream_ctrl_t stream_ctrl = usrp2_stream_ctrl_t();
- stream_ctrl.sequence = uhd::htonx(boost::uint32_t(0 /* don't care seq num */));
- stream_ctrl.vrt_hdr = uhd::htonx(boost::uint32_t(USRP2_INVALID_VRT_HEADER));
+ stream_ctrl.sequence = uhd::htonx(uint32_t(0 /* don't care seq num */));
+ stream_ctrl.vrt_hdr = uhd::htonx(uint32_t(USRP2_INVALID_VRT_HEADER));
//user has provided an alternative address and port for destination
if (args.args.has_key("addr") and args.args.has_key("port")){
@@ -388,8 +388,8 @@ void usrp2_impl::program_stream_dest(
asio::ip::udp::resolver resolver(io_service);
asio::ip::udp::resolver::query query(asio::ip::udp::v4(), args.args["addr"], args.args["port"]);
asio::ip::udp::endpoint endpoint = *resolver.resolve(query);
- stream_ctrl.ip_addr = uhd::htonx(boost::uint32_t(endpoint.address().to_v4().to_ulong()));
- stream_ctrl.udp_port = uhd::htonx(boost::uint32_t(endpoint.port()));
+ stream_ctrl.ip_addr = uhd::htonx(uint32_t(endpoint.address().to_v4().to_ulong()));
+ stream_ctrl.udp_port = uhd::htonx(uint32_t(endpoint.port()));
for (size_t i = 0; i < 3; i++){
UHD_MSG(status) << "ARP attempt " << i << std::endl;
@@ -399,8 +399,8 @@ void usrp2_impl::program_stream_dest(
send_buff.reset();
boost::this_thread::sleep(boost::posix_time::milliseconds(300));
managed_recv_buffer::sptr recv_buff = xport->get_recv_buff(0.0);
- if (recv_buff and recv_buff->size() >= sizeof(boost::uint32_t)){
- const boost::uint32_t result = uhd::ntohx(recv_buff->cast<const boost::uint32_t *>()[0]);
+ if (recv_buff and recv_buff->size() >= sizeof(uint32_t)){
+ const uint32_t result = uhd::ntohx(recv_buff->cast<const uint32_t *>()[0]);
if (result == 0){
UHD_MSG(status) << "Success! " << std::endl;
return;
@@ -430,7 +430,7 @@ rx_streamer::sptr usrp2_impl::get_rx_stream(const uhd::stream_args_t &args_){
//calculate packet size
static const size_t hdr_size = 0
- + vrt::max_if_hdr_words32*sizeof(boost::uint32_t)
+ + vrt::max_if_hdr_words32*sizeof(uint32_t)
+ sizeof(vrt::if_packet_info_t().tlr) //forced to have trailer
- sizeof(vrt::if_packet_info_t().cid) //no class id ever used
- sizeof(vrt::if_packet_info_t().tsi) //no int time ever used
@@ -498,8 +498,8 @@ tx_streamer::sptr usrp2_impl::get_tx_stream(const uhd::stream_args_t &args_){
//calculate packet size
static const size_t hdr_size = 0
- + vrt_send_header_offset_words32*sizeof(boost::uint32_t)
- + vrt::max_if_hdr_words32*sizeof(boost::uint32_t)
+ + vrt_send_header_offset_words32*sizeof(uint32_t)
+ + vrt::max_if_hdr_words32*sizeof(uint32_t)
+ sizeof(vrt::if_packet_info_t().tlr) //forced to have trailer
- sizeof(vrt::if_packet_info_t().cid) //no class id ever used
- sizeof(vrt::if_packet_info_t().sid) //no stream id ever used
diff --git a/host/lib/usrp/usrp2/n200_image_loader.cpp b/host/lib/usrp/usrp2/n200_image_loader.cpp
index d6acfe39d..16cc7b08a 100644
--- a/host/lib/usrp/usrp2/n200_image_loader.cpp
+++ b/host/lib/usrp/usrp2/n200_image_loader.cpp
@@ -100,7 +100,7 @@ typedef enum {
/*
* Mapping revision numbers to names
*/
-static const uhd::dict<boost::uint32_t, std::string> n200_filename_map = boost::assign::map_list_of
+static const uhd::dict<uint32_t, std::string> n200_filename_map = boost::assign::map_list_of
(0, "n2xx") // Is an N-Series, but the EEPROM value is invalid
(0xa, "n200_r3")
(0x100a, "n200_r4")
@@ -112,20 +112,20 @@ static const uhd::dict<boost::uint32_t, std::string> n200_filename_map = boost::
* Packet structure
*/
typedef struct {
- boost::uint32_t proto_ver;
- boost::uint32_t id;
- boost::uint32_t seq;
+ uint32_t proto_ver;
+ uint32_t id;
+ uint32_t seq;
union {
- boost::uint32_t ip_addr;
- boost::uint32_t hw_rev;
+ uint32_t ip_addr;
+ uint32_t hw_rev;
struct {
- boost::uint32_t flash_addr;
- boost::uint32_t length;
- boost::uint8_t data[256];
+ uint32_t flash_addr;
+ uint32_t length;
+ uint8_t data[256];
} flash_args;
struct {
- boost::uint32_t sector_size_bytes;
- boost::uint32_t memory_size_bytes;
+ uint32_t sector_size_bytes;
+ uint32_t memory_size_bytes;
} flash_info_args;
} data;
} n200_fw_update_data_t;
@@ -140,10 +140,10 @@ typedef struct {
uhd::device_addr_t dev_addr;
std::string burn_type;
std::string filepath;
- boost::uint8_t data_in[udp_simple::mtu];
- boost::uint32_t size;
- boost::uint32_t max_size;
- boost::uint32_t flash_addr;
+ uint8_t data_in[udp_simple::mtu];
+ uint32_t size;
+ uint32_t max_size;
+ uint32_t flash_addr;
udp_simple::sptr xport;
} n200_session_t;
@@ -190,9 +190,9 @@ static void print_usrp2_error(const image_loader::image_loader_args_t &image_loa
static UHD_INLINE size_t n200_send_and_recv(udp_simple::sptr xport,
n200_fw_update_id_t pkt_code,
n200_fw_update_data_t *pkt_out,
- boost::uint8_t* data){
- pkt_out->proto_ver = htonx<boost::uint32_t>(USRP2_FW_COMPAT_NUM);
- pkt_out->id = htonx<boost::uint32_t>(pkt_code);
+ uint8_t* data){
+ pkt_out->proto_ver = htonx<uint32_t>(USRP2_FW_COMPAT_NUM);
+ pkt_out->id = htonx<uint32_t>(pkt_code);
xport->send(boost::asio::buffer(pkt_out, sizeof(*pkt_out)));
return xport->recv(boost::asio::buffer(data, udp_simple::mtu), UDP_TIMEOUT);
}
@@ -215,7 +215,7 @@ static uhd::device_addr_t n200_find(const image_loader::image_loader_args_t &ima
uhd::device_addrs_t n200_found;
udp_simple::sptr rev_xport;
n200_fw_update_data_t pkt_out;
- boost::uint8_t data_in[udp_simple::mtu];
+ uint8_t data_in[udp_simple::mtu];
const n200_fw_update_data_t *pkt_in = reinterpret_cast<const n200_fw_update_data_t*>(data_in);
size_t len = 0;
@@ -233,7 +233,7 @@ static uhd::device_addr_t n200_find(const image_loader::image_loader_args_t &ima
len = n200_send_and_recv(rev_xport, GET_HW_REV_CMD, &pkt_out, data_in);
if(n200_response_matches(pkt_in, GET_HW_REV_ACK, len)){
- boost::uint32_t rev = ntohl(pkt_in->data.hw_rev);
+ uint32_t rev = ntohl(pkt_in->data.hw_rev);
std::string hw_rev = n200_filename_map.get(rev, "n2xx");
n200_found.push_back(dev);
@@ -291,7 +291,7 @@ static void n200_validate_firmware_image(n200_session_t &session){
// File must have proper header
std::ifstream image_file(session.filepath.c_str(), std::ios::binary);
- boost::uint8_t test_bytes[4];
+ uint8_t test_bytes[4];
image_file.seekg(0, std::ios::beg);
image_file.read((char*)test_bytes,4);
image_file.close();
@@ -320,7 +320,7 @@ static void n200_validate_fpga_image(n200_session_t &session){
// File must have proper header
std::ifstream image_file(session.filepath.c_str(), std::ios::binary);
- boost::uint8_t test_bytes[63];
+ uint8_t test_bytes[63];
image_file.seekg(0, std::ios::beg);
image_file.read((char*)test_bytes, 63);
bool is_good = false;
@@ -402,8 +402,8 @@ static void n200_erase_image(n200_session_t &session){
const n200_fw_update_data_t *pkt_in = reinterpret_cast<const n200_fw_update_data_t*>(session.data_in);
// Setting up UDP packet
- pkt_out.data.flash_args.flash_addr = htonx<boost::uint32_t>(session.flash_addr);
- pkt_out.data.flash_args.length = htonx<boost::uint32_t>(session.size);
+ pkt_out.data.flash_args.flash_addr = htonx<uint32_t>(session.flash_addr);
+ pkt_out.data.flash_args.length = htonx<uint32_t>(session.size);
// Begin erasing
size_t len = n200_send_and_recv(session.xport, ERASE_FLASH_CMD, &pkt_out, session.data_in);
@@ -452,10 +452,10 @@ static void n200_write_image(n200_session_t &session){
// Write image
std::ifstream image(session.filepath.c_str(), std::ios::binary);
- boost::uint32_t current_addr = session.flash_addr;
- pkt_out.data.flash_args.length = htonx<boost::uint32_t>(N200_FLASH_DATA_PACKET_SIZE);
+ uint32_t current_addr = session.flash_addr;
+ pkt_out.data.flash_args.length = htonx<uint32_t>(N200_FLASH_DATA_PACKET_SIZE);
for(size_t i = 0; i < ((session.size/N200_FLASH_DATA_PACKET_SIZE)+1); i++){
- pkt_out.data.flash_args.flash_addr = htonx<boost::uint32_t>(current_addr);
+ pkt_out.data.flash_args.flash_addr = htonx<uint32_t>(current_addr);
memset(pkt_out.data.flash_args.data, 0x0, N200_FLASH_DATA_PACKET_SIZE);
image.read((char*)pkt_out.data.flash_args.data, N200_FLASH_DATA_PACKET_SIZE);
@@ -502,15 +502,15 @@ static void n200_verify_image(n200_session_t &session){
// Read and verify image
std::ifstream image(session.filepath.c_str(), std::ios::binary);
- boost::uint8_t image_part[N200_FLASH_DATA_PACKET_SIZE];
- boost::uint32_t current_addr = session.flash_addr;
- pkt_out.data.flash_args.length = htonx<boost::uint32_t>(N200_FLASH_DATA_PACKET_SIZE);
- boost::uint16_t cmp_len = 0;
+ uint8_t image_part[N200_FLASH_DATA_PACKET_SIZE];
+ uint32_t current_addr = session.flash_addr;
+ pkt_out.data.flash_args.length = htonx<uint32_t>(N200_FLASH_DATA_PACKET_SIZE);
+ uint16_t cmp_len = 0;
for(size_t i = 0; i < ((session.size/N200_FLASH_DATA_PACKET_SIZE)+1); i++){
memset(image_part, 0x0, N200_FLASH_DATA_PACKET_SIZE);
memset((void*)pkt_in->data.flash_args.data, 0x0, N200_FLASH_DATA_PACKET_SIZE);
- pkt_out.data.flash_args.flash_addr = htonx<boost::uint32_t>(current_addr);
+ pkt_out.data.flash_args.flash_addr = htonx<uint32_t>(current_addr);
image.read((char*)image_part, N200_FLASH_DATA_PACKET_SIZE);
cmp_len = image.gcount();
diff --git a/host/lib/usrp/usrp2/usrp2_fifo_ctrl.cpp b/host/lib/usrp/usrp2/usrp2_fifo_ctrl.cpp
index e0544862d..9cd3afc6c 100644
--- a/host/lib/usrp/usrp2/usrp2_fifo_ctrl.cpp
+++ b/host/lib/usrp/usrp2/usrp2_fifo_ctrl.cpp
@@ -33,7 +33,7 @@ static const size_t POKE32_CMD = (1 << 8);
static const size_t PEEK32_CMD = 0;
static const double ACK_TIMEOUT = 0.5;
static const double MASSIVE_TIMEOUT = 10.0; //for when we wait on a timed command
-static const boost::uint32_t MAX_SEQS_OUT = 63;
+static const uint32_t MAX_SEQS_OUT = 63;
#define SPI_DIV SR_SPI_CORE + 0
#define SPI_CTRL SR_SPI_CORE + 1
@@ -67,7 +67,7 @@ public:
/*******************************************************************
* Peek and poke 32 bit implementation
******************************************************************/
- void poke32(const wb_addr_type addr, const boost::uint32_t data){
+ void poke32(const wb_addr_type addr, const uint32_t data){
boost::mutex::scoped_lock lock(_mutex);
this->send_pkt((addr - SETTING_REGS_BASE)/4, data, POKE32_CMD);
@@ -75,7 +75,7 @@ public:
this->wait_for_ack(_seq_out-MAX_SEQS_OUT);
}
- boost::uint32_t peek32(const wb_addr_type addr){
+ uint32_t peek32(const wb_addr_type addr){
boost::mutex::scoped_lock lock(_mutex);
this->send_pkt((addr - READBACK_BASE)/4, 0, PEEK32_CMD);
@@ -86,11 +86,11 @@ public:
/*******************************************************************
* Peek and poke 16 bit not implemented
******************************************************************/
- void poke16(const wb_addr_type, const boost::uint16_t){
+ void poke16(const wb_addr_type, const uint16_t){
throw uhd::not_implemented_error("poke16 not implemented in fifo ctrl module");
}
- boost::uint16_t peek16(const wb_addr_type){
+ uint16_t peek16(const wb_addr_type){
throw uhd::not_implemented_error("peek16 not implemented in fifo ctrl module");
}
@@ -106,24 +106,24 @@ public:
_ctrl_word_cache = 0; // force update first time around
}
- boost::uint32_t transact_spi(
+ uint32_t transact_spi(
int which_slave,
const spi_config_t &config,
- boost::uint32_t data,
+ uint32_t data,
size_t num_bits,
bool readback
){
boost::mutex::scoped_lock lock(_mutex);
//load control word
- boost::uint32_t ctrl_word = 0;
+ uint32_t ctrl_word = 0;
ctrl_word |= ((which_slave & 0xffffff) << 0);
ctrl_word |= ((num_bits & 0x3ff) << 24);
if (config.mosi_edge == spi_config_t::EDGE_FALL) ctrl_word |= (1 << 31);
if (config.miso_edge == spi_config_t::EDGE_RISE) ctrl_word |= (1 << 30);
//load data word (must be in upper bits)
- const boost::uint32_t data_out = data << (32 - num_bits);
+ const uint32_t data_out = data << (32 - num_bits);
//conditionally send control word
if (_ctrl_word_cache != ctrl_word){
@@ -171,20 +171,20 @@ private:
/*******************************************************************
* Primary control and interaction private methods
******************************************************************/
- UHD_INLINE void send_pkt(wb_addr_type addr, boost::uint32_t data, int cmd){
+ UHD_INLINE void send_pkt(wb_addr_type addr, uint32_t data, int cmd){
managed_send_buffer::sptr buff = _xport->get_send_buff(0.0);
if (not buff){
throw uhd::runtime_error("fifo ctrl timed out getting a send buffer");
}
- boost::uint32_t *trans = buff->cast<boost::uint32_t *>();
+ uint32_t *trans = buff->cast<uint32_t *>();
trans[0] = htonl(++_seq_out);
- boost::uint32_t *pkt = trans + 1;
+ uint32_t *pkt = trans + 1;
//load packet info
vrt::if_packet_info_t packet_info;
packet_info.packet_type = vrt::if_packet_info_t::PACKET_TYPE_CONTEXT;
packet_info.num_payload_words32 = 2;
- packet_info.num_payload_bytes = packet_info.num_payload_words32*sizeof(boost::uint32_t);
+ packet_info.num_payload_bytes = packet_info.num_payload_words32*sizeof(uint32_t);
packet_info.packet_count = _seq_out;
packet_info.tsf = _time.to_ticks(_tick_rate);
packet_info.sob = false;
@@ -199,30 +199,30 @@ private:
vrt::if_hdr_pack_be(pkt, packet_info);
//load payload
- const boost::uint32_t ctrl_word = (addr & 0xff) | cmd | (_seq_out << 16);
+ const uint32_t ctrl_word = (addr & 0xff) | cmd | (_seq_out << 16);
pkt[packet_info.num_header_words32+0] = htonl(ctrl_word);
pkt[packet_info.num_header_words32+1] = htonl(data);
//send the buffer over the interface
- buff->commit(sizeof(boost::uint32_t)*(packet_info.num_packet_words32+1));
+ buff->commit(sizeof(uint32_t)*(packet_info.num_packet_words32+1));
}
- UHD_INLINE bool wraparound_lt16(const boost::int16_t i0, const boost::int16_t i1){
+ UHD_INLINE bool wraparound_lt16(const int16_t i0, const int16_t i1){
if (((i0 ^ i1) & 0x8000) == 0) //same sign bits
- return boost::uint16_t(i0) < boost::uint16_t(i1);
- return boost::int16_t(i1 - i0) > 0;
+ return uint16_t(i0) < uint16_t(i1);
+ return int16_t(i1 - i0) > 0;
}
- UHD_INLINE boost::uint32_t wait_for_ack(const boost::uint16_t seq_to_ack){
+ UHD_INLINE uint32_t wait_for_ack(const uint16_t seq_to_ack){
while (wraparound_lt16(_seq_ack, seq_to_ack)){
managed_recv_buffer::sptr buff = _xport->get_recv_buff(_timeout);
if (not buff){
throw uhd::runtime_error("fifo ctrl timed out looking for acks");
}
- const boost::uint32_t *pkt = buff->cast<const boost::uint32_t *>();
+ const uint32_t *pkt = buff->cast<const uint32_t *>();
vrt::if_packet_info_t packet_info;
- packet_info.num_packet_words32 = buff->size()/sizeof(boost::uint32_t);
+ packet_info.num_packet_words32 = buff->size()/sizeof(uint32_t);
vrt::if_hdr_unpack_be(pkt, packet_info);
_seq_ack = ntohl(pkt[packet_info.num_header_words32+0]) >> 16;
if (_seq_ack == seq_to_ack){
@@ -235,13 +235,13 @@ private:
zero_copy_if::sptr _xport;
boost::mutex _mutex;
- boost::uint16_t _seq_out;
- boost::uint16_t _seq_ack;
+ uint16_t _seq_out;
+ uint16_t _seq_ack;
uhd::time_spec_t _time;
bool _use_time;
double _tick_rate;
double _timeout;
- boost::uint32_t _ctrl_word_cache;
+ uint32_t _ctrl_word_cache;
};
diff --git a/host/lib/usrp/usrp2/usrp2_iface.cpp b/host/lib/usrp/usrp2/usrp2_iface.cpp
index 2b382ae38..522d6c6d0 100644
--- a/host/lib/usrp/usrp2/usrp2_iface.cpp
+++ b/host/lib/usrp/usrp2/usrp2_iface.cpp
@@ -57,12 +57,12 @@ struct timeout_error : uhd::runtime_error
}
};
-static const boost::uint32_t MIN_PROTO_COMPAT_SPI = 7;
-static const boost::uint32_t MIN_PROTO_COMPAT_I2C = 7;
+static const uint32_t MIN_PROTO_COMPAT_SPI = 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 boost::uint32_t MIN_PROTO_COMPAT_REG = 10;
-static const boost::uint32_t MIN_PROTO_COMPAT_UART = 7;
+static const uint32_t MIN_PROTO_COMPAT_REG = 10;
+static const uint32_t MIN_PROTO_COMPAT_UART = 7;
class usrp2_iface_impl : public usrp2_iface{
public:
@@ -110,15 +110,15 @@ public:
//never assume lock with fpga image mismatch
if ((this->peek32(U2_REG_COMPAT_NUM_RB) >> 16) != USRP2_FPGA_COMPAT_NUM) return false;
- boost::uint32_t lock_time = this->peekfw(U2_FW_REG_LOCK_TIME);
- boost::uint32_t lock_gpid = this->peekfw(U2_FW_REG_LOCK_GPID);
+ uint32_t lock_time = this->peekfw(U2_FW_REG_LOCK_TIME);
+ uint32_t lock_gpid = this->peekfw(U2_FW_REG_LOCK_GPID);
//may not be the right tick rate, but this is ok for locking purposes
- const boost::uint32_t lock_timeout_time = boost::uint32_t(3*100e6);
+ const uint32_t lock_timeout_time = uint32_t(3*100e6);
//if the difference is larger, assume not locked anymore
if ((lock_time & 1) == 0) return false; //bit0 says unlocked
- const boost::uint32_t time_diff = this->get_curr_time() - lock_time;
+ const uint32_t time_diff = this->get_curr_time() - lock_time;
if (time_diff >= lock_timeout_time) return false;
//otherwise only lock if the device hash is different that ours
@@ -132,37 +132,37 @@ public:
boost::this_thread::sleep(boost::posix_time::milliseconds(1500));
}
- boost::uint32_t get_curr_time(void){
+ uint32_t get_curr_time(void){
return this->peek32(U2_REG_TIME64_LO_RB_IMM) | 1; //bit 1 says locked
}
/***********************************************************************
* Peek and Poke
**********************************************************************/
- void poke32(const wb_addr_type addr, const boost::uint32_t data){
- this->get_reg<boost::uint32_t, USRP2_REG_ACTION_FPGA_POKE32>(addr, data);
+ void poke32(const wb_addr_type addr, const uint32_t data){
+ this->get_reg<uint32_t, USRP2_REG_ACTION_FPGA_POKE32>(addr, data);
}
- boost::uint32_t peek32(const wb_addr_type addr){
- return this->get_reg<boost::uint32_t, USRP2_REG_ACTION_FPGA_PEEK32>(addr);
+ uint32_t peek32(const wb_addr_type addr){
+ return this->get_reg<uint32_t, USRP2_REG_ACTION_FPGA_PEEK32>(addr);
}
- void poke16(const wb_addr_type addr, const boost::uint16_t data){
- this->get_reg<boost::uint16_t, USRP2_REG_ACTION_FPGA_POKE16>(addr, data);
+ void poke16(const wb_addr_type addr, const uint16_t data){
+ this->get_reg<uint16_t, USRP2_REG_ACTION_FPGA_POKE16>(addr, data);
}
- boost::uint16_t peek16(const wb_addr_type addr){
- return this->get_reg<boost::uint16_t, USRP2_REG_ACTION_FPGA_PEEK16>(addr);
+ uint16_t peek16(const wb_addr_type addr){
+ return this->get_reg<uint16_t, USRP2_REG_ACTION_FPGA_PEEK16>(addr);
}
- void pokefw(wb_addr_type addr, boost::uint32_t data)
+ void pokefw(wb_addr_type addr, uint32_t data)
{
- this->get_reg<boost::uint32_t, USRP2_REG_ACTION_FW_POKE32>(addr, data);
+ this->get_reg<uint32_t, USRP2_REG_ACTION_FW_POKE32>(addr, data);
}
- boost::uint32_t peekfw(wb_addr_type addr)
+ uint32_t peekfw(wb_addr_type addr)
{
- return this->get_reg<boost::uint32_t, USRP2_REG_ACTION_FW_PEEK32>(addr);
+ return this->get_reg<uint32_t, USRP2_REG_ACTION_FW_PEEK32>(addr);
}
template <class T, usrp2_reg_action_t action>
@@ -171,7 +171,7 @@ public:
usrp2_ctrl_data_t out_data = usrp2_ctrl_data_t();
out_data.id = htonl(USRP2_CTRL_ID_GET_THIS_REGISTER_FOR_ME_BRO);
out_data.data.reg_args.addr = htonl(addr);
- out_data.data.reg_args.data = htonl(boost::uint32_t(data));
+ out_data.data.reg_args.data = htonl(uint32_t(data));
out_data.data.reg_args.action = action;
//send and recv
@@ -183,10 +183,10 @@ public:
/***********************************************************************
* SPI
**********************************************************************/
- boost::uint32_t transact_spi(
+ uint32_t transact_spi(
int which_slave,
const spi_config_t &config,
- boost::uint32_t data,
+ uint32_t data,
size_t num_bits,
bool readback
){
@@ -215,7 +215,7 @@ public:
/***********************************************************************
* I2C
**********************************************************************/
- void write_i2c(boost::uint16_t addr, const byte_vector_t &buf){
+ void write_i2c(uint16_t addr, const byte_vector_t &buf){
//setup the out data
usrp2_ctrl_data_t out_data = usrp2_ctrl_data_t();
out_data.id = htonl(USRP2_CTRL_ID_WRITE_THESE_I2C_VALUES_BRO);
@@ -233,7 +233,7 @@ public:
UHD_ASSERT_THROW(ntohl(in_data.id) == USRP2_CTRL_ID_COOL_IM_DONE_I2C_WRITE_DUDE);
}
- byte_vector_t read_i2c(boost::uint16_t addr, size_t num_bytes){
+ byte_vector_t read_i2c(uint16_t addr, size_t num_bytes){
//setup the out data
usrp2_ctrl_data_t out_data = usrp2_ctrl_data_t();
out_data.id = htonl(USRP2_CTRL_ID_DO_AN_I2C_READ_FOR_ME_BRO);
@@ -259,8 +259,8 @@ public:
**********************************************************************/
usrp2_ctrl_data_t ctrl_send_and_recv(
const usrp2_ctrl_data_t &out_data,
- boost::uint32_t lo = USRP2_FW_COMPAT_NUM,
- boost::uint32_t hi = USRP2_FW_COMPAT_NUM
+ uint32_t lo = USRP2_FW_COMPAT_NUM,
+ uint32_t hi = USRP2_FW_COMPAT_NUM
){
boost::mutex::scoped_lock lock(_ctrl_mutex);
@@ -280,7 +280,7 @@ public:
usrp2_ctrl_data_t ctrl_send_and_recv_internal(
const usrp2_ctrl_data_t &out_data,
- boost::uint32_t lo, boost::uint32_t hi,
+ uint32_t lo, uint32_t hi,
const double timeout
){
//fill in the seq number and send
@@ -290,12 +290,12 @@ public:
_ctrl_transport->send(boost::asio::buffer(&out_copy, sizeof(usrp2_ctrl_data_t)));
//loop until we get the packet or timeout
- boost::uint8_t usrp2_ctrl_data_in_mem[udp_simple::mtu]; //allocate max bytes for recv
+ uint8_t usrp2_ctrl_data_in_mem[udp_simple::mtu]; //allocate max bytes for recv
const usrp2_ctrl_data_t *ctrl_data_in = reinterpret_cast<const usrp2_ctrl_data_t *>(usrp2_ctrl_data_in_mem);
while(true){
size_t len = _ctrl_transport->recv(boost::asio::buffer(usrp2_ctrl_data_in_mem), timeout);
- boost::uint32_t compat = ntohl(ctrl_data_in->proto_ver);
- if(len >= sizeof(boost::uint32_t) and (hi < compat or lo > compat)){
+ uint32_t compat = ntohl(ctrl_data_in->proto_ver);
+ if(len >= sizeof(uint32_t) and (hi < compat or lo > compat)){
throw uhd::runtime_error(str(boost::format(
"\nPlease update the firmware and FPGA images for your device.\n"
"See the application notes for USRP2/N-Series for instructions.\n"
@@ -317,7 +317,7 @@ public:
rev_type get_rev(void){
std::string hw = mb_eeprom["hardware"];
if (hw.empty()) return USRP_NXXX;
- switch (boost::lexical_cast<boost::uint16_t>(hw)){
+ switch (boost::lexical_cast<uint16_t>(hw)){
case 0x0300:
case 0x0301: return USRP2_REV3;
case 0x0400: return USRP2_REV4;
@@ -343,7 +343,7 @@ public:
}
const std::string get_fw_version_string(void){
- boost::uint32_t minor = this->get_reg<boost::uint32_t, USRP2_REG_ACTION_FW_PEEK32>(U2_FW_REG_VER_MINOR);
+ uint32_t minor = this->get_reg<uint32_t, USRP2_REG_ACTION_FW_PEEK32>(U2_FW_REG_VER_MINOR);
return str(boost::format("%u.%u") % _protocol_compat % minor);
}
@@ -415,8 +415,8 @@ private:
//used in send/recv
boost::mutex _ctrl_mutex;
- boost::uint32_t _ctrl_seq_num;
- boost::uint32_t _protocol_compat;
+ uint32_t _ctrl_seq_num;
+ uint32_t _protocol_compat;
//lock thread stuff
task::sptr _lock_task;
diff --git a/host/lib/usrp/usrp2/usrp2_iface.hpp b/host/lib/usrp/usrp2/usrp2_iface.hpp
index 833016b7c..9d7642bc1 100644
--- a/host/lib/usrp/usrp2/usrp2_iface.hpp
+++ b/host/lib/usrp/usrp2/usrp2_iface.hpp
@@ -45,10 +45,10 @@ public:
static sptr make(uhd::transport::udp_simple::sptr ctrl_transport);
//! poke a register in the virtual fw table
- virtual void pokefw(wb_addr_type addr, boost::uint32_t data) = 0;
+ virtual void pokefw(wb_addr_type addr, uint32_t data) = 0;
//! peek a register in the virtual fw table
- virtual boost::uint32_t peekfw(wb_addr_type addr) = 0;
+ virtual uint32_t peekfw(wb_addr_type addr) = 0;
//! The list of possible revision types
enum rev_type {
diff --git a/host/lib/usrp/usrp2/usrp2_impl.cpp b/host/lib/usrp/usrp2/usrp2_impl.cpp
index b0c29392c..ee2434fab 100644
--- a/host/lib/usrp/usrp2/usrp2_impl.cpp
+++ b/host/lib/usrp/usrp2/usrp2_impl.cpp
@@ -112,8 +112,8 @@ device_addrs_t usrp2_find(const device_addr_t &hint_){
//send a hello control packet
usrp2_ctrl_data_t ctrl_data_out = usrp2_ctrl_data_t();
- ctrl_data_out.proto_ver = uhd::htonx<boost::uint32_t>(USRP2_FW_COMPAT_NUM);
- ctrl_data_out.id = uhd::htonx<boost::uint32_t>(USRP2_CTRL_ID_WAZZUP_BRO);
+ ctrl_data_out.proto_ver = uhd::htonx<uint32_t>(USRP2_FW_COMPAT_NUM);
+ ctrl_data_out.id = uhd::htonx<uint32_t>(USRP2_CTRL_ID_WAZZUP_BRO);
try
{
udp_transport->send(boost::asio::buffer(&ctrl_data_out, sizeof(ctrl_data_out)));
@@ -128,7 +128,7 @@ device_addrs_t usrp2_find(const device_addr_t &hint_){
}
//loop and recieve until the timeout
- boost::uint8_t usrp2_ctrl_data_in_mem[udp_simple::mtu]; //allocate max bytes for recv
+ uint8_t usrp2_ctrl_data_in_mem[udp_simple::mtu]; //allocate max bytes for recv
const usrp2_ctrl_data_t *ctrl_data_in = reinterpret_cast<const usrp2_ctrl_data_t *>(usrp2_ctrl_data_in_mem);
while(true){
size_t len = udp_transport->recv(asio::buffer(usrp2_ctrl_data_in_mem));
@@ -218,7 +218,7 @@ static mtu_result_t determine_mtu(const std::string &addr, const mtu_result_t &u
//The FPGA offers 4K buffers, and the user may manually request this.
//However, multiple simultaneous receives (2DSP slave + 2DSP master),
//require that buffering to be used internally, and this is a safe setting.
- std::vector<boost::uint8_t> buffer(std::max(user_mtu.recv_mtu, user_mtu.send_mtu));
+ std::vector<uint8_t> buffer(std::max(user_mtu.recv_mtu, user_mtu.send_mtu));
usrp2_ctrl_data_t *ctrl_data = reinterpret_cast<usrp2_ctrl_data_t *>(&buffer.front());
static const double echo_timeout = 0.020; //20 ms
@@ -302,9 +302,9 @@ static zero_copy_if::sptr make_xport(
//Send a small data packet so the usrp2 knows the udp source port.
//This setup must happen before further initialization occurs
//or the async update packets will cause ICMP destination unreachable.
- static const boost::uint32_t data[2] = {
- uhd::htonx(boost::uint32_t(0 /* don't care seq num */)),
- uhd::htonx(boost::uint32_t(USRP2_INVALID_VRT_HEADER))
+ static const uint32_t data[2] = {
+ uhd::htonx(uint32_t(0 /* don't care seq num */)),
+ uhd::htonx(uint32_t(USRP2_INVALID_VRT_HEADER))
};
transport::managed_send_buffer::sptr send_buff = xport->get_send_buff();
std::memcpy(send_buff->cast<void*>(), &data, sizeof(data));
@@ -389,8 +389,8 @@ usrp2_impl::usrp2_impl(const device_addr_t &_device_addr) :
_tree->create<std::string>(mb_path / "fw_version").set(_mbc[mb].iface->get_fw_version_string());
//check the fpga compatibility number
- const boost::uint32_t fpga_compat_num = _mbc[mb].iface->peek32(U2_REG_COMPAT_NUM_RB);
- boost::uint16_t fpga_major = fpga_compat_num >> 16, fpga_minor = fpga_compat_num & 0xffff;
+ const uint32_t fpga_compat_num = _mbc[mb].iface->peek32(U2_REG_COMPAT_NUM_RB);
+ uint16_t fpga_major = fpga_compat_num >> 16, fpga_minor = fpga_compat_num & 0xffff;
if (fpga_major == 0){ //old version scheme
fpga_major = fpga_minor;
fpga_minor = 0;
@@ -520,7 +520,7 @@ usrp2_impl::usrp2_impl(const device_addr_t &_device_addr) :
////////////////////////////////////////////////////////////////////
// Create the GPSDO control
////////////////////////////////////////////////////////////////////
- static const boost::uint32_t dont_look_for_gpsdo = 0x1234abcdul;
+ static const uint32_t dont_look_for_gpsdo = 0x1234abcdul;
//disable check for internal GPSDO when not the following:
switch(_mbc[mb].iface->get_rev()){
diff --git a/host/lib/usrp/usrp2/usrp2_impl.hpp b/host/lib/usrp/usrp2/usrp2_impl.hpp
index 47fcec657..790daa749 100644
--- a/host/lib/usrp/usrp2/usrp2_impl.hpp
+++ b/host/lib/usrp/usrp2/usrp2_impl.hpp
@@ -52,8 +52,8 @@ static const double mimo_clock_delay_usrp2_rev4 = 4.18e-9;
static const double mimo_clock_delay_usrp_n2xx = 4.10e-9;
static const size_t mimo_clock_sync_delay_cycles = 138;
static const size_t USRP2_SRAM_BYTES = size_t(1 << 20);
-static const boost::uint32_t USRP2_TX_ASYNC_SID = 2;
-static const boost::uint32_t USRP2_RX_SID_BASE = 3;
+static const uint32_t USRP2_TX_ASYNC_SID = 2;
+static const uint32_t USRP2_RX_SID_BASE = 3;
static const std::string USRP2_EEPROM_MAP_KEY = "N100";
uhd::device_addrs_t usrp2_find(const uhd::device_addr_t &hint_);
diff --git a/host/lib/usrp/x300/x300_adc_ctrl.cpp b/host/lib/usrp/x300/x300_adc_ctrl.cpp
index ce6102b35..fed2ffaf7 100644
--- a/host/lib/usrp/x300/x300_adc_ctrl.cpp
+++ b/host/lib/usrp/x300/x300_adc_ctrl.cpp
@@ -97,7 +97,7 @@ public:
return gain_bits/2;
}
- void set_test_word(const std::string &patterna, const std::string &patternb, const boost::uint32_t num)
+ void set_test_word(const std::string &patterna, const std::string &patternb, const uint32_t num)
{
_ads62p48_regs.custom_pattern_low = num & 0xff;
_ads62p48_regs.custom_pattern_high = num >> 8;
@@ -131,9 +131,9 @@ private:
uhd::spi_iface::sptr _iface;
const size_t _slaveno;
- void send_ads62p48_reg(boost::uint8_t addr)
+ void send_ads62p48_reg(uint8_t addr)
{
- boost::uint16_t reg = _ads62p48_regs.get_write_reg(addr);
+ uint16_t reg = _ads62p48_regs.get_write_reg(addr);
_iface->write_spi(_slaveno, spi_config_t::EDGE_FALL, reg, 16);
}
};
diff --git a/host/lib/usrp/x300/x300_adc_ctrl.hpp b/host/lib/usrp/x300/x300_adc_ctrl.hpp
index 90fb88cec..bda93628e 100644
--- a/host/lib/usrp/x300/x300_adc_ctrl.hpp
+++ b/host/lib/usrp/x300/x300_adc_ctrl.hpp
@@ -39,7 +39,7 @@ public:
virtual double set_gain(const double &) = 0;
- virtual void set_test_word(const std::string &patterna, const std::string &patternb, const boost::uint32_t = 0) = 0;
+ virtual void set_test_word(const std::string &patterna, const std::string &patternb, const uint32_t = 0) = 0;
virtual void reset(void) = 0;
};
diff --git a/host/lib/usrp/x300/x300_adc_dac_utils.cpp b/host/lib/usrp/x300/x300_adc_dac_utils.cpp
index cd337febb..6fd0ca50b 100644
--- a/host/lib/usrp/x300/x300_adc_dac_utils.cpp
+++ b/host/lib/usrp/x300/x300_adc_dac_utils.cpp
@@ -47,7 +47,7 @@ void x300_impl::synchronize_dacs(const std::vector<radio_perifs_t*>& radios)
boost::posix_time::microsec_clock::local_time() - t_start;
//Add 100% of headroom + uncertaintly to the command time
- boost::uint64_t t_sync_us = (t_elapsed.total_microseconds() * 2) + 13000 /*Scheduler latency*/;
+ uint64_t t_sync_us = (t_elapsed.total_microseconds() * 2) + 13000 /*Scheduler latency*/;
//Pick radios[0] as the time reference.
uhd::time_spec_t sync_time =
@@ -71,9 +71,9 @@ void x300_impl::synchronize_dacs(const std::vector<radio_perifs_t*>& radios)
* ADC: Self-test operations
**********************************************************************/
-static void check_adc(uhd::wb_iface::sptr iface, const boost::uint32_t val, const boost::uint32_t i)
+static void check_adc(uhd::wb_iface::sptr iface, const uint32_t val, const uint32_t i)
{
- boost::uint32_t adc_rb = iface->peek32(uhd::usrp::radio::RB32_RX);
+ uint32_t adc_rb = iface->peek32(uhd::usrp::radio::RB32_RX);
adc_rb ^= 0xfffc0000; //adapt for I inversion in FPGA
if (val != adc_rb) {
throw uhd::runtime_error(
@@ -81,7 +81,7 @@ static void check_adc(uhd::wb_iface::sptr iface, const boost::uint32_t val, cons
}
}
-void x300_impl::self_test_adcs(mboard_members_t& mb, boost::uint32_t ramp_time_ms) {
+void x300_impl::self_test_adcs(mboard_members_t& mb, uint32_t ramp_time_ms) {
for (size_t r = 0; r < mboard_members_t::NUM_RADIOS; r++) {
radio_perifs_t &perif = mb.radio_perifs[r];
@@ -186,20 +186,20 @@ void x300_impl::self_cal_adc_capture_delay(mboard_members_t& mb, const size_t ra
radio_perifs_t& perif = mb.radio_perifs[radio_i];
if (print_status) UHD_MSG(status) << "Running ADC capture delay self-cal..." << std::flush;
- static const boost::uint32_t NUM_DELAY_STEPS = 32; //The IDELAYE2 element has 32 steps
- static const boost::uint32_t NUM_RETRIES = 2; //Retry self-cal if it fails in warmup situations
- static const boost::int32_t MIN_WINDOW_LEN = 4;
+ static const uint32_t NUM_DELAY_STEPS = 32; //The IDELAYE2 element has 32 steps
+ static const uint32_t NUM_RETRIES = 2; //Retry self-cal if it fails in warmup situations
+ static const int32_t MIN_WINDOW_LEN = 4;
- boost::int32_t win_start = -1, win_stop = -1;
- boost::uint32_t iter = 0;
+ int32_t win_start = -1, win_stop = -1;
+ uint32_t iter = 0;
while (iter++ < NUM_RETRIES) {
- for (boost::uint32_t dly_tap = 0; dly_tap < NUM_DELAY_STEPS; dly_tap++) {
+ for (uint32_t dly_tap = 0; dly_tap < NUM_DELAY_STEPS; dly_tap++) {
//Apply delay
perif.regmap->misc_outs_reg.write(radio_regmap_t::misc_outs_reg_t::ADC_DATA_DLY_VAL, dly_tap);
perif.regmap->misc_outs_reg.write(radio_regmap_t::misc_outs_reg_t::ADC_DATA_DLY_STB, 1);
perif.regmap->misc_outs_reg.write(radio_regmap_t::misc_outs_reg_t::ADC_DATA_DLY_STB, 0);
- boost::uint32_t err_code = 0;
+ uint32_t err_code = 0;
// -- Test I Channel --
//Put ADC in ramp test mode. Tie the other channel to all ones.
@@ -270,7 +270,7 @@ void x300_impl::self_cal_adc_capture_delay(mboard_members_t& mb, const size_t ra
throw uhd::runtime_error("self_cal_adc_capture_delay: Self calibration failed. Valid window too narrow.");
}
- boost::uint32_t ideal_tap = (win_stop + win_start) / 2;
+ uint32_t ideal_tap = (win_stop + win_start) / 2;
perif.regmap->misc_outs_reg.write(radio_regmap_t::misc_outs_reg_t::ADC_DATA_DLY_VAL, ideal_tap);
perif.regmap->misc_outs_reg.write(radio_regmap_t::misc_outs_reg_t::ADC_DATA_DLY_STB, 1);
perif.regmap->misc_outs_reg.write(radio_regmap_t::misc_outs_reg_t::ADC_DATA_DLY_STB, 0);
@@ -304,7 +304,7 @@ double x300_impl::self_cal_adc_xfer_delay(mboard_members_t& mb, bool apply_delay
double delay = mb.clock->set_clock_delay(X300_CLOCK_WHICH_ADC0, delay_incr*i + delay_start);
wait_for_clk_locked(mb, fw_regmap_t::clk_status_reg_t::LMK_LOCK, 0.1);
- boost::uint32_t err_code = 0;
+ uint32_t err_code = 0;
for (size_t r = 0; r < mboard_members_t::NUM_RADIOS; r++) {
//Test each channel (I and Q) individually so as to not accidentally trigger
//on the data from the other channel if there is a swap
diff --git a/host/lib/usrp/x300/x300_clock_ctrl.cpp b/host/lib/usrp/x300/x300_clock_ctrl.cpp
index 3df2b7c02..b8b100ceb 100644
--- a/host/lib/usrp/x300/x300_clock_ctrl.cpp
+++ b/host/lib/usrp/x300/x300_clock_ctrl.cpp
@@ -19,7 +19,7 @@
#include "x300_clock_ctrl.hpp"
#include <uhd/utils/safe_call.hpp>
#include <uhd/utils/math.hpp>
-#include <boost/cstdint.hpp>
+#include <stdint.h>
#include <boost/format.hpp>
#include <boost/math/special_functions/round.hpp>
#include <stdexcept>
@@ -27,7 +27,7 @@
#include <cstdlib>
static const double X300_REF_CLK_OUT_RATE = 10e6;
-static const boost::uint16_t X300_MAX_CLKOUT_DIV = 1045;
+static const uint16_t X300_MAX_CLKOUT_DIV = 1045;
struct x300_clk_delays {
x300_clk_delays() :
@@ -118,9 +118,9 @@ public:
}
void set_dboard_rate(const x300_clock_which_t which, double rate) {
- boost::uint16_t div = boost::uint16_t(_vco_freq / rate);
- boost::uint16_t *reg = NULL;
- boost::uint8_t addr = 0xFF;
+ uint16_t div = uint16_t(_vco_freq / rate);
+ uint16_t *reg = NULL;
+ uint8_t addr = 0xFF;
// Make sure requested rate is an even divisor of the VCO frequency
if (not math::frequencies_are_equal(_vco_freq / div, rate))
@@ -234,16 +234,16 @@ public:
this->write_regs(8);
}
- void write_regs(boost::uint8_t addr) {
- boost::uint32_t data = _lmk04816_regs.get_reg(addr);
+ void write_regs(uint8_t addr) {
+ uint32_t data = _lmk04816_regs.get_reg(addr);
_spiface->write_spi(_slaveno, spi_config_t::EDGE_RISE, data,32);
}
double set_clock_delay(const x300_clock_which_t which, const double delay_ns, const bool resync = true) {
//All dividers have are delayed by 5 taps by default. The delay
//set by this function is relative to the 5 tap delay
- static const boost::uint16_t DDLY_MIN_TAPS = 5;
- static const boost::uint16_t DDLY_MAX_TAPS = 522; //Extended mode
+ static const uint16_t DDLY_MIN_TAPS = 5;
+ static const uint16_t DDLY_MAX_TAPS = 522; //Extended mode
//The resolution and range of the analog delay is fixed
static const double ADLY_RES_NS = 0.025;
@@ -259,19 +259,19 @@ public:
//A caveat here is that the analog delay starts at ADLY_MIN_NS, so we need to back off
//by that much when coming up with the digital taps so that the difference can be made
//up using the analog delay.
- boost::uint16_t ddly_taps = 0;
+ uint16_t ddly_taps = 0;
if (delay_ns < ADLY_MIN_NS) {
- ddly_taps = static_cast<boost::uint16_t>(std::floor((delay_ns)/vco_period_ns));
+ ddly_taps = static_cast<uint16_t>(std::floor((delay_ns)/vco_period_ns));
} else {
- ddly_taps = static_cast<boost::uint16_t>(std::floor((delay_ns-ADLY_MIN_NS)/vco_period_ns));
+ ddly_taps = static_cast<uint16_t>(std::floor((delay_ns-ADLY_MIN_NS)/vco_period_ns));
}
double leftover_delay = delay_ns - (vco_period_ns * ddly_taps);
//Compute settings
- boost::uint16_t ddly_value = ddly_taps + DDLY_MIN_TAPS;
+ uint16_t ddly_value = ddly_taps + DDLY_MIN_TAPS;
bool adly_en = false;
- boost::uint8_t adly_value = 0;
- boost::uint8_t half_shift_en = 0;
+ uint8_t adly_value = 0;
+ uint8_t half_shift_en = 0;
if (ddly_value > DDLY_MAX_TAPS) {
throw uhd::value_error("set_clock_delay: Requested delay is out of range.");
@@ -282,18 +282,18 @@ public:
//The VCO is running too slowly for us to compensate the digital delay difference using
//analog delay. Do the best we can.
adly_en = true;
- adly_value = static_cast<boost::uint8_t>(boost::math::round((ADLY_MAX_NS-ADLY_MIN_NS)/ADLY_RES_NS));
+ adly_value = static_cast<uint8_t>(boost::math::round((ADLY_MAX_NS-ADLY_MIN_NS)/ADLY_RES_NS));
coerced_delay += ADLY_MAX_NS;
} else if (leftover_delay >= ADLY_MIN_NS && leftover_delay <= ADLY_MAX_NS) {
//The leftover delay can be compensated by the analog delay up to the analog delay resolution
adly_en = true;
- adly_value = static_cast<boost::uint8_t>(boost::math::round((leftover_delay-ADLY_MIN_NS)/ADLY_RES_NS));
+ adly_value = static_cast<uint8_t>(boost::math::round((leftover_delay-ADLY_MIN_NS)/ADLY_RES_NS));
coerced_delay += ADLY_MIN_NS+(ADLY_RES_NS*adly_value);
} else if (leftover_delay >= (ADLY_MIN_NS - half_vco_period_ns) && leftover_delay < ADLY_MIN_NS) {
//The leftover delay if less than the minimum supported analog delay but if we move the digital
//delay back by half a VCO cycle then it will be in the range of the analog delay. So do that!
adly_en = true;
- adly_value = static_cast<boost::uint8_t>(boost::math::round((leftover_delay+half_vco_period_ns-ADLY_MIN_NS)/ADLY_RES_NS));
+ adly_value = static_cast<uint8_t>(boost::math::round((leftover_delay+half_vco_period_ns-ADLY_MIN_NS)/ADLY_RES_NS));
half_shift_en = 1;
coerced_delay += ADLY_MIN_NS+(ADLY_RES_NS*adly_value)-half_vco_period_ns;
} else {
@@ -600,10 +600,10 @@ private:
break;
};
- boost::uint16_t master_clock_div = static_cast<boost::uint16_t>(
+ uint16_t master_clock_div = static_cast<uint16_t>(
std::ceil(_vco_freq / _master_clock_rate));
- boost::uint16_t dboard_div = static_cast<boost::uint16_t>(
+ uint16_t dboard_div = static_cast<uint16_t>(
std::ceil(_vco_freq / _dboard_clock_rate));
/* Reset the LMK clock controller. */
@@ -632,7 +632,7 @@ private:
// Register 5
_lmk04816_regs.CLKout10_11_PD = lmk04816_regs_t::CLKOUT10_11_PD_NORMAL;
_lmk04816_regs.CLKout10_11_DIV =
- static_cast<boost::uint16_t>(std::ceil(_vco_freq / _system_ref_rate));
+ static_cast<uint16_t>(std::ceil(_vco_freq / _system_ref_rate));
// Register 6
_lmk04816_regs.CLKout0_TYPE = lmk04816_regs_t::CLKOUT0_TYPE_LVDS; //FPGA
diff --git a/host/lib/usrp/x300/x300_dac_ctrl.cpp b/host/lib/usrp/x300/x300_dac_ctrl.cpp
index 6ffd1ede4..162eeb143 100644
--- a/host/lib/usrp/x300/x300_dac_ctrl.cpp
+++ b/host/lib/usrp/x300/x300_dac_ctrl.cpp
@@ -250,7 +250,7 @@ public:
void _sleep_mode(bool sleep)
{
- boost::uint8_t sleep_val = sleep ? (1<<7) : 0x00;
+ uint8_t sleep_val = sleep ? (1<<7) : 0x00;
//Set sleep word and default fullscale value
write_ad9146_reg(0x41, sleep_val | 0x01); //I DAC
write_ad9146_reg(0x45, sleep_val | 0x01); //Q DAC
diff --git a/host/lib/usrp/x300/x300_dboard_iface.cpp b/host/lib/usrp/x300/x300_dboard_iface.cpp
index b28768f90..092c888b0 100644
--- a/host/lib/usrp/x300/x300_dboard_iface.cpp
+++ b/host/lib/usrp/x300/x300_dboard_iface.cpp
@@ -126,47 +126,47 @@ double x300_dboard_iface::get_codec_rate(unit_t unit)
/***********************************************************************
* GPIO
**********************************************************************/
-void x300_dboard_iface::set_pin_ctrl(unit_t unit, boost::uint32_t value, boost::uint32_t mask)
+void x300_dboard_iface::set_pin_ctrl(unit_t unit, uint32_t value, uint32_t mask)
{
_config.gpio->set_pin_ctrl(unit, value, mask);
}
-boost::uint32_t x300_dboard_iface::get_pin_ctrl(unit_t unit)
+uint32_t x300_dboard_iface::get_pin_ctrl(unit_t unit)
{
return _config.gpio->get_pin_ctrl(unit);
}
-void x300_dboard_iface::set_atr_reg(unit_t unit, atr_reg_t reg, boost::uint32_t value, boost::uint32_t mask)
+void x300_dboard_iface::set_atr_reg(unit_t unit, atr_reg_t reg, uint32_t value, uint32_t mask)
{
_config.gpio->set_atr_reg(unit, reg, value, mask);
}
-boost::uint32_t x300_dboard_iface::get_atr_reg(unit_t unit, atr_reg_t reg)
+uint32_t x300_dboard_iface::get_atr_reg(unit_t unit, atr_reg_t reg)
{
return _config.gpio->get_atr_reg(unit, reg);
}
-void x300_dboard_iface::set_gpio_ddr(unit_t unit, boost::uint32_t value, boost::uint32_t mask)
+void x300_dboard_iface::set_gpio_ddr(unit_t unit, uint32_t value, uint32_t mask)
{
_config.gpio->set_gpio_ddr(unit, value, mask);
}
-boost::uint32_t x300_dboard_iface::get_gpio_ddr(unit_t unit)
+uint32_t x300_dboard_iface::get_gpio_ddr(unit_t unit)
{
return _config.gpio->get_gpio_ddr(unit);
}
-void x300_dboard_iface::set_gpio_out(unit_t unit, boost::uint32_t value, boost::uint32_t mask)
+void x300_dboard_iface::set_gpio_out(unit_t unit, uint32_t value, uint32_t mask)
{
_config.gpio->set_gpio_out(unit, value, mask);
}
-boost::uint32_t x300_dboard_iface::get_gpio_out(unit_t unit)
+uint32_t x300_dboard_iface::get_gpio_out(unit_t unit)
{
return _config.gpio->get_gpio_out(unit);
}
-boost::uint32_t x300_dboard_iface::read_gpio(unit_t unit)
+uint32_t x300_dboard_iface::read_gpio(unit_t unit)
{
return _config.gpio->read_gpio(unit);
}
@@ -177,20 +177,20 @@ boost::uint32_t x300_dboard_iface::read_gpio(unit_t unit)
void x300_dboard_iface::write_spi(
unit_t unit,
const spi_config_t &config,
- boost::uint32_t data,
+ uint32_t data,
size_t num_bits
){
- boost::uint32_t slave = 0;
+ uint32_t slave = 0;
if (unit == UNIT_TX) slave |= _config.tx_spi_slaveno;
if (unit == UNIT_RX) slave |= _config.rx_spi_slaveno;
_config.spi->write_spi(int(slave), config, data, num_bits);
}
-boost::uint32_t x300_dboard_iface::read_write_spi(
+uint32_t x300_dboard_iface::read_write_spi(
unit_t unit,
const spi_config_t &config,
- boost::uint32_t data,
+ uint32_t data,
size_t num_bits
){
if (unit == UNIT_BOTH) throw uhd::runtime_error("UNIT_BOTH not supported.");
@@ -202,12 +202,12 @@ boost::uint32_t x300_dboard_iface::read_write_spi(
/***********************************************************************
* I2C
**********************************************************************/
-void x300_dboard_iface::write_i2c(boost::uint16_t addr, const byte_vector_t &bytes)
+void x300_dboard_iface::write_i2c(uint16_t addr, const byte_vector_t &bytes)
{
return _config.i2c->write_i2c(addr, bytes);
}
-byte_vector_t x300_dboard_iface::read_i2c(boost::uint16_t addr, size_t num_bytes)
+byte_vector_t x300_dboard_iface::read_i2c(uint16_t addr, size_t num_bytes)
{
return _config.i2c->read_i2c(addr, num_bytes);
}
@@ -280,7 +280,7 @@ double x300_dboard_iface::read_aux_adc(unit_t unit, aux_adc_t which)
unit_to_spi_adc[unit], config,
ad7922_regs.get_reg(), 16
);
- ad7922_regs.set_reg(boost::uint16_t(_config.spi->read_spi(
+ ad7922_regs.set_reg(uint16_t(_config.spi->read_spi(
unit_to_spi_adc[unit], config,
ad7922_regs.get_reg(), 16
)));
diff --git a/host/lib/usrp/x300/x300_dboard_iface.hpp b/host/lib/usrp/x300/x300_dboard_iface.hpp
index 124d768e8..82e08b016 100644
--- a/host/lib/usrp/x300/x300_dboard_iface.hpp
+++ b/host/lib/usrp/x300/x300_dboard_iface.hpp
@@ -38,7 +38,7 @@ struct x300_dboard_iface_config_t
x300_clock_ctrl::sptr clock;
x300_clock_which_t which_rx_clk;
x300_clock_which_t which_tx_clk;
- boost::uint8_t dboard_slot;
+ uint8_t dboard_slot;
uhd::timed_wb_iface::sptr cmd_time_ctrl;
};
@@ -59,21 +59,21 @@ public:
void write_aux_dac(unit_t, aux_dac_t, double);
double read_aux_adc(unit_t, aux_adc_t);
- void set_pin_ctrl(unit_t unit, boost::uint32_t value, boost::uint32_t mask = 0xffffffff);
- boost::uint32_t get_pin_ctrl(unit_t unit);
- void set_atr_reg(unit_t unit, atr_reg_t reg, boost::uint32_t value, boost::uint32_t mask = 0xffffffff);
- boost::uint32_t get_atr_reg(unit_t unit, atr_reg_t reg);
- void set_gpio_ddr(unit_t unit, boost::uint32_t value, boost::uint32_t mask = 0xffffffff);
- boost::uint32_t get_gpio_ddr(unit_t unit);
- void set_gpio_out(unit_t unit, boost::uint32_t value, boost::uint32_t mask = 0xffffffff);
- boost::uint32_t get_gpio_out(unit_t unit);
- boost::uint32_t read_gpio(unit_t unit);
+ void set_pin_ctrl(unit_t unit, uint32_t value, uint32_t mask = 0xffffffff);
+ uint32_t get_pin_ctrl(unit_t unit);
+ void set_atr_reg(unit_t unit, atr_reg_t reg, uint32_t value, uint32_t mask = 0xffffffff);
+ uint32_t get_atr_reg(unit_t unit, atr_reg_t reg);
+ void set_gpio_ddr(unit_t unit, uint32_t value, uint32_t mask = 0xffffffff);
+ uint32_t get_gpio_ddr(unit_t unit);
+ void set_gpio_out(unit_t unit, uint32_t value, uint32_t mask = 0xffffffff);
+ uint32_t get_gpio_out(unit_t unit);
+ uint32_t read_gpio(unit_t unit);
void set_command_time(const uhd::time_spec_t& t);
uhd::time_spec_t get_command_time(void);
- void write_i2c(boost::uint16_t, const uhd::byte_vector_t &);
- uhd::byte_vector_t read_i2c(boost::uint16_t, size_t);
+ void write_i2c(uint16_t, const uhd::byte_vector_t &);
+ uhd::byte_vector_t read_i2c(uint16_t, size_t);
void set_clock_rate(unit_t, double);
double get_clock_rate(unit_t);
@@ -84,14 +84,14 @@ public:
void write_spi(
unit_t unit,
const uhd::spi_config_t &config,
- boost::uint32_t data,
+ uint32_t data,
size_t num_bits
);
- boost::uint32_t read_write_spi(
+ uint32_t read_write_spi(
unit_t unit,
const uhd::spi_config_t &config,
- boost::uint32_t data,
+ uint32_t data,
size_t num_bits
);
void set_fe_connection(
diff --git a/host/lib/usrp/x300/x300_fw_ctrl.cpp b/host/lib/usrp/x300/x300_fw_ctrl.cpp
index 25960ede0..080d235a4 100644
--- a/host/lib/usrp/x300/x300_fw_ctrl.cpp
+++ b/host/lib/usrp/x300/x300_fw_ctrl.cpp
@@ -48,7 +48,7 @@ public:
__flush();
}
- void poke32(const wb_addr_type addr, const boost::uint32_t data)
+ void poke32(const wb_addr_type addr, const uint32_t data)
{
for (size_t i = 1; i <= num_retries; i++)
{
@@ -67,14 +67,14 @@ public:
}
}
- boost::uint32_t peek32(const wb_addr_type addr)
+ uint32_t peek32(const wb_addr_type addr)
{
for (size_t i = 1; i <= num_retries; i++)
{
boost::mutex::scoped_lock lock(reg_access);
try
{
- boost::uint32_t data = this->__peek32(addr);
+ uint32_t data = this->__peek32(addr);
return data;
}
catch(const uhd::io_error &ex)
@@ -91,8 +91,8 @@ public:
protected:
bool errors;
- virtual void __poke32(const wb_addr_type addr, const boost::uint32_t data) = 0;
- virtual boost::uint32_t __peek32(const wb_addr_type addr) = 0;
+ virtual void __poke32(const wb_addr_type addr, const uint32_t data) = 0;
+ virtual uint32_t __peek32(const wb_addr_type addr) = 0;
virtual void __flush() = 0;
boost::mutex reg_access;
@@ -116,12 +116,12 @@ public:
}
protected:
- virtual void __poke32(const wb_addr_type addr, const boost::uint32_t data)
+ virtual void __poke32(const wb_addr_type addr, const uint32_t data)
{
//load request struct
x300_fw_comms_t request = x300_fw_comms_t();
- request.flags = uhd::htonx<boost::uint32_t>(X300_FW_COMMS_FLAGS_ACK | X300_FW_COMMS_FLAGS_POKE32);
- request.sequence = uhd::htonx<boost::uint32_t>(seq++);
+ request.flags = uhd::htonx<uint32_t>(X300_FW_COMMS_FLAGS_ACK | X300_FW_COMMS_FLAGS_POKE32);
+ request.sequence = uhd::htonx<uint32_t>(seq++);
request.addr = uhd::htonx(addr);
request.data = uhd::htonx(data);
@@ -135,7 +135,7 @@ protected:
if (nbytes == 0) throw uhd::io_error("x300 fw poke32 - reply timed out");
//sanity checks
- const size_t flags = uhd::ntohx<boost::uint32_t>(reply.flags);
+ const size_t flags = uhd::ntohx<uint32_t>(reply.flags);
UHD_ASSERT_THROW(nbytes == sizeof(reply));
UHD_ASSERT_THROW(not (flags & X300_FW_COMMS_FLAGS_ERROR));
UHD_ASSERT_THROW(flags & X300_FW_COMMS_FLAGS_POKE32);
@@ -145,12 +145,12 @@ protected:
UHD_ASSERT_THROW(reply.data == request.data);
}
- virtual boost::uint32_t __peek32(const wb_addr_type addr)
+ virtual uint32_t __peek32(const wb_addr_type addr)
{
//load request struct
x300_fw_comms_t request = x300_fw_comms_t();
- request.flags = uhd::htonx<boost::uint32_t>(X300_FW_COMMS_FLAGS_ACK | X300_FW_COMMS_FLAGS_PEEK32);
- request.sequence = uhd::htonx<boost::uint32_t>(seq++);
+ request.flags = uhd::htonx<uint32_t>(X300_FW_COMMS_FLAGS_ACK | X300_FW_COMMS_FLAGS_PEEK32);
+ request.sequence = uhd::htonx<uint32_t>(seq++);
request.addr = uhd::htonx(addr);
request.data = 0;
@@ -164,7 +164,7 @@ protected:
if (nbytes == 0) throw uhd::io_error("x300 fw peek32 - reply timed out");
//sanity checks
- const size_t flags = uhd::ntohx<boost::uint32_t>(reply.flags);
+ const size_t flags = uhd::ntohx<uint32_t>(reply.flags);
UHD_ASSERT_THROW(nbytes == sizeof(reply));
UHD_ASSERT_THROW(not (flags & X300_FW_COMMS_FLAGS_ERROR));
UHD_ASSERT_THROW(flags & X300_FW_COMMS_FLAGS_PEEK32);
@@ -173,7 +173,7 @@ protected:
UHD_ASSERT_THROW(reply.addr == request.addr);
//return result!
- return uhd::ntohx<boost::uint32_t>(reply.data);
+ return uhd::ntohx<uint32_t>(reply.data);
}
virtual void __flush(void)
@@ -202,14 +202,14 @@ public:
//Verify that the Ettus FPGA loaded in the device. This may not be true if the
//user is switching to UHD after using LabVIEW FPGA.
- boost::uint32_t pcie_fpga_signature = 0;
+ uint32_t pcie_fpga_signature = 0;
_drv_proxy->peek(FPGA_PCIE_SIG_REG, pcie_fpga_signature);
if (pcie_fpga_signature != FPGA_X3xx_SIG_VALUE)
throw uhd::io_error("cannot create x300_ctrl_iface_pcie. incorrect/no fpga image");
//Also, poll on the ZPU_STATUS bit to ensure all the state machines in the FPGA are
//ready to accept register transaction requests.
- boost::uint32_t reg_data = 0xffffffff;
+ uint32_t reg_data = 0xffffffff;
boost::posix_time::ptime start_time = boost::posix_time::microsec_clock::local_time();
boost::posix_time::time_duration elapsed;
@@ -232,10 +232,10 @@ public:
}
protected:
- virtual void __poke32(const wb_addr_type addr, const boost::uint32_t data)
+ virtual void __poke32(const wb_addr_type addr, const uint32_t data)
{
nirio_status status = 0;
- boost::uint32_t reg_data = 0xffffffff;
+ uint32_t reg_data = 0xffffffff;
boost::posix_time::ptime start_time = boost::posix_time::microsec_clock::local_time();
boost::posix_time::time_duration elapsed;
@@ -257,10 +257,10 @@ protected:
throw uhd::io_error("x300 fw poke32 - operation timed out");
}
- virtual boost::uint32_t __peek32(const wb_addr_type addr)
+ virtual uint32_t __peek32(const wb_addr_type addr)
{
nirio_status status = 0;
- boost::uint32_t reg_data = 0xffffffff;
+ uint32_t reg_data = 0xffffffff;
boost::posix_time::ptime start_time = boost::posix_time::microsec_clock::local_time();
boost::posix_time::time_duration elapsed;
@@ -292,8 +292,8 @@ protected:
private:
niriok_proxy::sptr _drv_proxy;
- static const boost::uint32_t READ_TIMEOUT_IN_MS = 10;
- static const boost::uint32_t INIT_TIMEOUT_IN_MS = 5000;
+ static const uint32_t READ_TIMEOUT_IN_MS = 10;
+ static const uint32_t INIT_TIMEOUT_IN_MS = 5000;
};
wb_iface::sptr x300_make_ctrl_iface_enet(uhd::transport::udp_simple::sptr udp, bool enable_errors = true)
diff --git a/host/lib/usrp/x300/x300_fw_uart.cpp b/host/lib/usrp/x300/x300_fw_uart.cpp
index 7f60e26fc..6e7425c4d 100644
--- a/host/lib/usrp/x300/x300_fw_uart.cpp
+++ b/host/lib/usrp/x300/x300_fw_uart.cpp
@@ -48,7 +48,7 @@ struct x300_uart_iface : uart_iface
{
const int shift = ((txoffset%4) * 8);
if (shift == 0) txword32 = 0;
- txword32 |= boost::uint32_t(ch) << shift;
+ txword32 |= uint32_t(ch) << shift;
// Write out full 32 bit words or whatever we have if end of string
if (txoffset % 4 == 3 or ch == '\n')
{
@@ -82,15 +82,15 @@ struct x300_uart_iface : uart_iface
void update_cache(void)
{
- boost::uint32_t device_rxoffset = _iface->peek32(SR_ADDR(X300_FW_SHMEM_BASE, X300_FW_SHMEM_UART_RX_INDEX));
- boost::uint32_t delta = device_rxoffset - rxoffset;
+ uint32_t device_rxoffset = _iface->peek32(SR_ADDR(X300_FW_SHMEM_BASE, X300_FW_SHMEM_UART_RX_INDEX));
+ uint32_t delta = device_rxoffset - rxoffset;
while (delta)
{
if (delta >= poolsize*4)
{
// all the data is new - reload the entire cache
- for (boost::uint32_t i = 0; i < poolsize; i++)
+ for (uint32_t i = 0; i < poolsize; i++)
_rxcache[i] = _iface->peek32(SR_ADDR(rxpool, i));
// set rxoffset to the end of the first string
@@ -104,7 +104,7 @@ struct x300_uart_iface : uart_iface
else if (rxoffset == _last_device_rxoffset)
{
// new data was added - refresh the portion of the cache that was updated
- for (boost::uint32_t i = ((_last_device_rxoffset+1)/4) % poolsize; i != (((device_rxoffset)/4)+1) % poolsize; i = (i+1) % poolsize)
+ for (uint32_t i = ((_last_device_rxoffset+1)/4) % poolsize; i != (((device_rxoffset)/4)+1) % poolsize; i = (i+1) % poolsize)
{
_rxcache[i] = _iface->peek32(SR_ADDR(rxpool, i));
}
@@ -155,9 +155,9 @@ struct x300_uart_iface : uart_iface
}
wb_iface::sptr _iface;
- boost::uint32_t rxoffset, txoffset, txword32, rxpool, txpool, poolsize;
- boost::uint32_t _last_device_rxoffset;
- std::vector<boost::uint32_t> _rxcache;
+ uint32_t rxoffset, txoffset, txword32, rxpool, txpool, poolsize;
+ uint32_t _last_device_rxoffset;
+ std::vector<uint32_t> _rxcache;
std::string _rxbuff;
boost::mutex _read_mutex;
boost::mutex _write_mutex;
diff --git a/host/lib/usrp/x300/x300_image_loader.cpp b/host/lib/usrp/x300/x300_image_loader.cpp
index e8a1b5269..f08b21f9b 100644
--- a/host/lib/usrp/x300/x300_image_loader.cpp
+++ b/host/lib/usrp/x300/x300_image_loader.cpp
@@ -61,13 +61,13 @@ using namespace uhd::transport;
* Packet structure
*/
typedef struct {
- boost::uint32_t flags;
- boost::uint32_t sector;
- boost::uint32_t index;
- boost::uint32_t size;
+ uint32_t flags;
+ uint32_t sector;
+ uint32_t index;
+ uint32_t size;
union {
- boost::uint8_t data8[X300_PACKET_SIZE_BYTES];
- boost::uint16_t data16[X300_PACKET_SIZE_BYTES/2];
+ uint8_t data8[X300_PACKET_SIZE_BYTES];
+ uint16_t data16[X300_PACKET_SIZE_BYTES/2];
};
} x300_fpga_update_data_t;
@@ -86,10 +86,10 @@ typedef struct {
std::string resource;
std::string filepath;
std::string rpc_port;
- boost::uint32_t size;
+ uint32_t size;
udp_simple::sptr xport;
std::vector<char> bitstream; // .bin image extracted from .lvbitx file
- boost::uint8_t data_in[udp_simple::mtu];
+ uint8_t data_in[udp_simple::mtu];
} x300_session_t;
/*
@@ -139,7 +139,7 @@ static void x300_validate_image(x300_session_t &session){
if(!session.ethernet) session.bitstream.clear();
}
else if(extension == ".bin" or extension == ".bit"){
- boost::uint32_t max_size = (extension == ".bin") ? X300_FPGA_BIN_SIZE_BYTES
+ uint32_t max_size = (extension == ".bin") ? X300_FPGA_BIN_SIZE_BYTES
: X300_FPGA_BIT_SIZE_BYTES;
session.size = fs::file_size(session.filepath);
@@ -221,10 +221,10 @@ static void x300_setup_session(x300_session_t &session,
* Ethernet communication functions
*/
static UHD_INLINE size_t x300_send_and_recv(udp_simple::sptr xport,
- boost::uint32_t pkt_code,
+ uint32_t pkt_code,
x300_fpga_update_data_t *pkt_out,
- boost::uint8_t* data){
- pkt_out->flags = uhd::htonx<boost::uint32_t>(pkt_code);
+ uint8_t* data){
+ pkt_out->flags = uhd::htonx<uint32_t>(pkt_code);
xport->send(boost::asio::buffer(pkt_out, sizeof(*pkt_out)));
return xport->recv(boost::asio::buffer(data, udp_simple::mtu), UDP_TIMEOUT);
}
@@ -236,7 +236,7 @@ static UHD_INLINE bool x300_recv_ok(const x300_fpga_update_data_t *pkt_in,
}
// Image data needs to be bitswapped
-static UHD_INLINE void x300_bitswap(boost::uint8_t *num){
+static UHD_INLINE void x300_bitswap(uint8_t *num){
*num = ((*num & 0xF0) >> 4) | ((*num & 0x0F) << 4);
*num = ((*num & 0xCC) >> 2) | ((*num & 0x33) << 2);
*num = ((*num & 0xAA) >> 1) | ((*num & 0x55) << 1);
@@ -249,7 +249,7 @@ static void x300_ethernet_load(x300_session_t &session){
const x300_fpga_update_data_t *pkt_in = reinterpret_cast<const x300_fpga_update_data_t*>(session.data_in);
// Initialize write session
- boost::uint32_t flags = X300_FPGA_PROG_FLAGS_ACK | X300_FPGA_PROG_FLAGS_INIT;
+ uint32_t flags = X300_FPGA_PROG_FLAGS_ACK | X300_FPGA_PROG_FLAGS_INIT;
size_t len = x300_send_and_recv(session.xport, flags, &pkt_out, session.data_in);
if(x300_recv_ok(pkt_in, len)){
std::cout << "-- Initializing FPGA loading..." << std::flush;
@@ -290,9 +290,9 @@ static void x300_ethernet_load(x300_session_t &session){
if(session.verify) flags |= X300_FPGA_PROG_FLAGS_VERIFY;
// Set burn location
- pkt_out.sector = htonx<boost::uint32_t>(X300_FPGA_SECTOR_START + (i/X300_FLASH_SECTOR_SIZE));
- pkt_out.index = htonx<boost::uint32_t>((j % X300_FLASH_SECTOR_SIZE) / 2);
- pkt_out.size = htonx<boost::uint32_t>(X300_PACKET_SIZE_BYTES / 2);
+ pkt_out.sector = htonx<uint32_t>(X300_FPGA_SECTOR_START + (i/X300_FLASH_SECTOR_SIZE));
+ pkt_out.index = htonx<uint32_t>((j % X300_FLASH_SECTOR_SIZE) / 2);
+ pkt_out.size = htonx<uint32_t>(X300_PACKET_SIZE_BYTES / 2);
// Read next piece of image
memset(pkt_out.data8, 0, X300_PACKET_SIZE_BYTES);
@@ -309,7 +309,7 @@ static void x300_ethernet_load(x300_session_t &session){
x300_bitswap(&pkt_out.data8[k]);
}
for(size_t k = 0; k < (X300_PACKET_SIZE_BYTES/2); k++){
- pkt_out.data16[k] = htonx<boost::uint16_t>(pkt_out.data16[k]);
+ pkt_out.data16[k] = htonx<uint16_t>(pkt_out.data16[k]);
}
len = x300_send_and_recv(session.xport, flags, &pkt_out, session.data_in);
diff --git a/host/lib/usrp/x300/x300_impl.cpp b/host/lib/usrp/x300/x300_impl.cpp
index 776fac928..959245135 100644
--- a/host/lib/usrp/x300/x300_impl.cpp
+++ b/host/lib/usrp/x300/x300_impl.cpp
@@ -91,8 +91,8 @@ static device_addrs_t x300_find_with_addr(const device_addr_t &hint)
//load request struct
x300_fw_comms_t request = x300_fw_comms_t();
- request.flags = uhd::htonx<boost::uint32_t>(X300_FW_COMMS_FLAGS_ACK);
- request.sequence = uhd::htonx<boost::uint32_t>(std::rand());
+ request.flags = uhd::htonx<uint32_t>(X300_FW_COMMS_FLAGS_ACK);
+ request.sequence = uhd::htonx<uint32_t>(std::rand());
//send request
comm->send(asio::buffer(&request, sizeof(request)));
@@ -358,17 +358,17 @@ static void x300_load_fw(wb_iface::sptr fw_reg_ctrl, const std::string &file_nam
//load file into memory
std::ifstream fw_file(file_name.c_str());
- boost::uint32_t fw_file_buff[X300_FW_NUM_BYTES/sizeof(boost::uint32_t)];
+ uint32_t fw_file_buff[X300_FW_NUM_BYTES/sizeof(uint32_t)];
fw_file.read((char *)fw_file_buff, sizeof(fw_file_buff));
fw_file.close();
//Poke the fw words into the WB boot loader
fw_reg_ctrl->poke32(SR_ADDR(BOOT_LDR_BASE, BL_ADDRESS), 0);
- for (size_t i = 0; i < X300_FW_NUM_BYTES; i+=sizeof(boost::uint32_t))
+ for (size_t i = 0; i < X300_FW_NUM_BYTES; i+=sizeof(uint32_t))
{
//@TODO: FIXME: Since x300_ctrl_iface acks each write and traps exceptions, the first try for the last word
// written will print an error because it triggers a FW reload and fails to reply.
- fw_reg_ctrl->poke32(SR_ADDR(BOOT_LDR_BASE, BL_DATA), uhd::byteswap(fw_file_buff[i/sizeof(boost::uint32_t)]));
+ fw_reg_ctrl->poke32(SR_ADDR(BOOT_LDR_BASE, BL_DATA), uhd::byteswap(fw_file_buff[i/sizeof(uint32_t)]));
if ((i & 0x1fff) == 0) UHD_MSG(status) << "." << std::flush;
}
@@ -445,16 +445,16 @@ void x300_impl::mboard_members_t::discover_eth(
);
if (addr == boost::asio::ip::address_v4(
- boost::uint32_t(X300_DEFAULT_IP_ETH0_1G)).to_string()) {
+ uint32_t(X300_DEFAULT_IP_ETH0_1G)).to_string()) {
conn_iface.type = X300_IFACE_ETH0;
} else if (addr == boost::asio::ip::address_v4(
- boost::uint32_t(X300_DEFAULT_IP_ETH1_1G)).to_string()) {
+ uint32_t(X300_DEFAULT_IP_ETH1_1G)).to_string()) {
conn_iface.type = X300_IFACE_ETH1;
} else if (addr == boost::asio::ip::address_v4(
- boost::uint32_t(X300_DEFAULT_IP_ETH0_10G)).to_string()) {
+ uint32_t(X300_DEFAULT_IP_ETH0_10G)).to_string()) {
conn_iface.type = X300_IFACE_ETH0;
} else if (addr == boost::asio::ip::address_v4(
- boost::uint32_t(X300_DEFAULT_IP_ETH1_10G)).to_string()) {
+ uint32_t(X300_DEFAULT_IP_ETH1_10G)).to_string()) {
conn_iface.type = X300_IFACE_ETH1;
} else {
throw uhd::assertion_error(str(boost::format(
@@ -555,7 +555,7 @@ void x300_impl::setup_mb(const size_t mb_i, const uhd::device_addr_t &dev_addr)
nirio_status_to_exception(status, "x300_impl: Could not initialize RIO session.");
//Tell the quirks object which FIFOs carry TX stream data
- const boost::uint32_t tx_data_fifos[2] = {X300_RADIO_DEST_PREFIX_TX, X300_RADIO_DEST_PREFIX_TX + 3};
+ const uint32_t tx_data_fifos[2] = {X300_RADIO_DEST_PREFIX_TX, X300_RADIO_DEST_PREFIX_TX + 3};
mb.rio_fpga_interface->get_kernel_proxy()->get_rio_quirks().register_tx_streams(tx_data_fifos, 2);
_tree->create<size_t>(mb_path / "mtu/recv").set(X300_PCIE_RX_DATA_FRAME_SIZE);
@@ -849,7 +849,7 @@ void x300_impl::setup_mb(const size_t mb_i, const uhd::device_addr_t &dev_addr)
////////////////////////////////////////////////////////////////////
// Create the GPSDO control
////////////////////////////////////////////////////////////////////
- static const boost::uint32_t dont_look_for_gpsdo = 0x1234abcdul;
+ static const uint32_t dont_look_for_gpsdo = 0x1234abcdul;
//otherwise if not disabled, look for the internal GPSDO
if (mb.zpu_ctrl->peek32(SR_ADDR(X300_FW_SHMEM_BASE, X300_FW_SHMEM_GPSDO_STATUS)) != dont_look_for_gpsdo)
@@ -1048,8 +1048,8 @@ uint32_t x300_impl::allocate_pcie_dma_chan(const uhd::sid_t &tx_sid, const xport
}
}
-static boost::uint32_t extract_sid_from_pkt(void* pkt, size_t) {
- return uhd::sid_t(uhd::wtohx(static_cast<const boost::uint32_t*>(pkt)[1])).get_dst();
+static uint32_t extract_sid_from_pkt(void* pkt, size_t) {
+ return uhd::sid_t(uhd::wtohx(static_cast<const uint32_t*>(pkt)[1])).get_dst();
}
uhd::both_xports_t x300_impl::make_transport(
@@ -1251,8 +1251,8 @@ uhd::both_xports_t x300_impl::make_transport(
//YES, get a __send__ buffer from the __recv__ socket
//-- this is the only way to program the framer for recv:
managed_send_buffer::sptr buff = xports.recv->get_send_buff();
- buff->cast<boost::uint32_t *>()[0] = 0; //eth dispatch looks for != 0
- buff->cast<boost::uint32_t *>()[1] = uhd::htonx(xports.send_sid.get());
+ buff->cast<uint32_t *>()[0] = 0; //eth dispatch looks for != 0
+ buff->cast<uint32_t *>()[1] = uhd::htonx(xports.send_sid.get());
buff->commit(8);
buff.reset();
@@ -1413,7 +1413,7 @@ void x300_impl::sync_times(mboard_members_t &mb, const uhd::time_spec_t& t)
mb.fw_regmap->clock_ctrl_reg.write(fw_regmap_t::clk_ctrl_reg_t::TIME_SYNC, 0);
}
-bool x300_impl::wait_for_clk_locked(mboard_members_t& mb, boost::uint32_t which, double timeout)
+bool x300_impl::wait_for_clk_locked(mboard_members_t& mb, uint32_t which, double timeout)
{
boost::system_time timeout_time = boost::get_system_time() + boost::posix_time::milliseconds(timeout * 1000.0);
do {
@@ -1439,7 +1439,7 @@ bool x300_impl::is_pps_present(mboard_members_t& mb)
{
// The ZPU_RB_CLK_STATUS_PPS_DETECT bit toggles with each rising edge of the PPS.
// We monitor it for up to 1.5 seconds looking for it to toggle.
- boost::uint32_t pps_detect = mb.fw_regmap->clock_status_reg.read(fw_regmap_t::clk_status_reg_t::PPS_DETECT);
+ uint32_t pps_detect = mb.fw_regmap->clock_status_reg.read(fw_regmap_t::clk_status_reg_t::PPS_DETECT);
for (int i = 0; i < 15; i++)
{
boost::this_thread::sleep(boost::posix_time::milliseconds(100));
@@ -1494,16 +1494,16 @@ x300_impl::frame_size_t x300_impl::determine_max_frame_size(const std::string &a
udp_simple::sptr udp = udp_simple::make_connected(addr,
BOOST_STRINGIZE(X300_MTU_DETECT_UDP_PORT));
- std::vector<boost::uint8_t> buffer(std::max(user_frame_size.recv_frame_size, user_frame_size.send_frame_size));
+ std::vector<uint8_t> buffer(std::max(user_frame_size.recv_frame_size, user_frame_size.send_frame_size));
x300_mtu_t *request = reinterpret_cast<x300_mtu_t *>(&buffer.front());
static const double echo_timeout = 0.020; //20 ms
//test holler - check if its supported in this fw version
- request->flags = uhd::htonx<boost::uint32_t>(X300_MTU_DETECT_ECHO_REQUEST);
- request->size = uhd::htonx<boost::uint32_t>(sizeof(x300_mtu_t));
+ request->flags = uhd::htonx<uint32_t>(X300_MTU_DETECT_ECHO_REQUEST);
+ request->size = uhd::htonx<uint32_t>(sizeof(x300_mtu_t));
udp->send(boost::asio::buffer(buffer, sizeof(x300_mtu_t)));
udp->recv(boost::asio::buffer(buffer), echo_timeout);
- if (!(uhd::ntohx<boost::uint32_t>(request->flags) & X300_MTU_DETECT_ECHO_REPLY))
+ if (!(uhd::ntohx<uint32_t>(request->flags) & X300_MTU_DETECT_ECHO_REPLY))
throw uhd::not_implemented_error("Holler protocol not implemented");
//Reducing range of (min,max) by setting max value to 10gig max_frame_size as larger sizes are not supported
@@ -1517,8 +1517,8 @@ x300_impl::frame_size_t x300_impl::determine_max_frame_size(const std::string &a
{
size_t test_frame_size = (max_recv_frame_size/2 + min_recv_frame_size/2 + 3) & ~3;
- request->flags = uhd::htonx<boost::uint32_t>(X300_MTU_DETECT_ECHO_REQUEST);
- request->size = uhd::htonx<boost::uint32_t>(test_frame_size);
+ request->flags = uhd::htonx<uint32_t>(X300_MTU_DETECT_ECHO_REQUEST);
+ request->size = uhd::htonx<uint32_t>(test_frame_size);
udp->send(boost::asio::buffer(buffer, sizeof(x300_mtu_t)));
size_t len = udp->recv(boost::asio::buffer(buffer), echo_timeout);
@@ -1537,13 +1537,13 @@ x300_impl::frame_size_t x300_impl::determine_max_frame_size(const std::string &a
{
size_t test_frame_size = (max_send_frame_size/2 + min_send_frame_size/2 + 3) & ~3;
- request->flags = uhd::htonx<boost::uint32_t>(X300_MTU_DETECT_ECHO_REQUEST);
- request->size = uhd::htonx<boost::uint32_t>(sizeof(x300_mtu_t));
+ request->flags = uhd::htonx<uint32_t>(X300_MTU_DETECT_ECHO_REQUEST);
+ request->size = uhd::htonx<uint32_t>(sizeof(x300_mtu_t));
udp->send(boost::asio::buffer(buffer, test_frame_size));
size_t len = udp->recv(boost::asio::buffer(buffer), echo_timeout);
if (len >= sizeof(x300_mtu_t))
- len = uhd::ntohx<boost::uint32_t>(request->size);
+ len = uhd::ntohx<uint32_t>(request->size);
if (len >= test_frame_size)
min_send_frame_size = test_frame_size;
@@ -1571,9 +1571,9 @@ x300_impl::frame_size_t x300_impl::determine_max_frame_size(const std::string &a
void x300_impl::check_fw_compat(const fs_path &mb_path, wb_iface::sptr iface)
{
- boost::uint32_t compat_num = iface->peek32(SR_ADDR(X300_FW_SHMEM_BASE, X300_FW_SHMEM_COMPAT_NUM));
- boost::uint32_t compat_major = (compat_num >> 16);
- boost::uint32_t compat_minor = (compat_num & 0xffff);
+ uint32_t compat_num = iface->peek32(SR_ADDR(X300_FW_SHMEM_BASE, X300_FW_SHMEM_COMPAT_NUM));
+ uint32_t compat_major = (compat_num >> 16);
+ uint32_t compat_minor = (compat_num & 0xffff);
if (compat_major != X300_FW_COMPAT_MAJOR)
{
@@ -1590,9 +1590,9 @@ void x300_impl::check_fw_compat(const fs_path &mb_path, wb_iface::sptr iface)
void x300_impl::check_fpga_compat(const fs_path &mb_path, const mboard_members_t &members)
{
- boost::uint32_t compat_num = members.zpu_ctrl->peek32(SR_ADDR(SET0_BASE, ZPU_RB_COMPAT_NUM));
- boost::uint32_t compat_major = (compat_num >> 16);
- boost::uint32_t compat_minor = (compat_num & 0xffff);
+ uint32_t compat_num = members.zpu_ctrl->peek32(SR_ADDR(SET0_BASE, ZPU_RB_COMPAT_NUM));
+ uint32_t compat_major = (compat_num >> 16);
+ uint32_t compat_minor = (compat_num & 0xffff);
if (compat_major != X300_FPGA_COMPAT_MAJOR)
{
@@ -1623,7 +1623,7 @@ void x300_impl::check_fpga_compat(const fs_path &mb_path, const mboard_members_t
_tree->create<std::string>(mb_path / "fpga_version").set(str(boost::format("%u.%u")
% compat_major % compat_minor));
- const boost::uint32_t git_hash = members.zpu_ctrl->peek32(SR_ADDR(SET0_BASE,
+ const uint32_t git_hash = members.zpu_ctrl->peek32(SR_ADDR(SET0_BASE,
ZPU_RB_GIT_HASH));
_tree->create<std::string>(mb_path / "fpga_version_hash").set(
str(boost::format("%07x%s")
@@ -1637,7 +1637,7 @@ x300_impl::x300_mboard_t x300_impl::get_mb_type_from_pcie(const std::string& res
//Detect the PCIe product ID to distinguish between X300 and X310
nirio_status status = NiRio_Status_Success;
- boost::uint32_t pid;
+ uint32_t pid;
niriok_proxy::sptr discovery_proxy =
niusrprio_session::create_kernel_proxy(resource, rpc_port);
if (discovery_proxy) {
@@ -1696,9 +1696,9 @@ x300_impl::x300_mboard_t x300_impl::get_mb_type_from_eeprom(const uhd::usrp::mbo
x300_mboard_t mb_type = UNKNOWN;
if (not mb_eeprom["product"].empty())
{
- boost::uint16_t product_num = 0;
+ uint16_t product_num = 0;
try {
- product_num = boost::lexical_cast<boost::uint16_t>(mb_eeprom["product"]);
+ product_num = boost::lexical_cast<uint16_t>(mb_eeprom["product"]);
} catch (const boost::bad_lexical_cast &) {
product_num = 0;
}
diff --git a/host/lib/usrp/x300/x300_impl.hpp b/host/lib/usrp/x300/x300_impl.hpp
index 5d3fa4fed..ff18b1a22 100644
--- a/host/lib/usrp/x300/x300_impl.hpp
+++ b/host/lib/usrp/x300/x300_impl.hpp
@@ -266,7 +266,7 @@ private:
void sync_times(mboard_members_t&, const uhd::time_spec_t&);
uhd::sensor_value_t get_ref_locked(mboard_members_t& mb);
- bool wait_for_clk_locked(mboard_members_t& mb, boost::uint32_t which, double timeout);
+ bool wait_for_clk_locked(mboard_members_t& mb, uint32_t which, double timeout);
bool is_pps_present(mboard_members_t& mb);
void set_mb_eeprom(uhd::i2c_iface::sptr i2c, const uhd::usrp::mboard_eeprom_t &);
diff --git a/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp b/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp
index 0a57e337e..4bb9c9fb5 100644
--- a/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp
+++ b/host/lib/usrp/x300/x300_radio_ctrl_impl.cpp
@@ -82,11 +82,11 @@ UHD_RFNOC_RADIO_BLOCK_CONSTRUCTOR(x300_radio_ctrl)
if (_radio_type==PRIMARY) {
_fp_gpio = gpio_atr::gpio_atr_3000::make(ctrl, regs::sr_addr(regs::FP_GPIO), regs::RB_FP_GPIO);
BOOST_FOREACH(const gpio_atr::gpio_attr_map_t::value_type attr, gpio_atr::gpio_attr_map) {
- _tree->create<boost::uint32_t>(fs_path("gpio") / "FP0" / attr.second)
+ _tree->create<uint32_t>(fs_path("gpio") / "FP0" / attr.second)
.set(0)
.add_coerced_subscriber(boost::bind(&gpio_atr::gpio_atr_3000::set_gpio_attr, _fp_gpio, attr.first, _1));
}
- _tree->create<boost::uint32_t>(fs_path("gpio") / "FP0" / "READBACK")
+ _tree->create<uint32_t>(fs_path("gpio") / "FP0" / "READBACK")
.set_publisher(boost::bind(&gpio_atr::gpio_atr_3000::read_gpio, _fp_gpio));
}
@@ -484,7 +484,7 @@ void x300_radio_ctrl_impl::reset_codec()
_dac->reset();
}
-void x300_radio_ctrl_impl::self_test_adc(boost::uint32_t ramp_time_ms)
+void x300_radio_ctrl_impl::self_test_adc(uint32_t ramp_time_ms)
{
//Bypass all front-end corrections
for (size_t i = 0; i < _get_num_radios(); i++) {
@@ -603,7 +603,7 @@ void x300_radio_ctrl_impl::synchronize_dacs(const std::vector<x300_radio_ctrl_im
boost::posix_time::microsec_clock::local_time() - t_start;
//Add 100% of headroom + uncertaintly to the command time
- boost::uint64_t t_sync_us = (t_elapsed.total_microseconds() * 2) + 13000 /*Scheduler latency*/;
+ uint64_t t_sync_us = (t_elapsed.total_microseconds() * 2) + 13000 /*Scheduler latency*/;
//Pick radios[0] as the time reference.
uhd::time_spec_t sync_time =
@@ -654,7 +654,7 @@ double x300_radio_ctrl_impl::self_cal_adc_xfer_delay(
double delay = clock->set_clock_delay(X300_CLOCK_WHICH_ADC0, delay_incr*i + delay_start);
wait_for_clk_locked(0.1);
- boost::uint32_t err_code = 0;
+ uint32_t err_code = 0;
for (size_t r = 0; r < radios.size(); r++) {
//Test each channel (I and Q) individually so as to not accidentally trigger
//on the data from the other channel if there is a swap
@@ -785,20 +785,20 @@ void x300_radio_ctrl_impl::_self_cal_adc_capture_delay(bool print_status)
{
if (print_status) UHD_MSG(status) << "Running ADC capture delay self-cal..." << std::flush;
- static const boost::uint32_t NUM_DELAY_STEPS = 32; //The IDELAYE2 element has 32 steps
- static const boost::uint32_t NUM_RETRIES = 2; //Retry self-cal if it fails in warmup situations
- static const boost::int32_t MIN_WINDOW_LEN = 4;
+ static const uint32_t NUM_DELAY_STEPS = 32; //The IDELAYE2 element has 32 steps
+ static const uint32_t NUM_RETRIES = 2; //Retry self-cal if it fails in warmup situations
+ static const int32_t MIN_WINDOW_LEN = 4;
- boost::int32_t win_start = -1, win_stop = -1;
- boost::uint32_t iter = 0;
+ int32_t win_start = -1, win_stop = -1;
+ uint32_t iter = 0;
while (iter++ < NUM_RETRIES) {
- for (boost::uint32_t dly_tap = 0; dly_tap < NUM_DELAY_STEPS; dly_tap++) {
+ for (uint32_t dly_tap = 0; dly_tap < NUM_DELAY_STEPS; dly_tap++) {
//Apply delay
_regs->misc_outs_reg.write(radio_regmap_t::misc_outs_reg_t::ADC_DATA_DLY_VAL, dly_tap);
_regs->misc_outs_reg.write(radio_regmap_t::misc_outs_reg_t::ADC_DATA_DLY_STB, 1);
_regs->misc_outs_reg.write(radio_regmap_t::misc_outs_reg_t::ADC_DATA_DLY_STB, 0);
- boost::uint32_t err_code = 0;
+ uint32_t err_code = 0;
// -- Test I Channel --
//Put ADC in ramp test mode. Tie the other channel to all ones.
@@ -869,7 +869,7 @@ void x300_radio_ctrl_impl::_self_cal_adc_capture_delay(bool print_status)
throw uhd::runtime_error("self_cal_adc_capture_delay: Self calibration failed. Valid window too narrow.");
}
- boost::uint32_t ideal_tap = (win_stop + win_start) / 2;
+ uint32_t ideal_tap = (win_stop + win_start) / 2;
_regs->misc_outs_reg.write(radio_regmap_t::misc_outs_reg_t::ADC_DATA_DLY_VAL, ideal_tap);
_regs->misc_outs_reg.write(radio_regmap_t::misc_outs_reg_t::ADC_DATA_DLY_STB, 1);
_regs->misc_outs_reg.write(radio_regmap_t::misc_outs_reg_t::ADC_DATA_DLY_STB, 0);
@@ -880,14 +880,14 @@ void x300_radio_ctrl_impl::_self_cal_adc_capture_delay(bool print_status)
}
}
-void x300_radio_ctrl_impl::_check_adc(const boost::uint32_t val)
+void x300_radio_ctrl_impl::_check_adc(const uint32_t val)
{
//Wait for previous control transaction to flush
user_reg_read64(regs::RB_TEST);
//Wait for ADC test pattern to propagate
boost::this_thread::sleep(boost::posix_time::microsec(5));
//Read value of RX readback register and verify
- boost::uint32_t adc_rb = static_cast<boost::uint32_t>(user_reg_read64(regs::RB_TEST)>>32);
+ uint32_t adc_rb = static_cast<uint32_t>(user_reg_read64(regs::RB_TEST)>>32);
adc_rb ^= 0xfffc0000; //adapt for I inversion in FPGA
if (val != adc_rb) {
throw uhd::runtime_error(
diff --git a/host/lib/usrp/x300/x300_radio_ctrl_impl.hpp b/host/lib/usrp/x300/x300_radio_ctrl_impl.hpp
index 73640af01..6e17778bd 100644
--- a/host/lib/usrp/x300/x300_radio_ctrl_impl.hpp
+++ b/host/lib/usrp/x300/x300_radio_ctrl_impl.hpp
@@ -82,7 +82,7 @@ public:
void reset_codec();
void self_test_adc(
- boost::uint32_t ramp_time_ms = 100);
+ uint32_t ramp_time_ms = 100);
static void extended_adc_test(
const std::vector<x300_radio_ctrl_impl::sptr>&, double duration_s);
@@ -154,7 +154,7 @@ private:
void _self_cal_adc_capture_delay(bool print_status);
- void _check_adc(const boost::uint32_t val);
+ void _check_adc(const uint32_t val);
void _set_db_eeprom(uhd::i2c_iface::sptr i2c, const size_t, const uhd::usrp::dboard_eeprom_t &);
diff --git a/host/lib/usrp/x300/x300_regs.hpp b/host/lib/usrp/x300/x300_regs.hpp
index 80d275949..6e7c47a64 100644
--- a/host/lib/usrp/x300/x300_regs.hpp
+++ b/host/lib/usrp/x300/x300_regs.hpp
@@ -184,9 +184,9 @@ namespace uhd { namespace usrp { namespace x300 {
UHD_DEFINE_SOFT_REG_FIELD(GPSDO_PWR_EN, /*width*/ 1, /*shift*/ 6); //[6]
UHD_DEFINE_SOFT_REG_FIELD(TIME_SYNC, /*width*/ 1, /*shift*/ 7); //[7]
- static const boost::uint32_t SRC_EXTERNAL = 0x0;
- static const boost::uint32_t SRC_INTERNAL = 0x2;
- static const boost::uint32_t SRC_GPSDO = 0x3;
+ static const uint32_t SRC_EXTERNAL = 0x0;
+ static const uint32_t SRC_INTERNAL = 0x2;
+ static const uint32_t SRC_GPSDO = 0x3;
clk_ctrl_reg_t(): uhd::soft_reg32_wo_t(SR_ADDR(SET0_BASE, ZPU_SR_CLOCK_CTRL)) {
//Initial values