forked from M-Labs/artiq
1
0
Fork 0

ddb_template: mirny_cpld: accept clk_sel as a string

This commit is contained in:
Harry Ho 2021-03-29 17:28:19 +08:00 committed by Sebastien Bourdeauducq
parent a23645291c
commit cd2e471b07
1 changed files with 4 additions and 1 deletions

View File

@ -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)