From 5e7c0e61a8014535611ff7083e45e7a63d40c6d8 Mon Sep 17 00:00:00 2001 From: ettus Date: Wed, 2 Sep 2020 11:26:42 -0500 Subject: rfnoc: replay: Add support for 32-bit memory address widths Increases the supported memory sizes in software to 2^32 and beyond. Signed-off-by: mattprost --- host/lib/rfnoc/replay_block_control.cpp | 2 +- host/tests/rfnoc_block_tests/replay_block_test.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'host') diff --git a/host/lib/rfnoc/replay_block_control.cpp b/host/lib/rfnoc/replay_block_control.cpp index 6067650e0..a2b45f575 100644 --- a/host/lib/rfnoc/replay_block_control.cpp +++ b/host/lib/rfnoc/replay_block_control.cpp @@ -77,7 +77,7 @@ public: _fpga_compat(_replay_reg_iface.peek32(REG_COMPAT_ADDR)), _word_size( uint16_t((_replay_reg_iface.peek32(REG_MEM_SIZE_ADDR) >> 16) & 0xFFFF) / 8), - _mem_size(uint64_t(1 << (_replay_reg_iface.peek32(REG_MEM_SIZE_ADDR) & 0xFFFF))) + _mem_size(uint64_t(1ULL << (_replay_reg_iface.peek32(REG_MEM_SIZE_ADDR) & 0xFFFF))) { UHD_ASSERT_THROW(get_num_input_ports() == get_num_output_ports()); uhd::assert_fpga_compat(MAJOR_COMPAT, diff --git a/host/tests/rfnoc_block_tests/replay_block_test.cpp b/host/tests/rfnoc_block_tests/replay_block_test.cpp index 4e4e7847d..f84b98ac8 100644 --- a/host/tests/rfnoc_block_tests/replay_block_test.cpp +++ b/host/tests/rfnoc_block_tests/replay_block_test.cpp @@ -73,8 +73,8 @@ struct replay_block_fixture : num_channels(4) , num_input_ports(num_channels) , num_output_ports(num_channels) - , mem_addr_size(20) - , max_buffer_size(1 << mem_addr_size) + , mem_addr_size(32) + , max_buffer_size(1ULL << mem_addr_size) , default_item_size(4) , word_size(8) , reg_iface(std::make_shared( -- cgit v1.2.3