mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-19 08:26:30 +08:00
29 lines
535 B
Python
29 lines
535 B
Python
|
# RUN: %python -m artiq.compiler.testbench.jit %s >%t
|
||
|
# RUN: OutputCheck %s --file-to-check=%t
|
||
|
|
||
|
def f():
|
||
|
delay_mu(2)
|
||
|
|
||
|
def g():
|
||
|
with parallel:
|
||
|
with sequential:
|
||
|
print("A", now_mu())
|
||
|
f()
|
||
|
#
|
||
|
print("B", now_mu())
|
||
|
with sequential:
|
||
|
print("C", now_mu())
|
||
|
f()
|
||
|
#
|
||
|
print("D", now_mu())
|
||
|
f()
|
||
|
#
|
||
|
print("E", now_mu())
|
||
|
|
||
|
# CHECK-L: A 0
|
||
|
# CHECK-L: C 0
|
||
|
# CHECK-L: B 2
|
||
|
# CHECK-L: D 2
|
||
|
# CHECK-L: E 4
|
||
|
g()
|