integration/soc_core: avoid cpu_variant check if custom cpu_cls is passed.
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Tue, 19 May 2020 14:01:57 +0000 (16:01 +0200)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Tue, 19 May 2020 14:01:57 +0000 (16:01 +0200)
litex/soc/integration/soc_core.py

index 9567510b2e0f984a1593891d11e0894418427f1a..123b3b425f418722ea0ee29067ec656cc2a934d7 100644 (file)
@@ -128,7 +128,7 @@ class SoCCore(LiteXSoC):
         # Parameters management --------------------------------------------------------------------
         cpu_type          = None if cpu_type == "None" else cpu_type
         cpu_reset_address = None if cpu_reset_address == "None" else cpu_reset_address
-        cpu_variant       = cpu.check_format_cpu_variant(cpu_variant)
+        cpu_variant       = cpu.check_format_cpu_variant(cpu_variant) if cpu_cls is None else cpu_variant
 
         self.cpu_type                   = cpu_type
         self.cpu_variant                = cpu_variant