Skip to content

Commit

Permalink
gen: disable peripherals that are not used when cpu_type is None
Browse files Browse the repository at this point in the history
  • Loading branch information
enjoy-digital committed Sep 23, 2019
1 parent 2331919 commit adf481f
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions litedram/gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,10 +248,19 @@ class LiteDRAMCore(SoCSDRAM):
def __init__(self, platform, core_config, **kwargs):
platform.add_extension(get_common_ios())
sys_clk_freq = core_config["sys_clk_freq"]
csr_align = core_config.get("csr_align", 32)
cpu_type = core_config["cpu"]
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,
cpu_type=core_config["cpu"],
l2_size=16*core_config["sdram_module_nb"],
cpu_type=cpu_type,
csr_alignment=csr_align,
**kwargs)

Expand Down

0 comments on commit adf481f

Please sign in to comment.