slaclab/surf

SlvDelayFifo wraparound

Closed this issue · 1 comments

I was looking at SlvDelayFifo, deciding whether to use it, and I noticed something in the code that troubled me.
if (fifoReadoutTime <= r.timeNow) then
I believe the "<" test will cause the fifo to advance unexpectedly when the fifoReadoutTime signal wraps around and the r.timeNow signal has not yet wrapped. That causes the output to be asserted earlier than intended. An "=" test would be better, but then a reset is needed whenever the delay signal is altered.

@thatweaver: We do the issue tracking in JIRA (instead of github). I have moved your ticket here:
https://jira.slac.stanford.edu/browse/ESCORE-563