forked from M-Labs/artiq
drtio: add examples
This commit is contained in:
parent
78f18a12eb
commit
8c86920364
|
@ -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}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -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)
|
Loading…
Reference in New Issue