From 46c0e95a86f06a0ebed51afe10af53f2faa31c07 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Wed, 20 Mar 2019 16:08:45 -0700 Subject: 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 --- host/lib/rfnoc/ctrl_iface.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'host/lib/rfnoc/ctrl_iface.cpp') 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 _outstanding_seqs; - const size_t _max_outstanding_acks; + size_t _max_outstanding_acks; boost::mutex _mutex; }; -- cgit v1.2.3