forked from M-Labs/artiq
test_write_underflow: decrease underflow delay
This commit is contained in:
parent
9042426872
commit
70edc9c5c6
|
@ -77,7 +77,7 @@ class DRTIOSatellite(Module):
|
||||||
self.reset = CSRStorage(reset=1)
|
self.reset = CSRStorage(reset=1)
|
||||||
self.reset_phy = CSRStorage(reset=1)
|
self.reset_phy = CSRStorage(reset=1)
|
||||||
self.tsc_loaded = CSR()
|
self.tsc_loaded = CSR()
|
||||||
# master interface in the rtio domain
|
# master interface in the sys domain
|
||||||
self.cri = cri.Interface()
|
self.cri = cri.Interface()
|
||||||
self.async_errors = Record(async_errors_layout)
|
self.async_errors = Record(async_errors_layout)
|
||||||
|
|
||||||
|
|
|
@ -227,16 +227,16 @@ class TestFullStack(unittest.TestCase):
|
||||||
errors = yield from saterr.protocol_error.read()
|
errors = yield from saterr.protocol_error.read()
|
||||||
self.assertEqual(errors, 0)
|
self.assertEqual(errors, 0)
|
||||||
yield from csrs.underflow_margin.write(0)
|
yield from csrs.underflow_margin.write(0)
|
||||||
tb.delay(100)
|
tb.delay(80)
|
||||||
yield from tb.write(42, 1)
|
yield from tb.write(42, 1)
|
||||||
for i in range(12):
|
for i in range(21):
|
||||||
yield
|
yield
|
||||||
errors = yield from saterr.protocol_error.read()
|
errors = yield from saterr.protocol_error.read()
|
||||||
underflow_channel = yield from saterr.underflow_channel.read()
|
underflow_channel = yield from saterr.underflow_channel.read()
|
||||||
underflow_timestamp_event = yield from saterr.underflow_timestamp_event.read()
|
underflow_timestamp_event = yield from saterr.underflow_timestamp_event.read()
|
||||||
self.assertEqual(errors, 8) # write underflow
|
self.assertEqual(errors, 8) # write underflow
|
||||||
self.assertEqual(underflow_channel, 42)
|
self.assertEqual(underflow_channel, 42)
|
||||||
self.assertEqual(underflow_timestamp_event, 100)
|
self.assertEqual(underflow_timestamp_event, 80)
|
||||||
yield from saterr.protocol_error.write(errors)
|
yield from saterr.protocol_error.write(errors)
|
||||||
yield
|
yield
|
||||||
errors = yield from saterr.protocol_error.read()
|
errors = yield from saterr.protocol_error.read()
|
||||||
|
|
Loading…
Reference in New Issue