forked from M-Labs/artiq
examples/rtio_skew: use results
This commit is contained in:
parent
45c0e2874f
commit
f684678b91
|
@ -1,10 +1,6 @@
|
||||||
from artiq import *
|
from artiq import *
|
||||||
|
|
||||||
|
|
||||||
def print_skew(p):
|
|
||||||
print("Input/output skew: {} ns".format(p))
|
|
||||||
|
|
||||||
|
|
||||||
def print_failed():
|
def print_failed():
|
||||||
print("Pulse was not received back")
|
print("Pulse was not received back")
|
||||||
|
|
||||||
|
@ -13,6 +9,7 @@ class RTIOSkew(AutoDB):
|
||||||
class DBKeys:
|
class DBKeys:
|
||||||
pmt0 = Device()
|
pmt0 = Device()
|
||||||
ttl0 = Device()
|
ttl0 = Device()
|
||||||
|
io_skew = Result()
|
||||||
|
|
||||||
@kernel
|
@kernel
|
||||||
def run(self):
|
def run(self):
|
||||||
|
@ -26,4 +23,4 @@ class RTIOSkew(AutoDB):
|
||||||
if in_t < 0*s:
|
if in_t < 0*s:
|
||||||
print_failed()
|
print_failed()
|
||||||
else:
|
else:
|
||||||
print_skew(int((out_t - in_t)/(1*ns)))
|
self.io_skew = out_t - in_t
|
||||||
|
|
Loading…
Reference in New Issue