mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-25 11:18:27 +08:00
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 += 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)
|
||||
else:
|
||||
self.abort("with statement cannot be interleaved", node.loc)
|
||||
|
8
lit-test/test/iodelay/sequential.py
Normal file
8
lit-test/test/iodelay/sequential.py
Normal file
@ -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
Block a user