From 5a0358754d0c92af76fb3966e9c7aa1e940007d8 Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Sat, 12 Oct 2019 19:18:57 +0200 Subject: [PATCH] soc_core/soc_core_argdict: use inspect to get all parameters and simplify --- litex/soc/integration/soc_core.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/litex/soc/integration/soc_core.py b/litex/soc/integration/soc_core.py index e4a23429..4d928870 100644 --- a/litex/soc/integration/soc_core.py +++ b/litex/soc/integration/soc_core.py @@ -527,13 +527,8 @@ def soc_core_args(parser): def soc_core_argdict(args): r = dict() - for a in [ - "cpu_type", - "cpu_variant", - "integrated_rom_size", - "integrated_main_ram_size", - "uart_stub"]: - arg = getattr(args, a) + for a in inspect.getargspec(SoCCore.__init__).args: + arg = getattr(args, a, None) if arg is not None: r[a] = arg return r -- 2.30.2