diff --git a/artiq/frontend/artiq_ddb_template.py b/artiq/frontend/artiq_ddb_template.py index 50f9eb76a..356d0f3de 100755 --- a/artiq/frontend/artiq_ddb_template.py +++ b/artiq/frontend/artiq_ddb_template.py @@ -757,16 +757,26 @@ def process(output, primary_description, satellites): peripherals, satellite_drtio_peripherals = split_drtio_eem(description["peripherals"]) drtio_peripherals.extend(satellite_drtio_peripherals) - print("# DEST#{} peripherals".format(destination), file=output) - print("device_db[\"satellite_cpu_targets\"][{}] = \"{}\"".format(destination, get_cpu_target(description)), file=output) + print(textwrap.dedent(""" + # DEST#{dest} peripherals + + device_db["satellite_cpu_targets"][{dest}] = \"{target}\"""").format( + dest=destination, + target=get_cpu_target(description)), + file=output) rtio_offset = destination << 16 for peripheral in peripherals: n_channels = pm.process(rtio_offset, peripheral) rtio_offset += n_channels for peripheral in drtio_peripherals: - print("# DEST#{} peripherals".format(peripheral["drtio_destination"]), file=output) - print("device_db[\"satellite_cpu_targets\"][{}] = \"{}\"".format(peripheral["drtio_destination"], get_cpu_target(peripheral)), file=output) + print(textwrap.dedent(""" + # DEST#{dest} peripherals + + device_db["satellite_cpu_targets"][{dest}] = \"{target}\"""").format( + dest=peripheral["drtio_destination"], + target=get_cpu_target(peripheral)), + file=output) processor = getattr(pm, "process_"+str(peripheral["type"])) processor(peripheral)