mirror of
https://github.com/litex-hub/litex-boards.git
synced 2025-01-03 03:43:36 -05:00
targets/add_sdram: Simplify call by removing useless arguments.
- main_ram mem_map is now directly used by add_sdram when origin is None. - max_sdram_size/min_l2_data_width are no longer exposed as targets arguments this can still be used enforced directly in the few cases it is useful.
This commit is contained in:
parent
58286ce29e
commit
ba01776432
51 changed files with 205 additions and 361 deletions
|
@ -92,13 +92,10 @@ class BaseSoC(SoCCore):
|
||||||
sys_clk_freq=sys_clk_freq)
|
sys_clk_freq=sys_clk_freq)
|
||||||
self.comb += self.crg.stop.eq(self.ddrphy.init.stop)
|
self.comb += self.crg.stop.eq(self.ddrphy.init.stop)
|
||||||
self.add_sdram("sdram",
|
self.add_sdram("sdram",
|
||||||
phy = self.ddrphy,
|
phy = self.ddrphy,
|
||||||
module = MT41K64M16(sys_clk_freq, "1:2"),
|
module = MT41K64M16(sys_clk_freq, "1:2"),
|
||||||
origin = self.mem_map["main_ram"],
|
size = 0x40000000,
|
||||||
size = kwargs.get("max_sdram_size", 0x40000000),
|
l2_cache_size = kwargs.get("l2_size", 8192)
|
||||||
l2_cache_size = kwargs.get("l2_size", 8192),
|
|
||||||
l2_cache_min_data_width = kwargs.get("min_l2_data_width", 128),
|
|
||||||
l2_cache_reverse = True
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Leds -------------------------------------------------------------------------------------
|
# Leds -------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -152,13 +152,10 @@ class BaseSoC(SoCCore):
|
||||||
sdram_cls = M12L16161A
|
sdram_cls = M12L16161A
|
||||||
sdram_size = 0x40000000
|
sdram_size = 0x40000000
|
||||||
self.add_sdram("sdram",
|
self.add_sdram("sdram",
|
||||||
phy = self.sdrphy,
|
phy = self.sdrphy,
|
||||||
module = sdram_cls(sys_clk_freq, sdram_rate),
|
module = sdram_cls(sys_clk_freq, sdram_rate),
|
||||||
origin = self.mem_map["main_ram"],
|
size = 0x40000000,
|
||||||
size = kwargs.get("max_sdram_size", sdram_size),
|
l2_cache_size = kwargs.get("l2_size", 8192)
|
||||||
l2_cache_size = kwargs.get("l2_size", 8192),
|
|
||||||
l2_cache_min_data_width = kwargs.get("min_l2_data_width", 128),
|
|
||||||
l2_cache_reverse = True
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Ethernet / Etherbone ---------------------------------------------------------------------
|
# Ethernet / Etherbone ---------------------------------------------------------------------
|
||||||
|
|
|
@ -132,13 +132,10 @@ class BaseSoC(SoCCore):
|
||||||
# if board == "i5" and revision == "7.0":
|
# if board == "i5" and revision == "7.0":
|
||||||
sdram_cls = M12L64322A # compat with EM638325-6H
|
sdram_cls = M12L64322A # compat with EM638325-6H
|
||||||
self.add_sdram("sdram",
|
self.add_sdram("sdram",
|
||||||
phy = self.sdrphy,
|
phy = self.sdrphy,
|
||||||
module = sdram_cls(sys_clk_freq, sdram_rate),
|
module = sdram_cls(sys_clk_freq, sdram_rate),
|
||||||
origin = self.mem_map["main_ram"],
|
size = 0x40000000,
|
||||||
size = kwargs.get("max_sdram_size", 0x40000000),
|
l2_cache_size = kwargs.get("l2_size", 8192)
|
||||||
l2_cache_size = kwargs.get("l2_size", 8192),
|
|
||||||
l2_cache_min_data_width = kwargs.get("min_l2_data_width", 128),
|
|
||||||
l2_cache_reverse = True
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Ethernet / Etherbone ---------------------------------------------------------------------
|
# Ethernet / Etherbone ---------------------------------------------------------------------
|
||||||
|
|
|
@ -74,13 +74,10 @@ class BaseSoC(SoCCore):
|
||||||
nphases = 4,
|
nphases = 4,
|
||||||
sys_clk_freq = sys_clk_freq)
|
sys_clk_freq = sys_clk_freq)
|
||||||
self.add_sdram("sdram",
|
self.add_sdram("sdram",
|
||||||
phy = self.ddrphy,
|
phy = self.ddrphy,
|
||||||
module = MT41K128M16(sys_clk_freq, "1:4"),
|
module = MT41K128M16(sys_clk_freq, "1:4"),
|
||||||
origin = self.mem_map["main_ram"],
|
size = 0x40000000,
|
||||||
size = kwargs.get("max_sdram_size", 0x40000000),
|
l2_cache_size = kwargs.get("l2_size", 8192)
|
||||||
l2_cache_size = kwargs.get("l2_size", 8192),
|
|
||||||
l2_cache_min_data_width = kwargs.get("min_l2_data_width", 128),
|
|
||||||
l2_cache_reverse = True
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Ethernet / Etherbone ---------------------------------------------------------------------
|
# Ethernet / Etherbone ---------------------------------------------------------------------
|
||||||
|
|
|
@ -70,13 +70,10 @@ class BaseSoC(SoCCore):
|
||||||
nphases = 4,
|
nphases = 4,
|
||||||
sys_clk_freq = sys_clk_freq)
|
sys_clk_freq = sys_clk_freq)
|
||||||
self.add_sdram("sdram",
|
self.add_sdram("sdram",
|
||||||
phy = self.ddrphy,
|
phy = self.ddrphy,
|
||||||
module = MT41K128M16(sys_clk_freq, "1:4"),
|
module = MT41K128M16(sys_clk_freq, "1:4"),
|
||||||
origin = self.mem_map["main_ram"],
|
size = 0x40000000,
|
||||||
size = kwargs.get("max_sdram_size", 0x40000000),
|
l2_cache_size = kwargs.get("l2_size", 8192)
|
||||||
l2_cache_size = kwargs.get("l2_size", 8192),
|
|
||||||
l2_cache_min_data_width = kwargs.get("min_l2_data_width", 128),
|
|
||||||
l2_cache_reverse = True
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Leds -------------------------------------------------------------------------------------
|
# Leds -------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -66,13 +66,10 @@ class BaseSoC(SoCCore):
|
||||||
nphases = 4,
|
nphases = 4,
|
||||||
sys_clk_freq = sys_clk_freq)
|
sys_clk_freq = sys_clk_freq)
|
||||||
self.add_sdram("sdram",
|
self.add_sdram("sdram",
|
||||||
phy = self.ddrphy,
|
phy = self.ddrphy,
|
||||||
module = MT41J256M16(sys_clk_freq, "1:4"),
|
module = MT41J256M16(sys_clk_freq, "1:4"),
|
||||||
origin = self.mem_map["main_ram"],
|
size = 0x40000000,
|
||||||
size = kwargs.get("max_sdram_size", 0x40000000),
|
l2_cache_size = kwargs.get("l2_size", 8192)
|
||||||
l2_cache_size = kwargs.get("l2_size", 8192),
|
|
||||||
l2_cache_min_data_width = kwargs.get("min_l2_data_width", 128),
|
|
||||||
l2_cache_reverse = True
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Ethernet / Etherbone ---------------------------------------------------------------------
|
# Ethernet / Etherbone ---------------------------------------------------------------------
|
||||||
|
|
|
@ -73,13 +73,10 @@ class BaseSoC(SoCCore):
|
||||||
nphases = 2,
|
nphases = 2,
|
||||||
sys_clk_freq = sys_clk_freq)
|
sys_clk_freq = sys_clk_freq)
|
||||||
self.add_sdram("sdram",
|
self.add_sdram("sdram",
|
||||||
phy = self.ddrphy,
|
phy = self.ddrphy,
|
||||||
module = MT47H64M16(sys_clk_freq, "1:2"),
|
module = MT47H64M16(sys_clk_freq, "1:2"),
|
||||||
origin = self.mem_map["main_ram"],
|
size = 0x40000000,
|
||||||
size = kwargs.get("max_sdram_size", 0x40000000),
|
l2_cache_size = kwargs.get("l2_size", 8192)
|
||||||
l2_cache_size = kwargs.get("l2_size", 8192),
|
|
||||||
l2_cache_min_data_width = kwargs.get("min_l2_data_width", 128),
|
|
||||||
l2_cache_reverse = True
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Ethernet / Etherbone ---------------------------------------------------------------------
|
# Ethernet / Etherbone ---------------------------------------------------------------------
|
||||||
|
|
|
@ -79,13 +79,10 @@ class BaseSoC(SoCCore):
|
||||||
nphases = 4,
|
nphases = 4,
|
||||||
sys_clk_freq = sys_clk_freq)
|
sys_clk_freq = sys_clk_freq)
|
||||||
self.add_sdram("sdram",
|
self.add_sdram("sdram",
|
||||||
phy = self.ddrphy,
|
phy = self.ddrphy,
|
||||||
module = MT41K256M16(sys_clk_freq, "1:4"),
|
module = MT41K256M16(sys_clk_freq, "1:4"),
|
||||||
origin = self.mem_map["main_ram"],
|
size = 0x40000000,
|
||||||
size = kwargs.get("max_sdram_size", 0x40000000),
|
l2_cache_size = kwargs.get("l2_size", 8192)
|
||||||
l2_cache_size = kwargs.get("l2_size", 8192),
|
|
||||||
l2_cache_min_data_width = kwargs.get("min_l2_data_width", 128),
|
|
||||||
l2_cache_reverse = True
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Ethernet ---------------------------------------------------------------------------------
|
# Ethernet ---------------------------------------------------------------------------------
|
||||||
|
|
|
@ -65,13 +65,10 @@ class BaseSoC(SoCCore):
|
||||||
nphases = 4,
|
nphases = 4,
|
||||||
sys_clk_freq = sys_clk_freq)
|
sys_clk_freq = sys_clk_freq)
|
||||||
self.add_sdram("sdram",
|
self.add_sdram("sdram",
|
||||||
phy = self.ddrphy,
|
phy = self.ddrphy,
|
||||||
module = H5TC4G63CFR(sys_clk_freq, "1:4"),
|
module = H5TC4G63CFR(sys_clk_freq, "1:4"),
|
||||||
origin = self.mem_map["main_ram"],
|
size = 0x40000000,
|
||||||
size = kwargs.get("max_sdram_size", 0x40000000),
|
l2_cache_size = kwargs.get("l2_size", 8192)
|
||||||
l2_cache_size = kwargs.get("l2_size", 8192),
|
|
||||||
l2_cache_min_data_width = kwargs.get("min_l2_data_width", 128),
|
|
||||||
l2_cache_reverse = True
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Leds -------------------------------------------------------------------------------------
|
# Leds -------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -73,13 +73,10 @@ class BaseSoC(SoCCore):
|
||||||
sys_clk_freq = sys_clk_freq,
|
sys_clk_freq = sys_clk_freq,
|
||||||
iodelay_clk_freq = 500e6)
|
iodelay_clk_freq = 500e6)
|
||||||
self.add_sdram("sdram",
|
self.add_sdram("sdram",
|
||||||
phy = self.ddrphy,
|
phy = self.ddrphy,
|
||||||
module = MT40A256M16(sys_clk_freq, "1:4"),
|
module = MT40A256M16(sys_clk_freq, "1:4"),
|
||||||
origin = self.mem_map["main_ram"],
|
size = 0x40000000,
|
||||||
size = kwargs.get("max_sdram_size", 0x40000000),
|
l2_cache_size = kwargs.get("l2_size", 8192)
|
||||||
l2_cache_size = kwargs.get("l2_size", 8192),
|
|
||||||
l2_cache_min_data_width = kwargs.get("min_l2_data_width", 128),
|
|
||||||
l2_cache_reverse = True
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Leds -------------------------------------------------------------------------------------
|
# Leds -------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -106,13 +106,10 @@ class BaseSoC(SoCCore):
|
||||||
self.comb += self.crg.reset.eq(self.ddrphy.init.reset)
|
self.comb += self.crg.reset.eq(self.ddrphy.init.reset)
|
||||||
self.comb += ddram.vccio.eq(Replicate(C(1), ddram.vccio.nbits))
|
self.comb += ddram.vccio.eq(Replicate(C(1), ddram.vccio.nbits))
|
||||||
self.add_sdram("sdram",
|
self.add_sdram("sdram",
|
||||||
phy = self.ddrphy,
|
phy = self.ddrphy,
|
||||||
module = IS43TR16256A(sys_clk_freq, "1:2"),
|
module = IS43TR16256A(sys_clk_freq, "1:2"),
|
||||||
origin = self.mem_map["main_ram"],
|
size = 0x40000000,
|
||||||
size = kwargs.get("max_sdram_size", 0x20000000),
|
l2_cache_size = kwargs.get("l2_size", 8192)
|
||||||
l2_cache_size = kwargs.get("l2_size", 8192),
|
|
||||||
l2_cache_min_data_width = kwargs.get("min_l2_data_width", 128),
|
|
||||||
l2_cache_reverse = True
|
|
||||||
)
|
)
|
||||||
self.comb += platform.request("dram_vtt_en").eq(0 if self.integrated_main_ram_size else 1)
|
self.comb += platform.request("dram_vtt_en").eq(0 if self.integrated_main_ram_size else 1)
|
||||||
|
|
||||||
|
|
|
@ -191,13 +191,10 @@ class BaseSoC(SoCCore):
|
||||||
self.comb += self.crg.stop.eq(self.ddrphy.init.stop)
|
self.comb += self.crg.stop.eq(self.ddrphy.init.stop)
|
||||||
self.comb += self.crg.reset.eq(self.ddrphy.init.reset)
|
self.comb += self.crg.reset.eq(self.ddrphy.init.reset)
|
||||||
self.add_sdram("sdram",
|
self.add_sdram("sdram",
|
||||||
phy = self.ddrphy,
|
phy = self.ddrphy,
|
||||||
module = sdram_module(sys_clk_freq, "1:2"),
|
module = sdram_module(sys_clk_freq, "1:2"),
|
||||||
origin = self.mem_map["main_ram"],
|
size = 0x40000000,
|
||||||
size = kwargs.get("max_sdram_size", 0x40000000),
|
l2_cache_size = kwargs.get("l2_size", 8192)
|
||||||
l2_cache_size = kwargs.get("l2_size", 8192),
|
|
||||||
l2_cache_min_data_width = kwargs.get("min_l2_data_width", 128),
|
|
||||||
l2_cache_reverse = True
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Leds -------------------------------------------------------------------------------------
|
# Leds -------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -72,13 +72,10 @@ class BaseSoC(SoCCore):
|
||||||
if not self.integrated_main_ram_size:
|
if not self.integrated_main_ram_size:
|
||||||
self.submodules.sdrphy = GENSDRPHY(platform.request("sdram"), sys_clk_freq)
|
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"),
|
||||||
origin = self.mem_map["main_ram"],
|
size = 0x40000000,
|
||||||
size = kwargs.get("max_sdram_size", 0x40000000),
|
l2_cache_size = kwargs.get("l2_size", 8192)
|
||||||
l2_cache_size = kwargs.get("l2_size", 8192),
|
|
||||||
l2_cache_min_data_width = kwargs.get("min_l2_data_width", 128),
|
|
||||||
l2_cache_reverse = True
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Build --------------------------------------------------------------------------------------------
|
# Build --------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -80,13 +80,10 @@ class BaseSoC(SoCCore):
|
||||||
nphases = 4,
|
nphases = 4,
|
||||||
sys_clk_freq = sys_clk_freq)
|
sys_clk_freq = sys_clk_freq)
|
||||||
self.add_sdram("sdram",
|
self.add_sdram("sdram",
|
||||||
phy = self.ddrphy,
|
phy = self.ddrphy,
|
||||||
module = K4B2G1646F(sys_clk_freq, "1:4"),
|
module = K4B2G1646F(sys_clk_freq, "1:4"),
|
||||||
origin = self.mem_map["main_ram"],
|
size = 0x40000000,
|
||||||
size = kwargs.get("max_sdram_size", 0x40000000),
|
l2_cache_size = kwargs.get("l2_size", 8192)
|
||||||
l2_cache_size = kwargs.get("l2_size", 8192),
|
|
||||||
l2_cache_min_data_width = kwargs.get("min_l2_data_width", 128),
|
|
||||||
l2_cache_reverse = True
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Ethernet ---------------------------------------------------------------------------------
|
# Ethernet ---------------------------------------------------------------------------------
|
||||||
|
|
|
@ -98,13 +98,10 @@ class BaseSoC(SoCCore):
|
||||||
self.comb += self.crg.stop.eq(self.ddrphy.init.stop)
|
self.comb += self.crg.stop.eq(self.ddrphy.init.stop)
|
||||||
self.comb += self.crg.reset.eq(self.ddrphy.init.reset)
|
self.comb += self.crg.reset.eq(self.ddrphy.init.reset)
|
||||||
self.add_sdram("sdram",
|
self.add_sdram("sdram",
|
||||||
phy = self.ddrphy,
|
phy = self.ddrphy,
|
||||||
module = MT41K256M16(sys_clk_freq, "1:2"),
|
module = MT41K256M16(sys_clk_freq, "1:2"),
|
||||||
origin = self.mem_map["main_ram"],
|
size = 0x40000000,
|
||||||
size = kwargs.get("max_sdram_size", 0x40000000),
|
l2_cache_size = kwargs.get("l2_size", 8192)
|
||||||
l2_cache_size = kwargs.get("l2_size", 8192),
|
|
||||||
l2_cache_min_data_width = kwargs.get("min_l2_data_width", 128),
|
|
||||||
l2_cache_reverse = True
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Ethernet / Etherbone ---------------------------------------------------------------------
|
# Ethernet / Etherbone ---------------------------------------------------------------------
|
||||||
|
|
|
@ -64,9 +64,9 @@ class _CRG(Module):
|
||||||
|
|
||||||
class BaseSoC(SoCCore):
|
class BaseSoC(SoCCore):
|
||||||
mem_map = {
|
mem_map = {
|
||||||
"rom": 0x00000000,
|
"rom" : 0x00000000,
|
||||||
"sram": 0x40000000,
|
"sram" : 0x40000000,
|
||||||
"csr": 0xf0000000,
|
"csr" : 0xf0000000,
|
||||||
}
|
}
|
||||||
def __init__(self, sys_clk_freq=int(75e6), toolchain="radiant", **kwargs):
|
def __init__(self, sys_clk_freq=int(75e6), toolchain="radiant", **kwargs):
|
||||||
platform = crosslink_nx_evn.Platform(toolchain=toolchain)
|
platform = crosslink_nx_evn.Platform(toolchain=toolchain)
|
||||||
|
|
|
@ -65,9 +65,9 @@ class _CRG(Module):
|
||||||
|
|
||||||
class BaseSoC(SoCCore):
|
class BaseSoC(SoCCore):
|
||||||
mem_map = {
|
mem_map = {
|
||||||
"rom": 0x00000000,
|
"rom": 0x00000000,
|
||||||
"sram": 0x40000000,
|
"sram": 0x40000000,
|
||||||
"csr": 0xf0000000,
|
"csr": 0xf0000000,
|
||||||
}
|
}
|
||||||
def __init__(self, sys_clk_freq=int(75e6), hyperram="none", toolchain="radiant", **kwargs):
|
def __init__(self, sys_clk_freq=int(75e6), hyperram="none", toolchain="radiant", **kwargs):
|
||||||
platform = crosslink_nx_vip.Platform(toolchain=toolchain)
|
platform = crosslink_nx_vip.Platform(toolchain=toolchain)
|
||||||
|
|
|
@ -102,13 +102,10 @@ class BaseSoC(SoCCore):
|
||||||
self.comb += self.crg.stop.eq(self.ddrphy.init.stop)
|
self.comb += self.crg.stop.eq(self.ddrphy.init.stop)
|
||||||
self.comb += self.crg.reset.eq(self.ddrphy.init.reset)
|
self.comb += self.crg.reset.eq(self.ddrphy.init.reset)
|
||||||
self.add_sdram("sdram",
|
self.add_sdram("sdram",
|
||||||
phy = self.ddrphy,
|
phy = self.ddrphy,
|
||||||
module = MT41K64M16(sys_clk_freq, "1:2"),
|
module = MT41K64M16(sys_clk_freq, "1:2"),
|
||||||
origin = self.mem_map["main_ram"],
|
size = 0x40000000,
|
||||||
size = kwargs.get("max_sdram_size", 0x40000000),
|
l2_cache_size = kwargs.get("l2_size", 8192)
|
||||||
l2_cache_size = kwargs.get("l2_size", 8192),
|
|
||||||
l2_cache_min_data_width = kwargs.get("min_l2_data_width", 128),
|
|
||||||
l2_cache_reverse = True
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Ethernet / Etherbone ---------------------------------------------------------------------
|
# Ethernet / Etherbone ---------------------------------------------------------------------
|
||||||
|
|
|
@ -66,13 +66,10 @@ class BaseSoC(SoCCore):
|
||||||
if not self.integrated_main_ram_size:
|
if not self.integrated_main_ram_size:
|
||||||
self.submodules.sdrphy = GENSDRPHY(platform.request("sdram"), sys_clk_freq)
|
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"),
|
||||||
origin = self.mem_map["main_ram"],
|
size = 0x40000000,
|
||||||
size = kwargs.get("max_sdram_size", 0x40000000),
|
l2_cache_size = kwargs.get("l2_size", 8192)
|
||||||
l2_cache_size = kwargs.get("l2_size", 8192),
|
|
||||||
l2_cache_min_data_width = kwargs.get("min_l2_data_width", 128),
|
|
||||||
l2_cache_reverse = True
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Ethernet ---------------------------------------------------------------------------------
|
# Ethernet ---------------------------------------------------------------------------------
|
||||||
|
|
|
@ -128,13 +128,10 @@ class BaseSoC(SoCCore):
|
||||||
self.comb += self.crg.stop.eq(self.ddrphy.init.stop)
|
self.comb += self.crg.stop.eq(self.ddrphy.init.stop)
|
||||||
self.comb += self.crg.reset.eq(self.ddrphy.init.reset)
|
self.comb += self.crg.reset.eq(self.ddrphy.init.reset)
|
||||||
self.add_sdram("sdram",
|
self.add_sdram("sdram",
|
||||||
phy = self.ddrphy,
|
phy = self.ddrphy,
|
||||||
module = sdram_module(sys_clk_freq, "1:2"),
|
module = sdram_module(sys_clk_freq, "1:2"),
|
||||||
origin = self.mem_map["main_ram"],
|
size = 0x40000000,
|
||||||
size = kwargs.get("max_sdram_size", 0x40000000),
|
l2_cache_size = kwargs.get("l2_size", 8192)
|
||||||
l2_cache_size = kwargs.get("l2_size", 8192),
|
|
||||||
l2_cache_min_data_width = kwargs.get("min_l2_data_width", 128),
|
|
||||||
l2_cache_reverse = True
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Ethernet ---------------------------------------------------------------------------------
|
# Ethernet ---------------------------------------------------------------------------------
|
||||||
|
|
|
@ -70,13 +70,10 @@ class BaseSoC(SoCCore):
|
||||||
if not self.integrated_main_ram_size:
|
if not self.integrated_main_ram_size:
|
||||||
self.submodules.sdrphy = GENSDRPHY(platform.request("sdram"), sys_clk_freq)
|
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"),
|
||||||
origin = self.mem_map["main_ram"],
|
size = 0x40000000,
|
||||||
size = kwargs.get("max_sdram_size", 0x2000000),
|
l2_cache_size = kwargs.get("l2_size", 8192)
|
||||||
l2_cache_size = kwargs.get("l2_size", 8192),
|
|
||||||
l2_cache_min_data_width = kwargs.get("min_l2_data_width", 128),
|
|
||||||
l2_cache_reverse = True
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Video Terminal ---------------------------------------------------------------------------
|
# Video Terminal ---------------------------------------------------------------------------
|
||||||
|
|
|
@ -76,13 +76,10 @@ class BaseSoC(SoCCore):
|
||||||
sys_clk_freq = sys_clk_freq,
|
sys_clk_freq = sys_clk_freq,
|
||||||
iodelay_clk_freq = 200e6)
|
iodelay_clk_freq = 200e6)
|
||||||
self.add_sdram("sdram",
|
self.add_sdram("sdram",
|
||||||
phy = self.ddrphy,
|
phy = self.ddrphy,
|
||||||
module = MT41J128M16(sys_clk_freq, "1:4"),
|
module = MT41J128M16(sys_clk_freq, "1:4"),
|
||||||
origin = self.mem_map["main_ram"],
|
size = 0x40000000,
|
||||||
size = kwargs.get("max_sdram_size", 0x40000000),
|
l2_cache_size = kwargs.get("l2_size", 8192)
|
||||||
l2_cache_size = kwargs.get("l2_size", 8192),
|
|
||||||
l2_cache_min_data_width = kwargs.get("min_l2_data_width", 128),
|
|
||||||
l2_cache_reverse = True
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# PCIe -------------------------------------------------------------------------------------
|
# PCIe -------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -70,13 +70,10 @@ class BaseSoC(SoCCore):
|
||||||
nphases = 4,
|
nphases = 4,
|
||||||
sys_clk_freq = sys_clk_freq)
|
sys_clk_freq = sys_clk_freq)
|
||||||
self.add_sdram("sdram",
|
self.add_sdram("sdram",
|
||||||
phy = self.ddrphy,
|
phy = self.ddrphy,
|
||||||
module = MT41J128M16(sys_clk_freq, "1:4"),
|
module = MT41J128M16(sys_clk_freq, "1:4"),
|
||||||
origin = self.mem_map["main_ram"],
|
size = 0x40000000,
|
||||||
size = kwargs.get("max_sdram_size", 0x40000000),
|
l2_cache_size = kwargs.get("l2_size", 8192)
|
||||||
l2_cache_size = kwargs.get("l2_size", 8192),
|
|
||||||
l2_cache_min_data_width = kwargs.get("min_l2_data_width", 128),
|
|
||||||
l2_cache_reverse = True
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Ethernet ---------------------------------------------------------------------------------
|
# Ethernet ---------------------------------------------------------------------------------
|
||||||
|
|
|
@ -73,13 +73,10 @@ class BaseSoC(SoCCore):
|
||||||
sys_clk_freq = sys_clk_freq,
|
sys_clk_freq = sys_clk_freq,
|
||||||
iodelay_clk_freq = 200e6)
|
iodelay_clk_freq = 200e6)
|
||||||
self.add_sdram("sdram",
|
self.add_sdram("sdram",
|
||||||
phy = self.ddrphy,
|
phy = self.ddrphy,
|
||||||
module = MT8KTF51264(sys_clk_freq, "1:4", speedgrade="800"),
|
module = MT8KTF51264(sys_clk_freq, "1:4", speedgrade="800"),
|
||||||
origin = self.mem_map["main_ram"],
|
size = 0x40000000,
|
||||||
size = kwargs.get("max_sdram_size", 0x40000000),
|
l2_cache_size = kwargs.get("l2_size", 8192)
|
||||||
l2_cache_size = kwargs.get("l2_size", 8192),
|
|
||||||
l2_cache_min_data_width = kwargs.get("min_l2_data_width", 128),
|
|
||||||
l2_cache_reverse = True
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# PCIe -------------------------------------------------------------------------------------
|
# PCIe -------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -77,13 +77,10 @@ class BaseSoC(SoCCore):
|
||||||
sys_clk_freq = sys_clk_freq,
|
sys_clk_freq = sys_clk_freq,
|
||||||
iodelay_clk_freq = 200e6)
|
iodelay_clk_freq = 200e6)
|
||||||
self.add_sdram("sdram",
|
self.add_sdram("sdram",
|
||||||
phy = self.ddrphy,
|
phy = self.ddrphy,
|
||||||
module = MT41J128M16(sys_clk_freq, "1:4"),
|
module = MT41J128M16(sys_clk_freq, "1:4"),
|
||||||
origin = self.mem_map["main_ram"],
|
size = 0x40000000,
|
||||||
size = kwargs.get("max_sdram_size", 0x40000000),
|
l2_cache_size = kwargs.get("l2_size", 8192)
|
||||||
l2_cache_size = kwargs.get("l2_size", 8192),
|
|
||||||
l2_cache_min_data_width = kwargs.get("min_l2_data_width", 128),
|
|
||||||
l2_cache_reverse = True
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# PCIe -------------------------------------------------------------------------------------
|
# PCIe -------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -76,13 +76,10 @@ class BaseSoC(SoCCore):
|
||||||
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"), sys_clk_freq)
|
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),
|
||||||
origin = self.mem_map["main_ram"],
|
size = 0x40000000,
|
||||||
size = kwargs.get("max_sdram_size", 0x40000000),
|
l2_cache_size = kwargs.get("l2_size", 8192)
|
||||||
l2_cache_size = kwargs.get("l2_size", 8192),
|
|
||||||
l2_cache_min_data_width = kwargs.get("min_l2_data_width", 128),
|
|
||||||
l2_cache_reverse = True
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Leds -------------------------------------------------------------------------------------
|
# Leds -------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -72,13 +72,10 @@ class BaseSoC(SoCCore):
|
||||||
nphases = 4,
|
nphases = 4,
|
||||||
sys_clk_freq = sys_clk_freq)
|
sys_clk_freq = sys_clk_freq)
|
||||||
self.add_sdram("sdram",
|
self.add_sdram("sdram",
|
||||||
phy = self.ddrphy,
|
phy = self.ddrphy,
|
||||||
module = MT41K128M16(sys_clk_freq, "1:4"),
|
module = MT41K128M16(sys_clk_freq, "1:4"),
|
||||||
origin = self.mem_map["main_ram"],
|
size = 0x40000000,
|
||||||
size = kwargs.get("max_sdram_size", 0x40000000),
|
l2_cache_size = kwargs.get("l2_size", 8192)
|
||||||
l2_cache_size = kwargs.get("l2_size", 8192),
|
|
||||||
l2_cache_min_data_width = kwargs.get("min_l2_data_width", 128),
|
|
||||||
l2_cache_reverse = True
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Ethernet / Etherbone ---------------------------------------------------------------------
|
# Ethernet / Etherbone ---------------------------------------------------------------------
|
||||||
|
|
|
@ -113,13 +113,11 @@ class BaseSoC(SoCCore):
|
||||||
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"), sys_clk_freq)
|
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),
|
||||||
origin = self.mem_map["main_ram"],
|
size = 0x40000000,
|
||||||
size = kwargs.get("max_sdram_size", 0x40000000),
|
l2_cache_size = kwargs.get("l2_size", 8192),
|
||||||
l2_cache_size = kwargs.get("l2_size", 8192),
|
l2_cache_reverse = False
|
||||||
l2_cache_min_data_width = kwargs.get("min_l2_data_width", 128),
|
|
||||||
l2_cache_reverse = False
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Video ------------------------------------------------------------------------------------
|
# Video ------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -179,13 +179,10 @@ class BaseSoC(SoCCore):
|
||||||
self.ddrphy.clk4x_rd_strb.eq(self.crg.clk4x_rd_strb),
|
self.ddrphy.clk4x_rd_strb.eq(self.crg.clk4x_rd_strb),
|
||||||
]
|
]
|
||||||
self.add_sdram("sdram",
|
self.add_sdram("sdram",
|
||||||
phy = self.ddrphy,
|
phy = self.ddrphy,
|
||||||
module = MT46H32M16(sys_clk_freq, "1:2"),
|
module = MT46H32M16(sys_clk_freq, "1:2"),
|
||||||
origin = self.mem_map["main_ram"],
|
size = 0x40000000,
|
||||||
size = kwargs.get("max_sdram_size", 0x40000000),
|
l2_cache_size = kwargs.get("l2_size", 8192)
|
||||||
l2_cache_size = kwargs.get("l2_size", 8192),
|
|
||||||
l2_cache_min_data_width = kwargs.get("min_l2_data_width", 128),
|
|
||||||
l2_cache_reverse = True
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Leds -------------------------------------------------------------------------------------
|
# Leds -------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -85,13 +85,11 @@ class BaseSoC(SoCCore):
|
||||||
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"), sys_clk_freq)
|
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),
|
||||||
origin = self.mem_map["main_ram"],
|
size = 0x40000000,
|
||||||
size = kwargs.get("max_sdram_size", 0x40000000),
|
l2_cache_size = kwargs.get("l2_size", 8192),
|
||||||
l2_cache_size = kwargs.get("l2_size", 8192),
|
l2_cache_reverse = False
|
||||||
l2_cache_min_data_width = kwargs.get("min_l2_data_width", 128),
|
|
||||||
l2_cache_reverse = False
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Video ------------------------------------------------------------------------------------
|
# Video ------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -88,13 +88,10 @@ class BaseSoC(SoCCore):
|
||||||
nphases = 4,
|
nphases = 4,
|
||||||
sys_clk_freq = sys_clk_freq)
|
sys_clk_freq = sys_clk_freq)
|
||||||
self.add_sdram("sdram",
|
self.add_sdram("sdram",
|
||||||
phy = self.ddrphy,
|
phy = self.ddrphy,
|
||||||
module = MT41K64M16(sys_clk_freq, "1:4"),
|
module = MT41K64M16(sys_clk_freq, "1:4"),
|
||||||
origin = self.mem_map["main_ram"],
|
size = 0x40000000,
|
||||||
size = kwargs.get("max_sdram_size", 0x40000000),
|
l2_cache_size = kwargs.get("l2_size", 8192)
|
||||||
l2_cache_size = kwargs.get("l2_size", 8192),
|
|
||||||
l2_cache_min_data_width = kwargs.get("min_l2_data_width", 128),
|
|
||||||
l2_cache_reverse = True
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Etherbone --------------------------------------------------------------------------------
|
# Etherbone --------------------------------------------------------------------------------
|
||||||
|
|
|
@ -92,13 +92,10 @@ class BaseSoC(SoCCore):
|
||||||
sys_clk_freq = sys_clk_freq,
|
sys_clk_freq = sys_clk_freq,
|
||||||
iodelay_clk_freq = 200e6)
|
iodelay_clk_freq = 200e6)
|
||||||
self.add_sdram("sdram",
|
self.add_sdram("sdram",
|
||||||
phy = self.ddrphy,
|
phy = self.ddrphy,
|
||||||
module = MT41K512M16(sys_clk_freq, "1:4"),
|
module = MT41K512M16(sys_clk_freq, "1:4"),
|
||||||
origin = self.mem_map["main_ram"],
|
size = 0x40000000,
|
||||||
size = kwargs.get("max_sdram_size", 0x40000000),
|
l2_cache_size = kwargs.get("l2_size", 8192)
|
||||||
l2_cache_size = kwargs.get("l2_size", 8192),
|
|
||||||
l2_cache_min_data_width = kwargs.get("min_l2_data_width", 128),
|
|
||||||
l2_cache_reverse = True
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# PCIe -------------------------------------------------------------------------------------
|
# PCIe -------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -77,13 +77,10 @@ class BaseSoC(SoCCore):
|
||||||
sys_clk_freq = sys_clk_freq,
|
sys_clk_freq = sys_clk_freq,
|
||||||
iodelay_clk_freq = 500e6)
|
iodelay_clk_freq = 500e6)
|
||||||
self.add_sdram("sdram",
|
self.add_sdram("sdram",
|
||||||
phy = self.ddrphy,
|
phy = self.ddrphy,
|
||||||
module = MT40A512M8(sys_clk_freq, "1:4"),
|
module = MT40A512M8(sys_clk_freq, "1:4"),
|
||||||
origin = self.mem_map["main_ram"],
|
size = 0x40000000,
|
||||||
size = kwargs.get("max_sdram_size", 0x40000000),
|
l2_cache_size = kwargs.get("l2_size", 8192)
|
||||||
l2_cache_size = kwargs.get("l2_size", 8192),
|
|
||||||
l2_cache_min_data_width = kwargs.get("min_l2_data_width", 128),
|
|
||||||
l2_cache_reverse = True
|
|
||||||
)
|
)
|
||||||
# Workadound for Vivado 2018.2 DRC, can be ignored and probably fixed on newer Vivado versions.
|
# Workadound for Vivado 2018.2 DRC, can be ignored and probably fixed on newer Vivado versions.
|
||||||
platform.add_platform_command("set_property SEVERITY {{Warning}} [get_drc_checks PDCN-2736]")
|
platform.add_platform_command("set_property SEVERITY {{Warning}} [get_drc_checks PDCN-2736]")
|
||||||
|
|
|
@ -76,13 +76,10 @@ class BaseSoC(SoCCore):
|
||||||
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"), sys_clk_freq)
|
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),
|
||||||
origin = self.mem_map["main_ram"],
|
size = 0x40000000,
|
||||||
size = kwargs.get("max_sdram_size", 0x40000000),
|
l2_cache_size = kwargs.get("l2_size", 8192)
|
||||||
l2_cache_size = kwargs.get("l2_size", 8192),
|
|
||||||
l2_cache_min_data_width = kwargs.get("min_l2_data_width", 128),
|
|
||||||
l2_cache_reverse = True
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Leds -------------------------------------------------------------------------------------
|
# Leds -------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -70,13 +70,10 @@ class BaseSoC(SoCCore):
|
||||||
if not self.integrated_main_ram_size:
|
if not self.integrated_main_ram_size:
|
||||||
self.submodules.sdrphy = GENSDRPHY(platform.request("sdram"), sys_clk_freq)
|
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"),
|
||||||
origin = self.mem_map["main_ram"],
|
size = 0x40000000,
|
||||||
size = kwargs.get("max_sdram_size", 0x40000000),
|
l2_cache_size = kwargs.get("l2_size", 8192)
|
||||||
l2_cache_size = kwargs.get("l2_size", 8192),
|
|
||||||
l2_cache_min_data_width = kwargs.get("min_l2_data_width", 128),
|
|
||||||
l2_cache_reverse = True
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Video Terminal ---------------------------------------------------------------------------
|
# Video Terminal ---------------------------------------------------------------------------
|
||||||
|
|
|
@ -81,13 +81,10 @@ class BaseSoC(SoCCore):
|
||||||
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"), sys_clk_freq)
|
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),
|
||||||
origin = self.mem_map["main_ram"],
|
size = 0x40000000,
|
||||||
size = kwargs.get("max_sdram_size", 0x40000000),
|
l2_cache_size = kwargs.get("l2_size", 8192)
|
||||||
l2_cache_size = kwargs.get("l2_size", 8192),
|
|
||||||
l2_cache_min_data_width = kwargs.get("min_l2_data_width", 128),
|
|
||||||
l2_cache_reverse = True
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Video Terminal ---------------------------------------------------------------------------
|
# Video Terminal ---------------------------------------------------------------------------
|
||||||
|
|
|
@ -65,13 +65,10 @@ class BaseSoC(SoCCore):
|
||||||
if not self.integrated_main_ram_size:
|
if not self.integrated_main_ram_size:
|
||||||
self.submodules.sdrphy = GENSDRPHY(platform.request("sdram"), sys_clk_freq)
|
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"),
|
||||||
origin = self.mem_map["main_ram"],
|
size = 0x40000000,
|
||||||
size = kwargs.get("max_sdram_size", 0x40000000),
|
l2_cache_size = kwargs.get("l2_size", 8192)
|
||||||
l2_cache_size = kwargs.get("l2_size", 8192),
|
|
||||||
l2_cache_min_data_width = kwargs.get("min_l2_data_width", 128),
|
|
||||||
l2_cache_reverse = True
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Build --------------------------------------------------------------------------------------------
|
# Build --------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -65,13 +65,10 @@ class BaseSoC(SoCCore):
|
||||||
if not self.integrated_main_ram_size:
|
if not self.integrated_main_ram_size:
|
||||||
self.submodules.sdrphy = GENSDRPHY(platform.request("sdram"), sys_clk_freq)
|
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"),
|
||||||
origin = self.mem_map["main_ram"],
|
size = 0x40000000,
|
||||||
size = kwargs.get("max_sdram_size", 0x40000000),
|
l2_cache_size = kwargs.get("l2_size", 8192)
|
||||||
l2_cache_size = kwargs.get("l2_size", 8192),
|
|
||||||
l2_cache_min_data_width = kwargs.get("min_l2_data_width", 128),
|
|
||||||
l2_cache_reverse = True
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Build --------------------------------------------------------------------------------------------
|
# Build --------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -120,31 +120,15 @@ class BaseSoC(SoCCore):
|
||||||
self.submodules.crg = _CRG(platform, sys_clk_freq, with_sdram=mister_sdram != None, sdram_rate=sdram_rate)
|
self.submodules.crg = _CRG(platform, sys_clk_freq, with_sdram=mister_sdram != None, sdram_rate=sdram_rate)
|
||||||
|
|
||||||
# SDR SDRAM --------------------------------------------------------------------------------
|
# SDR SDRAM --------------------------------------------------------------------------------
|
||||||
if mister_sdram == "xs_v22":
|
sdrphy_cls = HalfRateGENSDRPHY if sdram_rate == "1:2" else GENSDRPHY
|
||||||
sdrphy_cls = HalfRateGENSDRPHY if sdram_rate == "1:2" else GENSDRPHY
|
sdrphy_mod = {"xs_v22": W9825G6KH6, "xs_v24": AS4C32M16}
|
||||||
self.submodules.sdrphy = sdrphy_cls(platform.request("sdram"), sys_clk_freq)
|
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 = W9825G6KH6(sys_clk_freq, sdram_rate),
|
module = sdrphy_mod(sys_clk_freq, sdram_rate),
|
||||||
origin = self.mem_map["main_ram"],
|
size = 0x40000000,
|
||||||
size = kwargs.get("max_sdram_size", 0x40000000),
|
l2_cache_size = kwargs.get("l2_size", 8192)
|
||||||
l2_cache_size = kwargs.get("l2_size", 8192),
|
)
|
||||||
l2_cache_min_data_width = kwargs.get("min_l2_data_width", 128),
|
|
||||||
l2_cache_reverse = True
|
|
||||||
)
|
|
||||||
|
|
||||||
if mister_sdram == "xs_v24":
|
|
||||||
sdrphy_cls = HalfRateGENSDRPHY if sdram_rate == "1:2" else GENSDRPHY
|
|
||||||
self.submodules.sdrphy = sdrphy_cls(platform.request("sdram"), sys_clk_freq)
|
|
||||||
self.add_sdram("sdram",
|
|
||||||
phy = self.sdrphy,
|
|
||||||
module = AS4C32M16(sys_clk_freq, sdram_rate),
|
|
||||||
origin = self.mem_map["main_ram"],
|
|
||||||
size = kwargs.get("max_sdram_size", 0x40000000),
|
|
||||||
l2_cache_size = kwargs.get("l2_size", 8192),
|
|
||||||
l2_cache_min_data_width = kwargs.get("min_l2_data_width", 128),
|
|
||||||
l2_cache_reverse = True
|
|
||||||
)
|
|
||||||
|
|
||||||
# Video Terminal ---------------------------------------------------------------------------
|
# Video Terminal ---------------------------------------------------------------------------
|
||||||
if with_video_terminal:
|
if with_video_terminal:
|
||||||
|
|
|
@ -132,13 +132,10 @@ class BaseSoC(SoCCore):
|
||||||
self.comb += self.crg.stop.eq(self.ddrphy.init.stop)
|
self.comb += self.crg.stop.eq(self.ddrphy.init.stop)
|
||||||
self.comb += self.crg.reset.eq(self.ddrphy.init.reset)
|
self.comb += self.crg.reset.eq(self.ddrphy.init.reset)
|
||||||
self.add_sdram("sdram",
|
self.add_sdram("sdram",
|
||||||
phy = self.ddrphy,
|
phy = self.ddrphy,
|
||||||
module = MT41J256M16(sys_clk_freq, "1:2"),
|
module = MT41J256M16(sys_clk_freq, "1:2"),
|
||||||
origin = self.mem_map["main_ram"],
|
size = 0x40000000,
|
||||||
size = kwargs.get("max_sdram_size", 0x40000000),
|
l2_cache_size = kwargs.get("l2_size", 8192)
|
||||||
l2_cache_size = kwargs.get("l2_size", 8192),
|
|
||||||
l2_cache_min_data_width = kwargs.get("min_l2_data_width", 128),
|
|
||||||
l2_cache_reverse = True
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Ethernet ---------------------------------------------------------------------------------
|
# Ethernet ---------------------------------------------------------------------------------
|
||||||
|
|
|
@ -79,13 +79,10 @@ class BaseSoC(SoCCore):
|
||||||
if not self.integrated_main_ram_size:
|
if not self.integrated_main_ram_size:
|
||||||
self.submodules.sdrphy = GENSDRPHY(platform.request("sdram"), sys_clk_freq)
|
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"),
|
||||||
origin = self.mem_map["main_ram"],
|
size = 0x40000000,
|
||||||
size = kwargs.get("max_sdram_size", 0x40000000),
|
l2_cache_size = kwargs.get("l2_size", 8192)
|
||||||
l2_cache_size = kwargs.get("l2_size", 8192),
|
|
||||||
l2_cache_min_data_width = kwargs.get("min_l2_data_width", 128),
|
|
||||||
l2_cache_reverse = True
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Ethernet ---------------------------------------------------------------------------------
|
# Ethernet ---------------------------------------------------------------------------------
|
||||||
|
|
|
@ -111,7 +111,6 @@ class BaseSoC(SoCCore):
|
||||||
self.add_sdram("sdram",
|
self.add_sdram("sdram",
|
||||||
phy = self.sdrphy,
|
phy = self.sdrphy,
|
||||||
module = MT48LC4M16(sys_clk_freq, sdram_rate), # FIXME.
|
module = MT48LC4M16(sys_clk_freq, sdram_rate), # FIXME.
|
||||||
origin = self.mem_map["main_ram"],
|
|
||||||
l2_cache_size = 128,
|
l2_cache_size = 128,
|
||||||
l2_cache_min_data_width = 256,
|
l2_cache_min_data_width = 256,
|
||||||
)
|
)
|
||||||
|
|
|
@ -76,13 +76,10 @@ class BaseSoC(SoCCore):
|
||||||
nphases = 4,
|
nphases = 4,
|
||||||
sys_clk_freq = sys_clk_freq)
|
sys_clk_freq = sys_clk_freq)
|
||||||
self.add_sdram("sdram",
|
self.add_sdram("sdram",
|
||||||
phy = self.ddrphy,
|
phy = self.ddrphy,
|
||||||
module = MT8JTF12864(sys_clk_freq, "1:4"),
|
module = MT8JTF12864(sys_clk_freq, "1:4"),
|
||||||
origin = self.mem_map["main_ram"],
|
size = 0x40000000,
|
||||||
size = kwargs.get("max_sdram_size", 0x40000000),
|
l2_cache_size = kwargs.get("l2_size", 8192)
|
||||||
l2_cache_size = kwargs.get("l2_size", 8192),
|
|
||||||
l2_cache_min_data_width = kwargs.get("min_l2_data_width", 128),
|
|
||||||
l2_cache_reverse = True
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Ethernet ---------------------------------------------------------------------------------
|
# Ethernet ---------------------------------------------------------------------------------
|
||||||
|
|
|
@ -78,13 +78,10 @@ class BaseSoC(SoCCore):
|
||||||
iodelay_clk_freq = 500e6,
|
iodelay_clk_freq = 500e6,
|
||||||
is_rdimm = True)
|
is_rdimm = True)
|
||||||
self.add_sdram("sdram",
|
self.add_sdram("sdram",
|
||||||
phy = self.ddrphy,
|
phy = self.ddrphy,
|
||||||
module = MTA18ASF2G72PZ(sys_clk_freq, "1:4"),
|
module = MTA18ASF2G72PZ(sys_clk_freq, "1:4"),
|
||||||
origin = self.mem_map["main_ram"],
|
size = 0x40000000,
|
||||||
size = kwargs.get("max_sdram_size", 0x40000000),
|
l2_cache_size = kwargs.get("l2_size", 8192)
|
||||||
l2_cache_size = kwargs.get("l2_size", 8192),
|
|
||||||
l2_cache_min_data_width = kwargs.get("min_l2_data_width", 128),
|
|
||||||
l2_cache_reverse = True
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Firmware RAM (To ease initial LiteDRAM calibration support) ------------------------------
|
# Firmware RAM (To ease initial LiteDRAM calibration support) ------------------------------
|
||||||
|
|
|
@ -77,13 +77,10 @@ class BaseSoC(SoCCore):
|
||||||
iodelay_clk_freq = 500e6,
|
iodelay_clk_freq = 500e6,
|
||||||
is_rdimm = True)
|
is_rdimm = True)
|
||||||
self.add_sdram("sdram",
|
self.add_sdram("sdram",
|
||||||
phy = self.ddrphy,
|
phy = self.ddrphy,
|
||||||
module = MTA18ASF2G72PZ(sys_clk_freq, "1:4"),
|
module = MTA18ASF2G72PZ(sys_clk_freq, "1:4"),
|
||||||
origin = self.mem_map["main_ram"],
|
size = 0x40000000,
|
||||||
size = kwargs.get("max_sdram_size", 0x40000000),
|
l2_cache_size = kwargs.get("l2_size", 8192)
|
||||||
l2_cache_size = kwargs.get("l2_size", 8192),
|
|
||||||
l2_cache_min_data_width = kwargs.get("min_l2_data_width", 128),
|
|
||||||
l2_cache_reverse = True
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Firmware RAM (To ease initial LiteDRAM calibration support) ------------------------------
|
# Firmware RAM (To ease initial LiteDRAM calibration support) ------------------------------
|
||||||
|
|
|
@ -71,13 +71,10 @@ class BaseSoC(SoCCore):
|
||||||
nphases = 4,
|
nphases = 4,
|
||||||
sys_clk_freq = sys_clk_freq)
|
sys_clk_freq = sys_clk_freq)
|
||||||
self.add_sdram("sdram",
|
self.add_sdram("sdram",
|
||||||
phy = self.ddrphy,
|
phy = self.ddrphy,
|
||||||
module = MT8JTF12864(sys_clk_freq, "1:4"),
|
module = MT8JTF12864(sys_clk_freq, "1:4"),
|
||||||
origin = self.mem_map["main_ram"],
|
size = 0x40000000,
|
||||||
size = kwargs.get("max_sdram_size", 0x40000000),
|
l2_cache_size = kwargs.get("l2_size", 8192)
|
||||||
l2_cache_size = kwargs.get("l2_size", 8192),
|
|
||||||
l2_cache_min_data_width = kwargs.get("min_l2_data_width", 128),
|
|
||||||
l2_cache_reverse = True
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Ethernet ---------------------------------------------------------------------------------
|
# Ethernet ---------------------------------------------------------------------------------
|
||||||
|
|
|
@ -80,13 +80,10 @@ class BaseSoC(SoCCore):
|
||||||
sys_clk_freq = sys_clk_freq,
|
sys_clk_freq = sys_clk_freq,
|
||||||
iodelay_clk_freq = 200e6)
|
iodelay_clk_freq = 200e6)
|
||||||
self.add_sdram("sdram",
|
self.add_sdram("sdram",
|
||||||
phy = self.ddrphy,
|
phy = self.ddrphy,
|
||||||
module = EDY4016A(sys_clk_freq, "1:4"),
|
module = EDY4016A(sys_clk_freq, "1:4"),
|
||||||
origin = self.mem_map["main_ram"],
|
size = 0x40000000,
|
||||||
size = kwargs.get("max_sdram_size", 0x40000000),
|
l2_cache_size = kwargs.get("l2_size", 8192)
|
||||||
l2_cache_size = kwargs.get("l2_size", 8192),
|
|
||||||
l2_cache_min_data_width = kwargs.get("min_l2_data_width", 128),
|
|
||||||
l2_cache_reverse = True
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Ethernet / Etherbone ---------------------------------------------------------------------
|
# Ethernet / Etherbone ---------------------------------------------------------------------
|
||||||
|
|
|
@ -67,13 +67,10 @@ class BaseSoC(SoCCore):
|
||||||
nphases = 4,
|
nphases = 4,
|
||||||
sys_clk_freq = sys_clk_freq)
|
sys_clk_freq = sys_clk_freq)
|
||||||
self.add_sdram("sdram",
|
self.add_sdram("sdram",
|
||||||
phy = self.ddrphy,
|
phy = self.ddrphy,
|
||||||
module = MT8JTF12864(sys_clk_freq, "1:4"),
|
module = MT8JTF12864(sys_clk_freq, "1:4"),
|
||||||
origin = self.mem_map["main_ram"],
|
size = 0x40000000,
|
||||||
size = kwargs.get("max_sdram_size", 0x40000000),
|
l2_cache_size = kwargs.get("l2_size", 8192)
|
||||||
l2_cache_size = kwargs.get("l2_size", 8192),
|
|
||||||
l2_cache_min_data_width = kwargs.get("min_l2_data_width", 128),
|
|
||||||
l2_cache_reverse = True
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# PCIe -------------------------------------------------------------------------------------
|
# PCIe -------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -74,13 +74,10 @@ class BaseSoC(SoCCore):
|
||||||
sys_clk_freq = sys_clk_freq,
|
sys_clk_freq = sys_clk_freq,
|
||||||
iodelay_clk_freq = 500e6)
|
iodelay_clk_freq = 500e6)
|
||||||
self.add_sdram("sdram",
|
self.add_sdram("sdram",
|
||||||
phy = self.ddrphy,
|
phy = self.ddrphy,
|
||||||
module = EDY4016A(sys_clk_freq, "1:4"),
|
module = EDY4016A(sys_clk_freq, "1:4"),
|
||||||
origin = self.mem_map["main_ram"],
|
size = 0x40000000,
|
||||||
size = kwargs.get("max_sdram_size", 0x40000000),
|
l2_cache_size = kwargs.get("l2_size", 8192)
|
||||||
l2_cache_size = kwargs.get("l2_size", 8192),
|
|
||||||
l2_cache_min_data_width = kwargs.get("min_l2_data_width", 128),
|
|
||||||
l2_cache_reverse = True
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Leds -------------------------------------------------------------------------------------
|
# Leds -------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -75,13 +75,10 @@ class BaseSoC(SoCCore):
|
||||||
sys_clk_freq = sys_clk_freq,
|
sys_clk_freq = sys_clk_freq,
|
||||||
iodelay_clk_freq = 500e6)
|
iodelay_clk_freq = 500e6)
|
||||||
self.add_sdram("sdram",
|
self.add_sdram("sdram",
|
||||||
phy = self.ddrphy,
|
phy = self.ddrphy,
|
||||||
module = MTA4ATF51264HZ(sys_clk_freq, "1:4"),
|
module = MTA4ATF51264HZ(sys_clk_freq, "1:4"),
|
||||||
origin = self.mem_map["main_ram"],
|
size = 0x40000000,
|
||||||
size = kwargs.get("max_sdram_size", 0x40000000),
|
l2_cache_size = kwargs.get("l2_size", 8192)
|
||||||
l2_cache_size = kwargs.get("l2_size", 8192),
|
|
||||||
l2_cache_min_data_width = kwargs.get("min_l2_data_width", 128),
|
|
||||||
l2_cache_reverse = True
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Leds -------------------------------------------------------------------------------------
|
# Leds -------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -83,13 +83,10 @@ class BaseSoC(SoCCore):
|
||||||
nphases = 4,
|
nphases = 4,
|
||||||
sys_clk_freq = sys_clk_freq)
|
sys_clk_freq = sys_clk_freq)
|
||||||
self.add_sdram("sdram",
|
self.add_sdram("sdram",
|
||||||
phy = self.ddrphy,
|
phy = self.ddrphy,
|
||||||
module = MT41J128M16(sys_clk_freq, "1:4"), #MT41J128M16XX-125
|
module = MT41J128M16(sys_clk_freq, "1:4"), #MT41J128M16XX-125
|
||||||
origin = self.mem_map["main_ram"],
|
size = 0x40000000,
|
||||||
size = kwargs.get("max_sdram_size", 0x40000000),
|
l2_cache_size = kwargs.get("l2_size", 8192)
|
||||||
l2_cache_size = kwargs.get("l2_size", 8192),
|
|
||||||
l2_cache_min_data_width = kwargs.get("min_l2_data_width", 128),
|
|
||||||
l2_cache_reverse = True
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Leds -------------------------------------------------------------------------------------
|
# Leds -------------------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in a new issue