From a738739acd797d7ffaa14967976d3fe66cabda4f Mon Sep 17 00:00:00 2001 From: Tim 'mithro' Ansell Date: Mon, 30 Dec 2019 16:10:57 +0100 Subject: [PATCH] Improve the invalid CPU type error message. --- litex/soc/integration/soc_core.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/litex/soc/integration/soc_core.py b/litex/soc/integration/soc_core.py index 61281f02..22e71487 100644 --- a/litex/soc/integration/soc_core.py +++ b/litex/soc/integration/soc_core.py @@ -167,9 +167,13 @@ class SoCCore(Module): if cpu_type is not None: if cpu_variant is not None: self.config["CPU_VARIANT"] = str(cpu_variant.split('+')[0]).upper() + # Check type if cpu_type not in cpu.CPUS.keys(): - raise ValueError("Unsupported CPU type: {}".format(cpu_type)) + raise ValueError( + "Unsupported CPU type: {} -- supported CPU types: {}".format( + cpu_type, ", ".join(cpu.CPUS.keys()))) + # Declare the CPU self.submodules.cpu = cpu.CPUS[cpu_type](platform, self.cpu_variant) if cpu_type == "microwatt": -- 2.30.2