mirror of https://github.com/m-labs/artiq.git
ddb_template: support urukul single-eem mode
This commit is contained in:
parent
967d192cbe
commit
591de0e579
|
@ -112,7 +112,6 @@ class PeripheralManager:
|
||||||
channel=rtio_offset+next(channel))
|
channel=rtio_offset+next(channel))
|
||||||
return next(channel)
|
return next(channel)
|
||||||
|
|
||||||
# TODO: support 1-EEM mode
|
|
||||||
def process_urukul(self, rtio_offset, peripheral):
|
def process_urukul(self, rtio_offset, peripheral):
|
||||||
urukul_name = self.get_name("urukul")
|
urukul_name = self.get_name("urukul")
|
||||||
synchronization = peripheral.get("synchronization", False)
|
synchronization = peripheral.get("synchronization", False)
|
||||||
|
@ -153,6 +152,7 @@ class PeripheralManager:
|
||||||
}}""",
|
}}""",
|
||||||
name=urukul_name,
|
name=urukul_name,
|
||||||
channel=rtio_offset+next(channel))
|
channel=rtio_offset+next(channel))
|
||||||
|
if len(peripheral["ports"]) > 1:
|
||||||
for i in range(4):
|
for i in range(4):
|
||||||
self.gen("""
|
self.gen("""
|
||||||
device_db["ttl_{name}_sw{uchn}"] = {{
|
device_db["ttl_{name}_sw{uchn}"] = {{
|
||||||
|
@ -193,13 +193,13 @@ class PeripheralManager:
|
||||||
"arguments": {{
|
"arguments": {{
|
||||||
"pll_n": 32,
|
"pll_n": 32,
|
||||||
"chip_select": {chip_select},
|
"chip_select": {chip_select},
|
||||||
"cpld_device": "{name}_cpld",
|
"cpld_device": "{name}_cpld"{pll_vco}{sync_delay_seed}{io_update_delay}
|
||||||
"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,
|
||||||
|
sw=",\n \"sw_device\": \"ttl_{name}_sw{uchn}\"".format(name=urukul_name, uchn=i) if len(peripheral["ports"]) > 1 else "",
|
||||||
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, 64 + 4*i) if synchronization else "",
|
sync_delay_seed=",\n \"sync_delay_seed\": \"eeprom_{}:{}\"".format(urukul_name, 64 + 4*i) if synchronization else "",
|
||||||
io_update_delay=",\n \"io_update_delay\": \"eeprom_{}:{}\"".format(urukul_name, 64 + 4*i) if synchronization else "")
|
io_update_delay=",\n \"io_update_delay\": \"eeprom_{}:{}\"".format(urukul_name, 64 + 4*i) if synchronization else "")
|
||||||
|
|
Loading…
Reference in New Issue