From 833fd8760e316ddd93f1202501994b872b4def3c Mon Sep 17 00:00:00 2001 From: Leon Riesebos <28567817+lriesebos@users.noreply.github.com> Date: Mon, 26 Jun 2023 12:59:20 -0400 Subject: [PATCH] artiq_ddb_template: use the clk_div field this field exists in the json schema but was not used. Signed-off-by: Leon Riesebos <28567817+lriesebos@users.noreply.github.com> --- artiq/coredevice/coredevice_generic.schema.json | 3 ++- artiq/frontend/artiq_ddb_template.py | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/artiq/coredevice/coredevice_generic.schema.json b/artiq/coredevice/coredevice_generic.schema.json index 66b54d5fc..a695c3850 100644 --- a/artiq/coredevice/coredevice_generic.schema.json +++ b/artiq/coredevice/coredevice_generic.schema.json @@ -308,7 +308,8 @@ "clk_div": { "type": "integer", "minimum": 0, - "maximum": 3 + "maximum": 3, + "default": 0 }, "pll_n": { "type": "integer" diff --git a/artiq/frontend/artiq_ddb_template.py b/artiq/frontend/artiq_ddb_template.py index 40e193e8f..15dcbf642 100755 --- a/artiq/frontend/artiq_ddb_template.py +++ b/artiq/frontend/artiq_ddb_template.py @@ -232,13 +232,15 @@ class PeripheralManager: "sync_device": {sync_device}, "io_update_device": "ttl_{name}_io_update", "refclk": {refclk}, - "clk_sel": {clk_sel} + "clk_sel": {clk_sel}, + "clk_div": {clk_div} }} }}""", name=urukul_name, sync_device="\"ttl_{name}_sync\"".format(name=urukul_name) if synchronization else "None", refclk=peripheral.get("refclk", self.primary_description["rtio_frequency"]), - clk_sel=peripheral["clk_sel"]) + clk_sel=peripheral["clk_sel"], + clk_div=peripheral["clk_div"]) dds = peripheral["dds"] pll_vco = peripheral.get("pll_vco") for i in range(4):