2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-25 03:08:27 +08:00

transforms/lower_time: fix time_to_cycles/cycles_to_time

This commit is contained in:
Sebastien Bourdeauducq 2014-10-11 00:35:49 +08:00
parent 1c24a5971b
commit c659acb26e

View File

@ -46,9 +46,9 @@ class _TimeLowerer(ast.NodeTransformer):
self.ref_period,
ast.copy_location(ast.Name("now", ast.Load()), node))
elif funcname == "time_to_cycles":
return _time_to_cycles(self.ref_period, node)
return _time_to_cycles(self.ref_period, node.args[0])
elif funcname == "cycles_to_time":
return _cycles_to_time(self.ref_period, node)
return _cycles_to_time(self.ref_period, node.args[0])
return node
def visit_Expr(self, node):