diff options
author | Wade Fife <wade.fife@ettus.com> | 2018-11-08 11:34:08 -0600 |
---|---|---|
committer | Brent Stapleton <bstapleton@g.hmc.edu> | 2018-11-27 16:58:50 -0800 |
commit | 9b700550c26932ffeacdfc935c8ad92c0489d4a0 (patch) | |
tree | 9e3f3b2f04ecb223eb57ad0fc22b9babc697cfbe | |
parent | 85665ac5a73147cf2784af96c7c0bce0ac2eb114 (diff) | |
download | uhd-9b700550c26932ffeacdfc935c8ad92c0489d4a0.tar.gz uhd-9b700550c26932ffeacdfc935c8ad92c0489d4a0.tar.bz2 uhd-9b700550c26932ffeacdfc935c8ad92c0489d4a0.zip |
rfnoc: Fix default SPP for replay
Consolidate two constants for default replay packet size down to one.
-rw-r--r-- | host/lib/rfnoc/replay_block_ctrl_impl.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/host/lib/rfnoc/replay_block_ctrl_impl.cpp b/host/lib/rfnoc/replay_block_ctrl_impl.cpp index a78632bf9..3809cebc0 100644 --- a/host/lib/rfnoc/replay_block_ctrl_impl.cpp +++ b/host/lib/rfnoc/replay_block_ctrl_impl.cpp @@ -17,7 +17,6 @@ public: static const uint32_t REPLAY_WORD_SIZE = 8; // In bytes static const uint32_t SAMPLES_PER_WORD = 2; static const uint32_t BYTES_PER_SAMPLE = 4; - static const uint32_t WORDS_PER_PACKET = 128; static const uint32_t DEFAULT_BUFFER_SIZE = 32*1024*1024; static const uint32_t DEFAULT_WPP = 182; static const uint32_t DEFAULT_SPP = DEFAULT_WPP * SAMPLES_PER_WORD; @@ -29,7 +28,7 @@ public: _params.resize(_num_channels); for(size_t chan = 0; chan < _params.size(); chan++) { _params[chan].words_per_packet = DEFAULT_WPP; - sr_write("RX_CTRL_MAXLEN", WORDS_PER_PACKET, chan); + sr_write("RX_CTRL_MAXLEN", DEFAULT_WPP, chan); // Configure replay channels to be adjacent DEFAULT_BUFFER_SIZE'd blocks _params[chan].rec_base_addr = chan*DEFAULT_BUFFER_SIZE; @@ -147,8 +146,8 @@ public: // Calculate how many words to transfer at a time in CONTINUOUS mode uint32_t cont_burst_size = - (_params[chan].play_buffer_size > WORDS_PER_PACKET) ? - WORDS_PER_PACKET : _params[chan].play_buffer_size; + (_params[chan].play_buffer_size > _params[chan].words_per_packet) ? + _params[chan].words_per_packet : _params[chan].play_buffer_size; // Calculate the number of words to transfer in NUM_SAMPS mode uint32_t num_words = stream_cmd.num_samps / SAMPLES_PER_WORD; |