from misoclib import lasmicon
class GENSDRPHY(Module):
- def __init__(self, pads, memtype, nphases, cl):
- if memtype not in ["SDR"]:
- raise NotImplementedError("GENSDRPHY only supports SDR")
- if cl != 2:
- raise NotImplementedError("GENSDRPHY only supports CAS LATENCY 2")
- if nphases > 1:
- raise NotImplementedError("GENSDRPHY only supports Full Rate (nphases=1)")
-
+ def __init__(self, pads):
a = flen(pads.a)
ba = flen(pads.ba)
d = flen(pads.dq)
self.phy_settings = lasmicon.PhySettings(
memtype=memtype,
dfi_d=d,
- nphases=nphases,
+ nphases=1,
rdphase=0,
wrphase=0,
rdcmdphase=0,
wrcmdphase=0,
- cl=cl,
+ cl=2,
read_latency=4,
write_latency=0
)
- self.dfi = Interface(a, ba, nphases*d, nphases)
+ self.dfi = Interface(a, ba, d)
###
from misoclib import lasmicon
class S6DDRPHY(Module):
- def __init__(self, pads, memtype, nphases, cl, rd_bitslip, wr_bitslip, dqs_ddr_alignment):
+ def __init__(self, pads, memtype, rd_bitslip, wr_bitslip, dqs_ddr_alignment):
if memtype not in ["DDR", "LPDDR", "DDR2"]:
raise NotImplementedError("S6DDRPHY only supports DDR, LPDDR and DDR2")
- if cl != 3:
- raise NotImplementedError("S6DDRPHY only supports CAS LATENCY 3")
- if nphases != 2:
- raise NotImplementedError("S6DDRPHY only supports Half Rate (nphases=2)")
a = flen(pads.a)
ba = flen(pads.ba)
d = flen(pads.dq)
+ nphases = 2
self.phy_settings = lasmicon.PhySettings(
memtype=memtype,
wrphase=1,
rdcmdphase=1,
wrcmdphase=0,
- cl=cl,
+ cl=3,
read_latency=5,
write_latency=0
)
write_time=16
)
self.submodules.ddrphy = s6ddrphy.S6DDRPHY(platform.request("ddram"), memtype="DDR",
- nphases=2, cl=3, rd_bitslip=0, wr_bitslip=3, dqs_ddr_alignment="C1")
+ rd_bitslip=0, wr_bitslip=3, dqs_ddr_alignment="C1")
self.register_sdram_phy(self.ddrphy.dfi, self.ddrphy.phy_settings, sdram_geom, sdram_timing)
# Wishbone