rtio: fix replace/sequence_error when fine_ts_width > 0

This commit is contained in:
Sebastien Bourdeauducq 2015-07-27 12:22:35 +08:00
parent 959b7a7b46
commit b1d58bd4c8
1 changed files with 4 additions and 2 deletions

View File

@ -118,8 +118,10 @@ class _OutputManager(Module):
sequence_error = Signal()
nop = Signal()
self.sync.rsys += [
replace.eq(self.ev.timestamp == buf.timestamp[fine_ts_width:]),
sequence_error.eq(self.ev.timestamp < buf.timestamp[fine_ts_width:])
replace.eq(self.ev.timestamp[fine_ts_width:] \
== buf.timestamp[fine_ts_width:]),
sequence_error.eq(self.ev.timestamp[fine_ts_width:] \
< buf.timestamp[fine_ts_width:])
]
if interface.suppress_nop:
# disable NOP at reset: do not suppress a first write with all 0s