forked from M-Labs/artiq
1
0
Fork 0

compiler_test: better RPC example

This commit is contained in:
Sebastien Bourdeauducq 2014-06-16 23:51:43 +02:00
parent 79f20ebfcf
commit 8cb3d33c67
1 changed files with 4 additions and 3 deletions

View File

@ -9,14 +9,15 @@ class CompilerTest(Experiment):
def print_done(self): def print_done(self):
print("Done!") print("Done!")
def print_iter(self, n): def set_some_slowdev(self, n):
print("Iteration: {}".format(n)) print("Slow device setting: {}".format(n))
@kernel @kernel
def run(self, n, t2): def run(self, n, t2):
t2 += 1*us t2 += 1*us
for i in my_range(n): for i in my_range(n):
self.print_iter(i) self.set_some_slowdev(i)
delay(100*ms)
with parallel: with parallel:
with sequential: with sequential:
self.a.pulse(100*MHz, 20*us) self.a.pulse(100*MHz, 20*us)