efinix_xyloni_dev_kit: Update SPI Flash.

This commit is contained in:
Florent Kermarrec 2022-01-07 15:00:39 +01:00
parent 16171282c8
commit 30cacc19c2
1 changed files with 5 additions and 4 deletions

View File

@ -44,17 +44,15 @@ class _CRG(Module):
# BaseSoC ------------------------------------------------------------------------------------------
class BaseSoC(SoCCore):
mem_map = {**SoCCore.mem_map, **{"spiflash": 0x80000000}}
def __init__(self, bios_flash_offset, sys_clk_freq, with_led_chaser=True, **kwargs):
platform = efinix_xyloni_dev_kit.Platform()
# Disable Integrated ROM since too large for this device.
# Disable Integrated ROM.
kwargs["integrated_rom_size"] = 0
# Set CPU variant / reset address
if kwargs.get("cpu_type", "vexriscv") == "vexriscv":
kwargs["cpu_variant"] = "minimal"
kwargs["cpu_reset_address"] = self.mem_map["spiflash"] + bios_flash_offset
# SoCCore ----------------------------------------------------------------------------------
SoCCore.__init__(self, platform, sys_clk_freq,
@ -72,10 +70,13 @@ class BaseSoC(SoCCore):
# Add ROM linker region --------------------------------------------------------------------
self.bus.add_region("rom", SoCRegion(
origin = self.mem_map["spiflash"] + bios_flash_offset,
origin = self.bus.regions["spiflash"].origin + bios_flash_offset,
size = 32*kB,
linker = True)
)
# Set CPU reset address to ROM.
if hasattr(self.cpu, "set_reset_address"):
self.cpu.set_reset_address(self.bus.regions["rom"].origin)
# Leds -------------------------------------------------------------------------------------
if with_led_chaser: