self.ub = UARTBridge(divisor=868, pins=platform.request("uart", 0))
- self.ddrphy = DomainRenamer("dramsync")(ECP5DDRPHY(platform.request("ddr3", 0, dir={"dq":"-", "dqs":"-"})))
+ ddr_pins = platform.request("ddr3", 0, dir={"dq":"-", "dqs":"-"},
+ xdr={"clk":4})
+ self.ddrphy = DomainRenamer("dramsync")(ECP5DDRPHY(ddr_pins))
self._decoder.add(self.ddrphy.bus, addr=ddrphy_addr)
ddrmodule = MT41K256M16(platform.default_clk_frequency, "1:2")
rddata_en = Signal(self.settings.read_latency)
# Clock --------------------------------------------------------------------------------
- for i in range(len(self.pads.clk.o)):
- m.submodules += Instance("ODDRX2F",
- i_RST=ResetSignal("dramsync"),
- i_ECLK=ClockSignal("sync2x"),
- i_SCLK=ClockSignal(),
- i_D0=0,
- i_D1=1,
- i_D2=0,
- i_D3=1,
- o_Q=self.pads.clk.o[i]
- )
+ for i in range(len(self.pads.clk.o0)):
+ m.d.comb += [
+ self.pads.clk.o_clk[i].eq(ClockSignal("dramsync")),
+ self.pads.clk.o_fclk[i].eq(ClockSignal("sync2x")),
+ self.pads.clk.o0[i].eq(0),
+ self.pads.clk.o1[i].eq(1),
+ self.pads.clk.o2[i].eq(0),
+ self.pads.clk.o3[i].eq(1)
+ ]
# Addresses and Commands ---------------------------------------------------------------
for i in range(addressbits):
self.ub = UARTBridge(divisor=5, pins=platform.request("uart", 0))
self._arbiter.add(self.ub.bus)
- self.ddrphy = DomainRenamer("dramsync")(ECP5DDRPHY(platform.request("ddr3", 0, dir={"dq":"-", "dqs":"-"})))
+ ddr_pins = platform.request("ddr3", 0, dir={"dq":"-", "dqs":"-"},
+ xdr={"clk":4})
+ self.ddrphy = DomainRenamer("dramsync")(ECP5DDRPHY(ddr_pins))
self._decoder.add(self.ddrphy.bus, addr=ddrphy_addr)
ddrmodule = MT41K256M16(clk_freq, "1:2")