From e4c0b4a11f9badae7febdcf5994c2092cca6ec95 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Thu, 11 Dec 2014 18:35:56 +0100 Subject: [PATCH] phy: remove ALIGN primitives on RX path --- lib/sata/phy/k7sataphy/datapath.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/lib/sata/phy/k7sataphy/datapath.py b/lib/sata/phy/k7sataphy/datapath.py index 809d4e8a..3a3683c7 100644 --- a/lib/sata/phy/k7sataphy/datapath.py +++ b/lib/sata/phy/k7sataphy/datapath.py @@ -137,6 +137,11 @@ class K7SATAPHYDatapath(Module): ) send_align = (align_cnt < 2) + receive_align = Signal() + self.comb += receive_align.eq(rx.source.stb & + (rx.source.charisk == 0b0001) & + (rx.source.data == primitives["ALIGN"]) + # user / ctrl mux self.comb += [ # user @@ -152,10 +157,14 @@ class K7SATAPHYDatapath(Module): tx.sink.charisk.eq(self.sink.charisk), self.sink.ack.eq(tx.sink.ack) ), - self.source.stb.eq(rx.source.stb), - self.source.data.eq(rx.source.data), - self.source.charisk.eq(rx.source.charisk), - rx.source.ack.eq(1), + If(receive_align, + rx.source.ack.eq(1) + ).Else( + self.source.stb.eq(rx.source.stb), + self.source.data.eq(rx.source.data), + self.source.charisk.eq(rx.source.charisk), + rx.source.ack.eq(1) + ) # ctrl ).Else( tx.sink.stb.eq(ctrl.source.stb), -- 2.30.2