soc/add_cpu: Avoid checking variant with CPUNone.

This commit is contained in:
Florent Kermarrec 2021-10-21 11:44:45 +02:00
parent d16d4917d6
commit 6f8fbfb619
1 changed files with 1 additions and 1 deletions

View File

@ -891,7 +891,7 @@ class SoC(Module):
colorer("cpu_cls", color="red")))
raise SoCError()
cpu_cls = cls if cls is not None else cpu.CPUS[name]
if variant not in cpu_cls.variants:
if (variant not in cpu_cls.variants) and (cpu_cls is not cpu.CPUNone):
self.logger.error("{} CPU variant {}, supporteds: {}.".format(
colorer(variant),
colorer("not supported", color="red"),