mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-25 03:08:27 +08:00
82b470891f
This commit solves issue #2 described in 50e7b44; a function call is now a valid decomposition for a delay instruction, and this metadata is propagated when the interleaver converts delays. However, the interleaver does not yet detect that a called function is compound, i.e. it is not correct.
29 lines
539 B
Python
29 lines
539 B
Python
# RUN: %python -m artiq.compiler.testbench.jit %s >%t
|
|
# RUN: OutputCheck %s --file-to-check=%t
|
|
|
|
def f(n):
|
|
delay_mu(n)
|
|
|
|
def g():
|
|
with parallel:
|
|
with sequential:
|
|
print("A", now_mu())
|
|
f(2)
|
|
#
|
|
print("B", now_mu())
|
|
with sequential:
|
|
print("C", now_mu())
|
|
f(2)
|
|
#
|
|
print("D", now_mu())
|
|
f(2)
|
|
#
|
|
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()
|