mirror of https://github.com/m-labs/artiq.git
transforms.iodelay_estimator: correctly handle functions with empty body.
This commit is contained in:
parent
e53f26dba0
commit
9bc62fa3d2
|
@ -208,6 +208,7 @@ class Max(Expr):
|
|||
def __init__(self, operands):
|
||||
assert isinstance(operands, list)
|
||||
assert all([isinstance(operand, Expr) for operand in operands])
|
||||
assert operands != []
|
||||
self.operands = operands
|
||||
|
||||
def __str__(self):
|
||||
|
|
|
@ -220,6 +220,7 @@ class IODelayEstimator(algorithm.Visitor):
|
|||
delays.append(self.current_delay)
|
||||
self.current_delay = old_delay
|
||||
|
||||
if any(delays):
|
||||
self.current_delay += iodelay.Max(delays)
|
||||
except _IndeterminateDelay as error:
|
||||
# Interleave failures inside `with` statements are hard failures,
|
||||
|
|
Loading…
Reference in New Issue