mila: add input pipe to ease timing
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Sat, 24 May 2014 07:23:16 +0000 (09:23 +0200)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Sat, 24 May 2014 07:23:16 +0000 (09:23 +0200)
miscope/mila.py

index b19837cb3ed3b44cf899985700dcd650df3b8486..457b317a26578c935ddab1b7c8cd95c584aaeeb9 100644 (file)
@@ -20,16 +20,18 @@ class MiLa(Module, AutoCSR):
                self.submodules.trigger = trigger
                self.submodules.recorder = recorder
 
+               sink_d = rec_dat(width)
+               self.sync += sink_d.eq(self.sink)
 
                self.comb += [
-                       self.sink.connect(trigger.sink),
+                       sink_d.connect(trigger.sink),
                        trigger.source.connect(recorder.trig_sink)
                ]
 
                recorder_dat_source = self.sink
                if with_rle:
                        self.submodules.rle = RunLengthEncoder(width)
-                       self.comb += self.sink.connect(self.rle.sink)
+                       self.comb += sink_d.connect(self.rle.sink)
                        recorder_dat_source = self.rle.source
                self.comb += recorder_dat_source.connect(recorder.dat_sink)