aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/rfnoc
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2016-10-31 14:30:52 -0700
committerMartin Braun <martin.braun@ettus.com>2016-11-08 08:02:22 -0800
commit99c2730bc9db270560671f2d7d173768465ed51f (patch)
treebc4df495734a075ebe2f7917cf67dec6fb7d8177 /host/lib/rfnoc
parent218f4b0b63927110df9dbbaa8353c346eee2d98a (diff)
downloaduhd-99c2730bc9db270560671f2d7d173768465ed51f.tar.gz
uhd-99c2730bc9db270560671f2d7d173768465ed51f.tar.bz2
uhd-99c2730bc9db270560671f2d7d173768465ed51f.zip
Remove all boost:: namespace prefix for uint32_t, int32_t etc. (fixed-width types)
- Also removes all references to boost/cstdint.hpp and replaces it with stdint.h (The 'correct' replacement would be <cstdint>, but not all of our compilers support that).
Diffstat (limited to 'host/lib/rfnoc')
-rw-r--r--host/lib/rfnoc/block_ctrl_base.cpp34
-rw-r--r--host/lib/rfnoc/block_ctrl_base_factory.cpp4
-rw-r--r--host/lib/rfnoc/blockdef_xml_impl.cpp12
-rw-r--r--host/lib/rfnoc/ctrl_iface.cpp48
-rw-r--r--host/lib/rfnoc/ctrl_iface.hpp4
-rw-r--r--host/lib/rfnoc/dma_fifo_block_ctrl_impl.cpp8
-rw-r--r--host/lib/rfnoc/nocscript/block_iface.cpp2
-rw-r--r--host/lib/rfnoc/radio_ctrl_impl.cpp30
-rw-r--r--host/lib/rfnoc/radio_ctrl_impl.hpp2
-rw-r--r--host/lib/rfnoc/sink_block_ctrl_base.cpp4
-rw-r--r--host/lib/rfnoc/source_block_ctrl_base.cpp2
-rw-r--r--host/lib/rfnoc/wb_iface_adapter.cpp6
-rw-r--r--host/lib/rfnoc/wb_iface_adapter.hpp12
13 files changed, 84 insertions, 84 deletions
diff --git a/host/lib/rfnoc/block_ctrl_base.cpp b/host/lib/rfnoc/block_ctrl_base.cpp
index 21bd32a1c..c273fa76b 100644
--- a/host/lib/rfnoc/block_ctrl_base.cpp
+++ b/host/lib/rfnoc/block_ctrl_base.cpp
@@ -39,8 +39,8 @@ using std::string;
* Helpers
**********************************************************************/
//! Convert register to a peek/poke compatible address
-inline boost::uint32_t _sr_to_addr(boost::uint32_t reg) { return reg * 4; };
-inline boost::uint32_t _sr_to_addr64(boost::uint32_t reg) { return reg * 8; }; // for peek64
+inline uint32_t _sr_to_addr(uint32_t reg) { return reg * 4; };
+inline uint32_t _sr_to_addr64(uint32_t reg) { return reg * 8; }; // for peek64
/***********************************************************************
* Structors
@@ -56,7 +56,7 @@ block_ctrl_base::block_ctrl_base(
/*** Identify this block (NoC-ID, block-ID, and block definition) *******/
// Read NoC-ID (name is passed in through make_args):
- boost::uint64_t noc_id = sr_read64(SR_READBACK_REG_ID);
+ uint64_t noc_id = sr_read64(SR_READBACK_REG_ID);
_block_def = blockdef::make_from_noc_id(noc_id);
if (_block_def) UHD_BLOCK_LOG() << "Found valid blockdef" << std::endl;
if (not _block_def)
@@ -74,7 +74,7 @@ block_ctrl_base::block_ctrl_base(
/*** Initialize property tree *******************************************/
_root_path = "xbar/" + _block_id.get_local();
- _tree->create<boost::uint64_t>(_root_path / "noc_id").set(noc_id);
+ _tree->create<uint64_t>(_root_path / "noc_id").set(noc_id);
/*** Reset block state *******************************************/
clear();
@@ -224,7 +224,7 @@ std::vector<size_t> block_ctrl_base::get_ctrl_ports() const
return ctrl_ports;
}
-void block_ctrl_base::sr_write(const boost::uint32_t reg, const boost::uint32_t data, const size_t port)
+void block_ctrl_base::sr_write(const uint32_t reg, const uint32_t data, const size_t port)
{
//UHD_BLOCK_LOG() << " ";
//UHD_RFNOC_BLOCK_TRACE() << boost::format("sr_write(%d, %08X, %d)") % reg % data % port << std::endl;
@@ -239,9 +239,9 @@ void block_ctrl_base::sr_write(const boost::uint32_t reg, const boost::uint32_t
}
}
-void block_ctrl_base::sr_write(const std::string &reg, const boost::uint32_t data, const size_t port)
+void block_ctrl_base::sr_write(const std::string &reg, const uint32_t data, const size_t port)
{
- boost::uint32_t reg_addr = 255;
+ uint32_t reg_addr = 255;
if (DEFAULT_NAMED_SR.has_key(reg)) {
reg_addr = DEFAULT_NAMED_SR[reg];
} else {
@@ -251,14 +251,14 @@ void block_ctrl_base::sr_write(const std::string &reg, const boost::uint32_t dat
% reg
));
}
- reg_addr = boost::uint32_t(_tree->access<size_t>(_root_path / "registers" / "sr" / reg).get());
+ reg_addr = uint32_t(_tree->access<size_t>(_root_path / "registers" / "sr" / reg).get());
}
UHD_BLOCK_LOG() << " ";
UHD_RFNOC_BLOCK_TRACE() << boost::format("sr_write(%s, %08X) ==> ") % reg % data << std::endl;
return sr_write(reg_addr, data, port);
}
-boost::uint64_t block_ctrl_base::sr_read64(const settingsbus_reg_t reg, const size_t port)
+uint64_t block_ctrl_base::sr_read64(const settingsbus_reg_t reg, const size_t port)
{
if (not _ctrl_ifaces.count(port)) {
throw uhd::key_error(str(boost::format("[%s] sr_read64(): No such port: %d") % get_block_id().get() % port));
@@ -271,7 +271,7 @@ boost::uint64_t block_ctrl_base::sr_read64(const settingsbus_reg_t reg, const si
}
}
-boost::uint32_t block_ctrl_base::sr_read32(const settingsbus_reg_t reg, const size_t port)
+uint32_t block_ctrl_base::sr_read32(const settingsbus_reg_t reg, const size_t port)
{
if (not _ctrl_ifaces.count(port)) {
throw uhd::key_error(str(boost::format("[%s] sr_read32(): No such port: %d") % get_block_id().get() % port));
@@ -284,7 +284,7 @@ boost::uint32_t block_ctrl_base::sr_read32(const settingsbus_reg_t reg, const si
}
}
-boost::uint64_t block_ctrl_base::user_reg_read64(const boost::uint32_t addr, const size_t port)
+uint64_t block_ctrl_base::user_reg_read64(const uint32_t addr, const size_t port)
{
try {
// Set readback register address
@@ -297,7 +297,7 @@ boost::uint64_t block_ctrl_base::user_reg_read64(const boost::uint32_t addr, con
}
}
-boost::uint64_t block_ctrl_base::user_reg_read64(const std::string &reg, const size_t port)
+uint64_t block_ctrl_base::user_reg_read64(const std::string &reg, const size_t port)
{
if (not _tree->exists(_root_path / "registers" / "rb" / reg)) {
throw uhd::key_error(str(
@@ -305,12 +305,12 @@ boost::uint64_t block_ctrl_base::user_reg_read64(const std::string &reg, const s
% reg
));
}
- return user_reg_read64(boost::uint32_t(
+ return user_reg_read64(uint32_t(
_tree->access<size_t>(_root_path / "registers" / "rb" / reg).get()
), port);
}
-boost::uint32_t block_ctrl_base::user_reg_read32(const boost::uint32_t addr, const size_t port)
+uint32_t block_ctrl_base::user_reg_read32(const uint32_t addr, const size_t port)
{
try {
// Set readback register address
@@ -323,7 +323,7 @@ boost::uint32_t block_ctrl_base::user_reg_read32(const boost::uint32_t addr, con
}
}
-boost::uint32_t block_ctrl_base::user_reg_read32(const std::string &reg, const size_t port)
+uint32_t block_ctrl_base::user_reg_read32(const std::string &reg, const size_t port)
{
if (not _tree->exists(_root_path / "registers" / "rb" / reg)) {
throw uhd::key_error(str(
@@ -331,7 +331,7 @@ boost::uint32_t block_ctrl_base::user_reg_read32(const std::string &reg, const s
% reg
));
}
- return user_reg_read32(boost::uint32_t(
+ return user_reg_read32(uint32_t(
_tree->access<size_t>(_root_path / "registers" / "sr" / reg).get()
), port);
}
@@ -420,7 +420,7 @@ void block_ctrl_base::clear(const size_t /* port */)
}
}
-boost::uint32_t block_ctrl_base::get_address(size_t block_port) {
+uint32_t block_ctrl_base::get_address(size_t block_port) {
UHD_ASSERT_THROW(block_port < 16);
return (_base_address & 0xFFF0) | (block_port & 0xF);
}
diff --git a/host/lib/rfnoc/block_ctrl_base_factory.cpp b/host/lib/rfnoc/block_ctrl_base_factory.cpp
index aab2ed475..0e2d5ae03 100644
--- a/host/lib/rfnoc/block_ctrl_base_factory.cpp
+++ b/host/lib/rfnoc/block_ctrl_base_factory.cpp
@@ -45,7 +45,7 @@ void block_ctrl_base::register_block(
/*! Look up names for blocks in XML files using NoC ID.
*/
-static void lookup_block_key(boost::uint64_t noc_id, make_args_t &make_args)
+static void lookup_block_key(uint64_t noc_id, make_args_t &make_args)
{
try {
blockdef::sptr bd = blockdef::make_from_noc_id(noc_id);
@@ -69,7 +69,7 @@ static void lookup_block_key(boost::uint64_t noc_id, make_args_t &make_args)
block_ctrl_base::sptr block_ctrl_base::make(
const make_args_t &make_args_,
- boost::uint64_t noc_id
+ uint64_t noc_id
) {
UHD_FACTORY_LOG() << "[RFNoC Factory] block_ctrl_base::make() " << std::endl;
make_args_t make_args = make_args_;
diff --git a/host/lib/rfnoc/blockdef_xml_impl.cpp b/host/lib/rfnoc/blockdef_xml_impl.cpp
index 5ff69d512..3de3a0ba0 100644
--- a/host/lib/rfnoc/blockdef_xml_impl.cpp
+++ b/host/lib/rfnoc/blockdef_xml_impl.cpp
@@ -192,7 +192,7 @@ public:
}
//! Matches a NoC ID through substring matching
- static bool match_noc_id(const std::string &lhs_, boost::uint64_t rhs_)
+ static bool match_noc_id(const std::string &lhs_, uint64_t rhs_)
{
// Sanitize input: Make both values strings with all uppercase
// characters and no leading 0x. Check inputs are valid.
@@ -213,7 +213,7 @@ public:
}
//! Open the file at filename and see if it's a block definition for the given NoC ID
- static bool has_noc_id(boost::uint64_t noc_id, const fs::path &filename)
+ static bool has_noc_id(uint64_t noc_id, const fs::path &filename)
{
pt::ptree propt;
try {
@@ -230,7 +230,7 @@ public:
return false;
}
- blockdef_xml_impl(const fs::path &filename, boost::uint64_t noc_id, xml_repr_t type=DESCRIBES_BLOCK) :
+ blockdef_xml_impl(const fs::path &filename, uint64_t noc_id, xml_repr_t type=DESCRIBES_BLOCK) :
_type(type),
_noc_id(noc_id)
{
@@ -282,7 +282,7 @@ public:
return _pt.get<std::string>("nocblock.blockname");
}
- boost::uint64_t noc_id() const
+ uint64_t noc_id() const
{
return _noc_id;
}
@@ -405,7 +405,7 @@ private:
//! Tells us if is this for a NoC block, or a component.
const xml_repr_t _type;
//! The NoC-ID as reported (there may be several valid NoC IDs, this is the one used)
- const boost::uint64_t _noc_id;
+ const uint64_t _noc_id;
//! This is a boost property tree, not the same as
// our property tree.
@@ -413,7 +413,7 @@ private:
};
-blockdef::sptr blockdef::make_from_noc_id(boost::uint64_t noc_id)
+blockdef::sptr blockdef::make_from_noc_id(uint64_t noc_id)
{
std::vector<fs::path> paths = blockdef_xml_impl::get_xml_paths();
// Iterate over all paths
diff --git a/host/lib/rfnoc/ctrl_iface.cpp b/host/lib/rfnoc/ctrl_iface.cpp
index 83c3a2626..b2ac1778e 100644
--- a/host/lib/rfnoc/ctrl_iface.cpp
+++ b/host/lib/rfnoc/ctrl_iface.cpp
@@ -50,7 +50,7 @@ public:
ctrl_iface_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),
@@ -83,24 +83,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(_rb_address, 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(_rb_address, addr/8);
@@ -134,26 +134,26 @@ private:
// This is the buffer type for response messages
struct resp_buff_type
{
- boost::uint32_t data[8];
+ uint32_t data[8];
};
/*******************************************************************
* Primary control and interaction private methods
******************************************************************/
- inline void send_pkt(const boost::uint32_t addr, const boost::uint32_t data = 0)
+ 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;
@@ -175,12 +175,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))
{
@@ -193,7 +193,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
@@ -209,8 +209,8 @@ private:
{
throw uhd::io_error(str(boost::format("Block 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
@@ -238,7 +238,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
@@ -266,7 +266,7 @@ private:
try
{
UHD_ASSERT_THROW(packet_info.has_sid);
- if (packet_info.sid != boost::uint32_t((_sid >> 16) | (_sid << 16))) {
+ if (packet_info.sid != uint32_t((_sid >> 16) | (_sid << 16))) {
throw uhd::io_error(
str(
boost::format("Expected SID: %s Received SID: %s")
@@ -297,8 +297,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);
}
}
@@ -316,7 +316,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);
@@ -330,7 +330,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));
@@ -348,7 +348,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;
@@ -367,7 +367,7 @@ ctrl_iface::sptr ctrl_iface::make(
const bool big_endian,
zero_copy_if::sptr ctrl_xport,
zero_copy_if::sptr resp_xport,
- const boost::uint32_t sid,
+ const uint32_t sid,
const std::string &name
) {
return sptr(new ctrl_iface_impl(
diff --git a/host/lib/rfnoc/ctrl_iface.hpp b/host/lib/rfnoc/ctrl_iface.hpp
index 4141b6583..3690874f9 100644
--- a/host/lib/rfnoc/ctrl_iface.hpp
+++ b/host/lib/rfnoc/ctrl_iface.hpp
@@ -43,7 +43,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"
);
@@ -51,7 +51,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/rfnoc/dma_fifo_block_ctrl_impl.cpp b/host/lib/rfnoc/dma_fifo_block_ctrl_impl.cpp
index 5f476074b..aea7c591c 100644
--- a/host/lib/rfnoc/dma_fifo_block_ctrl_impl.cpp
+++ b/host/lib/rfnoc/dma_fifo_block_ctrl_impl.cpp
@@ -42,18 +42,18 @@ public:
_perifs[i].ctrl = boost::make_shared<wb_iface_adapter>(
// poke32 functor
boost::bind(
- static_cast< void (block_ctrl_base::*)(const boost::uint32_t, const boost::uint32_t, const size_t) >(&block_ctrl_base::sr_write),
+ static_cast< void (block_ctrl_base::*)(const uint32_t, const uint32_t, const size_t) >(&block_ctrl_base::sr_write),
this, _1, _2, i
),
// peek32 functor
boost::bind(
- static_cast< boost::uint32_t (block_ctrl_base::*)(const boost::uint32_t, const size_t) >(&block_ctrl_base::user_reg_read32),
+ static_cast< uint32_t (block_ctrl_base::*)(const uint32_t, const size_t) >(&block_ctrl_base::user_reg_read32),
this,
_1, i
),
// peek64 functor
boost::bind(
- static_cast< boost::uint64_t (block_ctrl_base::*)(const boost::uint32_t, const size_t) >(&block_ctrl_base::user_reg_read64),
+ static_cast< uint64_t (block_ctrl_base::*)(const uint32_t, const size_t) >(&block_ctrl_base::user_reg_read64),
this,
_1, i
)
@@ -66,7 +66,7 @@ public:
_perifs[i].core->resize(_perifs[i].base_addr, _perifs[i].depth);
UHD_MSG(status) << boost::format("[DMA FIFO] Running BIST for FIFO %d... ") % i;
if (_perifs[i].core->ext_bist_supported()) {
- boost::uint32_t bisterr = _perifs[i].core->run_bist();
+ uint32_t bisterr = _perifs[i].core->run_bist();
if (bisterr != 0) {
throw uhd::runtime_error(str(boost::format("BIST failed! (code: %d)\n") % bisterr));
} else {
diff --git a/host/lib/rfnoc/nocscript/block_iface.cpp b/host/lib/rfnoc/nocscript/block_iface.cpp
index 2034d3438..0d301e5bc 100644
--- a/host/lib/rfnoc/nocscript/block_iface.cpp
+++ b/host/lib/rfnoc/nocscript/block_iface.cpp
@@ -140,7 +140,7 @@ void block_iface::run_and_check(const std::string &code, const std::string &erro
expression_literal block_iface::_nocscript__sr_write(expression_container::expr_list_type args)
{
const std::string reg_name = args[0]->eval().get_string();
- const boost::uint32_t reg_val = boost::uint32_t(args[1]->eval().get_int());
+ const uint32_t reg_val = uint32_t(args[1]->eval().get_int());
bool result = true;
try {
UHD_NOCSCRIPT_LOG() << "[NocScript] Executing SR_WRITE() " << std::endl;
diff --git a/host/lib/rfnoc/radio_ctrl_impl.cpp b/host/lib/rfnoc/radio_ctrl_impl.cpp
index 1cc7a2472..43e5cb7fc 100644
--- a/host/lib/rfnoc/radio_ctrl_impl.cpp
+++ b/host/lib/rfnoc/radio_ctrl_impl.cpp
@@ -58,18 +58,18 @@ radio_ctrl_impl::radio_ctrl_impl() :
_perifs[i].ctrl = boost::make_shared<wb_iface_adapter>(
// poke32 functor
boost::bind(
- static_cast< void (block_ctrl_base::*)(const boost::uint32_t, const boost::uint32_t, const size_t) >(&block_ctrl_base::sr_write),
+ static_cast< void (block_ctrl_base::*)(const uint32_t, const uint32_t, const size_t) >(&block_ctrl_base::sr_write),
this, _1, _2, i
),
// peek32 functor
boost::bind(
- static_cast< boost::uint32_t (block_ctrl_base::*)(const boost::uint32_t, const size_t) >(&block_ctrl_base::user_reg_read32),
+ static_cast< uint32_t (block_ctrl_base::*)(const uint32_t, const size_t) >(&block_ctrl_base::user_reg_read32),
this,
_1, i
),
// peek64 functor
boost::bind(
- static_cast< boost::uint64_t (block_ctrl_base::*)(const boost::uint32_t, const size_t) >(&block_ctrl_base::user_reg_read64),
+ static_cast< uint64_t (block_ctrl_base::*)(const uint32_t, const size_t) >(&block_ctrl_base::user_reg_read64),
this,
_1, i
),
@@ -142,11 +142,11 @@ void radio_ctrl_impl::_register_loopback_self_test(size_t chan)
for (size_t i = 0; i < 100; i++)
{
boost::hash_combine(hash, i);
- sr_write(regs::TEST, boost::uint32_t(hash), chan);
- boost::uint32_t result = user_reg_read32(regs::RB_TEST, chan);
- if (result != boost::uint32_t(hash)) {
+ sr_write(regs::TEST, uint32_t(hash), chan);
+ uint32_t result = user_reg_read32(regs::RB_TEST, chan);
+ if (result != uint32_t(hash)) {
UHD_MSG(status) << "fail" << std::endl;
- UHD_MSG(status) << boost::format("expected: %x result: %x") % boost::uint32_t(hash) % result << std::endl;
+ UHD_MSG(status) << boost::format("expected: %x result: %x") % uint32_t(hash) % result << std::endl;
return; // exit on any failure
}
}
@@ -265,18 +265,18 @@ void radio_ctrl_impl::issue_stream_cmd(const uhd::stream_cmd_t &stream_cmd, cons
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
- const boost::uint64_t ticks = (stream_cmd.stream_now)? 0 : stream_cmd.time_spec.to_ticks(get_rate());
+ const uint64_t ticks = (stream_cmd.stream_now)? 0 : stream_cmd.time_spec.to_ticks(get_rate());
sr_write(regs::RX_CTRL_CMD, cmd_word, chan);
- sr_write(regs::RX_CTRL_TIME_HI, boost::uint32_t(ticks >> 32), chan);
- sr_write(regs::RX_CTRL_TIME_LO, boost::uint32_t(ticks >> 0), chan); //latches the command
+ sr_write(regs::RX_CTRL_TIME_HI, uint32_t(ticks >> 32), chan);
+ sr_write(regs::RX_CTRL_TIME_LO, uint32_t(ticks >> 0), chan); //latches the command
}
std::vector<size_t> radio_ctrl_impl::get_active_rx_ports()
diff --git a/host/lib/rfnoc/radio_ctrl_impl.hpp b/host/lib/rfnoc/radio_ctrl_impl.hpp
index 881cce3b4..d6b402120 100644
--- a/host/lib/rfnoc/radio_ctrl_impl.hpp
+++ b/host/lib/rfnoc/radio_ctrl_impl.hpp
@@ -98,7 +98,7 @@ protected: // TODO see what's protected and what's private
* Registers
**********************************************************************/
struct regs {
- static inline boost::uint32_t sr_addr(const boost::uint32_t offset)
+ static inline uint32_t sr_addr(const uint32_t offset)
{
return offset * 4;
}
diff --git a/host/lib/rfnoc/sink_block_ctrl_base.cpp b/host/lib/rfnoc/sink_block_ctrl_base.cpp
index e4107c0b8..55d502ede 100644
--- a/host/lib/rfnoc/sink_block_ctrl_base.cpp
+++ b/host/lib/rfnoc/sink_block_ctrl_base.cpp
@@ -67,13 +67,13 @@ void sink_block_ctrl_base::configure_flow_control_in(
size_t block_port
) {
UHD_RFNOC_BLOCK_TRACE() << boost::format("sink_block_ctrl_base::configure_flow_control_in(cycles=%d, packets=%d)") % cycles % packets << std::endl;
- boost::uint32_t cycles_word = 0;
+ uint32_t cycles_word = 0;
if (cycles) {
cycles_word = (1<<31) | cycles;
}
sr_write(SR_FLOW_CTRL_CYCS_PER_ACK, cycles_word, block_port);
- boost::uint32_t packets_word = 0;
+ uint32_t packets_word = 0;
if (packets) {
packets_word = (1<<31) | packets;
}
diff --git a/host/lib/rfnoc/source_block_ctrl_base.cpp b/host/lib/rfnoc/source_block_ctrl_base.cpp
index 72845ad64..94e271541 100644
--- a/host/lib/rfnoc/source_block_ctrl_base.cpp
+++ b/host/lib/rfnoc/source_block_ctrl_base.cpp
@@ -74,7 +74,7 @@ std::vector<size_t> source_block_ctrl_base::get_output_ports() const
* FPGA Configuration
**********************************************************************/
void source_block_ctrl_base::set_destination(
- boost::uint32_t next_address,
+ uint32_t next_address,
size_t output_block_port
) {
UHD_RFNOC_BLOCK_TRACE() << "source_block_ctrl_base::set_destination() " << uhd::sid_t(next_address) << std::endl;
diff --git a/host/lib/rfnoc/wb_iface_adapter.cpp b/host/lib/rfnoc/wb_iface_adapter.cpp
index 6688fe86b..c2de754b2 100644
--- a/host/lib/rfnoc/wb_iface_adapter.cpp
+++ b/host/lib/rfnoc/wb_iface_adapter.cpp
@@ -45,17 +45,17 @@ wb_iface_adapter::wb_iface_adapter(
// nop
}
-void wb_iface_adapter::poke32(const wb_addr_type addr, const boost::uint32_t data)
+void wb_iface_adapter::poke32(const wb_addr_type addr, const uint32_t data)
{
poke32_functor(addr / 4, data); // FIXME remove the requirement for /4
}
-boost::uint32_t wb_iface_adapter::peek32(const wb_addr_type addr)
+uint32_t wb_iface_adapter::peek32(const wb_addr_type addr)
{
return peek32_functor(addr);
}
-boost::uint64_t wb_iface_adapter::peek64(const wb_addr_type addr)
+uint64_t wb_iface_adapter::peek64(const wb_addr_type addr)
{
return peek64_functor(addr);
}
diff --git a/host/lib/rfnoc/wb_iface_adapter.hpp b/host/lib/rfnoc/wb_iface_adapter.hpp
index 04623d203..d83bf9427 100644
--- a/host/lib/rfnoc/wb_iface_adapter.hpp
+++ b/host/lib/rfnoc/wb_iface_adapter.hpp
@@ -29,9 +29,9 @@ class UHD_API wb_iface_adapter : public uhd::timed_wb_iface
{
public:
typedef boost::shared_ptr<wb_iface_adapter> sptr;
- typedef boost::function<void(wb_addr_type, boost::uint32_t)> poke32_type;
- typedef boost::function<boost::uint32_t(wb_addr_type)> peek32_type;
- typedef boost::function<boost::uint64_t(wb_addr_type)> peek64_type;
+ typedef boost::function<void(wb_addr_type, uint32_t)> poke32_type;
+ typedef boost::function<uint32_t(wb_addr_type)> peek32_type;
+ typedef boost::function<uint64_t(wb_addr_type)> peek64_type;
typedef boost::function<time_spec_t(void)> gettime_type;
typedef boost::function<void(const time_spec_t&)> settime_type;
@@ -51,9 +51,9 @@ public:
virtual ~wb_iface_adapter(void) {};
- virtual void poke32(const wb_addr_type addr, const boost::uint32_t data);
- virtual boost::uint32_t peek32(const wb_addr_type addr);
- virtual boost::uint64_t peek64(const wb_addr_type addr);
+ virtual void poke32(const wb_addr_type addr, const uint32_t data);
+ virtual uint32_t peek32(const wb_addr_type addr);
+ virtual uint64_t peek64(const wb_addr_type addr);
virtual time_spec_t get_time(void);
virtual void set_time(const time_spec_t& t);