Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use enable_rx_timestamps()? #819

Closed
tomwts opened this issue Dec 5, 2024 · 3 comments
Closed

How to use enable_rx_timestamps()? #819

tomwts opened this issue Dec 5, 2024 · 3 comments

Comments

@tomwts
Copy link

tomwts commented Dec 5, 2024

I want Tx radio begins transmitting about 1/4 sec after Rx radio starts streaming samples to DDC and dmaFIFO to simulate a RF path delay. After enable_rx_timestamps() is added to my app, the Tx radio block no longer sends data. Instead, I got a bunch of "L" errors printed on the console. I thought by setting a 1/4 sec delay in the issue_stream_cmd(), it would be sufficient to cause the received samples saved in the FIFO until Tx radio is unblocked, but it didn't work.

Some of the UHD 4.7 release example app like rfnoc_radio_loopback has rx-timestamps command line option, but enabling it resulted in getting numerous "L" errors and the Tx radio block couldn't send any data.

How enable_rx_timestamps() works and how to use it properly?

Thanks,

@mbr0wn
Copy link
Contributor

mbr0wn commented Dec 13, 2024

@tomwts The Rx radio puts the receive time as timestamps on the packets, but the Tx radio will interpret timestamps as a request to transmit a sample at that time. So if timestamps are enabled, by definition, you will always have lates (and late packets aren't transmitted). Honestly I am pondering removing --rx-timestamps from rfnoc_radio_loopback, as you always have to leave it off for that example.

What you want/need is a block that adds 250ms worth of time to the timestamps, but we don't have that in UHD.
So the answer to your question is "you always turn off timestamps unless you have a way to modify timestamps in-flight".

I'm going to close this issue, but I acknowledge that while I've answered the question, I haven't helped you solve the 250ms delay. Please open a feature request if you think you want to.

@mbr0wn mbr0wn closed this as completed Dec 13, 2024
@tomwts
Copy link
Author

tomwts commented Dec 16, 2024

@mbr0wn Hi Martin, thanks for your explanation. May I ask you a couple of questions?
I have been working on a custom Tx radio block that can handle delayed sample packets. Is the 64bit timestamp value stored in the sample packet header in Big- or Little-Endian format?

Inside radio_tx_core.v, there are debug function $display calls. How can I enable the debug output in the image build and what tool can be used to collect such FPGA debug output? I appreciate it if you can provide me a link to the related documentation.

Thanks,

@mbr0wn
Copy link
Contributor

mbr0wn commented Dec 19, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants