From 23355d8eff7244fb6b37e7295932186d1b518e93 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Tue, 22 Dec 2015 11:59:18 +0800 Subject: [PATCH] coredevice: restore RTIOCollisionError --- artiq/coredevice/exceptions.py | 11 +++++++++++ artiq/test/coredevice/rtio.py | 5 +++-- 2 files changed, 14 insertions(+), 2 deletions(-) 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):