From: Florent Kermarrec Date: Tue, 14 Jan 2020 08:23:30 +0000 (+0100) Subject: SoCCore: set default integrated_rom/ram_size to 0. For targets, defaults values are... X-Git-Tag: 24jan2021_ls180~745 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=42efa998269ebdeaa07c9d8b9b4bda25f9aecc20;p=litex.git SoCCore: set default integrated_rom/ram_size to 0. For targets, defaults values are provided by soc_core_args. --- diff --git a/litex/soc/integration/soc_core.py b/litex/soc/integration/soc_core.py index ffe0546f..fffd2da6 100644 --- a/litex/soc/integration/soc_core.py +++ b/litex/soc/integration/soc_core.py @@ -85,9 +85,9 @@ class SoCCore(Module): # CPU parameters cpu_type="vexriscv", cpu_reset_address=0x00000000, cpu_variant=None, # ROM parameters - integrated_rom_size=0x8000, integrated_rom_init=[], + integrated_rom_size=0, integrated_rom_init=[], # SRAM parameters - integrated_sram_size=0x1000, integrated_sram_init=[], + integrated_sram_size=0, integrated_sram_init=[], # MAIN_RAM parameters integrated_main_ram_size=0, integrated_main_ram_init=[], # CSR parameters @@ -139,8 +139,10 @@ class SoCCore(Module): self.integrated_rom_size = integrated_rom_size self.integrated_rom_initialized = integrated_rom_init != [] - self.integrated_sram_size = integrated_sram_size - self.integrated_main_ram_size = integrated_main_ram_size + if cpu_type is not None and integrated_sram_size == 0: + integrated_sram_size = 0x1000 + self.integrated_sram_size = integrated_sram_size + self.integrated_main_ram_size = integrated_main_ram_size assert csr_data_width in [8, 16, 32] self.csr_data_width = csr_data_width