From: Florent Kermarrec Date: Fri, 6 Mar 2015 07:21:16 +0000 (+0100) Subject: soc: enforce cpu_reset_address to 0 when with_rom is True X-Git-Tag: 24jan2021_ls180~2507 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bee8ccf6c78ba57d77f3fc68cbe58e0a6219fdf0;p=litex.git soc: enforce cpu_reset_address to 0 when with_rom is True --- diff --git a/misoclib/soc/__init__.py b/misoclib/soc/__init__.py index 5759afcb..cd42be93 100644 --- a/misoclib/soc/__init__.py +++ b/misoclib/soc/__init__.py @@ -51,7 +51,10 @@ class SoC(Module): self.with_cpu = with_cpu self.cpu_type = cpu_type - self.cpu_reset_address = cpu_reset_address + if with_rom: + self.cpu_reset_address = 0 + else: + self.cpu_reset_address = cpu_reset_address self.cpu_boot_file = cpu_boot_file self.with_rom = with_rom @@ -80,9 +83,9 @@ class SoC(Module): if with_cpu: if cpu_type == "lm32": - self.submodules.cpu = lm32.LM32(platform, cpu_reset_address) + self.submodules.cpu = lm32.LM32(platform, self.cpu_reset_address) elif cpu_type == "or1k": - self.submodules.cpu = mor1kx.MOR1KX(platform, cpu_reset_address) + self.submodules.cpu = mor1kx.MOR1KX(platform, self.cpu_reset_address) else: raise ValueError("Unsupported CPU type: "+cpu_type) self.cpu_or_bridge = self.cpu