mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
soc_core/soc_core_argdict: use inspect to get all parameters and simplify
This commit is contained in:
parent
96c369f3e4
commit
5a0358754d
1 changed files with 2 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue