Closed SamuelDeleglise closed 4 years ago
I have looked into this. The problem is that ASG is currently not a DSP module. Making it one is a major change which I would prefer to postpone until I have time to fix the issues that will come along with it. For the meantime, I added an example notebook to develop-0.9.3 under pyrpl/docs/example-notebooks/asg-synchronization-example.ipynb which demonstrates how one can synchronize two asg channels in the current fpga design.
Great ! we tried your example... Also I didn't know but arbitrary waveforms and burst modes seem to work perfectly !!!
Le mar. 12 mars 2019 à 21:00, lneuhaus notifications@github.com a écrit :
I have looked into this. The problem is that ASG is currently not a DSP module. Making it one is a major change which I would prefer to postpone until I have time to fix the issues that will come along with it. For the meantime, I added an example notebook to develop-0.9.3 under pyrpl/docs/example-notebooks/asg-synchronization-example.ipynb which demonstrates how one can synchronize two asg channels in the current fpga design.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lneuhaus/pyrpl/issues/373#issuecomment-472158582, or mute the thread https://github.com/notifications/unsubscribe-auth/ACqnOMJXMbNHM7BO2totObp0Giqg-Rpcks5vWAdjgaJpZM4bgmNo .
I don't know if this is still relevant but, the asgs can be synchronized (even with software trigger) by resetting them both at the same time by writing directly to the register:
#read the register
regval = p.rp.asg0._read(0)
#write reset command for both channels
p.rp.asg0._write(0, regval | 0x400040)
#clear reset
p.rp.asg0._write(0, regval)
I am not sure how this could be done: what I want is to output 2 sines at the same frequency on out1 and out2 and to use the start_phase register of one of the asgs to change the relative phase between out1 and out2.
Maybe the trigger options of the asgs could allow to do that but I didn't understand what the various options mean (ext_positive_edge ? ext_negative_edge ? raw ? high ?).
Unfortunately, since the phase of the iq only modifies the demodulation stage (and not the output stage), it is not so simple to use the iqs to do what I want (I figured out a convoluted way by demodulating a dc offset, but it's far from ideal) --> Remark: If there is no particular reason for putting the phase on the demod rather than the modulation stage on the iqs, it could be a good idea to invert that
Moreover, in the end, we want to use the 2 channels of the ASGs to generate pulses with variable envelopes to be fed on a microwave IQ mixer, so having the 2 asgs output arbitrary waveforms in a synchronized way would be the ultimate goal. ---> Ultimately, we will need to trigger either via software or hardware the 2 asgs in a synchronized way. Again, maybe it's already possible, but I could not figure out how ?