diff options
Diffstat (limited to 'host/lib/rfnoc/block_ctrl_base.cpp')
-rw-r--r-- | host/lib/rfnoc/block_ctrl_base.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/host/lib/rfnoc/block_ctrl_base.cpp b/host/lib/rfnoc/block_ctrl_base.cpp index ed8068b5b..e70267b96 100644 --- a/host/lib/rfnoc/block_ctrl_base.cpp +++ b/host/lib/rfnoc/block_ctrl_base.cpp @@ -94,12 +94,16 @@ block_ctrl_base::block_ctrl_base(const make_args_t& make_args) // Set source addresses: sr_write(SR_BLOCK_SID, get_address(ctrl_port), ctrl_port); // Set sink buffer sizes: - settingsbus_reg_t reg = SR_READBACK_REG_FIFOSIZE; - size_t buf_size_bytes = size_t(sr_read64(reg, ctrl_port)); + settingsbus_reg_t reg_fifo = SR_READBACK_REG_FIFOSIZE; + size_t buf_size_bytes = size_t(sr_read64(reg_fifo, 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); + // Set MTU size and convert to bytes: + settingsbus_reg_t reg_mtu = SR_READBACK_REG_MTU; + size_t mtu = 8 * (1 << size_t(sr_read64(reg_mtu, ctrl_port))); + _tree->create<size_t>(_root_path / "mtu" / ctrl_port).set(mtu); // Set default destination SIDs // Otherwise, the default is someone else's SID, which we don't want sr_write(SR_RESP_IN_DST_SID, 0xFFFF, ctrl_port); |