I am upgrading from an ARTIQ 7 system to ARTIQ 9 using the same hardware components (master + satellite, TTL, DDS, DAC, Sampler). Previously, the software was running on Windows/Miniconda, now it runs on Windows/MSYS2 using the offline installer as a basis. The software version of artiq_master is ARTIQ v9.99646+4f326a9, the gateware is a self-built version using Vivado 2024.2 on a Linux system, based on the git hash 961551dd29 from the release-9 branch of https://git.m-labs.hk/M-Labs/artiq. The hardware description json files for the master and satellite did not change between the old and new gateware, except for the deletion of pll_n as mentioned in the release notes for ARTIQ-8.
Building and flashing works without error and I can also launch the dashboard using artiq_session from MSYS2. When I launch startup.py, which for now only initializes 1 AD9912 Urukul board on the master, I see that a connection is established on the serial monitor, but receive the following error:
root:Terminating with exception (ValueError: Urukul AD9912 product id mismatch)
Core Device Traceback:
Traceback (most recent call first):
File "<artiq>/coredevice/ad9912.py", line 120, column 13, in ... artiq.coredevice.ad9912.AD9912.init<artiq.coredevice.ad9912.AD9912>(...)
raise ValueError("Urukul AD9912 product id mismatch")
^
File "<artiq>/coredevice/ad9912.py", line 120, in ... artiq.coredevice.ad9912.AD9912.init<artiq.coredevice.ad9912.AD9912>(...) (RA=+0xed4)
raise ValueError("Urukul AD9912 product id mismatch")
File "C:/Users/ybion443/src/YbSr/repository/startup.py", line 20, in artiq_worker_startup.Startup.run(..., ...) (RA=+0x174)
self.urukul0_ch0.init()
ValueError(0): Urukul AD9912 product id mismatch
End of Core Device Traceback
Traceback (most recent call last):
File "C:/Users/ybion443/MSYS2_ARTIQ/clang64/lib/python3.14/site-packages/artiq/master/worker_impl.py", line 378, in main
exp_inst.run()
~~~~~~~~~~~~^^
File "C:/Users/ybion443/MSYS2_ARTIQ/clang64/lib/python3.14/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/ybion443/MSYS2_ARTIQ/clang64/lib/python3.14/site-packages/artiq/coredevice/core.py", line 177, in run
self._run_compiled(kernel_library, embedding_map, symbolizer, demangler)
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:/Users/ybion443/MSYS2_ARTIQ/clang64/lib/python3.14/site-packages/artiq/coredevice/core.py", line 166, in _run_compiled
self.comm.serve(embedding_map, symbolizer, demangler)
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:/Users/ybion443/MSYS2_ARTIQ/clang64/lib/python3.14/site-packages/artiq/coredevice/comm_kernel.py", line 744, in serve
self._serve_exception(embedding_map, symbolizer, demangler)
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:/Users/ybion443/MSYS2_ARTIQ/clang64/lib/python3.14/site-packages/artiq/coredevice/comm_kernel.py", line 726, in _serve_exception
raise python_exn
ValueError: Urukul AD9912 product id mismatch
I checked the issues and the forum and saw that mixing AD9910 and AD9912 cards in the same rack currently causes some unspecified error (https://git.m-labs.hk/M-Labs/artiq/issues/1676, https://git.m-labs.hk/M-Labs/artiq/issues/1610) and tried the fix mentioned in this issue, adding a secondary CPLD class and changing the AD9912 CPLD entries accordingly. This produces a different error upon executing startup.py concerning a mismatch between two different CPLD definitions for the same object. The original error also persists for the device_db posted below, which removes every device except for the Urukul I would like to initialize.
How can I fix this error?
device_db.py
# Autogenerated for the ptb3master_kasliv1 variant
core_addr = "192.168.1.3"
device_db = {
"core": {
"type": "local",
"module": "artiq.coredevice.core",
"class": "Core",
"arguments": {
"host": core_addr,
"ref_period": 1e-09,
"analyzer_proxy": "core_analyzer",
"target": "rv32ima",
"satellite_cpu_targets": {}
},
},
"core_log": {
"type": "controller",
"host": "::1",
"port": 1068,
"command": "aqctl_corelog -p {port} --bind {bind} " + core_addr
},
"core_moninj": {
"type": "controller",
"host": "::1",
"port_proxy": 1383,
"port": 1384,
"command": "aqctl_moninj_proxy --port-proxy {port_proxy} --port-control {port} --bind {bind} " + core_addr
},
"core_analyzer": {
"type": "controller",
"host": "::1",
"port_proxy": 1385,
"port": 1386,
"command": "aqctl_coreanalyzer_proxy --port-proxy {port_proxy} --port-control {port} --bind {bind} " + core_addr
},
"core_cache": {
"type": "local",
"module": "artiq.coredevice.cache",
"class": "CoreCache"
},
"core_dma": {
"type": "local",
"module": "artiq.coredevice.dma",
"class": "CoreDMA"
},
"i2c_switch0": {
"type": "local",
"module": "artiq.coredevice.i2c",
"class": "I2CSwitch",
"arguments": {"address": 0xe0}
},
"i2c_switch1": {
"type": "local",
"module": "artiq.coredevice.i2c",
"class": "I2CSwitch",
"arguments": {"address": 0xe2}
}
}
device_db["eeprom_urukul0"] = {
"type": "local",
"module": "artiq.coredevice.kasli_i2c",
"class": "KasliEEPROM",
"arguments": {
"port": "EEM5",
"busno": 0,
"sw0_device": "i2c_switch0",
"sw1_device": "i2c_switch1"}
}
device_db["spi_urukul0"] = {
"type": "local",
"module": "artiq.coredevice.spi2",
"class": "SPIMaster",
"arguments": {"channel": 0x00001f}
}
device_db["ttl_urukul0_io_update"] = {
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLOut",
"arguments": {"channel": 0x000020}
}
device_db["ttl_urukul0_sw0"] = {
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLOut",
"arguments": {"channel": 0x000021}
}
device_db["ttl_urukul0_sw1"] = {
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLOut",
"arguments": {"channel": 0x000022}
}
device_db["ttl_urukul0_sw2"] = {
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLOut",
"arguments": {"channel": 0x000023}
}
device_db["ttl_urukul0_sw3"] = {
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLOut",
"arguments": {"channel": 0x000024}
}
device_db["urukul0_cpld"] = {
"type": "local",
"module": "artiq.coredevice.urukul",
"class": "CPLD",
"arguments": {
"spi_device": "spi_urukul0",
"sync_device": None,
"io_update_device": "ttl_urukul0_io_update",
"refclk": 100000000.0,
"clk_sel": 1,
"clk_div": 0,
"proto_rev": 9
}
}
device_db["urukul0_ch0"] = {
"type": "local",
"module": "artiq.coredevice.ad9912",
"class": "AD9912",
"arguments": {
"pll_en": 1,
"chip_select": 4,
"cpld_device": "urukul0_cpld",
"sw_device": "ttl_urukul0_sw0"
}
}
device_db["urukul0_ch1"] = {
"type": "local",
"module": "artiq.coredevice.ad9912",
"class": "AD9912",
"arguments": {
"pll_en": 1,
"chip_select": 5,
"cpld_device": "urukul0_cpld",
"sw_device": "ttl_urukul0_sw1"
}
}
device_db["urukul0_ch2"] = {
"type": "local",
"module": "artiq.coredevice.ad9912",
"class": "AD9912",
"arguments": {
"pll_en": 1,
"chip_select": 6,
"cpld_device": "urukul0_cpld",
"sw_device": "ttl_urukul0_sw2"
}
}
device_db["urukul0_ch3"] = {
"type": "local",
"module": "artiq.coredevice.ad9912",
"class": "AD9912",
"arguments": {
"pll_en": 1,
"chip_select": 7,
"cpld_device": "urukul0_cpld",
"sw_device": "ttl_urukul0_sw3"
}
}
startup.py
from artiq.experiment import *
class Startup(EnvExperiment):
def build(self):
self.setattr_device("core")
self.setattr_device("urukul0_cpld")
self.setattr_device("urukul0_ch0")
self.setattr_device("urukul0_ch1")
self.setattr_device("urukul0_ch2")
self.setattr_device("urukul0_ch3")
@kernel
def run(self):
self.core.reset()
# DDS
self.urukul0_cpld.init()
self.urukul0_ch0.init()
self.urukul0_ch1.init()
self.urukul0_ch2.init()
self.urukul0_ch3.init()
self.core.wait_until_mu(now_mu())
ptb3master.json
{
"_description": "PTB 4.43 Master with backplane adapter",
"target": "kasli",
"variant": "ptb3master",
"hw_rev": "v1.1",
"base": "master",
"ext_ref_frequency": 100e6,
"core_addr": "192.168.1.101",
"vendor": "QUARTIQ",
"peripherals": [
{
"type": "dio",
"edge_counter": true,
"ports": [0],
"board": "DIO_SMA",
"hw_rev": "v1.1",
"bank_direction_low": "input",
"bank_direction_high": "output"
},
{
"type": "dio",
"ports": [1],
"board": "DIO_SMA",
"hw_rev": "v1.1",
"bank_direction_low": "output",
"bank_direction_high": "output"
},
{
"type": "dio",
"ports": [2],
"board": "DIO_SMA",
"hw_rev": "v1.1",
"bank_direction_low": "output",
"bank_direction_high": "output"
},
{
"type": "sampler",
"ports": [3]
},
{
"type": "urukul",
"ports": [5, 4],
"dds": "ad9912",
"clk_sel": 1,
"refclk": 100e6
},
{
"type": "urukul",
"ports": [7, 6],
"dds": "ad9912",
"clk_sel": 1,
"refclk": 100e6
},
{
"type": "urukul",
"ports": [9, 8],
"dds": "ad9912",
"clk_sel": 1,
"refclk": 100e6
},
{
"type": "zotino",
"ports": [10]
},
{
"type": "zotino",
"ports": [11]
}
]
}