From 05b128469f8aeecd04487ce8b5e283ff7ce92cb8 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Fri, 22 Feb 2019 22:59:20 +0800 Subject: [PATCH] artiq_ddb_template: support setting Urukul pll_vco --- artiq/frontend/artiq_ddb_template.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/artiq/frontend/artiq_ddb_template.py b/artiq/frontend/artiq_ddb_template.py index f1c9c3af1..2665aa215 100755 --- a/artiq/frontend/artiq_ddb_template.py +++ b/artiq/frontend/artiq_ddb_template.py @@ -159,6 +159,7 @@ class PeripheralManager: refclk=peripheral.get("refclk", self.master_description.get("rtio_frequency", 125e6)), clk_sel=peripheral["clk_sel"]) dds = peripheral.get("dds", "ad9910") + pll_vco = peripheral.get("pll_vco", None) for i in range(4): if dds == "ad9910": self.gen(""" @@ -170,12 +171,13 @@ class PeripheralManager: "pll_n": 32, "chip_select": {chip_select}, "cpld_device": "{name}_cpld", - "sw_device": "ttl_{name}_sw{uchn}" + "sw_device": "ttl_{name}_sw{uchn}"{pll_vco} }} }}""", name=urukul_name, chip_select=4 + i, - uchn=i) + uchn=i, + pll_vco=",\n\"pll_vco\": {}".format(pll_vco) if pll_vco is not None else "") elif dds == "ad9912": self.gen(""" device_db["{name}_ch{uchn}"] = {{ @@ -186,12 +188,13 @@ class PeripheralManager: "pll_n": 8, "chip_select": {chip_select}, "cpld_device": "{name}_cpld", - "sw_device": "ttl_{name}_sw{uchn}" + "sw_device": "ttl_{name}_sw{uchn}"{pll_vco} }} }}""", name=urukul_name, chip_select=4 + i, - uchn=i) + uchn=i, + pll_vco=",\n\"pll_vco\": {}".format(pll_vco) if pll_vco is not None else "") else: raise ValueError return next(channel)