targets/gensdrphy/halfsdrphy: pass new optional sys_clk_freq (used to compute cl).
This commit is contained in:
parent
0e3c03f2f6
commit
fe67766fb7
|
@ -78,7 +78,7 @@ class BaseSoC(SoCCore):
|
||||||
|
|
||||||
# SDR SDRAM --------------------------------------------------------------------------------
|
# SDR SDRAM --------------------------------------------------------------------------------
|
||||||
if not self.integrated_main_ram_size:
|
if not self.integrated_main_ram_size:
|
||||||
self.submodules.sdrphy = GENSDRPHY(platform.request("sdram"))
|
self.submodules.sdrphy = GENSDRPHY(platform.request("sdram"), sys_clk_freq)
|
||||||
self.add_sdram("sdram",
|
self.add_sdram("sdram",
|
||||||
phy = self.sdrphy,
|
phy = self.sdrphy,
|
||||||
module = MT48LC16M16(sys_clk_freq, "1:1"),
|
module = MT48LC16M16(sys_clk_freq, "1:1"),
|
||||||
|
|
|
@ -144,7 +144,7 @@ class BaseSoC(SoCCore):
|
||||||
# SDR SDRAM --------------------------------------------------------------------------------
|
# SDR SDRAM --------------------------------------------------------------------------------
|
||||||
if not self.integrated_main_ram_size:
|
if not self.integrated_main_ram_size:
|
||||||
sdrphy_cls = HalfRateGENSDRPHY if sdram_rate == "1:2" else GENSDRPHY
|
sdrphy_cls = HalfRateGENSDRPHY if sdram_rate == "1:2" else GENSDRPHY
|
||||||
self.submodules.sdrphy = sdrphy_cls(platform.request("sdram"))
|
self.submodules.sdrphy = sdrphy_cls(platform.request("sdram"), sys_clk_freq)
|
||||||
if board == "5a-75e" and revision == "6.0":
|
if board == "5a-75e" and revision == "6.0":
|
||||||
sdram_cls = M12L64322A
|
sdram_cls = M12L64322A
|
||||||
sdram_size = 0x80000000
|
sdram_size = 0x80000000
|
||||||
|
|
|
@ -75,7 +75,7 @@ class BaseSoC(SoCCore):
|
||||||
# SDR SDRAM --------------------------------------------------------------------------------
|
# SDR SDRAM --------------------------------------------------------------------------------
|
||||||
if not self.integrated_main_ram_size:
|
if not self.integrated_main_ram_size:
|
||||||
sdrphy_cls = HalfRateGENSDRPHY if sdram_rate == "1:2" else GENSDRPHY
|
sdrphy_cls = HalfRateGENSDRPHY if sdram_rate == "1:2" else GENSDRPHY
|
||||||
self.submodules.sdrphy = sdrphy_cls(platform.request("sdram"))
|
self.submodules.sdrphy = sdrphy_cls(platform.request("sdram"), sys_clk_freq)
|
||||||
self.add_sdram("sdram",
|
self.add_sdram("sdram",
|
||||||
phy = self.sdrphy,
|
phy = self.sdrphy,
|
||||||
module = IS42S16160(sys_clk_freq, sdram_rate),
|
module = IS42S16160(sys_clk_freq, sdram_rate),
|
||||||
|
|
|
@ -70,7 +70,7 @@ class BaseSoC(SoCCore):
|
||||||
|
|
||||||
# SDR SDRAM --------------------------------------------------------------------------------
|
# SDR SDRAM --------------------------------------------------------------------------------
|
||||||
if not self.integrated_main_ram_size:
|
if not self.integrated_main_ram_size:
|
||||||
self.submodules.sdrphy = GENSDRPHY(platform.request("sdram"))
|
self.submodules.sdrphy = GENSDRPHY(platform.request("sdram"), sys_clk_freq)
|
||||||
self.add_sdram("sdram",
|
self.add_sdram("sdram",
|
||||||
phy = self.sdrphy,
|
phy = self.sdrphy,
|
||||||
module = IS42S16320(sys_clk_freq, "1:1"),
|
module = IS42S16320(sys_clk_freq, "1:1"),
|
||||||
|
|
|
@ -81,7 +81,7 @@ class BaseSoC(SoCCore):
|
||||||
# SDR SDRAM --------------------------------------------------------------------------------
|
# SDR SDRAM --------------------------------------------------------------------------------
|
||||||
if with_mister_sdram and not self.integrated_main_ram_size:
|
if with_mister_sdram and not self.integrated_main_ram_size:
|
||||||
sdrphy_cls = HalfRateGENSDRPHY if sdram_rate == "1:2" else GENSDRPHY
|
sdrphy_cls = HalfRateGENSDRPHY if sdram_rate == "1:2" else GENSDRPHY
|
||||||
self.submodules.sdrphy = sdrphy_cls(platform.request("sdram"))
|
self.submodules.sdrphy = sdrphy_cls(platform.request("sdram"), sys_clk_freq)
|
||||||
self.add_sdram("sdram",
|
self.add_sdram("sdram",
|
||||||
phy = self.sdrphy,
|
phy = self.sdrphy,
|
||||||
module = AS4C32M16(sys_clk_freq, sdram_rate),
|
module = AS4C32M16(sys_clk_freq, sdram_rate),
|
||||||
|
|
|
@ -64,7 +64,7 @@ class BaseSoC(SoCCore):
|
||||||
|
|
||||||
# SDR SDRAM --------------------------------------------------------------------------------
|
# SDR SDRAM --------------------------------------------------------------------------------
|
||||||
if not self.integrated_main_ram_size:
|
if not self.integrated_main_ram_size:
|
||||||
self.submodules.sdrphy = GENSDRPHY(platform.request("sdram"))
|
self.submodules.sdrphy = GENSDRPHY(platform.request("sdram"), sys_clk_freq)
|
||||||
self.add_sdram("sdram",
|
self.add_sdram("sdram",
|
||||||
phy = self.sdrphy,
|
phy = self.sdrphy,
|
||||||
module = IS42S16320(sys_clk_freq, "1:1"),
|
module = IS42S16320(sys_clk_freq, "1:1"),
|
||||||
|
|
|
@ -64,7 +64,7 @@ class BaseSoC(SoCCore):
|
||||||
|
|
||||||
# SDR SDRAM --------------------------------------------------------------------------------
|
# SDR SDRAM --------------------------------------------------------------------------------
|
||||||
if not self.integrated_main_ram_size:
|
if not self.integrated_main_ram_size:
|
||||||
self.submodules.sdrphy = GENSDRPHY(platform.request("sdram"))
|
self.submodules.sdrphy = GENSDRPHY(platform.request("sdram"), sys_clk_freq)
|
||||||
self.add_sdram("sdram",
|
self.add_sdram("sdram",
|
||||||
phy = self.sdrphy,
|
phy = self.sdrphy,
|
||||||
module = IS42S16320(self.clk_freq, "1:1"),
|
module = IS42S16320(self.clk_freq, "1:1"),
|
||||||
|
|
|
@ -71,7 +71,7 @@ class BaseSoC(SoCCore):
|
||||||
|
|
||||||
# SDR SDRAM --------------------------------------------------------------------------------
|
# SDR SDRAM --------------------------------------------------------------------------------
|
||||||
if not self.integrated_main_ram_size:
|
if not self.integrated_main_ram_size:
|
||||||
self.submodules.sdrphy = GENSDRPHY(platform.request("sdram"), cl=2)
|
self.submodules.sdrphy = GENSDRPHY(platform.request("sdram"), sys_clk_freq)
|
||||||
self.add_sdram("sdram",
|
self.add_sdram("sdram",
|
||||||
phy = self.sdrphy,
|
phy = self.sdrphy,
|
||||||
module = AS4C32M8(sys_clk_freq, "1:1"),
|
module = AS4C32M8(sys_clk_freq, "1:1"),
|
||||||
|
|
|
@ -65,7 +65,7 @@ class BaseSoC(SoCCore):
|
||||||
|
|
||||||
# SDR SDRAM --------------------------------------------------------------------------------
|
# SDR SDRAM --------------------------------------------------------------------------------
|
||||||
if not self.integrated_main_ram_size:
|
if not self.integrated_main_ram_size:
|
||||||
self.submodules.sdrphy = GENSDRPHY(platform.request("sdram"))
|
self.submodules.sdrphy = GENSDRPHY(platform.request("sdram"), sys_clk_freq)
|
||||||
self.add_sdram("sdram",
|
self.add_sdram("sdram",
|
||||||
phy = self.sdrphy,
|
phy = self.sdrphy,
|
||||||
module = M12L64322A(sys_clk_freq, "1:1"),
|
module = M12L64322A(sys_clk_freq, "1:1"),
|
||||||
|
|
|
@ -78,7 +78,7 @@ class BaseSoC(SoCCore):
|
||||||
# SDR SDRAM --------------------------------------------------------------------------------
|
# SDR SDRAM --------------------------------------------------------------------------------
|
||||||
if not self.integrated_main_ram_size:
|
if not self.integrated_main_ram_size:
|
||||||
sdrphy_cls = HalfRateGENSDRPHY if sdram_rate == "1:2" else GENSDRPHY
|
sdrphy_cls = HalfRateGENSDRPHY if sdram_rate == "1:2" else GENSDRPHY
|
||||||
self.submodules.sdrphy = sdrphy_cls(platform.request("sdram"))
|
self.submodules.sdrphy = sdrphy_cls(platform.request("sdram"), sys_clk_freq)
|
||||||
self.add_sdram("sdram",
|
self.add_sdram("sdram",
|
||||||
phy = self.sdrphy,
|
phy = self.sdrphy,
|
||||||
module = AS4C16M16(sys_clk_freq, sdram_rate),
|
module = AS4C16M16(sys_clk_freq, sdram_rate),
|
||||||
|
|
|
@ -70,7 +70,7 @@ class BaseSoC(SoCCore):
|
||||||
|
|
||||||
# SDR SDRAM --------------------------------------------------------------------------------
|
# SDR SDRAM --------------------------------------------------------------------------------
|
||||||
if not self.integrated_main_ram_size:
|
if not self.integrated_main_ram_size:
|
||||||
self.submodules.sdrphy = GENSDRPHY(platform.request("sdram"))
|
self.submodules.sdrphy = GENSDRPHY(platform.request("sdram"), sys_clk_freq)
|
||||||
self.add_sdram("sdram",
|
self.add_sdram("sdram",
|
||||||
phy = self.sdrphy,
|
phy = self.sdrphy,
|
||||||
module = MT48LC16M16(sys_clk_freq, "1:1"),
|
module = MT48LC16M16(sys_clk_freq, "1:1"),
|
||||||
|
|
|
@ -75,7 +75,7 @@ class BaseSoC(SoCCore):
|
||||||
# SDR SDRAM --------------------------------------------------------------------------------
|
# SDR SDRAM --------------------------------------------------------------------------------
|
||||||
if not self.integrated_main_ram_size:
|
if not self.integrated_main_ram_size:
|
||||||
sdrphy_cls = HalfRateGENSDRPHY if sdram_rate == "1:2" else GENSDRPHY
|
sdrphy_cls = HalfRateGENSDRPHY if sdram_rate == "1:2" else GENSDRPHY
|
||||||
self.submodules.sdrphy = sdrphy_cls(platform.request("sdram"))
|
self.submodules.sdrphy = sdrphy_cls(platform.request("sdram"), sys_clk_freq)
|
||||||
self.add_sdram("sdram",
|
self.add_sdram("sdram",
|
||||||
phy = self.sdrphy,
|
phy = self.sdrphy,
|
||||||
module = IS42S16160(sys_clk_freq, sdram_rate),
|
module = IS42S16160(sys_clk_freq, sdram_rate),
|
||||||
|
|
|
@ -97,7 +97,7 @@ class BaseSoC(SoCCore):
|
||||||
# SDR SDRAM --------------------------------------------------------------------------------
|
# SDR SDRAM --------------------------------------------------------------------------------
|
||||||
if not self.integrated_main_ram_size:
|
if not self.integrated_main_ram_size:
|
||||||
sdrphy_cls = HalfRateGENSDRPHY if sdram_rate == "1:2" else GENSDRPHY
|
sdrphy_cls = HalfRateGENSDRPHY if sdram_rate == "1:2" else GENSDRPHY
|
||||||
self.submodules.sdrphy = sdrphy_cls(platform.request("sdram"))
|
self.submodules.sdrphy = sdrphy_cls(platform.request("sdram"), sys_clk_freq)
|
||||||
self.add_sdram("sdram",
|
self.add_sdram("sdram",
|
||||||
phy = self.sdrphy,
|
phy = self.sdrphy,
|
||||||
module = getattr(litedram_modules, sdram_module_cls)(sys_clk_freq, sdram_rate),
|
module = getattr(litedram_modules, sdram_module_cls)(sys_clk_freq, sdram_rate),
|
||||||
|
|
Loading…
Reference in New Issue