diff --git a/artiq/language/core.py b/artiq/language/core.py index e607521a3..79ab87a89 100644 --- a/artiq/language/core.py +++ b/artiq/language/core.py @@ -330,8 +330,6 @@ def syscall(*args): _encoded_exceptions = dict() -first_user_eid = 1024 - def EncodedException(eid): """Represents exceptions on the core device, which are identified @@ -346,3 +344,6 @@ def EncodedException(eid): Exception.__init__(self, eid) _encoded_exceptions[eid] = EncodedException return EncodedException + + +first_user_eid = 1024 diff --git a/artiq/transforms/lower_units.py b/artiq/transforms/lower_units.py index 16017a372..9b79c839e 100644 --- a/artiq/transforms/lower_units.py +++ b/artiq/transforms/lower_units.py @@ -1,7 +1,6 @@ import ast from artiq.transforms.tools import value_to_ast -from artiq.language import units # TODO: @@ -41,7 +40,4 @@ class _UnitsLowerer(ast.NodeTransformer): def lower_units(func_def, ref_period): - if (not isinstance(ref_period, units.Quantity) - or ref_period.unit is not units.s_unit): - raise units.DimensionError("Reference period not expressed in seconds") _UnitsLowerer(ref_period.amount).visit(func_def) diff --git a/test/full_stack.py b/test/full_stack.py index 05392eb30..744e55292 100644 --- a/test/full_stack.py +++ b/test/full_stack.py @@ -105,7 +105,7 @@ class _RTIOUnderflow(AutoContext): @kernel def run(self): - for i in range(10000): + while True: delay(25*ns) self.o.pulse(25*ns) diff --git a/test/py2llvm.py b/test/py2llvm.py index 4f9465f39..b957032a5 100644 --- a/test/py2llvm.py +++ b/test/py2llvm.py @@ -205,8 +205,8 @@ def _test_range(): class CodeGenCase(unittest.TestCase): def _test_float_arith(self, op): arith_c = CompiledFunction(arith, { - "op": base_types.VInt(), - "a": base_types.VFloat(), "b": base_types.VFloat()}) + "op": base_types.VInt(), + "a": base_types.VFloat(), "b": base_types.VFloat()}) for a in _test_range(): for b in _test_range(): self.assertEqual(arith_c(op, a/2, b/2), arith(op, a/2, b/2))