From 49f12ea29700460a362a81939e073885347bfd88 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Fri, 8 Mar 2024 18:51:26 +0100 Subject: [PATCH] soc/add_cpu: Add CPU_NAME constant. --- litex/soc/integration/soc.py | 1 + 1 file changed, 1 insertion(+) diff --git a/litex/soc/integration/soc.py b/litex/soc/integration/soc.py index fa5c4aba2..8439b97c9 100644 --- a/litex/soc/integration/soc.py +++ b/litex/soc/integration/soc.py @@ -1252,6 +1252,7 @@ class SoC(LiteXModule, SoCCoreCompat): # Add constants. self.add_config(f"CPU_TYPE_{name}") self.add_config(f"CPU_VARIANT_{str(variant.split('+')[0])}") + self.add_config("CPU_NAME", getattr(self.cpu, "name", "Unknown")) self.add_config("CPU_HUMAN_NAME", getattr(self.cpu, "human_name", "Unknown")) if hasattr(self.cpu, "nop"): self.add_config("CPU_NOP", self.cpu.nop)