From 7bd0311947750343b292e6576938b0fa1336f331 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Mon, 17 Oct 2022 18:42:34 +0200 Subject: [PATCH] interconnect/stream/Monitor: Fix packet support and cleanup. --- litex/soc/interconnect/stream.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/litex/soc/interconnect/stream.py b/litex/soc/interconnect/stream.py index 0ada35da9..9e276b643 100644 --- a/litex/soc/interconnect/stream.py +++ b/litex/soc/interconnect/stream.py @@ -712,10 +712,10 @@ class Monitor(Module, AutoCSR): # Overflows Count (only useful when endpoint is expected to always be ready) --------------- if with_overflows: self.submodules.overflow_counter = MonitorCounter( - reset=reset, - latch=latch, - enable=endpoint.valid & ~endpoint.ready, - count = self.overflows.status, + reset = reset, + latch = latch, + enable = endpoint.valid & ~endpoint.ready, + count = self.overflows.status, ) # Underflows Count (only useful when endpoint is expected to always be valid) -------------- @@ -728,12 +728,12 @@ class Monitor(Module, AutoCSR): ) # Packets Count ---------------------------------------------------------------------------- - if with_underflows: + if with_packets: self.submodules.packet_counter = MonitorCounter( - reset=reset, - latch=latch, - enable=endpoint.valid & getattr(endpoint, packet_delimiter) & endpoint.ready, - count = self.underflows.status + reset = reset, + latch = latch, + enable = endpoint.valid & getattr(endpoint, packet_delimiter) & endpoint.ready, + count = self.packets.status ) # Pipe ---------------------------------------------------------------------------------------------