actorlib/packet/Depacketizer: manage layouts without error signal
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Wed, 22 Jul 2015 19:43:21 +0000 (21:43 +0200)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Wed, 22 Jul 2015 19:43:21 +0000 (21:43 +0200)
migen/actorlib/packet.py

index 6a35cd4289a95c753c5f011fde2ccf48eafe2992..0cbe8becf7cd79462ef7b14f5aa108b3308a8cff 100644 (file)
@@ -282,10 +282,12 @@ class Depacketizer(Module):
             ).Elif(source.stb & source.ack,
                 source.sop.eq(0)
             )
+
+        if hasattr(sink, "error"):
+            self.comb += source_error.eq(sink.error)
         self.comb += [
             source.eop.eq(sink.eop | no_payload),
             source.data.eq(sink.data),
-            source.error.eq(sink.error),
             header.decode(self.header, source)
         ]
         fsm.act("COPY",