From d42ff8114443ef9d0b30aa6f1934f6f294fb015e Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Wed, 16 Oct 2019 18:49:25 +0800 Subject: [PATCH] examples/sayma_master: update device_db --- artiq/examples/sayma_master/device_db.py | 40 +++++++++++++++--------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/artiq/examples/sayma_master/device_db.py b/artiq/examples/sayma_master/device_db.py index e3a4e00fe..51eede704 100644 --- a/artiq/examples/sayma_master/device_db.py +++ b/artiq/examples/sayma_master/device_db.py @@ -23,44 +23,54 @@ device_db = { "module": "artiq.coredevice.dma", "class": "CoreDMA" }, +} - "fmcdio_dirctl_clk": { +for i in range(4): + device_db["led" + str(i)] = { + "type": "local", + "module": "artiq.coredevice.ttl", + "class": "TTLOut", + "arguments": {"channel": i}, + } + + +for i in range(2): + device_db["ttl" + str(i)] = { + "type": "local", + "module": "artiq.coredevice.ttl", + "class": "TTLInOut", + "arguments": {"channel": 4 + i}, + } + + +device_db.update( + fmcdio_dirctl_clk={ "type": "local", "module": "artiq.coredevice.ttl", "class": "TTLOut", "arguments": {"channel": 6} }, - "fmcdio_dirctl_ser": { + fmcdio_dirctl_ser={ "type": "local", "module": "artiq.coredevice.ttl", "class": "TTLOut", "arguments": {"channel": 7} }, - "fmcdio_dirctl_latch": { + fmcdio_dirctl_latch={ "type": "local", "module": "artiq.coredevice.ttl", "class": "TTLOut", "arguments": {"channel": 8} }, - "fmcdio_dirctl": { + fmcdio_dirctl={ "type": "local", "module": "artiq.coredevice.shiftreg", "class": "ShiftReg", "arguments": {"clk": "fmcdio_dirctl_clk", "ser": "fmcdio_dirctl_ser", "latch": "fmcdio_dirctl_latch"} - }, -} - - -for i in range(8): - device_db["ttl" + str(i)] = { - "type": "local", - "module": "artiq.coredevice.ttl", - "class": "TTLOut", - "arguments": {"channel": 9+i}, } - +) device_db.update( spi_urukul0={