Continuously update gen buffer

Applications, development tools, FPGA, C, WEB
Post Reply
Posts: 3
Joined: Mon Sep 30, 2019 8:56 am

Continuously update gen buffer

Post by karlelch » Sat Dec 14, 2019 6:09 pm


I have a fast arbitrary output signal that is larger than the 16k of the generator buffer.
Using the Python API, I tried to update the buffer while the generator is continuously running. I have the input buffer (osc) synchronized with gen - like in the Jupyter notebook exampes. I am using the osc pointer to see which half of the gen buffer is currently used (=where the pointer is) and write the new signal into the other "unused" half. This seems to work - after tweaking the Python API a bit - but when displaying the output on an ocilloscope, I see once in a while that the signal is shifted for a random number of samples by some offset.

The attached GIF illustrates the issue. The cyan trace should show a normal saw tooth. (Ignore the gaps in the traces, they are caused by the capturing of the oscilloscope)

Any idea what causes this?
What are the limitations in accessing the gen buffer while the generator is running?

You do not have the required permissions to view the files attached to this post.

User avatar
Site Admin
Posts: 382
Joined: Wed Mar 26, 2014 7:04 pm

Re: Continuously update gen buffer

Post by redpitaya » Mon Feb 03, 2020 3:52 pm

Since this is low frequency, I think the principle it should work.
I would recommend to start with higher decimation for safety reasons, and first check if you set the buffer only once if the signal is 100% ok and read pointer reading shows
values that makes sense, so that it is circulating around buffer linear.

Then, I would do what you are doing at the moment and try to find out what thing you do causes signal not to be properly generated.

If this is a part where you write to the buffer then I am pretty sure that you are writing to it, at an inappropriate time.
One more thing is to make sure SM wrap pointer (bit20) must be disabled, otherwise it jumps all around the buffer. ... gister-map
This will be seen already from read pointer behaviour.

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 5 guests