artiq/artiq/examples/kasli/device_db.py

246 lines
6.2 KiB
Python
Raw Normal View History

2019-05-10 12:17:38 +08:00
# Tester device database
core_addr = "192.168.1.70"
2018-05-21 17:43:00 +08:00
device_db = {
"core": {
"type": "local",
"module": "artiq.coredevice.core",
"class": "Core",
"arguments": {"host": core_addr, "ref_period": 1e-9}
},
"core_log": {
"type": "controller",
"host": "::1",
"port": 1068,
"command": "aqctl_corelog -p {port} --bind {bind} " + core_addr
},
2022-03-19 19:25:21 +08:00
"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
},
2023-12-08 18:55:07 +08:00
"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
},
2018-05-21 17:43:00 +08:00
"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",
2022-03-01 15:07:53 +08:00
"class": "I2CSwitch",
2018-05-21 17:43:00 +08:00
"arguments": {"address": 0xe0}
},
"i2c_switch1": {
"type": "local",
"module": "artiq.coredevice.i2c",
2022-03-01 15:07:53 +08:00
"class": "I2CSwitch",
2018-05-21 17:43:00 +08:00
"arguments": {"address": 0xe2}
},
}
2018-08-30 00:19:31 +08:00
# DIO (EEM5) starting at RTIO channel 0
2018-05-21 17:43:00 +08:00
for i in range(8):
device_db["ttl" + str(i)] = {
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLInOut" if i < 4 else "TTLOut",
"arguments": {"channel": i},
}
device_db["ttl{}_counter".format(i)] = {
"type": "local",
"module": "artiq.coredevice.edge_counter",
"class": "EdgeCounter",
"arguments": {"channel": 8 + i},
}
2018-05-21 17:43:00 +08:00
# Urukul (EEM1) starting at RTIO channel 12
2018-05-21 17:43:00 +08:00
device_db.update(
eeprom_urukul0={
"type": "local",
"module": "artiq.coredevice.kasli_i2c",
"class": "KasliEEPROM",
"arguments": {"port": "EEM1"}
},
2018-05-21 17:43:00 +08:00
spi_urukul0={
"type": "local",
"module": "artiq.coredevice.spi2",
"class": "SPIMaster",
"arguments": {"channel": 12}
2018-05-21 17:43:00 +08:00
},
ttl_urukul0_sync={
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLClockGen",
"arguments": {"channel": 13, "acc_width": 4}
},
2018-05-21 17:43:00 +08:00
ttl_urukul0_io_update={
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLOut",
"arguments": {"channel": 14}
2018-05-21 17:43:00 +08:00
},
ttl_urukul0_sw0={
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLOut",
"arguments": {"channel": 15}
2018-05-21 17:43:00 +08:00
},
ttl_urukul0_sw1={
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLOut",
"arguments": {"channel": 16}
2018-05-21 17:43:00 +08:00
},
ttl_urukul0_sw2={
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLOut",
"arguments": {"channel": 17}
2018-05-21 17:43:00 +08:00
},
ttl_urukul0_sw3={
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLOut",
"arguments": {"channel": 18}
2018-05-21 17:43:00 +08:00
},
urukul0_cpld={
"type": "local",
"module": "artiq.coredevice.urukul",
"class": "CPLD",
"arguments": {
"spi_device": "spi_urukul0",
"io_update_device": "ttl_urukul0_io_update",
"sync_device": "ttl_urukul0_sync",
2018-05-21 17:43:00 +08:00
"refclk": 125e6,
2018-11-06 14:49:21 +08:00
"clk_sel": 2
2018-05-21 17:43:00 +08:00
}
}
)
for i in range(4):
device_db["urukul0_ch" + str(i)] = {
"type": "local",
"module": "artiq.coredevice.ad9910",
"class": "AD9910",
"arguments": {
"pll_n": 32,
"chip_select": 4 + i,
"cpld_device": "urukul0_cpld",
"sw_device": "ttl_urukul0_sw" + str(i),
"sync_delay_seed": "eeprom_urukul0:" + str(64 + 4*i),
"io_update_delay": "eeprom_urukul0:" + str(64 + 4*i),
2018-05-21 17:43:00 +08:00
}
}
# Sampler (EEM3) starting at RTIO channel 19
2018-05-21 17:43:00 +08:00
device_db["spi_sampler0_adc"] = {
"type": "local",
"module": "artiq.coredevice.spi2",
"class": "SPIMaster",
"arguments": {"channel": 19}
2018-05-21 17:43:00 +08:00
}
device_db["spi_sampler0_pgia"] = {
"type": "local",
"module": "artiq.coredevice.spi2",
"class": "SPIMaster",
"arguments": {"channel": 20}
2018-05-21 17:43:00 +08:00
}
device_db["spi_sampler0_cnv"] = {
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLOut",
"arguments": {"channel": 21},
2018-05-21 17:43:00 +08:00
}
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": "spi_sampler0_cnv"
}
}
# Zotino (EEM4) starting at RTIO channel 22
2018-05-21 17:43:00 +08:00
device_db["spi_zotino0"] = {
"type": "local",
"module": "artiq.coredevice.spi2",
"class": "SPIMaster",
"arguments": {"channel": 22}
2018-05-21 17:43:00 +08:00
}
device_db["ttl_zotino0_ldac"] = {
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLOut",
"arguments": {"channel": 23}
2018-05-21 17:43:00 +08:00
}
device_db["ttl_zotino0_clr"] = {
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLOut",
"arguments": {"channel": 24}
2018-05-21 17:43:00 +08:00
}
device_db["zotino0"] = {
"type": "local",
"module": "artiq.coredevice.zotino",
"class": "Zotino",
"arguments": {
"spi_device": "spi_zotino0",
"ldac_device": "ttl_zotino0_ldac",
"clr_device": "ttl_zotino0_clr"
}
}
2018-08-30 00:19:31 +08:00
2018-05-21 17:43:00 +08:00
device_db.update(
led0={
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLOut",
"arguments": {"channel": 25}
2018-05-21 17:43:00 +08:00
},
led1={
"type": "local",
"module": "artiq.coredevice.ttl",
"class": "TTLOut",
"arguments": {"channel": 26}
2018-05-21 17:43:00 +08:00
},
)
device_db.update(
2019-03-11 21:06:28 +08:00
i2c_switch="i2c_switch0",
2018-08-11 10:51:42 +08:00
ttl_out="ttl4",
ttl_out_serdes="ttl4",
loop_out="ttl4",
loop_in="ttl0",
loop_in_counter="ttl0_counter",
# Urukul CPLD with sync and io_update, IFC MODE 0b1000
urukul_cpld="urukul0_cpld",
# Urukul AD9910 with switch TTL, internal 125 MHz MMCX connection
urukul_ad9910="urukul0_ch0",
)