interconnect/packet/Status: Simplify logic.

This commit is contained in:
Florent Kermarrec 2024-05-13 17:52:24 +02:00
parent 8b175c2575
commit 2613ae606a
1 changed files with 2 additions and 2 deletions

View File

@ -23,10 +23,10 @@ class Status(LiteXModule):
self.ongoing = Signal()
ongoing = Signal()
self.comb += If(endpoint.valid, self.last.eq(endpoint.last & endpoint.ready))
self.sync += ongoing.eq((endpoint.valid | ongoing) & ~self.last)
self.comb += self.last.eq(endpoint.valid & endpoint.last & endpoint.ready)
self.comb += self.ongoing.eq((endpoint.valid | ongoing) & ~self.last)
self.sync += [
ongoing.eq(self.ongoing),
If(self.last,
self.first.eq(1)
).Elif(endpoint.valid & endpoint.ready,