Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sayma SAWG: startup kernel, frequency0 in loop, amplitude modulation #1071

Closed
jbqubit opened this issue Jun 12, 2018 · 5 comments
Closed

Sayma SAWG: startup kernel, frequency0 in loop, amplitude modulation #1071

jbqubit opened this issue Jun 12, 2018 · 5 comments

Comments

@jbqubit
Copy link
Contributor

jbqubit commented Jun 12, 2018

  • 4.0.dev+1133.g0b086225
  • Sayma_AMC s/n -6 (the one I've been using for two weeks now)
    • memtests and locks fail in fewer than 1/50 (I'm keeping scorecard)
  • HMC7043 reset pullup applied
  • running as startup kernel
  • kernel continued to run for 5 minutes before I reset board, but can't ping

https://www.youtube.com/watch?v=n625gI3Vlqg

from artiq.experiment import *

class SAWGTestSines(EnvExperiment):
    def build(self):
        self.setattr_device("core")
        self.sawgs = [self.get_device("sawg"+str(i)) for i in range(8)]

    @kernel
    def run(self):
        self.core.reset()
        delay(1*ms)
        for sawg in self.sawgs:
            sawg.reset()
            delay(500*us)
            sawg.amplitude1.set(100*MHz)
        while True:
            self.k1()            

    @kernel
    def k1(self):
        for sawg in self.sawgs:
            sawg.frequency0.set(100*MHz)
            delay(1*ms)
|  \/  (_) ___|  ___  / ___|
| |\/| | \___ \ / _ \| |    
| |  | | |___) | (_) | |___ 
|_|  |_|_|____/ \___/ \____|

MiSoC Bootloader
Copyright (c) 2017-2018 M-Labs Limited

Bootloader CRC passed
Gateware ident 4.0.dev+1133.g0b086225
Initializing SDRAM...
DQS initial delay: 101 taps
Write leveling scan:
Module 3:
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111100110000100000000000000000000000000000000000000000000000000000000000000000000000000
Module 2:
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000
Module 1:
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111100110000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Module 0:
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
DQS initial delay: 101 taps
Write leveling: 97 105 128 120 done
Read leveling scan:
Module 3:
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110101111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Module 2:
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111101111111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Module 1:
00000000000000000000000000000000000000000000000000000000000000000000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110000110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Module 0:
00000000000000000000000000000000000000000000000000000000111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Read leveling: 181+-77 173+-85 152+-78 137+-82 done
SDRAM initialized
Memory test passed

Booting from flash...
Starting firmware.
[     0.000007s]  INFO(runtime): ARTIQ runtime starting...
[     0.003882s]  INFO(runtime): software version 4.0.dev+1133.g0b086225
[     0.010232s]  INFO(runtime): gateware version 4.0.dev+1133.g0b086225
[     0.016612s]  INFO(runtime): log level set to INFO by default
[     0.022317s]  INFO(runtime): UART log level set to INFO by default
[     0.028456s]  INFO(board_artiq::serwb): waiting for AMC/RTM serwb bridge to be ready...
[     0.063184s]  INFO(board_artiq::serwb): done.
[     0.066214s]  INFO(board_artiq::serwb): RTM to AMC Link test
[     1.548257s]  INFO(board_artiq::serwb): 0 errors
[     1.551559s]  INFO(board_artiq::serwb): AMC to RTM Link test
[     3.033608s]  INFO(board_artiq::serwb): 0 errors
[     3.036906s]  INFO(board_artiq::serwb): Wishbone test...
[     4.969010s]  INFO(board_artiq::serwb): 0 errors
[     4.972316s]  INFO(board_artiq::serwb): AMC serwb settings:
[     4.977865s]  INFO(board_artiq::serwb):   bitslip: 39
[     4.982901s]  INFO(board_artiq::serwb):   ready: 1
[     4.987676s]  INFO(board_artiq::serwb):   error: 0
[     4.992452s]  INFO(board_artiq::serwb): RTM serwb settings:
[     4.998017s]  INFO(board_artiq::serwb):   bitslip: 6
[     5.002967s]  INFO(board_artiq::serwb):   ready: 1
[     5.007742s]  INFO(board_artiq::serwb):   error: 0
[     5.012752s]  INFO(board_artiq::serwb): RTM gateware version 4.0.dev+1133.g0b086225
[     5.020157s]  INFO(runtime): press 'e' to erase startup and idle kernels...
[     6.020006s]  INFO(runtime): continuing boot
[     6.023065s]  INFO(board_artiq::hmc830_7043::hmc830): HMC830 found
[     6.029133s]  INFO(board_artiq::hmc830_7043::hmc830): loading configuration...
[     6.036641s]  INFO(board_artiq::hmc830_7043::hmc830):   ...done
[     6.042229s]  INFO(board_artiq::hmc830_7043::hmc830): waiting for lock...
[     6.049035s]  INFO(board_artiq::hmc830_7043::hmc830):   ...locked
[     6.055080s]  INFO(board_artiq::hmc830_7043::hmc7043): enabling hmc7043
[     6.061955s]  INFO(board_artiq::hmc830_7043::hmc7043): HMC7043 found
[     6.068034s]  INFO(board_artiq::hmc830_7043::hmc7043): loading configuration...
[     6.077315s]  INFO(board_artiq::hmc830_7043::hmc7043):   ...done
[     6.082368s]  INFO(board_artiq::ad9154): AD9154-0 found
[     6.097506s]  INFO(board_artiq::ad9154): AD9154-0 initializing...
[     6.110433s]  INFO(board_artiq::ad9154):   ...done
[     6.184320s]  INFO(board_artiq::ad9154): AD9154-0 running PRBS test...
[     7.190697s]  INFO(board_artiq::ad9154):   ...passed
[     7.194355s]  INFO(board_artiq::ad9154): AD9154-0 running STPL test...
[     7.201144s]  INFO(board_artiq::ad9154):   c0 errors: 0
[     7.206349s]  INFO(board_artiq::ad9154):   c1 errors: 0
[     7.211558s]  INFO(board_artiq::ad9154):   c2 errors: 0
[     7.216769s]  INFO(board_artiq::ad9154):   c3 errors: 0
[     7.221692s]  INFO(board_artiq::ad9154):   ...passed
[     7.226641s]  INFO(board_artiq::ad9154): AD9154-0 SYSREF scan:
[     7.496573s]  INFO(board_artiq::ad9154):   phase: 25, sync error: 449
[     7.826761s]  INFO(board_artiq::ad9154):   phase: 57, sync error: 450
[     7.831900s]  INFO(board_artiq::ad9154):   phase min: Some(25), phase max: Some(56)
[     7.839541s]  INFO(board_artiq::ad9154): AD9154-0 setting SYSREF phase to 88
[     7.856926s]  INFO(board_artiq::ad9154): AD9154-0 initializing...
[     7.869818s]  INFO(board_artiq::ad9154):   ...done
[     7.944026s]  INFO(board_artiq::ad9154): AD9154-1 found
[     7.958224s]  INFO(board_artiq::ad9154): AD9154-1 initializing...
[     7.971113s]  INFO(board_artiq::ad9154):   ...done
[     8.044988s]  INFO(board_artiq::ad9154): AD9154-1 running PRBS test...
[     9.051358s]  INFO(board_artiq::ad9154):   ...passed
[     9.055017s]  INFO(board_artiq::ad9154): AD9154-1 running STPL test...
[     9.061802s]  INFO(board_artiq::ad9154):   c0 errors: 0
[     9.067012s]  INFO(board_artiq::ad9154):   c1 errors: 0
[     9.072222s]  INFO(board_artiq::ad9154):   c2 errors: 0
[     9.077431s]  INFO(board_artiq::ad9154):   c3 errors: 0
[     9.082353s]  INFO(board_artiq::ad9154):   ...passed
[     9.087302s]  INFO(board_artiq::ad9154): AD9154-1 SYSREF scan:
[     9.347073s]  INFO(board_artiq::ad9154):   phase: 24, sync error: 449
[     9.677269s]  INFO(board_artiq::ad9154):   phase: 56, sync error: 450
[     9.682406s]  INFO(board_artiq::ad9154):   phase min: Some(24), phase max: Some(55)
[     9.690047s]  INFO(board_artiq::ad9154): AD9154-1 setting SYSREF phase to 88
[     9.707434s]  INFO(board_artiq::ad9154): AD9154-1 initializing...
[     9.720326s]  INFO(board_artiq::ad9154):   ...done
[     9.794192s]  INFO(board_artiq::hmc542): card 0 channel 0 set to 4 dB
[     9.801437s]  INFO(board_artiq::hmc542): card 0 channel 1 set to 4 dB
[     9.808675s]  INFO(board_artiq::hmc542): card 1 channel 0 set to 4 dB
[     9.815912s]  INFO(board_artiq::hmc542): card 1 channel 1 set to 4 dB
[     9.823149s]  INFO(board_artiq::hmc542): card 2 channel 0 set to 4 dB
[     9.830386s]  INFO(board_artiq::hmc542): card 2 channel 1 set to 4 dB
[     9.837624s]  INFO(board_artiq::hmc542): card 3 channel 0 set to 4 dB
[     9.844861s]  INFO(board_artiq::hmc542): card 3 channel 1 set to 4 dB
[     9.852160s]  INFO(runtime): using MAC address 00-0a-35-03-1e-75
[     9.856956s]  INFO(runtime): using IP address 192.168.1.75
[     9.864001s]  INFO(runtime::mgmt): management interface active
[     9.877306s]  INFO(runtime::session): accepting network sessions
[     9.891565s]  INFO(runtime::session): running startup kernel
[     9.922972s]  INFO(runtime::kern_hwreq): resetting RTIO
@jbqubit
Copy link
Contributor Author

jbqubit commented Jun 12, 2018

I've seen this same behavior loading four times.

@trxw
Copy link

trxw commented Jun 12, 2018

For one thing, the amplitude needs to be set between 0-1 and not 100MHz

for sawg in self.sawgs:
            sawg.reset()
            delay(500*us)
            sawg.amplitude1.set(100*MHz)

@jbqubit
Copy link
Contributor Author

jbqubit commented Jun 12, 2018

Ah right. With sawg.amplitude1.set(0.5) this works as startup kernel as in the past. Glad this is a typo and not a regression. :)

@jbqubit jbqubit closed this as completed Jun 12, 2018
@trxw
Copy link

trxw commented Jun 12, 2018

@sbourdeauducq Shouldn't there be a bound checking for amplitude?

@jbqubit
Copy link
Contributor Author

jbqubit commented Jun 13, 2018

@trxw #1045

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants