From 305b8879de07272de866227510e05ac46ac16d3e Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Mon, 29 Apr 2019 10:14:30 +0200 Subject: [PATCH] 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 --- litex/soc/integration/soc_core.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/litex/soc/integration/soc_core.py b/litex/soc/integration/soc_core.py index a36b68a29..336237330 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