From fc12961e7e01bcf4d874f0edc29e5c1f8697775a Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Mon, 22 Jul 2019 12:38:16 +0200 Subject: [PATCH] soc_core: fix cpu_variant definition --- litex/soc/integration/soc_core.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/litex/soc/integration/soc_core.py b/litex/soc/integration/soc_core.py index fd7d265d..3e5a59fd 100644 --- a/litex/soc/integration/soc_core.py +++ b/litex/soc/integration/soc_core.py @@ -245,8 +245,9 @@ class SoCCore(Module): # Add CPU self.config["CPU_TYPE"] = str(cpu_type).upper() - self.config["CPU_VARIANT"] = str(cpu_variant.split('+')[0]).upper() if cpu_type is not None: + if cpu_variant is not None: + self.config["CPU_VARIANT"] = str(cpu_variant.split('+')[0]).upper() # CPU selection / instance if cpu_type == "lm32": self.add_cpu(cpu.lm32.LM32(platform, self.cpu_reset_address, self.cpu_variant)) -- 2.30.2