gensdrphy: clean up and implement data mask
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Wed, 30 Apr 2014 22:29:18 +0000 (00:29 +0200)
committerSebastien Bourdeauducq <sb@m-labs.hk>
Thu, 1 May 2014 14:17:50 +0000 (16:17 +0200)
misoclib/sdramphy/gensdrphy.py

index edc6c2c2cb1a61ee76750371a975dfccc633a85d..01f79e0c44353824f25a7bc720a3418c9d267d51 100644 (file)
@@ -64,7 +64,6 @@ class GENSDRPHY(Module):
                self.sync += [
                        pads.a.eq(self.dfi.p0.address),
                        pads.ba.eq(self.dfi.p0.bank),
-                       pads.cs_n.eq(self.dfi.p0.cs_n),
                        pads.cke.eq(self.dfi.p0.cke),
                        pads.cas_n.eq(self.dfi.p0.cas_n),
                        pads.ras_n.eq(self.dfi.p0.ras_n),
@@ -80,7 +79,7 @@ class GENSDRPHY(Module):
                drive_dq = Signal()
                self.sync += sd_dq_out.eq(self.dfi.p0.wrdata),
                self.specials += Tristate(pads.dq, sd_dq_out, drive_dq)
-               self.comb += pads.dm.eq(0)
+               self.sync += pads.dm.eq(~self.dfi.p0.wrdata_mask)
                sd_dq_in_ps = Signal(d)
                self.sync.sys_ps += sd_dq_in_ps.eq(pads.dq)
                self.sync += self.dfi.p0.rddata.eq(sd_dq_in_ps)