targets: add fixed sdcard clock on boards with SDCard support.
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Thu, 25 Jun 2020 09:13:24 +0000 (11:13 +0200)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Thu, 25 Jun 2020 09:13:24 +0000 (11:13 +0200)
litex/boards/targets/nexys4ddr.py
litex/boards/targets/nexys_video.py
litex/boards/targets/ulx3s.py

index 303055d24666429e3abb2276df6f64edc95df8f2..fb0224fb7a9e237fccf9b6953ad55b719261e6fd 100755 (executable)
@@ -30,6 +30,7 @@ class _CRG(Module):
         self.clock_domains.cd_sys2x_dqs = ClockDomain(reset_less=True)
         self.clock_domains.cd_clk200    = ClockDomain()
         self.clock_domains.cd_eth       = ClockDomain()
+        self.clock_domains.cd_sdcard    = ClockDomain()
 
         # # #
 
@@ -41,6 +42,7 @@ class _CRG(Module):
         pll.create_clkout(self.cd_sys2x_dqs, 2*sys_clk_freq, phase=90)
         pll.create_clkout(self.cd_clk200,    200e6)
         pll.create_clkout(self.cd_eth,       50e6)
+        pll.create_clkout(self.cd_sdcard,    10e6)
 
         self.submodules.idelayctrl = S7IDELAYCTRL(self.cd_clk200)
 
index 22dd0366d78d0fe7cff7e289c5681f7100637dd6..7312ba23e334fffe5aacd32958b531e23c9c5300 100755 (executable)
@@ -30,6 +30,7 @@ class _CRG(Module):
         self.clock_domains.cd_sys4x_dqs = ClockDomain(reset_less=True)
         self.clock_domains.cd_clk200    = ClockDomain()
         self.clock_domains.cd_clk100    = ClockDomain()
+        self.clock_domains.cd_sdcard    = ClockDomain()
 
         # # #
 
@@ -41,6 +42,7 @@ class _CRG(Module):
         pll.create_clkout(self.cd_sys4x_dqs, 4*sys_clk_freq, phase=90)
         pll.create_clkout(self.cd_clk200,    200e6)
         pll.create_clkout(self.cd_clk100,    100e6)
+        pll.create_clkout(self.cd_sdcard,    10e6)
 
         self.submodules.idelayctrl = S7IDELAYCTRL(self.cd_clk200)
 
index da05ce2cf713243f608d81818312ad7d300bd2c8..ac4904506f328279ddd7fa2feda919ef7cac9050 100755 (executable)
@@ -32,7 +32,7 @@ class _CRG(Module):
     def __init__(self, platform, sys_clk_freq, with_usb_pll=False):
         self.clock_domains.cd_sys    = ClockDomain()
         self.clock_domains.cd_sys_ps = ClockDomain(reset_less=True)
-        self.clock_domains.cd_clk10  = ClockDomain() # FIXME: for initial LiteSDCard tests.
+        self.clock_domains.cd_sdcard = ClockDomain()
 
         # # #
 
@@ -46,9 +46,9 @@ class _CRG(Module):
         pll.register_clkin(clk25, 25e6)
         pll.create_clkout(self.cd_sys,    sys_clk_freq)
         pll.create_clkout(self.cd_sys_ps, sys_clk_freq, phase=90)
-        pll.create_clkout(self.cd_clk10, 10e6)
-        self.specials += AsyncResetSynchronizer(self.cd_sys,   ~pll.locked | rst)
-        self.specials += AsyncResetSynchronizer(self.cd_clk10, ~pll.locked | rst)
+        pll.create_clkout(self.cd_sdcard, 10e6)
+        self.specials += AsyncResetSynchronizer(self.cd_sys,    ~pll.locked | rst)
+        self.specials += AsyncResetSynchronizer(self.cd_sdcard, ~pll.locked | rst)
 
         # USB PLL
         if with_usb_pll: