There are a couple of issues with the replay block example:
- It doesn't work correctly for ports other than the default port because
some function calls have missing "port" args or they are set to zero rather
than using the specified port (see attached patch file with changes).
- It can take a very long time to flush the samples.  Is there any way
around this?  Note that I am using a sample rate of 12.5 MS/s and it takes
several seconds (perhaps up to 10) to flush.  I am not certain how
consistent the time is.

Rob
diff --git a/host/examples/replay_samples_from_file.cpp b/host/examples/replay_samples_from_file.cpp
index 70c0272..f9ef3cd 100644
--- a/host/examples/replay_samples_from_file.cpp
+++ b/host/examples/replay_samples_from_file.cpp
@@ -344,7 +344,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[])
 
     stream_cmd.stream_mode = uhd::stream_cmd_t::STREAM_MODE_STOP_CONTINUOUS;
     cout << endl << "Stopping replay..." << endl;
-    replay_ctrl->issue_stream_cmd(stream_cmd);
+    replay_ctrl->issue_stream_cmd(stream_cmd, replay_chan);
 
 
     ///////////////////////////////////////////////////////////////////////////
@@ -353,10 +353,10 @@ int UHD_SAFE_MAIN(int argc, char *argv[])
     uint16_t prev_packet_count, packet_count;
 
     cout << "Waiting for replay data to flush... ";
-    prev_packet_count = replay_ctrl->sr_read64(uhd::rfnoc::SR_READBACK_REG_GLOBAL_PARAMS, 0) >> 32;
+    prev_packet_count = replay_ctrl->sr_read64(uhd::rfnoc::SR_READBACK_REG_GLOBAL_PARAMS, replay_chan) >> 32;
     while(true) {
         std::this_thread::sleep_for(std::chrono::milliseconds(100));
-        packet_count = replay_ctrl->sr_read64(uhd::rfnoc::SR_READBACK_REG_GLOBAL_PARAMS, 0) >> 32;
+        packet_count = replay_ctrl->sr_read64(uhd::rfnoc::SR_READBACK_REG_GLOBAL_PARAMS, replay_chan) >> 32;
         if (packet_count == prev_packet_count) break;
         prev_packet_count = packet_count;
     }
_______________________________________________
USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com

Reply via email to