From d5c6e34bd3a9e63bfe661e2d8b38ceb85c4d6d18 Mon Sep 17 00:00:00 2001 From: Trung N Tran Date: Thu, 13 Jul 2017 14:01:33 -0700 Subject: 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. --- host/lib/rfnoc/block_ctrl_base.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'host/lib') 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(_root_path / "input_buffer_size" / ctrl_port).set(buf_size_bytes); } -- cgit v1.2.3