forked from M-Labs/artiq
1
0
Fork 0

minor cleanups

This commit is contained in:
Sebastien Bourdeauducq 2014-09-26 17:21:51 +08:00
parent e0cd45b1ba
commit dd6de244fe
4 changed files with 6 additions and 9 deletions

View File

@ -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

View File

@ -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)

View File

@ -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)