soc/add_sdcard: add minimal SDClockerECP5 on ECP5.

This commit is contained in:
Florent Kermarrec 2020-06-03 14:34:59 +02:00
parent 9a026c09f9
commit 997a17b933
1 changed files with 5 additions and 0 deletions

View File

@ -1269,6 +1269,11 @@ class LiteXSoC(SoC):
self.submodules.sdclk = SDClockerS7(sys_clk_freq=self.sys_clk_freq) self.submodules.sdclk = SDClockerS7(sys_clk_freq=self.sys_clk_freq)
self.add_csr("sdclk") self.add_csr("sdclk")
if self.platform.device[:5] == "LFE5U":
from litesdcard.clocker import SDClockerECP5
self.submodules.sdclk = SDClockerECP5()
self.add_csr("sdclk")
# Core # Core
if hasattr(sdcard_pads, "rst"): if hasattr(sdcard_pads, "rst"):
self.comb += sdcard_pads.rst.eq(0) self.comb += sdcard_pads.rst.eq(0)