From: Florent Kermarrec Date: Mon, 29 Apr 2019 08:14:30 +0000 (+0200) Subject: integration/soc_core: use cpu name as cpu-type for all cpus (mor1kx was instanciated... X-Git-Tag: 24jan2021_ls180~1258 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=305b8879de07272de866227510e05ac46ac16d3e;p=litex.git integration/soc_core: use cpu name as cpu-type for all cpus (mor1kx was instanciated with or1k) Keep or1k retro-compatibility for now but add a warning --- diff --git a/litex/soc/integration/soc_core.py b/litex/soc/integration/soc_core.py index a36b68a2..33623733 100644 --- a/litex/soc/integration/soc_core.py +++ b/litex/soc/integration/soc_core.py @@ -8,6 +8,8 @@ from operator import itemgetter from migen import * +from litex.build.tools import deprecated_warning + from litex.soc.cores import identifier, timer, uart from litex.soc.cores.cpu import * from litex.soc.interconnect.csr import * @@ -259,7 +261,9 @@ class SoCCore(Module): if cpu_type is not None: if cpu_type == "lm32": self.add_cpu(lm32.LM32(platform, self.cpu_reset_address, self.cpu_variant)) - elif cpu_type == "or1k": + elif cpu_type == "mor1kx" or cpu_type == "or1k": + if cpu_type == "or1k": + deprecated_warning("SoCCore's \"cpu-type\" to \"mor1kx\"") self.add_cpu(mor1kx.MOR1KX(platform, self.cpu_reset_address, self.cpu_variant)) elif cpu_type == "picorv32": self.add_cpu(picorv32.PicoRV32(platform, self.cpu_reset_address, self.cpu_variant)) @@ -357,7 +361,7 @@ class SoCCore(Module): self.submodules.cpu = cpu def add_cpu_or_bridge(self, cpu_or_bridge): - print("[WARNING] Please update SoCCore's \"add_cpu_or_bridge\" call to \"add_cpu\"") + deprecated_warning("SoCCore's \"add_cpu_or_bridge\" call to \"add_cpu\"") self.add_cpu(cpu_or_bridge) self.cpu_or_bridge = self.cpu