targets: use DDROutput on sdram_clock and similar configuration for all SDRAM targets.
This commit is contained in:
parent
ca197af2be
commit
188d4a45d6
|
@ -30,6 +30,8 @@ import sys
|
|||
from migen import *
|
||||
from migen.genlib.resetsync import AsyncResetSynchronizer
|
||||
|
||||
from litex.build.io import DDROutput
|
||||
|
||||
from litex_boards.platforms import colorlight_5a_75b
|
||||
|
||||
from litex.build.lattice.trellis import trellis_args, trellis_argdict
|
||||
|
@ -66,7 +68,7 @@ class _CRG(Module):
|
|||
self.specials += AsyncResetSynchronizer(self.cd_sys, ~pll.locked | ~rst_n)
|
||||
|
||||
# SDRAM clock
|
||||
self.comb += platform.request("sdram_clock").eq(self.cd_sys_ps.clk)
|
||||
self.specials += DDROutput(1, 0, platform.request("sdram_clock"), ClockSignal("sys_ps"))
|
||||
|
||||
# BaseSoC ------------------------------------------------------------------------------------------
|
||||
|
||||
|
|
|
@ -8,6 +8,8 @@ import argparse
|
|||
from migen import *
|
||||
from migen.genlib.resetsync import AsyncResetSynchronizer
|
||||
|
||||
from litex.build.io import DDROutput
|
||||
|
||||
from litex_boards.platforms import de0nano
|
||||
|
||||
from litex.soc.cores.clock import CycloneIVPLL
|
||||
|
@ -38,7 +40,7 @@ class _CRG(Module):
|
|||
pll.create_clkout(self.cd_sys_ps, sys_clk_freq, phase=90)
|
||||
|
||||
# SDRAM clock
|
||||
self.comb += platform.request("sdram_clock").eq(self.cd_sys_ps.clk)
|
||||
self.specials += DDROutput(1, 0, platform.request("sdram_clock"), ClockSignal("sys_ps"))
|
||||
|
||||
# BaseSoC ------------------------------------------------------------------------------------------
|
||||
|
||||
|
|
|
@ -8,6 +8,8 @@ import argparse
|
|||
from migen import *
|
||||
from migen.genlib.resetsync import AsyncResetSynchronizer
|
||||
|
||||
from litex.build.io import DDROutput
|
||||
|
||||
from litex_boards.platforms import de10lite
|
||||
|
||||
from litex.soc.cores.clock import Max10PLL
|
||||
|
@ -42,7 +44,7 @@ class _CRG(Module):
|
|||
pll.create_clkout(self.cd_vga, 25e6)
|
||||
|
||||
# SDRAM clock
|
||||
self.comb += platform.request("sdram_clock").eq(self.cd_sys_ps.clk)
|
||||
self.specials += DDROutput(1, 0, platform.request("sdram_clock"), ClockSignal("sys_ps"))
|
||||
|
||||
# BaseSoC ------------------------------------------------------------------------------------------
|
||||
|
||||
|
|
|
@ -8,6 +8,8 @@ import argparse
|
|||
from migen import *
|
||||
from migen.genlib.resetsync import AsyncResetSynchronizer
|
||||
|
||||
from litex.build.io import DDROutput
|
||||
|
||||
from litex_boards.platforms import de10nano
|
||||
|
||||
from litex.soc.cores.clock import CycloneVPLL
|
||||
|
@ -37,9 +39,9 @@ class _CRG(Module):
|
|||
pll.create_clkout(self.cd_sys, sys_clk_freq)
|
||||
pll.create_clkout(self.cd_sys_ps, sys_clk_freq, phase=90)
|
||||
|
||||
# SDRAM
|
||||
# SDRAM clock
|
||||
if with_sdram:
|
||||
self.comb += platform.request("sdram_clock").eq(self.cd_sys_ps.clk)
|
||||
self.specials += DDROutput(1, 0, platform.request("sdram_clock"), ClockSignal("sys_ps"))
|
||||
|
||||
# BaseSoC ------------------------------------------------------------------------------------------
|
||||
|
||||
|
|
|
@ -8,6 +8,8 @@ import argparse
|
|||
from migen import *
|
||||
from migen.genlib.resetsync import AsyncResetSynchronizer
|
||||
|
||||
from litex.build.io import DDROutput
|
||||
|
||||
from litex_boards.platforms import de1soc
|
||||
|
||||
from litex.soc.cores.clock import CycloneVPLL
|
||||
|
@ -38,7 +40,7 @@ class _CRG(Module):
|
|||
pll.create_clkout(self.cd_sys_ps, sys_clk_freq, phase=90)
|
||||
|
||||
# SDRAM clock
|
||||
self.comb += platform.request("sdram_clock").eq(self.cd_sys_ps.clk)
|
||||
self.specials += DDROutput(1, 0, platform.request("sdram_clock"), ClockSignal("sys_ps"))
|
||||
|
||||
# BaseSoC ------------------------------------------------------------------------------------------
|
||||
|
||||
|
|
|
@ -8,6 +8,8 @@ import argparse
|
|||
from migen import *
|
||||
from migen.genlib.resetsync import AsyncResetSynchronizer
|
||||
|
||||
from litex.build.io import DDROutput
|
||||
|
||||
from litex_boards.platforms import de2_115
|
||||
|
||||
from litex.soc.cores.clock import CycloneIVPLL
|
||||
|
@ -38,7 +40,7 @@ class _CRG(Module):
|
|||
pll.create_clkout(self.cd_sys_ps, sys_clk_freq, phase=90)
|
||||
|
||||
# SDRAM clock
|
||||
self.comb += platform.request("sdram_clock").eq(self.cd_sys_ps.clk)
|
||||
self.specials += DDROutput(1, 0, platform.request("sdram_clock"), ClockSignal("sys_ps"))
|
||||
|
||||
# BaseSoC ------------------------------------------------------------------------------------------
|
||||
|
||||
|
|
|
@ -12,6 +12,8 @@ import sys
|
|||
from migen import *
|
||||
from migen.genlib.resetsync import AsyncResetSynchronizer
|
||||
|
||||
from litex.build.io import DDROutput
|
||||
|
||||
from litex_boards.platforms import hadbadge
|
||||
|
||||
from litex.build.lattice.trellis import trellis_args, trellis_argdict
|
||||
|
@ -46,7 +48,7 @@ class _CRG(Module):
|
|||
self.specials += AsyncResetSynchronizer(self.cd_sys, ~pll.locked)
|
||||
|
||||
# SDRAM clock
|
||||
self.comb += platform.request("sdram_clock").eq(self.cd_sys_ps.clk)
|
||||
self.specials += DDROutput(1, 0, platform.request("sdram_clock"), ClockSignal("sys_ps"))
|
||||
|
||||
# BaseSoC ------------------------------------------------------------------------------------------
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ class _CRG(Module):
|
|||
pll.create_clkout(self.cd_sys_ps, sys_clk_freq, phase=90)
|
||||
|
||||
# SDRAM clock
|
||||
self.specials += DDROutput(0, 1, platform.request("sdram_clock"), ClockSignal("sys_ps"))
|
||||
self.specials += DDROutput(1, 0, platform.request("sdram_clock"), ClockSignal("sys_ps"))
|
||||
|
||||
# BaseSoC ------------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -57,7 +57,7 @@ class BaseSoC(SoCCore):
|
|||
|
||||
# SDR SDRAM --------------------------------------------------------------------------------
|
||||
if not self.integrated_main_ram_size:
|
||||
self.submodules.sdrphy = GENSDRPHY(platform.request("sdram"), cmd_latency=2)
|
||||
self.submodules.sdrphy = GENSDRPHY(platform.request("sdram"))
|
||||
self.add_sdram("sdram",
|
||||
phy = self.sdrphy,
|
||||
module = M12L64322A(sys_clk_freq, "1:1"),
|
||||
|
|
|
@ -38,7 +38,7 @@ class _CRG(Module):
|
|||
pll.create_clkout(self.cd_sys_ps, clk_freq, phase=90)
|
||||
|
||||
# SDRAM clock
|
||||
self.specials += DDROutput(0, 1, platform.request("sdram_clock"), ClockSignal("sys_ps"))
|
||||
self.specials += DDROutput(1, 0, platform.request("sdram_clock"), ClockSignal("sys_ps"))
|
||||
|
||||
# BaseSoC ------------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -54,7 +54,7 @@ class BaseSoC(SoCCore):
|
|||
|
||||
# SDR SDRAM --------------------------------------------------------------------------------
|
||||
if not self.integrated_main_ram_size:
|
||||
self.submodules.sdrphy = GENSDRPHY(platform.request("sdram"), cmd_latency=2)
|
||||
self.submodules.sdrphy = GENSDRPHY(platform.request("sdram"))
|
||||
self.add_sdram("sdram",
|
||||
phy = self.sdrphy,
|
||||
module = AS4C16M16(sys_clk_freq, "1:1"),
|
||||
|
|
|
@ -10,6 +10,8 @@ import sys
|
|||
from migen import *
|
||||
from migen.genlib.resetsync import AsyncResetSynchronizer
|
||||
|
||||
from litex.build.io import DDROutput
|
||||
|
||||
from litex_boards.platforms import ulx3s
|
||||
|
||||
from litex.build.lattice.trellis import trellis_args, trellis_argdict
|
||||
|
@ -45,7 +47,7 @@ class _CRG(Module):
|
|||
self.specials += AsyncResetSynchronizer(self.cd_sys, ~pll.locked | rst)
|
||||
|
||||
# SDRAM clock
|
||||
self.comb += platform.request("sdram_clock").eq(self.cd_sys_ps.clk)
|
||||
self.specials += DDROutput(1, 0, platform.request("sdram_clock"), ClockSignal("sys_ps"))
|
||||
|
||||
# Prevent ESP32 from resetting FPGA
|
||||
self.comb += platform.request("wifi_gpio0").eq(1)
|
||||
|
|
Loading…
Reference in New Issue