link_tb: fix cont regression
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Mon, 15 Dec 2014 19:00:19 +0000 (20:00 +0100)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Mon, 15 Dec 2014 19:00:19 +0000 (20:00 +0100)
lib/sata/link/cont.py
lib/sata/test/link_tb.py

index 731ef9a544f0995d2509462caa83e218a507303c..0666137af4a7e43f05caa3b24a03810c4c59300c 100644 (file)
@@ -44,7 +44,10 @@ class SATACONTInserter(Module):
                                        last_was_primitive.eq(1)
                                ).Else(
                                        last_was_primitive.eq(0)
-                               ),
+                               )
+                       )
+               self.comb += \
+                       If(sink.stb & source.ack,
                                If(change | last_primitive_insert_d,
                                        counter.reset.eq(1)
                                ).Else(
index 5bf51ca7ccd4dc8914375fd71fe5c893daa4f789..907f5896ab431ba601516fb885e496e20bfa8288 100644 (file)
@@ -67,8 +67,7 @@ class LinkLogger(Module):
 class TB(Module):
        def __init__(self):
                self.submodules.hdd = HDD(
-                               phy_debug=False,
-                               link_random_level=50,
+                               link_debug=False, link_random_level=50,
                                transport_debug=False, transport_loopback=True)
                self.submodules.link = SATALink(self.hdd.phy)