Current read pointer register?
-
- Posts: 7
- Joined: Thu Oct 23, 2014 9:57 pm
Current read pointer register?
Hey all, I'm trying to program a (relatively fast) arbitrary waveform generator, and in order to do this I want to use the buffer current read pointer.
Is it correct, that this register (0x40200014 for channel A and 0x40200034 for channel B) indicates, where the DAC is currently at playing a pulse. So for my understanding this register should change from 0 to 16k continously when playing a sine wave (or any other wave).
monitor 0x40200014, however gives zero all the time. Am I understanding this register correctly? Am I doing something wrong? And finally: Is there a documenation on these registers (apart from the .odt file of course)
Thanks
Is it correct, that this register (0x40200014 for channel A and 0x40200034 for channel B) indicates, where the DAC is currently at playing a pulse. So for my understanding this register should change from 0 to 16k continously when playing a sine wave (or any other wave).
monitor 0x40200014, however gives zero all the time. Am I understanding this register correctly? Am I doing something wrong? And finally: Is there a documenation on these registers (apart from the .odt file of course)
Thanks
-
- Posts: 7
- Joined: Thu Oct 23, 2014 9:57 pm
Re: Current read pointer register?
One other thing I noticed:
Is it really necessary that any external triggers areseparated by 500µs?
If I want to play pulses for shorter delays than 500µs between two Rising edges, the trigger is ignored !?
Please tell me I'm doing something wrong, a triggering rate of 2kHz is definitely not enough...
Is it really necessary that any external triggers areseparated by 500µs?
If I want to play pulses for shorter delays than 500µs between two Rising edges, the trigger is ignored !?
Please tell me I'm doing something wrong, a triggering rate of 2kHz is definitely not enough...
-
- Posts: 1441
- Joined: Sat Jun 07, 2014 12:49 pm
- Location: Königswinter
Re: Current read pointer register?
That is correct.Is it correct, that this register (0x40200014 for channel A and 0x40200034 for channel B) indicates, where the DAC is currently at playing a pulse. So for my understanding this register should change from 0 to 16k continously when playing a sine wave (or any other wave).
I'd say you are doing something wrong. When I generate a signal and then use the monitor tool to get the current AWG read pointer, it shows different values all the time.monitor 0x40200014, however gives zero all the time. Am I understanding this register correctly? Am I doing something wrong?
Did you start the signal generator on a continuous waveform ? You have to realize that the monitor tool is quite slow compared to the AWG, which always runs at 125MSps. If you do a one-shot waveform with a more than totally tiny step-value, it will be long over before the monitor tool actually reads the pointer.
The following shows some example output from my RedPitaya:
Code: Select all
redpitaya> generate 1 0.5 10000 tri
redpitaya> monitor 0x40200014
0x0000998c
redpitaya> monitor 0x40200014
0x0000f810
redpitaya> monitor 0x40200014
0x000017a4
redpitaya> monitor 0x40200014
0x0000293c
Not that I know of. But if you tell me what more you'd need to know, I'll try to find out from the verilog code.And finally: Is there a documenation on these registers (apart from the .odt file of course)
-
- Posts: 1441
- Joined: Sat Jun 07, 2014 12:49 pm
- Location: Königswinter
Re: Current read pointer register?
I can't say whether it is neccessary or not, but the dead-time of 0.5ms after a trigger event from the external pin is hardcoded into the trigger circuit.Is it really necessary that any external triggers areseparated by 500µs?
You are not doing anything wrong, sorry; but it is not difficult to ease this limitation. If you are not confident about doing it yourself, drop me a note what exactly you need, and I'll see what I can do.If I want to play pulses for shorter delays than 500µs between two Rising edges, the trigger is ignored !?
Please tell me I'm doing something wrong, a triggering rate of 2kHz is definitely not enough...
-
- Posts: 7
- Joined: Thu Oct 23, 2014 9:57 pm
Re: Current read pointer register?
Thanks, I solved both problems:
The first problem was strange: turning the RedPitaya on and off again helped. So a rather simple solution
The dead time after the trigger can be reduced in the FPGA source file, those are just two lines in the code. If anyone else experiences the same problem you can let me know!
I'd really suggest to reduce this dead-time, I see no reason why there is half a millisecond of dead time
Thanks for pointing me in the right direction!
The first problem was strange: turning the RedPitaya on and off again helped. So a rather simple solution

