From 831b3514d3e430c68da2a9079a666cabe9e09384 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Fri, 19 Jul 2019 16:27:29 +0800 Subject: [PATCH] wrpll/thls: stop at return statement --- artiq/gateware/wrpll/thls.py | 2 ++ 1 file changed, 2 insertions(+) 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()