diff --git a/artiq/gateware/wrpll/thls.py b/artiq/gateware/wrpll/thls.py index a3e97f32f..dc95e343d 100644 --- a/artiq/gateware/wrpll/thls.py +++ b/artiq/gateware/wrpll/thls.py @@ -286,6 +286,8 @@ def compile(processor, function): arg_r = astcompiler.input(arg) for node in body: astcompiler.emit(node) + if isinstance(node, ast.Return): + break scheduler = Scheduler(processor, len(astcompiler.data), astcompiler.program) scheduler.schedule()