diff options
| author | Martin Braun <martin.braun@ettus.com> | 2019-01-16 15:09:52 -0800 | 
|---|---|---|
| committer | Brent Stapleton <brent.stapleton@ettus.com> | 2019-01-17 18:03:42 -0800 | 
| commit | 34e12fb56f18f26b09997504fd2facf16e5b4060 (patch) | |
| tree | 9c5b231d01e62ade41764533bcf075b7b5f5fa4b | |
| parent | 6bd47c969222ee9e5e89cd00ebea9141c215e55c (diff) | |
| download | uhd-34e12fb56f18f26b09997504fd2facf16e5b4060.tar.gz uhd-34e12fb56f18f26b09997504fd2facf16e5b4060.tar.bz2 uhd-34e12fb56f18f26b09997504fd2facf16e5b4060.zip  | |
rfnoc: Fix detection of outstanding acks by ctrl_iface
There was a bug where the number of outstanding ACKS in RFNoC's
ctrl_iface was derived from the number of recv frames, which was wrong.
A number that was too low would effectively break timed commands on
tune, which would, e.g., affect phase alignment.
| -rw-r--r-- | host/include/uhd/rfnoc/constants.hpp | 2 | ||||
| -rw-r--r-- | host/lib/rfnoc/ctrl_iface.cpp | 7 | 
2 files changed, 4 insertions, 5 deletions
diff --git a/host/include/uhd/rfnoc/constants.hpp b/host/include/uhd/rfnoc/constants.hpp index 9d9295809..53a4a01d8 100644 --- a/host/include/uhd/rfnoc/constants.hpp +++ b/host/include/uhd/rfnoc/constants.hpp @@ -82,7 +82,7 @@ static const uint32_t AXIS_CONFIG_BUS =  static const uint32_t AXIS_CONFIG_BUS_TLAST =      AXI_WRAPPER_BASE + 2; // tdata with tvalid & tlast asserted -static const size_t CMD_FIFO_SIZE = 128; // Lines == multiples of 8 bytes +static const size_t CMD_FIFO_SIZE = 256; // Lines == multiples of 8 bytes  // Named settings registers  static const uhd::dict<std::string, uint32_t> DEFAULT_NAMED_SR = diff --git a/host/lib/rfnoc/ctrl_iface.cpp b/host/lib/rfnoc/ctrl_iface.cpp index 0b71aebbb..6204d81f4 100644 --- a/host/lib/rfnoc/ctrl_iface.cpp +++ b/host/lib/rfnoc/ctrl_iface.cpp @@ -25,7 +25,7 @@ using namespace uhd;  using namespace uhd::rfnoc;  using namespace uhd::transport; -static const double ACK_TIMEOUT = 2.0; // supposed to be worst case practical timeout +static const double ACK_TIMEOUT     = 2.0; // supposed to be worst case practical timeout  static const double MASSIVE_TIMEOUT = 10.0; // for when we wait on a timed command  template <uhd::endianness_t _endianness> class ctrl_iface_impl : public ctrl_iface @@ -35,9 +35,8 @@ public:          : _xports(xports)          , _name(name)          , _seq_out(0) -        , _max_outstanding_acks(std::min( -              uhd::rfnoc::CMD_FIFO_SIZE / 3, // Max command packet size is 3 lines -              _xports.recv->get_num_recv_frames())) +        , _max_outstanding_acks( +              uhd::rfnoc::CMD_FIFO_SIZE / 3) // Max command packet size is 3 lines      {          UHD_ASSERT_THROW(bool(_xports.send));          UHD_ASSERT_THROW(bool(_xports.recv));  | 
