From: Florent Kermarrec Date: Sat, 12 Oct 2019 17:18:57 +0000 (+0200) Subject: soc_core/soc_core_argdict: use inspect to get all parameters and simplify X-Git-Tag: 24jan2021_ls180~912 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5a0358754d0c92af76fb3966e9c7aa1e940007d8;p=litex.git soc_core/soc_core_argdict: use inspect to get all parameters and simplify --- 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