From: Florent Kermarrec Date: Thu, 18 Jul 2013 17:52:09 +0000 (+0200) Subject: s6ddrphy: add support for differential dqs and optional cs_n X-Git-Tag: 24jan2021_ls180~2857 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=38e8ea683e39a67af41862ab908cacb7b082434b;p=litex.git s6ddrphy: add support for differential dqs and optional cs_n --- diff --git a/milkymist/s6ddrphy/__init__.py b/milkymist/s6ddrphy/__init__.py index e137b543..02599a9d 100644 --- a/milkymist/s6ddrphy/__init__.py +++ b/milkymist/s6ddrphy/__init__.py @@ -101,13 +101,13 @@ class S6DDRPHY(Module): sd_sdram_half += [ pads.a.eq(r_dfi[phase_sel].address), pads.ba.eq(r_dfi[phase_sel].bank), - pads.cs_n.eq(r_dfi[phase_sel].cs_n), pads.cke.eq(r_dfi[phase_sel].cke), pads.ras_n.eq(r_dfi[phase_sel].ras_n), pads.cas_n.eq(r_dfi[phase_sel].cas_n), pads.we_n.eq(r_dfi[phase_sel].we_n) ] - + if hasattr(pads, "cs_n"): + sd_sdram_half += pads.cs_n.eq(r_dfi[phase_sel].cs_n) # # Bitslip @@ -181,12 +181,21 @@ class S6DDRPHY(Module): ) # DQS tristate buffer - self.specials += Instance("OBUFT", - Instance.Input("I", dqs_o[i]), - Instance.Input("T", dqs_t[i]), - - Instance.Output("O", pads.dqs[i]) - ) + if hasattr(pads, "dqs_n"): + self.specials += Instance("OBUFTDS", + Instance.Input("I", dqs_o[i]), + Instance.Input("T", dqs_t[i]), + + Instance.Output("O", pads.dqs[i]), + Instance.Output("OB", pads.dqs_n[i]), + ) + else: + self.specials += Instance("OBUFT", + Instance.Input("I", dqs_o[i]), + Instance.Input("T", dqs_t[i]), + + Instance.Output("O", pads.dqs[i]) + ) sd_sdram_half += postamble.eq(drive_dqs)