soc/interconnect/stream_packet.py: make error payload optional on Packetizer
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Tue, 28 Mar 2017 10:21:54 +0000 (12:21 +0200)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Tue, 28 Mar 2017 10:21:54 +0000 (12:21 +0200)
litex/soc/interconnect/stream_packet.py

index a41183802b0052bd1eeb402a147d0713828348f3..577f3e7077763892af72d138d6b6a54ff54ef8b0 100644 (file)
@@ -228,11 +228,12 @@ class Packetizer(Module):
                     )
                 )
             )
+        if hasattr(sink, "error"):
+            self.comb += source.error.eq(sink.error)
         fsm.act("COPY",
             source.valid.eq(sink.valid),
             source.last.eq(sink.last),
             source.data.eq(sink.data),
-            source.error.eq(sink.error),
             If(source.valid & source.ready,
                 sink.ready.eq(1),
                 If(source.last,