mirror of https://github.com/m-labs/artiq.git
artiq_ddb_template: add Mirny support
Signed-off-by: Etienne Wodey <wodey@iqo.uni-hannover.de>
This commit is contained in:
parent
01a6e77d89
commit
da531404e8
|
@ -228,6 +228,57 @@ class PeripheralManager:
|
||||||
raise ValueError
|
raise ValueError
|
||||||
return next(channel)
|
return next(channel)
|
||||||
|
|
||||||
|
def process_mirny(self, rtio_offset, peripheral):
|
||||||
|
mirny_name = self.get_name("mirny")
|
||||||
|
channel = count(0)
|
||||||
|
self.gen("""
|
||||||
|
device_db["spi_{name}"]={{
|
||||||
|
"type": "local",
|
||||||
|
"module": "artiq.coredevice.spi2",
|
||||||
|
"class": "SPIMaster",
|
||||||
|
"arguments": {{"channel": 0x{channel:06x}}}
|
||||||
|
}}""",
|
||||||
|
name=mirny_name,
|
||||||
|
channel=rtio_offset+next(channel))
|
||||||
|
|
||||||
|
for i in range(4):
|
||||||
|
self.gen("""
|
||||||
|
device_db["ttl_{name}_sw{mchn}"] = {{
|
||||||
|
"type": "local",
|
||||||
|
"module": "artiq.coredevice.ttl",
|
||||||
|
"class": "TTLOut",
|
||||||
|
"arguments": {{"channel": 0x{ttl_channel:06x}}}
|
||||||
|
}}""",
|
||||||
|
name=mirny_name,
|
||||||
|
mchn=i,
|
||||||
|
ttl_channel=rtio_offset+next(channel))
|
||||||
|
|
||||||
|
for i in range(4):
|
||||||
|
self.gen("""
|
||||||
|
device_db["{name}_ch{mchn}"] = {{
|
||||||
|
"type": "local",
|
||||||
|
"module": "artiq.coredevice.adf5355",
|
||||||
|
"class": "ADF5355",
|
||||||
|
"arguments": {{
|
||||||
|
"channel": {mchn},
|
||||||
|
"sw_device": "ttl_{name}_sw{mchn}",
|
||||||
|
"cpld_device": "{name}_cpld",
|
||||||
|
}}
|
||||||
|
}}""",
|
||||||
|
name=mirny_name,
|
||||||
|
mchn=i)
|
||||||
|
|
||||||
|
self.gen("""
|
||||||
|
device_db["{name}_cpld"] = {{
|
||||||
|
"type": "local",
|
||||||
|
"module": "artiq.coredevice.mirny",
|
||||||
|
"class": "Mirny",
|
||||||
|
"arguments": {{"spi_device": "spi_{name}"}},
|
||||||
|
}}""",
|
||||||
|
name=mirny_name)
|
||||||
|
|
||||||
|
return next(channel)
|
||||||
|
|
||||||
def process_novogorny(self, rtio_offset, peripheral):
|
def process_novogorny(self, rtio_offset, peripheral):
|
||||||
self.gen("""
|
self.gen("""
|
||||||
device_db["spi_{name}_adc"] = {{
|
device_db["spi_{name}_adc"] = {{
|
||||||
|
|
Loading…
Reference in New Issue