gen: disable peripherals that are not used when cpu_type is None
This commit is contained in:
parent
233191939e
commit
adf481f1d5
|
@ -248,10 +248,19 @@ class LiteDRAMCore(SoCSDRAM):
|
||||||
def __init__(self, platform, core_config, **kwargs):
|
def __init__(self, platform, core_config, **kwargs):
|
||||||
platform.add_extension(get_common_ios())
|
platform.add_extension(get_common_ios())
|
||||||
sys_clk_freq = core_config["sys_clk_freq"]
|
sys_clk_freq = core_config["sys_clk_freq"]
|
||||||
|
cpu_type = core_config["cpu"]
|
||||||
csr_align = core_config.get("csr_align", 32)
|
csr_align = core_config.get("csr_align", 32)
|
||||||
|
if cpu_type == "None":
|
||||||
|
kwargs["integrated_rom_size"] = 0
|
||||||
|
kwargs["integrated_sram_size"] = 0
|
||||||
|
kwargs["l2_size"] = 0
|
||||||
|
kwargs["with_uart"] = False
|
||||||
|
kwargs["with_timer"] = False
|
||||||
|
kwargs["with_ctrl"] = False
|
||||||
|
else:
|
||||||
|
kwargs["l2_size"] = 0
|
||||||
SoCSDRAM.__init__(self, platform, sys_clk_freq,
|
SoCSDRAM.__init__(self, platform, sys_clk_freq,
|
||||||
cpu_type=core_config["cpu"],
|
cpu_type=cpu_type,
|
||||||
l2_size=16*core_config["sdram_module_nb"],
|
|
||||||
csr_alignment=csr_align,
|
csr_alignment=csr_align,
|
||||||
**kwargs)
|
**kwargs)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue