Hello, I have been recently attempting to install a second dds (Creotech Urukul ad9910) into my labs Artiq system.
Previous to the 2nd instillation there was already a functioning ad9910 in the setup, of which still works.
When attempting to call the urukul cpld in an "artiq_run" function, I am receiving a proto-rev mismatch error. From reading through the documentation I believe this is a result of one of two things, the proto-rev value indeed being wrong, or more likely, the card is not seated correctly, be it hardware or firmware wise.
Error:
Core Device Traceback:
Traceback (most recent call first):
File "<artiq>/coredevice/urukul.py", line 252, column 17, in ... artiq.coredevice.urukul.CPLD.init<artiq.coredevice.urukul.CPLD>(...)
raise ValueError("Urukul proto_rev mismatch")
^
File "2nd_dds.py", line 13, in artiq_run_2nd_dds.Fastino_Multi_Output.run(..., ...) (RA=+0x11c)
self.urukul1_cpld.init()
File "<artiq>/coredevice/urukul.py", line 252, in ... artiq.coredevice.urukul.CPLD.init<artiq.coredevice.urukul.CPLD>(...) (RA=+0x310)
raise ValueError("Urukul proto_rev mismatch")
ValueError(0): Urukul proto_rev mismatch
End of Core Device Traceback
Traceback (most recent call last):
File "/nix/store/mrsbq62hlydcmrvjndm0k5lmsv9wagsn-python3.12-artiq-9.9102+270a417.beta/bin/.artiq_run-wrapped", line 9, in <module>
sys.exit(main())
^^^^^^
File "/nix/store/7h18hi8i8lkiiajkzph0s0gzcfn62mn3-python3-3.12.7-env/lib/python3.12/site-packages/artiq/frontend/artiq_run.py", line 269, in main
return run(with_file=True)
^^^^^^^^^^^^^^^^^^^
File "/nix/store/7h18hi8i8lkiiajkzph0s0gzcfn62mn3-python3-3.12.7-env/lib/python3.12/site-packages/artiq/frontend/artiq_run.py", line 253, in run
raise exn
File "/nix/store/7h18hi8i8lkiiajkzph0s0gzcfn62mn3-python3-3.12.7-env/lib/python3.12/site-packages/artiq/frontend/artiq_run.py", line 245, in run
exp_inst.run()
File "/nix/store/7h18hi8i8lkiiajkzph0s0gzcfn62mn3-python3-3.12.7-env/lib/python3.12/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 "/nix/store/7h18hi8i8lkiiajkzph0s0gzcfn62mn3-python3-3.12.7-env/lib/python3.12/site-packages/artiq/coredevice/core.py", line 177, in run
self._run_compiled(kernel_library, embedding_map, symbolizer, demangler)
File "/nix/store/7h18hi8i8lkiiajkzph0s0gzcfn62mn3-python3-3.12.7-env/lib/python3.12/site-packages/artiq/coredevice/core.py", line 166, in _run_compiled
self.comm.serve(embedding_map, symbolizer, demangler)
File "/nix/store/7h18hi8i8lkiiajkzph0s0gzcfn62mn3-python3-3.12.7-env/lib/python3.12/site-packages/artiq/coredevice/comm_kernel.py", line 734, in serve
self._serve_exception(embedding_map, symbolizer, demangler)
File "/nix/store/7h18hi8i8lkiiajkzph0s0gzcfn62mn3-python3-3.12.7-env/lib/python3.12/site-packages/artiq/coredevice/comm_kernel.py", line 716, in _serve_exception
raise python_exn
ValueError: Urukul proto_rev mismatch
From what I can tell I believe I have correctly installed it, it is plugged into the 9th and 10th slots (of 11) on our Kasli_Soc, and has the other wire plugged into the board (same layout as the previous ad9910).
Firmware
After installing the device I changed my device description json file which is seen below:
Description:
>! {
>! "target": "kasli_soc",
>! "min_artiq_version": "9.0", #from what I can tell changing version doesn't change much
>! "variant": "....",
>! "hw_rev": "v1.1",
>! "base": "standalone",
>! "core_addr": "ip",
>! "peripherals": [
>! {
>! "type": "grabber",
>! "ports": [0, 1]
>! },
>! {
>! "type": "dio",
>! "board": "DIO_BNC",
>! "ports": [2],
>! "bank_direction_low": "input",
>! "bank_direction_high": "output"
>! },
>! {
>! "type": "urukul",
>! "dds": "ad9910",
>! "ports": [3, 4],
>! "clk_sel": 2
>! },
>! {
>! "type": "sampler",
>! "ports": [5, 6]
>! },
>! {
>! "type": "fastino",
>! "ports": [7],
>! "hw_rev": "v1.1",
>! "log2_width": 5
>! },
>! {
>! "type": "urukul",
>! "dds": "ad9910",
>! "ports": [8, 9],
>! "clk_sel": 2
>! }
>! ]
>! }
The device description is where I might have problems, I don't have the greatest grasp on it. From this I proceed to create a device db file with the device db template cmd, then recompile my gateware and make files in artiq-zynq/src, then flash the device over local network with ethernet/jtag. Which all seems good.
This is my device_db file:
# Autogenerated for the .... variant
core_addr = "...."
device_db = {
"core": {
"type": "local",
"module": "artiq.coredevice.core",
"class": "Core",
"arguments": {
"host": core_addr,
"ref_period": 1e-09,
"analyzer_proxy": "core_analyzer",
"target": "cortexa9",
"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}
},
}
# standalone peripherals
device_db["grabber0"] = {
"type": "local",
"module": "artiq.coredevice.grabber",
"class": "Grabber",
"arguments": {"channel_base": 0x000000}
}
device_db["ttl0"] = {
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLInOut",
"arguments": {"channel": 0x000002},
}
device_db["ttl1"] = {
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLInOut",
"arguments": {"channel": 0x000003},
}
device_db["ttl2"] = {
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLInOut",
"arguments": {"channel": 0x000004},
}
device_db["ttl3"] = {
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLInOut",
"arguments": {"channel": 0x000005},
}
device_db["ttl4"] = {
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLOut",
"arguments": {"channel": 0x000006},
}
device_db["ttl5"] = {
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLOut",
"arguments": {"channel": 0x000007},
}
device_db["ttl6"] = {
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLOut",
"arguments": {"channel": 0x000008},
}
device_db["ttl7"] = {
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLOut",
"arguments": {"channel": 0x000009},
}
device_db["eeprom_urukul0"] = {
"type": "local",
"module": "artiq.coredevice.kasli_i2c",
"class": "KasliEEPROM",
"arguments": {"port": "EEM3"}
}
device_db["spi_urukul0"] = {
"type": "local",
"module": "artiq.coredevice.spi2",
"class": "SPIMaster",
"arguments": {"channel": 0x00000a}
}
device_db["ttl_urukul0_io_update"] = {
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLOut",
"arguments": {"channel": 0x00000b}
}
device_db["ttl_urukul0_sw0"] = {
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLOut",
"arguments": {"channel": 0x00000c}
}
device_db["ttl_urukul0_sw1"] = {
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLOut",
"arguments": {"channel": 0x00000d}
}
device_db["ttl_urukul0_sw2"] = {
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLOut",
"arguments": {"channel": 0x00000e}
}
device_db["ttl_urukul0_sw3"] = {
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLOut",
"arguments": {"channel": 0x00000f}
}
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": 125000000.0,
"clk_sel": 2,
"clk_div": 0
}
}
device_db["urukul0_ch0"] = {
"type": "local",
"module": "artiq.coredevice.ad9910",
"class": "AD9910",
"arguments": {
"pll_n": 32,
"pll_en": 1,
"chip_select": 4,
"cpld_device": "urukul0_cpld",
"sw_device": "ttl_urukul0_sw0"
}
}
device_db["urukul0_ch1"] = {
"type": "local",
"module": "artiq.coredevice.ad9910",
"class": "AD9910",
"arguments": {
"pll_n": 32,
"pll_en": 1,
"chip_select": 5,
"cpld_device": "urukul0_cpld",
"sw_device": "ttl_urukul0_sw1"
}
}
device_db["urukul0_ch2"] = {
"type": "local",
"module": "artiq.coredevice.ad9910",
"class": "AD9910",
"arguments": {
"pll_n": 32,
"pll_en": 1,
"chip_select": 6,
"cpld_device": "urukul0_cpld",
"sw_device": "ttl_urukul0_sw2"
}
}
device_db["urukul0_ch3"] = {
"type": "local",
"module": "artiq.coredevice.ad9910",
"class": "AD9910",
"arguments": {
"pll_n": 32,
"pll_en": 1,
"chip_select": 7,
"cpld_device": "urukul0_cpld",
"sw_device": "ttl_urukul0_sw3"
}
}
device_db["spi_sampler0_adc"] = {
"type": "local",
"module": "artiq.coredevice.spi2",
"class": "SPIMaster",
"arguments": {"channel": 0x000010}
}
device_db["spi_sampler0_pgia"] = {
"type": "local",
"module": "artiq.coredevice.spi2",
"class": "SPIMaster",
"arguments": {"channel": 0x000011}
}
device_db["ttl_sampler0_cnv"] = {
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLOut",
"arguments": {"channel": 0x000012},
}
device_db["sampler0"] = {
"type": "local",
"module": "artiq.coredevice.sampler",
"class": "Sampler",
"arguments": {
"spi_adc_device": "spi_sampler0_adc",
"spi_pgia_device": "spi_sampler0_pgia",
"cnv_device": "ttl_sampler0_cnv",
"hw_rev": "v2.2"
}
}
device_db["fastino0"] = {
"type": "local",
"module": "artiq.coredevice.fastino",
"class": "Fastino",
"arguments": {"channel": 0x000013, "log2_width": 5}
}
device_db["eeprom_urukul1"] = {
"type": "local",
"module": "artiq.coredevice.kasli_i2c",
"class": "KasliEEPROM",
"arguments": {"port": "EEM8"}
}
device_db["spi_urukul1"] = {
"type": "local",
"module": "artiq.coredevice.spi2",
"class": "SPIMaster",
"arguments": {"channel": 0x000014}
}
device_db["ttl_urukul1_io_update"] = {
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLOut",
"arguments": {"channel": 0x000015}
}
device_db["ttl_urukul1_sw0"] = {
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLOut",
"arguments": {"channel": 0x000016}
}
device_db["ttl_urukul1_sw1"] = {
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLOut",
"arguments": {"channel": 0x000017}
}
device_db["ttl_urukul1_sw2"] = {
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLOut",
"arguments": {"channel": 0x000018}
}
device_db["ttl_urukul1_sw3"] = {
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLOut",
"arguments": {"channel": 0x000019}
}
device_db["urukul1_cpld"] = {
"type": "local",
"module": "artiq.coredevice.urukul",
"class": "CPLD",
"arguments": {
"spi_device": "spi_urukul1",
"sync_device": None,
"io_update_device": "ttl_urukul1_io_update",
"refclk": 125000000.0,
"clk_sel": 2,
"clk_div": 0
}
}
device_db["urukul1_ch0"] = {
"type": "local",
"module": "artiq.coredevice.ad9910",
"class": "AD9910",
"arguments": {
"pll_n": 32,
"pll_en": 1,
"chip_select": 4,
"cpld_device": "urukul1_cpld",
"sw_device": "ttl_urukul1_sw0"
}
}
device_db["urukul1_ch1"] = {
"type": "local",
"module": "artiq.coredevice.ad9910",
"class": "AD9910",
"arguments": {
"pll_n": 32,
"pll_en": 1,
"chip_select": 5,
"cpld_device": "urukul1_cpld",
"sw_device": "ttl_urukul1_sw1"
}
}
device_db["urukul1_ch2"] = {
"type": "local",
"module": "artiq.coredevice.ad9910",
"class": "AD9910",
"arguments": {
"pll_n": 32,
"pll_en": 1,
"chip_select": 6,
"cpld_device": "urukul1_cpld",
"sw_device": "ttl_urukul1_sw2"
}
}
device_db["urukul1_ch3"] = {
"type": "local",
"module": "artiq.coredevice.ad9910",
"class": "AD9910",
"arguments": {
"pll_n": 32,
"pll_en": 1,
"chip_select": 7,
"cpld_device": "urukul1_cpld",
"sw_device": "ttl_urukul1_sw3"
}
}
device_db["led0"] = {
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLOut",
"arguments": {"channel": 0x00001a}
}
device_db["led1"] = {
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLOut",
"arguments": {"channel": 0x00001b}
}
#side note, my 2nd urukul is powered.
If anyone has any pointers, be it here or a certain place in the documentation, I would greatly appreciate it.
Thanks 🙂