2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-25 03:08:27 +08:00

err out on tune_fifo_offset

This commit is contained in:
Robert Jördens 2022-09-05 20:48:15 +00:00
parent 1cc57e2345
commit c26fa5eb90

View File

@ -791,6 +791,8 @@ class Phaser:
if good & (1 << o):
sum += o
count += 1
if count == 0:
raise ValueError("no good fifo offset")
best = ((sum // count) + offset) % 8
self.dac_write(0x09, (config9 & 0x1fff) | (best << 13))
return best