forked from M-Labs/artiq
parent
abb36b42be
commit
37b80247f1
|
@ -2,9 +2,9 @@
|
||||||
# RUN: OutputCheck %s --file-to-check=%t
|
# RUN: OutputCheck %s --file-to-check=%t
|
||||||
|
|
||||||
def f():
|
def f():
|
||||||
delay(1.0)
|
delay_mu(1)
|
||||||
|
|
||||||
# CHECK-L: g: ()->NoneType delay(s->mu(2.0) mu)
|
# CHECK-L: g: ()->NoneType delay(2 mu)
|
||||||
def g():
|
def g():
|
||||||
f()
|
f()
|
||||||
f()
|
f()
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# RUN: %python -m artiq.compiler.testbench.signature %s >%t
|
# RUN: %python -m artiq.compiler.testbench.signature %s >%t
|
||||||
# RUN: OutputCheck %s --file-to-check=%t
|
# RUN: OutputCheck %s --file-to-check=%t
|
||||||
|
|
||||||
# CHECK-L: g: (i:<instance c {}>)->NoneType delay(s->mu(1.0) mu)
|
# CHECK-L: g: (i:<instance c {}>)->NoneType delay(1000000 mu)
|
||||||
def g(i):
|
def g(i):
|
||||||
i.f(1.0)
|
i.f(1.0)
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
# RUN: %python -m artiq.compiler.testbench.signature %s >%t
|
# RUN: %python -m artiq.compiler.testbench.signature %s >%t
|
||||||
# RUN: OutputCheck %s --file-to-check=%t
|
# RUN: OutputCheck %s --file-to-check=%t
|
||||||
|
|
||||||
# CHECK-L: f: ()->NoneType delay(s->mu(1.0) + 1000 mu)
|
# CHECK-L: f: ()->NoneType delay(1001000 mu)
|
||||||
def f():
|
def f():
|
||||||
delay(1.0)
|
delay(1.0)
|
||||||
delay_mu(1000)
|
delay_mu(1000)
|
||||||
|
|
||||||
# CHECK-L: g: ()->NoneType delay(s->mu(5.0) mu)
|
# CHECK-L: g: ()->NoneType delay(3 mu)
|
||||||
def g():
|
def g():
|
||||||
delay(1.0)
|
delay_mu(1)
|
||||||
delay(2.0 * 2)
|
delay_mu(2)
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
# RUN: %python -m artiq.compiler.testbench.signature %s >%t
|
# RUN: %python -m artiq.compiler.testbench.signature %s >%t
|
||||||
# RUN: OutputCheck %s --file-to-check=%t
|
# RUN: OutputCheck %s --file-to-check=%t
|
||||||
|
|
||||||
# CHECK-L: f: ()->NoneType delay(s->mu(1.5) * 10 mu)
|
# CHECK-L: f: ()->NoneType delay(30 mu)
|
||||||
def f():
|
def f():
|
||||||
for _ in range(10):
|
for _ in range(10):
|
||||||
delay(1.5)
|
delay_mu(3)
|
||||||
|
|
||||||
# CHECK-L: g: ()->NoneType delay(s->mu(1.5) * 2 * 10 mu)
|
# CHECK-L: g: ()->NoneType delay(60 mu)
|
||||||
def g():
|
def g():
|
||||||
for _ in range(10):
|
for _ in range(10):
|
||||||
for _ in range(2):
|
for _ in range(2):
|
||||||
delay(1.5)
|
delay_mu(3)
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
# RUN: %python -m artiq.compiler.testbench.signature %s >%t
|
# RUN: %python -m artiq.compiler.testbench.signature %s >%t
|
||||||
# RUN: OutputCheck %s --file-to-check=%t
|
# RUN: OutputCheck %s --file-to-check=%t
|
||||||
|
|
||||||
# CHECK-L: g: ()->NoneType delay(s->mu(2.0) mu)
|
# CHECK-L: g: ()->NoneType delay(2 mu)
|
||||||
def g():
|
def g():
|
||||||
f()
|
f()
|
||||||
f()
|
f()
|
||||||
|
|
||||||
def f():
|
def f():
|
||||||
delay(1.0)
|
delay_mu(1)
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
# RUN: %python -m artiq.compiler.testbench.signature %s >%t
|
# RUN: %python -m artiq.compiler.testbench.signature %s >%t
|
||||||
# RUN: OutputCheck %s --file-to-check=%t
|
# RUN: OutputCheck %s --file-to-check=%t
|
||||||
|
|
||||||
# CHECK-L: f: (a:int(width=32))->NoneType delay(s->mu(1.5) * a mu)
|
# CHECK-L: f: (a:int(width=32))->NoneType delay(3 * a mu)
|
||||||
def f(a):
|
def f(a):
|
||||||
for _ in range(a):
|
for _ in range(a):
|
||||||
delay(1.5)
|
delay_mu(3)
|
||||||
|
|
||||||
# CHECK-L: g: (a:int(width=32), b:int(width=32))->NoneType delay(s->mu(1.5) * (b - a) mu)
|
# CHECK-L: g: (a:int(width=32), b:int(width=32))->NoneType delay(3 * (b - a) mu)
|
||||||
def g(a, b):
|
def g(a, b):
|
||||||
for _ in range(a, b):
|
for _ in range(a, b):
|
||||||
delay(1.5)
|
delay_mu(3)
|
||||||
|
|
||||||
# CHECK-L: h: (a:int(width=32), b:int(width=32), c:int(width=32))->NoneType delay(s->mu(1.5) * (b - a) // c mu)
|
# CHECK-L: h: (a:int(width=32), b:int(width=32), c:int(width=32))->NoneType delay(3 * (b - a) // c mu)
|
||||||
def h(a, b, c):
|
def h(a, b, c):
|
||||||
for _ in range(a, b, c):
|
for _ in range(a, b, c):
|
||||||
delay(1.5)
|
delay_mu(3)
|
||||||
|
|
||||||
f(1)
|
f(1)
|
||||||
g(1,2)
|
g(1,2)
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
# RUN: %python -m artiq.compiler.testbench.signature %s >%t
|
# RUN: %python -m artiq.compiler.testbench.signature %s >%t
|
||||||
# RUN: OutputCheck %s --file-to-check=%t
|
# RUN: OutputCheck %s --file-to-check=%t
|
||||||
|
|
||||||
# CHECK-L: f: ()->int(width=32) delay(s->mu(1.5) * 10 mu)
|
# CHECK-L: f: ()->int(width=32) delay(30 mu)
|
||||||
def f():
|
def f():
|
||||||
for _ in range(10):
|
for _ in range(10):
|
||||||
delay(1.5)
|
delay_mu(3)
|
||||||
return 10
|
return 10
|
||||||
|
|
||||||
# CHECK-L: g: (x:float)->int(width=32)
|
# CHECK-L: g: (x:float)->int(width=32)
|
||||||
|
|
Loading…
Reference in New Issue