Closed sbourdeauducq closed 6 years ago
Might be a duplicate of #1022 indeed - I am not sure.
Also not fixed by JESD update to https://github.com/m-labs/jesd204b/commit/25fd79dbf9d5b9536482f11a4d716747479191ec
Reproduced:
Artiq: c28fe47, Misoc: 86c6fcb, Migen: 6425844, jesd204b: 25fd79d
Thanks.
@marmeladapk Thanks for reproducing! @jordens Do you think this could be SAWG (vs JESD)?
Does this work for all sawgs? e.g. can I use sawg0
?
@hartytp any channel
Flashed this to the startup kernel:
from artiq.experiment import *
class SAWGTest(EnvExperiment):
def build(self):
self.setattr_device("core")
self.setattr_device("sawg0")
@kernel
def run(self):
self.core.reset()
self.sawg0.reset()
delay(300 * us)
self.sawg0.frequency0.set(10*MHz)
self.sawg0.amplitude1.set(0.2)
Hooked up microscope probes to Sayma https://github.com/hartytp/artiq/tree/sawg_probes
+----------+------+----------+
| Group | Name | Value |
+----------+------+----------+
| sawg0 | a1 | 0x0 |
| sawg0_a1 | xo | 0xf87 |
| sawg0_a1 | yo | 0xf87 |
| sawg0_b | xo0 | 0x7f8c |
| sawg0_b | yo0 | 0xffb787 |
| sawg0_b | xo1 | 0x62eb |
| sawg0_b | yo1 | 0x9a89 |
| sawg0_b | xo2 | 0x92dc |
| sawg0_b | yo2 | 0xff984e |
| sawg0_b | xo3 | 0xff9ce9 |
| sawg0_b | yo3 | 0xff9622 |
+----------+------+----------+
Edit: dac output looks very distorted.
amplitude to 0.5 gives a good sine and
+----------+------+----------+
| Group | Name | Value |
+----------+------+----------+
| sawg0 | a1 | 0x0 |
| sawg0_a1 | xo | 0x26d3 |
| sawg0_a1 | yo | 0x26d3 |
| sawg0_b | xo0 | 0x2ef2 |
| sawg0_b | yo0 | 0xff21d6 |
| sawg0_b | xo1 | 0xff3f38 |
| sawg0_b | yo1 | 0x32b6 |
| sawg0_b | xo2 | 0xe3a9 |
| sawg0_b | yo2 | 0xd052 |
| sawg0_b | xo3 | 0xffca1f |
| sawg0_b | yo3 | 0x3105 |
+----------+------+----------+
@jordens Is this still open? cf https://irclog.whitequark.org/m-labs/2018-06-09#22299432; Closed status following commit implies to me that I can reproduce fix by rebuilding.
@jbqubit Please try it, the Sayma in HK is currently broken. https://irclog.whitequark.org/m-labs/2018-06-09#1528542903-1528545687;
This bug seems fixed now.
See the following video: https://drive.google.com/file/d/1_Wkg8eDb3q3fVKrkaSxhvNfwyYxdB2Y1/view?usp=sharing
Code:
from artiq.experiment import *
import numpy as np
class SAWGTest(EnvExperiment):
def build(self):
self.setattr_device("core")
self.setattr_device("sawg0")
self.amps = np.linspace(0., 1., num=1000)
@kernel
def run(self):
self.core.reset()
self.sawg0.reset()
delay(300 * us)
while True:
for amp in self.amps:
self.sawg0.frequency0.set(10*MHz)
self.sawg0.amplitude1.set(amp)
delay(10*ms)
Looks relatively normal:
Then change the amplitude to 0.2: