2015-09-03 07:46:09 +08:00
|
|
|
# RUN: %python -m artiq.compiler.testbench.signature %s >%t
|
|
|
|
# RUN: OutputCheck %s --file-to-check=%t
|
|
|
|
|
2015-11-24 00:20:00 +08:00
|
|
|
# CHECK-L: f: ()->int(width=32) delay(30 mu)
|
2015-09-03 07:46:09 +08:00
|
|
|
def f():
|
|
|
|
for _ in range(10):
|
2015-11-24 00:20:00 +08:00
|
|
|
delay_mu(3)
|
2015-09-03 07:46:09 +08:00
|
|
|
return 10
|
|
|
|
|
2015-09-30 23:41:14 +08:00
|
|
|
# CHECK-L: g: (x:float)->int(width=32)
|
|
|
|
# CHECK-NOT-L: delay
|
2015-09-03 07:46:09 +08:00
|
|
|
def g(x):
|
|
|
|
if x > 1.0:
|
|
|
|
return 1
|
|
|
|
return 0
|
|
|
|
|
|
|
|
g(1.0)
|