forked from M-Labs/artiq
1
0
Fork 0

coredevice: restore RTIOCollisionError

This commit is contained in:
Sebastien Bourdeauducq 2015-12-22 11:59:18 +08:00
parent fc299ca918
commit 23355d8eff
2 changed files with 14 additions and 2 deletions

View File

@ -26,6 +26,17 @@ class RTIOSequenceError(ARTIQException):
The offending event is discarded and the RTIO core keeps operating. 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): class RTIOOverflow(ARTIQException):
"""Raised when at least one event could not be registered into the RTIO """Raised when at least one event could not be registered into the RTIO
input FIFO because it was full (CPU not reading fast enough). input FIFO because it was full (CPU not reading fast enough).

View File

@ -5,7 +5,8 @@ from math import sqrt
from artiq.language import * from artiq.language import *
from artiq.test.hardware_testbench import ExperimentCase 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): class RTT(EnvExperiment):
@ -235,7 +236,7 @@ class CoredeviceTest(ExperimentCase):
self.execute(SequenceError) self.execute(SequenceError)
def test_collision_error(self): def test_collision_error(self):
with self.assertRaises(runtime_exceptions.RTIOCollisionError): with self.assertRaises(RTIOCollisionError):
self.execute(CollisionError) self.execute(CollisionError)
def test_watchdog(self): def test_watchdog(self):