Re: [USRP-users] RFNoC Replay block example

2018-11-02 Thread Wade Fife via USRP-users
Rob,

Thanks for the patch! I was looking into that flushing in the example and
it does not seem to occur on X310 but I was able to see a delay on N310.
It's not immediately clear to me why there would be a difference between
products, but I will investigate. 10 seconds seems like more samples than
should be queued up. I assume you're testing on N310?

Thanks,

Wade

On Wed, Oct 31, 2018 at 2:35 PM Rob Kossler via USRP-users <
usrp-users@lists.ettus.com> wrote:

> 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
>
>
>
>
> ___
> USRP-users mailing list
> USRP-users@lists.ettus.com
> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
>
___
USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com


[USRP-users] RFNoC Replay block example

2018-10-31 Thread Rob Kossler via USRP-users
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