artiq_ddb_template: enable Urukul synchronization from EEPROM

This commit is contained in:
Sebastien Bourdeauducq 2019-03-13 15:42:51 +08:00
parent e504262b67
commit 5e7c83c9cf
1 changed files with 4 additions and 2 deletions

View File

@ -179,13 +179,15 @@ class PeripheralManager:
"pll_n": 32, "pll_n": 32,
"chip_select": {chip_select}, "chip_select": {chip_select},
"cpld_device": "{name}_cpld", "cpld_device": "{name}_cpld",
"sw_device": "ttl_{name}_sw{uchn}"{pll_vco} "sw_device": "ttl_{name}_sw{uchn}"{pll_vco}{sync_delay_seed}{io_update_delay}
}} }}
}}""", }}""",
name=urukul_name, name=urukul_name,
chip_select=4 + i, chip_select=4 + i,
uchn=i, uchn=i,
pll_vco=",\n \"pll_vco\": {}".format(pll_vco) if pll_vco is not None else "") pll_vco=",\n \"pll_vco\": {}".format(pll_vco) if pll_vco is not None else "",
sync_delay_seed=",\n \"sync_delay_seed\": \"eeprom_{}:{}\"".format(urukul_name, 48 + 4*i) if synchronization else "",
io_update_delay=",\n \"io_update_delay\": \"eeprom_{}:{}\"".format(urukul_name, 48 + 4*i) if synchronization else "")
elif dds == "ad9912": elif dds == "ad9912":
self.gen(""" self.gen("""
device_db["{name}_ch{uchn}"] = {{ device_db["{name}_ch{uchn}"] = {{