Say I have 2x Kasli SoC v1.1, one master and one satellite, and say I want to create device_db.py. Does it matter which master SFP port I put the satellite on? I.e. are all of the following device databases all equally correct/functional? (Provided I plug the one satellite into the correct SFP port, of course.)

  • artiq_ddb_template --output device_db.py --satellite 0 sys_desc_sat.json sys_desc_master.json
  • artiq_ddb_template --output device_db.py --satellite 1 sys_desc_sat.json sys_desc_master.json
  • artiq_ddb_template --output device_db.py --satellite 2 sys_desc_sat.json sys_desc_master.json
  • artiq_ddb_template --output device_db.py --satellite 3 sys_desc_sat.json sys_desc_master.json

If all of the above device databases are equally correct, does that mean that Kasli SoC can accomodate up to 4 satellites and Kasli up to 3?

If you upload the correct routing table, they are equivalent to my knowledge

Clearly, putting a satellite on 0 does not work. 🙁

artiq_ddb_template --output device_db.py --satellite 0 sys_desc_sat.json sys_desc_master.json

leads to this device_db.py:

# Autogenerated for the kasli_soc_artiq_8_drtio_master_wrpll_true_sed_lanes_8_peripherals_none variant
# core_addr = "10.0.0.50"
core_addr = "192.168.1.30"

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}
    },
}

# master peripherals

device_db["led0"] = {
    "type": "local",
    "module": "artiq.coredevice.ttl",
    "class": "TTLOut",
    "arguments": {"channel": 0x000000}
}

device_db["led1"] = {
    "type": "local",
    "module": "artiq.coredevice.ttl",
    "class": "TTLOut",
    "arguments": {"channel": 0x000001}
}

# DEST#0 peripherals

device_db["core"]["arguments"]["satellite_cpu_targets"][0] = "cortexa9"

device_db["led2"] = {
    "type": "local",
    "module": "artiq.coredevice.ttl",
    "class": "TTLOut",
    "arguments": {"channel": 0x000000}
}

device_db["led3"] = {
    "type": "local",
    "module": "artiq.coredevice.ttl",
    "class": "TTLOut",
    "arguments": {"channel": 0x000001}
}

You will notice that:

  • "led0" and "led2" both have "arguments": {"channel": 0x000000}
  • "led1" and "led3" both have "arguments": {"channel": 0x000001}

Predictably, running artiq_rtiomap dev_map.bin (see RTIO channel name map tool) leads to the following error:

m1@m1-notebook-1:~/workspace/artiq_system_description_files/kasli_soc_artiq_8_dr
tio_master_wrpll_true_sed_lanes_8_peripherals_none$ artiq_rtiomap dev_map.bin
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/m1/workspace/artiq/artiq/frontend/artiq_rtiomap.py", line 89, in <module>
    main()
  File "/home/m1/workspace/artiq/artiq/frontend/artiq_rtiomap.py", line 82, in main
    chan_map = get_channel_map(ddb.get_device_db())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/m1/workspace/artiq/artiq/frontend/artiq_rtiomap.py", line 47, in get_channel_map
    assert chan not in reversed_map
           ^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError

What I would like to know now: The SFP ports at the Kasli SoC's front panel are labelled 0, 1, 2 and 3. If I run artiq_ddb_template --output device_db.py --satellite 1 sys_desc_sat.json sys_desc_master.json, am I putting the satellite on SFP0 or SFP1?

DRTIO destination 0 is normally the local device (i.e. master), then with the default routing table SFPn is DRTIO destination n+1.

"led0" and "led2" both have "arguments": {"channel": 0x000000}
"led1" and "led3" both have "arguments": {"channel": 0x000001}

If you really want an unusual setup where destination 0 is some satellite, you also need to change the destination bits of the local channels to something else than the default 0.

    sb10q Thanks, the info you gave is perfect, that's all I needed:

    default routing table SFPn is DRTIO destination n+1