2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-22 18:04:03 +08:00
artiq/lit-test/test/iodelay/return.py

18 lines
339 B
Python

# RUN: %python -m artiq.compiler.testbench.signature %s >%t
# RUN: OutputCheck %s --file-to-check=%t
# CHECK-L: f: ()->int(width=32) delay(30 mu)
def f():
for _ in range(10):
delay_mu(3)
return 10
# CHECK-L: g: (x:float)->int(width=32)
# CHECK-NOT-L: delay
def g(x):
if x > 1.0:
return 1
return 0
g(1.0)