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

Buffered acquisition of slow ADC #12

Open
jonschumacher opened this issue Dec 4, 2017 · 11 comments
Open

Buffered acquisition of slow ADC #12

jonschumacher opened this issue Dec 4, 2017 · 11 comments

Comments

@jonschumacher
Copy link
Collaborator

Until now, the synchronous acquisition of the slow ADC values is not possible since they are neither buffered nor timestamped. In order to use them properly, this is an important feature. This thread is for discussing possible solutions.

@tknopp
Copy link
Owner

tknopp commented Dec 4, 2017

yep this would be awesome if we could get this feature working on the FPGA. For me it would be important that the frequency is an exact multiple of 125MHz/decimation of the fast ADC.

Then one could upload a LUT and the values would be updated periodically.

@jonschumacher
Copy link
Collaborator Author

Where would you need a LUT with the ADC? Or do you mean a FIFO/ringbuffer?

@tknopp
Copy link
Owner

tknopp commented Dec 4, 2017

A ring buffer needs to be feed by values. We would need a thread on the CPU for that. Better is that you upload the pattern that should be cyclically applied.

@tknopp
Copy link
Owner

tknopp commented Dec 4, 2017

@jonschumacher
Copy link
Collaborator Author

Well, this is true for the slow DAC but not for the slow ADC/XADC.

@tknopp
Copy link
Owner

tknopp commented Dec 4, 2017

Ahh, I see, sorry for confusing things. Proposal:

  1. Slow ADC: buffer that is periodically filled
  2. Slow DAC: arbitrary waveform buffer is periodically applied.

Does this sound good?

For both we would have to relate the sampling rate to the fast components.

@jonschumacher
Copy link
Collaborator Author

@mgraeser
Copy link
Collaborator

Yes Slow DAC and FastDAC are now synchronous. SlowDac is buffered with a register

@jonschumacher
Copy link
Collaborator Author

Wait, I thought we are talking about the slow ADC here. But this seems to be not completely implemented yet, since here it is commented out.

@jonschumacher jonschumacher reopened this Apr 24, 2020
@mgraeser
Copy link
Collaborator

Ah sorry. ADC I have not changed yet

@tknopp
Copy link
Owner

tknopp commented Apr 24, 2020

Yes, this issue is still open. In Principle we should be able to implement this but we really need to use something like the BRAM and buffer the values there. My feeling is that it should be possible to reach a sampling of about 25kHz with the slow ADCs. What would happen is the the control thread (previously named slow DAC thread) would then not only be responsible for feeding the slow DAC buffer but also the slow ADC buffer.

Implementation wise this all seems not to be so complicated. Just like our new PDM but reversed. Both the PDM and the XADC should either use the BRAM or direct memory. In this post:
http://antonpotocnik.com/?p=514765
Anton talks about the BRAM and how to use that (presumedly he uses the code from Pavel) and in that post he also mentions
If we need more measurement storage we can use Red Pitaya’s on-board 512 MB DDR memory. We will show how to do that in future projects.
So that is something we need to ask him. Maybe we should directly skip the BRAM implementation.

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

No branches or pull requests

3 participants