Skip to content

Commit

Permalink
coredevice: restore RTIOCollisionError
Browse files Browse the repository at this point in the history
sbourdeauducq committed Dec 22, 2015
1 parent fc299ca commit 23355d8
Showing 2 changed files with 14 additions and 2 deletions.
11 changes: 11 additions & 0 deletions artiq/coredevice/exceptions.py
Original file line number Diff line number Diff line change
@@ -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).
5 changes: 3 additions & 2 deletions artiq/test/coredevice/rtio.py
Original file line number Diff line number Diff line change
@@ -5,7 +5,8 @@

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 @@ def test_sequence_error(self):
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):

0 comments on commit 23355d8

Please sign in to comment.