actorlib/structuring: fix Pack in packetized mode
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Fri, 18 Sep 2015 00:28:02 +0000 (02:28 +0200)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Fri, 18 Sep 2015 00:28:02 +0000 (02:28 +0200)
Params need to be registered for the case when eop appears before the end of the pack cycle.

migen/actorlib/structuring.py

index 476bdf72a4cc0e1f9d61d4ff0d4f12049e164dde..31414ec4009ab8a5d362ac8035775ce471dc04c6 100644 (file)
@@ -110,7 +110,7 @@ class Pack(Module):
         for f in description_to.param_layout:
             src = getattr(self.sink, f[0])
             dst = getattr(self.source, f[0])
-            self.comb += dst.eq(src)
+            self.sync += If(load_part, dst.eq(src))
 
         if description_to.packetized:
             demux_last = ((demux == (n - 1)) | sink.eop)