diff --git a/artiq/coredevice/exceptions.py b/artiq/coredevice/exceptions.py index d0f54f2fa..edaf8f14e 100644 --- a/artiq/coredevice/exceptions.py +++ b/artiq/coredevice/exceptions.py @@ -26,6 +26,17 @@ class RTIOSequenceError(ARTIQException): The offending event is discarded and the RTIO core keeps operating. """ +class RTIOCollisionError(ARTIQException): + """Raised when an event is submitted on a given channel with the same + coarse timestamp as the previous one but with a different fine timestamp. + + Coarse timestamps correspond to the RTIO system clock (typically around + 125MHz) whereas fine timestamps correspond to the RTIO SERDES clock + (typically around 1GHz). + + The offending event is discarded and the RTIO core keeps operating. + """ + class RTIOOverflow(ARTIQException): """Raised when at least one event could not be registered into the RTIO input FIFO because it was full (CPU not reading fast enough). diff --git a/artiq/test/coredevice/rtio.py b/artiq/test/coredevice/rtio.py index 43acdc237..b12f98629 100644 --- a/artiq/test/coredevice/rtio.py +++ b/artiq/test/coredevice/rtio.py @@ -5,7 +5,8 @@ from math import sqrt from artiq.language import * from artiq.test.hardware_testbench import ExperimentCase -from artiq.coredevice.exceptions import RTIOUnderflow, RTIOSequenceError +from artiq.coredevice.exceptions import (RTIOUnderflow, RTIOSequenceError, + RTIOCollisionError) class RTT(EnvExperiment): @@ -235,7 +236,7 @@ class CoredeviceTest(ExperimentCase): self.execute(SequenceError) def test_collision_error(self): - with self.assertRaises(runtime_exceptions.RTIOCollisionError): + with self.assertRaises(RTIOCollisionError): self.execute(CollisionError) def test_watchdog(self):