forked from M-Labs/artiq
1
0
Fork 0

test_write_underflow: decrease underflow delay

This commit is contained in:
mwojcik 2023-01-11 11:56:21 +08:00 committed by Sébastien Bourdeauducq
parent 9042426872
commit 70edc9c5c6
2 changed files with 4 additions and 4 deletions

View File

@ -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)

View File

@ -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()