The dead time after the trigger can be reduced in the FPGA source file, those are just two lines in the code. If anyone else experiences the same problem you can let me know!
I'd really suggest to reduce this dead-time, I see no reason why there is half a millisecond of dead time
Thanks for pointing me in the right direction!
-
- Posts: 6
- Joined: Tue Mar 01, 2016 6:56 pm
Re: Current read pointer register?
Hi,
I also get only 0 when reading the read point register.
After power on, I connection with ssh, then set the
generator and ask the monitor.
With the code in \Test\generate\generate.cpp the same.
Did something change from the last post until now?
I also get only 0 when reading the read point register.
After power on, I connection with ssh, then set the
generator and ask the monitor.
Code: Select all
redpitaya> generate 1 0.5 10000 tri
redpitaya> monitor 0x40200014
0x00000000
redpitaya> monitor 0x40200014
0x00000000
Did something change from the last post until now?
-
- Posts: 47
- Joined: Tue Nov 16, 2021 11:38 am
Re: Current read pointer register?
I don't know which functions/code are still relevant from 2014, but you can verify the expected behaviour by running the generator from GUI and seeing what happens to the read pointer there.
-
- Posts: 6
- Joined: Tue Mar 01, 2016 6:56 pm
Re: Current read pointer register?
Thanks for the tip, that got me one step further !
Conclusion: With the latest library fpga_0.94 the read pointer register is always read 0x00,
with the fpga_0.93 it works.
How I found the workaround:
With one Web App it worked ("Oscilloscope & Signal Generator"),
with another it did not work ("Generator & Oscilloscope").
So the difference is the used fpga library:
"Oscilloscope & Signal Generator" in the path
/opt/redpitaya/www/apps/scopegenpro
uses /opt/redpitaya/fpga/fpga_0.94.bit
and "Generator & Oscilloscope" in the path
/opt/redpitaya/www/apps/scope+gen
uses /opt/redpitaya/fpga/fpga_0.93.bit
So trying the different librarys showed the problem.
cat /opt/redpitaya/fpga/fpga_0.93.bit > /dev/xdevcfg
and stopped working with
cat /opt/redpitaya/fpga/fpga_0.94.bit > /dev/xdevcfg
Conclusion: With the latest library fpga_0.94 the read pointer register is always read 0x00,
with the fpga_0.93 it works.
How I found the workaround:
With one Web App it worked ("Oscilloscope & Signal Generator"),
with another it did not work ("Generator & Oscilloscope").
So the difference is the used fpga library:
"Oscilloscope & Signal Generator" in the path
/opt/redpitaya/www/apps/scopegenpro
uses /opt/redpitaya/fpga/fpga_0.94.bit
and "Generator & Oscilloscope" in the path
/opt/redpitaya/www/apps/scope+gen
uses /opt/redpitaya/fpga/fpga_0.93.bit
So trying the different librarys showed the problem.
cat /opt/redpitaya/fpga/fpga_0.93.bit > /dev/xdevcfg
and stopped working with
cat /opt/redpitaya/fpga/fpga_0.94.bit > /dev/xdevcfg
-
- Posts: 47
- Joined: Tue Nov 16, 2021 11:38 am
Re: Current read pointer register?
Please see my answer here:
(it's an isue with the docs)
https://github.com/RedPitaya/RedPitaya- ... 1357354821
(it's an isue with the docs)
https://github.com/RedPitaya/RedPitaya- ... 1357354821
-
- Posts: 6
- Joined: Tue Mar 01, 2016 6:56 pm
Re: Current read pointer register?
Thank you for the quick answer on github !
For the forum readers:
The register was moved, so now the channel A read pointer
is 0x60, and channel B is 0x64. The docs will be updated.
To read channel A:
monitor 0x40200260
For the forum readers:
The register was moved, so now the channel A read pointer
is 0x60, and channel B is 0x64. The docs will be updated.
To read channel A:
monitor 0x40200260
jadalnie klasyczne ekskluzywne meble wypoczynkowe do salonu ekskluzywne meble tapicerowane ekskluzywne meble do sypialni ekskluzywne meble włoskie
Who is online
Users browsing this forum: No registered users and 2 guests