artiq_ddb_template: create Urukul EEPROM device

This commit is contained in:
Sebastien Bourdeauducq 2019-03-13 15:34:23 +08:00
parent 964a349a19
commit 852048dce4
1 changed files with 8 additions and 0 deletions

View File

@ -103,6 +103,13 @@ class PeripheralManager:
synchronization = peripheral.get("synchronization", False)
channel = count(0)
self.gen("""
device_db["eeprom_{name}"]={{
"type": "local",
"module": "artiq.coredevice.kasli_i2c",
"class": "KasliEEPROM",
"arguments": {{"port": "EEM{eem}"}}
}},
device_db["spi_{name}"]={{
"type": "local",
"module": "artiq.coredevice.spi2",
@ -110,6 +117,7 @@ class PeripheralManager:
"arguments": {{"channel": 0x{channel:06x}}}
}}""",
name=urukul_name,
eem=peripheral["ports"][0],
channel=rtio_offset+next(channel))
if synchronization:
self.gen("""