Current read pointer register?

Placement, modules, components and accessories; the ones that exist and the the nice-to-be's
Post Reply
wa4557
Posts: 7
Joined: Thu Oct 23, 2014 9:57 pm

Current read pointer register?

Post by wa4557 » Mon Nov 10, 2014 2:45 pm

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

wa4557
Posts: 7
Joined: Thu Oct 23, 2014 9:57 pm

Re: Current read pointer register?

Post by wa4557 » Mon Nov 10, 2014 3:30 pm

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...

Nils Roos
Posts: 1441
Joined: Sat Jun 07, 2014 12:49 pm
Location: Königswinter

Re: Current read pointer register?

Post by Nils Roos » Mon Nov 10, 2014 10:16 pm

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).
That is correct.
monitor 0x40200014, however gives zero all the time. Am I understanding this register correctly? Am I doing something wrong?
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.
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
And finally: Is there a documenation on these registers (apart from the .odt file of course)
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.

Nils Roos
Posts: 1441
Joined: Sat Jun 07, 2014 12:49 pm
Location: Königswinter

Re: Current read pointer register?

Post by Nils Roos » Mon Nov 10, 2014 10:31 pm

Is it really necessary that any external triggers areseparated by 500µs?
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.
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...
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.

wa4557
Posts: 7
Joined: Thu Oct 23, 2014 9:57 pm

Re: Current read pointer register?

Post by wa4557 » Mon Nov 10, 2014 10:44 pm

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!

ThomasGobmaier
Posts: 6
Joined: Tue Mar 01, 2016 6:56 pm

Re: Current read pointer register?

Post by ThomasGobmaier » Sat Dec 17, 2022 1:41 am

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.

Code: Select all

redpitaya> generate 1 0.5 10000 tri
redpitaya> monitor 0x40200014
0x00000000
redpitaya> monitor 0x40200014
0x00000000
With the code in \Test\generate\generate.cpp the same.

Did something change from the last post until now?

juretrn
Posts: 104
Joined: Tue Nov 16, 2021 11:38 am

Re: Current read pointer register?

Post by juretrn » Mon Dec 19, 2022 8:58 am

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.

ThomasGobmaier
Posts: 6
Joined: Tue Mar 01, 2016 6:56 pm

Re: Current read pointer register?

Post by ThomasGobmaier » Mon Dec 19, 2022 9:56 am

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

juretrn
Posts: 104
Joined: Tue Nov 16, 2021 11:38 am

Re: Current read pointer register?

Post by juretrn » Mon Dec 19, 2022 10:31 am

Please see my answer here:
(it's an isue with the docs)
https://github.com/RedPitaya/RedPitaya- ... 1357354821

ThomasGobmaier
Posts: 6
Joined: Tue Mar 01, 2016 6:56 pm

Re: Current read pointer register?

Post by ThomasGobmaier » Mon Dec 19, 2022 10:48 am

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 0x0x40200060
[edit: the former written address 0x40200260 was a spelling error]

To read channel B:
monitor 0x0x40200064

Post Reply
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 19 guests