forked from M-Labs/artiq
1
0
Fork 0

artiq_ddb_template:set default Shuttler drtio_dest

- remove default Shuttler "drtio_destination" value in jsonschema
- set the default Shuttler "drtio_destination" value according to
    board "target" and "hw_rev"
This commit is contained in:
linuswck 2023-10-12 10:33:06 +08:00 committed by Sébastien Bourdeauducq
parent e480bbe8d8
commit 93c9d8bcdf
2 changed files with 12 additions and 3 deletions

View File

@ -630,8 +630,7 @@
"maxItems": 2
},
"drtio_destination": {
"type": "integer",
"default": 4
"type": "integer"
}
},
"required": ["ports"]

View File

@ -767,7 +767,17 @@ def process(output, primary_description, satellites):
n_channels = pm.process(rtio_offset, peripheral)
rtio_offset += n_channels
for peripheral in drtio_peripherals:
for i, peripheral in enumerate(drtio_peripherals):
if not("drtio_destination" in peripheral):
if primary_description["target"] == "kasli":
if primary_description["hw_rev"] in ("v1.0", "v1.1"):
peripheral["drtio_destination"] = 3 + i
else:
peripheral["drtio_destination"] = 4 + i
elif primary_description["target"] == "kasli_soc":
peripheral["drtio_destination"] = 5 + i
else:
raise NotImplementedError
print(textwrap.dedent("""
# DEST#{dest} peripherals