self._generate_includes()
self._generate_software()
if self.soc.integrated_rom_size and self.compile_software:
- self._initialize_rom()
+ if not self.soc.integrated_rom_initialized:
+ self._initialize_rom()
if self.csr_csv is not None:
self._generate_csr_csv()
}
def __init__(self, platform, clk_freq,
cpu_type="lm32", cpu_reset_address=0x00000000,
- integrated_rom_size=0,
+ integrated_rom_size=0, integrated_rom_init=[],
integrated_sram_size=4096,
integrated_main_ram_size=0, integrated_main_ram_init=[],
shadow_base=0x80000000,
self.config["CPU_RESET_ADDR"] = self.cpu_reset_address
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
self.config["CPU_TYPE"] = str(cpu_type).upper()
if integrated_rom_size:
- self.submodules.rom = wishbone.SRAM(integrated_rom_size, read_only=True)
+ self.submodules.rom = wishbone.SRAM(integrated_rom_size, read_only=True, init=integrated_rom_init)
self.register_rom(self.rom.bus, integrated_rom_size)
if integrated_sram_size: