aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/rfnoc/ctrl_iface.cpp
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2019-03-20 16:08:45 -0700
committerMartin Braun <martin.braun@ettus.com>2019-09-04 20:28:04 -0700
commit46c0e95a86f06a0ebed51afe10af53f2faa31c07 (patch)
tree227aaad109b35c6b68e95530ca699935a2cde523 /host/lib/rfnoc/ctrl_iface.cpp
parent94592641f0647563bc4d2163805d5284a6796273 (diff)
downloaduhd-46c0e95a86f06a0ebed51afe10af53f2faa31c07.tar.gz
uhd-46c0e95a86f06a0ebed51afe10af53f2faa31c07.tar.bz2
uhd-46c0e95a86f06a0ebed51afe10af53f2faa31c07.zip
rfnoc: Read cmd FIFO size from blocks & configure ctrl_iface
This requires noc_shell compat number 6.0. It will allow sending as many command packets, but no more, than there is space. Updated FPGA images for devices: - X310/X300 - N300/N310/N320 - E310/E320
Diffstat (limited to 'host/lib/rfnoc/ctrl_iface.cpp')
-rw-r--r--host/lib/rfnoc/ctrl_iface.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/host/lib/rfnoc/ctrl_iface.cpp b/host/lib/rfnoc/ctrl_iface.cpp
index 377808eef..ee2a78df3 100644
--- a/host/lib/rfnoc/ctrl_iface.cpp
+++ b/host/lib/rfnoc/ctrl_iface.cpp
@@ -66,6 +66,15 @@ public:
readback, bool(timestamp != 0) ? MASSIVE_TIMEOUT : ACK_TIMEOUT);
}
+ void set_cmd_fifo_size(const size_t num_lines)
+ {
+ _max_outstanding_acks =
+ std::min(num_lines / 3, _xports.recv->get_num_recv_frames());
+ UHD_LOG_TRACE("RFNOC",
+ "[ctrl_iface " << _name << "] Changed cmd FIFO size to "
+ << _max_outstanding_acks);
+ }
+
private:
// This is the buffer type for response messages
struct resp_buff_type
@@ -216,7 +225,7 @@ private:
const std::string _name;
size_t _seq_out;
std::queue<size_t> _outstanding_seqs;
- const size_t _max_outstanding_acks;
+ size_t _max_outstanding_acks;
boost::mutex _mutex;
};