From: Florent Kermarrec Date: Mon, 22 Jul 2019 10:38:16 +0000 (+0200) Subject: soc_core: fix cpu_variant definition X-Git-Tag: 24jan2021_ls180~1088 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fc12961e7e01bcf4d874f0edc29e5c1f8697775a;p=litex.git soc_core: fix cpu_variant definition --- 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))