aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/rfnoc
diff options
context:
space:
mode:
authorTrung N Tran <trung.tran@ettus.com>2017-07-13 14:01:33 -0700
committerBrent Stapleton <bstapleton@g.hmc.edu>2018-08-22 14:31:34 -0700
commitd5c6e34bd3a9e63bfe661e2d8b38ceb85c4d6d18 (patch)
tree111cbc296f330a8e944957da46693ceba4e2a36d /host/lib/rfnoc
parent0aede451a2f1006aa67450a7d0a07d18a92be138 (diff)
downloaduhd-d5c6e34bd3a9e63bfe661e2d8b38ceb85c4d6d18.tar.gz
uhd-d5c6e34bd3a9e63bfe661e2d8b38ceb85c4d6d18.tar.bz2
uhd-d5c6e34bd3a9e63bfe661e2d8b38ceb85c4d6d18.zip
RFNoC: Convert SR_READBACK_REG_FIFOSIZE to bytes
Change the RB_FIFOSIZE register to store the FIFO size in bytes instead of log2 of bytes.
Diffstat (limited to 'host/lib/rfnoc')
-rw-r--r--host/lib/rfnoc/block_ctrl_base.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/host/lib/rfnoc/block_ctrl_base.cpp b/host/lib/rfnoc/block_ctrl_base.cpp
index c7884f291..277aedf80 100644
--- a/host/lib/rfnoc/block_ctrl_base.cpp
+++ b/host/lib/rfnoc/block_ctrl_base.cpp
@@ -100,9 +100,7 @@ block_ctrl_base::block_ctrl_base(
sr_write(SR_BLOCK_SID, get_address(ctrl_port), ctrl_port);
// Set sink buffer sizes:
settingsbus_reg_t reg = SR_READBACK_REG_FIFOSIZE;
- uint64_t value = sr_read64(reg, ctrl_port);
- size_t buf_size_log2 = value & 0xFF;
- size_t buf_size_bytes = BYTES_PER_LINE * (1 << buf_size_log2); // Bytes == 8 * 2^x
+ size_t buf_size_bytes = size_t(sr_read64(reg, ctrl_port));
if (buf_size_bytes > 0) n_valid_input_buffers++;
_tree->create<size_t>(_root_path / "input_buffer_size" / ctrl_port).set(buf_size_bytes);
}