forked from M-Labs/artiq
transforms.iodelay_estimator: fix handling of `with sequential`.
This commit is contained in:
parent
506725f78a
commit
e619154c81
|
@ -216,7 +216,7 @@ class IODelayEstimator(algorithm.Visitor):
|
||||||
self.current_delay = old_delay
|
self.current_delay = old_delay
|
||||||
|
|
||||||
self.current_delay += iodelay.Max(delays)
|
self.current_delay += iodelay.Max(delays)
|
||||||
elif len(node.items) == 1 and types.is_builtin(context_expr.type, "serial"):
|
elif len(node.items) == 1 and types.is_builtin(context_expr.type, "sequential"):
|
||||||
self.visit(node.body)
|
self.visit(node.body)
|
||||||
else:
|
else:
|
||||||
self.abort("with statement cannot be interleaved", node.loc)
|
self.abort("with statement cannot be interleaved", node.loc)
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
# RUN: %python -m artiq.compiler.testbench.signature %s >%t
|
||||||
|
# RUN: OutputCheck %s --file-to-check=%t
|
||||||
|
|
||||||
|
# CHECK-L: f: (a:int(width=64), b:int(width=64))->NoneType delay(a + b mu)
|
||||||
|
def f(a, b):
|
||||||
|
with sequential:
|
||||||
|
delay_mu(a)
|
||||||
|
delay_mu(b)
|
Loading…
Reference in New Issue