soc: enforce cpu_reset_address to 0 when with_rom is True
This commit is contained in:
parent
2b9397ff5b
commit
bee8ccf6c7
|
@ -51,6 +51,9 @@ class SoC(Module):
|
|||
|
||||
self.with_cpu = with_cpu
|
||||
self.cpu_type = cpu_type
|
||||
if with_rom:
|
||||
self.cpu_reset_address = 0
|
||||
else:
|
||||
self.cpu_reset_address = cpu_reset_address
|
||||
self.cpu_boot_file = cpu_boot_file
|
||||
|
||||
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue