diff --git a/artiq/examples/drtio/device_db.pyon b/artiq/examples/drtio/device_db.pyon new file mode 100644 index 000000000..850950165 --- /dev/null +++ b/artiq/examples/drtio/device_db.pyon @@ -0,0 +1,52 @@ +# This is an example device database that needs to be adapted to your setup. +# The RTIO channel numbers here are for NIST CLOCK on KC705. +# The list of devices here is not exhaustive. + +{ + "comm": { + "type": "local", + "module": "artiq.coredevice.comm_tcp", + "class": "Comm", + "arguments": {"host": "kc705.lab.m-labs.hk"} + }, + "core": { + "type": "local", + "module": "artiq.coredevice.core", + "class": "Core", + "arguments": {"ref_period": 16e-9} + }, + "core_cache": { + "type": "local", + "module": "artiq.coredevice.cache", + "class": "CoreCache" + }, + + "rled0": { + "type": "local", + "module": "artiq.coredevice.ttl", + "class": "TTLOut", + "arguments": {"channel": 0}, + }, + "rled1": { + "type": "local", + "module": "artiq.coredevice.ttl", + "class": "TTLOut", + "arguments": {"channel": 1}, + "comment": "Hello World" + }, + + "rsmap": { + "type": "local", + "module": "artiq.coredevice.ttl", + "class": "TTLOut", + "arguments": {"channel": 8} + }, + "rsman": { + "type": "local", + "module": "artiq.coredevice.ttl", + "class": "TTLOut", + "arguments": {"channel": 9} + }, + + +} diff --git a/artiq/examples/drtio/repository/blink_forever.py b/artiq/examples/drtio/repository/blink_forever.py new file mode 100644 index 000000000..0d6fa8ff8 --- /dev/null +++ b/artiq/examples/drtio/repository/blink_forever.py @@ -0,0 +1,14 @@ +from artiq.experiment import * + + +class BlinkForever(EnvExperiment): + def build(self): + self.setattr_device("core") + self.setattr_device("rled0") + + @kernel + def run(self): + self.core.reset() + while True: + self.rled0.pulse(100*ms) + delay(100*ms)