From cd2e471b078385cd40983436902e120e7741d804 Mon Sep 17 00:00:00 2001 From: Harry Ho Date: Mon, 29 Mar 2021 17:28:19 +0800 Subject: [PATCH] ddb_template: mirny_cpld: accept clk_sel as a string --- artiq/frontend/artiq_ddb_template.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/artiq/frontend/artiq_ddb_template.py b/artiq/frontend/artiq_ddb_template.py index 932ecd321..3a3c3d55e 100755 --- a/artiq/frontend/artiq_ddb_template.py +++ b/artiq/frontend/artiq_ddb_template.py @@ -268,6 +268,9 @@ class PeripheralManager: name=mirny_name, mchn=i) + clk_sel = peripheral["clk_sel"] + if isinstance(peripheral["clk_sel"], str): + clk_sel = '"' + peripheral["clk_sel"] + '"' self.gen(""" device_db["{name}_cpld"] = {{ "type": "local", @@ -281,7 +284,7 @@ class PeripheralManager: }}""", name=mirny_name, refclk=peripheral["refclk"], - clk_sel=peripheral["clk_sel"]) + clk_sel=clk_sel) return next(channel)