From c3030f4ffb9a8ce48fc7f94c6975211843c5181a Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Fri, 20 Dec 2019 19:59:15 +0800 Subject: [PATCH] kasli_sawgmaster: update device_db for BaseMod --- artiq/examples/kasli_sawgmaster/device_db.py | 99 +++++++++++++++++--- 1 file changed, 85 insertions(+), 14 deletions(-) diff --git a/artiq/examples/kasli_sawgmaster/device_db.py b/artiq/examples/kasli_sawgmaster/device_db.py index 68fa62e0a..781db5b56 100644 --- a/artiq/examples/kasli_sawgmaster/device_db.py +++ b/artiq/examples/kasli_sawgmaster/device_db.py @@ -97,18 +97,89 @@ for i in range(4): } } -for i in range(8): - device_db["sawg" + str(i)] = { - "type": "local", - "module": "artiq.coredevice.sawg", - "class": "SAWG", - "arguments": {"channel_base": i*10+0x010006, "parallelism": 4} - } +""" +artiq_route routing.bin init +artiq_route routing.bin set 0 0 +artiq_route routing.bin set 1 1 0 +artiq_route routing.bin set 2 1 1 0 +artiq_route routing.bin set 3 2 0 +artiq_route routing.bin set 4 2 1 0 +artiq_coremgmt -D kasli config write -f routing_table routing.bin +""" + +for sayma in range(2): + amc_base = 0x010000 + sayma*0x020000 + rtm_base = 0x020000 + sayma*0x020000 + for i in range(4): + device_db["led" + str(4*sayma+i)] = { + "type": "local", + "module": "artiq.coredevice.ttl", + "class": "TTLOut", + "arguments": {"channel": amc_base + i} + } + for i in range(2): + device_db["ttl_mcx" + str(2*sayma+i)] = { + "type": "local", + "module": "artiq.coredevice.ttl", + "class": "TTLInOut", + "arguments": {"channel": amc_base + 4 + i} + } + for i in range(8): + device_db["sawg" + str(8*sayma+i)] = { + "type": "local", + "module": "artiq.coredevice.sawg", + "class": "SAWG", + "arguments": {"channel_base": amc_base + 6 + i*10, "parallelism": 4} + } + for basemod in range(2): + for i in range(4): + device_db["sawg_sw" + str(8*sayma+4*basemod+i)] = { + "type": "local", + "module": "artiq.coredevice.ttl", + "class": "TTLOut", + "arguments": {"channel": rtm_base + basemod*9 + i} + } + att_idx = 2*sayma + basemod + device_db["basemod_att_rst_n"+str(att_idx)] = { + "type": "local", + "module": "artiq.coredevice.ttl", + "class": "TTLOut", + "arguments": {"channel": rtm_base + basemod*9 + 4} + } + device_db["basemod_att_clk"+str(att_idx)] = { + "type": "local", + "module": "artiq.coredevice.ttl", + "class": "TTLOut", + "arguments": {"channel": rtm_base + basemod*9 + 5} + } + device_db["basemod_att_le"+str(att_idx)] = { + "type": "local", + "module": "artiq.coredevice.ttl", + "class": "TTLOut", + "arguments": {"channel": rtm_base + basemod*9 + 6} + } + device_db["basemod_att_mosi"+str(att_idx)] = { + "type": "local", + "module": "artiq.coredevice.ttl", + "class": "TTLOut", + "arguments": {"channel": rtm_base + basemod*9 + 7} + } + device_db["basemod_att_miso"+str(att_idx)] = { + "type": "local", + "module": "artiq.coredevice.ttl", + "class": "TTLInOut", + "arguments": {"channel": rtm_base + basemod*9 + 8} + } + device_db["basemod_att"+str(att_idx)] = { + "type": "local", + "module": "artiq.coredevice.basemod_att", + "class": "BaseModAtt", + "arguments": { + "rst_n": "basemod_att_rst_n"+str(att_idx), + "clk": "basemod_att_clk"+str(att_idx), + "le": "basemod_att_le"+str(att_idx), + "mosi": "basemod_att_mosi"+str(att_idx), + "miso": "basemod_att_miso"+str(att_idx), + } + } -for i in range(8): - device_db["sawg" + str(8+i)] = { - "type": "local", - "module": "artiq.coredevice.sawg", - "class": "SAWG", - "arguments": {"channel_base": i*10+0x020006, "parallelism": 4} - }