Hi,

AD-9910 issue:

I am testing our new Sinara hardware and I came across a problem with obtaining any output from any of our 3 Urukuls. I try to run the following code:

from artiq.experiment import *   

# user constants 
freq_mhz = 10

class DDSTest(EnvExperiment):
    
    def build(self):
        self.setattr_device("core")
        self.setattr_device("urukul0_cpld")
        self.setattr_device("urukul0_ch1")
 
    @kernel
    def run(self):
       self.core.reset()                   #initialise the core module  
       self.urukul0_cpld.init()       #<- this line gives an error
       delay(2*s)
       
       self.urukul0_ch1.init()      #initialise and configure the DDS <- this line gives an error
       
#       self.urukul0_ch1.set_att(0*dB) #set digital step attenuator in SI units
       self.urukul0_ch1.set(freq_mhz,1.0,1.0) #sets freq in MHz, amplitude and phase
       self.urukul0_ch1.sw.on()
       delay(3000000*ms)
       self.urukul0_ch1.sw.off()

I get the following response:

WARNING:artiq.coredevice.comm_kernel:Mismatch between gateware (6.7511.4eee78a0.beta) and software (5.7144.9ed8f663) versions
Traceback (most recent call last):
  File "C:\Users\GW\.conda\envs\artiq\Scripts\artiq_run-script.py", line 9, in <module>
    sys.exit(main())
  File "C:\Users\GW\.conda\envs\artiq\lib\site-packages\artiq\frontend\artiq_run.py", line 225, in main
    return run(with_file=True)
  File "C:\Users\GW\.conda\envs\artiq\lib\site-packages\artiq\frontend\artiq_run.py", line 211, in run
    raise exn
  File "C:\Users\GW\.conda\envs\artiq\lib\site-packages\artiq\frontend\artiq_run.py", line 204, in run
    exp_inst.run()
  File "C:\Users\GW\.conda\envs\artiq\lib\site-packages\artiq\language\core.py", line 54, in run_on_core
    return getattr(self, arg).run(run_on_core, ((self,) + k_args), k_kwargs)
  File "C:\Users\GW\.conda\envs\artiq\lib\site-packages\artiq\coredevice\core.py", line 135, in run
    self.comm.load(kernel_library)
  File "C:\Users\GW\.conda\envs\artiq\lib\site-packages\artiq\coredevice\comm_kernel.py", line 240, in load
    raise LoadError(self._read_string())
artiq.coredevice.comm_kernel.LoadError: cannot load kernel: symbol lookup error: abort

What would be a potential issue? In the device_db.py file I have the following settings:

device_db["urukul0_cpld"] = {
    "type": "local",
    "module": "artiq.coredevice.urukul",
    "class": "CPLD",
    "arguments": {
        "spi_device": "spi_urukul0",
        "sync_device": "ttl_urukul0_sync",
        "io_update_device": "ttl_urukul0_io_update",
        "refclk": 125000000.0,
        "clk_sel": 2
    }
}

Is the refclk at 125 MHz correct if I have an external clock input at 10 MHz for Kasli?

Artiq-6 issue
Following the instructions from the beta version manual I installed artiq-6 (as it should be used with my Kasli version). But now anytime I try to run the artiq_run or artiq_coremgmt commands, the terminal crushes (there is no output on the command line, the terminal is not reposponsive ). What could be the reason?
I can operate and submit codes in artiq-5 but have problems with running artiq-6.

How are you installing artiq 6? On windows, if you are doing install with Conda then you need to follow instructions in the beta manual here https://m-labs.hk/artiq/manual-beta/installing.html and give the virtual environment a new name, e.g. conda create -n artiq6 artiq . Then to use it, just activate the artiq6 environment using conda activate artiq6

The other thing with your example code above is the delays are far longer than needed delay(10*ms) is more than adequate between initialisation and calling the frequency. Secondly, if you want 10 MHz you need to set frequency to freq_mhz = 10*MHz as the units to the set function takes frequency in Hz (so currently your code requests 10 Hz from DDS). MHz is a built in constant equal to 1e6.

Hey, thanks for your answer. I installed the artiq6 environment according to the instructions from the manual. I tried to remove the environment and install it again but the problem with running any commands persists (only for Artiq6). Any idea what it could be?

Regarding the DDS issues, having taken into account the comments above, I tried to run the following piece of code:

from artiq.experiment import *   

# Constants
FREQ_MHZ = 10*MHz

class dds_attempt(EnvExperiment):
    
    def build(self):
        self.setattr_device("core")
        self.setattr_device("urukul1_cpld")
        self.setattr_device("urukul1_ch0")
 
    @kernel
    def run(self):
       self.core.reset()                   #initiate the core module  
       delay(10*ms)
       self.urukul1_cpld.init()    #<-- problem 1
       delay(10*ms)
       
       self.urukul1_ch0.init() #initialise and configure the DDS  #<-- problem 2
       delay(10*ms)

and I got exactly the same error as before. The problem lies with the initialisation of the device. The lights on the DDS are all red (only PWR good are green) - maybe it indicates what the issue is.

    MikoT42 Please update the ARTIQ software on your computer, and perhaps reflash the device. That should fix the problem according to the error message you posted.
    We removed the abort symbol from recent versions of the firmware, so you need to upgrade to a compiler version that no longer attempts to use it. Then there were some protocol changes recently to improve performance, so make sure the ARTIQ software and the core device firmware are in sync (otherwise that can cause problems like coremgmt not working).

    thank you, updating the software and reflashing the device fixed the problems. coremgmtworks fine now.